cssify landing page

This commit is contained in:
CoolElectronics 2023-08-17 14:11:38 -04:00
parent 8bd24c107f
commit 98c25278d6
No known key found for this signature in database
GPG key ID: F63593D168636C50
5 changed files with 149 additions and 77 deletions

View file

@ -13,6 +13,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@fontsource/cabin": "^5.0.8",
"@iconify-icons/bi": "^1.2.17", "@iconify-icons/bi": "^1.2.17",
"@iconify-icons/ic": "^1.2.13", "@iconify-icons/ic": "^1.2.13",
"@iconify-icons/maki": "^1.2.18", "@iconify-icons/maki": "^1.2.18",

View file

@ -20,7 +20,7 @@
import iconDiscord from "@iconify-icons/ic/outline-discord"; import iconDiscord from "@iconify-icons/ic/outline-discord";
import iconGithub from "@iconify-icons/bi/github"; import iconGithub from "@iconify-icons/bi/github";
import iconArrow from "@iconify-icons/maki/arrow";
import Icon from "@iconify/svelte"; import Icon from "@iconify/svelte";
import type { Transport } from "protocol"; import type { Transport } from "protocol";
@ -50,6 +50,8 @@
let showLogin = false; let showLogin = false;
let chosenTracker: keyof typeof TrackerList | undefined; let chosenTracker: keyof typeof TrackerList | undefined;
let showTrackerList = false;
function onTransportOpen() { function onTransportOpen() {
console.log("Transport opened"); console.log("Transport opened");
@ -180,10 +182,11 @@
</Card> </Card>
</div> </div>
{:else if !import.meta.env.VITE_ADRIFT_DEV} {:else if !import.meta.env.VITE_ADRIFT_DEV}
<div class="flex flex-col h-full">
<div id="topbar" class="flex justify-between items-center p-4"> <div id="topbar" class="flex justify-between items-center p-4">
<div id="logo"> <div id="logo">
<Card type=""> <Card type="">
<h3 class="text-xl">Adrift</h3> <h3 class="text-xl">(logo goes here)</h3>
</Card> </Card>
</div> </div>
<div id="nav"> <div id="nav">
@ -211,9 +214,38 @@
</Card> </Card>
</div> </div>
</div> </div>
<div id="loginpage"> <div class="flex flex-col flex-1">
<div class="flex justify-evenly"> <div class="flex m-4">
<Card type="filled"> <Card
type="elevated"
extraOptions={{ class: "m3-container type-elevated w-9/12" }}
>
<div class="w-full">
<h2 class="text-6xl">Surf the web, Adrift</h2>
<h2 class="text-2xl">
A fast and modern decentralized proxy network
</h2>
</div>
<div class="mt-5">
<Button type="filled" on:click={() => (showTrackerList = true)}
>Start Browsing</Button
>
</div>
</Card>
</div>
<div
class="flex h-full justify-end m-4 transition-all"
class:opacity-0={!showTrackerList}
>
<Card
type="elevated"
extraOptions={{
class: "m3-container type-elevated w-9/12 flex flex-col",
}}
>
<h2 class="text-4xl">Select a Tracker</h2>
<h2 class="text-1xl">Trackers allow you to connect to Adrift</h2>
<div class="mt-5">
<SegmentedButtonContainer> <SegmentedButtonContainer>
{#each Object.keys(TrackerList) as tracker} {#each Object.keys(TrackerList) as tracker}
<input <input
@ -223,10 +255,14 @@
value={tracker} value={tracker}
bind:group={chosenTracker} bind:group={chosenTracker}
/> />
<SegmentedButtonItem input={tracker}>{tracker}</SegmentedButtonItem> <SegmentedButtonItem input={tracker}
>{tracker}</SegmentedButtonItem
>
{/each} {/each}
</SegmentedButtonContainer> </SegmentedButtonContainer>
</div>
<div class="flex-1" />
<div class="mt-5 flex">
{#if chosenTracker} {#if chosenTracker}
<Button type="elevated" on:click={() => (showSwarmWarning = true)} <Button type="elevated" on:click={() => (showSwarmWarning = true)}
>Connect to the swarm</Button >Connect to the swarm</Button
@ -235,12 +271,13 @@
>Connect with login</Button >Connect with login</Button
> >
{/if} {/if}
</div>
<Dialog headline="WARNING" open={showSwarmWarning}> <Dialog headline="WARNING" open={showSwarmWarning}>
<h2 class="text-2xl"> <h2 class="text-2xl">
TLS has not currently been implemented for the Adrift Swarm. Your TLS has not currently been implemented for the Adrift Swarm. Your
data will not be private, and you should not sign into any accounts data will not be private, and you should not sign into any
that you care much about accounts that you care much about
</h2> </h2>
<br /> <br />
<Button type="filled" on:click={() => (showLogin = false)} <Button type="filled" on:click={() => (showLogin = false)}
@ -268,6 +305,28 @@
</Dialog> </Dialog>
</Card> </Card>
</div> </div>
<div class="flex m-4">
<Card
type="elevated"
extraOptions={{ class: "m3-container type-elevated w-full" }}
>
<div class="flex space-x-10">
<a class="text-1xl" href="https://mercurywork.shop"
>© 2023 Mercury Workshop</a
>
<div class="space-x-3">
<a class="text-1xl" href="https://discord.gg/bAgNyGpXSx"
>discord</a
>
<a class="text-1xl" href="https://discord.gg/bAgNyGpXSx">github</a
>
</div>
<div />
</div>
</Card>
</div>
</div>
</div> </div>
{:else} {:else}
<div class="flex items-center justify-center h-full"> <div class="flex items-center justify-center h-full">

View file

@ -1,5 +1,7 @@
import { registerRemoteListener } from "bare-client-custom"; import { registerRemoteListener } from "bare-client-custom";
import App from "./App.svelte"; import App from "./App.svelte";
import "@fontsource/cabin";
import "./index.css"; import "./index.css";
if (import.meta.env.VITE_ADRIFT_DEV) { if (import.meta.env.VITE_ADRIFT_DEV) {
console.log( console.log(

View file

@ -1,3 +1,6 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
*{
font-family: "Cabin";
}

7
pnpm-lock.yaml generated
View file

@ -288,6 +288,9 @@ importers:
frontend: frontend:
dependencies: dependencies:
'@fontsource/cabin':
specifier: ^5.0.8
version: 5.0.8
'@iconify-icons/bi': '@iconify-icons/bi':
specifier: ^1.2.17 specifier: ^1.2.17
version: 1.2.17 version: 1.2.17
@ -3186,6 +3189,10 @@ packages:
resolution: {integrity: sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==} resolution: {integrity: sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==}
dev: false dev: false
/@fontsource/cabin@5.0.8:
resolution: {integrity: sha512-dKUwEkLe8ix9h/gntEILkSFJTa5IDtHKerQl3QXSsMELKYCxELblHuh5itwDA/sJz3O1rJDNybheBsWt59MlCg==}
dev: false
/@google-cloud/firestore@6.7.0: /@google-cloud/firestore@6.7.0:
resolution: {integrity: sha512-bkH2jb5KkQSUa+NAvpip9HQ+rpYhi77IaqHovWuN07adVmvNXX08gPpvPWEzoXYa/wDjEVI7LiAtCWkJJEYTNg==} resolution: {integrity: sha512-bkH2jb5KkQSUa+NAvpip9HQ+rpYhi77IaqHovWuN07adVmvNXX08gPpvPWEzoXYa/wDjEVI7LiAtCWkJJEYTNg==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}