refactor: reduce layout style overrides
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
&-logo {
|
&-logo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100% !important;
|
max-width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
width: 140px;
|
width: 140px;
|
||||||
max-width: none !important;
|
max-width: none;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
+15
-40
@@ -40,7 +40,7 @@ html[system_font_enable='true']:not([pixel_style='true']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
scrollbar-width: var(--width-theme-scrollbar) !important;
|
scrollbar-width: var(--width-theme-scrollbar);
|
||||||
scrollbar-color: var(--color-theme-scrollbar);
|
scrollbar-color: var(--color-theme-scrollbar);
|
||||||
font-variant-ligatures: var(--lig-theme-font);
|
font-variant-ligatures: var(--lig-theme-font);
|
||||||
}
|
}
|
||||||
@@ -70,45 +70,29 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper {
|
.site-shell {
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-left,
|
|
||||||
.sidebar-right {
|
|
||||||
width: 20%;
|
|
||||||
padding: calc(var(--size-theme-font) * 1.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: var(--spacing-theme-container-padding);
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-frame {
|
||||||
|
flex: 1 0 auto;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
|
padding: var(--spacing-theme-container-padding);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body[layout_mode='fullscreen'] {
|
body[data-layout-mode='fullscreen'] {
|
||||||
.wrapper {
|
.site-frame {
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-left,
|
|
||||||
.sidebar-right {
|
|
||||||
display: none;
|
|
||||||
width: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: none !important;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content img,
|
.content img,
|
||||||
@@ -120,34 +104,25 @@ body[layout_mode='fullscreen'] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body[table_full_width='true'] {
|
body[data-table-full-width='true'] {
|
||||||
.content table {
|
.content table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.sidebar-left,
|
.site-frame {
|
||||||
.sidebar-right {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.container {
|
.site-frame {
|
||||||
padding: var(--spacing-theme-container-padding-mobile);
|
padding: var(--spacing-theme-container-padding-mobile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
.container {
|
|
||||||
display: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: initial;
|
display: initial;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.spacer {
|
|
||||||
flex-grow: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -93,8 +89,8 @@
|
|||||||
.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);
|
||||||
margin-right: 0 !important;
|
margin-right: 0;
|
||||||
padding-left: calc(var(--size-theme-font) * 0.3125);
|
padding-left: calc(var(--size-theme-font) * 0.3125);
|
||||||
padding-right: calc(var(--size-theme-font) * 0.3125);
|
padding-right: calc(var(--size-theme-font) * 0.3125);
|
||||||
color: var(--color-theme-menu);
|
color: var(--color-theme-menu);
|
||||||
@@ -105,7 +101,7 @@
|
|||||||
@media (max-width: $phone-max-width) {
|
@media (max-width: $phone-max-width) {
|
||||||
padding-left: calc(var(--size-theme-font) * 0.625);
|
padding-left: calc(var(--size-theme-font) * 0.625);
|
||||||
padding-right: calc(var(--size-theme-font) * 0.625);
|
padding-right: calc(var(--size-theme-font) * 0.625);
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
@@ -146,7 +142,7 @@
|
|||||||
|
|
||||||
.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;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
.portfolio-item .post-title {
|
.portfolio-item .post-title {
|
||||||
font-size: calc(var(--size-theme-font) * 1.05);
|
font-size: calc(var(--size-theme-font) * 1.05);
|
||||||
margin-bottom: calc(var(--size-theme-font) * 0.5) !important;
|
margin-bottom: calc(var(--size-theme-font) * 0.5);
|
||||||
padding-bottom: calc(var(--size-theme-font) * 0.5) !important;
|
padding-bottom: calc(var(--size-theme-font) * 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.portfolio-item .post-meta {
|
.portfolio-item .post-meta {
|
||||||
|
|||||||
@@ -43,10 +43,10 @@
|
|||||||
.post-title {
|
.post-title {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: var(--color-theme-title);
|
color: var(--color-theme-title);
|
||||||
margin-top: 0 !important;
|
margin-top: 0;
|
||||||
margin-bottom: calc(var(--size-theme-font) * 0.9375) !important;
|
margin-bottom: calc(var(--size-theme-font) * 0.9375);
|
||||||
padding-bottom: calc(var(--size-theme-font) * 0.9375) !important;
|
padding-bottom: calc(var(--size-theme-font) * 0.9375);
|
||||||
text-decoration: none !important;
|
text-decoration: none;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,10 +84,6 @@
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-author {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-tags {
|
.post-tags {
|
||||||
margin-bottom: calc(var(--size-theme-font) * 0.3125);
|
margin-bottom: calc(var(--size-theme-font) * 0.3125);
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
|
|||||||
+1
-1
@@ -113,7 +113,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body[layout_mode='fullscreen'] {
|
body[data-layout-mode='fullscreen'] {
|
||||||
.toc.toc-visible {
|
.toc.toc-visible {
|
||||||
border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground);
|
border: calc(var(--size-theme-font) * 0.0625) solid var(--color-theme-foreground);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,30 +114,20 @@
|
|||||||
</th:block>
|
</th:block>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body th:attr="layout_mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
<body th:attr="data-layout-mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
||||||
table_full_width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
data-table-full-width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
||||||
<div class="page">
|
<div class="site-shell">
|
||||||
<header role="banner">
|
<div class="site-frame"
|
||||||
<div id="header-slot" aria-hidden="true"></div>
|
th:attr="style=${theme.config.style.fullscreen_layout or #strings.isEmpty(theme.config.style.max_width) ? '' : 'max-width:' + theme.config.style.max_width}">
|
||||||
</header>
|
<header class="header">
|
||||||
<div class="wrapper">
|
<th:block th:replace="~{modules/header :: header}"/>
|
||||||
<aside class="sidebar-left">
|
</header>
|
||||||
</aside>
|
<main class="content">
|
||||||
<main class="container" role="main" th:attr="style=${#strings.isEmpty(theme.config.style.max_width) ? '' : 'max-width:' + theme.config.style.max_width}">
|
<th:block th:replace="${content}"/>
|
||||||
<header class="header">
|
|
||||||
<th:block th:replace="~{modules/header :: header(isHome = true)}"/>
|
|
||||||
</header>
|
|
||||||
<div class="content">
|
|
||||||
<th:block th:replace="${content}"/>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
<aside class="sidebar-right">
|
|
||||||
</aside>
|
|
||||||
</div>
|
</div>
|
||||||
<footer class="footer" role="contentinfo">
|
<footer class="footer">
|
||||||
<div id="footer-slot-head" aria-hidden="true"></div>
|
<th:block th:replace="~{modules/footer :: footer}"/>
|
||||||
<th:block th:replace="~{modules/footer}"/>
|
|
||||||
<div id="footer-slot-tail" aria-hidden="true"></div>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user