File tree 4 files changed +62
-24
lines changed
4 files changed +62
-24
lines changed Original file line number Diff line number Diff line change @@ -141,17 +141,24 @@ body {
141
141
142
142
--bg-start : # 7084E9 ;
143
143
144
- --bg-end : # E39B48 ;
144
+ /* --bg-end: #E39B48; */
145
+ --bg-end : # D39246 ;
145
146
146
- --bg-visited : # 4D368F ;
147
+ /* --bg-visited: #4D368F; */
148
+ --bg-visited : # 48368F ;
147
149
148
- --bg-path : # 5568CD ;
150
+ /* --bg-path: #5568CD; */
151
+ --bg-path : # 5C71DA ;
149
152
150
- --bg-wall : # D0424B ;
153
+ /* --bg-wall: #D0424B; */
154
+ --bg-wall : # 8E3C41 ;
151
155
152
- --bg-weight-1 : # 2A943B ;
156
+ --bg-weight-1 : # 3B7945 ;
157
+ --bg-weight-2 : # 449743 ;
158
+ --bg-weight-3 : # 4DAC4B ;
159
+ /* --bg-weight-1: #2A943B;
153
160
--bg-weight-2: #56A73B;
154
- --bg-weight-3 : # 74C358 ;
161
+ --bg-weight-3: #74C358; */
155
162
156
163
--bg-weight-tool : var (--bg-weight-2 );
157
164
--bg-wall-tool : var (--bg-wall );
Original file line number Diff line number Diff line change 6
6
import { layout } from ' $lib/stores/layout' ;
7
7
import { player } from ' $lib/stores/player' ;
8
8
import { grid } from ' $lib/stores/grid' ;
9
+ import Border from ' ./Border.svelte' ;
9
10
10
11
let isOpen = false ;
11
12
19
20
player .reset ();
20
21
grid .reset ($layout .screen );
21
22
};
23
+
24
+ // <div class="current">
25
+ // {displayNames[$selectedAlgorithm]}
26
+ // </div>
22
27
</script >
23
28
24
- <div class = "wrapper" on:pointerdown ={ setIsOpen } >
25
- <div class =" current " >
29
+ <Border >
30
+ <div class ="wrapper" on:pointerdown ={ setIsOpen } >
26
31
{displayNames [$selectedAlgorithm ]}
27
- </div >
28
32
29
- {#if isOpen }
30
- <ul use:pointerOutside ={{ cb : setIsOpen }}>
31
- {#each Object .entries (displayNames ) as [key, displayName]}
32
- <li class:selected ={$selectedAlgorithm === key } on:pointerdown ={() => selectAlgorithm (key )}>
33
- {displayName }
34
- </li >
35
- {/each }
36
- </ul >
37
- {/if }
38
- </div >
33
+ {#if isOpen }
34
+ <ul use:pointerOutside ={{ cb : setIsOpen }}>
35
+ {#each Object .entries (displayNames ) as [key, displayName]}
36
+ <li
37
+ class:selected ={$selectedAlgorithm === key }
38
+ on:pointerdown ={() => selectAlgorithm (key )}
39
+ >
40
+ {displayName }
41
+ </li >
42
+ {/each }
43
+ </ul >
44
+ {/if }
45
+ </div >
46
+ </Border >
39
47
40
48
<style >
41
49
.wrapper {
49
57
font-size : 24px ;
50
58
color : white ;
51
59
position : relative ;
52
- border-bottom : 2px solid var (--bg-tool-border );
53
60
font-weight : bold ;
54
61
}
55
62
63
+ .current {
64
+ border-bottom : 2px solid var (--bg-tool-border );
65
+ }
66
+
56
67
ul {
57
68
z-index : 2 ;
58
69
position : absolute ;
Original file line number Diff line number Diff line change
1
+ <div class =" wrapper" >
2
+ <slot />
3
+ <div class =" border" ></div >
4
+ </div >
5
+
6
+ <style >
7
+ .wrapper {
8
+ position : relative ;
9
+ }
10
+
11
+ .border {
12
+ position : absolute ;
13
+ transition : 0.5s cubic-bezier (0.075 , 0.82 , 0.165 , 1 );
14
+ background-color : var (--bg-tool-border );
15
+ height : 2px ;
16
+ left : 20% ;
17
+ width : 60% ;
18
+ bottom : 10px ;
19
+ }
20
+ </style >
Original file line number Diff line number Diff line change 25
25
align-items : center ;
26
26
justify-content : center ;
27
27
position : relative ;
28
- opacity : 0.5 ;
28
+ opacity : 0.7 ;
29
29
}
30
30
31
31
.border {
32
32
position : absolute ;
33
33
transition : 0.5s cubic-bezier (0.075 , 0.82 , 0.165 , 1 );
34
34
background-color : var (--bg-tool-border );
35
- height : 3 px ;
36
- width : 10 px ;
37
- bottom : 0 ;
35
+ height : 2 px ;
36
+ width : 30 % ;
37
+ bottom : 10 px ;
38
38
}
39
39
40
40
.border.selected {
You can’t perform that action at this time.
0 commit comments