Skip to content

Commit 1b3d1a6

Browse files
Fixed inconsistent width issue on tag/author templates
1 parent 4335416 commit 1b3d1a6

File tree

5 files changed

+67
-48
lines changed

5 files changed

+67
-48
lines changed

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/screen.css

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,12 +1534,6 @@ Search LOGO Login Subscribe
15341534
}
15351535
}
15361536

1537-
@media (max-width: 767px) {
1538-
.gh-container-inner {
1539-
display: block;
1540-
}
1541-
}
1542-
15431537
/* 12. Post list
15441538
/* ---------------------------------------------------------- */
15451539

@@ -2225,16 +2219,31 @@ figcaption a {
22252219

22262220
.gh-archive {
22272221
display: grid;
2228-
grid-template-columns: 1fr 1fr;
2222+
grid-template-columns: repeat(16, 1fr);
22292223
gap: var(--grid-gap);
22302224
margin-block: 80px 24px;
2225+
}
2226+
2227+
.gh-archive.has-image {
2228+
margin-top: 48px;
2229+
}
2230+
2231+
.gh-archive-inner {
2232+
display: grid;
2233+
grid-template-columns: 1fr 1fr;
2234+
gap: var(--grid-gap);
2235+
grid-column: 1 / -1;
22312236
padding-bottom: clamp(40px, 2.73vw + 29.09px, 64px);
22322237
border-bottom: 1px solid var(--color-border);
22332238
}
22342239

2235-
.gh-archive.has-image {
2240+
.gh-archive.has-image .gh-archive-inner {
22362241
align-items: center;
2237-
margin-top: 24px;
2242+
grid-column: 1 / -1;
2243+
}
2244+
2245+
.gh-archive:not(.has-sidebar):not(.has-image) .gh-archive-inner {
2246+
grid-column: 3 / span 12;
22382247
}
22392248

22402249
.gh-archive .gh-article-image {
@@ -2246,7 +2255,7 @@ figcaption a {
22462255
margin-top: 0;
22472256
}
22482257

2249-
.author-template .gh-archive {
2258+
.author-template .gh-archive-inner {
22502259
display: flex;
22512260
flex-direction: row-reverse;
22522261
justify-content: flex-end;
@@ -2289,14 +2298,20 @@ figcaption a {
22892298
height: 20px;
22902299
}
22912300

2292-
@media (max-width: 767px) {
2301+
@media (max-width: 1199px) {
22932302
.gh-archive {
2303+
display: block;
2304+
}
2305+
}
2306+
2307+
@media (max-width: 767px) {
2308+
.gh-archive-inner {
22942309
display: flex;
22952310
flex-direction: column-reverse;
22962311
align-items: flex-start;
22972312
}
22982313

2299-
.author-template .gh-archive {
2314+
.author-template .gh-archive-inner {
23002315
flex-direction: column-reverse;
23012316
}
23022317
}

author.hbs

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@
44
<main class="gh-main gh-outer">
55

66
{{#author}}
7-
<section class="gh-archive gh-inner">
8-
<div class="gh-archive-wrapper">
9-
<h1 class="gh-article-title is-title">
10-
{{#if website}}
11-
<a class="gh-author-social-link" href="{{website}}" target="_blank" rel="noopener">{{name}}</a>
12-
{{else}}
13-
{{name}}
14-
{{/if}}
15-
</h1>
16-
{{#if bio}}
17-
<p class="gh-article-excerpt">{{bio}}</p>
18-
{{/if}}
19-
<footer class="gh-author-meta">
20-
<div class="gh-author-social">
21-
{{#if facebook}}
22-
<a class="gh-author-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
23-
{{/if}}
24-
{{#if twitter}}
25-
<a class="gh-author-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
7+
<section class="gh-archive{{#if @custom.show_sidebar}} has-sidebar{{/if}} gh-inner">
8+
<div class="gh-archive-inner">
9+
<div class="gh-archive-wrapper">
10+
<h1 class="gh-article-title is-title">
11+
{{#if website}}
12+
<a class="gh-author-social-link" href="{{website}}" target="_blank" rel="noopener">{{name}}</a>
13+
{{else}}
14+
{{name}}
2615
{{/if}}
27-
</div>
28-
{{#if location}}
29-
<div class="gh-author-location">{{location}}</div>
16+
</h1>
17+
{{#if bio}}
18+
<p class="gh-article-excerpt">{{bio}}</p>
3019
{{/if}}
31-
</footer>
20+
<footer class="gh-author-meta">
21+
<div class="gh-author-social">
22+
{{#if facebook}}
23+
<a class="gh-author-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
24+
{{/if}}
25+
{{#if twitter}}
26+
<a class="gh-author-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
27+
{{/if}}
28+
</div>
29+
{{#if location}}
30+
<div class="gh-author-location">{{location}}</div>
31+
{{/if}}
32+
</footer>
33+
</div>
34+
{{#if profile_image}}
35+
<img class="gh-article-image" src="{{img_url profile_image size="s"}}" alt="{{name}}">
36+
{{/if}}
3237
</div>
33-
{{#if profile_image}}
34-
<img class="gh-article-image" src="{{img_url profile_image size="s"}}" alt="{{name}}">
35-
{{/if}}
3638
</section>
3739
{{/author}}
3840

tag.hbs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
<main class="gh-main gh-outer">
55

66
{{#tag}}
7-
<section class="gh-archive{{#if feature_image}} has-image{{/if}} gh-inner">
8-
<header class="gh-archive-wrapper">
9-
<h1 class="gh-article-title is-title">{{name}}</h1>
10-
{{#if description}}
11-
<p class="gh-article-excerpt">{{description}}</p>
12-
{{/if}}
13-
</header>
14-
{{> "feature-image"}}
7+
<section class="gh-archive{{#if feature_image}} has-image{{/if}}{{#if @custom.show_sidebar}} has-sidebar{{/if}} gh-inner">
8+
<div class="gh-archive-inner">
9+
<header class="gh-archive-wrapper">
10+
<h1 class="gh-article-title is-title">{{name}}</h1>
11+
{{#if description}}
12+
<p class="gh-article-excerpt">{{description}}</p>
13+
{{/if}}
14+
</header>
15+
{{> "feature-image"}}
16+
</div>
1517
</section>
1618
{{/tag}}
1719

0 commit comments

Comments
 (0)