wip: adds gap to apps

This commit is contained in:
kevmodrome 2020-05-26 17:37:11 +02:00
parent 2a151821f9
commit 1ff512a218
5 changed files with 89 additions and 83 deletions

View File

@ -38,7 +38,7 @@
] ]
}, },
"dependencies": { "dependencies": {
"@budibase/bbui": "^0.3.1", "@budibase/bbui": "^0.3.5",
"@budibase/client": "^0.0.32", "@budibase/client": "^0.0.32",
"@nx-js/compiler-util": "^2.0.0", "@nx-js/compiler-util": "^2.0.0",
"codemirror": "^5.51.0", "codemirror": "^5.51.0",

View File

@ -0,0 +1,70 @@
<script>
import Button from "components/common/Button.svelte"
export let name, description =`A minimalist CRM which removes the noise and allows you to focus
on your business.`, _id;
</script>
<div class="apps-card">
<h3 class="app-title">{name}</h3>
<p class="app-desc">
{description}
</p>
<div class="card-footer">
<div class="modified-date">Last Edited - 25th May 2020</div>
<a href={`/_builder/${_id}`} class="app-button">
Open Web App
</a>
</div>
</div>
<style>
.apps-card {
background-color: var(--white);
padding: 20px;
max-width: 400px;
max-height: 150px;
border-radius: 5px;
border: 1px solid var(--grey-medium);
}
.app-button:hover {
background-color: var(--grey-light);
text-decoration: none;
}
.app-title {
font-size: 18px;
font-weight: 700;
color: var(--ink);
text-transform: capitalize;
}
.app-desc {
color: var(--ink-light);
}
.card-footer {
display: flex;
flex-direction: row;
align-items: baseline;
justify-content: space-between;
}
.modified-date {
font-size: 14px;
color: var(--ink-light);
}
.app-button {
background-color: var(--white);
color: var(--ink);
padding: 12px 20px;
border-radius: 5px;
border: 1px var(--grey) solid;
font-size: 14px;
font-weight: 400;
cursor: pointer;
transition: all 0.2s;
box-sizing: border-box;
}
</style>

View File

@ -1,5 +1,5 @@
<script> <script>
import Button from "components/common/Button.svelte" import AppCard from "./AppCard.svelte"
export let apps export let apps
function myFunction() { function myFunction() {
@ -13,27 +13,22 @@
<div> <div>
<div> <div>
<div class="app-section-title">Your Web Apps</div> <div class="app-section-title">Your Web Apps</div>
<div class="apps">
{#each apps as app} {#each apps as app}
<div class="apps-card"> <AppCard {...app} />
<h3 class="app-title">{app.name}</h3>
<p class="app-desc">
A minimalist CRM which removes the noise and allows you to focus
on your business.
</p>
<div class="card-footer">
<div class="modified-date">Last Edited - 25th May 2020</div>
<a href={`/_builder/${app._id}`} class="app-button">
Open Web App
</a>
</div>
</div>
{/each} {/each}
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<style> <style>
.apps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400, 1fr));
gap: 85px;
}
.root { .root {
margin: 40px 80px; margin: 40px 80px;
} }
@ -44,59 +39,4 @@
font-weight: 700; font-weight: 700;
margin-bottom: 20px; margin-bottom: 20px;
} }
.apps {
display: flex;
flex-wrap: wrap;
gap: 40px;
}
.apps-card {
background-color: var(--white);
padding: 20px;
max-width: 400px;
max-height: 150px;
border-radius: 5px;
border: 1px solid var(--grey-medium);
}
.app-button:hover {
background-color: var(--grey-light);
text-decoration: none;
}
.app-title {
font-size: 18px;
font-weight: 700;
color: var(--ink);
text-transform: capitalize;
}
.app-desc {
color: var(--ink-light);
}
.card-footer {
display: flex;
flex-direction: row;
align-items: baseline;
justify-content: space-between;
}
.modified-date {
font-size: 14px;
color: var(--ink-light);
}
.app-button {
background-color: var(--white);
color: var(--ink);
padding: 12px 20px;
border-radius: 5px;
border: 1px var(--grey) solid;
font-size: 14px;
font-weight: 400;
cursor: pointer;
transition: all 0.2s;
box-sizing: border-box;
}
</style> </style>

View File

@ -1,6 +1,5 @@
<script> <script>
import Button from "components/common/Button.svelte" import { Input, TextArea, Button } from "@budibase/bbui"
import { Input, TextArea } from "@budibase/bbui"
import { AppsIcon, InfoIcon, CloseIcon } from "components/common/Icons/" import { AppsIcon, InfoIcon, CloseIcon } from "components/common/Icons/"
import { getContext } from "svelte" import { getContext } from "svelte"
export let onCancel = () => {} export let onCancel = () => {}
@ -38,11 +37,11 @@
</div> </div>
<div class="footer"> <div class="footer">
<a href="./#" class="info"><InfoIcon />How to get started</a> <a href="./#" class="info"><InfoIcon />How to get started</a>
<Button color="secondary" on:click={_onCancel}> <Button outline thin on:click={_onCancel}>
<span class="button-text">Cancel</span> Cancel
</Button> </Button>
<Button color="primary" on:click={_onOkay}> <Button primary thin on:click={_onOkay}>
<span class="button-text">Create</span> Save
</Button> </Button>
</div> </div>
<div class="close-button" on:click={_onCancel}><CloseIcon /></div> <div class="close-button" on:click={_onCancel}><CloseIcon /></div>
@ -68,6 +67,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-bottom: 20px;
} }
h3 { h3 {
margin: 0; margin: 0;
@ -102,6 +102,7 @@
} }
.footer { .footer {
display: grid; display: grid;
grid-gap: 20px;
align-items: center; align-items: center;
grid-template-columns: 1fr auto auto; grid-template-columns: 1fr auto auto;
padding: 30px 40px; padding: 30px 40px;
@ -109,10 +110,4 @@
border-bottom-right-radius: 50px; border-bottom-right-radius: 50px;
background-color: var(--grey-light); background-color: var(--grey-light);
} }
.button-text {
font-size: 18px;
line-height: 1.17;
letter-spacing: normal;
color: var(--white);
}
</style> </style>

View File

@ -48,6 +48,7 @@
closeOnEsc: false, closeOnEsc: false,
closeOnOuterClick: false, closeOnOuterClick: false,
styleContent: { padding: 0 }, styleContent: { padding: 0 },
closeOnOuterClick: true
} }
) )
} }