ui: Improve interface

This commit is contained in:
nemunaire 2024-03-18 18:33:17 +01:00
parent 26c282138e
commit 989dce2aed
4 changed files with 11 additions and 7 deletions

View file

@ -30,6 +30,7 @@ p img {
max-height: 100vh; max-height: 100vh;
} }
p:has(img) { p:has(img) {
text-indent: 0 !important;
text-align: center; text-align: center;
} }
@ -44,3 +45,6 @@ p:has(img) {
font-size: 1.3rem; font-size: 1.3rem;
font-weight: bolder; font-weight: bolder;
} }
label {
margin-bottom: 0.25rem;
}

View file

@ -15,17 +15,17 @@
</script> </script>
{#if files.length} {#if files.length}
<Card class="mb-4"> <Card class="mb-4 border-secondary">
<CardHeader class="text-light"> <CardHeader class="text-light">
<Icon name="download" /> <Icon name="download" />
Téléchargements Téléchargements
</CardHeader> </CardHeader>
<CardBody class="text-indent"> <CardBody>
<CardText class="text-danger text-justify"> <CardText class="text-danger text-justify">
<strong>Attention&nbsp;:</strong> puisqu'il s'agit de captures effectuées dans le but de découvrir si des actes malveillants ont été commis, les contenus qui sont téléchargeables <em>peuvent</em> contenir du contenu malveillant&nbsp;! <strong>Attention&nbsp;:</strong> puisqu'il s'agit de captures effectuées dans le but de découvrir si des actes malveillants ont été commis, les contenus qui sont téléchargeables <em>peuvent</em> contenir du contenu malveillant&nbsp;!
</CardText> </CardText>
</CardBody> </CardBody>
<ListGroup class="border-dark"> <ListGroup flush class="border-secondary">
{#each files as file, index} {#each files as file, index}
<ListGroupItem tag="a" href={file.path} target={(file.name.endsWith(".txt") || file.name.endsWith(".jpg") || file.name.endsWith(".png") || file.name.endsWith(".pdf"))?"_blank":"_self"} class="d-flex"> <ListGroupItem tag="a" href={file.path} target={(file.name.endsWith(".txt") || file.name.endsWith(".jpg") || file.name.endsWith(".png") || file.name.endsWith(".pdf"))?"_blank":"_self"} class="d-flex">
<h1 class="me-3"> <h1 class="me-3">

View file

@ -46,7 +46,7 @@
} }
async function openHint(hint) { async function openHint(hint) {
if (!confirm("Êtes-vous sûr de vouloir utiliser " + (hint.cost * $settings.hintCurrentCoefficient) + " points pour dévoiler cet indice ?")) { if (hint.cost * $settings.hintCurrentCoefficient > 0 && !confirm("Êtes-vous sûr de vouloir utiliser " + (hint.cost * $settings.hintCurrentCoefficient) + " points pour dévoiler cet indice ?")) {
return; return;
} }
@ -83,7 +83,7 @@
</script> </script>
{#if hints.length} {#if hints.length}
<Card class="mb-2"> <Card class="mb-2 border-info">
<CardHeader class="bg-info text-light"> <CardHeader class="bg-info text-light">
<Icon name="lightbulb-fill" /> <Icon name="lightbulb-fill" />
Indices Indices
@ -95,7 +95,7 @@
</CardText> </CardText>
</CardBody> </CardBody>
{/if} {/if}
<ListGroup> <ListGroup flush class="border-secondary">
{#each hints as hint (hint.id)} {#each hints as hint (hint.id)}
<ListGroupItem tag="a" href="{hint.file}" target="_self" class="d-flex align-items-center"> <ListGroupItem tag="a" href="{hint.file}" target="_self" class="d-flex align-items-center">
{#if hint.file} {#if hint.file}

View file

@ -29,7 +29,7 @@
<Icon name="flag-fill" /> <Icon name="flag-fill" />
Défi réussi&nbsp;! Défi réussi&nbsp;!
</CardHeader> </CardHeader>
<CardBody class="text-indent"> <CardBody>
<CardText> <CardText>
{#if exercice.solved_rank} {#if exercice.solved_rank}
Vous êtes la {exercice.solved_rank}<sup>{exercice.solved_rank==1?"re":"e"}</sup> équipe à avoir résolu ce défi à <DateFormat date={exercice.solved_time} />. Vous êtes la {exercice.solved_rank}<sup>{exercice.solved_rank==1?"re":"e"}</sup> équipe à avoir résolu ce défi à <DateFormat date={exercice.solved_time} />.