1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 21:17:59 +00:00

About (wip)

This commit is contained in:
Romein van Buren 2023-01-21 10:27:52 +01:00
parent 46bf6b70b3
commit 08cf6b162e
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
6 changed files with 102 additions and 20 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

After

Width:  |  Height:  |  Size: 340 KiB

BIN
frontend/public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

View File

@ -10,6 +10,7 @@
export let title = undefined; export let title = undefined;
export let contentPadding = true; export let contentPadding = true;
export let width = '80vw'; export let width = '80vw';
export let overflow = true;
const level = numberOfModalsOpen + 1; const level = numberOfModalsOpen + 1;
let isNew = true; let isNew = true;
@ -46,7 +47,7 @@
</header> </header>
{/if} {/if}
<div class="slot content" class:padded={contentPadding}> <slot /> </div> <div class="slot content" class:padded={contentPadding} class:overflow> <slot /> </div>
{#if $$slots.footer} {#if $$slots.footer}
<footer> <slot name="footer" /> </footer> <footer> <slot name="footer" /> </footer>
@ -81,7 +82,6 @@
margin-bottom: auto; margin-bottom: auto;
width: 100%; width: 100%;
border-radius: 10px; border-radius: 10px;
overflow: hidden;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
cursor: auto; cursor: auto;
@ -108,9 +108,11 @@
} }
.content { .content {
overflow-y: auto;
max-height: 100%; max-height: 100%;
} }
.content.overflow {
overflow-y: auto;
}
.content.padded { .content.padded {
padding: 1rem; padding: 1rem;
} }

View File

@ -4,6 +4,56 @@
export let show = false; export let show = false;
</script> </script>
<Modal bind:show> <Modal bind:show overflow={false}>
about... <div class="about">
<div class="brand">
<img src="/logo.png" alt="" class="logo" />
<div class="text">
<div class="name">Rolens</div>
<div class="subtitle">A modest MongoDB client</div>
</div>
</div>
<div class="cols">
<div>
d
</div>
<div>
d
</div>
</div>
</div>
</Modal> </Modal>
<style>
.about {
padding: 2rem;
}
.brand {
margin-top: -90px;
display: flex;
}
.brand .logo {
height: 200px;
}
.brand .text {
align-self: flex-end;
margin: 0 0 4rem 1rem;
}
.brand .text .name {
font-size: 4rem;
margin-bottom: 2rem;
font-weight: 600;
}
.brand .text .subtitle {
font-size: 2rem;
font-weight: 500;
}
.cols {
display: grid;
margin-top: 2rem;
grid-template: 1fr / 1fr 1fr;
gap: 1rem;
}
</style>

View File

@ -62,20 +62,20 @@
onMount(getHosts); onMount(getHosts);
</script> </script>
<Modal bind:show={modalOpen} title={hostCount && 'Hosts'} width="60vw"> <Modal bind:show={modalOpen} title={hostCount && 'Hosts'} width="60vw" overflow={false}>
<div class="status">
<p class:error>
{#if error}
<strong>Oops!</strong> {error}
{:else}
{hostCount} host{hostCount === 1 ? '' : 's'}
{/if}
</p>
<button class="btn" on:click={createHost}>
Create new host
</button>
</div>
{#if hostCount} {#if hostCount}
<div class="status">
<p class:error>
{#if error}
<strong>Oops!</strong> {error}
{:else}
{hostCount} host{hostCount === 1 ? '' : 's'}
{/if}
</p>
<button class="btn" on:click={createHost}>
Create new host
</button>
</div>
<ul class="hosts"> <ul class="hosts">
{#each Object.entries(hosts) as [hostKey, host]} {#each Object.entries(hosts) as [hostKey, host]}
<li> <li>

View File

@ -9,16 +9,46 @@
</script> </script>
<div class="welcome"> <div class="welcome">
<p class="title">Welcome to Rolens!</p> <div class="brand">
<img src="/logo.png" alt="" class="logo" />
<div class="text">
<div class="name">Welcome to Rolens!</div>
<div class="subtitle">A modest MongoDB client</div>
</div>
</div>
<button class="btn" on:click={createHost}>Create your first host</button> <button class="btn" on:click={createHost}>Create your first host</button>
</div> </div>
<style> <style>
.welcome { .welcome {
text-align: center; /* transform: translateY(-80px); */
margin-top: -90px;
padding: 2rem; padding: 2rem;
} }
.brand {
display: flex;
}
.brand .logo {
height: 200px;
}
.brand .text {
align-self: flex-end;
margin: 0 0 4rem 1rem;
}
.brand .text .name {
font-size: 2.5rem;
margin-bottom: 1.5rem;
font-weight: 600;
}
.brand .text .subtitle {
font-size: 1.5rem;
}
.logo {
height: 250px;
}
.title { .title {
font-weight: 600; font-weight: 600;
font-size: 1.5rem; font-size: 1.5rem;