Skip to content

Commit 91527f5

Browse files
Make footer more mobile friendly
1 parent 66e2820 commit 91527f5

File tree

2 files changed

+56
-38
lines changed

2 files changed

+56
-38
lines changed

src/site/_includes/blog_post.liquid

Lines changed: 52 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,53 +27,71 @@ layout: layout.njk
2727
</div>
2828
{% unless no_footer %}
2929
<div class="border-t-4 border-branding w-content mb-2 mt-2 pt-2 text-gray-700 dark:text-neutral-500">
30-
<dl class="grid gap-x-4 gap-y-1 auto-cols-max">
30+
<table class="w-full">
3131
{% if page.date %}
32-
<dt class="col-start-1">{{ date_desc | default: 'Published at' }}</dt>
33-
<dd class="mb-1 font-light col-start-2">
34-
<time class="dt-published" page.datetime="{{page.date | date: "%Y-%m-%d" }}">
35-
<a href="{{page.url}}" class="u-url">{{ page.date | date: '%Y-%m-%d' }}</a>
36-
</time>
37-
</dd>
32+
<tr>
33+
<th class="align-baseline text-left font-normal pr-2 pb-2">{{ date_desc | default: 'Published at' }}</th>
34+
<td class="font-light align-baseline pb-2">
35+
<time class="dt-published" page.datetime="{{page.date | date: "%Y-%m-%d" }}">
36+
<a href="{{page.url}}" class="u-url">{{ page.date | date: '%Y-%m-%d' }}</a>
37+
</time>
38+
</td>
39+
</tr>
3840
{% endif %}
3941

4042
{% if tags.length > 0 %}
41-
<dt class="col-start-1">Tags</dt>
42-
<dd class="mb-1 font-light col-start-2">
43-
{% for tag in tags %}
44-
{% unless tag == 'blogPost' %}
45-
<a href="/tags/{{tag}}/" class="prefix-hash link p-category">{{ tag }}</a>
46-
{% endunless %}
47-
{% endfor %}
48-
</dd>
43+
<tr>
44+
<th class="align-baseline text-left font-normal whitespace-nowrap pr-2 pb-2">Tags</th>
45+
<td class="font-light align-baseline pb-2">
46+
{% for tag in tags %}
47+
{% unless tag == 'blogPost' %}
48+
<a href="/tags/{{tag}}/" class="prefix-hash link p-category">{{ tag }}</a>
49+
{% endunless %}
50+
{% endfor %}
51+
</td>
52+
</tr>
4953
{% endif %}
5054

5155
{% assign similar = collections.all | similarPosts: page.inputPath, tags %}
5256
{% if similar.length > 0 %}
53-
<dt class="col-start-1">Related posts</dt>
54-
<dd class="mb-1 font-light col-start-2 flex flex-col">
55-
{% for similarPost in similar limit: 3 -%}
56-
<a href="{{ similarPost.url }}" class="link">{{ similarPost.data.title }}</a>
57-
{% endfor %}
58-
</dd>
57+
<tr>
58+
<th class="align-baseline text-left font-normal whitespace-nowrap pr-2 pb-2">Related posts</th>
59+
<td class="font-light align-baseline pb-2">
60+
<ul class="list-disc list-inside">
61+
{% for similarPost in similar limit: 3 -%}
62+
<li class="mb-1">
63+
<a href="{{ similarPost.url }}" class="link">{{ similarPost.data.title }}</a>
64+
</li>
65+
{% endfor %}
66+
</ul>
67+
</td>
68+
</tr>
5969
{% endif %}
6070

6171
{% if syndications.length > 0 %}
62-
<dt class="hidden">This post elsewhere</dt>
63-
<dd class="hidden mb-1 font-light col-start-2">
64-
{% for url in syndications -%}
65-
<a href="{{ url }}" rel="syndication" class="u-syndication link">{{ url }}</a>
66-
{% endfor %}
67-
</dd>
72+
<tr>
73+
<th class="align-baseline text-left font-normal whitespace-nowrap pr-2 pb-2 hidden">This post elsewhere</th>
74+
<td class="hidden font-light align-baseline">
75+
{% for url in syndications -%}
76+
<a href="{{ url }}" rel="syndication" class="u-syndication link">{{ url }}</a>
77+
{% endfor %}
78+
</td>
79+
</tr>
6880
{% endif %}
69-
<dt class="col-start-1">Have some thoughts?</dt>
70-
<dd class="mb-1 font-light col-start-2">
71-
<a href="mailto:[email protected]?subject=Re: {{title}}" class="link">Reply by email</a>
72-
</dd>
7381

74-
<dt class="col-start-1 js-dt-webmentions">Reactions</dt>
75-
<dd id="webmentions" class="mb-1 font-light col-start-2 flex flex-col"></dd>
76-
</dl>
82+
<tr>
83+
<th class="align-baseline text-left font-normal pr-2 pb-2">Have some thoughts?</th>
84+
<td class="font-light align-baseline pb-2">
85+
<a href="mailto:[email protected]?subject=Re: {{title}}" class="link">Reply by email</a>
86+
</td>
87+
</tr>
88+
89+
<tr class="js-tr-webmentions">
90+
<th class="align-baseline text-left font-normal whitespace-nowrap pr-2 pb-2">Reactions</th>
91+
<td id="webmentions" class="font-light align-baseline pb-2 flex flex-col"></td>
92+
</tr>
93+
</table>
94+
7795
<a rel="author" class="hidden p-author h-card" href="https://jonas.brusman.se">Jonas Brusman</a>
7896
<script
7997
src="/js/webmention.min.js"

src/site/_includes/css/tailwind.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
@apply hidden;
7171
}
7272
#webmentions .reacts {
73-
@apply flex flex-row;
73+
@apply flex flex-row flex-wrap;
7474
}
7575

7676
#webmentions .reaction {
@@ -81,12 +81,12 @@
8181
@apply h-4 w-4 object-cover mr-0.5;
8282
}
8383

84-
.js-dt-webmentions {
84+
.js-tr-webmentions {
8585
@apply hidden;
8686
}
8787

88-
.js-dt-webmentions:has(+ #webmentions .reacts) {
89-
@apply block;
88+
.js-tr-webmentions:has(#webmentions .reacts) {
89+
@apply table-row;
9090
}
9191

9292
.markdown {

0 commit comments

Comments
 (0)