Tidy up file list

This commit is contained in:
Justin Hawkins 2023-11-21 22:05:13 +10:30
parent d73c38ddc3
commit d51a703820
2 changed files with 18 additions and 8 deletions

View File

@ -42,15 +42,22 @@
</a>
</td>
<td>
<span x-show="item.files && item.files.length > 0">
<ul>
<template x-for="file in item.files">
<li x-text="file"></li>
</template>
</ul>
<span x-show="item.files && item.files.length == 1">
<span class="filelist" x-text="item.files[0]"></span>
</span>
<span x-data="{open: false}" x-show="item.files && item.files.length > 1">
<span x-text="item.files.length"></span> files...
<button class="pure-button button-small" @click="open = ! open" x-text="open ? 'hide' : 'show'"></button>
<div x-show="open" x-transition>
<ul class="filelist">
<template x-for="file in item.files">
<li x-text="file"></li>
</template>
</ul>
</div>
</span>
<span x-show="! item.files || item.files.length == 0"
x-text="item.url">
x-text="'fetching ' + item.url + '...'">
</span>
</td>
<td><a class="int-link" x-bind:href="item.url">&#x1F517;</a></td>

View File

@ -34,6 +34,9 @@
height: 100px;
overflow:auto;
}
.filelist {
font-size: 60%;
}
footer {
padding-top: 50px;
font-size: 30%;
@ -72,7 +75,7 @@
}
.error {
color: red;
font-size: 150%;
font-size: 120%;
}
.success {
color: green;