[TASK] color from config

This commit is contained in:
Christian Seyfferth 2020-05-20 15:51:34 +02:00
parent 3ede56caf1
commit 9bd1c17396
3 changed files with 76 additions and 92 deletions

View File

@ -1,19 +1,19 @@
<footer class="page-footer white"> <footer class="page-footer {{ config.theme_config.color }}">
<div class="{% if not config.theme_config.widescreen %} container{% endif %}"> <div class="{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="row"> <div class="row">
<div class="col l6 s12"> <div class="col l6 s12"></div>
<div class="col l4 offset-12 s12"></div>
</div> </div>
<div class="col l4 offset-12 s12"> </div>
<div class="footer-copyright">
</div> <div class="{% if not config.theme_config.widescreen %} container{% endif %} black-text">
</div> <span>&copy; 2013 -
</div> {{ now|date("Y") }}
<div class="footer-copyright"> by chrosey</span>
<div class="{% if not config.theme_config.widescreen %} container{% endif %} black-text"> <span class="hide-on-large-and-up center">&middot;&nbsp;</span>
<span>&copy; 2013 - {{ now|date("Y") }} by chrosey</span> <span class="right">powered by
<span class="hide-on-large-and-up center">&middot;&nbsp;</span> <a href="http://picocms.org/">picoCMS</a>
<span class="right">powered by <a href="http://picocms.org/">picoCMS</a></span> </span>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -1,77 +1,61 @@
<nav class="white" <nav class="{{ config.theme_config.color }}" role="navigation">
role="navigation"> <div class="nav-wrapper{% if not config.theme_config.widescreen %} container{% endif %}">
<div class="nav-wrapper{% if not config.theme_config.widescreen %} container{% endif %}"> <a id="logo-container" href="{{ "index"|link }}" class="brand-logo">
<a id="logo-container" <img src="{{ assets_url }}/logo.svg " alt="Logo" height="64" width="64"/>
href="{{ "index"|link }}" </a>
class="brand-logo"> <a data-target="slide-out" class="sidenav-trigger">
<img src="{{ assets_url }}/logo.svg " <i class="material-icons">menu</i>
alt="Logo" </a>
height="64" {% block navigation %}
width="64" /> <ul class="right hide-on-med-and-down">
</a> {% for page in pages("index") if not page.hidden %}
<a data-target="slide-out"
class="sidenav-trigger"><i class="material-icons">menu</i></a>
{% block navigation %}
<ul class="right hide-on-med-and-down">
{% for page in pages("index") if not page.hidden %}
{% if pages(page.id) | length < 1 %} {% if pages(page.id) | length < 1 %}
<li> <li>
<a class="" <a class="" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
href="{{ page.url }}" </li>
tabindex="0">{{ page.title }}</a> {% else %}
</li> <li>
{% else %} <a class="dropdown-trigger" data-target="dropdown_{{ page.id }}" tabindex="0">{{ page.title }}<i class="material-icons left">arrow_drop_down</i>
<li> </a>
<a class="dropdown-trigger" <ul class="dropdown-content" id="dropdown_{{ page.id }}">
data-target="dropdown_{{ page.id }}" {% for subpage in pages(page.id) %}
tabindex="0">{{ page.title }}<i class="material-icons left">arrow_drop_down</i></a> <li>
<ul class="dropdown-content" <a class="" href="{{ subpage.url }}" tabindex="0">{{ subpage.title }}</a>
id="dropdown_{{ page.id }}"> </li>
{% for subpage in pages(page.id) %} {% endfor %}
<li> </ul>
<a class="" {% endif %}
href="{{ subpage.url }}" </li>
tabindex="0">{{ subpage.title }}</a> {% endfor %}
</li> </ul>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %} {% endblock %}
</div> </div>
</nav> </nav>
<ul id="slide-out" <ul id="slide-out" class="sidenav collapsible">
class="sidenav collapsible"> {% block sideNavigation %}
{% block sideNavigation %} {% for page in pages("index") if not page.hidden %}
{% for page in pages("index") if not page.hidden %} {% if pages(page.id) | length < 1 %}
{% if pages(page.id) | length < 1 %} <li>
<li> <a class="waves-effect" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
<a class="waves-effect" {% else %}
href="{{ page.url }}" <li>
tabindex="0">{{ page.title }}</a> <a class="collapsible-header waves-effect" data-target="collapse_{{page.id}}">{{ page.title }}<i class="material-icons right">arrow_drop_down</i>
{% else %} </a>
<li> <div class="collapsible-body" id="collapse_{{page.id}}">
<a class="collapsible-header waves-effect" <ul>
data-target="collapse_{{page.id}}">{{ page.title }}<i class="material-icons right">arrow_drop_down</i></a> {% for subpage in pages(page.id) %}
<div class="collapsible-body" <li>
id="collapse_{{page.id}}"> <a class="waves-effect" href="{{ subpage.url }}">{{ subpage.title }}</a>
<ul> </li>
{% for subpage in pages(page.id) %} {% endfor %}
<li> </ul>
<a class="waves-effect" </li>
href="{{ subpage.url }}">{{ subpage.title }}</a> {% endif %}
</li>
{% endfor %}
</ul>
</li>
{% endif %}
</li> </li>
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
</ul> </ul>

View File

@ -18,13 +18,13 @@ themes_url:
# If this fails, override it here. Example: https://example.com/pico/themes/ # If this fails, override it here. Example: https://example.com/pico/themes/
theme_config: # Additional theme-specific config theme_config: # Additional theme-specific config
widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider) widescreen: false # Default theme: Use more horizontal space (i.e. make the site container wider)
color: default color: white
twig_config: # Twig template engine config twig_config: # Twig template engine config
autoescape: html # Let Twig escape variables by default autoescape: html # Let Twig escape variables by default
strict_variables: false # If set to true, Twig will bail out when unset variables are being used strict_variables: false # If set to true, Twig will bail out when unset variables are being used
charset: utf-8 # The charset used by Twig templates charset: utf-8 # The charset used by Twig templates
debug: ~ # Enable Twig's debug mode debug: ~ # Enable Twig's debug mode
cache: false # Enable Twig template caching by specifying a path to a writable directory cache: cache # Enable Twig template caching by specifying a path to a writable directory
auto_reload: true # Recompile Twig templates whenever the source code changes auto_reload: true # Recompile Twig templates whenever the source code changes
## ##