Startup
This commit is contained in:
@@ -4,24 +4,17 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{{ 'site.name'|trans }}{% endblock %}</title>
|
||||
{% block stylesheets %}{% endblock %}
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
{% set pathinfo = app.request.pathinfo %}
|
||||
{% set is_nl = pathinfo starts with '/nl' %}
|
||||
<a href="{{ is_nl ? '/nl' : '/' }}">{{ 'nav.home'|trans }}</a> |
|
||||
<a href="{{ is_nl ? '/nl/game' : '/game' }}">{{ 'nav.game'|trans }}</a>
|
||||
<span style="margin-left:1rem">
|
||||
{# Language switcher: URL prefix strategy. Our routes have localized prefixes: en (no prefix), nl (/nl). #}
|
||||
{% set pathinfo = app.request.pathinfo %}
|
||||
{% set is_nl = pathinfo starts with '/nl' %}
|
||||
{% set en_url = is_nl ? pathinfo|slice(3) : pathinfo %}
|
||||
{% set nl_url = is_nl ? pathinfo : '/nl' ~ pathinfo %}
|
||||
<a href="{{ en_url ?: '/' }}">EN</a> /
|
||||
<a href="{{ nl_url }}">NL</a>
|
||||
</span>
|
||||
<a href="/">{{ 'nav.home'|trans }}</a> |
|
||||
<a href="/game">{{ 'nav.game'|trans }}</a>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
@@ -30,6 +23,8 @@
|
||||
<footer>
|
||||
<small>© {{ "now"|date("Y") }} {{ 'site.name'|trans }}</small>
|
||||
</footer>
|
||||
{% block javascripts %}{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
22
templates/game/hub/index.html.twig
Normal file
22
templates/game/hub/index.html.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'game.title'|trans({'%site%': ('site.name'|trans)}) }}{% endblock %}
|
||||
|
||||
{# Include Game1-specific CSS in addition to the base app assets #}
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('game1') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ 'game.h1'|trans }}</h1>
|
||||
<p>{{ 'game.description'|trans }}</p>
|
||||
<div class="game1-banner">Game 1 assets are active. Enjoy the challenge!</div>
|
||||
<p><a href="{{ path('website_home') }}">{{ 'link.back_to_website'|trans }}</a></p>
|
||||
{% endblock %}
|
||||
|
||||
{# Include Game1-specific JS in addition to the base app assets #}
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('game1') }}
|
||||
{% endblock %}
|
||||
9
templates/website/home/index.html.twig
Normal file
9
templates/website/home/index.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'home.title'|trans({'%site%': ('site.name'|trans)}) }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{ 'home.h1'|trans({'%site%': ('site.name'|trans)}) }}</h1>
|
||||
<p>{{ 'home.description'|trans }}</p>
|
||||
<p><a href="{{ path('game_hub') }}">{{ 'link.enter_game'|trans }}</a></p>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user