diff options
author | Adam Carpenter <53hornet@gmail.com> | 2019-05-03 18:54:32 -0400 |
---|---|---|
committer | Adam Carpenter <53hornet@gmail.com> | 2019-05-03 18:54:32 -0400 |
commit | 689e85e78c106cefb6c83bcdbeae565d021d2e96 (patch) | |
tree | 2f96878c867040192f2722d94b9fe65aace1d1f1 | |
parent | 77458c3f87eafc1d17f9ef47f9926e0a5a98ceac (diff) | |
download | cobalt-site-689e85e78c106cefb6c83bcdbeae565d021d2e96.tar.xz cobalt-site-689e85e78c106cefb6c83bcdbeae565d021d2e96.zip |
Broke apart journal page elements, restored favicon.
-rw-r--r-- | _includes/all-posts.liquid | 20 | ||||
-rw-r--r-- | _includes/post-list.liquid | 36 | ||||
-rw-r--r-- | _includes/similar-posts.liquid | 23 | ||||
-rw-r--r-- | _includes/toc.liquid | 23 | ||||
-rw-r--r-- | _layouts/index.liquid | 13 | ||||
-rw-r--r-- | _layouts/journal.liquid | 56 | ||||
-rw-r--r-- | _layouts/page.liquid | 7 | ||||
-rw-r--r-- | _layouts/post.liquid | 47 | ||||
-rw-r--r-- | favicon.ico (renamed from public/images/favicon.ico) | bin | 53694 -> 53694 bytes |
9 files changed, 113 insertions, 112 deletions
diff --git a/_includes/all-posts.liquid b/_includes/all-posts.liquid new file mode 100644 index 0000000..f8377b1 --- /dev/null +++ b/_includes/all-posts.liquid @@ -0,0 +1,20 @@ +<aside class="menu"> + <p class="menu-label"> + All Posts + </p> + + <ul class="menu-list"> + {% for post in collections.posts.pages %} + <li> + <a href="{{ post.permalink }}"> + {% if post.published_date %} + <span class="tag"> + {{ post.published_date | date: "%e %b %Y" }} + </span> + {% endif %} + {{ post.title }} + </a> + </li> + {% endfor %} + </ul> +</aside> diff --git a/_includes/post-list.liquid b/_includes/post-list.liquid new file mode 100644 index 0000000..7f6d55d --- /dev/null +++ b/_includes/post-list.liquid @@ -0,0 +1,36 @@ +<div class="columns is-centered is-multiline"> + {% for post in collections.posts.pages %} + <div class="column is-full"> + <div class="card"> + <header class="card-header"> + <p class="card-header-title"> + {% if post.published_date %} + {{ post.published_date | date: "%A, %b %e, %Y" }} + {% endif %} + </p> + </header> + <div class="card-content"> + <p class="subtitle"> + {{ post.title }} + </p> + <div class="content"> + {{ post.content | truncatewords: 50 }} + </div> + </div> + <footer class="card-footer"> + <a class="card-footer-item" + href="{{ post.permalink }}" + > + Read more... + </a> + <a class="card-footer-item" + href="{{ post.permalink }}" + target="_blank" + > + Open in new tab... + </a> + </footer> + </div> + </div> + {% endfor %} +</div> diff --git a/_includes/similar-posts.liquid b/_includes/similar-posts.liquid new file mode 100644 index 0000000..be5ef52 --- /dev/null +++ b/_includes/similar-posts.liquid @@ -0,0 +1,23 @@ +<aside class="menu"> + <p class="menu-label"> + Similar Posts + </p> + + <ul class="menu-list"> + {% for post in collections.posts.pages %} + {% if post.categories contains page.categories.first %} + <li> + <a href="{{ post.permalink }}"> + {% if post.published_date %} + <span class="tag is-rounded"> + {{ post.published_date | date: "%e %b %Y" }} + </span> + {% endif %} + + {{ post.title }} + </a> + </li> + {% endif %} + {% endfor %} + </ul> +</aside> diff --git a/_includes/toc.liquid b/_includes/toc.liquid deleted file mode 100644 index 58f1815..0000000 --- a/_includes/toc.liquid +++ /dev/null @@ -1,23 +0,0 @@ -<!-- begin TOC --> -<div class="box"> - <aside class="menu"> - <p class="menu-label"> - All Posts in {{ page.title }} - </p> - - <ul class="menu-list"> - {% assign title = page.title | downcase %} - - {% for post in collections.posts.pages %} - {% if post.categories contains title%} - <li> - <a href="{{ post.permalink }}"> - {{ post.title }} - </a> - </li> - {% endif %} - {% endfor %} - </ul> - </aside> -</div> -<!-- end TOC --> diff --git a/_layouts/index.liquid b/_layouts/index.liquid index 1b124c3..744b08e 100644 --- a/_layouts/index.liquid +++ b/_layouts/index.liquid @@ -7,12 +7,11 @@ <body> <!-- begin hero --> - <section class=" - hero - is-primary - is-fullheight - is-fullheight-with-navbar - "> + <section class="hero + is-primary + is-fullheight + is-fullheight-with-navbar + "> <!-- begin hero head --> <div class="hero-head"> {% include "nav.liquid" %} @@ -57,6 +56,6 @@ <footer class="footer"> {% include "footer.liquid" %} </footer> - </body> + </body> </html> diff --git a/_layouts/journal.liquid b/_layouts/journal.liquid index 01d0fd1..bdd9ee0 100644 --- a/_layouts/journal.liquid +++ b/_layouts/journal.liquid @@ -48,65 +48,13 @@ <!-- begin short post list --> <div class="column is-narrow"> - <aside class="menu"> - <p class="menu-label"> - All Posts - </p> - - <ul class="menu-list"> - {% for post in collections.posts.pages %} - <li> - <a href="{{ post.permalink }}"> - {{ post.title }} - {% if post.published_date %} - <span class="has-text-light"> - {{ post.published_date | date: "%e %b %Y" }} - </span> - {% endif %} - </a> - </li> - {% endfor %} - </ul> - </aside> + {% include all-posts.liquid %} </div> <!-- end short post list --> <!-- begin long post list --> <div class="column"> - {% for i in (1..20) %} - {% for post in collections.posts.pages %} - <div class="card"> - <header class="card-header"> - <p class="card-header-title"> - {% if post.published_date %} - {{ post.published_date | date: "%A, %b %e, %Y" }} - {% endif %} - </p> - </header> - <div class="card-content"> - <p class="subtitle"> - {{ post.title }} - </p> - <div class="content"> - {{ post.content | truncatewords: 50 }} - </div> - </div> - <footer class="card-footer"> - <a class="card-footer-item" - href="{{ post.permalink }}" - > - Read more... - </a> - <a class="card-footer-item" - href="{{ post.permalink }}" - target="_blank" - > - Open in new tab... - </a> - </footer> - </div> - {% endfor %} - {%endfor%} + {% include post-list.liquid %} </div> <!-- end long post list --> diff --git a/_layouts/page.liquid b/_layouts/page.liquid index 1c5cd99..28e8e20 100644 --- a/_layouts/page.liquid +++ b/_layouts/page.liquid @@ -6,10 +6,7 @@ <body> <!-- begin hero --> - <section class=" - hero - is-primary - "> + <section class="hero is-primary"> <!-- begin hero head --> <div class="hero-head"> {% include "nav.liquid" %} @@ -54,6 +51,6 @@ <footer class="footer"> {% include "footer.liquid" %} </footer> - </body> + </body> </html> diff --git a/_layouts/post.liquid b/_layouts/post.liquid index 50fb240..80831a2 100644 --- a/_layouts/post.liquid +++ b/_layouts/post.liquid @@ -6,10 +6,7 @@ <body> <!-- begin hero --> - <section class=" - hero - is-primary - "> + <section class="hero is-primary"> <!-- begin hero head --> <div class="hero-head"> {% include "nav.liquid" %} @@ -34,27 +31,25 @@ <!-- end title and date --> <!-- begin categories and tags --> + <p> {% if page.categories %} - <p> - Categories: - {% for category in page.categories %} - <span class="tag"> - {{ category | downcase }} - </span> - {% endfor %} - </p> + Categories: + {% for category in page.categories %} + <span class="tag is-rounded"> + {{ category | downcase }} + </span> + {% endfor %} {% endif %} {% if page.tags %} - <p> - Tags: - {% for tag in page.tags %} - <span class="tag"> - #{{ tag | downcase }} - </span> - {% endfor %} - </p> + Tags: + {% for tag in page.tags %} + <span class="tag is-rounded"> + #{{ tag | downcase }} + </span> + {% endfor %} {% endif %} + </p> <!-- end categories and tags --> </div> @@ -68,8 +63,14 @@ <section class="section"> <div class="container"> <div class="columns"> - <div class="content"> - {{ page.content }} + <div class="column"> + <div class="content"> + {{ page.content }} + </div> + </div> + + <div class="column is-narrow"> + {% include similar-posts.liquid %} </div> </div> </div> @@ -79,6 +80,6 @@ <footer class="footer"> {% include "footer.liquid" %} </footer> - </body> + </body> </html> diff --git a/public/images/favicon.ico b/favicon.ico Binary files differindex 62c2f88..62c2f88 100644 --- a/public/images/favicon.ico +++ b/favicon.ico |