-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
120 lines (120 loc) · 3.6 KB
/
index.html
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/gh/eunchurn/nanumsquareneo@0.0.6/nanumsquareneo.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/gh/eunchurn/nanumsquareneo@0.0.6/nanumsquareneovar.css"
/>
<style>
body {
font-family: "NanumSquareNeo";
}
p {
margin: 7px;
}
.light {
font-weight: 100;
}
.regular {
font-weight: 300;
}
.bold {
font-weight: 500;
}
.extra-bold {
font-weight: 700;
}
.heavy {
font-weight: 800;
}
.variable {
font-family: "NanumSquareNeoVar";
font-weight: var(--text-weight);
font-variation-settings: "wght" var(--text-weight);
}
.slider {
width: 40%;
}
</style>
</head>
<body class="container">
<h3>Light: 100</h3>
<p class="light">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<h3>Regular: 300</h3>
<p class="regular">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<h3>Bold: 500</h3>
<p class="bold">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<h3>ExtraBold: 600</h3>
<p class="extra-bold">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<h3>Heavy: 700</h3>
<p class="heavy">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<h3>Variable Font</h3>
<div class="slider-container">
<div class="slider-controls">
<label for="text-weight" class="slider-label">
Weight: <span class="output" data-index="0"></span>
</label>
</div>
<input
type="range"
min="100"
max="900"
value="300"
class="slider"
id="text-weight"
name="text-weight"
data-index="0"
/>
</div>
<p class="variable">
숫자 1234567980 영문 QWERTYUIOPASDFGHJKLZXCVBNM
qwertyuioopasdfghjklzxcvbnm<br />
다람쥐 헌 쳇바퀴에 타고파!! The Quick Brown Fox Jumps Over The Lazy Dog ..
</p>
<script>
const container = document.querySelector(".container");
const sliders = document.querySelectorAll(".slider");
const sliderValues = document.querySelectorAll(".output");
sliders.forEach((slider) => {
const sliderIndex = slider.getAttribute("data-index");
const output = document.querySelector(
`.output[data-index="${sliderIndex}"]`
);
slider.oninput = function () {
container.style.setProperty(`--${this.id}`, this.value);
output.innerHTML = this.value;
};
});
</script>
</body>
</html>