From eba1a4543f6848e6e6c5ab8ca740c8c4f943341e Mon Sep 17 00:00:00 2001
From: Spectralitree <72747870+Spectralitree@users.noreply.github.com>
Date: Sat, 11 Dec 2021 12:01:36 +0100
Subject: [PATCH] feat: a whole lot of stuff
---
src/App.svelte | 7 +-
src/assets/default_avatar.png | Bin 0 -> 3519 bytes
src/functions.ts | 23 ++++++
src/lib/CardsHeader.svelte | 32 +++++++++
src/lib/Navigation.svelte | 79 +++++++++++---------
src/lib/cards/PrivateSystem.svelte | 53 ++++++++++++++
src/pages/Dash.svelte | 80 +++++++++++++++++++++
src/pages/Home.svelte | 112 +++++++++++++++++++++++++++++
src/stores.ts | 25 +++++++
style.css | 53 ++++++++++++++
10 files changed, 428 insertions(+), 36 deletions(-)
create mode 100644 src/assets/default_avatar.png
create mode 100644 src/functions.ts
create mode 100644 src/lib/CardsHeader.svelte
create mode 100644 src/lib/cards/PrivateSystem.svelte
create mode 100644 src/pages/Dash.svelte
create mode 100644 src/pages/Home.svelte
create mode 100644 src/stores.ts
create mode 100644 style.css
diff --git a/src/App.svelte b/src/App.svelte
index 2ed49af3..220a6683 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,6 +1,8 @@
+
+
+
+
+
+
+
+
{item.name} ({item.id})
+
+ {#if item && item.avatar_url}
+
+ {:else}
+
+ {/if}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/lib/Navigation.svelte b/src/lib/Navigation.svelte
index a9302958..c541dc34 100644
--- a/src/lib/Navigation.svelte
+++ b/src/lib/Navigation.svelte
@@ -1,42 +1,51 @@
-
- pk-webs
-
-
-
-
-
\ No newline at end of file
+ let loggedIn_value: boolean;
+
+ loggedIn.subscribe(value => {
+ loggedIn_value = value;
+ });
+
+
+
+ pk-webs
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/lib/cards/PrivateSystem.svelte b/src/lib/cards/PrivateSystem.svelte
new file mode 100644
index 00000000..0586f9fe
--- /dev/null
+++ b/src/lib/cards/PrivateSystem.svelte
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+ ID: {user.id}
+
+
+ Name: {user.name}
+
+ {#if user.tag}
+
+ Tag: {user.tag}
+
+ {/if}
+
+ Timezone: {user.timezone}
+
+ {#if user.color}
+
+ Color: {user.color}
+
+ {/if}
+ {#if user.banner}
+
+ Banner:
+
+
+
+
+
+
+ {/if}
+
+ Description:
+ {@html htmlDescription}
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/Dash.svelte b/src/pages/Dash.svelte
new file mode 100644
index 00000000..4bfd8245
--- /dev/null
+++ b/src/pages/Dash.svelte
@@ -0,0 +1,80 @@
+
+
+{#if user && user.banner}
+
+{/if}
+
+
+
+
+
+
+
+
+
+
+
+ alo
+
+
+
+
+
+
+
+
+ pk-webs | dash
+
\ No newline at end of file
diff --git a/src/pages/Home.svelte b/src/pages/Home.svelte
new file mode 100644
index 00000000..c390a366
--- /dev/null
+++ b/src/pages/Home.svelte
@@ -0,0 +1,112 @@
+
+
+
+
+
+ {#if err}
+ {err}
+ {/if}
+
+
+
+
+
+
Log in {#if loading}
{/if}
+
+
+
+ {#if loading}
+ verifying login...
+ {:else if isLoggedIn}
+ {#if user && user.name}
+ Welcome back, {user.name}!
+ {:else}
+ Welcome back!
+ {/if}
+
+ {:else}
+
+
+
+
+
+
+
+
+
+ {/if}
+
+
+ {#if isLoggedIn}
+
+
+ Some cool stuff will go here.
+
+
+ {/if}
+
+
+
\ No newline at end of file
diff --git a/src/stores.ts b/src/stores.ts
new file mode 100644
index 00000000..7f8bf749
--- /dev/null
+++ b/src/stores.ts
@@ -0,0 +1,25 @@
+import { writable } from 'svelte/store';
+
+export const loggedIn = writable(false);
+
+/* export const user = writable({
+ id: null,
+ uuid: null,
+ name: null,
+ description: null,
+ tag: null,
+ avatar_url: null,
+ banner: null,
+ timezone: null,
+ created: null,
+ color: null,
+ privacy: {
+ description_privacy: null,
+ member_list_privacy: null,
+ front_privacy: null,
+ front_history_privacy: null,
+ group_list_privacy: null
+ }
+}); */
+
+export const currentUser = writable(null);
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 00000000..59cbf1df
--- /dev/null
+++ b/style.css
@@ -0,0 +1,53 @@
+
+.icon {
+ height: 1.5em;
+ width: 1.5em;
+ margin-right: 0.5em;
+}
+
+.avatar {
+ height: 2.5em;
+ width: 2.5em;
+}
+
+.modal-content {
+ border: none !important;
+}
+
+.modal {
+ display: flex;
+}
+
+.banner {
+ z-index: -200;
+ width: 100vw;
+ height: 40vh;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-size: cover;
+}
+
+.bq {
+ padding-left: 0.5em;
+ margin: 0.25em 0 0.25em 0;
+ border-left: 4px solid rgba(128, 128, 128, 0.3);
+}
+
+.nav-link {
+ background-color: var(--bs-body-bg) !important;
+ border-color: rgba(128, 128, 128, 0.3) !important;
+ border-bottom-color: transparent !important;
+}
+
+.nav-tabs {
+ gap: 0.25em;
+}
+
+.nav-tabs {
+ border-bottom: none !important;
+}
+
+/* .nav-tabs {
+ justify-content: center !important;
+} */
\ No newline at end of file