forked from PuruVJ/macos-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDock.svelte
More file actions
86 lines (62 loc) · 1.55 KB
/
Dock.svelte
File metadata and controls
86 lines (62 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<script lang="ts">
import { appsConfig } from '__/data/apps/apps-config';
import DockItem from './DockItem.svelte';
let mouseX: number | null = null;
</script>
<section class="dock-container">
<div
class="dock-el"
on:mousemove={(event) => (mouseX = event.x)}
on:mouseleave={() => (mouseX = null)}
>
{#each Object.entries(appsConfig) as [appID, config]}
{#if config.dockBreaksBefore}
<div class="divider" aria-hidden="true" />
{/if}
<DockItem {mouseX} {appID} />
{/each}
</div>
</section>
<style lang="scss">
.dock-container {
margin-bottom: 0.3rem;
left: 0;
bottom: 0;
z-index: 9900;
position: fixed;
width: 100%;
height: 5.2rem;
padding: 0.4rem;
display: flex;
justify-content: center;
}
.dock-el {
background-color: hsla(var(--app-color-light-hsl), 0.4);
box-shadow: inset 0 0 0 0.2px hsla(var(--app-color-grey-100-hsl), 0.7),
0 0 0 0.2px hsla(var(--app-color-grey-900-hsl), 0.7), hsla(0, 0%, 0%, 0.3) 2px 5px 19px 7px;
position: relative;
padding: 0.3rem;
border-radius: 1.2rem;
height: 100%;
display: flex;
align-items: flex-end;
&::before {
content: '';
border-radius: 20px;
width: 100%;
height: 100%;
border: inherit;
backdrop-filter: blur(10px);
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
}
.divider {
height: 100%;
width: 0.2px;
background-color: hsla(var(--app-color-dark-hsl), 0.3);
margin: 0 2px;
}
</style>