Skip to content

Commit 75297cd

Browse files
authored
chore: docs updates (#57)
* chore: use dvw/dvh for frame * chore: animate only colors * chore: pass --hos to vite for debugging * chore: fix frame height && adjust animation * chore: fix image margins
1 parent 5805db7 commit 75297cd

File tree

5 files changed

+52
-17
lines changed

5 files changed

+52
-17
lines changed

Diff for: packages/docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
7+
"dev": "vite --host",
88
"build": "tsc && vite build",
99
"preview": "vite preview"
1010
},

Diff for: packages/docs/src/dom/ExamplesSection.css

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
.ImgContainer img {
1313
height: 320px;
14+
max-width: calc(100% - 40px);
1415
margin: 0 20px;
1516
}
1617

Diff for: packages/docs/src/dom/Frame.css

+28-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
.Frame {
22
position: fixed;
3-
left: 0;
4-
top: 0;
5-
width: 100%;
6-
height: 100%;
73
box-sizing: border-box;
8-
border: 1px solid #00FFEE;
94
z-index: 999999;
105
pointer-events: none;
11-
box-shadow: inset 0px 0px 10px #00FFEE;
12-
transition: all 1s;
6+
}
7+
.Frame.top {
8+
width: 100%;
9+
height: 2px;
10+
top: 0px;
11+
left: 0px;
12+
transition: all 0.5s 0s;
13+
}
14+
.Frame.bottom {
15+
width: 100%;
16+
height: 2px;
17+
bottom: 0px;
18+
left: 0px;
19+
transition: all 0.5s 0.4s;
20+
}
21+
.Frame.left {
22+
width: 2px;
23+
height: 200%;
24+
top: 0px;
25+
left: 0px;
26+
transition: all 0.5s 0.2s;
27+
}
28+
.Frame.right {
29+
width: 2px;
30+
height: 200%;
31+
top: 0px;
32+
right: 0px;
33+
transition: all 0.5s 0.2s;
1334
}

Diff for: packages/docs/src/dom/Frame.tsx

+22-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ type Props = {
88
};
99

1010
const Frame: React.FC<Props> = (props: Props) => {
11-
const [borderColor, setBorderColor] = useState("#00FFEE");
11+
const [backgroundColor, setBorderColor] = useState("#00FFEE");
1212
const [boxShadow, setBoxShadow] = useState("inset 0 0 10px #00FFEE");
13-
const interval = props.interval || 5000;
13+
const interval = props.interval || 4000;
1414

1515
useEffect(() => {
1616
let count = 0;
@@ -25,7 +25,26 @@ const Frame: React.FC<Props> = (props: Props) => {
2525
};
2626
}, [interval]);
2727

28-
return <div className="Frame" style={{ borderColor, boxShadow }}></div>;
28+
return (
29+
<>
30+
<div
31+
className="Frame top"
32+
style={{ backgroundColor, boxShadow }}
33+
></div>
34+
<div
35+
className="Frame bottom"
36+
style={{ backgroundColor, boxShadow }}
37+
></div>
38+
<div
39+
className="Frame left"
40+
style={{ backgroundColor, boxShadow }}
41+
></div>
42+
<div
43+
className="Frame right"
44+
style={{ backgroundColor, boxShadow }}
45+
></div>
46+
</>
47+
);
2948
};
3049

3150
export default Frame;

Diff for: packages/docs/src/dom/LogoSection.css

-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,3 @@
1414
width: 1280px;
1515
max-width: 100%;
1616
}
17-
18-
@media (max-width: 768px) {
19-
.LogoSection .logo {
20-
max-width: 110%;
21-
}
22-
}

0 commit comments

Comments
 (0)