refactor: improve SCSS nesting structure

This commit is contained in:
Erzbir
2026-05-16 15:27:13 +08:00
parent f3002b58dc
commit be59fb0e06
19 changed files with 394 additions and 379 deletions
+3 -3
View File
@@ -29,9 +29,9 @@ a.button.outline {
padding: calc(var(--size-theme-font) * 0.5) calc(var(--size-theme-font) * 1.125); padding: calc(var(--size-theme-font) * 0.5) calc(var(--size-theme-font) * 1.125);
} }
button.outline :hover, button.outline:hover,
.button.outline :hover, .button.outline:hover,
a.button.outline :hover { a.button.outline:hover {
transform: none; transform: none;
box-shadow: none; box-shadow: none;
} }
+1 -1
View File
@@ -33,7 +33,7 @@ comment-widget {
--halo-comment-widget-base-info-color: var(--color-theme-foreground) !important; --halo-comment-widget-base-info-color: var(--color-theme-foreground) !important;
--halo-comment-widget-component-form-input-bg-color: var(--color-theme-background) !important; --halo-comment-widget-component-form-input-bg-color: var(--color-theme-background) !important;
--halo-comment-widget-component-form-input-color: var(--color-theme-foreground) !important; --halo-comment-widget-component-form-input-color: var(--color-theme-foreground) !important;
--halo-comment-widget-component-form-input-border-color: var(var(--color-theme-foreground) !important) !important; --halo-comment-widget-component-form-input-border-color: var(--color-theme-foreground) !important;
--halo-comment-widget-component-form-input-border-color-focus: var(--color-theme-accent) !important; --halo-comment-widget-component-form-input-border-color-focus: var(--color-theme-accent) !important;
--halo-comment-widget-component-form-input-box-shadow-focus: var(--color-theme-accent) !important; --halo-comment-widget-component-form-input-box-shadow-focus: var(--color-theme-accent) !important;
--halo-comment-widget-component-form-button-login-bg-color: var(--color-theme-background) !important; --halo-comment-widget-component-form-button-login-bg-color: var(--color-theme-background) !important;
+28 -27
View File
@@ -6,9 +6,8 @@
opacity: 0.65; opacity: 0.65;
position: relative; position: relative;
margin-top: auto; margin-top: auto;
}
.footer-inner { &-inner {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -21,24 +20,23 @@
a { a {
color: inherit; color: inherit;
} }
} }
.footer-copyright-engine { &-copyright-engine {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: calc(var(--size-theme-font) * 0.9); font-size: calc(var(--size-theme-font) * 0.9);
line-height: 1.5; line-height: 1.5;
}
.footer-copyright-engine span, span,
.footer-copyright-engine a { a {
white-space: nowrap; white-space: nowrap;
} }
}
&-copyright-site {
.footer-copyright-site {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@@ -46,58 +44,61 @@
flex-wrap: wrap; flex-wrap: wrap;
font-size: calc(var(--size-theme-font) * 0.9); font-size: calc(var(--size-theme-font) * 0.9);
line-height: 1.5; line-height: 1.5;
} }
.footer-user { &-user {
display: flex; display: flex;
align-items: center; align-items: center;
white-space: nowrap; white-space: nowrap;
} }
.footer-icp p { &-icp p {
margin: 0; margin: 0;
display: flex; display: flex;
align-items: center; align-items: center;
gap: calc(var(--size-theme-font) * 0.625); gap: calc(var(--size-theme-font) * 0.625);
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.footer-inner { &-inner {
padding: calc(var(--size-theme-font) * 0.9375) calc(var(--size-theme-font) * 0.625); padding: calc(var(--size-theme-font) * 0.9375) calc(var(--size-theme-font) * 0.625);
gap: calc(var(--size-theme-font) * 0.625); gap: calc(var(--size-theme-font) * 0.625);
} }
.footer-copyright-engine { &-copyright-engine {
font-size: calc(var(--size-theme-font) * 0.8125); font-size: calc(var(--size-theme-font) * 0.8125);
line-height: 1.6; line-height: 1.6;
} }
.footer-copyright-site { &-copyright-site {
flex-direction: column; flex-direction: column;
gap: calc(var(--size-theme-font) * 0.5); gap: calc(var(--size-theme-font) * 0.5);
font-size: calc(var(--size-theme-font) * 0.8125); font-size: calc(var(--size-theme-font) * 0.8125);
} }
.footer-icp p { &-icp p {
flex-direction: column; flex-direction: column;
gap: calc(var(--size-theme-font) * 0.3125); gap: calc(var(--size-theme-font) * 0.3125);
} }
} }
@media (max-width: 480px) { @media (max-width: 480px) {
.footer-inner { &-inner {
padding: calc(var(--size-theme-font) * 0.75) calc(var(--size-theme-font) * 0.5); padding: calc(var(--size-theme-font) * 0.75) calc(var(--size-theme-font) * 0.5);
} }
.footer-copyright-engine, &-copyright-engine,
.footer-copyright-site { &-copyright-site {
font-size: calc(var(--size-theme-font) * 0.75); font-size: calc(var(--size-theme-font) * 0.75);
} }
.footer-copyright-engine span, &-copyright-engine {
.footer-copyright-engine a { span,
a {
white-space: normal; white-space: normal;
} }
}
}
} }
+13 -11
View File
@@ -1,28 +1,30 @@
.friend-post-list { .friend {
&-post-list {
padding: 0; padding: 0;
} }
.friend-post-title { &-post-title {
margin-bottom: calc(var(--size-theme-font) * .3125); margin-bottom: calc(var(--size-theme-font) * 0.3125);
padding: 0; padding: 0;
} }
.friend-post-meta { &-post-meta {
margin-bottom: calc(var(--size-theme-font) * .3125); margin-bottom: calc(var(--size-theme-font) * 0.3125);
padding: 0; padding: 0;
} }
.friend-author { &-author {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: calc(var(--size-theme-font) * 0.35); gap: calc(var(--size-theme-font) * 0.35);
color: var(--color-theme-meta); color: var(--color-theme-meta);
text-decoration: none; text-decoration: none;
} }
.friend-post-desc { &-post-desc {
margin: 0; margin: 0;
padding: 0; padding: 0;
color: var(--color-theme-foreground); color: var(--color-theme-foreground);
font-size: calc(var(--size-theme-font) * 0.875); font-size: calc(var(--size-theme-font) * 0.875);
}
} }
+11 -9
View File
@@ -2,39 +2,41 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
}
.header__inner { &-inner {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
#theme-toggle, #search-button, #pixel-toggle { #theme-toggle,
#search-button,
#pixel-toggle {
background-color: transparent; background-color: transparent;
color: var(--color-theme-header); color: var(--color-theme-header);
border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-header); border: var(--width-theme-border) var(--style-theme-border) var(--color-theme-header);
margin: 0 0 0 calc(var(--size-theme-font) * 0.5); margin: 0 0 0 calc(var(--size-theme-font) * 0.5);
padding: 0; padding: 0;
} }
} }
.header__logo { &-logo {
display: flex; display: flex;
flex: 1; flex: 1;
}
.header__logo::after { &::after {
content: ""; content: "";
background: repeating-linear-gradient(90deg, var(--color-theme-header), var(--color-theme-header) var(--width-theme-border), transparent 0, transparent calc(var(--size-theme-font) * 0.625)); background: repeating-linear-gradient(90deg, var(--color-theme-header), var(--color-theme-header) var(--width-theme-border), transparent 0, transparent calc(var(--size-theme-font) * 0.625));
display: block; display: block;
width: 100%; width: 100%;
right: calc(var(--size-theme-font) * 0.625); right: calc(var(--size-theme-font) * 0.625);
} }
.header__logo a { a {
flex: 0 0 auto; flex: 0 0 auto;
max-width: 100%; max-width: 100%;
text-decoration: none; text-decoration: none;
}
}
} }
.logo { .logo {
+55 -31
View File
@@ -1,8 +1,9 @@
.link-section { .link {
&-section {
margin-bottom: calc(var(--size-theme-font) * 3); margin-bottom: calc(var(--size-theme-font) * 3);
} }
.link-section-header { &-section-header {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: calc(var(--size-theme-font) * 1.25); margin-bottom: calc(var(--size-theme-font) * 1.25);
@@ -18,8 +19,17 @@
white-space: nowrap; white-space: nowrap;
margin: 0; margin: 0;
&::before { content: "┌─["; color: var(--color-theme-accent); opacity: 0.4; } &::before {
&::after { content: "]"; color: var(--color-theme-accent); opacity: 0.4; } content: "┌─[";
color: var(--color-theme-accent);
opacity: 0.4;
}
&::after {
content: "]";
color: var(--color-theme-accent);
opacity: 0.4;
}
> span { > span {
color: var(--color-theme-accent); color: var(--color-theme-accent);
@@ -37,72 +47,77 @@
margin-left: 0.6em; margin-left: 0.6em;
opacity: 0.5; opacity: 0.5;
} }
} }
.link-table { &-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
} }
.link-item { &-item {
display: block; display: block;
padding: calc(var(--size-theme-font) * 0.55) calc(var(--size-theme-font) * 0.55); padding: calc(var(--size-theme-font) * 0.55) calc(var(--size-theme-font) * 0.55);
text-decoration: none; text-decoration: none;
color: inherit; color: inherit;
} }
.link-container { &-container {
display: grid; display: grid;
grid-template-columns: calc(var(--size-theme-font) * 3.5) 1fr; grid-template-columns: calc(var(--size-theme-font) * 3.5) 1fr;
gap: calc(var(--size-theme-font) * 0.75); gap: calc(var(--size-theme-font) * 0.75);
align-items: center; align-items: center;
} }
.link-logo-wrap { &-logo-wrap {
width: calc(var(--size-theme-font) * 3.5); width: calc(var(--size-theme-font) * 3.5);
height: calc(var(--size-theme-font) * 3.5); height: calc(var(--size-theme-font) * 3.5);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
overflow: hidden; overflow: hidden;
} }
.link-logo { &-logo {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
display: block; display: block;
} }
.link-content { &-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: calc(var(--size-theme-font) * 0.15); gap: calc(var(--size-theme-font) * 0.15);
min-width: 0; min-width: 0;
} }
.link-title { &-title {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
flex-wrap: wrap; flex-wrap: wrap;
gap: calc(var(--size-theme-font) * 0.5); gap: calc(var(--size-theme-font) * 0.5);
} }
.link-name { &-name {
color: var(--color-theme-foreground); color: var(--color-theme-foreground);
&::before { content: "> "; color: var(--color-theme-accent); opacity: 0.55; }
}
.link-url { &::before {
content: "> ";
color: var(--color-theme-accent);
opacity: 0.55;
}
}
&-url {
color: var(--color-theme-meta); color: var(--color-theme-meta);
font-size: calc(var(--size-theme-font) * 0.8); font-size: calc(var(--size-theme-font) * 0.8);
opacity: 0.7; opacity: 0.7;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.link-description { &-description {
color: var(--color-theme-foreground); color: var(--color-theme-foreground);
font-size: calc(var(--size-theme-font) * 0.82); font-size: calc(var(--size-theme-font) * 0.82);
line-height: var(--height-theme-line); line-height: var(--height-theme-line);
@@ -110,10 +125,19 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
opacity: 0.8; opacity: 0.8;
} }
@media (max-width: 600px) { @media (max-width: 600px) {
.link-url { display: none; } &-url {
.link-description { white-space: normal; } display: none;
.link-container { grid-template-columns: calc(var(--size-theme-font) * 3) 1fr; } }
&-description {
white-space: normal;
}
&-container {
grid-template-columns: calc(var(--size-theme-font) * 3) 1fr;
}
}
} }
+15 -23
View File
@@ -15,7 +15,7 @@
margin: 0; margin: 0;
} }
.navigation-menu__inner { &-inner {
display: flex; display: flex;
flex: 1; flex: 1;
flex-wrap: wrap; flex-wrap: wrap;
@@ -31,20 +31,13 @@
justify-items: center; justify-items: center;
padding: 0; padding: 0;
li { > li {
width: 100%; width: 100%;
}
li:not(:last-of-type) {
margin-bottom: 0;
}
.navigation-menu__inner li {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.navigation-menu__inner > li a { > li a {
display: block; display: block;
text-align: center; text-align: center;
white-space: normal; white-space: normal;
@@ -52,9 +45,7 @@
word-break: break-word; word-break: break-word;
} }
} }
} > li {
.navigation-menu__inner > li {
flex: 0 0 auto; flex: 0 0 auto;
margin-bottom: calc(var(--size-theme-font) * 0.625); margin-bottom: calc(var(--size-theme-font) * 0.625);
white-space: nowrap; white-space: nowrap;
@@ -65,17 +56,18 @@
min-width: 0; min-width: 0;
white-space: normal; white-space: normal;
} }
}
.navigation-menu__inner > li:not(:last-of-type) { &:not(:last-of-type) {
margin-right: calc(var(--size-theme-font) * 1.25); margin-right: calc(var(--size-theme-font) * 1.25);
@media (max-width: $phone-max-width) { @media (max-width: $phone-max-width) {
margin-right: 0; margin-right: 0;
} }
} }
}
}
.navigation-menu .spacer { .spacer {
flex-grow: 1 !important; flex-grow: 1 !important;
} }
@@ -97,7 +89,7 @@
} }
} }
.menu__trigger { .menu-trigger {
all: unset; all: unset;
cursor: pointer; cursor: pointer;
background-color: var(--color-theme-background) !important; background-color: var(--color-theme-background) !important;
@@ -118,7 +110,7 @@
} }
} }
.menu__dropdown { .menu-dropdown {
display: none; display: none;
flex-direction: column; flex-direction: column;
position: absolute; position: absolute;
@@ -137,15 +129,15 @@
} }
} }
.menu__dropdown > li { .menu-dropdown > li {
flex: 0 0 auto; flex: 0 0 auto;
} }
.menu__dropdown > li:not(:last-of-type) { .menu-dropdown > li:not(:last-of-type) {
margin-bottom: calc(var(--size-theme-font) * 0.625); margin-bottom: calc(var(--size-theme-font) * 0.625);
} }
.menu__dropdown > li a { .menu-dropdown > li a {
display: flex; display: flex;
padding: calc(var(--size-theme-font) * 0.3125); padding: calc(var(--size-theme-font) * 0.3125);
text-decoration: underline; text-decoration: underline;
@@ -155,8 +147,8 @@
display: flex; display: flex;
} }
.sub-menu:hover .menu__dropdown, .sub-menu:hover .menu-dropdown,
.sub-menu:active .menu__dropdown { .sub-menu:active .menu-dropdown {
display: flex !important; display: flex !important;
opacity: 1; opacity: 1;
visibility: visible; visibility: visible;
+2 -3
View File
@@ -3,14 +3,14 @@
gap: calc(var(--size-theme-font) * 0.5); gap: calc(var(--size-theme-font) * 0.5);
margin: var(--size-theme-font) 0; margin: var(--size-theme-font) 0;
width: 80%; width: 80%;
}
.moment-media video { video {
width: 100%; width: 100%;
height: calc(var(--size-theme-font) * 12.5); height: calc(var(--size-theme-font) * 12.5);
object-fit: cover; object-fit: cover;
border-radius: var(--size-theme-font); border-radius: var(--size-theme-font);
transition: transform 0.3s ease; transition: transform 0.3s ease;
}
} }
.moment-footer { .moment-footer {
@@ -36,7 +36,6 @@
&.active { &.active {
color: var(--color-theme-accent); color: var(--color-theme-accent);
} }
} }
.moment-comment-section { .moment-comment-section {
+21 -21
View File
@@ -3,14 +3,23 @@
.pagination { .pagination {
margin-top: calc(var(--size-theme-font) * 0.625); margin-top: calc(var(--size-theme-font) * 0.625);
.pagination__title { &-title {
display: flex; display: flex;
text-align: center;
position: relative; position: relative;
margin: calc(var(--size-theme-font) * 0.625) 0 calc(var(--size-theme-font) * 0.625); text-align: center;
margin: calc(var(--size-theme-font) * 0.625) 0;
hr {
position: absolute;
background-color: color-mix(in srgb, var(--color-theme-foreground) 65%, transparent);
left: 0;
right: 0;
width: 100%;
margin-top: calc(var(--size-theme-font) * 0.9375);
z-index: 0;
} }
.pagination__title-h { &-h {
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
padding: calc(var(--size-theme-font) * 0.3125) calc(var(--size-theme-font) * 0.625); padding: calc(var(--size-theme-font) * 0.3125) calc(var(--size-theme-font) * 0.625);
@@ -21,18 +30,9 @@
letter-spacing: 0.1em; letter-spacing: 0.1em;
z-index: 1; z-index: 1;
} }
.pagination__title hr {
position: absolute;
background-color: color-mix(in srgb, var(--color-theme-foreground) 65%, transparent);
left: 0;
right: 0;
width: 100%;
margin-top: calc(var(--size-theme-font) * 0.9375);
z-index: 0;
} }
.pagination__buttons { &-buttons {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
@@ -88,25 +88,25 @@
padding: 0; padding: 0;
appearance: none; appearance: none;
} }
&:has(span:only-child) {
justify-content: center;
}
} }
.button__text { .button-text {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
.next .button__icon { .next .button-icon {
margin-left: calc(var(--size-theme-font) * 0.5); margin-left: calc(var(--size-theme-font) * 0.5);
} }
.prev .button__icon { .prev .button-icon {
margin-right: calc(var(--size-theme-font) * 0.5); margin-right: calc(var(--size-theme-font) * 0.5);
} }
.pagination__buttons:has(span:only-child) {
justify-content: center;
}
} }
@media print { @media print {
+6 -7
View File
@@ -6,24 +6,23 @@
flex-wrap: wrap; flex-wrap: wrap;
padding: calc(var(--size-theme-font) * 0.75) 0; padding: calc(var(--size-theme-font) * 0.75) 0;
font-size: inherit; font-size: inherit;
}
.sns-container .sns-icon { .sns-icon {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: var(--color-theme-foreground); color: var(--color-theme-foreground);
text-decoration: none; text-decoration: none;
}
svg {
.sns-container .sns-icon svg {
width: calc(var(--size-theme-font) * 1.2); width: calc(var(--size-theme-font) * 1.2);
height: calc(var(--size-theme-font) * 1.2); height: calc(var(--size-theme-font) * 1.2);
} }
}
.sns-container .divider { .divider {
color: var(--color-theme-foreground); color: var(--color-theme-foreground);
font-weight: 300; font-weight: 300;
user-select: none; user-select: none;
}
} }
-3
View File
@@ -127,9 +127,6 @@
max-height: calc(60vh - var(--size-theme-font) * 4); max-height: calc(60vh - var(--size-theme-font) * 4);
} }
.toc-list {
}
.toc-list-item { .toc-list-item {
margin: calc(var(--size-theme-font) * 0.125) 0; margin: calc(var(--size-theme-font) * 0.125) 0;
} }
+3 -3
View File
@@ -34,15 +34,15 @@
</div> </div>
</article> </article>
<nav class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}"> <nav class="pagination" th:if="${archives.hasPrevious() || archives.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${archives.hasPrevious()}"> <span th:if="${archives.hasPrevious()}">
<a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline"> <a data-pjax th:href="@{${archives.prevUrl}}" class="button prev inline">
<span class="button__text">&lt;&nbsp;Prev</span> <span class="button-text">&lt;&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${archives.hasNext()}"> <span th:if="${archives.hasNext()}">
<a data-pjax th:href="@{${archives.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${archives.nextUrl}}" class="button inline next">
<span class="button__text">Next&nbsp;&gt;</span> <span class="button-text">Next&nbsp;&gt;</span>
</a> </a>
</span> </span>
</div> </div>
+3 -3
View File
@@ -25,15 +25,15 @@
</div> </div>
</article> </article>
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}"> <nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${posts.hasPrevious()}"> <span th:if="${posts.hasPrevious()}">
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev"> <a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
<span class="button__text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span> <span class="button-text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${posts.hasNext()}"> <span th:if="${posts.hasNext()}">
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
<span class="button__text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span> <span class="button-text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span>
</a> </a>
</span> </span>
</div> </div>
+3 -3
View File
@@ -36,15 +36,15 @@
</article> </article>
<nav class="pagination" th:if="${friends.hasPrevious() || friends.hasNext()}"> <nav class="pagination" th:if="${friends.hasPrevious() || friends.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${friends.hasPrevious()}"> <span th:if="${friends.hasPrevious()}">
<a data-pjax th:href="@{${friends.prevUrl}}" class="button prev inline"> <a data-pjax th:href="@{${friends.prevUrl}}" class="button prev inline">
<span class="button__text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span> <span class="button-text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${friends.hasNext()}"> <span th:if="${friends.hasNext()}">
<a data-pjax th:href="@{${friends.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${friends.nextUrl}}" class="button inline next">
<span class="button__text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span> <span class="button-text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span>
</a> </a>
</span> </span>
</div> </div>
+3 -3
View File
@@ -44,15 +44,15 @@
</article> </article>
</section> </section>
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}"> <nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${posts.hasPrevious()}"> <span th:if="${posts.hasPrevious()}">
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev"> <a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
<span class="button__text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span> <span class="button-text" th:text="'< ' + #{page.pagination.prev}">&lt;&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${posts.hasNext()}"> <span th:if="${posts.hasNext()}">
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
<span class="button__text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span> <span class="button-text" th:text="#{page.pagination.next} + ' >'">Next&nbsp;&gt;</span>
</a> </a>
</span> </span>
</div> </div>
+5 -6
View File
@@ -1,6 +1,6 @@
<th:block th:fragment="header" th:with="menu = ${menuFinder.getPrimary()}"> <th:block th:fragment="header" th:with="menu = ${menuFinder.getPrimary()}">
<div class="header__inner"> <div class="header-inner">
<div class="header__logo"> <div class="header-logo">
<a data-pjax href="/"> <a data-pjax href="/">
<div class="logo" <div class="logo"
th:text="${#strings.isEmpty(theme.config.basic.logo) ? site.title : theme.config.basic.logo}"> th:text="${#strings.isEmpty(theme.config.basic.logo) ? site.title : theme.config.basic.logo}">
@@ -51,7 +51,7 @@
</div> </div>
<nav class="navigation-menu"> <nav class="navigation-menu">
<ul th:if="${menu != null} and ${not #lists.isEmpty(menu.menuItems)}" <ul th:if="${menu != null} and ${not #lists.isEmpty(menu.menuItems)}"
class="navigation-menu__inner menu--desktop"> class="navigation-menu-inner menu--desktop">
<li th:each="menuItem : ${menu.menuItems}"> <li th:each="menuItem : ${menu.menuItems}">
<div th:if="${#lists.isEmpty(menuItem.children)}"> <div th:if="${#lists.isEmpty(menuItem.children)}">
<a data-pjax th:href="@{${menuItem.status.href}}" <a data-pjax th:href="@{${menuItem.status.href}}"
@@ -63,8 +63,8 @@
<span th:text="${menuItem.status.displayName}"></span> <span th:text="${menuItem.status.displayName}"></span>
</a> </a>
<div class="sub-menu"> <div class="sub-menu">
<div class="menu__trigger">▾</div> <div class="menu-trigger">▾</div>
<ul class="menu__dropdown"> <ul class="menu-dropdown">
<li th:each="childMenuItem : ${menuItem.children}"> <li th:each="childMenuItem : ${menuItem.children}">
<a data-pjax <a data-pjax
th:href="@{${childMenuItem.status.href}}"> th:href="@{${childMenuItem.status.href}}">
@@ -78,4 +78,3 @@
</ul> </ul>
</nav> </nav>
</th:block> </th:block>
+3 -3
View File
@@ -101,15 +101,15 @@
</div> </div>
</article> </article>
<nav class="pagination" th:if="${moments.hasPrevious() || moments.hasNext()}"> <nav class="pagination" th:if="${moments.hasPrevious() || moments.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${moments.hasPrevious()}"> <span th:if="${moments.hasPrevious()}">
<a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev"> <a data-pjax th:href="@{${moments.prevUrl}}" class="button inline prev">
<span class="button__text"><&nbsp;Prev</span> <span class="button-text"><&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${moments.hasNext()}"> <span th:if="${moments.hasNext()}">
<a data-pjax th:href="@{${moments.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${moments.nextUrl}}" class="button inline next">
<span class="button__text">Next&nbsp;</span> <span class="button-text">Next&nbsp;</span>
</a> </a>
</span> </span>
</div> </div>
+5 -5
View File
@@ -24,19 +24,19 @@
<div id="toc-content" class="toc-content"></div> <div id="toc-content" class="toc-content"></div>
</nav> </nav>
<nav class="pagination"> <nav class="pagination">
<div class="pagination__title"> <div class="pagination-title">
<span class="pagination__title-h" th:text="#{page.post.pagination}">READ OTHER POSTS</span> <span class="pagination-title-h" th:text="#{page.post.pagination}">READ OTHER POSTS</span>
<hr/> <hr/>
</div> </div>
<div class="pagination__buttons" th:with="postCursor=${postFinder.cursor(post.metadata?.name)}"> <div class="pagination-buttons" th:with="postCursor=${postFinder.cursor(post.metadata?.name)}">
<span th:if="${postCursor.hasPrevious()}"> <span th:if="${postCursor.hasPrevious()}">
<a data-pjax th:href="@{${postCursor.previous?.status?.permalink}}" class="button prev inline"> <a data-pjax th:href="@{${postCursor.previous?.status?.permalink}}" class="button prev inline">
<span class="button__text" th:text="|< ${postCursor.previous?.spec?.title}|">prevPost</span> <span class="button-text" th:text="|< ${postCursor.previous?.spec?.title}|">prevPost</span>
</a> </a>
</span> </span>
<span th:if="${postCursor.hasNext()}"> <span th:if="${postCursor.hasNext()}">
<a data-pjax th:href="@{${postCursor.next?.status?.permalink}}" class="button next inline"> <a data-pjax th:href="@{${postCursor.next?.status?.permalink}}" class="button next inline">
<span class="button__text" th:text="|${postCursor.next?.spec?.title} >|">nextPost</span> <span class="button-text" th:text="|${postCursor.next?.spec?.title} >|">nextPost</span>
</a> </a>
</span> </span>
</div> </div>
+3 -3
View File
@@ -25,15 +25,15 @@
</div> </div>
</article> </article>
<nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}"> <nav class="pagination" th:if="${posts.hasPrevious() || posts.hasNext()}">
<div class="pagination__buttons"> <div class="pagination-buttons">
<span th:if="${posts.hasPrevious()}"> <span th:if="${posts.hasPrevious()}">
<a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev"> <a data-pjax th:href="@{${posts.prevUrl}}" class="button inline prev">
<span class="button__text"><&nbsp;Prev</span> <span class="button-text"><&nbsp;Prev</span>
</a> </a>
</span> </span>
<span th:if="${posts.hasNext()}"> <span th:if="${posts.hasNext()}">
<a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next"> <a data-pjax th:href="@{${posts.nextUrl}}" class="button inline next">
<span class="button__text">Next&nbsp;></span> <span class="button-text">Next&nbsp;></span>
</a> </a>
</span> </span>
</div> </div>