Skip to content

Commit

Permalink
Uniform appearance of post list in Browse and styled Atom feed
Browse files Browse the repository at this point in the history
- Enclose date in parentheses
- Use flex layout with   in between link and date
  • Loading branch information
maxkapur committed May 18, 2024
1 parent 5511216 commit d8fb0b0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
21 changes: 14 additions & 7 deletions _sass/minima/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,20 @@ p.excerpt-warning {

/**
* Atom feed preview
* Same styling is used on the "Browse" page
*/
/* Sample rule that aligns the dates to the right: */
/*
.feed {
ul.atom-post-list li .atom-post-list-entry {
display: flex;
justify-content: space-between;
ul.atom-post-list {
li .atom-post-list-entry {
display: flex;
flex-direction: row;
// Align dates to the right:
// justify-content: space-between;
flex-wrap: wrap;
align-items: baseline;

a,
span {
display: block;
}
}
}
*/
5 changes: 3 additions & 2 deletions browse.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ All posts by date:
{%- endif -%}
<li>
<div class="atom-post-list-entry">
<a href="{{ post.url | relative_url }}">
<a target="_blank" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
&nbsp;
<span class="post-meta">
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
{{ post.date | date: date_format }}
({{ post.date | date: date_format }})
</span>
</div>
</li>
Expand Down
2 changes: 2 additions & 0 deletions feed.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
</xsl:attribute>
<xsl:value-of select="atom:title" />
</a>
<!-- &nbsp; -->
&#160;
<span class="post-meta"> (<xsl:value-of select="atom:updated-readable" />)</span>
<!--
Uncomment below to incorporate post excerpts into the styled preview.
Expand Down

0 comments on commit d8fb0b0

Please sign in to comment.