From ccca533db6b324d435585556f1abd614033cfed0 Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Sat, 12 Jul 2025 12:32:58 +0200 Subject: [PATCH] added dreamy gradient styles to `index.css`, expanded `getBackgroundStyle` for gradient types, introduced `ChipCard` component, updated `Home` with `ChipCard`, and refined layouts with consistent paddings and shadows Signed-off-by: Matthias Puchstein --- src/components/ChipCard.tsx | 40 +++++++++++++++++++++ src/components/DailyHighlights.tsx | 17 +++++---- src/components/DreamCard.tsx | 30 ++++++++++------ src/components/DreamCardCompact.tsx | 24 +++++++------ src/components/DreamRecord.tsx | 6 ++-- src/components/Navbar.tsx | 22 +++++++----- src/components/TopBar.tsx | 15 +++++--- src/index.css | 20 +++++++++++ src/pages/Home.tsx | 39 ++++---------------- src/styles/StyleUtils.ts | 56 +++++++++++++++++++++++++++-- 10 files changed, 190 insertions(+), 79 deletions(-) create mode 100644 src/components/ChipCard.tsx diff --git a/src/components/ChipCard.tsx b/src/components/ChipCard.tsx new file mode 100644 index 0000000..01c4cff --- /dev/null +++ b/src/components/ChipCard.tsx @@ -0,0 +1,40 @@ +import React from 'react'; +import {NavLink} from 'react-router-dom'; + +export const ChipCard: React.FC = () => { + return ( + +
+
+
+ + + +
+
+

ReMind Sensor-Gerät

+

Verbessere deine Traumerfahrung mit unserem Sensor + mit EEG, + Bewegungserkennung und Vitalzeichen-Überwachung.

+
+ Pro-Funktionen: VR-Räume, Automatische Traumerkennung und Aufzeichnung +
+
+
+
+
+ ); +}; diff --git a/src/components/DailyHighlights.tsx b/src/components/DailyHighlights.tsx index 60c4f30..3485078 100644 --- a/src/components/DailyHighlights.tsx +++ b/src/components/DailyHighlights.tsx @@ -1,5 +1,5 @@ import {primaryMoodCategories, topDreamTopics} from '../data/MockDailyHighlights'; -import {getCardStyle, getTextStyle} from '../styles/StyleUtils'; +import {getTextStyle} from '../styles/StyleUtils'; /** * HighlightCard component displays a single highlight item with a colored progress bar @@ -13,9 +13,9 @@ const HighlightCard = ({label, percentage}: HighlightItemProps) => { return (
-
@@ -51,15 +51,18 @@ const HighlightCard = ({label, percentage}: HighlightItemProps) => { */ export const DailyHighlights = () => { return ( -
+

Tägliche Highlights

@@ -78,7 +81,7 @@ export const DailyHighlights = () => {
diff --git a/src/components/DreamCard.tsx b/src/components/DreamCard.tsx index 7b2bb31..9252845 100644 --- a/src/components/DreamCard.tsx +++ b/src/components/DreamCard.tsx @@ -3,7 +3,7 @@ import Dream from '../types/Dream'; import type User from "../types/User.ts"; import {NavLink} from "react-router-dom"; import {useEffect, useState} from "react"; -import {getAccentStyle, getTextStyle} from '../styles/StyleUtils'; +import {getTextStyle} from '../styles/StyleUtils'; import {formatDateWithTime} from '../utils/DateUtils'; interface DreamCardProps { @@ -24,19 +24,23 @@ export default function DreamCard({dream, user, animationDelay = 0}: DreamCardPr }, [animationDelay]); return ( -
  • -
    +
  • +
    {user?.name} -
    +
    - {user?.name} hat geträumt: + {user?.name} hat geträumt:

    {dream.title} @@ -46,14 +50,18 @@ export default function DreamCard({dream, user, animationDelay = 0}: DreamCardPr || (dream.input.inputType === 'audio' && dream.input.transcript) || (dream.input.inputType === 'image' && dream.input.description)}

    -
    +

    {formatDateWithTime(dream.date)}

    {/* Display dream type as a tag */} - + {dream.input.inputType}
    diff --git a/src/components/DreamCardCompact.tsx b/src/components/DreamCardCompact.tsx index 3a8fac8..90fbe1c 100644 --- a/src/components/DreamCardCompact.tsx +++ b/src/components/DreamCardCompact.tsx @@ -15,36 +15,40 @@ export const DreamCardCompact = ({dream, index, showUser = false, user}: DreamCa
    {showUser && user && (
    + className="w-6 h-6 rounded-full mr-1.5 flex items-center justify-center overflow-hidden border-2" + style={{ + background: 'var(--accent-gradient)', + borderColor: 'var(--accent-soft)', + boxShadow: '0 2px 5px var(--shadow)' + }}> {user.profilePicture ? ( {user.name} ) : ( {user.name.charAt(0)} + className="text-xs text-white">{user.name.charAt(0)} )}
    {user.name} + className="font-medium text-xs dreamy-text">{user.name}
    )}
    -

    {dream.title}

    -

    +

    {dream.title}

    +

    {formatDateSimple(dream.date)}

    diff --git a/src/components/DreamRecord.tsx b/src/components/DreamRecord.tsx index 06ac538..d1ad8f0 100644 --- a/src/components/DreamRecord.tsx +++ b/src/components/DreamRecord.tsx @@ -7,7 +7,7 @@ export function DreamRecord() { return (
    -
    +

    Neuer Traum