-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget-generator.html
More file actions
66 lines (66 loc) · 1.87 KB
/
widget-generator.html
File metadata and controls
66 lines (66 loc) · 1.87 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Widget Generator | tools.eliana.lol</title>
<link rel="stylesheet" href="global.css" />
<link rel="icon" type="image/x-icon" href="favicon.svg" />
<style>
.preview-box {
border: 1px solid var(--puny);
border-radius: 6px;
background: var(--hover);
padding: 20px;
margin-top: 20px;
}
</style>
</head>
<body>
<nav>
<div class="left">
<a href="index.html">home</a> | <a href="extra.html">extra</a> |
<a href="credits.html">credits</a> | <a href="changelog.html">logs</a>
</div>
<div class="right">
<button id="theme-toggle">[theme]</button> |
<a href="https://eliana.lol">site</a>
</div>
</nav>
<main>
<h1>RSS Widget Generator</h1>
<input
type="url"
id="feedUrl"
placeholder="Feed URL..."
style="
width: 100%;
padding: 10px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--puny);
"
/>
<button
onclick="genWidget()"
style="border-color: var(--accent); margin-top: 10px"
>
Generate
</button>
<div class="preview-box" id="preview">Preview will appear here...</div>
<textarea
id="codeOut"
rows="5"
style="margin-top: 10px; font-size: 0.7rem"
></textarea>
</main>
<script>
function genWidget() {
const url = document.getElementById('feedUrl').value;
const code = `<div id="rss-widget" data-url="${url}"></div><script src="widget.js"><\/script>`;
document.getElementById('codeOut').value = code;
document.getElementById('preview').innerHTML =
`<p class="puny">Widget code generated for ${url}</p>`;
}
</script>
</body>
</html>