diff --git a/src/server.rs b/src/server.rs index b32a360..112fa8b 100644 --- a/src/server.rs +++ b/src/server.rs @@ -96,6 +96,7 @@ pub async fn start_server( password: hasher.finalize()[..].try_into().unwrap(), price: query.price, pubkey: (!query.pubkey.is_empty()).then_some(query.pubkey), + quantity: query.quantity, time: 0, title: query.title, }) @@ -204,6 +205,7 @@ struct NewAdQuery { price: String, psw: String, pubkey: String, + quantity: String, title: String, } @@ -228,6 +230,7 @@ struct Ad { password: PasswordHash, price: String, pubkey: Option, + quantity: String, time: u64, title: String, } diff --git a/src/static_files.rs b/src/static_files.rs index e12d2be..a7844e6 100644 --- a/src/static_files.rs +++ b/src/static_files.rs @@ -6,6 +6,8 @@ static STATIC_FILES: &'static [(&str, &[u8])] = &[ ("standgm.png", include_bytes!("../static/standgm.png")), ("banner.jpg", include_bytes!("../static/banner.jpg")), ("icon.png", include_bytes!("../static/icon.png")), + ("Karma-Bold.otf", include_bytes!("../static/Karma-Bold.otf")), + ("LinBiolinum_R.otf", include_bytes!("../static/LinBiolinum_R.otf")), ]; pub fn init_static_files(dir: &Path) { diff --git a/static/Karma-Bold.otf b/static/Karma-Bold.otf new file mode 100644 index 0000000..5373d2c Binary files /dev/null and b/static/Karma-Bold.otf differ diff --git a/static/LinBiolinum_R.otf b/static/LinBiolinum_R.otf new file mode 100644 index 0000000..ada5880 Binary files /dev/null and b/static/LinBiolinum_R.otf differ diff --git a/static/style1.css b/static/style1.css index 424221f..c11ac4c 100644 --- a/static/style1.css +++ b/static/style1.css @@ -1,7 +1,24 @@ +@font-face { + font-family: "Karma"; + src: url("/static/Karma-Bold.otf"); + font-weight: bold; +} + +@font-face { + font-family: "LinBiolinum"; + src: url("/static/LinBiolinum_R.otf"); +} + html, body { width: 100%; margin: 0; padding: 0; + font-family: "LinBiolinum"; + font-size: 110%; +} + +h1, h2, h3, h4 { + font-family: "Karma"; } #banner { @@ -22,6 +39,10 @@ html, body { color: #800000; } +#ads { + width: 100%; +} + .center { padding: 4px; } @@ -32,3 +53,12 @@ html, body { margin: auto; } } + +table { + border-collapse: collapse; +} + +td { + padding: 2px; + border: 1px solid #666; +} diff --git a/templates/index.html b/templates/index.html index 8de3fe5..637d98a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -28,21 +28,23 @@

Merci de ne pas encore utiliser ce site pour de vrais événements !

- +
- + {{#each ads}} - + + {{/each}}
AnnoncePrixVendeur
AnnonceQuantitéPrixVendeur
{{this.ad.title}}{{this.ad.quantity}} {{this.ad.price}} {{#if this.ad.pubkey}}
{{this.ad.author}}
{{this.ad.pubkey}}
{{else}}{{this.ad.author}}{{/if}}
+
@@ -52,6 +54,7 @@
+
Marché @@ -61,6 +64,8 @@ Nouvelle annonce
+ +

@@ -68,13 +73,16 @@
- Le mot de passe sera demandé pour modifier ou supprimer l'annonce.
+
+ Le mot de passe sera demandé pour modifier ou supprimer l'annonce.

+

Toutes les questions techniques ont leur place sur le forum.

+

Code source sous licence GNU AGPL v3. 🦀 Écrit en Rust. Images de Attilax.
CopyLeft 2020 Pascal Engélibert