diff --git a/_config.yml b/_config.yml index 96be729..b1869b8 100644 --- a/_config.yml +++ b/_config.yml @@ -35,4 +35,6 @@ markdown: kramdown # - vendor/bundle/ # - vendor/cache/ # - vendor/gems/ -# - vendor/ruby/ \ No newline at end of file +# - vendor/ruby/ + +show_excerpts: true \ No newline at end of file diff --git a/_includes/post-excerpt.html b/_includes/post-excerpt.html new file mode 100644 index 0000000..ded85f3 --- /dev/null +++ b/_includes/post-excerpt.html @@ -0,0 +1,13 @@ +{% capture excerpt %} + {{ post.excerpt | replace: "

", "" | replace: "

", "" }} +{% endcapture %} + +{% assign excerpt_length = excerpt | size %} + + + {% if excerpt_length > 140 %} + {{ excerpt | truncatewords: 20, '…' }} + {% else %} + {{ excerpt }} + {% endif %} + \ No newline at end of file diff --git a/_includes/post-list-item.html b/_includes/post-list-item.html index e10f90e..eca2596 100644 --- a/_includes/post-list-item.html +++ b/_includes/post-list-item.html @@ -1,24 +1,17 @@ -{% capture excerpt %} - {{ post.excerpt | replace: "

", "" | replace: "

", "" }} -{% endcapture %} - -{% assign excerpt_length = excerpt | size %} -
  • - {% unless post.title == "" %} - - {{ post.title }} - - {% else %} - - {% if excerpt_length > 140 %} - {{ excerpt | truncatewords: 12, '…' }} - {% else %} - {{ excerpt }} - {% endif %} - - {% endunless %} +
    + {% unless post.title == "" %} +

    + {{ post.title }} +

    + {% else %} + {% include post-excerpt.html %} + {% endunless %} + {% if post.title != "" and site.show_excerpts == true %} + {% include post-excerpt.html %} + {% endif %} +
    diff --git a/_sass/_base.scss b/_sass/_base.scss index 0aa5a1a..7cf7a45 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -38,6 +38,14 @@ h6 { text-align: center; } +em { + font-style: italic; +} + +strong { + font-weight: bold; +} + a { color: $text-color; } diff --git a/_sass/_post-list.scss b/_sass/_post-list.scss index 1f3c493..36190b0 100644 --- a/_sass/_post-list.scss +++ b/_sass/_post-list.scss @@ -9,27 +9,26 @@ flex-direction: column-reverse; text-decoration: none; padding: .25em 0; - .post-title { - display: block; - padding: .25em 0; - } - &:hover .post-title, - &:focus .post-title { - text-decoration: underline; - } @media (min-width: $on-tablet) { display: flex; flex-direction: row; justify-content: space-between; - .post-title { - margin-right: 4em; - } .post-date { margin-left: auto; } } } +.post-link__heading { + display: block; + margin-right: 4em; + padding: .25em 0; +} + +.post-link__title + .post-link__excerpt { + opacity: .6; +} + .post-pagination { margin-top: 4rem; font-size: .75em;