From 20fd05907a3ebbc2da4852ff70c42599dec2c6b9 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 25 Dec 2017 12:09:04 +0100 Subject: [PATCH] Made sidebar boxes dynamic * closes #5 Signed-off-by: Jim Martens --- _includes/sidebar.html | 18 ++++++------------ _includes/sidebar/author.html | 12 ++++++++++++ _includes/sidebar/job_offers.html | 8 ++++++++ about.md | 1 + 4 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 _includes/sidebar/author.html create mode 100644 _includes/sidebar/job_offers.html diff --git a/_includes/sidebar.html b/_includes/sidebar.html index ec6bd5e..7b2131b 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -1,12 +1,6 @@ - \ No newline at end of file +{% if page.sidebarboxes %} + {% assign boxes = page.sidebarboxes | split:' ' %} + {% for box_name in boxes %} + {% include sidebar/{{ box_name }}.html %} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/_includes/sidebar/author.html b/_includes/sidebar/author.html new file mode 100644 index 0000000..30b2e14 --- /dev/null +++ b/_includes/sidebar/author.html @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/_includes/sidebar/job_offers.html b/_includes/sidebar/job_offers.html new file mode 100644 index 0000000..5b7f383 --- /dev/null +++ b/_includes/sidebar/job_offers.html @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/about.md b/about.md index 7527942..06e9888 100644 --- a/about.md +++ b/about.md @@ -2,6 +2,7 @@ layout: page title: About permalink: /about/ +sidebarboxes: author job_offers --- This website is all about my personal policial statements (for now).