added vertical template and dao dir
This commit is contained in:
18
templates/layouts/horizontal_section.html
Normal file
18
templates/layouts/horizontal_section.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "_default/base.html" %}
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main class="lg:mt-6">
|
||||
<div class="flex">
|
||||
<div class="w-4/6 pr-20">
|
||||
{{ section.content | safe}}
|
||||
</div>
|
||||
<div class="w-2/6 pl-20">
|
||||
{{ macros::page_list(item_type="page-box", group=false) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</main>
|
||||
|
||||
{% endblock content %}
|
28
templates/macros.html
Normal file
28
templates/macros.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% macro page_list(type="text") %}
|
||||
<div id="list"></div>
|
||||
{% if section.extra.group_pages_by %}
|
||||
<div class="flex flex-col md:grid md:grid-cols-2 md:gap-12 lg:flex lg:flex-row justify-around text-center">
|
||||
{% set taxonomy = get_taxonomy(kind=section.extra.group_pages_by) %}
|
||||
{% set roles = taxonomy.items %}
|
||||
{% for role in roles %}
|
||||
<div class="flex flex-col items-start text-left my-8 mx-4 md:mx-8 lg:mx-4 flex-1 w-72">
|
||||
{% set icon_path = config.extra.taxonomies["roles"][role.name].icon_path | as_str %}
|
||||
<img src="{{icon_path}}" alt="role category icon" class="h-10 my-4">
|
||||
{% set path = role.name | slugify %}
|
||||
{% set fullpath = "/roles/" ~ path %}
|
||||
<a href={{fullpath}} class="text-2xl text-black font-normal lg:mb-8 cursor-pointer"> {{role.name}} </a>
|
||||
{% for page in role.pages %}
|
||||
{% include "partials/pageBox.html"%}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for page in section.pages %}
|
||||
{{page}}
|
||||
{% include "partials/pageBox.html"%}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro page_list %}
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
<div id="list"></div>
|
||||
{% if section.extra.group_pages_by %}
|
||||
<div class="flex flex-col md:grid md:grid-cols-2 md:gap-12 lg:flex lg:flex-row justify-around text-center">
|
@@ -5,7 +5,7 @@
|
||||
<main class="lg:-mt-6">
|
||||
{{ section.content | safe}}
|
||||
<hr>
|
||||
{% include "partials/pageList.html" %}
|
||||
{% include "partials/page_list.html" %}
|
||||
</main>
|
||||
|
||||
{% endblock content %}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<main class="pt-16">
|
||||
{{ section.content | safe}}
|
||||
<hr>
|
||||
{% include "partials/pageList.html" %}
|
||||
{% include "partials/page_list.html" %}
|
||||
</main>
|
||||
|
||||
{% endblock content %}
|
||||
|
Reference in New Issue
Block a user