From a5939440b73b2d062d8be34169f6d7419326b9be Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Oct 2024 12:26:46 +0000 Subject: [PATCH] fixed so that we have a structure for our color pallet --- src/index.css | 6 +- src/routes/admin/Admin.css | 6 +- src/routes/admin/news/News.tsx | 132 ++----------------------------- src/routes/admin/songs/Songs.tsx | 14 ++-- tailwind.config.js | 10 ++- 5 files changed, 30 insertions(+), 138 deletions(-) diff --git a/src/index.css b/src/index.css index 57d8df7..46dfb6b 100644 --- a/src/index.css +++ b/src/index.css @@ -1,8 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + :root { font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; -} + --wavelength-612-color: #FF5700; + --wavelength-612-color-light: #FF7F33; + --wavelength-612-color-dark: #CC4700; +} \ No newline at end of file diff --git a/src/routes/admin/Admin.css b/src/routes/admin/Admin.css index 380597e..3602e75 100644 --- a/src/routes/admin/Admin.css +++ b/src/routes/admin/Admin.css @@ -1,8 +1,8 @@ .sidebar { display: block; text-align: left; - background-color: orange; - max-width: 15%; + background-color: var(--wavelength-612-color); + max-width: 10%; height: 100vh; flex-grow: 1; overflow-y: auto; @@ -29,7 +29,7 @@ max-width: 15%; height: 100vh; position: absolute; - left: 15%; + left: 10%; /* Position it next to the main sidebar */ top: 0; overflow-y: auto; diff --git a/src/routes/admin/news/News.tsx b/src/routes/admin/news/News.tsx index cfcd22a..c95c1cc 100644 --- a/src/routes/admin/news/News.tsx +++ b/src/routes/admin/news/News.tsx @@ -1,125 +1,3 @@ -// import "../Admin.css"; -// import { Create } from "./Create"; -// import { type NewsRead, NewsService } from "../../../api"; - -// // biome-ignore lint/style/noNonNullAssertion: -// const news: Array = await NewsService.getAllNews().then((val) => val.data!); -// //const news: NewsItem[] = [{title: "Ny app", creator: "Cajsa", dateCreated: "32/3-2025"}] -// export interface NewsItem { -// title: string; -// creator: string; -// dateCreated: string; -// id: number; -// } - -// export default function News() { -// return ( -//
-//

Administrera nyheter

-//

-// Här kan du skapa nyheter & redigera existerande nyheter på hemsidan. -//

-// -// -//

Senaste nyheter

-// -// -// -// -// -// -// -// {news.map((news, index) => { -// return ( -// -// -// -// -// -// -// ); -// })} -//
TitelSkapareDatum skapadRedigera
{news.title_sv}{news.author_id}{news.created_at.toISOString()} -// -//
-// -//
-// ); -// } - - -// import { useState, useEffect } from "react"; -// import "../Admin.css"; -// import { Create } from "./Create"; -// import { type NewsRead, NewsService } from "../../../api"; - -// export interface NewsItem { -// title: string; -// creator: string; -// dateCreated: string; -// id: number; -// } - -// export default function News() { -// const [news, setNews] = useState>([]); -// const [loading, setLoading] = useState(true); - -// useEffect(() => { -// // Fetch news data when the component mounts -// const fetchNews = async () => { -// try { -// const response = await NewsService.getAllNews(); -// setNews(response.data || []); -// } catch (error) { -// console.error("Error fetching news:", error); -// } finally { -// setLoading(false); -// } -// }; - -// fetchNews(); -// }, []); - -// if (loading) { -// return

Loading...

; -// } - -// return ( -//
-//

Administrera nyheter

-//

Här kan du skapa nyheter & redigera existerande nyheter på hemsidan.

-// -// -//

Senaste nyheter

-// -// -// -// -// -// -// -// -// -// -// {news.map((newsItem, index) => ( -// -// -// -// -// -// -// ))} -// -//
TitelSkapareDatum skapadRedigera
{newsItem.title_sv}{newsItem.author_id}{new Date(newsItem.created_at).toLocaleDateString()} -// -//
-// -//
-// ); -// } - - - import { useState, useEffect } from "react"; import { Create } from "./Create"; import { type NewsRead, NewsService } from "../../../api"; @@ -157,7 +35,7 @@ export default function News() { return (
-

Administrera nyheter

+

Administrera nyheter

Här kan du skapa nyheter & redigera existerande nyheter på hemsidan.

@@ -175,10 +53,10 @@ export default function News() { Redigera nyheter
-

Senaste nyheter

- +

Senaste nyheter

+
- + @@ -199,7 +77,7 @@ export default function News() {
Titel Skapare Datum skapad diff --git a/src/routes/admin/songs/Songs.tsx b/src/routes/admin/songs/Songs.tsx index 2d05438..9b2388f 100644 --- a/src/routes/admin/songs/Songs.tsx +++ b/src/routes/admin/songs/Songs.tsx @@ -96,18 +96,17 @@ export default function Songs() {

Här kan du skapa nyheter & redigera existerande sånger på hemsidan.

- - +
-

Sånginformation

{/* Lägg till formuläret för att skapa en ny låt */} {showAddForm && (

Lägg till ny låt

- +
- {/* Ändrat från 'author' till 'artist' */} + {/* Ändrat från 'author' till 'artist' */}
- + )} +

Sånginformation

{/* Render the song details */} diff --git a/tailwind.config.js b/tailwind.config.js index 614c86b..6cc1814 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,7 +2,15 @@ export default { content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], theme: { - extend: {}, + extend: { + colors: { + forange: { + DEFAULT: '#FF5700', // Default shade + light: '#FF7F33', // Lighter variant if needed + dark: '#CC4700', // Darker variant if needed + }, + }, + }, }, plugins: [], };