Skip to content

Commit dc0c738

Browse files
authored
feat: new topwr section and link fix
* feat: new topwr section and link fix * fix: topwr logo size * feat: planer watermark on exported plans * fix: watermark colors
1 parent 54946d8 commit dc0c738

File tree

5 files changed

+106
-45
lines changed

5 files changed

+106
-45
lines changed

frontend/src/app/(homepage)/_components/github-repo.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Link from "next/link";
2+
13
import { Icons } from "@/components/icons";
24
import { AvatarCircles } from "@/components/magicui/avatars";
35
import { Button } from "@/components/ui/button";
@@ -89,11 +91,14 @@ export async function GithubRepo() {
8991
<Button
9092
className="group mt-4 bg-primary text-white ring-amber-500 ring-offset-2 transition-all hover:bg-blue-600 hover:ring-2 dark:bg-white dark:text-black dark:hover:bg-slate-200"
9193
size={"lg"}
94+
asChild
9295
>
93-
<Icons.Github className="size-4" />
94-
Walnij nam gwiazdkę
95-
<Icons.StarFilledIcon className="text-slate-300 transition-all group-hover:text-amber-500 dark:text-slate-600" />
96-
{stars}
96+
<Link href="https://github.com/Solvro/web-planer" target="_blank">
97+
<Icons.Github className="size-4" />
98+
Walnij nam gwiazdkę
99+
<Icons.StarFilledIcon className="text-slate-300 transition-all group-hover:text-amber-500 dark:text-slate-600" />
100+
{stars}
101+
</Link>
97102
</Button>
98103
</div>
99104
</>

frontend/src/app/(homepage)/page.tsx

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ const JoinUsBlock = async () => {
114114
const usos = await createUsosService();
115115
await usos.getProfile();
116116

117-
throw new Error("User is logged in");
118-
119117
return (
120118
<div className="flex items-center justify-center gap-3">
121119
<Button
@@ -160,30 +158,30 @@ const JoinUsBlock = async () => {
160158
export default function Home() {
161159
return (
162160
<main className="mx-auto flex-1 overflow-hidden">
163-
{/* <Button>Click me</Button>
164-
<ModeToggle /> */}
165161
<section
166162
id="hero"
167163
className="relative mx-auto mt-28 max-w-[80rem] px-2 text-center md:mt-56 md:px-8"
168164
>
169165
<div className="z-10 flex animate-fade-in-2 items-center justify-center opacity-0 [--animation-delay:1000ms]">
170-
<AnimatedGradientText>
171-
<Image
172-
src={"/assets/logo/topwr_logo.svg"}
173-
alt={"ToPWR Logo"}
174-
className="inline"
175-
width={60}
176-
height={10}
177-
/>{" "}
178-
<hr className="mx-2 h-4 w-px shrink-0 bg-gray-300" />{" "}
179-
<span
180-
className={cn(
181-
`inline animate-gradient text-balance bg-gradient-to-r from-[#ffd5a2] via-[#cea1ff] to-[#ffd5a2] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent dark:from-[#ffaa40] dark:via-[#9c40ff] dark:to-[#ffaa40]`,
182-
)}
183-
>
184-
Obowiązkowa apka dla każdego studenta!
185-
</span>
186-
</AnimatedGradientText>
166+
<Link href="#topwr">
167+
<AnimatedGradientText>
168+
<Image
169+
src={"/assets/logo/topwr_logo.svg"}
170+
alt={"ToPWR Logo"}
171+
className="inline"
172+
width={60}
173+
height={10}
174+
/>{" "}
175+
<hr className="mx-2 h-4 w-px shrink-0 bg-gray-300" />{" "}
176+
<span
177+
className={cn(
178+
`inline animate-gradient text-balance bg-gradient-to-r from-[#ffd5a2] via-[#cea1ff] to-[#ffd5a2] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent dark:from-[#ffaa40] dark:via-[#9c40ff] dark:to-[#ffaa40]`,
179+
)}
180+
>
181+
Obowiązkowa apka dla każdego studenta!
182+
</span>
183+
</AnimatedGradientText>
184+
</Link>
187185
</div>
188186
<AnimationLogo />
189187
<p className="mb-2 translate-y-[-1rem] animate-fade-in-2 text-balance text-lg tracking-tight text-muted-foreground opacity-0 [--animation-delay:400ms] md:text-xl">
@@ -379,6 +377,55 @@ export default function Home() {
379377
</Suspense>
380378
</div>
381379
</section>
380+
381+
<section className="bg-background" id="topwr">
382+
<div className="rounded-xl bg-orange-500/20 py-16 dark:bg-orange-500/10">
383+
<div className="container relative mx-auto max-w-7xl px-4 py-16">
384+
<div className="mx-auto space-y-4 pb-6 text-center">
385+
<h2 className="font-mono text-sm font-medium uppercase tracking-wider text-orange-600">
386+
jesteś studentem politechniki wrocławskiej?
387+
</h2>
388+
<h3 className="mx-auto mt-4 max-w-xs text-3xl font-bold sm:max-w-none sm:text-4xl md:text-5xl">
389+
Koniecznie zainstaluj aplikację{" "}
390+
<Image
391+
src={"/assets/logo/topwr_logo.svg"}
392+
alt={"ToPWR Logo"}
393+
className="inline brightness-0 dark:invert"
394+
width={140}
395+
height={50}
396+
/>
397+
</h3>
398+
<p className="mx-auto mt-6 max-w-2xl text-balance text-lg leading-6 text-slate-600 dark:text-slate-300">
399+
Znajdziesz w niej wszystkie potrzebne informacje o parkingach,
400+
menu w SKS, mapie kampusu i wiele więcej.
401+
</p>
402+
</div>
403+
404+
<div className="flex w-full flex-col items-center justify-center space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0">
405+
<div className="mt-4 flex items-center gap-2">
406+
<Link href="https://play.google.com/store/apps/details?id=com.solvro.topwr">
407+
<Image
408+
src={"/assets/google_play.png"}
409+
alt={"Download on google play"}
410+
width={300}
411+
height={50}
412+
className="w-[160px]"
413+
/>
414+
</Link>
415+
<Link href="https://apps.apple.com/us/app/topwr/id1644647395">
416+
<Image
417+
src={"/assets/apple_store.png"}
418+
alt={"Download on google play"}
419+
width={300}
420+
height={50}
421+
className="w-[144px]"
422+
/>
423+
</Link>
424+
</div>
425+
</div>
426+
</div>
427+
</div>
428+
</section>
382429
</main>
383430
);
384431
}

frontend/src/app/plans/edit/[id]/page.client.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useMutation, useQuery } from "@tanstack/react-query";
44
import { format, isEqual } from "date-fns";
55
import { AnimatePresence, motion } from "framer-motion";
6+
import Image from "next/image";
67
import Link from "next/link";
78
import { useRouter } from "next/navigation";
89
import { useEffect, useRef, useState } from "react";
@@ -517,7 +518,7 @@ export function CreateNewPlanPage({
517518
<div className="relative max-h-[700px] overflow-y-auto">
518519
<div
519520
ref={captureRef}
520-
className="flex flex-col gap-2 bg-background p-1"
521+
className="relative flex flex-col gap-2 bg-background p-1"
521522
>
522523
{[
523524
{ day: Day.MONDAY, label: "Poniedziałek" },
@@ -556,6 +557,28 @@ export function CreateNewPlanPage({
556557
/>
557558
),
558559
)}
560+
561+
<div className="absolute bottom-4 right-0 z-20 opacity-10">
562+
<div className="ml-4 flex items-center gap-4 text-2xl font-bold text-black dark:text-white md:w-1/4">
563+
<Image
564+
src={"/assets/logo/logo_solvro_mono.png"}
565+
alt="Solvro logo"
566+
className="hidden dark:block"
567+
width={70}
568+
height={70}
569+
/>
570+
<Image
571+
src={"/assets/logo/logo_solvro_color.png"}
572+
alt="Solvro logo"
573+
className="block dark:hidden"
574+
width={70}
575+
height={70}
576+
/>
577+
<h1 className="hidden text-3xl font-semibold md:block">
578+
Planer
579+
</h1>
580+
</div>
581+
</div>
559582
</div>
560583
</div>
561584
<AnimatePresence>

frontend/src/components/magicui/animated-text.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,17 @@ import type { ComponentPropsWithoutRef, ReactNode } from "react";
44

55
import { cn } from "@/lib/utils";
66

7-
interface AnimatedGradientTextProps extends ComponentPropsWithoutRef<"button"> {
7+
interface AnimatedGradientTextProps extends ComponentPropsWithoutRef<"div"> {
88
children: ReactNode;
99
}
1010

11-
function downloadApp() {
12-
const userAgent = navigator.userAgent;
13-
14-
if (/android|Windows/i.test(userAgent)) {
15-
window.open(
16-
"https://play.google.com/store/apps/details?id=com.solvro.topwr",
17-
"_blank",
18-
);
19-
} else if (/iPad|iPhone|iPod|Macintosh/i.test(userAgent)) {
20-
window.open("https://apps.apple.com/us/app/topwr/id1644647395", "_blank");
21-
}
22-
}
23-
2411
export function AnimatedGradientText({
2512
children,
2613
className,
2714
...props
2815
}: AnimatedGradientTextProps) {
2916
return (
30-
<button
31-
onClick={downloadApp}
17+
<div
3218
className={cn(
3319
"group relative mx-auto flex max-w-fit flex-row items-center justify-center rounded-2xl bg-orange-950/90 px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f] backdrop-blur-sm transition-shadow duration-500 ease-out [--bg-size:300%] hover:shadow-[inset_0_-5px_10px_#8fdfff3f] dark:bg-black/40",
3420
className,
@@ -40,6 +26,6 @@ export function AnimatedGradientText({
4026
/>
4127

4228
{children}
43-
</button>
29+
</div>
4430
);
4531
}

frontend/src/components/solvro-logo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Image from "next/image";
22
import Link from "next/link";
33

4-
import logoColored from "../../public/assets/logo/logo_solvro_color.png";
5-
import logo from "../../public/assets/logo/logo_solvro_mono.png";
4+
import logoColored from "@/../public/assets/logo/logo_solvro_color.png";
5+
import logo from "@/../public/assets/logo/logo_solvro_mono.png";
66

77
export function SolvroLogo({ colored = false }: { colored?: boolean }) {
88
return (

0 commit comments

Comments
 (0)