Multiple backgrounds
This commit is contained in:
parent
296ec44fe4
commit
aa1893feb2
|
@ -1 +1,8 @@
|
||||||
hard_tabs = true
|
hard_tabs = true
|
||||||
|
newline_style = "unix"
|
||||||
|
|
||||||
|
unstable_features = true
|
||||||
|
format_code_in_doc_comments = true
|
||||||
|
format_macro_bodies = true
|
||||||
|
format_macro_matchers = true
|
||||||
|
format_strings = true
|
||||||
|
|
192
src/server.rs
192
src/server.rs
|
@ -160,12 +160,7 @@ async fn serve_index<'a>(
|
||||||
.render(
|
.render(
|
||||||
"index.html",
|
"index.html",
|
||||||
&IndexTemplate {
|
&IndexTemplate {
|
||||||
common: CommonTemplate {
|
common: CommonTemplate::new(&config, errors),
|
||||||
lang: "fr",
|
|
||||||
root_url: &config.root_url,
|
|
||||||
title: &config.title,
|
|
||||||
errors,
|
|
||||||
},
|
|
||||||
ads: &to_json(
|
ads: &to_json(
|
||||||
dbs.ad_by_group
|
dbs.ad_by_group
|
||||||
.scan_prefix(ROOT_GROUP_ID)
|
.scan_prefix(ROOT_GROUP_ID)
|
||||||
|
@ -209,70 +204,73 @@ async fn serve_group<'a>(
|
||||||
) -> tide::Result<tide::Response> {
|
) -> tide::Result<tide::Response> {
|
||||||
if let Ok(group_name) = req.param("group") {
|
if let Ok(group_name) = req.param("group") {
|
||||||
if let Some(group_id) = dbs.group_by_name.get(group_name).unwrap() {
|
if let Some(group_id) = dbs.group_by_name.get(group_name).unwrap() {
|
||||||
let selected_ad = req.param("ad").ok();
|
if let Some(group) = dbs.group.get(&group_id).unwrap() {
|
||||||
|
if let Ok(group) = bincode::deserialize::<Group>(&group) {
|
||||||
|
let selected_ad = req.param("ad").ok();
|
||||||
|
|
||||||
Ok(tide::Response::builder(200)
|
return Ok(tide::Response::builder(200)
|
||||||
.content_type(tide::http::mime::HTML)
|
.content_type(tide::http::mime::HTML)
|
||||||
.body(
|
.body(
|
||||||
templates
|
templates
|
||||||
.hb
|
.hb
|
||||||
.render(
|
.render(
|
||||||
"group.html",
|
"group.html",
|
||||||
&GroupTemplate {
|
&GroupTemplate {
|
||||||
common: CommonTemplate {
|
common: CommonTemplate::new(&config, errors),
|
||||||
lang: "fr",
|
ads: &to_json(
|
||||||
root_url: &config.root_url,
|
dbs.ad_by_group
|
||||||
title: &config.title,
|
.scan_prefix(group_id.clone())
|
||||||
errors,
|
.filter_map(|x| {
|
||||||
},
|
let (k, ad) = x.ok()?;
|
||||||
ads: &to_json(
|
let ad_id = hex::encode(
|
||||||
dbs.ad_by_group
|
AdId::try_from(&k.as_ref()[16..32]).ok()?,
|
||||||
.scan_prefix(group_id.clone())
|
);
|
||||||
.filter_map(|x| {
|
Some(AdWithId {
|
||||||
let (k, ad) = x.ok()?;
|
ad: bincode::deserialize::<Ad>(&ad).ok()?,
|
||||||
let ad_id = hex::encode(
|
selected: selected_ad
|
||||||
AdId::try_from(&k.as_ref()[16..32]).ok()?,
|
.map_or(false, |i| i == ad_id),
|
||||||
);
|
id: ad_id,
|
||||||
Some(AdWithId {
|
})
|
||||||
ad: bincode::deserialize::<Ad>(&ad).ok()?,
|
})
|
||||||
selected: selected_ad.map_or(false, |i| i == ad_id),
|
.collect::<Vec<AdWithId>>(),
|
||||||
id: ad_id,
|
),
|
||||||
})
|
group: &to_json(group),
|
||||||
})
|
groups: &to_json(
|
||||||
.collect::<Vec<AdWithId>>(),
|
dbs.group_by_group
|
||||||
),
|
.scan_prefix(group_id)
|
||||||
groups: &to_json(
|
.keys()
|
||||||
dbs.group_by_group
|
.filter_map(|k| {
|
||||||
.scan_prefix(group_id)
|
GroupId::try_from(&k.ok()?.as_ref()[16..32])
|
||||||
.keys()
|
.ok()
|
||||||
.filter_map(|k| {
|
})
|
||||||
GroupId::try_from(&k.ok()?.as_ref()[16..32]).ok()
|
.filter_map(|subgroup_id| {
|
||||||
})
|
bincode::deserialize(
|
||||||
.filter_map(|subgroup_id| {
|
&dbs.group.get(subgroup_id).ok()??,
|
||||||
bincode::deserialize(&dbs.group.get(subgroup_id).ok()??)
|
)
|
||||||
.ok()
|
.ok()
|
||||||
})
|
})
|
||||||
.collect::<Vec<Group>>(),
|
.collect::<Vec<Group>>(),
|
||||||
),
|
),
|
||||||
new_ad_form_refill,
|
new_ad_form_refill,
|
||||||
},
|
},
|
||||||
|
)
|
||||||
|
.unwrap_or_else(|e| e.to_string()),
|
||||||
)
|
)
|
||||||
.unwrap_or_else(|e| e.to_string()),
|
.build());
|
||||||
)
|
}
|
||||||
.build())
|
}
|
||||||
} else {
|
|
||||||
serve_index(
|
|
||||||
req,
|
|
||||||
config,
|
|
||||||
templates,
|
|
||||||
dbs,
|
|
||||||
&[ErrorTemplate {
|
|
||||||
text: "Le groupe demandé n'existe pas.",
|
|
||||||
}],
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
}
|
}
|
||||||
|
serve_index(
|
||||||
|
req,
|
||||||
|
config,
|
||||||
|
templates,
|
||||||
|
dbs,
|
||||||
|
&[ErrorTemplate {
|
||||||
|
text: "Le groupe demandé n'existe pas.",
|
||||||
|
}],
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.await
|
||||||
} else {
|
} else {
|
||||||
serve_index(req, config, templates, dbs, &[], None).await
|
serve_index(req, config, templates, dbs, &[], None).await
|
||||||
}
|
}
|
||||||
|
@ -300,12 +298,7 @@ async fn serve_admin_group<'a>(
|
||||||
.render(
|
.render(
|
||||||
"admin_group.html",
|
"admin_group.html",
|
||||||
&AdminGroupTemplate {
|
&AdminGroupTemplate {
|
||||||
common: CommonTemplate {
|
common: CommonTemplate::new(&config, errors),
|
||||||
lang: "fr",
|
|
||||||
root_url: &config.root_url,
|
|
||||||
title: &config.title,
|
|
||||||
errors,
|
|
||||||
},
|
|
||||||
ads: &to_json(
|
ads: &to_json(
|
||||||
dbs.ad_by_group
|
dbs.ad_by_group
|
||||||
.scan_prefix(group_id.clone())
|
.scan_prefix(group_id.clone())
|
||||||
|
@ -380,12 +373,7 @@ async fn serve_admin<'a>(
|
||||||
.render(
|
.render(
|
||||||
"admin.html",
|
"admin.html",
|
||||||
&AdminTemplate {
|
&AdminTemplate {
|
||||||
common: CommonTemplate {
|
common: CommonTemplate::new(&config, errors),
|
||||||
lang: "fr",
|
|
||||||
root_url: &config.root_url,
|
|
||||||
title: &config.title,
|
|
||||||
errors,
|
|
||||||
},
|
|
||||||
ads: &to_json(
|
ads: &to_json(
|
||||||
dbs.ad_by_group
|
dbs.ad_by_group
|
||||||
.scan_prefix(ROOT_GROUP_ID)
|
.scan_prefix(ROOT_GROUP_ID)
|
||||||
|
@ -432,12 +420,7 @@ async fn serve_admin_login<'a>(
|
||||||
.render(
|
.render(
|
||||||
"admin_login.html",
|
"admin_login.html",
|
||||||
&AdminLoginTemplate {
|
&AdminLoginTemplate {
|
||||||
common: CommonTemplate {
|
common: CommonTemplate::new(&config, errors),
|
||||||
lang: "fr",
|
|
||||||
root_url: &config.root_url,
|
|
||||||
title: &config.title,
|
|
||||||
errors,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.unwrap_or_else(|e| e.to_string()),
|
.unwrap_or_else(|e| e.to_string()),
|
||||||
|
@ -477,24 +460,27 @@ async fn handle_new_ad(
|
||||||
} else {
|
} else {
|
||||||
Some(match format_pubkey(&query.pubkey) {
|
Some(match format_pubkey(&query.pubkey) {
|
||||||
Ok(pubkey) => pubkey,
|
Ok(pubkey) => pubkey,
|
||||||
Err(e) => return serve_index(
|
Err(e) => {
|
||||||
req,
|
return serve_index(
|
||||||
config,
|
req,
|
||||||
templates,
|
config,
|
||||||
dbs,
|
templates,
|
||||||
&[ErrorTemplate {
|
dbs,
|
||||||
text: match e {
|
&[ErrorTemplate {
|
||||||
PubkeyDecodeError::BadChecksum => {
|
text: match e {
|
||||||
"La somme de contrôle de la clé publique est incorrecte."
|
PubkeyDecodeError::BadChecksum => {
|
||||||
}
|
"La somme de contrôle de la clé publique est \
|
||||||
PubkeyDecodeError::BadFormat => {
|
incorrecte."
|
||||||
"Le format de la clé publique est incorrect."
|
}
|
||||||
}
|
PubkeyDecodeError::BadFormat => {
|
||||||
},
|
"Le format de la clé publique est incorrect."
|
||||||
}],
|
}
|
||||||
Some(query),
|
},
|
||||||
)
|
}],
|
||||||
.await,
|
Some(query),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
author: query.author,
|
author: query.author,
|
||||||
|
|
|
@ -11,9 +11,16 @@ static STATIC_FILES: &[(&str, &[u8])] = &[
|
||||||
"LinBiolinum_R.otf",
|
"LinBiolinum_R.otf",
|
||||||
include_bytes!("../static/LinBiolinum_R.otf"),
|
include_bytes!("../static/LinBiolinum_R.otf"),
|
||||||
),
|
),
|
||||||
("background.jpg", include_bytes!("../static/background.jpg")),
|
("bg0.jpg", include_bytes!("../static/bg0.jpg")),
|
||||||
|
("bg1.jpg", include_bytes!("../static/bg1.jpg")),
|
||||||
|
("bg2.jpg", include_bytes!("../static/bg2.jpg")),
|
||||||
("script1.js", include_bytes!("../static/script1.js")),
|
("script1.js", include_bytes!("../static/script1.js")),
|
||||||
];
|
];
|
||||||
|
pub static BACKGROUND_ABOUT: &[&str] = &[
|
||||||
|
"Claudia Peters, FreeImages.com",
|
||||||
|
r#"<a href="https://commons.wikimedia.org/wiki/File:Jukung_Pasar_Terapung.jpg">Muhammad Haris</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0">CC BY-SA 4.0</a>"#,
|
||||||
|
r#"<a href="https://commons.wikimedia.org/wiki/File:Municipal_Market_of_S%C3%A3o_Paulo_city.jpg">Wilfredor</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0">CC BY-SA 4.0</a>"#,
|
||||||
|
];
|
||||||
|
|
||||||
pub fn init_static_files(dir: &Path) {
|
pub fn init_static_files(dir: &Path) {
|
||||||
let dir = dir.join(STATIC_DIR);
|
let dir = dir.join(STATIC_DIR);
|
||||||
|
@ -27,3 +34,9 @@ pub fn init_static_files(dir: &Path) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_background() -> usize {
|
||||||
|
std::time::SystemTime::now()
|
||||||
|
.duration_since(std::time::UNIX_EPOCH)
|
||||||
|
.map_or(0, |t| t.as_secs() as usize / 86400 % 3)
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use super::queries::*;
|
use crate::{config::Config, queries::*};
|
||||||
|
|
||||||
use handlebars::Handlebars;
|
use handlebars::Handlebars;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use serde_json::value::Value as Json;
|
use serde_json::value::Value as Json;
|
||||||
use std::path::Path;
|
use std::{path::Path, sync::Arc};
|
||||||
|
|
||||||
const TEMPLATES_DIR: &str = "templates";
|
const TEMPLATES_DIR: &str = "templates";
|
||||||
static TEMPLATE_FILES: &[(&str, &str)] = &[
|
static TEMPLATE_FILES: &[(&str, &str)] = &[
|
||||||
|
@ -57,6 +57,22 @@ pub struct CommonTemplate<'a> {
|
||||||
pub root_url: &'a str,
|
pub root_url: &'a str,
|
||||||
pub title: &'a str,
|
pub title: &'a str,
|
||||||
pub errors: &'a [ErrorTemplate<'a>],
|
pub errors: &'a [ErrorTemplate<'a>],
|
||||||
|
pub bg_id: usize,
|
||||||
|
pub bg_about: &'a str,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> CommonTemplate<'a> {
|
||||||
|
pub fn new(config: &'a Arc<Config>, errors: &'a [ErrorTemplate<'a>]) -> Self {
|
||||||
|
let bg_id = crate::static_files::get_background();
|
||||||
|
Self {
|
||||||
|
lang: "fr",
|
||||||
|
root_url: &config.as_ref().root_url,
|
||||||
|
title: &config.as_ref().title,
|
||||||
|
errors,
|
||||||
|
bg_id,
|
||||||
|
bg_about: crate::static_files::BACKGROUND_ABOUT[bg_id],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
|
@ -82,12 +98,12 @@ pub struct AdminTemplate<'a> {
|
||||||
pub groups: &'a Json,
|
pub groups: &'a Json,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO add subgroups, parent groups, title
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
pub struct GroupTemplate<'a> {
|
pub struct GroupTemplate<'a> {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub common: CommonTemplate<'a>,
|
pub common: CommonTemplate<'a>,
|
||||||
pub ads: &'a Json,
|
pub ads: &'a Json,
|
||||||
|
pub group: &'a Json,
|
||||||
pub groups: &'a Json,
|
pub groups: &'a Json,
|
||||||
pub new_ad_form_refill: Option<NewAdQuery>,
|
pub new_ad_form_refill: Option<NewAdQuery>,
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
After Width: | Height: | Size: 3.5 MiB |
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
|
@ -17,10 +17,6 @@ html, body {
|
||||||
font-size: 110%;
|
font-size: 110%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
background-image: linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0.2)), url("/static/background.jpg");
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
h1, h2, h3, h4 {
|
||||||
font-family: "Karma";
|
font-family: "Karma";
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
||||||
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
||||||
<div class="center page">
|
<div class="center page">
|
||||||
<header>
|
<header>
|
||||||
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h1>Administration – {{title}}</h1>
|
<h1>Administration – {{title}}</h1>
|
||||||
|
<h2>{{group.title}}</h2>
|
||||||
|
|
||||||
{{#if errors}}
|
{{#if errors}}
|
||||||
<div id="errors">
|
<div id="errors">
|
||||||
|
@ -88,7 +89,7 @@
|
||||||
|
|
||||||
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
||||||
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
||||||
Image de fond : Claudia Peters, FreeImages.com</p>
|
Image de fond : {{{bg_about}}}</p>
|
||||||
|
|
||||||
<p><a href="{{root_url}}">Accueil</a> – <a href="{{root_url}}admin/logout">Verrouiller</a></p>
|
<p><a href="{{root_url}}">Accueil</a> – <a href="{{root_url}}admin/logout">Verrouiller</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -7,14 +7,17 @@
|
||||||
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
||||||
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
||||||
<div class="center page">
|
<div class="center page">
|
||||||
<header>
|
<header>
|
||||||
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h1>{{group.title}} – Administration – {{title}}</h1>
|
<h1>Administration – {{title}}</h1>
|
||||||
|
<h2>{{group.title}}</h2>
|
||||||
|
|
||||||
|
<a href="{{root_url}}admin/g/{{group.parent}}">Groupe parent</a><br/>
|
||||||
|
|
||||||
{{#if errors}}
|
{{#if errors}}
|
||||||
<div id="errors">
|
<div id="errors">
|
||||||
|
@ -88,7 +91,7 @@
|
||||||
|
|
||||||
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
||||||
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
||||||
Image de fond : Claudia Peters, FreeImages.com</p>
|
Image de fond : {{{bg_about}}}</p>
|
||||||
|
|
||||||
<p><a href="{{root_url}}">Accueil</a> – <a href="{{root_url}}admin/logout">Verrouiller</a></p>
|
<p><a href="{{root_url}}">Accueil</a> – <a href="{{root_url}}admin/logout">Verrouiller</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<link rel="stylesheet" href="{{root_url}}static/style1.css"/>
|
<link rel="stylesheet" href="{{root_url}}static/style1.css"/>
|
||||||
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
||||||
<div class="center page">
|
<div class="center page">
|
||||||
<header>
|
<header>
|
||||||
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
||||||
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
||||||
Image de fond : Claudia Peters, FreeImages.com</p>
|
Image de fond : {{{bg_about}}}</p>
|
||||||
|
|
||||||
<p><a href="{{root_url}}">Accueil</a></p>
|
<p><a href="{{root_url}}">Accueil</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<html lang="{{lang}}">
|
<html lang="{{lang}}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>{{group-title}} | {{title}}</title>
|
<title>{{group.title}} | {{title}}</title>
|
||||||
<link rel="stylesheet" href="{{root_url}}static/style1.css"/>
|
<link rel="stylesheet" href="{{root_url}}static/style1.css"/>
|
||||||
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
||||||
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
||||||
<div class="center page">
|
<div class="center page">
|
||||||
<header>
|
<header>
|
||||||
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
||||||
|
@ -15,6 +15,9 @@
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
|
<h2>{{group.title}}</h2>
|
||||||
|
|
||||||
|
<a href="{{root_url}}admin/g/{{group.parent}}">Groupe parent</a><br/>
|
||||||
|
|
||||||
{{#if errors}}
|
{{#if errors}}
|
||||||
<div id="errors">
|
<div id="errors">
|
||||||
|
@ -100,7 +103,7 @@
|
||||||
|
|
||||||
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
||||||
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
||||||
Image de fond : Claudia Peters, FreeImages.com</p>
|
Image de fond : {{{bg_about}}}</p>
|
||||||
|
|
||||||
<p><a href="{{root_url}}admin">Administration</a></p>
|
<p><a href="{{root_url}}admin">Administration</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
<link rel="shortcut icon" href="{{root_url}}static/icon.png"/>
|
||||||
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
<script type="text/javascript" src="{{root_url}}static/script1.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body style="background-image: linear-gradient(rgba(255,255,255,0.2),rgba(255,255,255,0.2)), url('/static/bg{{bg_id}}.jpg');">
|
||||||
<div class="center page">
|
<div class="center page">
|
||||||
<header>
|
<header>
|
||||||
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
<a href="{{root_url}}"><img id="banner" alt="Bannière {{title}}" src="{{root_url}}static/banner.jpg"/></a>
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
|
<h2>{{group.title}}</h2>
|
||||||
|
|
||||||
{{#if errors}}
|
{{#if errors}}
|
||||||
<div id="errors">
|
<div id="errors">
|
||||||
|
@ -102,7 +103,7 @@
|
||||||
|
|
||||||
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
<p><a href="https://git.p2p.legal/tuxmain/gmarche-rs">Code source</a> sous licence <a href="https://www.gnu.org/licenses/licenses.html#AGPL">GNU AGPL v3</a>. 🦀 Écrit en <a href="https://www.rust-lang.org">Rust</a>. Images de Attilax.<br/>
|
||||||
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
CopyLeft 2020-2022 Pascal Engélibert<br/>
|
||||||
Image de fond : Claudia Peters, FreeImages.com</p>
|
Image de fond : {{{bg_about}}}</p>
|
||||||
|
|
||||||
<p><a href="{{root_url}}admin">Administration</a></p>
|
<p><a href="{{root_url}}admin">Administration</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue