Fonts, quantity, table style
This commit is contained in:
parent
4f23d6c860
commit
bb0ce10c16
|
@ -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<String>,
|
||||
quantity: String,
|
||||
time: u64,
|
||||
title: String,
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -28,21 +28,23 @@
|
|||
<p>⚠ <strong>Merci de ne pas encore utiliser ce site pour de vrais événements !</strong></p>
|
||||
|
||||
<form method="post">
|
||||
<table border="1">
|
||||
<table id="ads">
|
||||
<thead>
|
||||
<tr><td></td><td>Annonce</td><td>Prix</td><td>Vendeur</td></tr>
|
||||
<tr><td></td><td>Annonce</td><td>Quantité</td><td>Prix</td><td>Vendeur</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each ads}}
|
||||
<tr>
|
||||
<td><input type="radio" name="ad" value="{{this.id}}"/></td>
|
||||
<td><input type="radio" name="ad" value="{{this.id}}" required/></td>
|
||||
<td>{{this.ad.title}}</td>
|
||||
<td>{{this.ad.quantity}}</td>
|
||||
<td>{{this.ad.price}}</td>
|
||||
<td>{{#if this.ad.pubkey}}<details><summary>{{this.ad.author}}</summary><br/>{{this.ad.pubkey}}</details>{{else}}{{this.ad.author}}{{/if}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
<input type="hidden" name="a" value="rm_ad" autocomplete="off"/>
|
||||
<fieldset>
|
||||
|
@ -52,6 +54,7 @@
|
|||
<input type="submit" value="Supprimer"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
<img id="stand" alt="Marché" src="/static/standgm.png"/>
|
||||
|
||||
|
@ -61,6 +64,8 @@
|
|||
<legend>Nouvelle annonce</legend>
|
||||
<label for="f_new_title">Titre :</label>
|
||||
<input type="text" id="f_new_title" name="title" placeholder="Carottes" required/><br/>
|
||||
<label for="f_new_quantity">Quantité :</label>
|
||||
<input type="text" id="f_new_quantity" name="quantity" placeholder="10 kg" required/><br/>
|
||||
<label for="f_new_price">Prix :</label>
|
||||
<input type="text" id="f_new_price" name="price" placeholder="42 DU/kg" required/><br/>
|
||||
<label for="f_new_author">Votre nom :</label>
|
||||
|
@ -68,13 +73,16 @@
|
|||
<label for="f_new_pubkey">Clé publique :</label>
|
||||
<input type="text" id="f_new_pubkey" name="pubkey"/><br/>
|
||||
<label for="f_new_psw">Mot de passe :</label>
|
||||
<input type="text" id="f_new_psw" name="psw"/><span>Le mot de passe sera demandé pour modifier ou supprimer l'annonce.</span><br/>
|
||||
<input type="text" id="f_new_psw" name="psw"/><br/>
|
||||
<span>Le mot de passe sera demandé pour modifier ou supprimer l'annonce.</span><br/>
|
||||
<input type="submit" value="Publier"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<hr style="clear: both;"/>
|
||||
|
||||
<p><a href="https://forum.duniter.org">Toutes les questions techniques ont leur place sur le forum.</a></p>
|
||||
|
||||
<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 Pascal Engélibert</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue