Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export default function App() {
}

const isValentines = isValentinesSeason();
document.body.classList.toggle("valentines", isValentines);

return (
<QueryClientProvider client={queryClient}>
<AutoReload />
<main
className={`p-8 pb-0 space-y-5 h-screen flex flex-col ${
className={`px-6 pt-6 pb-0 space-y-5 h-screen flex flex-col ${
isValentines ? "bg-linear-to-tl from-pink-400 via-pink-200 to-pink-300" : ""
}`}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/date-time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function DateTime() {
<h1 className="text-4xl font-semibold flex justify-between items-center">
<p className="text-left flex-1">{formattedDate}</p>
<div className="flex flex-col">
<p className="text-center flex-1 mr-8">Uke {weekNumber}</p>
<p className="text-center flex-1">Uke {weekNumber}</p>
<Weather />
</div>
<p className="text-right flex-1">{formattedTime}</p>
Expand Down
4 changes: 3 additions & 1 deletion src/components/progress-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { motion } from "framer-motion";
import { TRANSITION_TIME } from "../config";
import { isValentinesSeason } from "../utils/date";

type ProgressBarProps = {
width: number;
};

export const ProgressBar = ({ width }: ProgressBarProps) => {
const isValentines = isValentinesSeason();
return (
<motion.div
animate={{
Expand All @@ -19,7 +21,7 @@ export const ProgressBar = ({ width }: ProgressBarProps) => {
initial={{
width: 0
}}
className="h-2 w-6 bg-primary absolute top-0 left-0"
className={`h-2 w-6 ${isValentines ? "bg-valentines-border" : "bg-primary"} absolute top-0 left-0`}
/>
);
};
10 changes: 5 additions & 5 deletions src/components/weather.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ export function Weather() {
const { TempIcon, temp } = getTempIcon(weather.temperature);

return (
<div className="flex items-center gap-4 text-sm text-gray-700">
<div className="flex items-center gap-x-4 text-sm text-gray-700">
<div className="flex items-center gap-1">
<span>{temp}°C</span>
{TempIcon && <TempIcon className="text-md opacity-80" />}
<span>{temp}°C</span>
</div>

<div className="flex items-center gap-1">
{norCond && <span>{norCond}</span>}
{WeatherIcon && <WeatherIcon className="text-md opacity-80" />}
{norCond && <span>{norCond}</span>}
</div>

<div className="flex items-center gap-1">
<span>{weather.wind_speed} m/s</span>
<TiWeatherWindy className="text-md opacity-80" />
<span>{weather.wind_speed} m/s</span>
</div>
</div>
);
Expand Down Expand Up @@ -72,7 +72,7 @@ function getIconForCondition(condition: string) {
break;
case "sunny":
WeatherIcon = TiWeatherSunny;
norCond = "Sols";
norCond = "Sol";
break;
default:
WeatherIcon = null;
Expand Down
6 changes: 6 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
--muted-foreground: 215 22% 43%;

--border: 214 32% 73%;
--valentines-border: 338, 68%, 63%;

--primary: 186 100% 32%;
--secondary: 42 96% 72%;
}

.valentines {
--border: 338, 68%, 63%;
}

@theme inline {
--color-background: hsl(var(--background));
--color-foreground: hsl(var(--foreground));
Expand All @@ -22,6 +27,7 @@
--color-muted-foreground: hsl(var(--muted-foreground));

--color-border: hsl(var(--border));
--color-valentines-border: hsl(var(--valentines-border));

--color-primary: hsl(var(--primary));
--color-secondary: hsl(var(--secondary));
Expand Down
8 changes: 4 additions & 4 deletions src/pages/message-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export const MessageScreen = () => {
const { data: message } = useMessage();

return (
<div className="flex flex-col items-center justify-center w-full py-20 px-8">
<div className="bg-background/80 border border-gray-300 shadow-lg rounded-2xl p-12 max-w-5xl w-full text-center max-h-[600px] overflow-hidden">
<h1 className="text-3xl font-semibold text-gray-700 mb-8">Hovedstyret taler!</h1>
<div className="flex flex-col items-center justify-center w-full">
<div className="bg-background/80 border-2 shadow-lg rounded-2xl p-8 max-w-5xl w-full text-center max-h-[600px] overflow-hidden">
<h1 className="text-3xl font-semibold text-gray-700 mb-6">Hovedstyret taler!</h1>

{message?.title && (
<h2 className="text-5xl font-bold text-gray-900 mb-8">{message.title}</h2>
<h2 className="text-5xl font-bold text-gray-900 mb-6">{message.title}</h2>
)}

<p className="text-2xl leading-relaxed text-gray-800 whitespace-pre-line">
Expand Down