www: Add version tag to footer
This commit is contained in:
parent
3ca0abe147
commit
9d4f6ffd8c
|
@ -4,6 +4,7 @@
|
||||||
"@symfony/stimulus-bridge": "^3.2.0",
|
"@symfony/stimulus-bridge": "^3.2.0",
|
||||||
"@symfony/webpack-encore": "^3.0.0",
|
"@symfony/webpack-encore": "^3.0.0",
|
||||||
"core-js": "^3.23.0",
|
"core-js": "^3.23.0",
|
||||||
|
"git-revision-webpack-plugin": "^5.0.0",
|
||||||
"regenerator-runtime": "^0.13.9",
|
"regenerator-runtime": "^0.13.9",
|
||||||
"webpack-notifier": "^1.15.0"
|
"webpack-notifier": "^1.15.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{% block content %}
|
||||||
|
<h2>{{ "Disk usage"|trans }}</h2>
|
||||||
|
<div class="disk">
|
||||||
|
<span class="disk-device">
|
||||||
|
{{ disk.device }}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{ disk.usage }}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{ disk.available }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -9,4 +9,7 @@
|
||||||
</span>
|
</span>
|
||||||
<a href="https://samuel.ortion.fr/">Samuel ORTION</a>
|
<a href="https://samuel.ortion.fr/">Samuel ORTION</a>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="version">
|
||||||
|
version: <span class="version-number">v</span>
|
||||||
|
</p>
|
||||||
</footer>
|
</footer>
|
|
@ -1,31 +1,38 @@
|
||||||
{% extends "base.html.twig" %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>
|
<h2>
|
||||||
{% set today = "now" | date("Y-m-d") %}
|
{% set today = 'now'|date('Y-m-d') %}
|
||||||
{% if today == date %}
|
{% if today == date %}
|
||||||
{{ "Today's detected species" | trans }}
|
{{ "Today's detected species"|trans }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ "Detected species on" | trans }}
|
{{ 'Detected species on'|trans }}
|
||||||
{{ date | format_datetime("full", "none") }}
|
{{ date|format_datetime('full', 'none') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h2>
|
</h2>
|
||||||
{% set endpoint = "today" %}
|
{% set endpoint = 'today' %}
|
||||||
{% include "utils/calendar.html.twig" %}
|
{% include 'utils/calendar.html.twig' %}
|
||||||
{# Display a list of records if any, else, print message #}
|
{# Display a list of records if any, else, print message #}
|
||||||
{% if results is defined and results | length > 0 %}
|
{% if results is defined and (results|length) > 0 %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for sp in results %}
|
{% for sp in results %}
|
||||||
<li class="species">
|
<li class="species">
|
||||||
|
<span class="scientific-name">
|
||||||
|
{{ sp['scientific_name'] }}
|
||||||
|
(
|
||||||
|
</span>
|
||||||
|
<span class="common-name">{{ sp['common_name'] }}</span>)
|
||||||
|
<span class="link">
|
||||||
<a href="./species/{{ sp['taxon_id'] }}">
|
<a href="./species/{{ sp['taxon_id'] }}">
|
||||||
<span class="scientific-name">{{ sp["scientific_name"] }}
|
<i data-feather="link"></i>
|
||||||
(</span>
|
|
||||||
<span class="common-name">{{ sp["common_name"] }}</span>)
|
|
||||||
</a>
|
</a>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{{ "No species detected this day" | trans }}</p>
|
<p>
|
||||||
|
{{ 'No species detected this day'|trans }}
|
||||||
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
const Encore = require('@symfony/webpack-encore');
|
const Encore = require('@symfony/webpack-encore');
|
||||||
|
const { DefinePlugin } = require('webpack');
|
||||||
|
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
||||||
|
const gitRevisionPlugin = new GitRevisionPlugin({lightweightTags: true});
|
||||||
|
|
||||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||||
// It's useful when you use tools that rely on webpack.config.js file.
|
// It's useful when you use tools that rely on webpack.config.js file.
|
||||||
|
@ -73,6 +76,14 @@ Encore
|
||||||
|
|
||||||
// uncomment if you're having problems with a jQuery plugin
|
// uncomment if you're having problems with a jQuery plugin
|
||||||
//.autoProvidejQuery()
|
//.autoProvidejQuery()
|
||||||
;
|
|
||||||
|
.addPlugin(
|
||||||
|
new DefinePlugin(
|
||||||
|
{
|
||||||
|
VERSION: JSON.stringify(gitRevisionPlugin.version()),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;
|
||||||
|
|
||||||
module.exports = Encore.getWebpackConfig();
|
module.exports = Encore.getWebpackConfig();
|
||||||
|
|
|
@ -2365,6 +2365,11 @@ get-stream@^6.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
|
||||||
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
|
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
|
||||||
|
|
||||||
|
git-revision-webpack-plugin@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/git-revision-webpack-plugin/-/git-revision-webpack-plugin-5.0.0.tgz#0683a6a110ece618499880431cd89e1eb597b536"
|
||||||
|
integrity sha512-RptQN/4UKcEPkCBmRy8kLPo5i8MnF8+XfAgFYN9gbwmKLTLx4YHsQw726H+C5+sIGDixDkmGL3IxPA2gKo+u4w==
|
||||||
|
|
||||||
glob-parent@~5.1.2:
|
glob-parent@~5.1.2:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||||
|
|
Loading…
Reference in New Issue