Fixed inconsistent width issue on tag/author templates

This commit is contained in:
Sodbileg Gansukh
2023-08-22 19:04:16 +08:00
parent 4335416f75
commit 1b3d1a6a8f
5 changed files with 67 additions and 48 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+27 -12
View File
@@ -1534,12 +1534,6 @@ Search LOGO Login Subscribe
} }
} }
@media (max-width: 767px) {
.gh-container-inner {
display: block;
}
}
/* 12. Post list /* 12. Post list
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
@@ -2225,16 +2219,31 @@ figcaption a {
.gh-archive { .gh-archive {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: repeat(16, 1fr);
gap: var(--grid-gap); gap: var(--grid-gap);
margin-block: 80px 24px; margin-block: 80px 24px;
}
.gh-archive.has-image {
margin-top: 48px;
}
.gh-archive-inner {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--grid-gap);
grid-column: 1 / -1;
padding-bottom: clamp(40px, 2.73vw + 29.09px, 64px); padding-bottom: clamp(40px, 2.73vw + 29.09px, 64px);
border-bottom: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
} }
.gh-archive.has-image { .gh-archive.has-image .gh-archive-inner {
align-items: center; align-items: center;
margin-top: 24px; grid-column: 1 / -1;
}
.gh-archive:not(.has-sidebar):not(.has-image) .gh-archive-inner {
grid-column: 3 / span 12;
} }
.gh-archive .gh-article-image { .gh-archive .gh-article-image {
@@ -2246,7 +2255,7 @@ figcaption a {
margin-top: 0; margin-top: 0;
} }
.author-template .gh-archive { .author-template .gh-archive-inner {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: flex-end; justify-content: flex-end;
@@ -2289,14 +2298,20 @@ figcaption a {
height: 20px; height: 20px;
} }
@media (max-width: 767px) { @media (max-width: 1199px) {
.gh-archive { .gh-archive {
display: block;
}
}
@media (max-width: 767px) {
.gh-archive-inner {
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
align-items: flex-start; align-items: flex-start;
} }
.author-template .gh-archive { .author-template .gh-archive-inner {
flex-direction: column-reverse; flex-direction: column-reverse;
} }
} }
+3 -1
View File
@@ -4,7 +4,8 @@
<main class="gh-main gh-outer"> <main class="gh-main gh-outer">
{{#author}} {{#author}}
<section class="gh-archive gh-inner"> <section class="gh-archive{{#if @custom.show_sidebar}} has-sidebar{{/if}} gh-inner">
<div class="gh-archive-inner">
<div class="gh-archive-wrapper"> <div class="gh-archive-wrapper">
<h1 class="gh-article-title is-title"> <h1 class="gh-article-title is-title">
{{#if website}} {{#if website}}
@@ -33,6 +34,7 @@
{{#if profile_image}} {{#if profile_image}}
<img class="gh-article-image" src="{{img_url profile_image size="s"}}" alt="{{name}}"> <img class="gh-article-image" src="{{img_url profile_image size="s"}}" alt="{{name}}">
{{/if}} {{/if}}
</div>
</section> </section>
{{/author}} {{/author}}
+3 -1
View File
@@ -4,7 +4,8 @@
<main class="gh-main gh-outer"> <main class="gh-main gh-outer">
{{#tag}} {{#tag}}
<section class="gh-archive{{#if feature_image}} has-image{{/if}} gh-inner"> <section class="gh-archive{{#if feature_image}} has-image{{/if}}{{#if @custom.show_sidebar}} has-sidebar{{/if}} gh-inner">
<div class="gh-archive-inner">
<header class="gh-archive-wrapper"> <header class="gh-archive-wrapper">
<h1 class="gh-article-title is-title">{{name}}</h1> <h1 class="gh-article-title is-title">{{name}}</h1>
{{#if description}} {{#if description}}
@@ -12,6 +13,7 @@
{{/if}} {{/if}}
</header> </header>
{{> "feature-image"}} {{> "feature-image"}}
</div>
</section> </section>
{{/tag}} {{/tag}}