diff --git a/content/gemeinschaft/campdays/freizeit.jpg b/content/gemeinschaft/offene-gemeinschaft/campdays/freizeit.jpg similarity index 100% rename from content/gemeinschaft/campdays/freizeit.jpg rename to content/gemeinschaft/offene-gemeinschaft/campdays/freizeit.jpg diff --git a/content/gemeinschaft/campdays/index.md b/content/gemeinschaft/offene-gemeinschaft/campdays/index.md similarity index 100% rename from content/gemeinschaft/campdays/index.md rename to content/gemeinschaft/offene-gemeinschaft/campdays/index.md diff --git a/content/gemeinschaft/campdays/themensessions.jpg b/content/gemeinschaft/offene-gemeinschaft/campdays/themensessions.jpg similarity index 100% rename from content/gemeinschaft/campdays/themensessions.jpg rename to content/gemeinschaft/offene-gemeinschaft/campdays/themensessions.jpg diff --git a/templates/blog/meta_line.html b/templates/blog/meta_line.html index 87d40f931b27f7f6047e1d1cd99af0bb6bbb396f..0da20b03609e801f416f9aab4a364dd380e1ff4d 100644 --- a/templates/blog/meta_line.html +++ b/templates/blog/meta_line.html @@ -2,4 +2,3 @@ <span title="Veröffentlicht am"><i class="fa-solid fa-calendar-days"></i> <time datetime="{{ post.date }}" property="schema:datePublished">{{ post.date }}</time></span> · <span title="Lesezeit"><i class="fa-solid fa-hourglass-start"></i> {{ post.reading_time }} min</span> </p> - diff --git a/templates/blog/post.html b/templates/blog/post.html index ef7b1148c2f12c9d92e140379b50b43c392705aa..92b4823ed1b0a78e4a4bfa9bb8ffe58f14cf761a 100644 --- a/templates/blog/post.html +++ b/templates/blog/post.html @@ -37,7 +37,25 @@ </div> </div> </div> - {% block related_posts %}{% endblock %} + <div class="card"> + <header class="card-header"> + <p class="card-header-title">Weitere Posts dazu</p> + </header> + <div class="card-content"> + {% for kind, terms in page.taxonomies %} + {% for term in terms %} + {% set taxonomy = get_taxonomy_term(kind=kind, term=term) %} + {% set posts = taxonomy.pages | filter(attribute="date") %} + {% if posts %} + <p class="subtitle is-7">{{ kind | title }}: {{ term }}</p> + {% for post in posts | slice(end=5) %} + <a href="{{ post.permalink }}">{{ post.title}}</a> + {% endfor %} + {% endif %} + {% endfor %} + {% endfor %} + </div> + </div> </div> </div> {% endblock %} diff --git a/templates/blog/section.html b/templates/blog/section.html new file mode 100644 index 0000000000000000000000000000000000000000..30501aaa9d08d242e2607d2d504e74178bdd1cc8 --- /dev/null +++ b/templates/blog/section.html @@ -0,0 +1,17 @@ +{% set main_blog_section = get_section(path="blog/_index.md") %} +{% if not posts is defined %} + {% set posts = main_blog_section.pages %} +{% endif %} +<section class="section" resource="{{ main_blog_section.permalink }}" typeof="schema:Blog"> + <meta property="schema:publisher" href="https://teckids.org/" /> + <div class="container"> + <h2 class="title is-2">{{ title | default(value="Aus dem Teckids-Blog") }}</h2> + <div class="columns is-multiline is-same-height mt-4"> + {% for post in posts | slice(end=count|default(value=9)) %} + <div class="column is-one-third"> + {% include "blog/card.html" %} + </div> + {% endfor %} + </div> + </div> +</section> diff --git a/templates/blog/tag_line.html b/templates/blog/tag_line.html new file mode 100644 index 0000000000000000000000000000000000000000..5782c3d7b1156fae7de1411bd7f99bbad7bfa20d --- /dev/null +++ b/templates/blog/tag_line.html @@ -0,0 +1,7 @@ + <div class="tags"> + {% for kind, terms in post.taxonomies %} + {% for term in terms %} + <span class="tag">{{ term }}</span> + {% endfor %} + {% endfor %} + </div> diff --git a/templates/frontpage/blog.html b/templates/frontpage/blog.html index f02416b1bdd5afbd1f74dc95840cdb14f90683ce..af159e98b6c6f0a01ba72fed933d0410de95e9c8 100644 --- a/templates/frontpage/blog.html +++ b/templates/frontpage/blog.html @@ -1,14 +1,2 @@ {% set blog_section = get_section(path="blog/_index.md") %} -<section class="section" resource="{{ blog_section.permalink }}" typeof="schema:Blog"> - <meta property="schema:publisher" href="https://teckids.org/" /> - <div class="container"> - <h2 class="title is-2">{{ title | default(value="Aus dem Teckids-Blog") }}</h2> - <div class="columns is-multiline is-same-height mt-4"> - {% for post in blog_section.pages | slice(end=9) %} - <div class="column is-one-third"> - {% include "blog/card.html" %} - </div> - {% endfor %} - </div> - </div> -</section> +{% include "blog/section.html" %} diff --git a/templates/menu.html b/templates/menu.html index 5083e4da0efda93f201eb33c36cc58f68ee61139..fdda35079bdfbbb50afb22a5361c14490556c0ca 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -34,14 +34,7 @@ <div class="navbar-item has-dropdown is-hoverable"> <a href="#" class="navbar-item">Teckids-Gemeinschaft</a> <div class="navbar-dropdown is-boxed"> - {% include "menu/gemeinschaften.html" %} - </div> - </div> - - <div class="navbar-item has-dropdown is-hoverable"> - <a href="#" class="navbar-item">Updates</a> - <div class="navbar-dropdown is-boxed"> - {% include "menu/updates.html" %} + {% include "menu/gemeinschaft.html" %} </div> </div> </div> diff --git a/templates/menu/gemeinschaft.html b/templates/menu/gemeinschaft.html new file mode 100644 index 0000000000000000000000000000000000000000..d50624fbbb758423d43b4644bbc1fe7cda0c0928 --- /dev/null +++ b/templates/menu/gemeinschaft.html @@ -0,0 +1,37 @@ +{% set gemeinschaft_section = get_section(path="gemeinschaft/_index.md") %} + +<div class="container is-fluid"> + <div class="columns"> + {% for gemeinschaft_section_path in gemeinschaft_section.subsections %} + {% set gemeinschaft_subsection = get_section(path=gemeinschaft_section_path) %} + <section class="column"> + <div class="card p-0 m-0 is-shadowless is-radiusless is-overlay is-flex is-flex-direction-column is-fullheight is-justify-content-space-between"> + <div class="card-content p-0 m-0"> + <h1 class="title is-6 is-mega-menu-title"> + <p> {{ gemeinschaft_subsection.title }} </p> + <p class="is-4">{{ gemeinschaft_subsection.description }}</p> + </h1> + + {% for page in gemeinschaft_subsection.pages %} + <a class="navbar-item" href="{{ page.permalink }}"> + <div class="navbar-content">{{ page.title }}</div> + </a> + {% endfor %} + </div> + {% if gemeinschaft_subsection.extra.products %} + <div class="card-footer"> + {% for product in gemeinschaft_subsection.extra.products %} + <a class="card-footer-item" href="{{ product.link }}"> + <span class="icon-text"> + <span>{{ product.name }}</span> + <span class="icon"><i class="fa-solid fa-up-right-from-square"></i></span> + </span> + </a> + {% endfor %} + </div> + {% endif %} + </div> + </section> + {% endfor %} + </div> +</div> diff --git a/templates/menu/gemeinschaften.html b/templates/menu/gemeinschaften.html deleted file mode 100644 index 9c386774a13cb872fb7ea6d736d1b10776620dbe..0000000000000000000000000000000000000000 --- a/templates/menu/gemeinschaften.html +++ /dev/null @@ -1,20 +0,0 @@ -{% set gemeinschaften = get_taxonomy(kind = "gemeinschaft") %} - -<div class="container is-fluid"> - <div class="columns"> - {% for gemeinschaft in gemeinschaften.items %} - <section - class="column menu-gemeinschaft-section" - id="menu-gemeinschaft-section-{{ gemeinschaft.slug }}" - > - <h1 class="title is-6 is-mega-menu-title">{{ gemeinschaft.name }}</h1> - - {% for page in gemeinschaft.pages %} - <a class="navbar-item" href="{{ page.permalink }}"> - <div class="navbar-content">{{ page.title }}</div> - </a> - {% endfor %} - </section> - {% endfor %} - </div> -</div> diff --git a/templates/menu/projects.html b/templates/menu/projects.html index 054004cd9dbe6a88aa24c13f6e36d558e452d5df..6af3939363ff1053028124d69c850b2933ae8a29 100644 --- a/templates/menu/projects.html +++ b/templates/menu/projects.html @@ -4,8 +4,7 @@ <div class="columns"> {% for project_section_path in projects_section.subsections %} {% set project_section = get_section(path=project_section_path) %} - {% set project_taxonomy = get_taxonomy_term(kind="projekt", term=project_section.title) %} - <section class="column menu-project-section" id="menu-project-section-{{ project_taxonomy.slug }}"> + <section class="column menu-project-section" id="menu-project-section-{{ project_section.components[0] }}"> <div class="card p-0 m-0 is-shadowless is-radiusless is-overlay is-flex is-flex-direction-column is-fullheight is-justify-content-space-between"> <div class="card-content p-0 m-0"> <h1 class="title is-6 is-mega-menu-title"><a href="{{ project_section.permalink }}"> diff --git a/templates/menu/updates.html b/templates/menu/updates.html deleted file mode 100644 index 6894e946d478e903b37b286bea6ece8be3fa49de..0000000000000000000000000000000000000000 --- a/templates/menu/updates.html +++ /dev/null @@ -1,20 +0,0 @@ -{% set updates = get_taxonomy(kind = "update") %} - -<div class="container is-fluid"> - <div class="columns"> - {% for update in updates.items %} - <section - class="column menu-update-section" - id="menu-update-section-{{ update.slug }}" - > - <h1 class="title is-6 is-mega-menu-title">{{ update.name }}</h1> - - {% for page in update.pages %} - <a class="navbar-item" href="{{ page.permalink }}"> - <div class="navbar-content">{{ page.title }}</div> - </a> - {% endfor %} - </section> - {% endfor %} - </div> -</div> diff --git a/templates/pages/content.html b/templates/pages/content.html index db8c4266189b212f5eb53ffdb8a224311358801a..916a22f69b035b048e95651e9020895d0bac6b33 100644 --- a/templates/pages/content.html +++ b/templates/pages/content.html @@ -17,14 +17,14 @@ {% endblock content %} </div> </section> - {% block related_posts %} - {% set blog_section = get_section(path="blog/_index.md") %} - <section class="section" resource="{{ blog_section.permalink }}" typeof="schema:Blog"> - <meta property="schema:publisher" href="https://teckids.org/" /> - <div class="container"> - <h2 class="title is-2">{{ title | default(value="Aus dem Teckids-Blog") }}</h2> - {% include "pages/related_posts.html" %} - </div> - </section> - {% endblock %} + {% set blog_taxonomy = get_taxonomy_term(kind="aspekt", term=page.title, include_pages=true, required=false) %} + {% if blog_taxonomy and blog_taxonomy.pages %} + {% set posts = blog_taxonomy.pages | filter(attribute="date") %} + {% if posts %} + <aside> + {% set title="Verwandte Posts aus dem Teckids-Blog" %} + {% include "blog/section.html" %} + </aside> + {% endif %} + {% endif %} {% endblock %} diff --git a/templates/pages/raw.html b/templates/pages/raw.html index 085595c5cf71fd3977a19b4e0e23f042baa0a3f3..e2d9395c41d8ef2be2c04a98e06c500d1d9df166 100644 --- a/templates/pages/raw.html +++ b/templates/pages/raw.html @@ -2,5 +2,4 @@ {% block main %} {{ page.content | safe }} - {% include "pages/related_posts.html" %} {% endblock %} diff --git a/templates/pages/related_posts.html b/templates/pages/related_posts.html deleted file mode 100644 index 8ff2a7bbfde094c23fed5b1219aad8f727e11640..0000000000000000000000000000000000000000 --- a/templates/pages/related_posts.html +++ /dev/null @@ -1,10 +0,0 @@ -{% set blog_section = get_section(path="blog/_index.md") %} -<div class="columns is-multiline is-same-height mt-4"> - {% for post in blog_section.pages %} - {% if "aspekt" in post.taxonomies and page.title in post.taxonomies["aspekt"] %} - <div class="column is-one-third"> - {% include "blog/card.html" %} - </div> - {% else %}{% continue %}{% endif %} - {% endfor %} -</div> diff --git a/templates/shortcodes/teckids_related.html b/templates/shortcodes/teckids_related.html index 7b8a79e62173d9b0ac5585cb97b69b60e7e25c43..8856704cbf55f53d68dcbb5f44014c9d8f5a0a21 100644 --- a/templates/shortcodes/teckids_related.html +++ b/templates/shortcodes/teckids_related.html @@ -58,7 +58,7 @@ </div> <div class="media-content"> <p class="is-subtitle is-6"> - <a href="{{ get_url(path="@/gemeinschaft/plattformen.md") }}"> + <a href="{{ get_url(path="@/gemeinschaft/offene-gemeinschaft/plattformen.md") }}"> Informationen und Hilfe zu unseren Plattformen </a> </p>