mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
Merge pull request #28 from teaxyz/placeholder-layouts
#27 initialize placeholder
This commit is contained in:
commit
24875c0631
16 changed files with 252 additions and 112 deletions
|
@ -4,12 +4,12 @@
|
|||
|
||||
@font-face {
|
||||
font-family: "pp-neue-machina";
|
||||
src: url("../static/fonts/PPNeueMachina-InktrapLight.woff");
|
||||
src: url("/fonts/PPNeueMachina-InktrapLight.woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "sono";
|
||||
src: url("../static/fonts/Sono-Light.woff2");
|
||||
src: url("/fonts/Sono-Light.woff2");
|
||||
}
|
||||
|
||||
html {
|
||||
|
|
|
@ -35,5 +35,6 @@
|
|||
<style>
|
||||
#NavBar {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
3
packages/gui/src/components/PageHeader/PageHeader.svelte
Normal file
3
packages/gui/src/components/PageHeader/PageHeader.svelte
Normal file
|
@ -0,0 +1,3 @@
|
|||
<header class="text-primary text-6xl font-machina uppercase">
|
||||
<slot></slot>
|
||||
</header>
|
24
packages/gui/src/components/Placeholder/Placeholder.svelte
Normal file
24
packages/gui/src/components/Placeholder/Placeholder.svelte
Normal file
|
@ -0,0 +1,24 @@
|
|||
<script type="ts">
|
||||
export let label:string = "";
|
||||
</script>
|
||||
|
||||
<section>
|
||||
<header>{label}</header>
|
||||
<slot></slot>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
section {
|
||||
position: relative;
|
||||
min-height: 240px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
background-color: #CCC;
|
||||
display: flex;
|
||||
}
|
||||
header {
|
||||
color: rgb(50, 48, 48);
|
||||
font-size: 3em;
|
||||
}
|
||||
</style>
|
3
packages/gui/src/libs/stores.ts
Normal file
3
packages/gui/src/libs/stores.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { writable } from "svelte/store";
|
||||
|
||||
export const backLink = writable<string>('/');
|
61
packages/gui/src/routes/+layout.svelte
Normal file
61
packages/gui/src/routes/+layout.svelte
Normal file
|
@ -0,0 +1,61 @@
|
|||
<!-- home / discover / welcome page -->
|
||||
<script lang="ts">
|
||||
import "$appcss";
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
|
||||
import { backLink as backLinkStore } from '$libs/stores';
|
||||
|
||||
let backLink: string = '';
|
||||
backLinkStore.subscribe((v) => {
|
||||
backLink = v;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<nav class="">
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<section class="px-16 pt-24">
|
||||
{#if backLink}
|
||||
<header>
|
||||
<a href={backLink}>back</a>
|
||||
</header>
|
||||
{/if}
|
||||
<figure></figure>
|
||||
<slot></slot>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
width: 100vh;
|
||||
height: 100vh;
|
||||
}
|
||||
nav {
|
||||
position: fixed;
|
||||
width: 240px;
|
||||
}
|
||||
section {
|
||||
position: fixed;
|
||||
left: 240px;
|
||||
right: 0px;
|
||||
height: 100vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
figure {
|
||||
position: absolute;
|
||||
top: 180px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-image: url('/images/footer-grid-element.svg');
|
||||
}
|
||||
header {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-bottom: #CCC 1px solid;
|
||||
}
|
||||
</style>
|
|
@ -1,47 +1,23 @@
|
|||
<!-- home / discover / welcome page -->
|
||||
<script lang="ts">
|
||||
import "$appcss";
|
||||
// import { get } from '../libs/api';
|
||||
// import type { S3Package } from '../libs/types';
|
||||
import Button from '@tea/ui/Button/Button.svelte';
|
||||
import { backLink } from '$libs/stores';
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
|
||||
// let packages: S3Package[] = []
|
||||
// async function loadPackages(){
|
||||
// try {
|
||||
// const data = await get<S3Package[]>('/packages');
|
||||
// console.log(data);
|
||||
// if (packages.length) {
|
||||
// packages = data;
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.error(error);
|
||||
// }
|
||||
// }
|
||||
backLink.set('');
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>Home / Discover</h1>
|
||||
<!-- <a href="/others">Go to install package</a>
|
||||
<Button primary={true} on:click={loadPackages} label="Load Packages"></Button>
|
||||
<ul>
|
||||
{#each packages as p}
|
||||
<li>{p.full_name}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
<a href="/packages/specific">Go to specific package</a> -->
|
||||
<Button primary={true} label="does nothing" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<PageHeader>Discover</PageHeader>
|
||||
<header>
|
||||
<Placeholder label="featured packages"/>
|
||||
</header>
|
||||
<section class="mt-8">
|
||||
<Placeholder label="Getting started with tea"/>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
ul {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
|
@ -1,17 +1,20 @@
|
|||
<script>
|
||||
import "$appcss";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
import { page } from '$app/stores';
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data;
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import { backLink } from '$libs/stores';
|
||||
backLink.set('/');
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>How to install cli</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<PageHeader>INSTALL TEA</PageHeader>
|
||||
|
||||
<header>
|
||||
<Placeholder label="big tea icon version with copy curl"/>
|
||||
</header>
|
||||
|
||||
<section class="mt-8">
|
||||
<Placeholder label="big black blank space"/>
|
||||
</section>
|
||||
</div>
|
|
@ -1,17 +1,20 @@
|
|||
<script>
|
||||
import "$appcss";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
import { page } from '$app/stores';
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data;
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import { backLink } from '$libs/stores';
|
||||
backLink.set('/');
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>Documentation</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<PageHeader>Documentation</PageHeader>
|
||||
|
||||
<header>
|
||||
<Placeholder label="featured courses"/>
|
||||
</header>
|
||||
|
||||
<section class="mt-8">
|
||||
<Placeholder label="Essential workshops"/>
|
||||
</section>
|
||||
</div>
|
|
@ -1,24 +1,35 @@
|
|||
<!-- package list -->
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import "$appcss";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import { backLink } from '$libs/stores';
|
||||
backLink.set('/');
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>Packages Listing</h1>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/packages/pkg-a">Sample Pkg A</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-b">Sample Pkg B</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<PageHeader>Packages</PageHeader>
|
||||
<section>
|
||||
<Placeholder label="filter packages"/>
|
||||
</section>
|
||||
<ul class="grid grid-cols-3 gap-8 mt-8">
|
||||
<li>
|
||||
<a href="/packages/pkg-a"><Placeholder label="Pkg A"></Placeholder></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-b"><Placeholder label="Pkg B"></Placeholder></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-c"><Placeholder label="Pkg C"></Placeholder></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-a"><Placeholder label="Pkg D"></Placeholder></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-b"><Placeholder label="Pkg E"></Placeholder></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/packages/pkg-c"><Placeholder label="Pkg F"></Placeholder></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,17 +1,21 @@
|
|||
<script>
|
||||
import "$appcss";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import { page } from '$app/stores';
|
||||
import { backLink } from '$libs/stores';
|
||||
backLink.set('/packages');
|
||||
|
||||
/** @type {import('./$types').PageData} */
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>{data.title}: {$page.params.slug}</h1>
|
||||
</div>
|
||||
</section>
|
||||
<div>
|
||||
<PageHeader>{data.title}</PageHeader>
|
||||
<section>
|
||||
<Placeholder label="package cover w/ copy link" />
|
||||
</section>
|
||||
<section class="mt-8">
|
||||
<Placeholder label="reviews" />
|
||||
</section>
|
||||
</div>
|
|
@ -4,7 +4,7 @@ import type { LoadEvent } from '@sveltejs/kit';
|
|||
export function load({ params }: LoadEvent) {
|
||||
// TODO: search package details here
|
||||
return {
|
||||
title: `Hello Package: ${params.slug}!`,
|
||||
title: `${params.slug}!`,
|
||||
content: 'Welcome to our blog. Lorem ipsum dolor sit amet...'
|
||||
};
|
||||
}
|
|
@ -1,16 +1,30 @@
|
|||
<!-- user profile page -->
|
||||
<script lang="ts">
|
||||
<script>
|
||||
import "$appcss";
|
||||
|
||||
import NavBar from '$components/NavBar/NavBar.svelte';
|
||||
|
||||
import PageHeader from "$components/PageHeader/PageHeader.svelte";
|
||||
import Placeholder from "$components/Placeholder/Placeholder.svelte";
|
||||
import { backLink } from '$libs/stores';
|
||||
backLink.set('/');
|
||||
</script>
|
||||
|
||||
<section class="flex">
|
||||
<nav>
|
||||
<NavBar/>
|
||||
</nav>
|
||||
<div>
|
||||
<h1>User Profile</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<PageHeader>PROFILE</PageHeader>
|
||||
|
||||
<header>
|
||||
<Placeholder label="github username and wallet address"/>
|
||||
</header>
|
||||
|
||||
<section class="mt-8 grid grid-cols-2 gap-8">
|
||||
<div>
|
||||
<Placeholder label="pre-flight"/>
|
||||
</div>
|
||||
<div>
|
||||
<Placeholder label="badges"/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="mt-8">
|
||||
<Placeholder label="my installs"/>
|
||||
</section>
|
||||
|
||||
</div>
|
28
packages/gui/static/images/footer-grid-element.svg
Normal file
28
packages/gui/static/images/footer-grid-element.svg
Normal file
|
@ -0,0 +1,28 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="961.504" height="157.742" viewBox="0 0 961.504 157.742">
|
||||
<g id="Group_1224" data-name="Group 1224" transform="translate(-159.75 -8720.324)">
|
||||
<path id="Rectangle_616" data-name="Rectangle 616" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(160 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_617" data-name="Rectangle 617" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(240.084 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_618" data-name="Rectangle 618" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(320.168 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_619" data-name="Rectangle 619" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(400.251 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_620" data-name="Rectangle 620" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(480.334 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_621" data-name="Rectangle 621" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(560.418 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_622" data-name="Rectangle 622" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(640.502 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_2829" data-name="Rectangle 2829" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(880.754 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_623" data-name="Rectangle 623" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(720.586 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_2827" data-name="Rectangle 2827" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(960.838 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_624" data-name="Rectangle 624" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(800.669 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_2825" data-name="Rectangle 2825" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(1040.92 8720.574)" fill="#949494"/>
|
||||
<path id="Rectangle_616-2" data-name="Rectangle 616" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(160 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_617-2" data-name="Rectangle 617" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(240.084 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_618-2" data-name="Rectangle 618" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(320.168 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_619-2" data-name="Rectangle 619" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(400.251 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_620-2" data-name="Rectangle 620" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(480.334 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_621-2" data-name="Rectangle 621" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(560.418 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_622-2" data-name="Rectangle 622" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(640.502 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_2830" data-name="Rectangle 2830" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(880.754 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_623-2" data-name="Rectangle 623" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(720.586 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_2828" data-name="Rectangle 2828" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(960.838 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_624-2" data-name="Rectangle 624" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(800.669 8799.358)" fill="#949494"/>
|
||||
<path id="Rectangle_2826" data-name="Rectangle 2826" d="M-.25-.25H80.334V78.708H-.25Zm80.084.5H.25V78.208H79.834Z" transform="translate(1040.92 8799.358)" fill="#949494"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
|
@ -11,7 +11,8 @@
|
|||
"strict": true,
|
||||
"paths": {
|
||||
"$appcss": ["src/app.css"],
|
||||
"$libs/*": ["src/lib/*"],
|
||||
"$libs/*": ["src/libs/*"],
|
||||
"@api": ["src/lib/api.ts"],
|
||||
"$components/*": ["src/components/*"],
|
||||
"@tea/ui": ["../ui/src/*"],
|
||||
}
|
||||
|
|
8
packages/tsconfig.cli.json
Normal file
8
packages/tsconfig.cli.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@api": ["src/lib/api_cli.ts"],
|
||||
}
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue