Browse Source

init master server configuration

main
ghost 11 months ago
parent
commit
acec164041
  1. 5
      .env
  2. 1
      config/packages/twig.yaml
  3. 1
      config/services.yaml
  4. 12
      public/css/default.css
  5. 16
      templates/default/layout.html.twig

5
.env

@ -43,7 +43,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 @@ -43,7 +43,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# HLState
# Application version, used for API and media cache
APP_VERSION="1.1.0"
APP_VERSION="1.2.0"
# Application name
APP_NAME="HLState"
@ -56,6 +56,9 @@ APP_META_KEYWORDS="Half-Life, HLState, YGGverse, Servers, Stats, Online, Analyti @@ -56,6 +56,9 @@ APP_META_KEYWORDS="Half-Life, HLState, YGGverse, Servers, Stats, Online, Analyti
# Application template
APP_THEME="default"
# Masters list, server:port comma separated
APP_MASTERS=""
# Servers registry, URL or filepath
# https://github.com/YGGverse/HLServers
APP_HLSERVERS="https://raw.githubusercontent.com/YGGverse/HLServers/main/config.json"

1
config/packages/twig.yaml

@ -5,6 +5,7 @@ twig: @@ -5,6 +5,7 @@ twig:
version: '%app.version%'
name: '%app.name%'
theme: '%app.theme%'
masters: '%app.masters%'
meta:
title: '%env(APP_META_TITLE)%'
description: '%env(APP_META_DESCRIPTION)%'

1
config/services.yaml

@ -7,6 +7,7 @@ parameters: @@ -7,6 +7,7 @@ parameters:
app.version: '%env(APP_VERSION)%'
app.name: '%env(APP_NAME)%'
app.theme: '%env(APP_THEME)%'
app.masters: '%env(APP_MASTERS)%'
app.hlservers: '%env(APP_HLSERVERS)%'
app.meta.title: '%env(APP_META_TITLE)%'
app.meta.description: '%env(APP_META_DESCRIPTION)%'

12
public/css/default.css

@ -102,6 +102,8 @@ footer @@ -102,6 +102,8 @@ footer
display: block;
margin: 16px auto;
max-width: var(--container-max-width);
overflow: hidden;
position: relative;
}
/* framework */
@ -167,6 +169,16 @@ a.color-default:visited @@ -167,6 +169,16 @@ a.color-default:visited
text-align: right;
}
.float-left
{
float: left;
}
.float-right
{
float: right;
}
.border-default
{
border: 1px var(--color-default) solid;

16
templates/default/layout.html.twig

@ -31,12 +31,18 @@ @@ -31,12 +31,18 @@
{% block footer_container %}
<footer>
{% block footer_content %}
<div class="text-align-right">
<small>
{{ 'Powered by' | trans }}
<a href="https://github.com/YGGverse/HLState" target="_blank">HLState</a>
{% if app.masters %}
<small class="float-left">
<strong>{{ 'Master' | trans }}:</strong>
{% for i, master in app.masters | split(',') %}
{% if i %}&bull;{% endif %} {{ master }}
{% endfor %}
</small>
</div>
{% endif %}
<small class="float-right">
{{ 'Powered by' | trans }}
<a href="https://github.com/YGGverse/HLState" target="_blank">HLState</a>
</small>
{% endblock %}
</footer>
{% endblock %}

Loading…
Cancel
Save