diff --git a/src/App.css b/src/App.css index 4960491..757e7e3 100644 --- a/src/App.css +++ b/src/App.css @@ -38,16 +38,18 @@ .card { padding: 1.5em; - background-color: var(--card); + background: linear-gradient(135deg, rgba(166, 77, 255, 0.25), rgba(213, 0, 249, 0.25)); border-radius: 12px; - box-shadow: 0 4px 12px var(--shadow); + box-shadow: 0 10px 30px var(--shadow), inset 0 0 15px rgba(166, 77, 255, 0.2); margin-bottom: 1rem; - transition: transform 0.2s, box-shadow 0.2s; + transition: transform 0.3s, box-shadow 0.3s; + backdrop-filter: blur(10px); + border: none; } .card:hover { - transform: translateY(-3px); - box-shadow: 0 6px 16px var(--shadow); + transform: translateY(-5px); + box-shadow: 0 15px 35px var(--shadow), inset 0 0 20px rgba(166, 77, 255, 0.3); } /* Responsive adjustments */ @@ -67,10 +69,11 @@ .dreamy-border { border: 2px solid transparent; - background: - linear-gradient(var(--bg), var(--bg)) padding-box, + background: linear-gradient(135deg, rgba(166, 77, 255, 0.25), rgba(213, 0, 249, 0.25)) padding-box, var(--accent-gradient) border-box; border-radius: 12px; + box-shadow: 0 10px 30px var(--shadow), inset 0 0 15px rgba(166, 77, 255, 0.2); + backdrop-filter: blur(10px); } .dreamy-button { @@ -80,11 +83,14 @@ padding: 0.6em 1.2em; border-radius: 8px; font-weight: 500; - transition: transform 0.2s, box-shadow 0.2s; - box-shadow: 0 4px 12px var(--shadow); + transition: transform 0.3s, box-shadow 0.3s; + box-shadow: 0 10px 30px var(--shadow), inset 0 0 15px rgba(255, 255, 255, 0.2); + backdrop-filter: blur(5px); + opacity: 0.9; } .dreamy-button:hover { - transform: translateY(-2px); - box-shadow: 0 6px 16px var(--shadow); + transform: translateY(-5px); + box-shadow: 0 15px 35px var(--shadow), inset 0 0 20px rgba(255, 255, 255, 0.3); + opacity: 1; } diff --git a/src/assets/logotext.svg b/src/assets/logotext.svg index c1806f8..a579864 100644 --- a/src/assets/logotext.svg +++ b/src/assets/logotext.svg @@ -6,13 +6,13 @@ - + - + diff --git a/src/components/DreamCard.tsx b/src/components/DreamCard.tsx index 34346fc..e3310b1 100644 --- a/src/components/DreamCard.tsx +++ b/src/components/DreamCard.tsx @@ -2,38 +2,62 @@ import Dream from '../types/Dream'; import type User from "../types/User.ts"; import {NavLink} from "react-router-dom"; +import {useEffect, useState} from "react"; interface DreamCardProps { dream: Dream; user: User | undefined; + animationDelay?: number; } -export default function DreamCard({dream, user}: DreamCardProps) { +export default function DreamCard({dream, user, animationDelay = 0}: DreamCardProps) { + const [isVisible, setIsVisible] = useState(false); + + useEffect(() => { + const timer = setTimeout(() => { + setIsVisible(true); + }, animationDelay * 100); + + return () => clearTimeout(timer); + }, [animationDelay]); + return ( -
  • -
    - {user?.name} - {user?.name} hat geträumt: +
  • +
    +
    + {user?.name} +
    +
    + {user?.name} hat geträumt:
    -

    +

    {dream.title}

    -

    +

    {(dream.input.inputType === 'text' && dream.input.input) || (dream.input.inputType === 'audio' && dream.input.transcript) || (dream.input.inputType === 'image' && dream.input.description)}

    -

    - {dream.date.toLocaleDateString('de-DE', { - day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', - })} -

    +
    +

    + {dream.date.toLocaleDateString('de-DE', { + day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', + })} +

    +
    + {/* Display dream type as a tag */} + + {dream.input.inputType} + +
    +
  • ) - -} \ No newline at end of file +} diff --git a/src/index.css b/src/index.css index 1492565..14987df 100644 --- a/src/index.css +++ b/src/index.css @@ -11,6 +11,7 @@ --accent-soft: #c9a4ff; --accent-dark: #6a0dad; --shadow: rgba(166, 77, 255, 0.2); + --text-shadow: rgba(0, 0, 0, 0.5); font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; @@ -37,6 +38,7 @@ --accent-soft: #a64dff; --accent-dark: #6a0dad; --shadow: rgba(196, 144, 255, 0.3); + --text-shadow: rgba(255, 255, 255, 0.5); } .border-background { @@ -47,6 +49,21 @@ background-color: var(--bg); color: var(--text); transition: background-color 0.3s, color 0.3s; + position: relative; +} + +.page::before { + content: ""; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-image: radial-gradient(var(--accent-soft) 1px, transparent 1px); + background-size: 40px 40px; + opacity: 0.05; + pointer-events: none; + z-index: 0; } .pageTitle { @@ -56,11 +73,13 @@ } .dreamPanel { - background-color: var(--card); + background: linear-gradient(135deg, rgba(166, 77, 255, 0.35), rgba(213, 0, 249, 0.35)); border-radius: 10px; padding: 1em; color: var(--text); - border: 1px solid var(--accent); + backdrop-filter: blur(5px); + box-shadow: 0 0 15px var(--shadow); + border: none; } a { @@ -110,27 +129,58 @@ button:focus-visible { } .feed-container { - background-color: var(--container); - padding: 1em; + padding: 1.5em; + transition: all 0.3s ease; + position: relative; + overflow: hidden; + border: none; + border-radius: 16px; } + .dream-card { - background-color: var(--card); - border-radius: 10px; - padding: 1em; + background: linear-gradient(135deg, rgba(166, 77, 255, 0.35), rgba(213, 0, 249, 0.35)); + border-radius: 12px; + padding: 1.25em; color: var(--text); - border: 1px solid var(--accent); + backdrop-filter: blur(10px); + box-shadow: 0 10px 30px var(--shadow), inset 0 0 15px rgba(166, 77, 255, 0.3); + position: relative; + transition: all 0.3s ease; + border: none; +} + +.dream-card::before { + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + margin: -1px; + border-radius: inherit; + background: var(--accent-gradient); + opacity: 0.1; +} + +.dream-card:hover { + transform: translateY(-5px); + box-shadow: 0 15px 35px var(--shadow), inset 0 0 20px rgba(166, 77, 255, 0.3); } .dream-card .title { color: var(--accent); font-weight: bold; font-size: 1.25em; + margin-bottom: 0.5em; + line-height: 1.3; } .dream-card .timestamp { color: var(--text-muted); font-size: 0.85em; + font-weight: 500; } .microphone-button { @@ -189,20 +239,23 @@ button:focus-visible { -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; + text-shadow: 0 1px 2px var(--text-shadow); } .dream-container { - background-color: var(--container); + background: linear-gradient(135deg, rgba(166, 77, 255, 0.25), rgba(213, 0, 249, 0.25)); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; - box-shadow: 0 4px 15px var(--shadow); + box-shadow: 0 10px 30px var(--shadow), inset 0 0 15px rgba(166, 77, 255, 0.2); + backdrop-filter: blur(10px); transition: transform 0.3s, box-shadow 0.3s; + border: none; } .dream-container:hover { transform: translateY(-5px); - box-shadow: 0 8px 25px var(--shadow); + box-shadow: 0 15px 35px var(--shadow), inset 0 0 20px rgba(166, 77, 255, 0.3); } /* Scrollbar styling */ @@ -223,6 +276,23 @@ button:focus-visible { background: var(--accent); } +/* Dreamy Card Styling */ +.dreamy-card { + background: linear-gradient(135deg, rgba(166, 77, 255, 0.35), rgba(213, 0, 249, 0.35)); + border-radius: 12px; + padding: 1.25em; + color: var(--text); + backdrop-filter: blur(5px); + box-shadow: 0 0 15px var(--shadow); + transition: all 0.3s ease; + border: none; +} + +.dreamy-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 25px var(--shadow), inset 0 0 15px rgba(166, 77, 255, 0.3); +} + /* Animations */ @keyframes dream-float { 0% { @@ -240,7 +310,7 @@ button:focus-visible { animation: dream-float 6s ease-in-out infinite; } -/* Responsive typography */ +/* Responsive adjustments */ @media (max-width: 768px) { h1 { font-size: 2.5em; @@ -251,4 +321,39 @@ button:focus-visible { p { font-size: 0.95em; } + + .feed-container { + padding: 1.2em; + } + + .dream-card { + padding: 1em; + } + + .dream-card .title { + font-size: 1.1em; + } +} + +@media (max-width: 480px) { + .page { + padding: 0.75rem !important; + } + + .feed-container { + padding: 1em 0.75em; + } + + .dream-card { + padding: 0.9em; + } + + .dream-card .title { + font-size: 1em; + } + + .dream-card img { + width: 2.5rem !important; + height: 2.5rem !important; + } } diff --git a/src/pages/DreamPage.tsx b/src/pages/DreamPage.tsx index af5ff25..a6b1ede 100644 --- a/src/pages/DreamPage.tsx +++ b/src/pages/DreamPage.tsx @@ -62,19 +62,30 @@ export default function DreamPage() {
    -
    +
    - Traum-Beschreibung + Traum-Beschreibung
    + {(dream.input.inputType === 'image' || dream.input.inputType === 'audio') && ( +
    + {dream.input.inputType === 'audio' && ( + + )} + {dream.input.inputType === 'image' && ( + {dream.input.imgAlt} + )} +
    )}

    - {dream.input} + {(dream.input.inputType === 'text' && dream.input.input) + || (dream.input.inputType === 'audio' && dream.input.transcript) + || (dream.input.inputType === 'image' && dream.input.description)}

    {dream.ai?.interpretation && dream.ai.interpretation !== '' && (
    + className="dreamy-card rounded-xl sm:rounded-2xl p-4 sm:p-6">
    - KI-Interpretation + KI-Interpretation

    {dream.ai.interpretation} @@ -82,9 +93,9 @@ export default function DreamPage() {

    )} {dream.ai?.image && dream.ai.image !== '' && (
    + className="dreamy-card rounded-xl sm:rounded-2xl p-4 sm:p-6">
    - KI-Bild + KI-Bild
    )} {dream.ai?.audio && dream.ai.audio !== '' && (
    + className="dreamy-card rounded-xl sm:rounded-2xl p-4 sm:p-6">
    - KI-Audio + KI-Audio