frontend: initial file component
This commit is contained in:
parent
ebb7edcc8b
commit
5be65229f4
3 changed files with 86 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
<label for="img-upload" class="plus round" style="height: 48px; display: inline-block;">+</label>
|
||||
<input id="img-upload" accept="image/png, image/jpeg" style="display: none" bind:files type="file"/>
|
||||
{:else}
|
||||
TODO
|
||||
<button class="file-plus rounded" onclick={handler}>Загрузить файл</button>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
|
@ -22,12 +22,30 @@
|
|||
align-content: center;
|
||||
}
|
||||
|
||||
.file-plus {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: x-large;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
align-content: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
height: 3rem;
|
||||
border: 0.15rem dashed;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.plus {
|
||||
background-color: #5C8DC0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.file-plus {
|
||||
background: none;
|
||||
border-color: #5C8DC0;
|
||||
color: #5C8DC0;
|
||||
}
|
||||
|
||||
.plus:hover {
|
||||
background-color: #567aa1;
|
||||
}
|
||||
|
@ -39,6 +57,12 @@
|
|||
color: white;
|
||||
}
|
||||
|
||||
.file-plus {
|
||||
background: none;
|
||||
border-color: #2791FF;
|
||||
color: #2791FF;
|
||||
}
|
||||
|
||||
.plus:hover {
|
||||
background-color: #2c7dd4;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue