From 2d91f98aae123493bf3739f874cf42a73dbb643b Mon Sep 17 00:00:00 2001 From: la-ninpre Date: Wed, 9 Dec 2020 12:39:31 +0300 Subject: move duplicated code to include file because it was the same in tagsort and other pages. --- _includes/post-preview.html | 10 ++++++++++ _layouts/tagsort.html | 11 +---------- _sass/main.scss | 6 +++++- other.md | 11 +---------- 4 files changed, 17 insertions(+), 21 deletions(-) create mode 100644 _includes/post-preview.html diff --git a/_includes/post-preview.html b/_includes/post-preview.html new file mode 100644 index 0000000..d86c92c --- /dev/null +++ b/_includes/post-preview.html @@ -0,0 +1,10 @@ +
+

+ {{ post.title }} +

+ {{ post.excerpt }} +

+ read more... +

+

{{ post.date | date_to_string }}

+
diff --git a/_layouts/tagsort.html b/_layouts/tagsort.html index 4265df2..359484a 100644 --- a/_layouts/tagsort.html +++ b/_layouts/tagsort.html @@ -6,15 +6,6 @@ layout: default
{% for post in site.tags[page.tag] %} -
-

- {{ post.title }} -

- {{ post.excerpt }} -

- read more... -

-

{{ post.date | date_to_string }}

-
+ {% include post-preview.html %} {% endfor %}
diff --git a/_sass/main.scss b/_sass/main.scss index 4c9beb4..af609ae 100644 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -180,6 +180,9 @@ footer { @media only screen and (max-width: 760px) { body p { padding-top: 1em; + } + footer p { + padding: 0; } nav { margin-bottom: 5vh; @@ -212,11 +215,12 @@ footer { padding-top: 0; } ul { + padding-top: 1em; display: flex; flex-wrap: wrap; - justify-content: flex-start; li { margin: auto; + padding: 0 0.5em; } } } diff --git a/other.md b/other.md index 8d1b713..51ac50f 100644 --- a/other.md +++ b/other.md @@ -12,15 +12,6 @@ filter by tag: {% for tag in site.tags %}[{{ tag[0] }}](/tags/{{ tag[0] }})
{% for post in site.posts %} -
-

- {{ post.title }} -

- {{ post.excerpt }} -

- read more... -

-

{{ post.date | date_to_string }}

-
+ {% include post-preview.html %} {% endfor %}
-- cgit v1.2.3