New attribute "disclaimer" on downloadable files
This commit is contained in:
parent
c28ad9533b
commit
bd19d31577
6 changed files with 80 additions and 22 deletions
|
|
@ -27,12 +27,17 @@
|
|||
</CardBody>
|
||||
<ListGroup class="border-dark">
|
||||
{#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 align-items-center">
|
||||
<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">
|
||||
<Icon name="arrow-down-circle" />
|
||||
</h1>
|
||||
<div style="min-width: 0">
|
||||
<h4 class="fw-bold"><samp>{file.name}</samp></h4>
|
||||
{#if file.disclamer}
|
||||
<div class="file-disclamer text-warning">
|
||||
{file.disclamer}
|
||||
</div>
|
||||
{/if}
|
||||
<nobr>
|
||||
Taille :
|
||||
<FileSize size={file.size} />
|
||||
|
|
@ -47,3 +52,12 @@
|
|||
</ListGroup>
|
||||
</Card>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.file-disclamer {
|
||||
display: none;
|
||||
}
|
||||
:global(.list-group-item:hover .file-disclamer) {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Reference in a new issue