From 153a74861377f47f7886b1c3711447b369f3da01 Mon Sep 17 00:00:00 2001 From: Ryan L McIntyre Date: Tue, 23 Jul 2019 14:36:00 -0700 Subject: [PATCH] Separate pages and refactors includes --- _includes/header.html | 14 ++++ _includes/scripts.html | 9 +++ _includes/section.html | 20 ++++++ _includes/topnav.html | 30 +++++++++ ...heet.md => 2017-01-04-icon-cheat-sheet.md} | 1 + ...tors.md => 2017-01-05-all-contributors.md} | 1 + cheat-sheet.html | 21 ++++++ contributors.html | 21 ++++++ font-downloads.html | 21 ++++++ index.html | 64 ++----------------- releases.html | 21 ++++++ 11 files changed, 166 insertions(+), 57 deletions(-) create mode 100644 _includes/header.html create mode 100644 _includes/scripts.html create mode 100644 _includes/section.html create mode 100644 _includes/topnav.html rename _posts/{2017-01-04-cheat-sheet.md => 2017-01-04-icon-cheat-sheet.md} (99%) rename _posts/{2017-01-05-contributors.md => 2017-01-05-all-contributors.md} (99%) create mode 100755 cheat-sheet.html create mode 100755 contributors.html create mode 100755 font-downloads.html create mode 100755 releases.html diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 000000000..4b76d14f6 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,14 @@ + + + + {{ site.title }} + + + + + + + {% if site.favicon %}{% endif %} + {% if site.touch_icon %}{% endif %} + + \ No newline at end of file diff --git a/_includes/scripts.html b/_includes/scripts.html new file mode 100644 index 000000000..f81b7ba85 --- /dev/null +++ b/_includes/scripts.html @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/_includes/section.html b/_includes/section.html new file mode 100644 index 000000000..122aa4867 --- /dev/null +++ b/_includes/section.html @@ -0,0 +1,20 @@ +{% capture id %}{{ page.id | remove:'/' | downcase }}{% endcapture %} +
+ {% if page.icon %} +
+ section icon +
{{ page.title }}
+
+ {% elsif page.fa-icon %} +
+ + + + +
{{ page.title }}
+
+ {% endif %} +
+ {{ page.content }} +
+
\ No newline at end of file diff --git a/_includes/topnav.html b/_includes/topnav.html new file mode 100644 index 000000000..29cce985b --- /dev/null +++ b/_includes/topnav.html @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/_posts/2017-01-04-cheat-sheet.md b/_posts/2017-01-04-icon-cheat-sheet.md similarity index 99% rename from _posts/2017-01-04-cheat-sheet.md rename to _posts/2017-01-04-icon-cheat-sheet.md index 84be2c640..4f0cb0f3e 100644 --- a/_posts/2017-01-04-cheat-sheet.md +++ b/_posts/2017-01-04-icon-cheat-sheet.md @@ -4,6 +4,7 @@ short_title: "Icons" bg: gray color: white fa-icon: search +page: cheat-sheet --- # Cheat Sheet diff --git a/_posts/2017-01-05-contributors.md b/_posts/2017-01-05-all-contributors.md similarity index 99% rename from _posts/2017-01-05-contributors.md rename to _posts/2017-01-05-all-contributors.md index 88c424114..8c0fbedb5 100644 --- a/_posts/2017-01-05-contributors.md +++ b/_posts/2017-01-05-all-contributors.md @@ -4,6 +4,7 @@ short_title: "People" bg: 'red' color: white fa-icon: flask +page: contributors --- # Thanks goes to these wonderful people diff --git a/cheat-sheet.html b/cheat-sheet.html new file mode 100755 index 000000000..008467025 --- /dev/null +++ b/cheat-sheet.html @@ -0,0 +1,21 @@ +--- +--- + + +{% include header.html %} + +
+ {% assign page = site.posts[2] %} + {% include topnav.html %} + {% include section.html %} + +
+ {% include analytics.html %} + {% include scripts.html %} + + diff --git a/contributors.html b/contributors.html new file mode 100755 index 000000000..2831ba9b4 --- /dev/null +++ b/contributors.html @@ -0,0 +1,21 @@ +--- +--- + + +{% include header.html %} + +
+ {% assign page = site.posts[1] %} + {% include topnav.html %} + {% include section.html %} + +
+ {% include analytics.html %} + {% include scripts.html %} + + diff --git a/font-downloads.html b/font-downloads.html new file mode 100755 index 000000000..d6e5caa87 --- /dev/null +++ b/font-downloads.html @@ -0,0 +1,21 @@ +--- +--- + + +{% include header.html %} + +
+ {% assign page = site.posts[3] %} + {% include topnav.html %} + {% include section.html %} + +
+ {% include analytics.html %} + {% include scripts.html %} + + diff --git a/index.html b/index.html index 7ec414907..f95ea1841 100755 --- a/index.html +++ b/index.html @@ -2,60 +2,18 @@ --- - - - - {{ site.title }} - - - - - - - {% if site.favicon %}{% endif %} - {% if site.touch_icon %}{% endif %} - - +{% include header.html %}
- - + {% include topnav.html %} {% for page in site.posts reversed %} - {% capture id %}{{ page.id | remove:'/' | downcase }}{% endcapture %} -
- {% if page.icon %} -
- section icon -
{{ page.title }}
-
- {% elsif page.fa-icon %} -
- - - - -
{{ page.title }}
-
- {% endif %} -
- {{ page.content }} -
-
+ {% if page.page == nil %} + {% include section.html %} + {% endif %} {% endfor %} - -{% include analytics.html %} - + {% include analytics.html %} + {% include scripts.html %} - - - - diff --git a/releases.html b/releases.html new file mode 100755 index 000000000..0180a6274 --- /dev/null +++ b/releases.html @@ -0,0 +1,21 @@ +--- +--- + + +{% include header.html %} + +
+ {% assign page = site.posts[0] %} + {% include topnav.html %} + {% include section.html %} + +
+ {% include analytics.html %} + {% include scripts.html %} + +