From e346f44f8acd2938027db67ee13eb7bfb932a4cd Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 1 Jan 2015 20:51:56 +0100 Subject: [PATCH] Footer + feed improvements --- Makefile | 1 + _includes/feed.xml | 36 ++++++++++++++++++++++++++++++++++++ _includes/head.html | 1 + _layouts/default.html | 14 ++++++++++++++ _layouts/link.html | 4 ++-- archives/posts.html | 6 +----- feed-with-links.xml | 4 ++++ feed.xml | 29 +---------------------------- public/css/poole.css | 41 ++++++++++++++++++++++++++++++++++------- 9 files changed, 94 insertions(+), 42 deletions(-) create mode 100644 _includes/feed.xml create mode 100644 feed-with-links.xml diff --git a/Makefile b/Makefile index 8b6fd3d..9210b7d 100644 --- a/Makefile +++ b/Makefile @@ -16,4 +16,5 @@ upload: superfeedr: @echo "=== Notifying Superfeedr" @curl -X POST https://kempkens.superfeedr.com -d "hub.mode=publish" -d "hub.url=https://blog.kempkens.io/feed.xml" + @curl -X POST https://kempkens.superfeedr.com -d "hub.mode=publish" -d "hub.url=https://blog.kempkens.io/feed-with-links.xml" @echo "Done." diff --git a/_includes/feed.xml b/_includes/feed.xml new file mode 100644 index 0000000..e654b67 --- /dev/null +++ b/_includes/feed.xml @@ -0,0 +1,36 @@ + + + {{ site.title | append: include.title }} + + + + {{ site.time | date_to_xmlschema }} + {{ site.url | append: include.id }} + + {{ site.author.name }} + {{ site.author.email }} + + + {% for post in include.posts %} + + {{ site.url }}{{ post.id }} + {% if post.category == "links" %}Link: {% endif %}{{ post.title }} + + {{ post.date | date_to_xmlschema }} + {% if post.modified != nil %} + {{ post.modified | date_to_xmlschema }} + {% else %} + {{ post.date | date_to_xmlschema }} + {% endif %} + {% if post.category == "links" %} + + {% capture linktext %}

Link: {{ post.link | hostname }}

{% endcapture %} + {{ linktext | xml_escape }} + {{ post.content | xml_escape }} +
+ {% else %} + {{ post.content | xml_escape }} + {% endif %} +
+ {% endfor %} +
diff --git a/_includes/head.html b/_includes/head.html index 3e65c92..6ad398c 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -25,6 +25,7 @@ + diff --git a/_layouts/default.html b/_layouts/default.html index 745aaf0..3e298f4 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -9,6 +9,20 @@
{{ content }} + +
diff --git a/_layouts/link.html b/_layouts/link.html index 33f0380..d07778a 100644 --- a/_layouts/link.html +++ b/_layouts/link.html @@ -3,10 +3,10 @@ layout: default ---
-

{{ page.title }}

+

⚓ {{ page.title }}

-

{{ page.link | hostname }}

+

Link: {{ page.link | hostname }}

{{ content }}
diff --git a/archives/posts.html b/archives/posts.html index dd2d459..07ef932 100644 --- a/archives/posts.html +++ b/archives/posts.html @@ -17,10 +17,6 @@ title: Post Archive {% endif %}
  • - {% if post.category == "links" %} - ⚓ {{ post.title }} - {% else %} - {{ post.title }} - {% endif %} + {% if post.category == "links" %}⚓{% endif %} {{ post.title }}
  • {% endfor %} diff --git a/feed-with-links.xml b/feed-with-links.xml new file mode 100644 index 0000000..0cd75f4 --- /dev/null +++ b/feed-with-links.xml @@ -0,0 +1,4 @@ +--- +layout: null +--- +{% include feed.xml id="/feed-with-links.xml" path="/feed-with-links.xml" title=" (with links)" posts=site.posts %} diff --git a/feed.xml b/feed.xml index 7295312..1d9e25b 100644 --- a/feed.xml +++ b/feed.xml @@ -1,31 +1,4 @@ --- layout: null --- - - - {{ site.title }} - - - - {{ site.time | date_to_xmlschema }} - {{ site.url }} - - {{ site.author.name }} - {{ site.author.email }} - - - {% for post in site.categories['posts'] %} - - {{ site.url }}{{ post.id }} - {{ post.title }} - - {{ post.date | date_to_xmlschema }} - {% if post.modified != nil %} - {{ post.modified | date_to_xmlschema }} - {% else %} - {{ post.date | date_to_xmlschema }} - {% endif %} - {{ post.content | xml_escape }} - - {% endfor %} - +{% include feed.xml path="/feed.xml" posts=site.categories.posts %} diff --git a/public/css/poole.css b/public/css/poole.css index 942451c..1977c24 100644 --- a/public/css/poole.css +++ b/public/css/poole.css @@ -351,13 +351,6 @@ tbody tr:nth-child(odd) th { margin-bottom: 1rem; color: #9a9a9a; } -.post-date a { - color: #9a9a9a; -} -.post-date a:hover { - color: #303030; - text-decoration: none; -} /* Related posts */ .related { @@ -416,6 +409,40 @@ a.pagination-item:hover { background-color: #f5f5f5; } + +/* Custom */ +.post-date a { + color: #9a9a9a; +} +.post-date a:hover { + color: #303030; + text-decoration: none; +} + +.post-link > span { + font-weight: bold; +} + +.footer { + margin-top: 3rem; + font-size: 75%; +} +.footer-links { + margin: 0; + padding: 0; + list-style-type: none; + text-align: center; +} +.footer-links li { + display: inline; +} +.footer-links li.divider { + color: #eee; +} +.footer-links li a { + color: #515151; +} + @media (min-width: 30em) { .pagination { margin: 3rem 0;