all repos — aaoth.xyz @ 2d91f98aae123493bf3739f874cf42a73dbb643b

aaoth.xyz website

move duplicated code to include file

because it was the same in tagsort and other pages.
la-ninpre leobrekalini@gmail.com
Wed, 09 Dec 2020 12:39:31 +0300
commit

2d91f98aae123493bf3739f874cf42a73dbb643b

parent

94aa9aef93789893416dcbc21851a16915e852b0

4 files changed, 17 insertions(+), 21 deletions(-)

jump to
A _includes/post-preview.html

@@ -0,0 +1,10 @@

+<div class="post"> + <h2 id="{{ post.title | slugify }}"> + <a href="{{ post.url }}">{{ post.title }}</a> + </h2> + {{ post.excerpt }} + <p> + <a href="{{ post.url }}">read more...</a> + </p> + <small><p>{{ post.date | date_to_string }}</p></small> +</div>
M _layouts/tagsort.html_layouts/tagsort.html

@@ -6,15 +6,6 @@ <h1>{{ page.tag }}</h1>

<div class="posts"> {% for post in site.tags[page.tag] %} - <div class="post"> - <h2 id="{{ post.title | slugify }}"> - <a href="{{ post.url }}">{{ post.title }}</a> - </h2> - {{ post.excerpt }} - <p> - <a href="{{ post.url }}">read more...</a> - </p> - <small><p>{{ post.date | date_to_string }}</p></small> - </div> + {% include post-preview.html %} {% endfor %} </div>
M _sass/main.scss_sass/main.scss

@@ -181,6 +181,9 @@ @media only screen and (max-width: 760px) {

body p { padding-top: 1em; } + footer p { + padding: 0; + } nav { margin-bottom: 5vh; ul {

@@ -212,11 +215,12 @@ margin: 0;

padding-top: 0; } ul { + padding-top: 1em; display: flex; flex-wrap: wrap; - justify-content: flex-start; li { margin: auto; + padding: 0 0.5em; } } }
M other.mdother.md

@@ -12,15 +12,6 @@ {% endfor %}

<div class="posts"> {% for post in site.posts %} - <div class="post"> - <h2 id="{{ post.title | slugify }}"> - <a href="{{ post.url }}">{{ post.title }}</a> - </h2> - {{ post.excerpt }} - <p> - <a href="{{ post.url }}">read more...</a> - </p> - <small><p>{{ post.date | date_to_string }}</p></small> - </div> + {% include post-preview.html %} {% endfor %} </div>