77 lines
2.1 KiB
Twig
77 lines
2.1 KiB
Twig
{% extends 'layout.html.twig' %}
|
|
|
|
{% block main_title %}Linux Questionnaire{% endblock %}
|
|
|
|
{% block title %}{{ block('main_title') }}{% endblock %}
|
|
|
|
{% block stylesheets %}
|
|
{% set assets = assets|default([])|merge([
|
|
web_path ~ 'components/bootstrap/css/bootstrap.min.css',
|
|
web_path ~ 'components/bootstrap/css/bootstrap-theme.min.css',
|
|
web_path ~ 'assets/css/main.css',
|
|
]) %}
|
|
|
|
{{ parent() }}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
{% import _self as macros %}
|
|
|
|
{% macro link(url, label) %}
|
|
<li
|
|
{% if app.request.getPathInfo == url %}
|
|
class="active"
|
|
{% endif %}
|
|
>
|
|
<a href="{{ url }}">{{ label }}</a>
|
|
</li>
|
|
{% endmacro %}
|
|
|
|
<nav class="navbar navbar-inverse navbar-top" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-hader">
|
|
<ul class="nav navbar-nav">
|
|
{{ macros.link(path('homepage'), 'base.home'|trans) }}
|
|
{{ macros.link(path('distros'), 'base.distros'|trans) }}
|
|
{{ macros.link('http://francoisautin.free.fr/wikilinux/pmwiki.php', 'base.wiki'|trans) }}
|
|
</ul>
|
|
</div>
|
|
<div class="navbar-collapse collapse">
|
|
<form role="form" class="navbar-form navbar-right">
|
|
<div class="btn-group">
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
{{ ('locale.native.' ~ app.locale)|trans }} <span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu" role="menu">
|
|
{% for locale in app.locales %}
|
|
{% if locale != app.locale %}
|
|
<li>
|
|
<a
|
|
href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge({_locale: locale})) }}"
|
|
>
|
|
{{ ('locale.native.' ~ locale)|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block javascripts %}
|
|
{% set assets = assets|default([])|merge([
|
|
web_path ~ 'components/jquery/jquery.min.js',
|
|
web_path ~ 'components/bootstrap/js/bootstrap.min.js',
|
|
]) %}
|
|
|
|
{{ parent() }}
|
|
{% endblock %}
|