Skip to content

Commit

Permalink
Updates for Pico 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mayamcdougall committed Mar 6, 2022
1 parent 881f9a6 commit 6fc6709
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
42 changes: 24 additions & 18 deletions themes/stellar/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
{#
Pico port by Maya McDougall.
Stellar-Pico v1.0.0
Stellar-Pico v1.0.1
https://github.com/mayamcdougall/stellar-pico
#}
<html>
Expand All @@ -16,14 +16,16 @@
<body class="is-preload">

{# Show YAML Errors #}
{% for page in pages if page.meta.YAML_ParseError %}
<p style="
color: white;
text-align: center;
background-color: darkred;
margin-bottom: -25px;
text-transform: none;
">Header Error in <a href="{{ page.url }}">{{ page.id }}</a>, {{ page.meta.YAML_ParseError }}</p>
{% for page in pages(depthOffset=-1,depth=null) %}
{% if page.meta.YAML_ParseError %}
<p style="
color: white;
text-align: center;
background-color: darkred;
margin-bottom: -25px;
text-transform: none;
">Header Error in <a href="{{ page.url }}">{{ page.id }}</a>, {{ page.meta.YAML_ParseError }}</p>
{% endif %}
{% endfor %}

{# Wrapper #}
Expand All @@ -44,21 +46,25 @@
{# Nav #}
<nav id="nav">
<ul>
{% for page in pages if page.id != "index" %}
<li><a href="#{{ page.id }}" {% if loop.first %}class="active"{% endif %}>{{ page.title }}</a></li>
{% for page in pages() %}
{% if not page.hidden %}
<li><a href="#{{ page.id }}" {% if loop.first %}class="active"{% endif %}>{{ page.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>

{# Main #}
<div id="main">
{% for page in pages if page.id != "index" %}
{% if page.meta.mode in ["spotlight", "features", "statistics"] %}
{% set mode = page.meta.mode %}
{% else %}
{% set mode = "generic" %}
{% for page in pages() %}
{% if not page.hidden %}
{% if page.meta.mode in ["spotlight", "features", "statistics"] %}
{% set mode = page.meta.mode %}
{% else %}
{% set mode = "generic" %}
{% endif %}
{% include "includes/content.twig" %}
{% endif %}
{% include "includes/content.twig" %}
{% endfor %}
</div>

Expand All @@ -69,4 +75,4 @@
{% include "includes/scripts.twig" %}

</body>
</html>
</html>
6 changes: 6 additions & 0 deletions themes/stellar/pico-theme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
api_version: 3 # Use Pico's latest API version for themes

twig_config: # Twig template engine config
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
charset: utf-8 # The charset used by Twig templates

0 comments on commit 6fc6709

Please sign in to comment.