Merge branch 'development' of github.com:threefoldfoundation/www_threefold_io into development

This commit is contained in:
samaradel
2022-09-11 14:02:02 +02:00
674 changed files with 875 additions and 4183 deletions

View File

@@ -2,8 +2,11 @@
{% block content %}
{% if page.taxonomies.people %}
{% set author_path = 'people/' ~ page.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set people = get_section(path="people/_index.md") %}
{% if people.pages is containing(page.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ page.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% endif %}
{% endif %}
<!-- Default page template for blog posts and basic informative markdown files -->

View File

@@ -17,6 +17,9 @@ and a side nav for category and featured post navigation
{%- set_global featured = page %}
{% break %}
{% endif %}
{% if not featured %}
{%- set_global featured = section.pages[0] %}
{% endif %}
{% endfor %}
{% include "partials/featuredBlog.html" %}

View File

@@ -17,6 +17,9 @@ and a side nav for category and featured post navigation
{%- set_global featured = page %}
{% break %}
{% endif %}
{% if not featured %}
{%- set_global featured = section.pages[0] %}
{% endif %}
{% endfor %}
{% include "partials/featuredNews.html" %}

View File

@@ -1,3 +1,14 @@
<!-- Takes the path of a page and checks if it exists
- if exists sets the page
-->
{% macro get_if_exists(path, type="text") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person.name) %}
{% set page = get_page(path=page_path) %}
{% endif %}
{{ page }}
{% endmacro get_if_exists %}
{% macro page_list(type="text") %}
<div id="list"></div>
{% if section.extra.group_pages_by %}

View File

@@ -18,10 +18,13 @@
<div class="flex justify-between items-center">
<ul class="list-none flex author-list my-10 mr-2 px-0">
{% if page.taxonomies.people %}
{% for person in page.taxonomies.people %}
{% set author_path = 'people/' ~ person ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
{% for person in page.taxonomies.people %}
{% set author_path = 'people/' ~ person ~ '/index.md' %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person) %}
{% set author = get_page(path=author_path) %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
<li class="author-list-item">
<a href="{{author.permalink}}" tooltip="{{author.title}}">
<img src="{{author_img}}" alt="{{ author.title }}" class="
@@ -33,6 +36,7 @@
" />
</a>
</li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
@@ -41,12 +45,17 @@
<div class="pl-3 flex flex-col text-xs leading-none uppercase">
<p>
{% if page.taxonomies.people %}
{% for person in page.taxonomies.people %}
{% set author_path = 'people/' ~ person ~ '/index.md' %}
{% for person in page.taxonomies.people %}
{% set author_path = 'people/' ~ person ~ '/index.md' %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person) %}
{% set author = get_page(path=author_path) %}
{% set author_img = get_url(path='/' ~ author.relative_path | replace(from='_', to='-') | replace(from='index.md', to=author.extra.imgPath)) %}
<span>
<a href="{{author.permalink}}" tooltip="{{author.title}}" class="hover:underline text-gray-800">{{ author.title }}</a>
</span>
{% endif %}
{% endfor %}
{% endif %}
</p>

View File

@@ -1,7 +1,11 @@
{% if post.date %}
{% if post.taxonomies.people %}
{% set author_path = 'people/' ~ post.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(post.taxonomies.people[0]) %}
{% set author_path = 'people/' ~ post.taxonomies.people[0] ~ '/index.md' %}
{% set author = get_page(path=author_path) %}
{% endif %}
{% endif %}
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">

View File

@@ -18,11 +18,15 @@
<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) %}
{% if page.extra.private >= 0 %}
{% include "partials/person_card.html" %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(person.name) %}
{% set page = get_page(path=page_path) %}
{% if page.extra.private >= 0 %}
{% include "partials/person_card.html" %}
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
</div>
<hr class="mt-6" />
<p class="text-center text-sm mt-2 mb-16">

View File

@@ -2,7 +2,11 @@
{% block content %}
{% set page_path = term.path ~ 'index.md' | replace(from='-', to='_') | trim_start_matches(pat="/") %}
{% set page = get_page(path=page_path) %}
{% set people = get_section(path="people/_index.md") %}
{% set pages_str = people.pages | json_encode() | as_str %}
{% if pages_str is containing(term.name) %}
{% 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">
@@ -47,5 +51,6 @@
<hr/>
</div>
</div>
{% endif %}
{% endblock content %}

View File

@@ -36,7 +36,9 @@ Parameters:
{% endif %}
<!-- makes external links in row open in new tabs-->
{% set body = body | markdown | replace(from='href="', to='target="_blank" href="') | safe %}
{% set base_url = get_url(path="")%}
{% set body = body | markdown | replace(from='target="_blank" href="' ~ base_url , to='href="' ~ base_url) | safe %}
<!-- Splits body to columns -->
{% set columns = body | safe | markdown | split(pat="|||") %}