-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
721 lines (634 loc) · 23.8 KB
/
index.html
File metadata and controls
721 lines (634 loc) · 23.8 KB
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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Meta Builder — BYLICKILABS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
<style>
:root {
--bg-main: #020412;
--bg-card: #070b22;
--accent-primary: #19fbff;
--accent-secondary: #ff2df0;
--accent-soft: #7b5cff;
--text-main: #f5f5ff;
--text-muted: #9ca3af;
--border-soft: rgba(148, 163, 253, 0.25);
--radius-xl: 20px;
--shadow-soft: 0 0 40px rgba(25, 251, 255, 0.07);
--font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}
* {
box-sizing: border-box;
}
body {
background:
radial-gradient(circle at 0 0, rgba(121,40,202,0.08), transparent 55%),
radial-gradient(circle at 100% 0, rgba(25,251,255,0.06), transparent 55%),
radial-gradient(circle at 0 100%, rgba(255,45,240,0.04), transparent 55%),
var(--bg-main);
color: var(--text-main);
font-family: var(--font-family);
min-height: 100vh;
}
.page-wrap {
padding: 30px 16px 40px;
}
@media (min-width: 1200px) {
.page-wrap {
padding: 40px 40px 50px;
}
}
.meta-header {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 18px;
margin-bottom: 26px;
}
.brand-block h1 {
font-size: 1.8rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent-primary);
margin: 0 0 2px;
}
.brand-block span {
font-size: 0.8rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.22em;
}
.lang-toggle .btn {
border-radius: 999px;
padding: 6px 14px;
font-size: 0.8rem;
border-color: rgba(148,163,253,0.35);
color: var(--text-muted);
background: rgba(4,7,26,0.9);
backdrop-filter: blur(10px);
}
.lang-toggle .btn.active {
color: var(--accent-primary);
border-color: var(--accent-primary);
box-shadow: 0 0 12px rgba(25,251,255,0.5);
font-weight: 600;
}
.neon-card {
background: radial-gradient(circle at top left, rgba(25,251,255,0.06), transparent),
radial-gradient(circle at top right, rgba(255,45,240,0.06), transparent),
var(--bg-card);
border-radius: var(--radius-xl);
border: 1px solid var(--border-soft);
box-shadow: var(--shadow-soft);
padding: 22px 20px 18px;
position: relative;
overflow: hidden;
}
@media (min-width: 1200px) {
.neon-card {
padding: 26px 24px 20px;
}
}
.neon-card::before {
content: "";
position: absolute;
inset: -1px;
border-radius: inherit;
background:
linear-gradient(90deg,
rgba(25,251,255,0.18),
rgba(255,45,240,0.0),
rgba(123,92,255,0.16));
mix-blend-mode: screen;
opacity: 0.25;
pointer-events: none;
}
.section-title {
font-size: 0.95rem;
text-transform: uppercase;
letter-spacing: 0.16em;
color: var(--accent-soft);
margin-bottom: 14px;
}
.form-label {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.14em;
color: var(--text-muted);
margin-bottom: 4px;
}
.form-control,
.form-select {
font-size: 0.85rem;
padding: 7px 9px;
background-color: rgba(7,11,34,0.98);
border-radius: 10px;
border: 1px solid rgba(148,163,253,0.28);
color: var(--text-main);
box-shadow: none;
}
.form-control::placeholder {
color: rgba(156,163,175,0.6);
}
.form-control:focus,
.form-select:focus {
border-color: var(--accent-primary);
box-shadow: 0 0 0 0.15rem rgba(25,251,255,0.16);
background-color: #020412;
color: var(--text-main);
}
.hint {
font-size: 0.7rem;
color: var(--text-muted);
margin-top: 2px;
}
.btn-generate {
background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
border: none;
border-radius: 14px;
color: #020412;
font-weight: 600;
font-size: 0.9rem;
padding: 9px 18px;
display: inline-flex;
align-items: center;
gap: 8px;
box-shadow: 0 0 22px rgba(25,251,255,0.32);
transition: all 0.18s ease;
}
.btn-generate:hover {
transform: translateY(-1px);
box-shadow: 0 0 30px rgba(255,45,240,0.35);
color: #020412;
}
.btn-copy {
background: transparent;
border-radius: 999px;
border: 1px solid rgba(148,163,253,0.5);
color: var(--accent-primary);
font-size: 0.78rem;
padding: 5px 12px;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.16s ease;
}
.btn-copy:hover {
background: rgba(10,16,48,0.98);
box-shadow: 0 0 12px rgba(25,251,255,0.35);
transform: translateY(-1px);
}
.output-wrapper {
margin-top: 14px;
}
.output-label-line {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
margin-bottom: 6px;
}
.output-label-line span {
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.14em;
color: var(--accent-soft);
}
.output-box {
width: 100%;
min-height: 260px;
max-height: 520px;
background-color: #020412;
border-radius: 14px;
border: 1px solid rgba(25,251,255,0.25);
padding: 10px 10px 10px;
overflow-x: auto;
overflow-y: auto;
font-family: "JetBrains Mono", "Fira Code", Menlo, monospace;
font-size: 0.78rem;
color: var(--accent-primary);
white-space: pre;
}
@media (min-width: 992px) {
.output-box {
min-height: 320px;
}
}
/* GitHub Button */
.github-btn-wrap {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
margin-top: 10px;
}
.github-label {
font-size: 0.7rem;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.14em;
}
.github-btn {
position: relative;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 16px;
border-radius: 999px;
border: 1px solid rgba(148,163,253,0.6);
background: radial-gradient(circle at 0 0, rgba(25,251,255,0.16), transparent),
rgba(3,7,30,0.98);
color: var(--accent-primary);
font-size: 0.78rem;
font-weight: 500;
text-decoration: none;
overflow: hidden;
transform-origin: center;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.github-btn i {
font-size: 0.96rem;
}
.github-btn::after {
content: "";
position: absolute;
top: -30%;
left: -40%;
width: 40%;
height: 200%;
background: linear-gradient(120deg,
transparent,
rgba(255,255,255,0.13),
transparent);
opacity: 0;
transform: translateX(-40%);
transition: opacity 0.25s ease, transform 0.25s ease;
pointer-events: none;
}
.github-btn:hover {
transform: scale(1.06);
box-shadow: 0 0 22px rgba(25,251,255,0.38);
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.github-btn:hover::after {
opacity: 1;
transform: translateX(140%);
}
.footer-note {
margin-top: 14px;
font-size: 0.65rem;
color: var(--text-muted);
display: flex;
justify-content: space-between;
gap: 10px;
align-items: center;
border-top: 1px solid rgba(148,163,253,0.18);
padding-top: 8px;
}
.footer-pulse {
font-size: 0.6rem;
color: var(--accent-primary);
display: inline-flex;
align-items: center;
gap: 6px;
}
.footer-pulse-dot {
width: 6px;
height: 6px;
border-radius: 999px;
background: var(--accent-secondary);
box-shadow: 0 0 8px var(--accent-secondary);
animation: pulse 1.4s infinite ease-in-out;
}
@keyframes pulse {
0% { transform: scale(0.9); opacity: 0.9; }
50% { transform: scale(1.35); opacity: 1; }
100% { transform: scale(0.9); opacity: 0.85; }
}
</style>
</head>
<body>
<div class="page-wrap">
<header class="meta-header">
<div class="brand-block">
<h1>META CODE GENERATOR</h1>
<span>HTML Head Suite</span>
</div>
<div class="d-flex flex-column align-items-end gap-2">
<div class="lang-toggle btn-group" role="group" aria-label="Language selection">
<button type="button" class="btn btn-sm active" data-lang="de">DE</button>
<button type="button" class="btn btn-sm" data-lang="en">EN</button>
</div>
</div>
</header>
<main>
<div class="row g-4">
<div class="col-12 col-lg-5">
<section class="neon-card">
<div class="section-title" data-i18n="form.section.metaCore">Core Meta</div>
<div class="mb-2">
<label class="form-label" for="pageTitle" data-i18n="form.label.pageTitle">Seitentitel</label>
<input type="text" id="pageTitle" class="form-control" placeholder="Dashboard & Docs">
<div class="hint" data-i18n="form.hint.pageTitle">Wird u.a. im <title>-Tag und als Basis für Social Media verwendet.</div>
</div>
<div class="mb-2">
<label class="form-label" for="description" data-i18n="form.label.description">Beschreibung</label>
<textarea id="description" rows="2" class="form-control"
placeholder="High-Security Encryption Suite powered by BYLICKILABS."></textarea>
<div class="hint" data-i18n="form.hint.description">Empfohlen ca. 140–160 Zeichen. Prägnant, eindeutig.</div>
</div>
<div class="mb-2">
<label class="form-label" for="keywords" data-i18n="form.label.keywords">Keywords</label>
<input type="text" id="keywords" class="form-control" placeholder="BYLICKILABS, Beispiel, ...">
<div class="hint" data-i18n="form.hint.keywords">Kommagetrennte Schlagwörter (optional).</div>
</div>
<div class="mb-2">
<label class="form-label" for="author" data-i18n="form.label.author">Author</label>
<input type="text" id="author" class="form-control" placeholder="Thorsten Bylicki / BYLICKILABS">
</div>
<div class="mb-2">
<label class="form-label" for="canonicalUrl" data-i18n="form.label.canonical">Canonical URL</label>
<input type="url" id="canonicalUrl" class="form-control" placeholder="https://www.bylickilabs.de">
</div>
<div class="mb-2">
<label class="form-label" for="faviconUrl" data-i18n="form.label.favicon">Favicon URL</label>
<input type="url" id="faviconUrl" class="form-control" placeholder="https://www.bylickilabs.de/favicon.ico">
<div class="hint" data-i18n="form.hint.favicon">Vollständige URL zu .ico / .png / .svg.</div>
</div>
<div class="mb-3">
<label class="form-label" for="robots" data-i18n="form.label.robots">Robots</label>
<select id="robots" class="form-select">
<option value="index, follow" selected>index, follow</option>
<option value="noindex, follow">noindex, follow</option>
<option value="index, nofollow">index, nofollow</option>
<option value="noindex, nofollow">noindex, nofollow</option>
</select>
</div>
<div class="section-title mt-3" data-i18n="form.section.social">Open Graph / Social</div>
<div class="mb-2">
<label class="form-label" for="ogTitle" data-i18n="form.label.ogTitle">OG Title</label>
<input type="text" id="ogTitle" class="form-control" placeholder="">
<div class="hint" data-i18n="form.hint.ogTitle">Leer lassen, um Seitentitel zu verwenden.</div>
</div>
<div class="mb-2">
<label class="form-label" for="ogDescription" data-i18n="form.label.ogDescription">OG Description</label>
<textarea id="ogDescription" rows="2" class="form-control" placeholder=""></textarea>
<div class="hint" data-i18n="form.hint.ogDescription">Leer lassen, um Meta Description zu verwenden.</div>
</div>
<div class="mb-2">
<label class="form-label" for="ogUrl" data-i18n="form.label.ogUrl">OG URL</label>
<input type="url" id="ogUrl" class="form-control" placeholder="">
</div>
<div class="mb-2">
<label class="form-label" for="ogImage" data-i18n="form.label.ogImage">OG Image URL</label>
<input type="url" id="ogImage" class="form-control" placeholder="https://www.bylickilabs.de/assets/og-image.png">
</div>
<div class="mb-2">
<label class="form-label" for="themeColor" data-i18n="form.label.themeColor">Theme Color (HEX)</label>
<input type="text" id="themeColor" class="form-control" value="#020412">
<div class="hint" data-i18n="form.hint.themeColor">Browser UI / PWA Accent (z. B. #020412).</div>
</div>
<div class="mt-3 d-flex justify-content-between align-items-center">
<button class="btn-generate" id="generateBtn">
<i class="bi bi-cpu"></i>
<span data-i18n="form.button.generate">Meta-Code generieren</span>
</button>
</div>
</section>
</div>
<div class="col-12 col-lg-7">
<section class="neon-card">
<div class="output-label-line">
<span data-i18n="output.label">Erzeugter HTML <head>-Code</span>
<button class="btn-copy" id="copyBtn">
<i class="bi bi-clipboard-check"></i>
<span data-i18n="output.copy">Code kopieren</span>
</button>
</div>
<div id="output" class="output-box">
<!-- Configure your meta data on the left and click "Meta-Code Generate" -->
</div>
<div class="github-btn-wrap">
<span class="github-label" data-i18n="github.label">Maintained by</span>
<a href="https://github.com/bylickilabs" target="_blank" rel="noopener noreferrer"
class="github-btn">
<i class="bi bi-github"></i>
<span>@bylickilabs</span>
</a>
</div>
<div class="footer-note">
<div>
<span>© <span id="year"></span> BYLICKILABS</span>
</div>
<div class="footer-pulse">
<div class="footer-pulse-dot"></div>
<span data-i18n="footer.telemetry">Head Integrity Monitor: online</span>
</div>
</div>
</section>
</div>
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
const I18N = {
de: {
"form.section.metaCore": "Core Meta",
"form.section.social": "Open Graph / Social",
"form.label.pageTitle": "Seitentitel",
"form.hint.pageTitle": "Wird u.a. im <title>-Tag und als Basis für Social Media verwendet.",
"form.label.description": "Beschreibung",
"form.hint.description": "Empfohlen ca. 140–160 Zeichen. Prägnant, eindeutig.",
"form.label.keywords": "Keywords",
"form.hint.keywords": "Kommagetrennte Schlagwörter (optional).",
"form.label.author": "Author",
"form.label.canonical": "Canonical URL",
"form.label.favicon": "Favicon URL",
"form.hint.favicon": "Vollständige URL zu .ico / .png / .svg.",
"form.label.robots": "Robots",
"form.label.ogTitle": "OG Title",
"form.hint.ogTitle": "Leer lassen, um Seitentitel zu verwenden.",
"form.label.ogDescription": "OG Beschreibung",
"form.hint.ogDescription": "Leer lassen, um Meta Beschreibung zu verwenden.",
"form.label.ogUrl": "OG URL",
"form.label.ogImage": "OG Image URL",
"form.label.themeColor": "Theme Color (HEX)",
"form.hint.themeColor": "Browser UI / PWA Accent (z. B. #020412).",
"form.button.generate": "Meta-Code generieren",
"output.label": "Erzeugter HTML <head>-Code",
"output.copy": "Code kopieren",
"github.label": "Maintained by",
"footer.telemetry": "Head Integrity Monitor: online"
},
en: {
"form.section.metaCore": "Core Meta",
"form.section.social": "Open Graph / Social",
"form.label.pageTitle": "Page Title",
"form.hint.pageTitle": "Used in the <title> tag and as base for social media previews.",
"form.label.description": "Description",
"form.hint.description": "Recommended ~140–160 characters. Clear and concise.",
"form.label.keywords": "Keywords",
"form.hint.keywords": "Comma-separated keywords (optional).",
"form.label.author": "Author",
"form.label.canonical": "Canonical URL",
"form.label.favicon": "Favicon URL",
"form.hint.favicon": "Full URL to .ico / .png / .svg.",
"form.label.robots": "Robots",
"form.label.ogTitle": "OG Title",
"form.hint.ogTitle": "Leave empty to reuse Page Title.",
"form.label.ogDescription": "OG Description",
"form.hint.ogDescription": "Leave empty to reuse Meta Description.",
"form.label.ogUrl": "OG URL",
"form.label.ogImage": "OG Image URL",
"form.label.themeColor": "Theme Color (HEX)",
"form.hint.themeColor": "Browser UI / PWA accent (e.g. #020412).",
"form.button.generate": "Generate Meta Code",
"output.label": "Generated HTML <head> Code",
"output.copy": "Copy code",
"github.label": "Maintained by",
"footer.telemetry": "Head Integrity Monitor: online"
}
};
const langButtons = document.querySelectorAll(".lang-toggle .btn");
let currentLang = "de";
function applyTranslations(lang) {
const dict = I18N[lang];
document.querySelectorAll("[data-i18n]").forEach(el => {
const key = el.getAttribute("data-i18n");
if (dict[key]) {
el.textContent = dict[key];
}
});
if (lang === "de") {
document.getElementById("pageTitle").placeholder = "Dashboard & Docs";
document.getElementById("description").placeholder = "Powered by BYLICKILABS.";
document.getElementById("keywords").placeholder = "BYLICKILABS, Beispiel, ...";
document.getElementById("faviconUrl").placeholder = "... / assets/ favicon.ico";
document.getElementById("ogImage").placeholder = "png Link oder Asset";
} else {
document.getElementById("pageTitle").placeholder = "Dashboard & Docs";
document.getElementById("description").placeholder = "Powered by BYLICKILABS.";
document.getElementById("keywords").placeholder = "BYLICKILABS, Example, ...";
document.getElementById("faviconUrl").placeholder = "... / assets/ favicon.ico";
document.getElementById("ogImage").placeholder = "png Link or Asset";
}
}
langButtons.forEach(btn => {
btn.addEventListener("click", () => {
const lang = btn.getAttribute("data-lang");
currentLang = lang;
langButtons.forEach(b => b.classList.remove("active"));
btn.classList.add("active");
applyTranslations(lang);
});
});
function escapeHtml(str) {
return str
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
function buildMetaCode() {
const title = document.getElementById("pageTitle").value.trim();
const desc = document.getElementById("description").value.trim();
const keywords = document.getElementById("keywords").value.trim();
const author = document.getElementById("author").value.trim();
const canonical = document.getElementById("canonicalUrl").value.trim();
const favicon = document.getElementById("faviconUrl").value.trim();
const robots = document.getElementById("robots").value;
const ogTitle = document.getElementById("ogTitle").value.trim();
const ogDesc = document.getElementById("ogDescription").value.trim();
const ogUrl = document.getElementById("ogUrl").value.trim();
const ogImage = document.getElementById("ogImage").value.trim();
const themeColor = document.getElementById("themeColor").value.trim() || "#020412";
const lines = [];
lines.push('<head>');
lines.push(' <meta charset="utf-8">');
lines.push(' <meta name="viewport" content="width=device-width, initial-scale=1">');
if (title) {
lines.push(` <title>${escapeHtml(title)}</title>`);
}
if (desc) {
lines.push(` \n<meta name="description" content="${escapeHtml(desc)}">`);
}
if (keywords) {
lines.push(` <meta name="keywords" content="${escapeHtml(keywords)}">`);
}
if (author) {
lines.push(` <meta name="author" content="${escapeHtml(author)}">`);
}
if (robots) {
lines.push(` <meta name="robots" content="${escapeHtml(robots)}">`);
}
if (canonical) {
lines.push(` \n<link rel="canonical" href="${escapeHtml(canonical)}">`);
}
if (themeColor) {
lines.push(` \n<meta name="theme-color" content="${escapeHtml(themeColor)}">`);
}
if (favicon) {
const safeFavicon = escapeHtml(favicon);
lines.push(` \n<link rel="icon" href="${safeFavicon}">`);
lines.push(` <link rel="shortcut icon" href="${safeFavicon}">`);
lines.push(` <link rel="apple-touch-icon" href="${safeFavicon}">`);
}
if (title || ogTitle) {
lines.push(` \n<meta property="og:title" content="${escapeHtml(ogTitle || title)}">`);
}
if (desc || ogDesc) {
lines.push(` <meta property="og:description" content="${escapeHtml(ogDesc || desc)}">`);
}
if (ogUrl || canonical) {
lines.push(` <meta property="og:url" content="${escapeHtml(ogUrl || canonical)}">`);
}
if (ogImage) {
lines.push(` <meta property="og:image" content="${escapeHtml(ogImage)}">`);
}
if (title) {
lines.push(' <meta property="og:type" content="website">');
}
if (title || ogTitle) {
lines.push(` <meta name="twitter:title" content="${escapeHtml(ogTitle || title)}">`);
}
if (desc || ogDesc) {
lines.push(` <meta name="twitter:description" content="${escapeHtml(ogDesc || desc)}">`);
}
if (ogImage) {
lines.push(` <meta name="twitter:image" content="${escapeHtml(ogImage)}">`);
}
if (ogImage || ogTitle || ogDesc) {
lines.push(' <meta name="twitter:card" content="summary_large_image">');
}
lines.push(' \n<!-- Optional: Bootstrap 5 CSS -->');
lines.push(' <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">');
lines.push(' \n<!-- Maintainer: BYLICKILABS / github.com/bylickilabs -->');
lines.push('</head>');
document.getElementById("output").textContent = lines.join("\n");
}
function copyOutput() {
const out = document.getElementById("output").textContent;
if (!navigator.clipboard) {
const tmp = document.createElement("textarea");
tmp.value = out;
document.body.appendChild(tmp);
tmp.select();
document.execCommand("copy");
document.body.removeChild(tmp);
return;
}
navigator.clipboard.writeText(out).catch(() => {});
}
document.getElementById("generateBtn").addEventListener("click", buildMetaCode);
document.getElementById("copyBtn").addEventListener("click", copyOutput);
document.getElementById("year").textContent = new Date().getFullYear();
applyTranslations("de");
</script>
</body>
</html>