141 lines
5.4 KiB
Twig
141 lines
5.4 KiB
Twig
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
|
|
<!DOCTYPE html>
|
|
<html lang="{{ grav.language.getActive ?: grav.config.site.default_lang }}">
|
|
<head>
|
|
{% block head %}
|
|
<meta charset="utf-8" />
|
|
<title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
|
|
{% include 'partials/metadata.html.twig' %}
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png') }}" />
|
|
<link rel="canonical" href="{{ page.url(true, true) }}" />
|
|
|
|
{% block stylesheets %}
|
|
{% do assets.addCss('theme://css/pure-0.5.0/grids-min.css', 103) %}
|
|
{% do assets.addCss('theme://css-compiled/nucleus.css', 102) %}
|
|
{% do assets.addCss('theme://css-compiled/template.css', 101) %}
|
|
{% do assets.addCss('theme://css/custom.css', 100) %}
|
|
{% do assets.addCss('theme://css/font-awesome.min.css', 100) %}
|
|
{% do assets.addCss('theme://css/slidebars.min.css') %}
|
|
|
|
{% if browser.getBrowser == 'msie' and browser.getVersion == 10 %}
|
|
{% do assets.addCss('theme://css/nucleus-ie10.css') %}
|
|
{% endif %}
|
|
{% if browser.getBrowser == 'msie' and browser.getVersion >= 8 and browser.getVersion <= 9 %}
|
|
{% do assets.addCss('theme://css/nucleus-ie9.css') %}
|
|
{% do assets.addJs('theme://js/html5shiv-printshiv.min.js') %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{% do assets.addJs('jquery', 101) %}
|
|
{% do assets.addJs('theme://js/modernizr.custom.71422.js', 100) %}
|
|
{% do assets.addJs('theme://js/antimatter.js') %}
|
|
{% do assets.addJs('theme://js/slidebars.min.js') %}
|
|
{% endblock %}
|
|
|
|
{% block assets deferred %}
|
|
{{ assets.css()|raw }}
|
|
{{ assets.js()|raw }}
|
|
{% endblock %}
|
|
|
|
{% endblock head %}
|
|
</head>
|
|
<body id="top" class="{{ page.header.body_classes }}">
|
|
<div id="sb-site">
|
|
{% block header %}
|
|
|
|
<header id="header">
|
|
|
|
<div id="logo">
|
|
{% for logo in page.header.content %}
|
|
<img src='{{ page.media[logo.media_order].url|e }}' alt="{{ config.site.title }}" />
|
|
{{ dump(page.media) }}
|
|
{% endfor %}
|
|
|
|
|
|
{# marche pas
|
|
{% for image in page.header.media_order %}
|
|
{% if loop.first %}
|
|
<img src="{{ image.url}}" alt="{{ config.site.title }}"/>
|
|
{% endif %}
|
|
{% if loop.last %}
|
|
<img src="{{ image.url}}" alt="{{ config.site.title }}"/>
|
|
{% endif %}
|
|
{% endfor %}
|
|
#}
|
|
|
|
{# {% if page.header.media_order %}
|
|
<img src="{{ page.header.media_order|first }}" alt="{{ config.site.title }}"/>
|
|
{% endif %}
|
|
<img src="{{page.media[programme.logo].url|e }}" alt="logo du programme {{programme.nom_du_programme}}" />
|
|
#}
|
|
|
|
{# ça, ça marche si une seule image dans content de Home. Si 2 images, marche plus.>>>devient un tableau!
|
|
il faut trouver un moyen de lui dire: tu prends la première puis tu prends la 2e du tableau media_order.
|
|
J'ai rajouter "array: true" dans default.yaml pour qu'il voi plusieurs images. mais ne sont pas dans header. Elles apparaissent
|
|
<img src="{{ page.header.media_order }}" alt="{{ config.site.title }}"/>
|
|
#}
|
|
|
|
{# <img src="EPAU_logo_EPAU_vecto-seul.svg"/>
|
|
<h3><a href="{{ base_url == '' ? '/' : base_url }}">{{ config.site.title }}</a></h3>
|
|
#}
|
|
|
|
</div>
|
|
|
|
<div id="navbar">
|
|
{% block header_extra %}{% endblock %}
|
|
{% if config.plugins.langswitcher.enabled %}
|
|
{% include 'partials/langswitcher.html.twig' %}
|
|
{% endif %}
|
|
{% block header_navigation %}
|
|
{% include 'partials/navigation.html.twig' %}
|
|
{% endblock %}
|
|
<span class="panel-activation sb-toggle-left navbar-left menu-btn fa fa-bars"></span>
|
|
</div>
|
|
</header>
|
|
|
|
{% endblock %}
|
|
|
|
{% block showcase %}{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
<section id="body" class="{{ class }}">
|
|
{% block content %}{% endblock %}
|
|
</section>
|
|
{% endblock %}
|
|
|
|
{% block footer %}
|
|
<footer id="footer">
|
|
<div class="totop">
|
|
<span><a href="#" id="toTop"><i class="fa fa-arrow-up"></i></a></span>
|
|
</div>
|
|
<p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart"></i> by <a href="http://www.rockettheme.com">RocketTheme</a>.</p>
|
|
</footer>
|
|
{% endblock %}
|
|
</div>
|
|
{% block sidebar_navigation %}
|
|
<div class="sb-slidebar sb-left sb-width-thin">
|
|
<div id="panel">
|
|
{% include 'partials/navigation.html.twig' %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block bottom %}
|
|
<script>
|
|
$(function () {
|
|
$(document).ready(function() {
|
|
$.slidebars({
|
|
hideControlClasses: true,
|
|
scrollLock: true
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{{ assets.js('bottom')|raw }}
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|