diff --git a/index.html b/index.html index fe57404..53f9168 100644 --- a/index.html +++ b/index.html @@ -1,29 +1,211 @@ - - - - - - - - - - + + + + - Apexie's Hub - - -
- - - + + + + + + + Apexie's Hub + + + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/package.json b/package.json index 2793cde..3b899ce 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,15 @@ "preview": "vite preview" }, "devDependencies": { + "@types/bootstrap": "^5.2.6", + "@types/jquery": "^3.5.14", + "bootstrap": "^5.2.3", + "pocketbase": "^0.8.0", + "sass": "^1.56.1", "typescript": "^4.6.4", "vite": "^3.2.3" + }, + "dependencies": { + "@popperjs/core": "^2.11.6" } } \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 987f91f..f380627 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,12 +1,26 @@ lockfileVersion: 5.4 specifiers: + '@popperjs/core': ^2.11.6 + '@types/bootstrap': ^5.2.6 + '@types/jquery': ^3.5.14 + bootstrap: ^5.2.3 + pocketbase: ^0.8.0 + sass: ^1.56.1 typescript: ^4.6.4 vite: ^3.2.3 +dependencies: + '@popperjs/core': 2.11.6 + devDependencies: + '@types/bootstrap': 5.2.6 + '@types/jquery': 3.5.14 + bootstrap: 5.2.3_@popperjs+core@2.11.6 + pocketbase: 0.8.0 + sass: 1.56.1 typescript: 4.9.3 - vite: 3.2.4 + vite: 3.2.4_sass@1.56.1 packages: @@ -28,6 +42,68 @@ packages: dev: true optional: true + /@popperjs/core/2.11.6: + resolution: {integrity: sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==} + + /@types/bootstrap/5.2.6: + resolution: {integrity: sha512-BlAc3YATdasbHoxMoBWODrSF6qwQO/E9X8wVxCCSa6rWjnaZfpkr2N6pUMCY6jj2+wf0muUtLySbvU9etX6YqA==} + dependencies: + '@popperjs/core': 2.11.6 + dev: true + + /@types/jquery/3.5.14: + resolution: {integrity: sha512-X1gtMRMbziVQkErhTQmSe2jFwwENA/Zr+PprCkF63vFq+Yt5PZ4AlKqgmeNlwgn7dhsXEK888eIW2520EpC+xg==} + dependencies: + '@types/sizzle': 2.3.3 + dev: true + + /@types/sizzle/2.3.3: + resolution: {integrity: sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==} + dev: true + + /anymatch/3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /bootstrap/5.2.3_@popperjs+core@2.11.6: + resolution: {integrity: sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==} + peerDependencies: + '@popperjs/core': ^2.11.6 + dependencies: + '@popperjs/core': 2.11.6 + dev: true + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /chokidar/3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /esbuild-android-64/0.15.15: resolution: {integrity: sha512-F+WjjQxO+JQOva3tJWNdVjouFMLK6R6i5gjDvgUthLYJnIZJsp1HlF523k73hELY20WPyEO8xcz7aaYBVkeg5Q==} engines: {node: '>=12'} @@ -238,6 +314,13 @@ packages: esbuild-windows-arm64: 0.15.15 dev: true + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + /fsevents/2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -250,6 +333,13 @@ packages: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} @@ -257,18 +347,51 @@ packages: function-bind: 1.1.1 dev: true + /immutable/4.1.0: + resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==} + dev: true + + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + /is-core-module/2.11.0: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 dev: true + /is-extglob/2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + /nanoid/3.3.4: resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true @@ -277,6 +400,15 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true + /picomatch/2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pocketbase/0.8.0: + resolution: {integrity: sha512-LMuV46YcuG4bDZ1DNeUkvbaS5MWLZ1gpmccn6rYIg50n1bQ/BZJ9ip6SMJqo7xRGkPSL4kk1RP/zCkiG6g37Lg==} + dev: true + /postcss/8.4.19: resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==} engines: {node: ^10 || ^12 || >=14} @@ -286,6 +418,13 @@ packages: source-map-js: 1.0.2 dev: true + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + /resolve/1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true @@ -303,6 +442,16 @@ packages: fsevents: 2.3.2 dev: true + /sass/1.56.1: + resolution: {integrity: sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + immutable: 4.1.0 + source-map-js: 1.0.2 + dev: true + /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -313,13 +462,20 @@ packages: engines: {node: '>= 0.4'} dev: true + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + /typescript/4.9.3: resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} engines: {node: '>=4.2.0'} hasBin: true dev: true - /vite/3.2.4: + /vite/3.2.4_sass@1.56.1: resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -348,6 +504,7 @@ packages: postcss: 8.4.19 resolve: 1.22.1 rollup: 2.79.1 + sass: 1.56.1 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/public/assets/css/style.css b/public/assets/css/style.css new file mode 100644 index 0000000..e18b206 --- /dev/null +++ b/public/assets/css/style.css @@ -0,0 +1,45 @@ +body::before { + display: block; + content: ''; + height: 60px; +} + +@media (min-width: 768px) { + .news-input { + width: 50%; + } +} + +@media all and (min-width: 992px) { + .dropdown-menu li { + position: relative; + } + + .nav-item .submenu { + display: none; + position: absolute; + left: 100%; + top: -7px; + } + + .nav-item .submenu-left { + right: 100%; + left: auto; + } + + .dropdown-menu>li:hover { + background-color: #f1f1f1 + } + + .dropdown-menu>li:hover>.submenu { + display: block; + } +} + +@media (max-width: 991px) { + .dropdown-menu .dropdown-menu { + margin-left: 0.7rem; + margin-right: 0.7rem; + margin-bottom: .5rem; + } +} \ No newline at end of file diff --git a/public/assets/img/favicon.png b/public/assets/img/favicon.png new file mode 100644 index 0000000..cd647b0 Binary files /dev/null and b/public/assets/img/favicon.png differ diff --git a/public/assets/img/gaming.png b/public/assets/img/gaming.png new file mode 100644 index 0000000..29339c9 Binary files /dev/null and b/public/assets/img/gaming.png differ diff --git a/public/assets/img/osu!stream.jpg b/public/assets/img/osu!stream.jpg new file mode 100644 index 0000000..5eec344 Binary files /dev/null and b/public/assets/img/osu!stream.jpg differ diff --git a/public/assets/img/pwa/apple-icon-180.png b/public/assets/img/pwa/apple-icon-180.png new file mode 100644 index 0000000..02c6f94 Binary files /dev/null and b/public/assets/img/pwa/apple-icon-180.png differ diff --git a/public/assets/img/pwa/apple-splash-1125-2436.jpg b/public/assets/img/pwa/apple-splash-1125-2436.jpg new file mode 100644 index 0000000..e3340a0 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1125-2436.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1136-640.jpg b/public/assets/img/pwa/apple-splash-1136-640.jpg new file mode 100644 index 0000000..ed9043c Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1136-640.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1170-2532.jpg b/public/assets/img/pwa/apple-splash-1170-2532.jpg new file mode 100644 index 0000000..ad56c9f Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1170-2532.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1242-2208.jpg b/public/assets/img/pwa/apple-splash-1242-2208.jpg new file mode 100644 index 0000000..15383a8 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1242-2208.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1242-2688.jpg b/public/assets/img/pwa/apple-splash-1242-2688.jpg new file mode 100644 index 0000000..cf94a54 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1242-2688.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1284-2778.jpg b/public/assets/img/pwa/apple-splash-1284-2778.jpg new file mode 100644 index 0000000..b5f8a04 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1284-2778.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1334-750.jpg b/public/assets/img/pwa/apple-splash-1334-750.jpg new file mode 100644 index 0000000..5249b66 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1334-750.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1536-2048.jpg b/public/assets/img/pwa/apple-splash-1536-2048.jpg new file mode 100644 index 0000000..9194177 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1536-2048.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1620-2160.jpg b/public/assets/img/pwa/apple-splash-1620-2160.jpg new file mode 100644 index 0000000..5795df4 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1620-2160.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1668-2224.jpg b/public/assets/img/pwa/apple-splash-1668-2224.jpg new file mode 100644 index 0000000..3b50f93 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1668-2224.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1668-2388.jpg b/public/assets/img/pwa/apple-splash-1668-2388.jpg new file mode 100644 index 0000000..ca6f943 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1668-2388.jpg differ diff --git a/public/assets/img/pwa/apple-splash-1792-828.jpg b/public/assets/img/pwa/apple-splash-1792-828.jpg new file mode 100644 index 0000000..a90bbaa Binary files /dev/null and b/public/assets/img/pwa/apple-splash-1792-828.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2048-1536.jpg b/public/assets/img/pwa/apple-splash-2048-1536.jpg new file mode 100644 index 0000000..c6fd4f8 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2048-1536.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2048-2732.jpg b/public/assets/img/pwa/apple-splash-2048-2732.jpg new file mode 100644 index 0000000..28130c3 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2048-2732.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2160-1620.jpg b/public/assets/img/pwa/apple-splash-2160-1620.jpg new file mode 100644 index 0000000..639cf1c Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2160-1620.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2208-1242.jpg b/public/assets/img/pwa/apple-splash-2208-1242.jpg new file mode 100644 index 0000000..2daf181 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2208-1242.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2224-1668.jpg b/public/assets/img/pwa/apple-splash-2224-1668.jpg new file mode 100644 index 0000000..f18b2a5 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2224-1668.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2388-1668.jpg b/public/assets/img/pwa/apple-splash-2388-1668.jpg new file mode 100644 index 0000000..0908220 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2388-1668.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2436-1125.jpg b/public/assets/img/pwa/apple-splash-2436-1125.jpg new file mode 100644 index 0000000..3a03d54 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2436-1125.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2532-1170.jpg b/public/assets/img/pwa/apple-splash-2532-1170.jpg new file mode 100644 index 0000000..a1662ad Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2532-1170.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2688-1242.jpg b/public/assets/img/pwa/apple-splash-2688-1242.jpg new file mode 100644 index 0000000..91956c9 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2688-1242.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2732-2048.jpg b/public/assets/img/pwa/apple-splash-2732-2048.jpg new file mode 100644 index 0000000..95d6cec Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2732-2048.jpg differ diff --git a/public/assets/img/pwa/apple-splash-2778-1284.jpg b/public/assets/img/pwa/apple-splash-2778-1284.jpg new file mode 100644 index 0000000..137f0bb Binary files /dev/null and b/public/assets/img/pwa/apple-splash-2778-1284.jpg differ diff --git a/public/assets/img/pwa/apple-splash-640-1136.jpg b/public/assets/img/pwa/apple-splash-640-1136.jpg new file mode 100644 index 0000000..4a5d45e Binary files /dev/null and b/public/assets/img/pwa/apple-splash-640-1136.jpg differ diff --git a/public/assets/img/pwa/apple-splash-750-1334.jpg b/public/assets/img/pwa/apple-splash-750-1334.jpg new file mode 100644 index 0000000..d0fd895 Binary files /dev/null and b/public/assets/img/pwa/apple-splash-750-1334.jpg differ diff --git a/public/assets/img/pwa/apple-splash-828-1792.jpg b/public/assets/img/pwa/apple-splash-828-1792.jpg new file mode 100644 index 0000000..3731fbe Binary files /dev/null and b/public/assets/img/pwa/apple-splash-828-1792.jpg differ diff --git a/public/assets/img/pwa/manifest-icon-192.maskable.png b/public/assets/img/pwa/manifest-icon-192.maskable.png new file mode 100644 index 0000000..a160124 Binary files /dev/null and b/public/assets/img/pwa/manifest-icon-192.maskable.png differ diff --git a/public/assets/img/pwa/manifest-icon-512.maskable.png b/public/assets/img/pwa/manifest-icon-512.maskable.png new file mode 100644 index 0000000..aefe82c Binary files /dev/null and b/public/assets/img/pwa/manifest-icon-512.maskable.png differ diff --git a/redirect.html b/redirect.html new file mode 100644 index 0000000..e499f2b --- /dev/null +++ b/redirect.html @@ -0,0 +1,44 @@ + + + + + OAuth2 redirect page + + +
Authenticating...
+ + + + + \ No newline at end of file diff --git a/src/homepage.ts b/src/homepage.ts new file mode 100644 index 0000000..186e6e3 --- /dev/null +++ b/src/homepage.ts @@ -0,0 +1,142 @@ +import './scss/styles.scss' + +document.querySelector('#main-app')!.innerHTML = ` +
+
+
+
+

Join the best community ever

+

+ We want to deliver the best experiences to you and + create the best place to find new friends and play with your friends. +

+ +
+ +
+
+
+ + +
+
+
+
+
+
+
+ +
+

Gaming

+

+ Our community mostly plays Minecraft, but we like to play other games too. + You can bring new games to life in our community. +

+ Join the fun +
+
+
+
+
+
+
+ +
+

Chatting

+

+ We also have fun by chatting with other people + in the community. You can talk about anything you want (except, you know...). +

+ Chat with us +
+
+
+
+
+
+
+ +
+

Coding

+

+ We love coding and also open source projects, and that's why we have a + GitHub page where we share most of our projects with you. +

+ Contribute +
+
+
+
+
+
+ + +
+
+
+
+ +
+
+

osu!stream revived

+

+ The best take on an osu!stream port + that you can find. +

+

+ This project tries to make the best osu!stream port for Android. Since the source code is + available on GitHub, + we decided to fork the project and optimize it to support multiple feature and to fix some of + the issues of the + original project. +

+ + Download + +
+
+
+
+ +
+
+
+
+

Plenus

+

+ The best Discord bot that you can find. + It's simple to use and also open source. +

+

+ With Plenus, you can take your Discord server to another level. It offers features like + role buttons, music, moderation, logs, and more. Plenus is also open source, that means we make + money + only from donations from the Ko-fi + page. +

+ + Learn more + +
+
+ +
+
+
+
+ + +` \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 2145143..9e02c6b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,60 @@ -import './style.css' +import './scss/styles.scss' +import * as bootstrap from 'bootstrap' +import pocketbase from 'pocketbase' -document.querySelector('#app')!.innerHTML = ` -` +const pb_url = 'https://imlighty-redesigned-enigma-75x56qwx6rhrv7v-8090.preview.app.github.dev/' +const pb = new pocketbase(pb_url) +const redirectUrl = 'https://imlighty-redesigned-enigma-75x56qwx6rhrv7v-5173.preview.app.github.dev/redirect.html' + +// Warning for users who open the DevTools console of the website +console.log("%cWARNING!!!" + + "\n\n%cThis console is meant to be used by developers to debug their code. If someone else tells you to open the DevTools and paste code here, please do not do so.", + "color: red; font-size: 30px;", + "color: black; font-size: 15px;") + +let gdprConsent = localStorage.getItem("apexie-gdprconsent")! +let gdprConsentModal = new bootstrap.Modal(document.getElementById("gdprconsent")!) + +async function loadLinks() { + const authMethods = await pb.collection('users').listAuthMethods() + const listItems: any = [] + + for (const provider of authMethods.authProviders) { + const $li = $(`
  • Login with ${provider.name}
  • `) + + $li.find('a') + .attr('href', provider.authUrl + redirectUrl) + .data('provider', provider) + .on('click', function () { + // store provider's data on click for verification in the redirect page + localStorage.setItem('provider', JSON.stringify($(this).data('provider'))) + }) + + listItems.push($li) + } + + $('#login-list').html(listItems.length ? listItems : '
  • No OAuth2 providers.
  • ') + +} + +document.getElementById('login_button')!.addEventListener('click', () => loadLinks()) + +let login_error = document.querySelector('#login-error')! + +document.getElementById('account-login')!.addEventListener('click', async () => { + login_error.innerHTML = '' + await pb.collection('users').authWithPassword((document.getElementById('account-email')!).value, (document.getElementById('account-password')!).value).catch((err) => { + login_error.innerHTML = 'Failed to authenticate. Please try again.

    ' + document.querySelector('#account-password')!.value = '' + }) +}) + +if (!gdprConsent) { + gdprConsentModal.show() + const gdprConsentButton = document.getElementById("gdpr-button")! + + gdprConsentButton.addEventListener("click", () => { + localStorage.setItem("apexie-gdprconsent", "true") + gdprConsentModal.hide() + }) +} diff --git a/src/scss/styles.scss b/src/scss/styles.scss new file mode 100644 index 0000000..e65f87d --- /dev/null +++ b/src/scss/styles.scss @@ -0,0 +1,51 @@ +@import "~bootstrap/scss/bootstrap"; + +body::before { + display: block; + content: ''; + height: 60px; +} + +@media (min-width: 768px) { + .news-input { + width: 50%; + } +} + +@media all and (min-width: 992px) { + .dropdown-menu li { + position: relative; + } + + .nav-item .submenu { + display: none; + position: absolute; + left: 100%; + top: -7px; + } + + .nav-item .submenu-left { + right: 100%; + left: auto; + } + + .dropdown-menu>li:hover { + background-color: #f1f1f1 + } + + .dropdown-menu>li:hover>.submenu { + display: block; + } +} + +@media (max-width: 991px) { + .dropdown-menu .dropdown-menu { + margin-left: 0.7rem; + margin-right: 0.7rem; + margin-bottom: .5rem; + } +} + +#login-error { + color: red; +} \ No newline at end of file diff --git a/src/style.css b/src/style.css deleted file mode 100644 index e69de29..0000000 diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..ec9ea15 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,12 @@ +import path from 'path' + +export default { + resolve: { + alias: { + '~bootstrap': path.resolve(__dirname, 'node_modules/bootstrap'), + } + }, + server: { + cors: true + } +} \ No newline at end of file