diff --git a/.env.development b/.env.development index f56945a..5c02cf9 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,10 @@ VITE_SSO_ORIGIN=http://localhost:9090 VITE_OAUTH2_CLIENT_ID=b5a9a8df-827c-4925-b1c1-1940abcf356b +VITE_OAUTH2_CLIENT_SCOPE=openid profile name + +VITE_LOGOUT_PAGE=http://localhost:9095/logout VITE_API_VIOLET=http://localhost:9095/v1/violet VITE_API_ORCHID=http://localhost:9095/v1/orchid +VITE_API_AZALEA=http://localhost:9095/v1/azalea VITE_API_SITE_HOSTING=http://localhost:9095/v1/sites diff --git a/.env.production b/.env.production index bedb04d..a284b23 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,10 @@ VITE_SSO_ORIGIN=https://sso.1f349.com VITE_OAUTH2_CLIENT_ID=9b11a141-bcb8-4140-9c88-531a5d7bf15d +VITE_OAUTH2_CLIENT_SCOPE=openid profile name + +VITE_LOGOUT_PAGE=https://1f349.com VITE_API_VIOLET=https://api.1f349.com/v1/violet VITE_API_ORCHID=https://api.1f349.com/v1/orchid +VITE_API_AZALEA=https://api.1f349.com/v1/azalea VITE_API_SITE_HOSTING=https://sites.1f349.com/api.php diff --git a/public/fonts/IosevkaCustom-Regular.woff2 b/public/fonts/IosevkaCustom-Regular.woff2 new file mode 100644 index 0000000..94f3f62 Binary files /dev/null and b/public/fonts/IosevkaCustom-Regular.woff2 differ diff --git a/public/fonts/IosevkaCustomNerdFont-Regular.ttf b/public/fonts/IosevkaCustomNerdFont-Regular.ttf new file mode 100644 index 0000000..c869474 Binary files /dev/null and b/public/fonts/IosevkaCustomNerdFont-Regular.ttf differ diff --git a/public/fonts/Ubuntu-Bold.ttf b/public/fonts/Ubuntu-Bold.ttf new file mode 100644 index 0000000..c2293d5 Binary files /dev/null and b/public/fonts/Ubuntu-Bold.ttf differ diff --git a/public/fonts/Ubuntu-Regular.ttf b/public/fonts/Ubuntu-Regular.ttf new file mode 100644 index 0000000..f98a2da Binary files /dev/null and b/public/fonts/Ubuntu-Regular.ttf differ diff --git a/public/fonts/Ubuntu.woff2 b/public/fonts/Ubuntu.woff2 deleted file mode 100644 index 8070e4f..0000000 Binary files a/public/fonts/Ubuntu.woff2 and /dev/null differ diff --git a/public/jason-leem-50bzI1F6urA-unsplash.jpg b/public/jason-leem-50bzI1F6urA-unsplash.jpg deleted file mode 100644 index b30d3bf..0000000 Binary files a/public/jason-leem-50bzI1F6urA-unsplash.jpg and /dev/null differ diff --git a/src/App.svelte b/src/App.svelte index ca24c20..068a6e9 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,208 +1,301 @@ -
-
-

🍉 Admin Panel

-
-
+ + +
+
-
- {#if $loginStore == null} -
Please login to continue
- {:else} -
- -
- {/if} -
- + diff --git a/src/app.scss b/src/app.scss index 3369482..b63d9a2 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,10 +1,4 @@ -$theme-text: rgba(255, 255, 255, 0.87); -$theme-bg: #242424; - -@media (prefers-color-scheme: light) { - $theme-text: #213547; - $theme-bg: #ffffff; -} +@import "values.scss"; :root { font-family: Ubuntu, Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; @@ -23,17 +17,21 @@ $theme-bg: #242424; -webkit-text-size-adjust: 100%; } -body { - background-image: url('/jason-leem-50bzI1F6urA-unsplash.jpg'); - background-position: center; -} - @font-face { font-family: 'Ubuntu'; font-style: normal; font-weight: 400; font-display: swap; - src: url('/fonts/Ubuntu.woff2') format('woff2'); + src: url('/fonts/Ubuntu-Regular.ttf') format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: 'Ubuntu'; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url('/fonts/Ubuntu-Bold.ttf') format('truetype'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -44,6 +42,14 @@ body { src: url('/fonts/FiraCode-Regular.woff2') format('woff2'); } +@font-face { + font-family: "Iosevka"; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url('/fonts/IosevkaCustomNerdFont-Regular.ttf') format('truetype'); +} + #app { width: 100vw; height: 100vh; @@ -66,107 +72,50 @@ body { margin: 0; } +.flex-gap { + flex-grow: 1; +} + code, .code-font { font-family: 'Fira Code', monospace; } -.btn-green, -.btn-red, -.btn-blue, -.btn-yellow { - display: table-cell; - border: none; - box-shadow: none; - box-sizing: border-box; - color: black; - cursor: pointer; - font-size: 20px; - font-weight: 700; - line-height: 24px; - height: 50px; - padding: 4px 16px; - vertical-align: middle; - box-shadow: 0 4px 8px #0003, 0 6px 20px #00000030; +table { + border-spacing: 0px; + border-collapse: initial; - &:hover { - color: black; - } -} + thead, + tbody tr { + background-color: $table-row; -.btn-green { - background-color: #209c6f; -} - -table.main-table { - border-collapse: collapse; - border-spacing: 0; - width: 100%; - - thead { - background-color: #33333355; - position: sticky; - top: 0; - z-index: 9999; - box-shadow: 0 4px 8px #0003, 0 6px 20px #00000030; - } - - th, - td { - padding: 6px 8px 6px 8px; - text-align: center; - } - - tr:nth-child(2n) { - background-color: #2a2a2a55; - } - - tr:nth-child(2n + 1) { - background-color: #24242455; - } - - .invert-rows { - tr:nth-child(2n) { - background-color: #24242455; + &:hover { + background-color: $table-row-highlight; } - tr:nth-child(2n + 1) { - background-color: #2a2a2a55; + th { + background-color: $table-header; + padding: 10px 15px; + text-align: left; + white-space: nowrap; + height: 40px; + } + + td { + display: table-cell; + vertical-align: inherit; + text-align: left; + font-size: 0.875rem; + line-height: 1rem; + padding: 0px 15px; + white-space: nowrap; + height: 40px; } } -} -.wrapper { - display: flex; - flex-direction: column; - overflow: hidden; - margin: 2em; - - backdrop-filter: blur(32px) saturate(180%); - -webkit-backdrop-filter: blur(32px) saturate(180%); - background-color: rgba(17, 25, 40, 0.75); - border-radius: 12px; - border: 1px solid rgba(255, 255, 255, 0.125); - - .scrolling-area { - overflow: auto; - height: 100%; - } -} - -.text-padding { - padding: 4px 16px; -} - -.footer { - height: 50px; - background-color: #2c2c2c55; - box-shadow: 0 -4px 8px #0003, 0 -6px 20px #00000030; - display: flex; - flex-direction: row; - - .meta-info { - line-height: 50px; - padding-inline: 16px; + &.action-table tbody tr:not(.empty-row) td:last-child { + display: flex; + justify-content: flex-end; + padding-right: 0; } } diff --git a/src/components/ActionMenu.svelte b/src/components/ActionMenu.svelte new file mode 100644 index 0000000..ee5ef87 --- /dev/null +++ b/src/components/ActionMenu.svelte @@ -0,0 +1,45 @@ + + +
+ {#if edit != null} + + {/if} + {#if remove != null} + + {/if} +
+ + diff --git a/src/components/ActionPopup.svelte b/src/components/ActionPopup.svelte new file mode 100644 index 0000000..c59bbee --- /dev/null +++ b/src/components/ActionPopup.svelte @@ -0,0 +1,70 @@ + + + close()}> + + + + diff --git a/src/components/Flags.svelte b/src/components/Flags.svelte index 4475645..746b815 100644 --- a/src/components/Flags.svelte +++ b/src/components/Flags.svelte @@ -61,6 +61,7 @@ diff --git a/src/components/Popup.svelte b/src/components/Popup.svelte new file mode 100644 index 0000000..5d5d83f --- /dev/null +++ b/src/components/Popup.svelte @@ -0,0 +1,72 @@ + + +