From fc383a24fed5632b713400e911dedc1570f7dedb Mon Sep 17 00:00:00 2001 From: timurgordon Date: Thu, 24 Feb 2022 13:58:51 +0300 Subject: [PATCH] added pagelist for taxonomy nav between pages and pageBox --- config.toml | 4 +-- content/join-us/_index.md | 26 ---------------- content/join-us/roles/ourworld_ambassador2.md | 4 +-- templates/hiring_categories/single.html | 9 ------ templates/partials/blogPosts.html | 2 +- templates/partials/pageList.html | 31 +++++++++++++++++++ .../{hiring_categories => roles}/list.html | 0 templates/roles/single.html | 12 +++++++ templates/section.html | 13 ++------ 9 files changed, 51 insertions(+), 50 deletions(-) delete mode 100644 templates/hiring_categories/single.html create mode 100644 templates/partials/pageList.html rename templates/{hiring_categories => roles}/list.html (100%) create mode 100644 templates/roles/single.html diff --git a/config.toml b/config.toml index 8b5d032..f20ac64 100644 --- a/config.toml +++ b/config.toml @@ -58,10 +58,10 @@ paginate_by = 2 paginate_path = "/blog-posts" [[taxonomies]] -name = "hiring_categories" +name = "roles" feed = true paginate_by = 2 -paginate_path = "/blog-posts" +paginate_path = "/join-us" [extra] # Put all your custom variables here diff --git a/content/join-us/_index.md b/content/join-us/_index.md index 908c86b..2eb33a9 100644 --- a/content/join-us/_index.md +++ b/content/join-us/_index.md @@ -132,29 +132,3 @@ Think about ourworld like a global digital backbone, which allows everyone to ex ||| {% end %} - ---- - -{% row(style="lean center") %} - -||| - -### Create - -||| - -### Share - -||| - -### Develop - -||| - -### Ideate - -||| - -{% end %} - ---- diff --git a/content/join-us/roles/ourworld_ambassador2.md b/content/join-us/roles/ourworld_ambassador2.md index 4c68c3b..94fb074 100644 --- a/content/join-us/roles/ourworld_ambassador2.md +++ b/content/join-us/roles/ourworld_ambassador2.md @@ -5,7 +5,7 @@ insert_anchor_links: "left" updated: 2019-04-11T20:33:00-05:00 # Comment-out this line with a # if content is unchanged template: "page.html" taxonomies: - hiring_categories: ["Engineering"] + roles: ["Develop", "Inspire", "Ideate"] --- {% row(bgPath="/images/bernhard-eisenmann-unsplash.jpg") %} @@ -143,7 +143,7 @@ Think about ourworld like a global digital backbone, which allows everyone to ex ||| -### Create +### Creator ||| diff --git a/templates/hiring_categories/single.html b/templates/hiring_categories/single.html deleted file mode 100644 index c1ca76f..0000000 --- a/templates/hiring_categories/single.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "index.html" %} - -{% block content %} - -
- {{section}} -
- - {% endblock content %} diff --git a/templates/partials/blogPosts.html b/templates/partials/blogPosts.html index 4bfc120..9b6d951 100644 --- a/templates/partials/blogPosts.html +++ b/templates/partials/blogPosts.html @@ -7,7 +7,7 @@ {% set category = path_array[2] %} The Latest from ThreeFold {% if taxonomy == "categories" %} - - {{category | replace(from='-', to=' ' ) | title}} + {{category | replace(from='-', to=' ' ) | title}} {% endif %}
diff --git a/templates/partials/pageList.html b/templates/partials/pageList.html new file mode 100644 index 0000000..6986996 --- /dev/null +++ b/templates/partials/pageList.html @@ -0,0 +1,31 @@ + +
+
+ All + {% set taxonomy = get_taxonomy(kind="roles") %} + {% set roles = taxonomy.items %} + {% for role in roles %} + {% set path = role.name | slugify %} + {% set fullpath = "/roles/" ~ path ~ "#list" %} + {{role.name}} + {% endfor %} +
+
+ +
+
+ {% if paginator %} + {% for page in paginator.pages %} +
+ {% include "partials/pageBox.html" %} +
+ {% endfor %} + {% else %} + {% for page in section.pages %} +
+ {% include "partials/pageBox.html" %} +
+ {% endfor %} + {% endif %} +
+
\ No newline at end of file diff --git a/templates/hiring_categories/list.html b/templates/roles/list.html similarity index 100% rename from templates/hiring_categories/list.html rename to templates/roles/list.html diff --git a/templates/roles/single.html b/templates/roles/single.html new file mode 100644 index 0000000..36d9a4d --- /dev/null +++ b/templates/roles/single.html @@ -0,0 +1,12 @@ +{% extends "index.html" %} + +{% block content %} + +{% set section = get_section(path="join-us/_index.md")%} +
+ {{ section.content | safe}} +
+ {% include "partials/pageList.html" %} +
+ + {% endblock content %} diff --git a/templates/section.html b/templates/section.html index 22f915b..6756b2e 100644 --- a/templates/section.html +++ b/templates/section.html @@ -4,15 +4,8 @@
{{ section.content | safe}} -
- {% for page in section.pages %} -
- {% include "partials/pageBox.html" %} -
- {% endfor %} -
- - +
+ {% include "partials/pageList.html" %}
- + {% endblock content %}