remove banner on mobile/tablet devices

This commit is contained in:
Amruth Pillai
2024-03-25 15:08:39 +01:00
parent 890875ad9d
commit f6c2ae7504
19 changed files with 726 additions and 798 deletions

6
.ncurc.json Normal file
View File

@ -0,0 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/raineorshine/npm-check-updates/main/src/types/RunOptions.json",
"upgrade": true,
"install": "always",
"reject": ["@nestjs-modules/mailer"]
}

View File

@ -198,7 +198,7 @@ const Section = <T,>({
{url !== undefined && <Link url={url} />} {url !== undefined && <Link url={url} />}
</div> </div>
<div className="absolute inset-y-0 -left-px border-l-[4px] border-primary group-[.sidebar]:hidden" /> <div className="absolute inset-y-0 -left-px border-l-4 border-primary group-[.sidebar]:hidden" />
</div> </div>
{summary !== undefined && !isEmptyString(summary) && ( {summary !== undefined && !isEmptyString(summary) && (

View File

@ -12,13 +12,13 @@ import {
FormMessage, FormMessage,
Input, Input,
} from "@reactive-resume/ui"; } from "@reactive-resume/ui";
import { ControllerRenderProps, useForm } from "react-hook-form"; import { useCallback } from "react";
import { useForm } from "react-hook-form";
import { useDebounceValue } from "usehooks-ts";
import { z } from "zod"; import { z } from "zod";
import { SectionDialog } from "../sections/shared/section-dialog"; import { SectionDialog } from "../sections/shared/section-dialog";
import { URLInput } from "../sections/shared/url-input"; import { URLInput } from "../sections/shared/url-input";
import { useDebounceValue } from "usehooks-ts";
import { useCallback } from "react";
const formSchema = profileSchema; const formSchema = profileSchema;
@ -30,7 +30,7 @@ export const ProfilesDialog = () => {
resolver: zodResolver(formSchema), resolver: zodResolver(formSchema),
}); });
const [iconSrc, setIconSrc] = useDebounceValue("", 400) const [iconSrc, setIconSrc] = useDebounceValue("", 400);
const handleIconChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => { const handleIconChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {
if (event.target.value === "") { if (event.target.value === "") {
@ -40,8 +40,6 @@ export const ProfilesDialog = () => {
} }
}, []); }, []);
return ( return (
<SectionDialog<FormValues> id="profiles" form={form} defaultValues={defaultProfile}> <SectionDialog<FormValues> id="profiles" form={form} defaultValues={defaultProfile}>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2"> <div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
@ -97,17 +95,17 @@ export const ProfilesDialog = () => {
<FormControl> <FormControl>
<div className="flex items-center gap-x-2"> <div className="flex items-center gap-x-2">
<Avatar className="size-8 bg-white"> <Avatar className="size-8 bg-white">
{iconSrc && ( {iconSrc && <AvatarImage className="p-1.5" src={iconSrc} />}
<AvatarImage
className="p-1.5"
src={iconSrc}
/>
)}
</Avatar> </Avatar>
<Input {...field} id="iconSlug" placeholder="linkedin" onChange={(event) => { <Input
field.onChange(event) {...field}
handleIconChange(event) id="iconSlug"
}} /> placeholder="linkedin"
onChange={(event) => {
field.onChange(event);
handleIconChange(event);
}}
/>
</div> </div>
</FormControl> </FormControl>
<FormMessage /> <FormMessage />

View File

@ -3,21 +3,20 @@
import { HandHeart } from "@phosphor-icons/react"; import { HandHeart } from "@phosphor-icons/react";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
export const DonationBanner = () => { export const DonationBanner = () => (
return ( <motion.a
<a href="https://opencollective.com/Reactive-Resume" target="_blank" rel="noreferrer"> target="_blank"
<motion.div rel="noreferrer"
href="https://opencollective.com/Reactive-Resume"
whileHover={{ height: 48 }} whileHover={{ height: 48 }}
initial={{ opacity: 0, y: -50, height: 32 }} initial={{ opacity: 0, y: -50, height: 32 }}
animate={{ opacity: 1, y: 0, transition: { duration: 0.3 } }} animate={{ opacity: 1, y: 0, transition: { duration: 0.3 } }}
className="flex w-screen items-center justify-center gap-x-2 bg-zinc-800 text-xs font-bold leading-relaxed text-zinc-50" className="hidden w-screen items-center justify-center gap-x-2 bg-zinc-800 text-xs font-bold leading-relaxed text-zinc-50 lg:flex"
> >
<HandHeart weight="bold" size={14} className="shrink-0" /> <HandHeart weight="bold" size={14} className="shrink-0" />
<span> <span>
If this project has helped you, please consider donating to Reactive Resume as we're If this project has helped you, please consider donating to Reactive Resume as we're running
running out of server resources with the increasing number of users. out of server resources with the increasing number of users.
</span> </span>
</motion.div> </motion.a>
</a> );
);
};

View File

@ -44,7 +44,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },

View File

@ -9,7 +9,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },
}); });

View File

@ -33,9 +33,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
cache: {
dir: "../../node_modules/.vitest",
},
environment: "jsdom", environment: "jsdom",
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },

View File

@ -9,7 +9,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },
}); });

View File

@ -9,7 +9,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },
}); });

View File

@ -44,7 +44,7 @@ export const ContextMenuSubContent = forwardRef<
<ContextMenuPrimitive.SubContent <ContextMenuPrimitive.SubContent
ref={ref} ref={ref}
className={cn( className={cn(
"z-50 max-h-[var(--radix-context-menu-content-available-height)] w-[var(--radix-context-menu-trigger-width)] min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-md border bg-background p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 max-h-[var(--radix-context-menu-content-available-height)] w-[var(--radix-context-menu-trigger-width)] min-w-32 origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-md border bg-background p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className, className,
)} )}
{...props} {...props}
@ -61,7 +61,7 @@ export const ContextMenuContent = forwardRef<
<ContextMenuPrimitive.Content <ContextMenuPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(
"z-50 max-h-[var(--radix-context-menu-content-available-height)] w-[var(--radix-context-menu-trigger-width)] min-w-[8rem] origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-md border bg-background p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 max-h-[var(--radix-context-menu-content-available-height)] w-[var(--radix-context-menu-trigger-width)] min-w-32 origin-[var(--radix-context-menu-content-transform-origin)] overflow-hidden rounded-md border bg-background p-1 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className, className,
)} )}
{...props} {...props}

View File

@ -45,7 +45,7 @@ export const DropdownMenuSubContent = forwardRef<
<DropdownMenuPrimitive.SubContent <DropdownMenuPrimitive.SubContent
ref={ref} ref={ref}
className={cn( className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 min-w-32 overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className, className,
)} )}
{...props} {...props}
@ -64,7 +64,7 @@ export const DropdownMenuContent = forwardRef<
ref={ref} ref={ref}
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-sm", "z-50 min-w-32 overflow-hidden rounded-md border bg-background p-1 text-foreground shadow-sm",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className, className,
)} )}

View File

@ -46,8 +46,8 @@ export const ScrollBar = forwardRef<
orientation={orientation} orientation={orientation}
className={cn( className={cn(
"flex touch-none select-none transition-colors", "flex touch-none select-none transition-colors",
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]", orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-px",
className, className,
)} )}
{...props} {...props}

View File

@ -38,7 +38,7 @@ export const SelectContent = forwardRef<
<SelectPrimitive.Content <SelectPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(
"relative z-50 min-w-[8rem] overflow-hidden rounded border border-border bg-background text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "relative z-50 min-w-32 overflow-hidden rounded border border-border bg-background text-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" && position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className, className,

View File

@ -12,7 +12,7 @@ export const Separator = forwardRef<
orientation={orientation} orientation={orientation}
className={cn( className={cn(
"shrink-0 bg-border", "shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
className, className,
)} )}
{...props} {...props}

View File

@ -35,8 +35,8 @@ export const KeyboardShortcut = ({
return ( return (
<span <span
className={cn( className={cn(
"ml-auto scale-0 text-xs tracking-widest opacity-0 transition-[opacity]", "ml-auto text-xs tracking-widest transition-opacity",
value && "scale-100 opacity-60", value ? "scale-100 opacity-60" : "scale-0 opacity-0",
className, className,
)} )}
{...props} {...props}

View File

@ -38,7 +38,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },
}); });

View File

@ -9,7 +9,6 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "jsdom", environment: "jsdom",
cache: { dir: "../../node_modules/.vitest" },
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
}, },
}); });

View File

@ -1,7 +1,7 @@
{ {
"name": "@reactive-resume/source", "name": "@reactive-resume/source",
"description": "A free and open-source resume builder that simplifies the process of creating, updating, and sharing your resume.", "description": "A free and open-source resume builder that simplifies the process of creating, updating, and sharing your resume.",
"version": "4.0.9", "version": "4.0.10",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"author": { "author": {
@ -15,7 +15,7 @@
}, },
"scripts": { "scripts": {
"dev": "nx run-many -t serve", "dev": "nx run-many -t serve",
"test": "nx run-many -t test", "test": "pnpm vitest run",
"prebuild": "pnpm prisma:generate", "prebuild": "pnpm prisma:generate",
"build": "nx run-many -t build", "build": "nx run-many -t build",
"prestart": "pnpm prisma:migrate", "prestart": "pnpm prisma:migrate",
@ -73,7 +73,7 @@
"@types/passport-github2": "^1.2.9", "@types/passport-github2": "^1.2.9",
"@types/passport-google-oauth20": "^2.0.14", "@types/passport-google-oauth20": "^2.0.14",
"@types/passport-local": "^1.0.38", "@types/passport-local": "^1.0.38",
"@types/react": "18.2.67", "@types/react": "18.2.70",
"@types/react-dom": "18.2.22", "@types/react-dom": "18.2.22",
"@types/react-is": "18.2.4", "@types/react-is": "18.2.4",
"@types/retry": "^0.12.5", "@types/retry": "^0.12.5",
@ -110,7 +110,7 @@
"ts-jest": "^29.1.2", "ts-jest": "^29.1.2",
"ts-node": "10.9.2", "ts-node": "10.9.2",
"typescript": "~5.4.3", "typescript": "~5.4.3",
"vite": "~5.2.2", "vite": "~5.2.6",
"vite-plugin-dts": "~3.7.3", "vite-plugin-dts": "~3.7.3",
"vitest": "~1.4.0" "vitest": "~1.4.0"
}, },
@ -125,10 +125,10 @@
"@lingui/detect-locale": "^4.7.1", "@lingui/detect-locale": "^4.7.1",
"@lingui/macro": "^4.7.1", "@lingui/macro": "^4.7.1",
"@lingui/react": "^4.7.1", "@lingui/react": "^4.7.1",
"@nestjs-modules/mailer": "^1.10.3", "@nestjs-modules/mailer": "1.10.3",
"@nestjs/axios": "^3.0.2", "@nestjs/axios": "^3.0.2",
"@nestjs/common": "^10.3.5", "@nestjs/common": "^10.3.5",
"@nestjs/config": "^3.2.0", "@nestjs/config": "^3.2.1",
"@nestjs/core": "^10.3.5", "@nestjs/core": "^10.3.5",
"@nestjs/jwt": "^10.2.0", "@nestjs/jwt": "^10.2.0",
"@nestjs/passport": "^10.0.3", "@nestjs/passport": "^10.0.3",
@ -167,7 +167,7 @@
"@songkeys/nestjs-redis": "^10.0.0", "@songkeys/nestjs-redis": "^10.0.0",
"@songkeys/nestjs-redis-health": "^10.0.0", "@songkeys/nestjs-redis-health": "^10.0.0",
"@swc/helpers": "~0.5.7", "@swc/helpers": "~0.5.7",
"@tanstack/react-query": "^5.28.6", "@tanstack/react-query": "^5.28.8",
"@tiptap/extension-highlight": "2.2.4", "@tiptap/extension-highlight": "2.2.4",
"@tiptap/extension-image": "2.2.4", "@tiptap/extension-image": "2.2.4",
"@tiptap/extension-link": "2.2.4", "@tiptap/extension-link": "2.2.4",
@ -213,7 +213,7 @@
"passport-local": "^1.0.0", "passport-local": "^1.0.0",
"pdf-lib": "^1.17.1", "pdf-lib": "^1.17.1",
"prisma": "^5.11.0", "prisma": "^5.11.0",
"puppeteer": "^22.6.0", "puppeteer": "^22.6.1",
"qrcode.react": "^3.1.0", "qrcode.react": "^3.1.0",
"react": "18.2.0", "react": "18.2.0",
"react-colorful": "^5.6.1", "react-colorful": "^5.6.1",
@ -221,21 +221,21 @@
"react-helmet-async": "^2.0.4", "react-helmet-async": "^2.0.4",
"react-hook-form": "^7.51.1", "react-hook-form": "^7.51.1",
"react-parallax-tilt": "^1.7.217", "react-parallax-tilt": "^1.7.217",
"react-resizable-panels": "^2.0.13", "react-resizable-panels": "^2.0.16",
"react-router-dom": "6.22.3", "react-router-dom": "6.22.3",
"react-zoom-pan-pinch": "^3.4.3", "react-zoom-pan-pinch": "^3.4.3",
"reflect-metadata": "^0.2.1", "reflect-metadata": "^0.2.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"sharp": "^0.33.2", "sharp": "^0.33.3",
"tailwind-merge": "^2.2.2", "tailwind-merge": "^2.2.2",
"tslib": "^2.6.2", "tslib": "^2.6.2",
"unique-names-generator": "^4.7.1", "unique-names-generator": "^4.7.1",
"use-breakpoint": "^4.0.1", "use-breakpoint": "^4.0.1",
"use-keyboard-shortcut": "^1.1.6", "use-keyboard-shortcut": "^1.1.6",
"usehooks-ts": "^3.0.1", "usehooks-ts": "^3.0.2",
"webfontloader": "^1.6.28", "webfontloader": "^1.6.28",
"zod": "^3.22.4", "zod": "^3.22.4",
"zod-to-json-schema": "^3.22.4", "zod-to-json-schema": "^3.22.5",
"zundo": "^2.1.0", "zundo": "^2.1.0",
"zustand": "^4.5.2" "zustand": "^4.5.2"
}, },

1398
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff