forked from spagwhetti/spagwhetti.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathembed.html
More file actions
128 lines (102 loc) · 3.27 KB
/
Copy pathembed.html
File metadata and controls
128 lines (102 loc) · 3.27 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<base target="_parent">
<link rel="icon" type="image/jpg" href="favicon.ico"/>
<title>bolognese embed</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Asap+Condensed:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
:root {
--textcolour: #ffffff;
--linkcolour: #d92941;
--background: #0a0a0a;
}
* {
font-family: 'JetBrains Mono NL', 'JetBrains Mono', monospace;
color: var(--textcolour);
}
html {
background-color: var(--background);
}
html, body {
height: 100%;
margin: 0;
box-sizing: border-box;
}
body {
display: flex;
padding: 0.5em;
flex-wrap: wrap;
justify-content: space-evenly;
align-content: center;
}
a {
display: inline-block;
color: inherit;
position: relative;
text-decoration: none;
transition: linear 0.2s;
color: var(--textcolour);
}
a:before {
background: var(--linkcolour);
content: '';
height: 2px;
position: absolute;
bottom: -1.5px;
width: 100%;
left: 50%;
transform: translateX(-50%);
transition: width 0.2s ease-in-out;
}
a:hover{
color: var(--linkcolour);
}
a:hover:before{
width: 0;
}
#left { text-align: left; }
#mid { text-align: center; }
#right { text-align: right; }
#left, #right {
flex-grow: 1;
flex-basis: 0;
}
</style>
</head>
<body style="justify-content: space-between;">
<span id="left">« <a href="https://spagwhetti.github.io/redirect.html?to=prev" id="prev">prev</a></span>
<span id="mid"> 🍝 <a href="https://daisy.nekoweb.org/webring" id="header">bolognese ring</a> 🍝 </span>
<span id="right"><a href="https://spagwhetti.github.io/redirect.html?to=next" id="next">next</a> »</span>
</body>
<script>
const DATA_FOR_WEBRING = `https://raw.githubusercontent.com/spagwhetti/spagwhetti.github.io/main/webring.json`;
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const name = urlParams.get('name');
const colour = urlParams.get('colour');
const textcolour = urlParams.get('textcolour')
const linkcolour = urlParams.get('linkcolour')
if (colour){
var r = document.querySelector(':root');
r.style.setProperty('--background', colour);
}
if (textcolour){
var r = document.querySelector(':root');
r.style.setProperty('--textcolour', textcolour);
}
if (linkcolour){
var r = document.querySelector(':root');
r.style.setProperty('--linkcolour', linkcolour);
}
const left = document.getElementById("prev")
const right = document.getElementById("next")
fetch(DATA_FOR_WEBRING)
.then((response) => response.json())
.then((sites) => {
left.href += "&name=" + name;
right.href += "&name=" + name;
});
</script>
</html>