mirror of
https://github.com/neon-mmd/websurfx.git
synced 2024-12-22 20:38:22 -05:00
30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Websurfx</title>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<!-- <link href="static/colorschemes/{{colorscheme}}.css" rel="stylesheet" type="text/css" /> -->
|
|
<!-- <link href="static/themes/{{theme}}.css" rel="stylesheet" type="text/css" /> -->
|
|
</head>
|
|
|
|
<body>
|
|
<header>{{>navbar}}</header>
|
|
<script>
|
|
const cookies = document.cookie.split(';').map(item => item.split('=')).
|
|
reduce((acc, [k, v]) => (acc[k.trim().replace('"', '')] = v) && acc, {});
|
|
// Load colorscheme and theme from cookie
|
|
function addCss(fileName) {
|
|
var head = document.head;
|
|
var link = document.createElement("link");
|
|
|
|
link.type = "text/css";
|
|
link.rel = "stylesheet";
|
|
link.href = fileName;
|
|
|
|
head.appendChild(link);
|
|
}
|
|
addCss('static/themes/'+ (cookies["theme"] || {{theme}}) + '.css');
|
|
addCss('static/colorschemes/'+ (cookies["color-sch"] || {{colorscheme}}) + '.css');
|
|
</script>
|