mirror of
https://github.com/dancojocaru2000/foxbank.git
synced 2025-02-23 12:29:35 +02:00
BlurCard and Background image
This commit is contained in:
parent
2728bce318
commit
bec54cec42
12 changed files with 89 additions and 14 deletions
3
client/.vscode/extensions.json
vendored
3
client/.vscode/extensions.json
vendored
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"svelte.svelte-vscode",
|
"svelte.svelte-vscode",
|
||||||
"bradlc.vscode-tailwindcss"
|
"bradlc.vscode-tailwindcss",
|
||||||
|
"fivethree.vscode-svelte-snippets"
|
||||||
]
|
]
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3 KiB |
BIN
client/public/img/Banner.jpg
Normal file
BIN
client/public/img/Banner.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 653 KiB |
|
@ -4,7 +4,7 @@
|
||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||||
|
|
||||||
<title>Svelte app</title>
|
<title>FOXBANK</title>
|
||||||
|
|
||||||
<link rel='icon' type='image/png' href='/favicon.png'>
|
<link rel='icon' type='image/png' href='/favicon.png'>
|
||||||
<link rel='stylesheet' href='/build/bundle.css'>
|
<link rel='stylesheet' href='/build/bundle.css'>
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
<script>
|
<script>
|
||||||
import Card from "./Card.svelte";
|
import Login from "./Login.svelte";
|
||||||
|
import MainPage from "./MainPage.svelte";
|
||||||
|
|
||||||
|
let loggedin = false;
|
||||||
export let name;
|
function toggleLoggedIn() {
|
||||||
|
loggedin = !loggedin;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main class="bg-banner bg-cover bg-center h-screen">
|
||||||
<h1 class="text-yellow-400">Hello {name}!</h1>
|
<button on:click={toggleLoggedIn}>
|
||||||
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
|
toggle
|
||||||
<Card title="Test" text="123"></Card>
|
</button>
|
||||||
<Card title="Test 2" text="Hello, world!"></Card>
|
{#if loggedin}
|
||||||
|
<MainPage></MainPage>
|
||||||
|
{:else}
|
||||||
|
<Login></Login>
|
||||||
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style global lang="postcss">
|
<style global lang="postcss">
|
||||||
|
|
11
client/src/Button.svelte
Normal file
11
client/src/Button.svelte
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<script>
|
||||||
|
export let title;
|
||||||
|
export let text;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<figure class="bg-gray-100 rounded-xl p-3 m-2">
|
||||||
|
<h1 class="text-lg font-bold">{title}</h1>
|
||||||
|
<p class="text-gray-900">{text}</p>
|
||||||
|
</figure>
|
||||||
|
</main>
|
22
client/src/CardBG.svelte
Normal file
22
client/src/CardBG.svelte
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<script>
|
||||||
|
export let width;
|
||||||
|
export let height;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<figure class="rounded-x p-3 m-14" style="--width: {width}; --height: {height};">
|
||||||
|
<slot></slot>
|
||||||
|
</figure>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
figure{
|
||||||
|
width: var(--width);
|
||||||
|
height: var(--height);
|
||||||
|
|
||||||
|
background: linear-gradient(165.31deg, rgba(67, 151, 141, 0.44) 18.49%, rgba(67, 151, 141, 0) 97.15%);
|
||||||
|
box-shadow: 0px 13px 6px 4px rgba(0, 0, 0, 0.25);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
11
client/src/InputField.svelte
Normal file
11
client/src/InputField.svelte
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<script>
|
||||||
|
export let title;
|
||||||
|
export let text;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<figure class="bg-gray-100 rounded-xl p-3 m-2">
|
||||||
|
<h1 class="text-lg font-bold">{title}</h1>
|
||||||
|
<p class="text-gray-900">{text}</p>
|
||||||
|
</figure>
|
||||||
|
</main>
|
15
client/src/Login.svelte
Normal file
15
client/src/Login.svelte
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<script>
|
||||||
|
import CardBG from "./CardBG.svelte";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="container h-screen flex flex-col justify-center">
|
||||||
|
<CardBG width="464px" height="550px">
|
||||||
|
<h1>Login</h1>
|
||||||
|
</CardBG>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
7
client/src/MainPage.svelte
Normal file
7
client/src/MainPage.svelte
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<script>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>Main</h1>
|
||||||
|
</main>
|
|
@ -2,9 +2,6 @@ import App from './App.svelte';
|
||||||
|
|
||||||
const app = new App({
|
const app = new App({
|
||||||
target: document.body,
|
target: document.body,
|
||||||
props: {
|
|
||||||
name: 'world'
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default app;
|
export default app;
|
|
@ -8,7 +8,11 @@ module.exports = {
|
||||||
},
|
},
|
||||||
darkMode: false, // or 'media' or 'class'
|
darkMode: false, // or 'media' or 'class'
|
||||||
theme: {
|
theme: {
|
||||||
extend: {},
|
extend: {
|
||||||
|
backgroundImage:{
|
||||||
|
"banner":"url('/img/Banner.jpg')"
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
variants: {
|
variants: {
|
||||||
extend: {},
|
extend: {},
|
||||||
|
|
Loading…
Add table
Reference in a new issue