Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f12421b69 | ||
|
|
3eb1eca324 | ||
|
|
08932e4659 | ||
|
|
b46bc133bf | ||
|
|
a6392331ae
|
||
|
|
904ed7e317 | ||
|
|
f6093d9876 | ||
|
|
740a90536d | ||
|
|
26d1295006 | ||
|
|
352709cec6 |
@@ -17,6 +17,7 @@ events.ical
|
|||||||
.vscode/
|
.vscode/
|
||||||
events.html
|
events.html
|
||||||
events_archive.html
|
events_archive.html
|
||||||
|
nginx.pid
|
||||||
|
|
||||||
|
|
||||||
!site/lif*
|
!site/lif*
|
||||||
|
|||||||
@@ -383,3 +383,7 @@ datum, vreme, lokacija, tema, tip, link, temaEN
|
|||||||
17-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Mail server - 1. deo,workshop,, Mail server - part 1
|
17-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Mail server - 1. deo,workshop,, Mail server - part 1
|
||||||
24-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Film: Primer (2004),movie,,Movie: Primer (2004)
|
24-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Film: Primer (2004),movie,,Movie: Primer (2004)
|
||||||
31-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Lightning talks,lightning,,Lightning talks
|
31-08-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Lightning talks,lightning,,Lightning talks
|
||||||
|
07-09-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Sysadmin radionica,workshop,,Sysadmin workshop
|
||||||
|
14-09-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Druzenje,party,,Party
|
||||||
|
21-09-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876,Mail server - 2. deo,workshop,, Mail server - part 2
|
||||||
|
28-09-2026, 19:00, Xecut - Jovana Ćirilova 15 - Local 3 https://www.openstreetmap.org/node/11749277876, Hakaton, hack, https://wiki.dmz.rs/decentrala/dogadjaji/hakaton, Hackathon
|
||||||
|
|||||||
|
+31
-28
@@ -5,45 +5,45 @@
|
|||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/account">E-mail</a></td>
|
<td><a href="/account" target="_blank">E-mail</a></td>
|
||||||
<td>
|
<td>
|
||||||
E-mail account that you can use with any e-mail client (for example, with
|
E-mail account that you can use with any e-mail client (for example, with
|
||||||
the <a href="https://www.thunderbird.net/">Thunderbird</a>).
|
the <a href="https://www.thunderbird.net/" target="_blank">Thunderbird</a>).
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://forum.dmz.rs/">Forum</a></td>
|
<td><a href="https://forum.dmz.rs/" target="_blank">Forum</a></td>
|
||||||
<td>
|
<td>
|
||||||
Forum for general discussion and <a href="/events">event</a> organization.
|
Forum for general discussion and <a href="/events" target="_blank">event</a> organization.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/account">Chat</a></td>
|
<td><a href="/account" target="_blank">Chat</a></td>
|
||||||
<td>
|
<td>
|
||||||
We have our XMPP server, on which you can make an account. If you already
|
We have our XMPP server, on which you can make an account. If you already
|
||||||
have an account, you can find us at group
|
have an account, you can find us at group
|
||||||
<a href="decentrala@conference.dmz.rs">decentrala@conference.dmz.rs</a>.
|
<a href="decentrala@conference.dmz.rs" target="_blank">decentrala@conference.dmz.rs</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://gitea.dmz.rs/">Git</a></td>
|
<td><a href="https://gitea.dmz.rs/" target="_blank">Git</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://gitea.io/en-us/">Gitea</a> instance on which we host our
|
<a href="https://gitea.io/en-us/" target="_blank">Gitea</a> instance on which we host our
|
||||||
code and resources (including the code for this site).
|
code and resources (including the code for this site).
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://wiki.dmz.rs/">Wiki</a></td>
|
<td><a href="https://wiki.dmz.rs/" target="_blank">Wiki</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://js.wiki/">Wiki.js</a> instance on which we publish
|
<a href="https://js.wiki/" target="_blank">Wiki.js</a> instance on which we publish
|
||||||
documentation for our projects, <a href="/events">events</a> resources,
|
documentation for our projects, <a href="/events" target="_blank">events</a> resources,
|
||||||
and tutorials.
|
and tutorials.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://jitsi.dmz.rs/">Jitsi</a></td>
|
<td><a href="https://jitsi.dmz.rs/" target="_blank">Jitsi</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://jitsi.org/">Jitsi.org</a> meeting app, conferences, group video calls, online events, alternative
|
<a href="https://jitsi.org/" target="_blank">Jitsi.org</a> meeting app, conferences, group video calls, online events, alternative
|
||||||
to zoom.
|
to zoom.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -59,33 +59,36 @@
|
|||||||
<a href="https://cryptpad.org/">CryptPad</a> alternative to google office
|
<a href="https://cryptpad.org/">CryptPad</a> alternative to google office
|
||||||
</td>
|
</td>
|
||||||
</tr>-->
|
</tr>-->
|
||||||
<!--<tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://search.dmz.rs/">Search</a></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://github.com/searxng/searxg/">SearXNG</a> instance used for
|
|
||||||
Web searching.
|
|
||||||
</td>
|
|
||||||
</tr> -->
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://pastebin.dmz.rs/">Pastebin</a></td>
|
<td><a href="https://invidious.dmz.rs/" target="_blank">Invidious</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://privatebin.info/">PrivateBin</a> instance we use for
|
<a href="https://invidious.io/" target="_blank">Invidious</a>, alternative font-end to YouTube.
|
||||||
sharing text files
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="ssh://soft.dmz.rs:2222/">Soft Serve</a></td>
|
<td><a href="https://search.dmz.rs/" target="_blank">Search</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a>
|
<a href="https://github.com/searxng/searxg/" target="_blank">SearXNG</a> instance used for Web searching.
|
||||||
instance that we use as a replacement for the Gitea service. Soft Serve
|
</td>
|
||||||
works entirely from the terminal.
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://pastebin.dmz.rs/" target="_blank">Pastebin</a></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://privatebin.info/" target="_blank">PrivateBin</a> instance for sharing textal data, like codes, logs, etc.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="ssh://soft.dmz.rs:2222/" target="_blank">Soft Serve</a></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/charmbracelet/soft-serve" target="_blank">Soft Serve</a>
|
||||||
|
TUI git instance. Soft Serve works entirely from the terminal over ssh.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
These are some of the services we currently maintain on our servers. To use
|
These are some of the services we currently maintain on our servers. To use
|
||||||
these services, you can register for each service separately, or you can
|
these services, you can register for each service separately, or you can
|
||||||
create a unique <a href="/en/account">account</a>
|
create a unique <a href="/en/account" target="_blank">account</a>
|
||||||
on our server and use all services with the same account.
|
on our server and use all services with the same account.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
+32
-29
@@ -5,33 +5,33 @@
|
|||||||
<th>Opis</th>
|
<th>Opis</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/account">E-mail</a></td>
|
<td><a href="/account" target="_blank">E-mail</a></td>
|
||||||
<td>
|
<td>
|
||||||
E-mail nalog koji možeš da koristiš sa bilo kojim email klijentom
|
E-mail nalog koji možeš da koristiš sa bilo kojim email klijentom
|
||||||
generalne namene (na primer
|
generalne namene (na primer
|
||||||
<a href="https://www.thunderbird.net/">Thunderbird</a>-om).
|
<a href="https://www.thunderbird.net/" target="_blank">Thunderbird</a>-om).
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://forum.dmz.rs/">Forum</a></td>
|
<td><a href="https://forum.dmz.rs/" target="_blank">Forum</a></td>
|
||||||
<td>
|
<td>
|
||||||
Forum na kom obično organizujemo naše <a href="/events">događaje</a>.
|
Forum na kom obično organizujemo naše <a href="/events" target="_blank">događaje</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/account">Chat</a></td>
|
<td><a href="/account" target="_blank">Chat</a></td>
|
||||||
<td>
|
<td>
|
||||||
Održavamo sopstveni XMPP server, na kojem možeš da napraviš nalog. Ako već
|
Održavamo sopstveni XMPP server, na kojem možeš da napraviš nalog. Ako već
|
||||||
poseduješ nalog možeš da nas nađeš u grupi
|
poseduješ nalog možeš da nas nađeš u grupi
|
||||||
<a href="decentrala@conference.dmz.rs">decentrala@conference.dmz.rs</a>.
|
<a href="decentrala@conference.dmz.rs" target="_blank">decentrala@conference.dmz.rs</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://gitea.dmz.rs/">Git</a></td>
|
<td><a href="https://gitea.dmz.rs/" target="_blank">Git</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://gitea.io/en-us/">Gitea</a> instanca na kojoj držimo kôd
|
<a href="https://gitea.io/en-us/" target="_blank">Gitea</a> instanca na kojoj držimo kôd
|
||||||
kao i ostale resurse za naše <a href="/projects">projekte</a>,
|
kao i ostale resurse za naše <a href="/projects" target="_blank">projekte</a>,
|
||||||
<a href="/events">događaje</a>, kao i projekte naših prijatelja. Ovo može
|
<a href="/events" target="_blank">događaje</a>, kao i projekte naših prijatelja. Ovo može
|
||||||
biti dom tvog sledećeg projekta. Bolji od Github-a.
|
biti dom tvog sledećeg projekta. Bolji od Github-a.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
<td><a href="https://wiki.dmz.rs/">Wiki</a></td>
|
<td><a href="https://wiki.dmz.rs/">Wiki</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://js.wiki/">Wiki.js</a> instanca koju koristimo da
|
<a href="https://js.wiki/">Wiki.js</a> instanca koju koristimo da
|
||||||
dokumentujemo naše <a href="/projects">projekte</a> kao i ostale
|
dokumentujemo naše <a href="/projects" target="_blank">projekte</a> kao i ostale
|
||||||
<a href="/events">događaje</a>.
|
<a href="/events" target="_blank">događaje</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://jitsi.dmz.rs/">Jitsi</a></td>
|
<td><a href="https://jitsi.dmz.rs/" target="_blank">Jitsi</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://jitsi.org/">Jitsi.org</a> aplikacija za sastanke, groupne video pozive, online dogadjaje, alternativa za zoom.
|
<a href="https://jitsi.org/" target="_blank">Jitsi.org</a> aplikacija za sastanke, groupne video pozive, online dogadjaje, alternativa za zoom.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--<tr>
|
<!--<tr>
|
||||||
@@ -62,32 +62,35 @@
|
|||||||
<a href="https://cryptpad.org/">CryptPad</a> zamena za google office
|
<a href="https://cryptpad.org/">CryptPad</a> zamena za google office
|
||||||
</td>
|
</td>
|
||||||
<tr>-->
|
<tr>-->
|
||||||
<!--<tr>
|
|
||||||
<td><a href="https://search.dmz.rs/">Search</a></td>
|
|
||||||
<td>
|
|
||||||
<a href="https://github.com/searxng/searxng/">SearXNG</a> instanca koju
|
|
||||||
koristimo za pretraživanje Interneta. Zamena za Google.
|
|
||||||
</td>
|
|
||||||
</tr>-->
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://pastebin.dmz.rs/">Pastebin</a></td>
|
<td><a href="https://invidious.dmz.rs/" target="_blank">Invidious</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://privatebin.info/">PrivateBin</a> instanca koju koristimo
|
<a href="https://invidious.io/" target="_blank">Invidious</a> instanca kao alternativa za YouTube.
|
||||||
za brzo deljenje tekstualnih fajlova
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="ssh://soft.dmz.rs:2222/">Soft Serve</a></td>
|
<td><a href="https://search.dmz.rs/" target="_blank">Search</a></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a>
|
<a href="https://github.com/searxng/searxng/" target="_blank">SearXNG</a> instanca za pretraživanje Interneta. Zamena za Google.
|
||||||
instanca koju koristimo kao zamenu za Gitea servis. Soft Serve radi
|
</td>
|
||||||
potpuno iz terminala
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="https://pastebin.dmz.rs/" target="_blank">Pastebin</a></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://privatebin.info/" target="_blank">PrivateBin</a> instanca za brzo deljenje tekstualnih fajlova, kodova, logova i sl.
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="ssh://soft.dmz.rs:2222/" target="_blank">Soft Serve</a></td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/charmbracelet/soft-serve" target="_blank">Soft Serve</a>
|
||||||
|
TUI git instanca. Soft Serve radi potpuno iz terminala preko ssh.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
Ovo su neki od servisa koje trenutno održavamo na našim serverima. Da bi
|
Ovo su neki od servisa koje trenutno održavamo na našim serverima. Da bi
|
||||||
koristio ove servise, <em>možeš</em> da se registuješ na svaki servis posebno,
|
koristio ove servise, <em>možeš</em> da se registuješ na svaki servis posebno,
|
||||||
a možeš i da napraviš jedinstveni <a href="/account">nalog</a> na našem
|
a možeš i da napraviš jedinstveni <a href="/account" target="_blank">nalog</a> na našem
|
||||||
serveru i da koristiš sve servise sa istim nalogom.
|
serveru i da koristiš sve servise sa istim nalogom.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<link rel="stylesheet" href="/styles/style.css">
|
<link rel="stylesheet" href="/styles/style.css">
|
||||||
<link rel="stylesheet" href="/styles/404.css">
|
<link rel="stylesheet" href="/styles/404.css">
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
|
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
|
||||||
<script src="/scripts/main.js" defer></script>
|
<script src="/scripts/main.js"></script>
|
||||||
<title>404</title>
|
<title>404</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
+1
-11
@@ -1,16 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="sr">
|
<html lang="sr">
|
||||||
<head>
|
<head>
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
const theme = localStorage.getItem("theme");
|
|
||||||
const prefersDark = window.matchMedia(
|
|
||||||
"(prefers-color-scheme: dark)",
|
|
||||||
).matches;
|
|
||||||
if (theme === "dark" || (!theme && prefersDark))
|
|
||||||
document.documentElement.classList.add("dark");
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
@@ -42,7 +32,7 @@
|
|||||||
<link rel="stylesheet" href="/styles/style.css" />
|
<link rel="stylesheet" href="/styles/style.css" />
|
||||||
<link rel="stylesheet" href="/styles/deconference.css">
|
<link rel="stylesheet" href="/styles/deconference.css">
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||||
<script src="/scripts/main.js" defer></script>
|
<script src="/scripts/main.js"></script>
|
||||||
<title>Dekonferencija Decentrala</title>
|
<title>Dekonferencija Decentrala</title>
|
||||||
<link rel="alternate" hreflang="en" href="/en/deconference" />
|
<link rel="alternate" hreflang="en" href="/en/deconference" />
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
+45
-38
@@ -1,37 +1,49 @@
|
|||||||
window.addEventListener("DOMContentLoaded", () => {
|
(function () {
|
||||||
|
const theme = window.localStorage.getItem("theme");
|
||||||
|
const prefersDark = window?.matchMedia?.("(prefers-color-scheme: dark)").matches;
|
||||||
|
const isDark = theme === "dark" || (!theme && prefersDark);
|
||||||
|
|
||||||
|
if (isDark) document.documentElement.classList.add("dark");
|
||||||
|
|
||||||
|
// Swap images as soon as DOM is ready (script runs in <head>, imgs not parsed yet)
|
||||||
|
if (isDark) {
|
||||||
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
|
document.querySelectorAll("img[src*='-light']").forEach((img) => {
|
||||||
|
img.src = img.src.replace("-light", "-dark");
|
||||||
|
});
|
||||||
|
}, { once: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
window.changeTheme = (toDark) => {
|
||||||
|
if (toDark) {
|
||||||
|
window.localStorage.setItem("theme", "dark");
|
||||||
|
document.documentElement.classList.add("dark");
|
||||||
|
document.querySelectorAll("img[src*='-light']").forEach((img) => {
|
||||||
|
img.src = img.src.replace("-light", "-dark");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
window.localStorage.setItem("theme", "light");
|
||||||
|
document.documentElement.classList.remove("dark");
|
||||||
|
document.querySelectorAll("img[src*='-dark']").forEach((img) => {
|
||||||
|
img.src = img.src.replace("-dark", "-light");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
window.addEventListener("DOMContentLoaded", () => {
|
||||||
const getById = (id) => document.getElementById(id);
|
const getById = (id) => document.getElementById(id);
|
||||||
const getByClass = (className) => document.getElementsByClassName(className)[0];
|
const getByClass = (className) => document.getElementsByClassName(className)[0];
|
||||||
|
|
||||||
const themeBtn = getById("theme-switcher");
|
const themeBtn = getById("theme-switcher");
|
||||||
const hamburger = getByClass("hamburger");
|
const hamburger = getByClass("hamburger");
|
||||||
const hamburgerIcon = hamburger.children[0]
|
const hamburgerIcon = hamburger?.children[0];
|
||||||
const menu = document.getElementsByTagName("nav")[0];
|
const menu = document.getElementsByTagName("nav")[0];
|
||||||
const imgs = document.getElementsByTagName("img");
|
|
||||||
const main = document.getElementsByTagName("main")[0];
|
const main = document.getElementsByTagName("main")[0];
|
||||||
const isMenuOpen = () => hamburger.classList.contains("open");
|
const isMenuOpen = () => hamburger?.classList.contains("open");
|
||||||
const theme = window.localStorage.getItem("theme");
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
|
|
||||||
const changeToDarkTheme = () => {
|
|
||||||
window.localStorage.setItem("theme", "dark");
|
|
||||||
document.documentElement.classList.add("dark");
|
|
||||||
themeBtn?.setAttribute("title", "turn the light on");
|
|
||||||
Array.from(imgs).forEach((img) => {
|
|
||||||
if (img.src.includes("-light")) img.src = img.src.replace("-light", "-dark");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const changeToLightTheme = () => {
|
|
||||||
window.localStorage.setItem("theme", "light");
|
|
||||||
document.documentElement.classList.remove("dark");
|
|
||||||
themeBtn?.setAttribute("title", "turn the light off");
|
|
||||||
Array.from(imgs).forEach((img) => {
|
|
||||||
if (img.src.includes("-dark")) img.src = img.src.replace("-dark", "-light");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeMenu = () => {
|
const closeMenu = () => {
|
||||||
hamburger.classList = "hamburger closed"
|
hamburger.classList = "hamburger closed"
|
||||||
hamburgerIcon.src = hamburgerIcon.src.replace("opened", "closed");
|
hamburgerIcon.src = hamburgerIcon.src.replace("opened", "closed");
|
||||||
@@ -47,7 +59,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
/* Listeners */
|
/* Listeners */
|
||||||
|
|
||||||
window.addEventListener("resize", () => isMenuOpen() && closeMenu());
|
window.addEventListener("resize", () => isMenuOpen() && closeMenu());
|
||||||
main.addEventListener("click", () => isMenuOpen() && closeMenu());
|
if (main) main.addEventListener("click", () => isMenuOpen() && closeMenu());
|
||||||
|
|
||||||
/* Language persistence */
|
/* Language persistence */
|
||||||
const currentLang = document.documentElement.lang || "sr";
|
const currentLang = document.documentElement.lang || "sr";
|
||||||
@@ -63,23 +75,18 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
if (!href.startsWith(`/${currentLang}`)) {
|
if (!href.startsWith(`/${currentLang}`)) {
|
||||||
a.setAttribute("href", `/${currentLang}${href.slice(3)}`);
|
a.setAttribute("href", `/${currentLang}${href.slice(3)}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (currentLang !== "sr") {
|
||||||
// No language prefix, prepend currentLang
|
// Only prepend language prefix for non-default languages
|
||||||
a.setAttribute("href", `/${currentLang}${href}`);
|
a.setAttribute("href", `/${currentLang}${href}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
hamburger?.addEventListener("click", () => isMenuOpen() ? closeMenu() : openMenu());
|
hamburger?.addEventListener("click", () => isMenuOpen() ? closeMenu() : openMenu());
|
||||||
|
|
||||||
themeBtn.addEventListener("click", () => {
|
if (themeBtn) {
|
||||||
const title = themeBtn.getAttribute("title") ?? "off"
|
themeBtn.addEventListener("click", () => {
|
||||||
if (title.indexOf("off") !== -1) changeToDarkTheme();
|
const isDark = document.documentElement.classList.contains("dark");
|
||||||
else changeToLightTheme();
|
changeTheme(!isDark);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
/* Rest */
|
});
|
||||||
|
|
||||||
const userPerfersDark = window?.matchMedia?.("(prefers-color-scheme: dark)").matches
|
|
||||||
if (!theme && userPerfersDark) changeToDarkTheme();
|
|
||||||
else theme === "light" ? changeToLightTheme() : changeToDarkTheme();
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
const theme = localStorage.getItem("theme");
|
|
||||||
const prefersDark = window.matchMedia(
|
|
||||||
"(prefers-color-scheme: dark)",
|
|
||||||
).matches;
|
|
||||||
if (theme === "dark" || (!theme && prefersDark))
|
|
||||||
document.documentElement.classList.add("dark");
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
|
|||||||
+1
-11
@@ -1,16 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="sr">
|
<html lang="sr">
|
||||||
<head>
|
<head>
|
||||||
<script>
|
|
||||||
(function () {
|
|
||||||
const theme = localStorage.getItem("theme");
|
|
||||||
const prefersDark = window.matchMedia(
|
|
||||||
"(prefers-color-scheme: dark)",
|
|
||||||
).matches;
|
|
||||||
if (theme === "dark" || (!theme && prefersDark))
|
|
||||||
document.documentElement.classList.add("dark");
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
@@ -42,7 +32,7 @@
|
|||||||
<link rel="stylesheet" href="/styles/style.css" />
|
<link rel="stylesheet" href="/styles/style.css" />
|
||||||
<!--ADDITIONAL_STYLE-->
|
<!--ADDITIONAL_STYLE-->
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||||
<script src="/scripts/main.js" defer></script>
|
<script src="/scripts/main.js"></script>
|
||||||
<title><!--TITLE--> Decentrala</title>
|
<title><!--TITLE--> Decentrala</title>
|
||||||
<link rel="alternate" hreflang="en" href="/en/PAGE_NAME" />
|
<link rel="alternate" hreflang="en" href="/en/PAGE_NAME" />
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user