-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFontInc_InsertTemplate.html
299 lines (250 loc) · 13.7 KB
/
FontInc_InsertTemplate.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./content.css">
<link rel="stylesheet" href="./fontFacePage.css">
<link rel="stylesheet" href="./diplaySectionStyle.css">
<link rel="stylesheet" href="./headingSection.css">
</head>
<body>
<div class="listoffonts">
<button class="myfonts" onclick="viewFunc('henryDisplay')">henry</button>
<button class="myfonts" onclick="viewFunc('anydoreDisplay')">anydore</button>
<button class="myfonts" onclick="viewFunc('leonard')">lastone</button>
</div>
<input id="searchbar" style="width:200px; height:30px; " type="search" >
<section id="displaySectionID" class="displaySection">
<div id="henryDisplay" class="p0001">
<br>
<p class="title">Henri Diddiot</p>
<p>Henry Diddot Regular</p> <button class="sidebuttons">Download bjbj</button>
</div>
<div id="leonard" class="p0001">
<br>
<p class="title">jaguar</p>
<p>Anydore Regular</p> <button class="sidebuttons">Download Only</button>
<br>
<p class="title">Anydore</p>
<p>Anydore Regular</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<p>Anydore Bold</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<p>Anydore Italics</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<img style="width: 10cm; height: 120px; display: inline; align-content: center; justify-content: center;" src="./images/flower.jpg" alt="">
<ul>
<button><a href="#anydorePreviewSection">Preview</a></button>
<button><a href="./ads.html">Use link</a></button>
<button><a href="#anydoreAboutSection">About & liscence</a></button>
<button><a href="">Download Family</a></button>
</ul>
<section id="anydorePreviewSection" class="PreviewSection">
<hr style="width: 100%; margin-left: -8px; padding: 0;">
<span class="Previewheading">Preview</span>
<ul>
<label for="fontselection">Font Type :</label>
<select onchange="onchangeFontType('typesofthefontan','showtextdivIDAn')" name="fontselection" id="typesofthefontan">
<option value="Regular">Regular</option>
<option value="Thin">Thin</option>
<option value="Bold">Bold</option>
<option value="Italics">Italics</option>
</select>
<input oninput="oninputFunc('fontsetterAnydore','showtextdivIDAn')" id="fontsetterAnydore" type="range" min="10" max="100" value="15" width="40px">
<button class="previewdownload">Download</button>
</ul>
<div id="showtextdivIDAn" class="showtextdiv">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quisquam assumenda
voluptatem id natus quasi! Animi, saepe, soluta incidunt, vero quia expedita
ullam magnam maxime sit exercitationem quaerat voluptate quae blanditiis?
<br> <br>
AaBbCcDdEeFfGgHhIiJjKkLlMm
NnOoPpQqRrSsTtUuVvWwXxYyZZ
<br><br>
Up maids me an ample stood given. Certainty say suffering his him collected intention promotion.
Hill sold ham men made lose case. Views abode law heard jokes too. Was are delightful solicitude
discovered collecting man day. Resolving neglected sir tolerably but existence conveying for.
Day his put off unaffected literature partiality inhabiting.
</div>
</section>
<section id="anydoreAboutSection" class="aboutsection">
<br>
<hr style="width: 100%; margin-left: -8px; padding: 0;">
<span class="Previewheading">About & Liscence</span>
<div>
<h2>About</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
</p>
<h2>Liscence</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendisgh ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
</p>
</div>
</section>
</div>
<div id="anydoreDisplay" class="p0001">
<br>
<p class="title">Anydore</p>
<p>Anydore Regular</p> <button class="sidebuttons">Download Only</button>
<br>
<p class="title">Anydore</p>
<p>Anydore Regular</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<p>Anydore Bold</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<p>Anydore Italics</p> <button class="sidebuttons">Download Only</button>
<div class="innerview">
The Quick Brown Fox Jumped Over the Lazy Dog
</div> <br>
<img style="width: 10cm; height: 120px; display: inline; align-content: center; justify-content: center;" src="./images/flower.jpg" alt="">
<ul>
<button><a href="#anydorePreviewSection">Preview</a></button>
<button><a href="./ads.html">Use link</a></button>
<button><a href="#anydoreAboutSection">About & liscence</a></button>
<button><a href="">Download Family</a></button>
</ul>
<section id="anydorePreviewSection" class="PreviewSection">
<hr style="width: 100%; margin-left: -8px; padding: 0;">
<span class="Previewheading">Preview</span>
<ul>
<label for="fontselection">Font Type :</label>
<select onchange="onchangeFontType('typesofthefontjagub','showtextdivIDjag')" name="fontselection" id="typesofthefontjagub">
<option value="Regular">Regular</option>
<option value="Thin">Thin</option>
<option value="Bold">Bold</option>
<option value="Italics">Italics</option>
</select>
<input oninput="oninputFunc('fontsetterjaguar','showtextdivIDjag')" id="fontsetterjaguar" type="range" min="10" max="100" value="15" width="40px">
<button class="previewdownload">Download</button>
</ul>
<div id="showtextdivIDjag" class="showtextdiv">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quisquam assumenda
voluptatem id natus quasi! Animi, saepe, soluta incidunt, vero quia expedita
ullam magnam maxime sit exercitationem quaerat voluptate quae blanditiis?
<br> <br>
AaBbCcDdEeFfGgHhIiJjKkLlMm
NnOoPpQqRrSsTtUuVvWwXxYyZZ
<br><br>
Up maids me an ample stood given. Certainty say suffering his him collected intention promotion.
Hill sold ham men made lose case. Views abode law heard jokes too. Was are delightful solicitude
discovered collecting man day. Resolving neglected sir tolerably but existence conveying for.
Day his put off unaffected literature partiality inhabiting.
</div>
</section>
<section id="anydoreAboutSection" class="aboutsection">
<br>
<hr style="width: 100%; margin-left: -8px; padding: 0;">
<span class="Previewheading">About & Liscence</span>
<div>
<h2>About</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
</p>
<h2>Liscence</h2>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendisgh ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium, sit qui exercitationem quibusdam,
iure temporibus, voluptates odit perferendis ad illo voluptatibus blanditiis dolorem impedit libero
harum magnam nulla ea minus.
</p>
</div>
</section>
</div>
</section>
<script>
//searchbar code
const searchInput = document.getElementById("searchbar")
const fontList = document.getElementById("listoffonts")
searchInput.addEventListener("input", () => {
const searchTerm = searchInput.value.toLowerCase();
const theContents = fontList.getElementsByClassName("myfonts")
for (const fonts of theContents){
// const fontName = font.querySelector(".font-name").textContent.toLowerCase();
const fontname = fonts.querySelector(".myfonts").textContent.toLowerCase();
console.log(fontname)
if (fontname.includes(searchTerm)) {
fonts.style.display = "block";
} else {
fonts.style.display = "none";
}
}
})
function viewFunc(displayName) {
const hider = document.querySelectorAll('.p0001');
hider.forEach((content) => {
content.style.display = 'none';
});
document.getElementById(displayName).style.display = 'block'; // Corrected this line
}
function oninputFunc(IDofPreview, textBoxOfPreview,typesofthefont){
let fontsetter = document.getElementById(IDofPreview)
let showtextdivID = document.getElementById(textBoxOfPreview)
let newsize = `${fontsetter.value}px`
showtextdivID.style.fontSize = newsize
}
function onchangeFontType(IDofPreview,textBoxOfPreview){
let typesofthefont = document.getElementById(IDofPreview);
let mytextBoxOfPreview = document.getElementById(textBoxOfPreview)
let fontWeight = 'normal';
let fontStyle = 'normal';
if (typesofthefont.value == 'Bold') {
fontWeight = 'bold'
} else if (typesofthefont.value == 'Italics') {
fontStyle = 'italic'
} else if (typesofthefont.value == 'Thin') {
fontStyle = 'lighter'
}
mytextBoxOfPreview.style.fontWeight = fontWeight;
mytextBoxOfPreview.style.fontStyle = fontStyle;
}
// let fontsetter = document.getElementById('fontsetter')
// let showtextdivID = document.getElementById('showtextdivID')
// fontsetter.addEventListener('input', () => {
// let newsize = `${fontsetter.value}px`
// showtextdivID.style.fontSize = newsize
// })
// let typesofthefont = document.getElementById('typesofthefont')
// typesofthefont.addEventListener('change', () => {
// let fontWeight = 'normal';
// let fontStyle = 'normal';
// if (typesofthefont.value == 'Bold') {
// fontWeight = 'bold'
// } else if (typesofthefont.value == 'Italics') {
// fontStyle = 'italic'
// }
// showtextdivID.style.fontWeight = fontWeight;
// showtextdivID.style.fontStyle = fontStyle;
// })
</script>
</body>
</html>