adds tailwind & images

This commit is contained in:
2025-06-09 23:38:35 +02:00
parent 9597baf51a
commit 62da0c40db
10 changed files with 777 additions and 25 deletions

BIN
src/images/logo-txuria.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
src/images/logo-urdina.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
src/images/logo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -4,6 +4,12 @@ interface Props {
}
const { title = "KarkarCar" } = Astro.props;
import { Image } from 'astro:assets';
import logo from './src/images/logo-urdina.png';
import './src/styles/global.css'
---
<!DOCTYPE html>
@@ -14,6 +20,7 @@ const { title = "KarkarCar" } = Astro.props;
<title>{title}</title>
</head>
<body>
<Image src={logo} alt="KarKarCar" />
<slot />
</body>
</html>

View File

@@ -1,9 +1,7 @@
---
import Layout from '../layouts/Base.astro';
import type { Session } from '@auth/core/types';
import Layout from '../layouts/BaseLayout.astro';
import { getSession } from 'auth-astro/server';
import { Auth, SignIn, SignOut } from 'auth-astro/components';
import { SignIn, SignOut } from 'auth-astro/components';
import KarKarCarAuth from "../components/KarKarCarAuth.astro"
// 1. Import any dependencies (Full support for JavaScript/TypeScript)
@@ -13,21 +11,23 @@ import type { KarKarCarSession } from "../api/index.ts"
---
<KarKarCarAuth>
{(session: KarKarCarSession) => (
<>
{session ?
<SignOut>Logout</SignOut>
:
<SignIn provider="keycloak">Login</SignIn>
}
<p>
{session ? `Logged in as ${session.user?.name}` : 'Not logged in'}
{session ? `Amount ${session.userData.amount}` : 'Not logged in'}
</p>
</>
)}
</KarKarCarAuth>
<Layout>
<KarKarCarAuth>
{(session: KarKarCarSession) => (
<>
{session ?
<SignOut>Logout</SignOut>
:
<SignIn provider="keycloak">Login</SignIn>
}
<p>
{session ? `Logged in as ${session.user?.name}` : 'Not logged in'}
{session ? `Amount ${session.userData.amount}` : ''}
</p>
</>
)}
</KarKarCarAuth>
</Layout>

1
src/styles/global.css Normal file
View File

@@ -0,0 +1 @@
@import "tailwindcss";