Skip to content

Commit a421dcd

Browse files
committed
feat(typography): use consistent style for timestamps in tags, categories and archives pages
1 parent d78f4e5 commit a421dcd

File tree

5 files changed

+37
-43
lines changed

5 files changed

+37
-43
lines changed

static/css/elegant.css

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* Base */
22
:root {
33
--borderRadius: 4px;
4+
--mutedTextColor: dimgray;
45
}
56
html,
67
body {
@@ -145,10 +146,6 @@ table.highlighttable tbody > tr:nth-child(odd) > td {
145146
float: none;
146147
line-height: 28px;
147148
}
148-
.articles-in-tag li {
149-
font: 1.1em/1.6 "Trebuchet MS", Trebuchet, "Lucida Sans Unicode",
150-
"Lucida Grande", "Lucida Sans", Arial, Sans-Serif;
151-
}
152149
/* Article */
153150
.article-content,
154151
div.recent-posts p {
@@ -254,15 +251,10 @@ p#post-share-links {
254251
a.category-title-inside-accordion {
255252
text-decoration: none;
256253
}
257-
ul.list-articles-category {
254+
ul.list-articles-under-tag-category {
258255
list-style: none outside none;
259256
margin: 0 0 0 5px;
260257
}
261-
ul.list-articles-category li time {
262-
color: #8f8f8f;
263-
display: inline-block;
264-
width: 7em;
265-
}
266258
a.category-link {
267259
color: #333;
268260
}
@@ -296,10 +288,12 @@ div.blog-archives div,
296288
div.recent-posts-article {
297289
border-bottom: 1px dotted #aaa;
298290
}
291+
ul.list-articles-under-tag-category li {
292+
padding: 0.1rem 0.2rem;
293+
}
299294
div.blog-archives div,
300295
div.recent-posts-article {
301-
font-size: 1.1em;
302-
padding: 0.3em 0.2em;
296+
padding: 0.3rem 0.2rem;
303297
position: relative;
304298
overflow: auto;
305299
}
@@ -310,21 +304,16 @@ div.blog-archives div.last-entry-of-year {
310304
margin-bottom: 1em;
311305
}
312306
div.blog-archives time,
313-
div.recent-posts time {
307+
div.recent-posts time,
308+
ul.list-articles-under-tag-category li time {
314309
float: right;
315-
text-align: right;
310+
text-align: left;
316311
}
317312
div.blog-archives time,
318313
div.recent-posts time,
314+
ul.list-articles-under-tag-category li time,
319315
div.recent-posts-posted {
320-
color: #8f8f8f;
321-
font: 0.9em "PT Sans", "Helvetica Neue", Arial, Sans-Serif;
322-
}
323-
div.recent-posts time {
324-
font-size: inherit;
325-
}
326-
div.recent-posts-time {
327-
display: inline;
316+
color: var(--mutedTextColor);
328317
}
329318
@media (max-width: 767px) {
330319
div.blog-archives h2 {
@@ -334,15 +323,12 @@ div.recent-posts-time {
334323
margin-left: 0;
335324
padding-left: 0;
336325
}
337-
div.recent-posts time {
326+
div.blog-archives time,
327+
div.recent-posts time,
328+
ul.list-articles-under-tag-category li time {
338329
float: none;
339-
}
340-
div.recent-posts-time {
341330
display: block;
342331
}
343-
ul.list-articles-category li time {
344-
width: 100%;
345-
}
346332
}
347333
/* MailChimp */
348334
#mc-embed-signup {

static/css/typography.css

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ h6,
3535
.tag-title,
3636
.list-of-tags,
3737
a.category-title-inside-accordion,
38-
ul.list-articles-category li time {
38+
ul.list-articles-under-tag-category li time {
3939
font-family: var(--sansFontFamily);
4040
}
4141
h1 {
@@ -155,13 +155,23 @@ blockquote {
155155
a.category-title-inside-accordion {
156156
font-size: 1.1rem;
157157
}
158-
ul.list-articles-category li time {
159-
font-size: 0.7rem;
160-
}
161158
.author-name {
162159
font-weight: bold;
163160
font-variant: small-caps;
164161
}
165162
.author-blurb {
166163
font-style: italic;
167164
}
165+
div.blog-archives div,
166+
div.recent-posts-article,
167+
ul.list-articles-under-tag-category li {
168+
font-family: var(--sansFontFamily);
169+
font-size: 0.963rem;
170+
}
171+
div.blog-archives time,
172+
div.recent-posts time,
173+
ul.list-articles-under-tag-category li time,
174+
div.recent-posts-posted {
175+
font-family: var(--sansFontFamily);
176+
font-size: 0.8rem;
177+
}

templates/categories.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ <h1><a href="{{ SITEURL }}/{{ CATEGORIES_URL }}">All Categories</a></h1>
5151
</div>
5252
<div id="{{ category.slug }}-ref" class="accordion-body collapse">
5353
<div class="accordion-inner">
54-
<ul class="list-articles-category">
54+
<ul class="list-articles-under-tag-category">
5555
{% for article in articles %}
5656
<li itemscope>
57-
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
58-
{{ article.locale_date }}
59-
</time>
6057
<a href="{{ SITEURL }}/{{ article.url }}">
6158
{{ article.title }}
6259
{% if article.subtitle %}
@@ -65,6 +62,9 @@ <h1><a href="{{ SITEURL }}/{{ CATEGORIES_URL }}">All Categories</a></h1>
6562
</small>
6663
{% endif %}
6764
</a>
65+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
66+
{{ article.locale_date }}
67+
</time>
6868
</li>
6969
{% endfor %}
7070
</ul>

templates/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/{{ ARCHI
109109
<div class="recent-posts-posted">
110110
posted in
111111
<a href="{{ SITEURL }}/{{ CATEGORIES_URL }}#{{ article.category.slug }}-ref">{{ article.category }}</a>
112-
<div class="recent-posts-time">
113-
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
114-
</div>
112+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
115113
</div>
116114
{% if RECENT_ARTICLE_SUMMARY %}
117115
<p>{{ article.summary }}</p>

templates/tags.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,9 @@ <h1><a href="{{ SITEURL }}/{{ TAGS_URL }}">All Tags</a></h1>
5656
<div class="span8 offset2">
5757
{% for tag, articles in tags|sort %}
5858
<h2 id="{{ tag.slug }}-ref" class="tag-title">{{ tag }}</h2>
59-
<ul class="articles-in-tag list-articles-category">
59+
<ul class="list-articles-under-tag-category">
6060
{% for article in articles|sort(reverse = true, attribute = 'date') %}
6161
<li itemscope>
62-
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
63-
{{ article.locale_date }}
64-
</time>
6562
<a href="{{ SITEURL }}/{{ article.url }}">
6663
{{ article.title }}
6764
{% if article.subtitle %}
@@ -70,6 +67,9 @@ <h2 id="{{ tag.slug }}-ref" class="tag-title">{{ tag }}</h2>
7067
</small>
7168
{% endif %}
7269
</a>
70+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
71+
{{ article.locale_date }}
72+
</time>
7373
</li>
7474
{% endfor %}
7575
</ul>

0 commit comments

Comments
 (0)