Skip to content

Commit 58738cd

Browse files
committed
added help to panel and updated css
1 parent 34f5dc5 commit 58738cd

File tree

2 files changed

+30
-37
lines changed

2 files changed

+30
-37
lines changed

src/assets/styles/panel.css

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
--tz: 288px;
2020
}
2121

22-
.panel-main {
22+
.container__panel {
2323
display: grid;
2424
grid-template-areas: "option" "panel";
2525
grid-auto-flow: row;
@@ -30,6 +30,25 @@
3030
height: calc(100dvh - 10rem);
3131
margin: 2rem;
3232
overflow: hidden;
33+
34+
35+
& .panel {
36+
width: 100%;
37+
height: 100%;
38+
position: relative;
39+
transform-style: preserve-3d;
40+
transition: transform 1s;
41+
}
42+
43+
& .scene {
44+
grid-area: panel;
45+
border: 1px solid var(--scene__border--5);
46+
width: 15rem;
47+
height: 10rem;
48+
perspective: 1000px;
49+
align-self: center;
50+
justify-self: center;
51+
}
3352
}
3453

3554
.panel__options {
@@ -45,24 +64,6 @@
4564
color: var(--range__option__txt--4);
4665
}
4766

48-
.scene {
49-
grid-area: panel;
50-
border: 1px solid var(--scene__border--5);
51-
width: 15rem;
52-
height: 10rem;
53-
perspective: 1000px;
54-
align-self: center;
55-
justify-self: center;
56-
}
57-
58-
.panel {
59-
width: 100%;
60-
height: 100%;
61-
position: relative;
62-
transform-style: preserve-3d;
63-
transition: transform 1s;
64-
}
65-
6667
.panel__cell {
6768
position: absolute;
6869
height: 10rem;
@@ -269,4 +270,4 @@ input[type="range"]::-ms-fill-lower {
269270

270271
input[type="range"]::-ms-fill-upper {
271272
background-color: #9a905d;
272-
}
273+
}

src/pages/panel.astro

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
---
22
import "@/assets/styles/panel.css";
3+
import Help from "@/components/Help.astro";
34
import BaseLayout from "@/layouts/Base";
5+
import "@/assets/styles/common.css";
46
---
57

6-
<style is:inline>
7-
.tv {
8-
container-type: inline-size;
9-
container-name: main;
10-
border: 0.5rem outset pink;
11-
outline: 0.5rem solid khaki;
12-
box-shadow: 0 0 0 2rem skyblue;
13-
border-radius: 12px;
14-
font: bold 1rem sans-serif;
15-
margin-block: 5rem;
16-
margin-inline: 5rem;
17-
padding: 1rem;
18-
outline-offset: 0.5rem;
19-
}
20-
</style>
21-
228
<BaseLayout meta={{ title: "Panel" }}>
23-
<article class="tv panel-main">
9+
<Fragment slot="header-right">
10+
<Help
11+
title="Panel"
12+
description="Press any arrow key from keyboard to cycle through the letters, up/down arrows changes the orientation to vertical and left/right keys changes to horizontal or press any letter key, that letter will appears."
13+
/>
14+
</Fragment>
15+
<article class="tv container__panel">
2416
<section class="scene">
2517
<letter-panel>
2618
<div class="panel" id="panel"></div>

0 commit comments

Comments
 (0)