Affichage du numéro de version et lien vers changelog
This commit is contained in:
+20
-1
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
|
||||
import dash_bootstrap_components as dbc
|
||||
import tomllib
|
||||
from dash import Dash, dcc, html, page_container, page_registry
|
||||
from dotenv import load_dotenv
|
||||
from flask import send_from_directory
|
||||
@@ -32,6 +33,11 @@ logging.basicConfig(
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
|
||||
with open("./pyproject.toml", "rb") as f:
|
||||
pyproject = tomllib.load(f)
|
||||
version = "v" + pyproject["project"]["version"]
|
||||
|
||||
|
||||
app.index_string = """
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
@@ -70,7 +76,20 @@ app.layout = html.Div(
|
||||
[
|
||||
html.Div(
|
||||
[
|
||||
html.H1("decp.info"),
|
||||
html.Div(
|
||||
[
|
||||
html.A(children=html.H1("decp.info"), href="/"),
|
||||
html.P(
|
||||
children=html.A(
|
||||
version,
|
||||
href="https://github.com/ColinMaudry/decp.info?tab=readme-ov-file#notes-de-version",
|
||||
target="_blank",
|
||||
),
|
||||
className="version",
|
||||
),
|
||||
],
|
||||
className="logo",
|
||||
),
|
||||
html.Div(
|
||||
[
|
||||
dcc.Link(
|
||||
|
||||
+25
-5
@@ -26,6 +26,31 @@ details > div {
|
||||
padding-top: 24px;
|
||||
}
|
||||
|
||||
/* Logo et version */
|
||||
|
||||
div.logo {
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
p.version {
|
||||
float: left;
|
||||
margin-top: 21px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
p.version > a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.logo h1 {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.logo > a {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Réduire la taille du texte de la colonne Objet */
|
||||
|
||||
td[data-dash-column="objet"] {
|
||||
@@ -133,11 +158,6 @@ a.nav {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
.navbar.h1 {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 36px 0 24px 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user