Skip to content

Commit

Permalink
Display posts as more structured list
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparrow0hawk committed Oct 20, 2024
1 parent 84cbccf commit 5c8dbeb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
16 changes: 16 additions & 0 deletions custom/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ footer li {
display: inline-block;
}

.post-list {
list-style: none;
padding: 0;
}

.post-list > li {
display: grid;
grid-template-columns: 35% 65%;
padding-bottom: .5em;
}

.post-list time {
text-align: right;
padding-right: .8em;
}

pre {
padding: 1rem;
border: 1px solid black;
Expand Down
8 changes: 5 additions & 3 deletions custom/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
{% block title %}{{ SITENAME }}{% endblock %}
{% block content %}
{% block content_title %}{% endblock %}
<ul>
<ul class="post-list">
{% for article in articles_page.object_list %}
<li><a href="/{{ article.url }}">{{ article.date | strftime('%-d %b %Y')}} {{ article.title }}</a> </li>
<li>
<time datetime="{{ article.date }}">{{ article.date | strftime('%-d %b %Y')}}</time> <a href="/{{ article.url }}">{{ article.title }}</a>
</li>
{% endfor %}
</ul>
{% endblock %}
{% endblock %}

0 comments on commit 5c8dbeb

Please sign in to comment.