all repos — aaoth.xyz @ 49021944e3b4881486ae27cd48acf9196a0b6ed7

aaoth.xyz website

refactor post layout

add go back link to the heading

instead of list use div.post-header-info (list was not right)
la-ninpre leobrekalini@gmail.com
Mon, 23 Aug 2021 20:08:29 +0300
commit

49021944e3b4881486ae27cd48acf9196a0b6ed7

parent

8057621bb2d80be038a08387fd3262e38f37440e

3 files changed, 16 insertions(+), 11 deletions(-)

jump to
M _includes/post-preview.html_includes/post-preview.html

@@ -7,7 +7,7 @@ <p>

<a href="{{ post.url }}">read more...</a> </p> <small> - <p>{{ post.date | date_to_string }} | + <p>{{ post.date | date_to_string }} / {% for tag in post.tags %}<a href="/tags/{{tag}}">{{tag}} </a> {% endfor %} </p>
A _includes/title-with-backlink.html

@@ -0,0 +1,4 @@

+<div class="title_with_backlink"> + <h1>{{ include.title }}</h1> + <a class="backlink" href="{{ include.backlink }}">go back</a> +</div>
M _layouts/post.html_layouts/post.html

@@ -4,18 +4,19 @@ ---

<div class="post-page"> <div class="post-header"> - <h1>{{ page.title }}</h1> - <ul> - <li>{{ page.date | date: "%F" }}</li> + {% include title-with-backlink.html title=page.title backlink="/blog/" %} + <div class="post-header-info"> + <p class="post-date">{{ page.date | date: "%F" }}</p> {% if page.tags.size > 0 %} - <li> | </li> - <li>tags:</li> - {% for tag in page.tags %} - <li><a href="/tags/{{ tag }}">{{ tag }}</a></li> - {% endfor %} + <p>tags:</p> + <ul> + {% for tag in page.tags %} + <li><a href="/tags/{{ tag }}">{{ tag }}</a></li> + {% endfor %} {% endif %} - </ul> + </ul> + </div> <hr> </div> -{{ content }} + {{ content }} </div>