This commit is contained in:
Russell2259
2023-05-02 07:35:42 -06:00
parent 1f5ba3192a
commit 390d130a2f
16 changed files with 97 additions and 58 deletions
+3 -6
View File
@@ -5,18 +5,15 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/main.css">
<title>404 Error | Polaris</title>
</head>
<body>
<div>
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
<div class="content">
</div>
<script src="/assets/js/main.js" type="module"></script>
Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

+3 -6
View File
@@ -5,18 +5,15 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/main.css">
<title>Apps | Polaris</title>
</head>
<body>
<div>
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
<div class="content">
</div>
<script src="/assets/js/main.js" type="module"></script>
+26
View File
@@ -5,4 +5,30 @@
* {
font-family: 'Lato';
}
html,
body {
margin: 0px;
}
.navbar {
width: calc(100%-margin);
position: sticky;
display: flex;
justify-content: space-between;
margin: 10px;
}
.navbar>.title>img {
width: 75px;
border-radius: 10px;
}
.navbar>.title>span {
font-family: 'Lato-Black';
font-size: 60px;
margin-left: 13px;
position: relative;
bottom: 13px;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

+41 -28
View File
@@ -1,31 +1,44 @@
import * as theme from '/assets/js/themes.js';
import Theme from '/assets/js/themes.js';
/*Please link all javascript files here using import*/
//Someone should put this code somewhere
document.querySelectorAll('a').forEach(a => {
a.onclick = (e) => {
if (a.dataset.link !== 'true') {
e.preventDefault();
console.log(Theme);
fetch('/assets/misc/nav.html')
.then(res => res.text())
.then(content => {
document.body.insertAdjacentHTML('afterbegin', content);
}).catch(e => {
alert('Failed to load navbar');
if (confirm('Try again?')) location.reload();
})
/*setTimeout(() => {
document.querySelectorAll('a').forEach(a => {
a.onclick = (e) => {
if (a.dataset.link !== 'true') {
e.preventDefault();
}
if (a.href.startsWith(location.origin)) {
if (window.location.href !== a.href) {
fetch(a.href)
.then(res => res.text())
.then(content => {
setTimeout(() => {
window.history.pushState({}, '', a.href);
document.documentElement.innerHTML = content;
}, 500);
}).catch(e => {
a.setAttribute('data-link', 'true');
a.click();
});
}
} else {
a.setAttribute('data-link', 'true');
a.click();
}
}
if (a.href.startsWith(location.origin)) {
fetch(a.href)
.then(res => res.text())
.then(content => {
setTimeout(() => {
console.log('a');
window.history.pushState({}, '', a.href);
document.documentElement.innerHTML = content;
}, 500);
}).catch(e => {
a.setAttribute('data-link', 'true');
a.click();
});
} else {
a.setAttribute('data-link', 'true');
a.click();
}
}
});
});
}, 500)*/
+14
View File
@@ -0,0 +1,14 @@
<div class="navbar">
<a class="title" href="/">
<img src="/assets/img/logo.png" />
<span>Polaris</span>
</a>
<div class="end">
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
</div>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

+3 -6
View File
@@ -5,18 +5,15 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/main.css">
<title>Games | Polaris</title>
</head>
<body>
<div>
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
<div class="content">
</div>
<script src="/assets/js/main.js" type="module"></script>
+3 -6
View File
@@ -5,18 +5,15 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/main.css">
<title>Home | Polaris</title>
</head>
<body>
<div>
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
<div class="content">
</div>
<script src="/assets/js/main.js" type="module"></script>
+3 -6
View File
@@ -5,18 +5,15 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/main.css">
<title>Search | Polaris</title>
</head>
<body>
<div>
<a href="/">Home</a>
<a href="/games">Games</a>
<a href="/apps">Apps</a>
<a href="/search">Search</a>
<a href="#settings">Settings</a>
<div class="content">
</div>
<script src="/assets/js/main.js" type="module"></script>
+1
View File
@@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}