Revert "Default theme: Move elements into Twig blocks"

This reverts commit a3fa373119.

At first glance this adds flexibility, but at the moment it is impossible with Twig to ensure the existance of a block. As a result, custom themes may break the plugin. A custom theme should overwrite a plugin's template explicitly.
This commit is contained in:
Daniel Rudolf 2016-03-12 00:18:49 +01:00
parent 3d11b8a979
commit d56d3f8c8c

View file

@ -1,67 +1,51 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js"> <html lang="en" class="no-js">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
{% block documentHeader %} <title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
<title>{% block title %}{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}{% endblock %}</title> {% if meta.description %}
{% if meta.description %} <meta name="description" content="{{ meta.description|striptags }}">
<meta name="description" content="{{ meta.description|striptags }}"> {% endif %}{% if meta.robots %}
{% endif %}{% if meta.robots %} <meta name="robots" content="{{ meta.robots }}">
<meta name="robots" content="{{ meta.robots }}"> {% endif %}
{% endif %}
{% endblock %}
{% block stylesheets %} <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" /> <link rel="stylesheet" href="{{ theme_url }}/style.css" type="text/css" />
<link rel="stylesheet" href="{{ theme_url }}/style.css" type="text/css" />
{% endblock %}
{% block javascript %} <script src="{{ theme_url }}/scripts/modernizr-2.6.1.min.js"></script>
<script src="{{ theme_url }}/scripts/modernizr-2.6.1.min.js"></script>
{% endblock %}
</head> </head>
<body> <body>
{% block pageHeader %} <header id="header">
<header id="header"> <div class="inner clearfix">
<div class="inner clearfix"> <h1><a href="{{ "index"|link }}" id="logo">{{ site_title }}</a></h1>
<h1><a href="{{ "index"|link }}" id="logo">{{ site_title }}</a></h1> <nav>
{% block header %} <a href="#" class="menu-icon"></a>
<nav> <ul>
<a href="#" class="menu-icon"></a> {% for page in pages if page.title %}
<ul> <li{% if page.id == current_page.id %} class="active"{% endif %}>
{% for page in pages if page.title %} <a href="{{ page.url }}">{{ page.title }}</a>
<li{% if page.id == current_page.id %} class="active"{% endif %}> </li>
<a href="{{ page.url }}">{{ page.title }}</a> {% endfor %}
</li> </ul>
{% endfor %} </nav>
</ul> </div>
</nav> </header>
{% endblock %}
</div>
</header>
{% endblock %}
{% block pageContent %} <section id="content">
<section id="content"> <div class="inner">
<div class="inner"> {{ content }}
{% block content content %} </div>
</div> </section>
</section>
{% endblock %}
{% block pageFooter %} <footer id="footer">
<footer id="footer"> <div class="inner">
<div class="inner"> <a href="http://picocms.org/">Pico</a> was made by <a href="http://gilbert.pellegrom.me">Gilbert Pellegrom</a>
{% block footer %} and is maintained by <a href="https://github.com/picocms/Pico/graphs/contributors">The Pico Community</a>.
<a href="http://picocms.org/">Pico</a> was made by <a href="http://gilbert.pellegrom.me">Gilbert Pellegrom</a> Released under the <a href="https://github.com/picocms/Pico/blob/master/LICENSE.md">MIT license</a>.
and is maintained by <a href="https://github.com/picocms/Pico/graphs/contributors">The Pico Community</a>. </div>
Released under the <a href="https://github.com/picocms/Pico/blob/master/LICENSE.md">MIT license</a>. </footer>
{% endblock %}
</div>
</footer>
{% endblock %}
</body> </body>
</html> </html>