@@ -7,17 +7,23 @@ layout: layouts/base.njk
77{% css %}
88article {
99 padding-top: 2rem;
10+ text-align: justify;
1011}
1112
1213.links-nextprev {
13- display: flex;
14- gap: 1rem;
14+ display: grid;
15+ grid-gap: 1rem;
16+ grid-template-columns: 1fr 1fr;
1517 padding: 0;
1618 margin: 0;
1719 list-style: none;
1820}
21+ @media(max-width: 480px) {
22+ .links-nextprev {
23+ grid-template-columns: 1fr;
24+ }
25+ }
1926.links-nextprev li {
20- width: 50%;
2127 padding: 0.5rem;
2228}
2329.links-nextprev li.links-nextprev-prev,
@@ -37,16 +43,11 @@ h1.post-title {
3743 margin-top: 1rem;
3844 margin-bottom: 1rem;
3945}
40-
41- #giscus-comments {
42- margin-top: 1rem;
43- }
44-
4546{% endcss %}
4647
4748<article >
4849 {% if imageUrl %}
49- <img eleventy:ignore src =" {{ imageUrl }}" alt =" " class =" post-header " />
50+ <img eleventy:ignore src =" {{ imageUrl }}" alt =" " class =" banner " />
5051 {% endif %}
5152
5253 <h1 class =" post-title" >{{ title }} </h1 >
@@ -60,66 +61,41 @@ h1.post-title {
6061
6162{% include " partials/socials.njk" %}
6263
63- < hr />
64+ {% ContentBlock " bottom-content " %}
6465
65- {% if collections .posts %}
66- {% set previousPost = collections .posts | getPreviousCollectionItem %}
67- {% set nextPost = collections .posts | getNextCollectionItem %}
68- {% if nextPost or previousPost %}
69- <ul class =" links-nextprev" >
70- {% if previousPost %}
71- <li class =" links-nextprev-prev" >
72- <a href =" {{ previousPost.url }}" >
73- <img eleventy:ignore src =" {{ previousPost.data.imageUrl }}" alt =" " /><br >
74- {{ previousPost .data .title }}
75- </a >
76- <span >← Previous</span >
77- {% else %}
78- <li >
79- {% endif %}
80- </li >
81- {% if nextPost %}
82- <li class =" links-nextprev-next" >
83- <a href =" {{ nextPost.url }}" >
84- <img eleventy:ignore src =" {{ nextPost.data.imageUrl }}" alt =" " /><br >
85- {{ nextPost .data .title }}
86- </a >
87- <span >Next →</span >
88- {% else %}
89- <li >
90- {% endif %}
91- </li >
92- </ul >
66+ {% if collections .posts %}
67+ {% set previousPost = collections .posts | getPreviousCollectionItem %}
68+ {% set nextPost = collections .posts | getNextCollectionItem %}
69+ {% if nextPost or previousPost %}
70+ <ul class =" links-nextprev" >
71+ {% if previousPost %}
72+ <li class =" links-nextprev-prev" >
73+ <a href =" {{ previousPost.url }}" >
74+ <img eleventy:ignore src =" {{ previousPost.data.imageUrl }}" alt =" " class =" banner" /><br >
75+ {{ previousPost .data .title }}
76+ </a >
77+ <span >← Previous</span >
78+ {% else %}
79+ <li >
80+ {% endif %}
81+ </li >
82+ {% if nextPost %}
83+ <li class =" links-nextprev-next" >
84+ <a href =" {{ nextPost.url }}" >
85+ <img eleventy:ignore src =" {{ nextPost.data.imageUrl }}" alt =" " class =" banner" /><br >
86+ {{ nextPost .data .title }}
87+ </a >
88+ <span >Next →</span >
89+ {% else %}
90+ <li >
91+ {% endif %}
92+ </li >
93+ </ul >
94+ {% endif %}
9395 {% endif %}
94- {% endif %}
95-
96- {% include " ./../partials/series.njk" %}
9796
98- {% if metadata .githubComments .repo %}
99- <div id =" giscus-comments" ></div >
100- <script >
101- // Wait for the DOM to load or ensure themeManager is available
102- document .addEventListener (" DOMContentLoaded" , () => {
103- const giscusContainer = document .getElementById (" giscus-comments" );
97+ {% include " ./../partials/series.njk" %}
10498
105- const script = document .createElement (" script" );
106- script .src = " https://giscus.app/client.js" ;
107- script .setAttribute (" data-repo" , " {{ metadata.githubComments.repo }}" );
108- script .setAttribute (" data-repo-id" , " {{ metadata.githubComments.repoId }}" );
109- script .setAttribute (" data-category" , " {{ metadata.githubComments.category }}" );
110- script .setAttribute (" data-category-id" , " {{ metadata.githubComments.categoryId }}" );
111- script .setAttribute (" data-mapping" , " pathname" );
112- script .setAttribute (" data-strict" , " 0" );
113- script .setAttribute (" data-reactions-enabled" , " 1" );
114- script .setAttribute (" data-emit-metadata" , " 0" );
115- script .setAttribute (" data-input-position" , " top" );
116- script .setAttribute (" data-theme" , themeManager .get ());
117- script .setAttribute (" data-lang" , " en" );
118- script .setAttribute (" data-loading" , " lazy" );
119- script .setAttribute (" crossorigin" , " anonymous" );
120- script .async = true ;
99+ {% include " ./../partials/giscus.njk" %}
121100
122- giscusContainer .appendChild (script);
123- });
124- </script >
125- {% endif %}
101+ {% endContentBlock %}
0 commit comments