mirror of
https://github.com/YGGverse/HLState.git
synced 2026-03-31 17:15:39 +00:00
implement header links
This commit is contained in:
parent
7caf84a9f9
commit
13292efe29
5 changed files with 26 additions and 22 deletions
5
.env
5
.env
|
|
@ -43,7 +43,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
|||
# HLState
|
||||
|
||||
# Application version, used for API and media cache
|
||||
APP_VERSION="1.2.0"
|
||||
APP_VERSION="1.3.0"
|
||||
|
||||
# Application name
|
||||
APP_NAME="HLState"
|
||||
|
|
@ -58,3 +58,6 @@ APP_THEME="default"
|
|||
|
||||
# Masters list, server:port comma separated
|
||||
APP_MASTERS=""
|
||||
|
||||
# Links, name|url comma separated
|
||||
APP_LINKS="Game|https://store.steampowered.com/app/70/HalfLife,Xash3D|https://github.com/FWGS/xash3d-fwgs"
|
||||
|
|
@ -6,6 +6,7 @@ twig:
|
|||
name: '%app.name%'
|
||||
theme: '%app.theme%'
|
||||
masters: '%app.masters%'
|
||||
links: '%app.links%'
|
||||
meta:
|
||||
title: '%env(APP_META_TITLE)%'
|
||||
description: '%env(APP_META_DESCRIPTION)%'
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ parameters:
|
|||
app.name: '%env(APP_NAME)%'
|
||||
app.theme: '%env(APP_THEME)%'
|
||||
app.masters: '%env(APP_MASTERS)%'
|
||||
app.links: '%env(APP_LINKS)%'
|
||||
app.meta.title: '%env(APP_META_TITLE)%'
|
||||
app.meta.description: '%env(APP_META_DESCRIPTION)%'
|
||||
app.meta.keywords: '%env(APP_META_KEYWORDS)%'
|
||||
|
|
|
|||
|
|
@ -75,21 +75,10 @@ header
|
|||
display: block;
|
||||
margin: 16px auto;
|
||||
max-width: var(--container-max-width);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
header > h1
|
||||
{
|
||||
padding-right: 32px;
|
||||
}
|
||||
|
||||
header > a:first-child
|
||||
{
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
main
|
||||
{
|
||||
display: block;
|
||||
|
|
|
|||
|
|
@ -18,15 +18,25 @@
|
|||
{% block header_container %}
|
||||
<header>
|
||||
{% block header_content %}
|
||||
<a href="{{ path('main_index') }}">
|
||||
<svg version="1.1" width="20" height="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 364.707 364.707" enable-background="new 0 0 364.707 364.707" xml:space="preserve">
|
||||
<path fill="currentColor" d="M223.864,272.729l-38.608-97.848l-56.603,89.184H93.166l79.052-127.654l-8.875-25.229h-30.781V81.12h52.691l60.521,153.899l26.608-8.668l8.867,29.813L223.864,272.729z"/>
|
||||
<path fill="none" stroke="currentColor" stroke-width="34" d="M337.623,182.198c0,85.579-69.363,154.934-154.934,154.934c-85.571,0-154.936-69.354-154.936-154.934c0-85.569,69.363-154.933,154.936-154.933C268.259,27.265,337.623,96.629,337.623,182.198z"/>
|
||||
</svg>
|
||||
</a>
|
||||
<h1 class="text-align-right padding-right-36-px">
|
||||
<div class="float-left">
|
||||
{% if 'main_index' == request.get('_route') %}
|
||||
{{ 'Home' | trans }}
|
||||
{% else %}
|
||||
<a href="{{ path('main_index') }}">{{ 'Home' | trans }}</a>
|
||||
{% endif %}
|
||||
{% for link in app.links | split(',') %}
|
||||
{% set a = link | split('|') %}
|
||||
{% if a.0 is defined and a.1 is defined %}
|
||||
•
|
||||
<a href="{{ a.1 }}" target="_blank">{{ a.0 }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<strong>
|
||||
{{ app.name }}
|
||||
</h1>
|
||||
</strong>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue