mirror of
https://github.com/YGGverse/HLState.git
synced 2026-03-31 09:05:44 +00:00
implement basic features
This commit is contained in:
parent
e8f234d4b9
commit
2071796a07
19 changed files with 389 additions and 365 deletions
38
templates/default/layout.html.twig
Normal file
38
templates/default/layout.html.twig
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block head_title_content %}{{ app.name }}{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ url('main_index') }}css/default.css?{{ app.version }}"/>
|
||||
</head>
|
||||
<body>
|
||||
{% block header_container %}
|
||||
<header>
|
||||
{% block header_content %}
|
||||
<div class="text-align-right">
|
||||
<strong>
|
||||
{{ app.name }}
|
||||
</strong>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</header>
|
||||
{% endblock %}
|
||||
{% block main_container %}
|
||||
<main>
|
||||
{% block main_content %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
{% 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>
|
||||
</small>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</footer>
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
57
templates/default/main/index.html.twig
Normal file
57
templates/default/main/index.html.twig
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{% extends 'default/layout.html.twig' %}
|
||||
{% block main_content %}
|
||||
{% for server in servers %}
|
||||
<div class="border-default padding-8-px margin-y-8-px">
|
||||
<h2>{{ server.info.HostName }}</h2>
|
||||
<hr />
|
||||
<h3 class="padding-y-8-px text-align-right">{{ 'Address' | trans }}</h3>
|
||||
<div>
|
||||
{{ server.host }}:{{ server.port }}
|
||||
</div>
|
||||
{% if server.alias %}
|
||||
<h3 class="padding-y-8-px text-align-right">{{ 'Aliases' | trans }}</h3>
|
||||
{% for alias in server.alias %}
|
||||
<div>
|
||||
{{ alias.host }}:{{ alias.port }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if server.info %}
|
||||
<h3 class="padding-y-8-px text-align-right">{{ 'Info' | trans }}</h3>
|
||||
<table>
|
||||
{% for key, value in server.info %}
|
||||
<tr>
|
||||
<td class="text-align-left">{{ key }}</td>
|
||||
<td class="text-align-left">{{ value }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if server.online %}
|
||||
<h3 class="padding-y-8-px text-align-right">{{ 'Online' | trans }}</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-align-left">{{ 'Name' | trans }}</th>
|
||||
<th class="text-align-center">{{ 'Frags' | trans }}</th>
|
||||
<th class="text-align-center">{{ 'Time' | trans }}</th>
|
||||
</tr>
|
||||
{% for player in server.online %}
|
||||
<tr>
|
||||
<td class="text-align-left">{{ player.Name }}</td>
|
||||
<td class="text-align-center">{{ player.Frags }}</td>
|
||||
<td class="text-align-center">
|
||||
{% if player.TimeF == '59:59' %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M5.68 5.792 7.345 7.75 5.681 9.708a2.75 2.75 0 1 1 0-3.916ZM8 6.978 6.416 5.113l-.014-.015a3.75 3.75 0 1 0 0 5.304l.014-.015L8 8.522l1.584 1.865.014.015a3.75 3.75 0 1 0 0-5.304l-.014.015zm.656.772 1.663-1.958a2.75 2.75 0 1 1 0 3.916z"/>
|
||||
</svg>
|
||||
{% else %}
|
||||
{{ player.TimeF }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue