add people taxonomy
This commit is contained in:
32
config.toml
32
config.toml
@@ -81,6 +81,12 @@ feed = true
|
||||
paginate_by = 9
|
||||
paginate_path = "tags"
|
||||
|
||||
[[taxonomies]]
|
||||
name = "people"
|
||||
feed = true
|
||||
paginate_by = 9
|
||||
paginate_path = "people"
|
||||
|
||||
[[taxonomies]]
|
||||
name = "memberships"
|
||||
feed = true
|
||||
@@ -90,32 +96,6 @@ paginate_path = "people/memberships"
|
||||
[extra]
|
||||
# Put all your custom variables here
|
||||
|
||||
[extra.taxonomies."roles"]
|
||||
[extra.taxonomies."roles".Create]
|
||||
icon_path = "images/icons/paint-brush-art-svgrepo-com.svg"
|
||||
banner_path = "images/marius-masalar-unsplash.jpg"
|
||||
title = "Create Ourworld"
|
||||
description = "Become a part of a team of creators looking to shape our digital world"
|
||||
|
||||
[extra.taxonomies."roles".Develop]
|
||||
icon_path = "images/icons/code-svgrepo-com.svg"
|
||||
banner_path = "images/marius-masalar-unsplash.jpg"
|
||||
title = "Develop Ourworld"
|
||||
description = "Become a part of a team of developers building our digital world"
|
||||
|
||||
[extra.taxonomies."roles".Inspire]
|
||||
icon_path = "images/icons/bar-svgrepo-com.svg"
|
||||
banner_path = "images/marius-masalar-unsplash.jpg"
|
||||
title = "Share Ourworld"
|
||||
description = "Create communities and involve people in ourworld"
|
||||
|
||||
[extra.taxonomies."roles".Organize]
|
||||
icon_path = "images/icons/form-svgrepo-com.svg"
|
||||
banner_path = "images/marius-masalar-unsplash.jpg"
|
||||
title = "Run Ourworld"
|
||||
description = "Become a part of the organizational team at ourworld"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<div>
|
||||
<div class="mt-12 grid gap-5 max-w-lg mx-auto lg:grid-cols-3 xl:grid-cols-4 lg:max-w-none">
|
||||
{%- for post in paginator.pages %}
|
||||
{%- for page in paginator.pages %}
|
||||
{% include "partials/person_card.html" %}
|
||||
{%- endfor %}
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
<div class="flex flex-col px-0 sm:px-4 pb-2">
|
||||
<a href="{{post.permalink}}" class="border-0 text-gray-700 hover:!text-gray-700 font-normal text-left">
|
||||
{% set url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
|
||||
<img src="{{url}}" alt="{{post.title ~ ' Picture'}}" />
|
||||
<a href="{{page.permalink}}" class="border-0 text-gray-700 hover:!text-gray-700 font-normal text-left">
|
||||
{% set url = get_url(path='/' ~ page.relative_path | replace(from='_', to='-') | replace(from='index.md', to=page.extra.imgPath)) %}
|
||||
<img src="{{url}}" alt="{{page.title ~ ' Picture'}}" />
|
||||
<div>
|
||||
<h2 class="text-2xl">{{post.title}}</h2>
|
||||
<h2 class="text-2xl">{{page.title}}</h2>
|
||||
<div class="text-md text-gray-700 text-left line-clamp-3 text-ellipsis">
|
||||
{% if post.description %}
|
||||
{{post.description}}
|
||||
{% if page.description %}
|
||||
{{page.description}}
|
||||
{% else %}
|
||||
{{post.content | safe}}
|
||||
{{page.content | safe}}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="my-2 flex flex-row items-start flex-wrap">
|
||||
{% for tag in post.taxonomies.memberships %}
|
||||
{% if page.taxonomies.memberships %}
|
||||
{% for tag in page.taxonomies.memberships %}
|
||||
<a href="{{'/memberships/' ~ tag | replace(from='_', to='-' )}}" class="border-1 text-xs font-light bg-transparent hover:text-blue-700 py-1 px-2 mr-2 my-1 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full ">
|
||||
{{tag}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
74
templates/people/list.html
Normal file
74
templates/people/list.html
Normal file
@@ -0,0 +1,74 @@
|
||||
{% extends "_default/base.html" %}
|
||||
{% block content %}
|
||||
|
||||
|
||||
<div class="container mx-auto">
|
||||
{% include "partials/filter_bar.html" %}
|
||||
|
||||
<div class="text-center main-title px-0 md:w-full">
|
||||
<h1
|
||||
class="tracking-tight text-5xl text-left text-2xl sm:text-3xl md:text-4xl lg:text-5xl fw-500 leading-snug font-normal mb-10"
|
||||
>
|
||||
{% set path_array = current_path | split(pat="/") %}
|
||||
{% set taxonomy = path_array[1] %}
|
||||
{% set category = path_array[2] %}
|
||||
{{category | replace(from='-', to=' ' ) | title}}
|
||||
</h1>
|
||||
<div>
|
||||
<div class="mt-12 grid gap-5 max-w-lg mx-auto lg:grid-cols-2 xl:grid-cols-4 lg:max-w-none">
|
||||
{% for person in terms %}
|
||||
{% set page_path = person.path ~ 'index.md' | replace(from='-', to='_') | trim_start_matches(pat="/") %}
|
||||
{% set page = get_page(path=page_path) %}
|
||||
{% include "partials/person_card.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<hr class="mt-6" />
|
||||
<p class="text-center text-sm mt-2 mb-16">
|
||||
{% if paginator.previous %}
|
||||
<a
|
||||
class="border-transparent"
|
||||
aria-label="First page"
|
||||
href="{{ paginator.first }}"
|
||||
>{% include "partials/icons/svgPrevPageIcon.html" %}{% include
|
||||
"partials/icons/svgPrevPageIcon.html" %}</a
|
||||
>
|
||||
|
||||
<a
|
||||
class="border-transparent"
|
||||
aria-label="Previous page"
|
||||
href="{{ paginator.previous }}"
|
||||
>{% include "partials/icons/svgPrevPageIcon.html" %}</a
|
||||
>
|
||||
|
||||
{% else %} {%
|
||||
include "partials/icons/svgFirstPageIcon.html" %}{% include
|
||||
"partials/icons/svgFirstPageIcon.html" %}
|
||||
{% include
|
||||
"partials/icons/svgFirstPageIcon.html" %}
|
||||
|
||||
{% endif %} {% if
|
||||
paginator.next %}
|
||||
<a
|
||||
class="border-transparent"
|
||||
aria-label="Next page"
|
||||
href="{{ paginator.next }}"
|
||||
>{% include "partials/icons/svgNextPageIcon.html" %}</a
|
||||
>
|
||||
|
||||
<a
|
||||
class="border-transparent"
|
||||
aria-label="Last page"
|
||||
href="{{ paginator.last }}"
|
||||
>{% include "partials/icons/svgNextPageIcon.html" %}{% include
|
||||
"partials/icons/svgNextPageIcon.html" %}</a
|
||||
>
|
||||
{% else %} {% include "partials/icons/svgLastPageIcon.html" %}
|
||||
{% include
|
||||
"partials/icons/svgLastPageIcon.html" %}{% include
|
||||
"partials/icons/svgLastPageIcon.html" %} {% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
52
templates/people/single.html
Normal file
52
templates/people/single.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends "_default/base.html" %}
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% set page_path = current_path ~ 'index.md' | replace(from='-', to='_') | trim_start_matches(pat="/") %}
|
||||
{% set page = get_page(path=page_path) %}
|
||||
|
||||
<div class="container sm:pxi-0 lg:w-5/6 mx-auto min-h-screen overflow-x-hidden pt-24">
|
||||
<div class="flex flex-row flex-wrap items-start mx-4 sm:mx-0">
|
||||
<div class="w-full md:w-1/6 mx-auto sm:mx-0">
|
||||
<img src="{{page.extra.imgPath}}" alt="" class="rounded bg-gray-200 w-48 border-2 border-gray-400 mx-auto md:mx-0 g-image g-image--lazy g-image--loaded my-4">
|
||||
</div>
|
||||
<div class="w-full md:w-5/6 text-center md:text-left md:pl-8">
|
||||
<div class="flex flex-row items-center">
|
||||
<h1 class="pb-0 mb-0 mt-0 text-4xl font-normal tracking-wide my-1">
|
||||
{{page.title}}
|
||||
</h1>
|
||||
<div class="ml-4">
|
||||
{% include "partials/socialLinks.html" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-gray-700 my-4">
|
||||
{{page.content | safe }}
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="flex justify-between items-center">
|
||||
<ul class="list-none flex author-list m-0 py-2">
|
||||
{% for org in page.extra.organizations %}
|
||||
<li>
|
||||
<a href="">
|
||||
<img src="" alt="">
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% for tag in page.taxonomies.memberships %}
|
||||
<a href="{{'/memberships/' ~ tag | replace(from='_', to='-' )}}" class="border-1 font-light text-xs bg-transparent hover:text-blue-700 py-2 px-4 mr-2 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full ">
|
||||
{{tag}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="my-8">
|
||||
<hr/>
|
||||
<br/>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
||||
@@ -16,7 +16,7 @@
|
||||
</h1>
|
||||
<div>
|
||||
<div class="mt-12 grid gap-5 max-w-lg mx-auto lg:grid-cols-2 xl:grid-cols-4 lg:max-w-none">
|
||||
{%- for post in paginator.pages %}
|
||||
{%- for page in paginator.pages %}
|
||||
{% if "Engineering" == "Engineering"%}
|
||||
{% include "partials/person_card.html" %}
|
||||
{%endif%} {%- endfor %}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
{% include "partials/tagsSidebar.html" %}
|
||||
{% elif current_path is containing("memberships") %}
|
||||
{% include "partials/memberships.html" %}
|
||||
{% elif current_path is containing("people") %}
|
||||
{% else %}
|
||||
{% include "partials/newsPosts.html" %}
|
||||
{% include "partials/newsSidebar.html" %}
|
||||
|
||||
Reference in New Issue
Block a user