进行了一些小修复

This commit is contained in:
2026-08-26 21:23:55 +08:00
parent 8111b17392
commit f143a111cd
3 changed files with 28 additions and 61 deletions
+3 -38
View File
@@ -1,24 +1,5 @@
/* Front-end article editor — follows the reference theme's newposts page. */
.newposts-wrap {
display: flex;
align-items: flex-start;
gap: 15px;
width: 100%;
margin: 20px 0 30px;
}
.newposts-wrap > .content-layout {
flex: 1 1 auto;
min-width: 0;
}
.newposts-wrap > .sidebar {
display: block;
flex: 0 0 300px;
width: 300px;
}
.newposts-wrap .zib-widget {
#aksrt-submit-form .zib-widget {
margin-bottom: 15px;
padding: 15px;
border-radius: var(--main-radius, 8px);
@@ -516,33 +497,17 @@ body.aksrt-editor-media-open {
margin-right: 4px;
}
.newposts-wrap [hidden] {
#aksrt-submit-form [hidden] {
display: none !important;
}
.newposts-wrap .new-posts-submit {
display: inline-flex;
align-items: center;
justify-content: center;
white-space: nowrap;
}
@media (max-width: 991px) {
.newposts-wrap {
display: block;
body .newposts-wrap {
float: none;
}
.newposts-wrap > .sidebar {
width: 100%;
}
}
@media (max-width: 767px) {
.newposts-wrap {
margin-top: 10px;
}
.newposts-wrap .zib-widget {
border-radius: 0;
}
+2 -2
View File
@@ -223,7 +223,8 @@ get_header();
}
?>
</div>
<aside class="sidebar show-sidebar">
</div>
<div class="sidebar show-sidebar">
<?php \AKSRT\WidgetSystem\WidgetAreas::render('newposts_sidebar_top'); ?>
<?php
$terms = get_template_directory() . '/templates/parts/submit/sidebar-terms.php';
@@ -240,7 +241,6 @@ get_header();
}
?>
<?php \AKSRT\WidgetSystem\WidgetAreas::render('newposts_sidebar_bottom'); ?>
</aside>
</div>
</form>
</main>
@@ -43,7 +43,8 @@ test('front submit follows the reference newposts shell and cards', () => {
assert.match(page, /content-wrap newposts-wrap/);
assert.match(page, /class="content-layout"/);
assert.match(page, /class="sidebar show-sidebar"/);
assert.match(page, /<\/div>\s*<\/div>\s*<div class="sidebar show-sidebar">/);
assert.equal((page.match(/class="sidebar show-sidebar"/g) || []).length, 1);
assert.match(main, /zib-widget full-widget-sm editor-main-box/);
assert.match(main, /relative newposts-title/);
assert.match(terms, /newpost-cat-drop drop-select dropdown dependency-box/);
@@ -58,10 +59,11 @@ test('front submit follows the reference newposts shell and cards', () => {
assert.match(pay, /pay-dawnload-edit/);
assert.match(submit, /separator muted-3-color theme-box/);
assert.match(submit, /new-posts-submit/);
assert.match(submitCss, /\.newposts-wrap \.new-posts-submit\s*{[^}]*display:\s*inline-flex;[^}]*white-space:\s*nowrap;/);
assert.doesNotMatch(submitCss, /\.newposts-wrap \.but-average\s*>\s*\*\s*{[^}]*flex:\s*1 1 0;/);
assert.match(mobileSubmitCss, /\.newposts-wrap\s*{[^}]*display:\s*block;/);
assert.match(mobileSubmitCss, /\.newposts-wrap > \.sidebar\s*{[^}]*width:\s*100%;/);
assert.match(mainCss, /\.but-average > \.but\s*{[^}]*flex:\s*auto;/);
assert.match(mainCss, /body \.sidebar\.show-sidebar\s*{[^}]*display:\s*unset;[^}]*width:\s*100%;[^}]*margin-left:\s*0;/);
assert.match(mobileSubmitCss, /body \.newposts-wrap\s*{[^}]*float:\s*none;/);
assert.doesNotMatch(submitCss, /\.newposts-wrap\s*>\s*\.(?:content-layout|sidebar)/);
assert.doesNotMatch(submitCss, /\.newposts-wrap \.new-posts-submit/);
});
test('front submit paid resources use the reference modal editor and compact list', () => {