Files
wordpress-theme-aksrt/assets/css/routes/posts-navs.css
T
kate522 1cb534e4fe feat(pages): 1:1 文章导航 posts-navs (zibll postsnavs)
Per-category full post lists, affix TOC shell, admin drag-sort settings
modal + AJAX save (navs_show_cat_id / name / desc).
2026-07-18 21:10:42 +08:00

262 lines
4.6 KiB
CSS

/**
* AKSRT 文章导航页 — zibll postsnavs shell + admin settings.
*
* @package AKSRT
*/
/* header card */
.page-template-posts-navs .content-wrap,
main.page-template-posts-navs {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
main.page-template-posts-navs .content-wrap {
flex: 1 1 0;
min-width: 0;
}
main.page-template-posts-navs .sidebar {
flex: 0 0 260px;
max-width: 100%;
}
.posts-navs .title-theme h2 {
margin: 0;
font-size: 1.15em;
}
.posts-navs__list {
list-style: none;
margin: 0;
padding: 0;
}
.posts-navs__item {
margin: 0 0 10px;
padding: 0;
}
.posts-navs__item .text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.posts-navs__item .icon-circle {
display: inline-block;
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--muted-3-color, #ccc);
margin: 0 0.55em;
vertical-align: middle;
}
.posts-navs__item a {
color: var(--color-ink, inherit);
text-decoration: none;
}
.posts-navs__item a:hover {
color: var(--focus-color, var(--color-primary));
}
.posts-navs .theme-box {
margin-bottom: 20px;
}
.posts-navs .box-body.notop {
padding-top: 0;
}
/* TOC sidebar filled by section-navs.js */
.posts-nav-box .posts-nav-lists,
.posts-nav-box .aksrt-section-nav {
max-height: 400px;
padding-left: 10px;
overflow-y: auto;
}
.posts-nav-box .zib-widget {
background: var(--main-bg-color, var(--surface-1, #fff));
border-radius: 8px;
box-shadow: 0 1px 4px var(--main-shadow, rgba(0, 0, 0, 0.06));
padding: 10px;
}
.posts-nav-lists .bl {
border-left: 1px solid var(--main-border-color, #eee);
padding: 12px 10px 12px 0;
list-style: none;
margin: 0;
position: relative;
}
.posts-nav-lists li {
position: relative;
list-style: none;
}
.posts-nav-lists li a {
margin: 0 10px;
display: block;
border-radius: 4px;
padding: 8px;
margin-right: 20px;
color: var(--muted-2-color, #666);
text-decoration: none;
}
.posts-nav-lists li a:hover,
.posts-nav-lists li.active a {
background: var(--main-shadow, rgba(0, 0, 0, 0.04));
color: var(--focus-color, var(--color-primary));
}
.posts-nav-lists li.n-H1 a,
.posts-nav-lists li.n-H2 a {
font-weight: 700;
}
/* settings modal */
#post-navs-sz.modal {
position: fixed;
inset: 0;
z-index: 1050;
display: none;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.45);
padding: 16px;
}
#post-navs-sz.modal.is-open,
#post-navs-sz.modal.show {
display: flex;
}
#post-navs-sz .modal-dialog {
width: min(640px, 100%);
max-height: 90vh;
overflow: auto;
}
#post-navs-sz .modal-content {
background: var(--main-bg-color, #fff);
border-radius: 10px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
#post-navs-sz .modal-header,
#post-navs-sz .modal-body,
#post-navs-sz .modal-footer {
padding: 16px 20px;
}
#post-navs-sz .modal-header {
border-bottom: 1px solid var(--main-border-color, #eee);
}
#post-navs-sz .modal-footer {
border-top: 1px solid var(--main-border-color, #eee);
text-align: right;
}
#post-navs-sz .close {
float: right;
border: 0;
background: transparent;
cursor: pointer;
}
#post-navs-sz .form-control {
width: 100%;
padding: 8px 10px;
border: 1px solid var(--main-border-color, #ddd);
border-radius: 6px;
box-sizing: border-box;
}
#post-navs-sz .form-group {
margin-bottom: 14px;
}
#post-navs-sz .row {
display: flex;
flex-wrap: wrap;
margin: 0 -8px;
}
#post-navs-sz .col-xs-6,
#post-navs-sz .col-sm-6 {
width: 50%;
padding: 0 8px;
box-sizing: border-box;
}
.cat-group {
height: 200px;
background: var(--body-bg-color, var(--surface-2, #f6f7f9));
border: 1px solid var(--main-border-color, #ddd);
border-radius: 4px;
overflow: hidden;
padding: 5px;
overflow-y: auto;
}
.sortable-cat-item {
background: var(--main-border-color, #e8e8e8);
padding: 4px 8px;
transition: 0.2s;
border-radius: 4px;
margin: 2px;
display: inline-block;
cursor: grab;
width: calc(100% - 15px);
min-width: 100px;
box-sizing: border-box;
user-select: none;
}
.sortable-cat-item .badge {
margin-left: 4px;
background: rgba(0, 0, 0, 0.08);
color: inherit;
border-radius: 10px;
padding: 0 6px;
font-size: 12px;
}
#cat-sortable-ok .sortable-cat-item {
background: rgba(73, 214, 253, 0.12);
color: #069cf3;
}
.sortable-cat-item.is-dragging {
opacity: 0.5;
}
.sortable-cat-item.sortable-selected {
background: rgba(251, 82, 82, 0.1) !important;
color: #fb5454 !important;
}
.cat-group.is-drop-target {
outline: 2px dashed var(--focus-color, #f04494);
}
@media (max-width: 991px) {
main.page-template-posts-navs .sidebar {
flex: 1 1 100%;
order: -1;
}
#post-navs-sz .col-xs-6,
#post-navs-sz .col-sm-6 {
width: 100%;
margin-bottom: 12px;
}
}