Skip to content

Commit b5ea5a3

Browse files
Ivan SemochkinIvan Semochkin
Ivan Semochkin
authored and
Ivan Semochkin
committedJan 19, 2024
update colors, update layout
1 parent 7c5b3ed commit b5ea5a3

File tree

4 files changed

+62
-24
lines changed

4 files changed

+62
-24
lines changed
 

‎src/app.css

+13-6
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,24 @@ body {
141141

142142
--bg-start: #7084E9;
143143

144-
--bg-end: #E39B48;
144+
/* --bg-end: #E39B48; */
145+
--bg-end: #D39246;
145146

146-
--bg-visited: #4D368F;
147+
/* --bg-visited: #4D368F; */
148+
--bg-visited: #48368F;
147149

148-
--bg-path: #5568CD;
150+
/* --bg-path: #5568CD; */
151+
--bg-path: #5C71DA;
149152

150-
--bg-wall: #D0424B;
153+
/* --bg-wall: #D0424B; */
154+
--bg-wall: #8E3C41;
151155

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;
153160
--bg-weight-2: #56A73B;
154-
--bg-weight-3: #74C358;
161+
--bg-weight-3: #74C358; */
155162

156163
--bg-weight-tool: var(--bg-weight-2);
157164
--bg-wall-tool: var(--bg-wall);

‎src/lib/Components/AlgoSelect.svelte

+25-14
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { layout } from '$lib/stores/layout';
77
import { player } from '$lib/stores/player';
88
import { grid } from '$lib/stores/grid';
9+
import Border from './Border.svelte';
910
1011
let isOpen = false;
1112
@@ -19,23 +20,30 @@
1920
player.reset();
2021
grid.reset($layout.screen);
2122
};
23+
24+
// <div class="current">
25+
// {displayNames[$selectedAlgorithm]}
26+
// </div>
2227
</script>
2328

24-
<div class="wrapper" on:pointerdown={setIsOpen}>
25-
<div class="current">
29+
<Border>
30+
<div class="wrapper" on:pointerdown={setIsOpen}>
2631
{displayNames[$selectedAlgorithm]}
27-
</div>
2832

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>
3947

4048
<style>
4149
.wrapper {
@@ -49,10 +57,13 @@
4957
font-size: 24px;
5058
color: white;
5159
position: relative;
52-
border-bottom: 2px solid var(--bg-tool-border);
5360
font-weight: bold;
5461
}
5562
63+
.current {
64+
border-bottom: 2px solid var(--bg-tool-border);
65+
}
66+
5667
ul {
5768
z-index: 2;
5869
position: absolute;

‎src/lib/Components/Border.svelte

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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>

‎src/lib/Components/Tools/Tool.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
align-items: center;
2626
justify-content: center;
2727
position: relative;
28-
opacity: 0.5;
28+
opacity: 0.7;
2929
}
3030
3131
.border {
3232
position: absolute;
3333
transition: 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
3434
background-color: var(--bg-tool-border);
35-
height: 3px;
36-
width: 10px;
37-
bottom: 0;
35+
height: 2px;
36+
width: 30%;
37+
bottom: 10px;
3838
}
3939
4040
.border.selected {

0 commit comments

Comments
 (0)
Please sign in to comment.