Compare commits

...
19 Commits
Author SHA1 Message Date
robin 9a23742479 .gitea/workflows/deploy.yaml aktualisiert
Deploy Next.js via Docker / deploy (push) Successful in 2m1s
2026-07-25 18:04:41 +00:00
robin 20c853d7f9 chane version number
Deploy Next.js via Docker / deploy (push) Canceled after 3m27s
2026-07-25 20:01:07 +02:00
robin c32189e8aa automaticly create release
Deploy Next.js via Docker / deploy (push) Failing after 36s
2026-07-25 17:57:57 +00:00
robin 47375c6b9f Merge pull request 'Ui update' (#7) from ui-update into main
Deploy Next.js via Docker / deploy (push) Successful in 28s
Reviewed-on: Schanbro/PsalmTafel#7
2026-07-25 17:51:18 +00:00
robin f5b619ae37 style: fix style issue 2026-07-25 19:39:39 +02:00
robin ccf36197fe refactor: add Button in FormElements 2026-07-25 19:36:17 +02:00
robin 41bea34b2f refactor: add File in FormElements 2026-07-25 19:21:19 +02:00
robin a3cb0616c1 refactor: add Select (Dropdown) in FormElements 2026-07-25 18:57:41 +02:00
robin 9aa5443229 refactor: summarized components in FormElements 2026-07-25 18:50:55 +02:00
robin b97e5ea7bb feat: add Textfield component 2026-07-25 18:41:32 +02:00
robin f26060cf6b feat: add Card component
feat: create Textfield component
style: more light and dark mode support
2026-07-25 18:27:40 +02:00
robin 2ffbae76a6 style: fixed some issues 2026-07-24 17:23:46 +02:00
robin 90cc938b8c style: added border to navigation bar 2026-07-24 17:14:48 +02:00
robin 746c032586 style: more light- and darkmode support 2026-07-24 17:13:16 +02:00
robin 50542523b1 style: changed children-width
chore: updated Dashboard-text to "comming soon"-info
2026-07-24 17:04:15 +02:00
robin 3107dba079 style: light- and darkmode support for header 2026-07-24 16:50:36 +02:00
robin be9bd26c88 feat: add NavItem component
feat: add Header component with blur effect
feat: first steps into dark- and light-mode support
2026-07-24 16:37:58 +02:00
robin c2f97547e5 Test change
Deploy Next.js via Docker / deploy (push) Successful in 29s
2026-07-20 16:21:53 +00:00
robin b6841a0db7 Test change
Deploy Next.js via Docker / deploy (push) Successful in 28s
2026-07-10 18:06:42 +02:00
12 changed files with 290 additions and 236 deletions

No files matched your search

+30
View File
@@ -37,3 +37,33 @@ jobs:
-p 8443:3000 \
--restart always \
psalmtafel-app
- name: Release in Gitea erstellen
run: |
# 1. jq installieren und Version aus package.json auslesen
apk add --no-cache jq
VERSION=$(jq -r '.version' package.json)
echo "Aktuelle Version: v$VERSION"
# 2. Prüfen, ob das Release/Tag bereits existiert
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
"http://172.17.0.1:3000/api/v1/repos/${{ github.repository }}/releases/tags/v$VERSION")
# 3. Wenn Release noch nicht existiert (404), erstelle es
if [ "$HTTP_STATUS" -eq 404 ]; then
echo "Erstelle neues Release v$VERSION..."
curl -X POST \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"v$VERSION\",
\"target_commitish\": \"main\",
\"name\": \"Release v$VERSION\",
\"body\": \"Automatisches Release für Version v$VERSION\",
\"draft\": false,
\"prerelease\": false
}" \
"http://172.17.0.1:3000/api/v1/repos/${{ github.repository }}/releases"
else
echo "Release v$VERSION existiert bereits. Überspringe Erstellung."
fi
+68 -99
View File
@@ -3,6 +3,9 @@
import { uploadCSVAction } from "./actions";
import { useEffect, useState } from "react";
import Card from "@/components/Card"
import { Input } from "@/components/FormElements";
interface Songbook {
id: number;
name: string;
@@ -103,66 +106,52 @@ export default function AdminPage() {
};
return (
<div className="min-h-screen bg-black text-white font-sans p-4 sm:p-6 lg:p-8">
<div className="font-sans p-4 sm:p-6 lg:p-8">
<div className="max-w-6xl mx-auto space-y-6">
{/* HEADER */}
<header className="border-b border-neutral-800 pb-4">
<h1 className="text-2xl sm:text-3xl font-bold tracking-tight text-white">Chor-Anzeige Admin Panel</h1>
<p className="text-neutral-400 text-sm mt-1">Datenbank verwalten, neue Bücher erstellen und Lieder einpflegen.</p>
</header>
<h2 className="text-lg font-semibold mb-3 flex items-center gap-2">
Datenbank verwalten, neue Bücher erstellen und Lieder einpflegen
</h2>
{/* DREISPALTIRES GRID */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
{/* KARTE 1: NEUES LIEDERBUCH */}
<section className="bg-neutral-900 border border-neutral-800 rounded-xl p-5 shadow-md flex flex-col justify-between">
<div>
<h2 className="text-lg font-semibold text-white mb-4 flex items-center gap-2">
<span className="h-2 w-2 rounded-full bg-blue-400"></span> Neues Liederbuch
</h2>
<div className="space-y-4">
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
<input
type="text"
placeholder="z.B. Gesangbuch"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={newBookName}
onChange={(e) => setNewBookName(e.target.value)}
/>
</div>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
<input
type="text"
placeholder="z.B. Deutsch"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={newBookLanguage}
onChange={(e) => setNewBookLanguage(e.target.value)}
/>
</div>
<Card title="Neues Liederbuch">
<div className="space-y-4">
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Name des Buchs</label>
<Input.Text
type="text"
placeholder="z.B. Gesangbuch"
value={newBookName}
onChange={(e) => setNewBookName(e.target.value)}
/>
</div>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Sprache (Optional)</label>
<Input.Text
type="text"
placeholder="z.B. Deutsch"
value={newBookLanguage}
onChange={(e) => setNewBookLanguage(e.target.value)}
/>
</div>
<Input.Button
onClick={addSongbook}
className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
>
Liederbuch erstellen
</Input.Button>
</div>
<button
onClick={addSongbook}
className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
>
Liederbuch erstellen
</button>
</section>
</Card>
{/* KARTE 2: LIED HINZUFÜGEN */}
<section className="bg-neutral-900 border border-neutral-800 rounded-xl p-5 shadow-md flex flex-col justify-between">
<div>
<h2 className="text-lg font-semibold text-white mb-4 flex items-center gap-2">
<span className="h-2 w-2 rounded-full bg-blue-400"></span> Lied hinzufügen
</h2>
<div className="space-y-4">
<Card title="Lied hinzufügen">
<div className="space-y-4">
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Liederbuch wählen</label>
<select
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white focus:outline-none focus:border-blue-400 text-sm h-[38px]"
<Input.Select
value={selectedSongbookId}
onChange={(e) => setSelectedSongbookId(e.target.value)}
>
@@ -172,93 +161,73 @@ export default function AdminPage() {
{book.name}{book.language ? ` (${book.language})` : ""}
</option>
))}
</select>
</Input.Select>
</div>
<div className="grid grid-cols-3 gap-2">
<div className="col-span-1">
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Nummer</label>
<input
<Input.Text
type="text"
placeholder="12a"
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={number}
onChange={(e) => setNumber(e.target.value)}
/>
</div>
<div className="col-span-2">
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Liedtitel</label>
<input
<Input.Text
type="text"
placeholder="Großer Gott, wir..."
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={title}
onChange={(e) => setTitle(e.target.value)}
/>
</div>
</div>
<Input.Button onClick={addSong} className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm">Lied speichern</Input.Button>
</div>
</div>
<button
onClick={addSong}
className="w-full mt-6 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
>
Lied speichern
</button>
</section>
</Card>
{/* KARTE 3: CSV IMPORT */}
<section className="bg-neutral-900 border border-neutral-800 rounded-xl p-5 shadow-md flex flex-col justify-between">
<Card title="CSV-Massenimport">
<form action={handleCSVUpload} className="h-full flex flex-col justify-between">
<div>
<h2 className="text-lg font-semibold text-white mb-4 flex items-center gap-2">
<span className="h-2 w-2 rounded-full bg-blue-400"></span> CSV-Massenimport
</h2>
<input type="hidden" name="songbookId" value={selectedSongbookId} />
<div className="space-y-4">
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Ziel-Liederbuch</label>
<select
className="w-full bg-black border border-neutral-700 rounded-lg px-3 py-2 text-white focus:outline-none focus:border-blue-400 text-sm h-[38px]"
value={selectedSongbookId}
onChange={(e) => setSelectedSongbookId(e.target.value)}
>
<option value="">-- Bitte wählen --</option>
{songbooks.map((book) => (
<option key={book.id} value={String(book.id)}>
{book.name}{book.language ? ` (${book.language})` : ""}
</option>
))}
</select>
<Input.Select
value={selectedSongbookId}
onChange={(e) => setSelectedSongbookId(e.target.value)}
>
<option value="">-- Bitte wählen --</option>
{songbooks.map((book) => (
<option key={book.id} value={String(book.id)}>
{book.name}{book.language ? ` (${book.language})` : ""}
</option>
))}
</Input.Select>
</div>
<div>
<label className="block text-xs font-semibold text-neutral-400 uppercase tracking-wider mb-1.5">Datei auswählen (.csv)</label>
<input
type="file"
<Input.File
name="csvFile"
accept=".csv"
required
className="w-full text-sm text-neutral-400 file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-xs file:font-semibold file:bg-neutral-800 file:text-neutral-200 hover:file:bg-neutral-700 file:transition cursor-pointer"
/>
</div>
<div className="mt-6 space-y-3">
<Input.Button
type="submit"
>
Hochladen & Verarbeiten
</Input.Button >
{uploadStatus && (
<p className="text-xs text-center font-medium px-3 py-2 rounded-md bg-black border border-neutral-800 text-blue-400">
{uploadStatus}
</p>
)}
</div>
</div>
</div>
<div className="mt-6 space-y-3">
<button
type="submit"
className="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
>
Hochladen & Verarbeiten
</button>
{uploadStatus && (
<p className="text-xs text-center font-medium px-3 py-2 rounded-md bg-black border border-neutral-800 text-blue-400">
{uploadStatus}
</p>
)}
</div>
</form>
</section>
</Card>
</div>
</div>
</div>
+9 -5
View File
@@ -2,6 +2,8 @@ import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import Header from "@/components/Header"
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
@@ -23,11 +25,13 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html
lang="en"
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">{children}</body>
<html lang="de">
<body className="min-h-screen flex flex-col">
<Header />
<main className="mt-20 mx-auto min-w-200 max-w-full">{children}</main>
</body>
</html>
);
}
+17 -59
View File
@@ -1,65 +1,23 @@
import Image from "next/image";
export default function Home() {
export default function DashboardPage() {
return (
<div className="flex flex-col flex-1 items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<main className="flex flex-1 w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={100}
height={20}
<>
{/* Das Hintergrundbild brecht aus allen Containern aus und füllt das Fenster */}
<div className="fixed inset-0 -z-10 h-screen w-screen overflow-hidden">
{/* <Image
src="/fakurian_purple.jpg"
alt="Hintergrund"
fill
className="object-cover"
priority
/>
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
Hello, PsalmTafel wurde aktualisiert! (v0.0.1)
</h1>
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
Looking for a starting point or more instructions? Head over to{" "}
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Templates
</a>{" "}
or the{" "}
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
className="font-medium text-zinc-950 dark:text-zinc-50"
>
Learning
</a>{" "}
center.
</p>
</div>
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
<a
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={16}
height={16}
/>
Deploy Now
</a>
<a
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Documentation
</a>
</div>
</main>
</div>
/> */}
</div>
{/* Dein Inhalt auf dieser Seite */}
<div className="relative">
<p>Dashboard is comming soon...</p>
</div>
</>
);
}
+63 -72
View File
@@ -2,6 +2,8 @@
import { useState, useEffect } from "react";
import { Input } from "@/components/FormElements";
interface Songbook {
id: number;
name: string;
@@ -86,81 +88,70 @@ export default function SenderPage() {
};
return (
<div className="min-h-screen bg-black text-white font-sans p-4 sm:p-6 lg:p-8">
<div className="max-w-4xl mx-auto space-y-6">
<div>
{/* LIEDERSUCHE */}
<div className="p-4 sm:p-6 flex flex-col h-[500px]">
<h2 className="text-lg font-semibold mb-3 flex items-center gap-2">
Liedersuche & Datenbank
</h2>
{/* TITEL DER SEITE */}
<header className="border-b border-neutral-800 pb-4">
<h1 className="text-2xl sm:text-3xl font-bold tracking-tight text-white">Chor-Anzeige Bedienfeld</h1>
<p className="text-neutral-400 text-sm mt-1">Lieder auswählen und live auf das Display übertragen.</p>
</header>
{/* LIEDERSUCHE */}
<div className="bg-neutral-900 border border-neutral-800 rounded-xl p-4 sm:p-6 shadow-md flex flex-col h-[500px]">
<h2 className="text-lg font-semibold text-white mb-3 flex items-center gap-2">
<span className="h-2 w-2 rounded-full bg-blue-400"></span> Liedersuche & Datenbank
</h2>
<div className="mb-4">
<input
type="text"
placeholder="Nach Songtitel oder Nummer suchen..."
className="w-full bg-black border border-neutral-700 rounded-lg px-4 py-2.5 text-white placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={song_search_name}
onChange={(e) => search(e.target.value)}
/>
</div>
{/* TABELLE */}
<div className="flex-1 overflow-auto border border-neutral-800 rounded-lg bg-black">
<table className="w-full text-left border-collapse text-sm">
<thead className="bg-neutral-900 sticky top-0 border-b border-neutral-800 z-10">
<tr>
<th className="p-3 text-xs font-semibold text-neutral-400 uppercase tracking-wider">Titel</th>
<th className="p-3 text-xs font-semibold text-neutral-400 uppercase tracking-wider hidden sm:table-cell">Liederbuch</th>
<th className="p-3 text-xs font-semibold text-neutral-400 uppercase tracking-wider text-center">Nummer</th>
<th className="p-3 text-xs font-semibold text-neutral-400 uppercase tracking-wider text-right">Aktion</th>
</tr>
</thead>
<tbody className="divide-y divide-neutral-800">
{searchResults.length === 0 ? (
<tr>
<td colSpan={4} className="p-8 text-center text-neutral-500">Keine Lieder gefunden</td>
</tr>
) : (
searchResults.map((song) => {
const songBook = songbooks.find((book) => book.id === song.songbook_id);
return (
<tr key={`${song.songbook_id}-${song.song_id}`} className="hover:bg-neutral-900/40 transition">
<td className="p-3 font-medium text-white max-w-[180px] sm:max-w-none truncate">
{song.title}
<span className="block text-xs text-neutral-400 sm:hidden mt-0.5">
{songBook ? songBook.name : "Unbekannt"}
</span>
</td>
<td className="p-3 text-neutral-300 hidden sm:table-cell">
{songBook ? songBook.name : "Unbekannt"}
</td>
<td className="p-3 text-center font-mono text-blue-400 font-bold">
{song.song_number}
</td>
<td className="p-3 text-right">
<button
onClick={() => sendID(String(song.song_id), String(song.songbook_id))}
className="bg-black hover:bg-blue-600 border border-neutral-700 hover:border-blue-500 text-neutral-200 hover:text-white font-medium rounded-md px-3 py-1.5 transition text-xs"
>
Anzeigen
</button>
</td>
</tr>
);
})
)}
</tbody>
</table>
</div>
<div className="mb-4">
<Input.Text
type="text"
placeholder="Nach Songtitel oder Nummer suchen..."
value={song_search_name}
onChange={(e) => search(e.target.value)}
/>
</div>
{/* TABELLE */}
<div className="flex-1 overflow-auto border border-neutral-200 dark:border-neutral-800 rounded-lg bg-white dark:bg-black">
<table className="w-full text-left border-collapse text-sm">
<thead className="bg-neutral-100 dark:bg-neutral-900 sticky top-0 border-b border-neutral-200 dark:border-neutral-800 z-10">
<tr>
<th className="p-3 text-xs font-semibold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider">Titel</th>
<th className="p-3 text-xs font-semibold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider">Liederbuch</th>
<th className="p-3 text-xs font-semibold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider text-center">Nummer</th>
<th className="p-3 text-xs font-semibold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider text-right">Aktion</th>
</tr>
</thead>
<tbody className="divide-y divide-neutral-200 dark:divide-neutral-800">
{searchResults.length === 0 ? (
<tr>
<td colSpan={4} className="p-8 text-center text-neutral-400 dark:text-neutral-500">Keine Lieder gefunden</td>
</tr>
) : (
searchResults.map((song) => {
const songBook = songbooks.find((book) => book.id === song.songbook_id);
return (
<tr key={`${song.songbook_id}-${song.song_id}`} className="hover:bg-neutral-100/60 dark:hover:bg-neutral-900/40 transition">
<td className="p-3 font-medium text-neutral-900 dark:text-white max-w-[180px] sm:max-w-none truncate">
{song.title}
<span className="block text-xs text-neutral-500 dark:text-neutral-400 sm:hidden mt-0.5">
{songBook ? songBook.name : "Unbekannt"}
</span>
</td>
<td className="p-3 text-neutral-700 dark:text-neutral-300 hidden sm:table-cell">
{songBook ? songBook.name : "Unbekannt"}
</td>
<td className="p-3 text-center font-mono text-blue-600 dark:text-blue-400 font-bold">
{song.song_number}
</td>
<td className="p-3 text-right">
<Input.Button
onClick={() => sendID(String(song.song_id), String(song.songbook_id))}
className="bg-white dark:bg-black hover:bg-blue-600 dark:hover:bg-blue-600 border border-neutral-300 dark:border-neutral-700 hover:border-blue-600 dark:hover:border-blue-500 hover:text-white font-medium rounded-md px-3 py-1.5 transition text-xs"
>
Anzeigen
</Input.Button>
</td>
</tr>
);
})
)}
</tbody>
</table>
</div>
</div>
</div>
);
+14
View File
@@ -0,0 +1,14 @@
import { ReactNode } from "react";
export default function Card({title, children}: {title: string, children: ReactNode}) {
return (
<section className="p-5 flex flex-col justify-between">
<h2 className="text-lg font-semibold mb-4 flex items-center gap-2">
{title}
</h2>
<div>
{children}
</div>
</section>
);
}
+54
View File
@@ -0,0 +1,54 @@
import { ChangeEvent, ReactNode } from "react";
import { ComponentPropsWithoutRef } from "react";
interface TextfieldProps extends ComponentPropsWithoutRef<"input"> {}
function Textfield({value, onChange, placeholder}: TextfieldProps) {
return (
<input
className="w-full border border-neutral-700 rounded-lg px-4 py-2.5 placeholder-neutral-500 focus:outline-none focus:border-blue-400 text-sm"
value={value}
onChange={onChange}
placeholder={placeholder}
/>
)
}
function Dropdown({ children, ...props }: ComponentPropsWithoutRef<"select">) {
return (
<select
className="w-full border border-neutral-700 rounded-lg px-3 py-2 focus:outline-none focus:border-blue-400 text-sm h-[38px]"
{...props}
>
{children}
</select>
);
}
function File({ ...props }: ComponentPropsWithoutRef<"input">) {
return (
<input
type="file"
className="p-1 text-sm w-full rounded-lg border border-neutral-300 dark:border-neutral-700 bg-white dark:bg-black text-black dark:text-white cursor-pointer file:mr-4 file:py-2 file:px-4 file:rounded-sm file:border-0 file:font-semibold file:transition file:bg-neutral-100 file:text-neutral-900 dark:file:bg-neutral-800 dark:file:text-white hover:file:bg-neutral-900 hover:file:text-white dark:hover:file:bg-white dark:hover:file:text-black"
{...props}
/>
);
}
function Button({ children, ...props }: ComponentPropsWithoutRef<"button">) {
return (
<button
className="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg px-4 py-2.5 transition text-sm shadow-sm"
{...props}
>
{children}
</button>
)
}
export const Input = {
Text: Textfield,
Select: Dropdown,
File: File,
Button: Button,
};
+15
View File
@@ -0,0 +1,15 @@
import NavItem from "./NavItem";
export default function Header() {
return (
<header className="fixed top-0 left-0 w-full z-50 p-4 flex justify-between items-center backdrop-blur-md">
<div className="font-bold text-xl">PsalmTafel</div>
<nav className="flex gap-4 border-2 rounded-full">
<NavItem path="/">Dashboard</NavItem>
<NavItem path="/sender">Sender</NavItem>
<NavItem path="/receiver">Empfänger</NavItem>
<NavItem path="/admin">Verwaltung</NavItem>
</nav>
</header>
);
}
+19
View File
@@ -0,0 +1,19 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { ReactNode } from "react";
export default function NavItem({ path, children }: { path: string; children: ReactNode }) {
const pathname = usePathname();
const isActive = pathname === path;
return (
<Link
href={path}
className={`px-3 py-1 rounded-full border border-transparent hover:border-current transition-all ${
isActive ? "bg-black text-white dark:bg-white dark:text-black" : ""
}`}
>{children}</Link>
);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "lied-nummer-anzeige",
"version": "0.1.0",
"version": "0.0.2",
"private": true,
"scripts": {
"dev": "next dev",
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 KiB