[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 class="col l4 offset-12 s12">
</div>
</div> </div>
</div> </div>
<div class="footer-copyright"> <div class="footer-copyright">
<div class="{% if not config.theme_config.widescreen %} container{% endif %} black-text"> <div class="{% if not config.theme_config.widescreen %} container{% endif %} black-text">
<span>&copy; 2013 - {{ now|date("Y") }} by chrosey</span> <span>&copy; 2013 -
{{ now|date("Y") }}
by chrosey</span>
<span class="hide-on-large-and-up center">&middot;&nbsp;</span> <span class="hide-on-large-and-up center">&middot;&nbsp;</span>
<span class="right">powered by <a href="http://picocms.org/">picoCMS</a></span> <span class="right">powered by
<a href="http://picocms.org/">picoCMS</a>
</span>
</div> </div>
</div> </div>
</footer> </footer>

View File

@ -1,38 +1,27 @@
<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" <a id="logo-container" href="{{ "index"|link }}" class="brand-logo">
href="{{ "index"|link }}" <img src="{{ assets_url }}/logo.svg " alt="Logo" height="64" width="64"/>
class="brand-logo"> </a>
<img src="{{ assets_url }}/logo.svg " <a data-target="slide-out" class="sidenav-trigger">
alt="Logo" <i class="material-icons">menu</i>
height="64"
width="64" />
</a> </a>
<a data-target="slide-out"
class="sidenav-trigger"><i class="material-icons">menu</i></a>
{% block navigation %} {% block navigation %}
<ul class="right hide-on-med-and-down"> <ul class="right hide-on-med-and-down">
{% 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="" <a class="" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
href="{{ page.url }}"
tabindex="0">{{ page.title }}</a>
</li> </li>
{% else %} {% else %}
<li> <li>
<a class="dropdown-trigger" <a class="dropdown-trigger" data-target="dropdown_{{ page.id }}" tabindex="0">{{ page.title }}<i class="material-icons left">arrow_drop_down</i>
data-target="dropdown_{{ page.id }}" </a>
tabindex="0">{{ page.title }}<i class="material-icons left">arrow_drop_down</i></a> <ul class="dropdown-content" id="dropdown_{{ page.id }}">
<ul class="dropdown-content"
id="dropdown_{{ page.id }}">
{% for subpage in pages(page.id) %} {% for subpage in pages(page.id) %}
<li> <li>
<a class="" <a class="" href="{{ subpage.url }}" tabindex="0">{{ subpage.title }}</a>
href="{{ subpage.url }}"
tabindex="0">{{ subpage.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
@ -45,26 +34,21 @@
</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" <a class="waves-effect" href="{{ page.url }}" tabindex="0">{{ page.title }}</a>
href="{{ page.url }}"
tabindex="0">{{ page.title }}</a>
{% else %} {% else %}
<li> <li>
<a class="collapsible-header waves-effect" <a class="collapsible-header waves-effect" data-target="collapse_{{page.id}}">{{ page.title }}<i class="material-icons right">arrow_drop_down</i>
data-target="collapse_{{page.id}}">{{ page.title }}<i class="material-icons right">arrow_drop_down</i></a> </a>
<div class="collapsible-body" <div class="collapsible-body" id="collapse_{{page.id}}">
id="collapse_{{page.id}}">
<ul> <ul>
{% for subpage in pages(page.id) %} {% for subpage in pages(page.id) %}
<li> <li>
<a class="waves-effect" <a class="waves-effect" href="{{ subpage.url }}">{{ subpage.title }}</a>
href="{{ subpage.url }}">{{ subpage.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
@ -74,4 +58,4 @@
</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
## ##