mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-10 21:40:56 +00:00
feat: add filedrop to dashboard
This commit is contained in:
parent
090abd090d
commit
2104362b32
1 changed files with 36 additions and 30 deletions
|
|
@ -5,6 +5,8 @@
|
|||
export let filetype: 'PDF' | 'ZIP';
|
||||
export let filesize: string;
|
||||
|
||||
import FileDrop from 'filedrop-svelte';
|
||||
|
||||
let dashAnimationProgress = 0;
|
||||
let dashAnimationInterval: NodeJS.Timer;
|
||||
|
||||
|
|
@ -20,7 +22,6 @@
|
|||
const dashAnimationStop = () => {
|
||||
clearInterval(dashAnimationInterval);
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<div class="card uploadCard">
|
||||
|
|
@ -30,6 +31,8 @@
|
|||
<FileType {filetype} {filesize} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 mt-6">
|
||||
<FileDrop on:filedrop={null} on:filedragenter={dashAnimationStart} on:filedragleave={dashAnimationStop}>
|
||||
<div
|
||||
class="drag group"
|
||||
on:mouseenter={dashAnimationStart}
|
||||
|
|
@ -39,6 +42,8 @@
|
|||
<span class="text-[#406280]">Sem přetáhněte,</span>
|
||||
<span class="text-sspsGray">nebo nahrajte svůj motivační dopis</span>
|
||||
</div>
|
||||
</FileDrop>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
@ -48,22 +53,23 @@
|
|||
|
||||
@apply bg-[#f8fbfc];
|
||||
@apply rounded-3xl;
|
||||
@apply px-7 py-10;
|
||||
@apply px-7 py-7;
|
||||
}
|
||||
.card h3 {
|
||||
@apply text-sspsBlue text-2xl xl:text-4xl font-semibold;
|
||||
}
|
||||
.card span {
|
||||
@apply opacity-60 text-sm;
|
||||
@apply transition-all duration-300
|
||||
@apply transition-all duration-300;
|
||||
}
|
||||
.card .drag {
|
||||
@apply transition duration-200;
|
||||
@apply flex-grow;
|
||||
@apply min-h-full;
|
||||
@apply flex flex-col items-center justify-center;
|
||||
@apply mt-10;
|
||||
|
||||
border-radius: 9px;
|
||||
|
||||
/* TODO: Fix this hack */
|
||||
@apply p-10 sm:p-20 md:p-0;
|
||||
}
|
||||
.card .drag:hover span {
|
||||
@apply opacity-100;
|
||||
|
|
|
|||
Loading…
Reference in a new issue