-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
214 lines (177 loc) Β· 9.47 KB
/
index.html
File metadata and controls
214 lines (177 loc) Β· 9.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Oikos - A Webring Template for Everyone</title>
<!-- Meta's -->
<meta name="title" content="Oikos - Webring Template" />
<meta name="author" content="fr0st, fr0st.xyz">
<meta name="description" content="A webring template for everyone." />
<meta name="theme-color" content="#0C0C0C">
<!-- Open Graph / Facebook -->
<meta property="og:title" content="Oikos - Webring Template" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://oikos-webring.netlify.app/" />
<meta property="og:theme-color" content="#0C0C0C">
<meta property="og:description" content="A webring template for everyone." />
<!-- X (Twitter) -->
<meta property="twitter:title" content="Oikos - Webring Template" />
<meta property="twitter:url" content="https://oikos-webring.netlify.app/" />
<meta property="twitter:theme-color" content="#0C0C0C">
<meta property="twitter:description" content="A webring template for everyone." />
<!-- Links -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="icon" type="image/png" href="assets/img/logo.png">
<script src="assets/js/script.js" defer></script>
<!-- Prism CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.30.0/themes/prism-tomorrow.min.css" rel="stylesheet" />
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer">
<!-- Prism JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.30.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.30.0/plugins/autoloader/prism-autoloader.min.js"></script>
<!-- Webring -->
<script src="webring.js" defer></script>
</head>
<body>
<!-- JS DISABLED DETECTION -->
<noscript>
<style>
/* prevent scrolling if js disabled*/
html, body {
overflow: hidden;
height: 100%;
}
</style>
<div class="no-js-overlay">
<div class="no-js-message">
β οΈ This site requires JavaScript to work.<br>
Please enable JavaScript in your browser.
</div>
</div>
</noscript>
<!-- Header -->
<div class="container">
<header class="webring-header">
<a href="./" class="logo">
<img src="assets/img/logo.png" alt="Logo" class="logo-img">
<span class="logo-text" id="logo-text">Oikos</span>
</a>
</header>
<hr> <!-- small hr -->
<!-- About This Template -->
<h2 id="about-this-template"><a class="anchor">#</a> About This Template</h2>
<p class="section-text">
<b>Oikos</b> comes from the ancient Greek word for <strong>home</strong> or <strong>household</strong>.
It is an <a href="https://github.com/fr0st-iwnl/Oikos">open-source</a> <a href="https://en.wikipedia.org/wiki/Webring" target="_blank">webring</a> template that anyone can use and customize.
You can rename it, change the design, add your own sites and members, and create your own webring.
</p>
<p class="section-text">
The logo is a cube or square that looks like a little house and represents the idea of a home.
</p>
<p class="section-text">
This template is built purely with <strong>HTML, CSS, and JavaScript</strong>.
There are no special frameworks. The code is fully commented and organized so it is easy to understand and modify.
The members are stored in a simple <a href="https://github.com/fr0st-iwnl/Oikos/blob/master/members.json" target="_blank">members.json</a> file, making it easy to add or remove sites.
You can also press <b>"Use this template"</b> on <a href="https://github.com/fr0st-iwnl/Oikos/" target="_blank">GitHub</a> to start making your own customized webring.
</p>
<p class="section-text">
Below you will see the <b>"Joining"</b> and other sections but <b>this is just part of the template</b>.
You cannot actually join a webring here. It is just an example showing how a webring can look using Oikos.
</p>
<!-- Members -->
<h2 id="webring-members"><a class="anchor">#</a> Webring Members</h2>
<ul id="members"></ul>
<!-- About -->
<h2 id="about"><a class="anchor">#</a> About</h2>
<p class="section-text">This is a webring for people passionate about the <span class="code">...</span> and other cool stuff ofc.</p>
<p class="section-text" id="member-count">Loading Members...</p>
<!-- fetch members -->
<script>
fetch('members.json')
.then(response => response.json())
.then(data => {
const countEl = document.getElementById('member-count');
countEl.innerHTML = `There are currently <b>${data.length}</b> members in the webring.`;
})
.catch(err => {
console.error("Failed to load members.json:", err);
document.getElementById('member-count').textContent = "Member count unavailable.";
});
</script>
<!-- Joining -->
<h2 id="joining"><a class="anchor">#</a> Joining</h2>
<p class="section-text">To join, have a <b>personal website</b> and add the following links to it <b>(they have to be on the main page)</b>:</p>
<div class="snippet-container">
<button class="copy-btn">Copy</button>
<pre><code id="snippet" class="language-html">
<a href="https://oikos-webring.netlify.app/prev.html?name=<name>">β¬
Previous</a>
<a href="https://oikos-webring.netlify.app/">Webring</a>
<a href="https://oikos-webring.netlify.app/rand.html">π² Random</a>
<a href="https://oikos-webring.netlify.app/next.html?name=<name>">Next β‘</a></code></pre>
</div>
<p class="section-text">don't forget to replace <span class="code"><name></span> with your own name</p>
<p class="section-text">then create a PR <b>(Pull Request)</b> in the <a href="https://github.com/fr0st-iwnl/webring">repo</a> to add yourself to the <a href="https://github.com/fr0st-iwnl/webring/blob/master/members.json" target="_blank">members.json</a> file: </p>
<div class="snippet-container">
<button class="copy-btn">Copy</button>
<pre><code class="language-json" id="snippet">
{"name": "your-name", "site": "https://your-site.com"}</code></pre>
</div>
<p class="section-text">Inactive sites or sites that don't add the widget within a <b>month</b> will be removed to keep the webring healthy. </p>
<!-- Support -->
<h2 id="support"><a class="anchor">#</a> Support</h2>
<p class="section-text">If you don't know how to / can't make a PR for some reason feel free to <a href="mailto:fr0st.xyz@tuta.io?subject=Webring Site Submission">contact me</a>, I can add you to the webring myself.</p>
<!-- What Happens If Your Name Is Wrong? -->
<h2 id="what-happens-if-your-name-is-wrong"><a class="anchor">#</a> What Happens If Your Name Is Wrong?</h2>
<p class="section-text">If you misspell your name in the links or the PR hasn't been merged yet, the next and prev links will lead to <span class="code">https://oikos-webring.netlify.app/</span></p>
<!-- Widget -->
<h2 id="widget-preview"><a class="anchor">#</a> Widget Preview <span class="code">>α΄β’</span></h2>
<div class="widget" id="widget">
<script>
fetch('./members.json')
.then(res => res.json())
.then(members => {
const widget = document.getElementById('widget');
if (!members || members.length === 0) return;
const firstMember = members[0]; // Next β first
const lastMember = members[members.length - 1]; // Previous β last
// Render the widget
widget.innerHTML = `
<a href="${lastMember.site}">β¬
Previous</a>
<a href="./" class="webring-logo-link">
<img src="assets/img/logo.png" alt="Webring Logo" class="webring-logo">
</a>
<a href="#" id="rand-link">π² Random</a>
<a href="${firstMember.site}">Next β‘</a>
`;
// Random link logic
const randLink = document.getElementById('rand-link');
randLink.addEventListener('click', (e) => {
e.preventDefault(); // prevent default link
const randomMember = members[Math.floor(Math.random() * members.length)];
window.location.href = randomMember.site;
});
})
.catch(err => console.error(":( failed to load members.json:", err));
</script>
</div>
<!-- Footer -->
<footer class="webring-footer">
<div class="footer-left">
<img src="assets/img/logo.png" alt="Logo" class="footer-logo">
<span class="footer-text">Β© <span id="year"></span> <a href="https://quintix.netlify.app" target="_blank">Quintix Labs</a> - <a href="https://fr0st.xyz" target="_blank">fr0st</a></span>
</div>
<div class="footer-center">
<a href="https://github.com/fr0st-iwnl/webring" target="_blank" class="github-icon">
<i class="fab fa-github"></i>
</a>
</div>
<div class="footer-right">
<span class="random-quote" id="randomQuote"></span>
</div>
</footer>
</div>
</body>
</html>