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
4 files changed,
17 insertions(+),
21 deletions(-)
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
_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.md
→
other.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>