diff --git a/static/404.html b/static/404.html index 57db2e9..ccf9eb9 100644 --- a/static/404.html +++ b/static/404.html @@ -1 +1,25 @@ -404 \ No newline at end of file + + + + + + + + + + 404 Error | Polaris + + + +
+ Home + Games + Apps + Search + Settings +
+ + + + + \ No newline at end of file diff --git a/static/apps.html b/static/apps.html index 03736e3..5c9b984 100644 --- a/static/apps.html +++ b/static/apps.html @@ -1 +1,25 @@ -apps \ No newline at end of file + + + + + + + + + + Apps | Polaris + + + +
+ Home + Games + Apps + Search + Settings +
+ + + + + \ No newline at end of file diff --git a/static/assets/css/fonts.css b/static/assets/css/fonts.css index e69de29..27cae45 100644 --- a/static/assets/css/fonts.css +++ b/static/assets/css/fonts.css @@ -0,0 +1,101 @@ +/*Font template:*/ + +@font-face { + font-family: 'fontname'; + src: url('/assets/fonts/fontname.woff2') format('woff2'), + url('/assets/fonts/fontname.woff') format('woff'); + font-weight: normal; + font-style: normal; +} + +/*Lato*/ + +@font-face { + font-family: 'Lato-LightItalic'; + src: url('/assets/fonts/Lato-LightItalic.woff2') format('woff2'), + url('/assets/fonts/Lato-LightItalic.woff') format('woff'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato-Hairline'; + src: url('/assets/fonts/Lato-Hairline.woff2') format('woff2'), + url('/assets/fonts/Lato-Hairline.woff') format('woff'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato-BoldItalic'; + src: url('/assets/fonts/Lato-BoldItalic.woff2') format('woff2'), + url('/assets/fonts/Lato-BoldItalic.woff') format('woff'); + font-weight: bold; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato-Light'; + src: url('/assets/fonts/Lato-Light.woff2') format('woff2'), + url('/assets/fonts/Lato-Light.woff') format('woff'); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato-HairlineItalic'; + src: url('/assets/fonts/Lato-HairlineItalic.woff2') format('woff2'), + url('/assets/fonts/Lato-HairlineItalic.woff') format('woff'); + font-weight: 300; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato-Italic'; + src: url('/assets/fonts/Lato-Italic.woff2') format('woff2'), + url('/assets/fonts/Lato-Italic.woff') format('woff'); + font-weight: normal; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato'; + src: url('/assets/fonts/Lato-Regular.woff2') format('woff2'), + url('/assets/fonts/Lato-Regular.woff') format('woff'); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato-BlackItalic'; + src: url('/assets/fonts/Lato-BlackItalic.woff2') format('woff2'), + url('/assets/fonts/Lato-BlackItalic.woff') format('woff'); + font-weight: 900; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: 'Lato-Black'; + src: url('/assets/fonts/Lato-Black.woff2') format('woff2'), + url('/assets/fonts/Lato-Black.woff') format('woff'); + font-weight: 900; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: 'Lato-Bold'; + src: url('/assets/fonts/Lato-Bold.woff2') format('woff2'), + url('/assets/fonts/Lato-Bold.woff') format('woff'); + font-weight: bold; + font-style: normal; + font-display: swap; +} \ No newline at end of file diff --git a/static/assets/css/main.css b/static/assets/css/main.css index 18341e6..21e74ca 100644 --- a/static/assets/css/main.css +++ b/static/assets/css/main.css @@ -1,2 +1,8 @@ @import url('/assets/css/fonts.css'); -@import url('/assets/css/themes.css'); \ No newline at end of file +@import url('/assets/css/themes.css'); + +/*Please try to keep this organized*/ + +* { + font-family: 'Lato'; +} \ No newline at end of file diff --git a/static/assets/css/themes.css b/static/assets/css/themes.css index e69de29..e2e85a2 100644 --- a/static/assets/css/themes.css +++ b/static/assets/css/themes.css @@ -0,0 +1,8 @@ +/* +Here is the theme template. +Make sure there is a space between the theme selector and the target. +*/ + +body[data-theme="theme name"] .exampleclass { + content: 'examplecontent'; +} \ No newline at end of file diff --git a/static/assets/fonts/Lato-Black.woff b/static/assets/fonts/Lato-Black.woff new file mode 100644 index 0000000..9081ce9 Binary files /dev/null and b/static/assets/fonts/Lato-Black.woff differ diff --git a/static/assets/fonts/Lato-Black.woff2 b/static/assets/fonts/Lato-Black.woff2 new file mode 100644 index 0000000..c54fa1b Binary files /dev/null and b/static/assets/fonts/Lato-Black.woff2 differ diff --git a/static/assets/fonts/Lato-BlackItalic.woff b/static/assets/fonts/Lato-BlackItalic.woff new file mode 100644 index 0000000..38b961a Binary files /dev/null and b/static/assets/fonts/Lato-BlackItalic.woff differ diff --git a/static/assets/fonts/Lato-BlackItalic.woff2 b/static/assets/fonts/Lato-BlackItalic.woff2 new file mode 100644 index 0000000..66b84e8 Binary files /dev/null and b/static/assets/fonts/Lato-BlackItalic.woff2 differ diff --git a/static/assets/fonts/Lato-Bold.woff b/static/assets/fonts/Lato-Bold.woff new file mode 100644 index 0000000..34e6e2e Binary files /dev/null and b/static/assets/fonts/Lato-Bold.woff differ diff --git a/static/assets/fonts/Lato-Bold.woff2 b/static/assets/fonts/Lato-Bold.woff2 new file mode 100644 index 0000000..62db94a Binary files /dev/null and b/static/assets/fonts/Lato-Bold.woff2 differ diff --git a/static/assets/fonts/Lato-BoldItalic.woff b/static/assets/fonts/Lato-BoldItalic.woff new file mode 100644 index 0000000..351c649 Binary files /dev/null and b/static/assets/fonts/Lato-BoldItalic.woff differ diff --git a/static/assets/fonts/Lato-BoldItalic.woff2 b/static/assets/fonts/Lato-BoldItalic.woff2 new file mode 100644 index 0000000..6736720 Binary files /dev/null and b/static/assets/fonts/Lato-BoldItalic.woff2 differ diff --git a/static/assets/fonts/Lato-Hairline.woff b/static/assets/fonts/Lato-Hairline.woff new file mode 100644 index 0000000..bfd09fa Binary files /dev/null and b/static/assets/fonts/Lato-Hairline.woff differ diff --git a/static/assets/fonts/Lato-Hairline.woff2 b/static/assets/fonts/Lato-Hairline.woff2 new file mode 100644 index 0000000..195dd46 Binary files /dev/null and b/static/assets/fonts/Lato-Hairline.woff2 differ diff --git a/static/assets/fonts/Lato-HairlineItalic.woff b/static/assets/fonts/Lato-HairlineItalic.woff new file mode 100644 index 0000000..8e111af Binary files /dev/null and b/static/assets/fonts/Lato-HairlineItalic.woff differ diff --git a/static/assets/fonts/Lato-HairlineItalic.woff2 b/static/assets/fonts/Lato-HairlineItalic.woff2 new file mode 100644 index 0000000..e013192 Binary files /dev/null and b/static/assets/fonts/Lato-HairlineItalic.woff2 differ diff --git a/static/assets/fonts/Lato-Italic.woff b/static/assets/fonts/Lato-Italic.woff new file mode 100644 index 0000000..0426260 Binary files /dev/null and b/static/assets/fonts/Lato-Italic.woff differ diff --git a/static/assets/fonts/Lato-Italic.woff2 b/static/assets/fonts/Lato-Italic.woff2 new file mode 100644 index 0000000..3efb9b8 Binary files /dev/null and b/static/assets/fonts/Lato-Italic.woff2 differ diff --git a/static/assets/fonts/Lato-Light.woff b/static/assets/fonts/Lato-Light.woff new file mode 100644 index 0000000..0255d21 Binary files /dev/null and b/static/assets/fonts/Lato-Light.woff differ diff --git a/static/assets/fonts/Lato-Light.woff2 b/static/assets/fonts/Lato-Light.woff2 new file mode 100644 index 0000000..8399ffc Binary files /dev/null and b/static/assets/fonts/Lato-Light.woff2 differ diff --git a/static/assets/fonts/Lato-LightItalic.woff b/static/assets/fonts/Lato-LightItalic.woff new file mode 100644 index 0000000..5aa2597 Binary files /dev/null and b/static/assets/fonts/Lato-LightItalic.woff differ diff --git a/static/assets/fonts/Lato-LightItalic.woff2 b/static/assets/fonts/Lato-LightItalic.woff2 new file mode 100644 index 0000000..04dd3d0 Binary files /dev/null and b/static/assets/fonts/Lato-LightItalic.woff2 differ diff --git a/static/assets/fonts/Lato-Regular.woff b/static/assets/fonts/Lato-Regular.woff new file mode 100644 index 0000000..2a871bc Binary files /dev/null and b/static/assets/fonts/Lato-Regular.woff differ diff --git a/static/assets/fonts/Lato-Regular.woff2 b/static/assets/fonts/Lato-Regular.woff2 new file mode 100644 index 0000000..c3c8e03 Binary files /dev/null and b/static/assets/fonts/Lato-Regular.woff2 differ diff --git a/static/assets/js/main.js b/static/assets/js/main.js index 49611e6..f1d5a10 100644 --- a/static/assets/js/main.js +++ b/static/assets/js/main.js @@ -1,3 +1,7 @@ +import * as 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') { @@ -5,33 +9,23 @@ document.querySelectorAll('a').forEach(a => { } if (a.href.startsWith(location.origin)) { - console.log(location.href); + fetch(a.href) + .then(res => res.text()) + .then(content => { + setTimeout(() => { + console.log('a'); - if (location.href !== a.href) { - fetch(a.href) - .then(res => res.text()) - .then(content => { - setTimeout(() => { - console.log('a'); + window.history.pushState({}, '', a.href); - window.history.pushState({}, '', a.href); - - document.documentElement.innerHTML = content; - }, 500); - }).catch(e => { - console.log('c'); - - a.setAttribute('data-link', 'true'); - a.click(); - }); - } else { - alert('whyyyyy'); - } + document.documentElement.innerHTML = content; + }, 500); + }).catch(e => { + a.setAttribute('data-link', 'true'); + a.click(); + }); } else { - console.log('d'); - a.setAttribute('data-link', 'true'); - //a.click(); + a.click(); } } }); \ No newline at end of file diff --git a/static/assets/js/themes.js b/static/assets/js/themes.js new file mode 100644 index 0000000..6b40ff8 --- /dev/null +++ b/static/assets/js/themes.js @@ -0,0 +1,23 @@ +class Theme { + constructor() { + this.theme = localStorage.getItem('theme'); + + if (this.theme) { + this.set(this.theme); + } else { + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + this.set('dark'); + } else { + this.set('light'); + } + } + } + + set = (theme) => { + document.body.setAttribute('data-theme', theme); + + localStorage.setItem('theme', theme); + } +} + +export default new Theme(); \ No newline at end of file diff --git a/static/games.html b/static/games.html index 16c9d11..886bc15 100644 --- a/static/games.html +++ b/static/games.html @@ -1 +1,25 @@ -games \ No newline at end of file + + + + + + + + + + Games | Polaris + + + +
+ Home + Games + Apps + Search + Settings +
+ + + + + \ No newline at end of file diff --git a/static/index.html b/static/index.html index 7ec5724..48645c1 100644 --- a/static/index.html +++ b/static/index.html @@ -11,10 +11,15 @@ +
+ Home + Games + Apps + Search + Settings +
- games - - + \ No newline at end of file diff --git a/static/search.html b/static/search.html new file mode 100644 index 0000000..b40056c --- /dev/null +++ b/static/search.html @@ -0,0 +1,25 @@ + + + + + + + + + + Search | Polaris + + + +
+ Home + Games + Apps + Search + Settings +
+ + + + + \ No newline at end of file