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
6 changes: 6 additions & 0 deletions src/app/(payload)/admin/importMap.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { ImageCompressor as ImageCompressor_2d748e6089b36a77056ec460e02e90cd } from '../../../components/payload/ImageCompressor'
import { ColorField as ColorField_386fb4f018787bb5f9192147d4ea9772 } from '../../../components/payload/ColorField'
import { Icon as Icon_6f64da3861999de587a3ed586829047d } from '../../../components/payload/Icon'
import { Logo as Logo_c6fe5946efe4ec376b0411c30a8f0d79 } from '../../../components/payload/Logo'
import { DashboardWelcome as DashboardWelcome_e28db0b4728686b1d35e571b9c084197 } from '../../../components/payload/DashboardWelcome'
import { S3ClientUploadHandler as S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24 } from '@payloadcms/storage-s3/client'
import { CollectionCards as CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1 } from '@payloadcms/next/rsc'

/** @type import('payload').ImportMap */
export const importMap = {
"/components/payload/ImageCompressor#ImageCompressor": ImageCompressor_2d748e6089b36a77056ec460e02e90cd,
"/components/payload/ColorField#ColorField": ColorField_386fb4f018787bb5f9192147d4ea9772,
"/components/payload/Icon#Icon": Icon_6f64da3861999de587a3ed586829047d,
"/components/payload/Logo#Logo": Logo_c6fe5946efe4ec376b0411c30a8f0d79,
"/components/payload/DashboardWelcome#DashboardWelcome": DashboardWelcome_e28db0b4728686b1d35e571b9c084197,
"@payloadcms/storage-s3/client#S3ClientUploadHandler": S3ClientUploadHandler_f97aa6c64367fa259c5bc0567239ef24,
"@payloadcms/next/rsc#CollectionCards": CollectionCards_f9c02e79a4aed9a3924487c0cd4cafb1
}
86 changes: 86 additions & 0 deletions src/app/(payload)/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
@font-face {
font-family: "Blanch Caps";
src: url("../../fonts/Blanch-Caps.woff2") format("woff2");
font-display: swap;
}

:root {
--clarks-orange: #febc12;
--clarks-red: #c14627;
--font-heading: "Blanch Caps", var(--font-body);

--theme-error-400: #d9573a;
--theme-error-500: var(--clarks-red);
--theme-error-600: #a63a20;
--accessibility-outline: 2px solid var(--clarks-red);

// Payload's mid greys carry muted text (hints, labels); darken them to pass AA on white and on the grey panels.
--theme-elevation-350: #5c5c5c;
--theme-elevation-400: #5c5c5c;
--theme-elevation-450: #5c5c5c;
--theme-elevation-500: #5c5c5c;
--theme-elevation-550: #555555;
}

html[data-theme="dark"] {
--theme-elevation-0: #020618;
--theme-elevation-50: #0f172b;
--theme-elevation-100: #1d293d;
--theme-elevation-150: #314158;

--theme-elevation-350: #b0b0b0;
--theme-elevation-400: #b0b0b0;
--theme-elevation-450: #b0b0b0;
--theme-elevation-500: #b0b0b0;
--theme-elevation-550: #b8b8b8;

--theme-error-400: #f08a73;
--theme-error-500: #ee7a60;
--theme-error-600: #f4a08e;
--accessibility-outline: 2px solid var(--clarks-orange);
}

h1,
h2 {
font-family: var(--font-heading);
font-weight: 400;
letter-spacing: 0.02em;
}

.clarks-logo {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;

&__name {
font-family: var(--font-heading);
font-size: 2.5rem;
letter-spacing: 0.04em;
color: var(--theme-text);
}
}

.clarks-welcome {
margin-block: calc(var(--base) * 1.5);
padding: calc(var(--base) * 1.25);
border: 1px solid var(--theme-border-color);
border-left: 6px solid var(--clarks-orange);
background: var(--theme-elevation-50);
border-radius: var(--style-radius-m);

h2 {
margin-top: 0;
font-size: 2rem;
}

ul {
padding-left: 1.25rem;
}

a {
color: var(--theme-text);
text-decoration-color: var(--clarks-red);
text-underline-offset: 3px;
}
}
40 changes: 40 additions & 0 deletions src/components/payload/DashboardWelcome.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Link from "next/link";

const guideUrl =
"https://github.com/TandemCreativeDev/cbc/blob/main/docs/admin-guide.md";

const links = [
{
href: "/admin/collections/tour-dates",
en: "Tour dates",
fr: "Dates de tournée",
},
{ href: "/admin/collections/lyrics", en: "Lyrics", fr: "Paroles" },
{
href: "/admin/globals/about-page",
en: "Carousel photos (About page)",
fr: "Photos du carrousel (page À propos)",
},
];

export const DashboardWelcome = () => (
<section className="clarks-welcome" aria-labelledby="clarks-welcome-title">
<h2 id="clarks-welcome-title">Welcome back / Bon retour</h2>
<p lang="en">Edit the site here. Pick a page to get going:</p>
<p lang="fr">Modifiez le site ici. Choisissez une page pour commencer :</p>
<ul>
{links.map(({ href, en, fr }) => (
<li key={href}>
<Link href={href}>
{en} <span lang="fr">/ {fr}</span>
</Link>
</li>
))}
</ul>
<p>
<a href={guideUrl} target="_blank" rel="noopener noreferrer">
Band guide / Guide du groupe
</a>
</p>
</section>
);
11 changes: 11 additions & 0 deletions src/components/payload/Icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Image from "next/image";

export const Icon = () => (
<Image
src="/svg/favicon.svg"
alt="Clark's Bowling Club"
width={25}
height={25}
unoptimized
/>
);
15 changes: 15 additions & 0 deletions src/components/payload/Logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Image from "next/image";

export const Logo = () => (
<div className="clarks-logo">
<Image
src="/svg/favicon.svg"
alt=""
width={64}
height={64}
unoptimized
preload
/>
<span className="clarks-logo__name">Clark&rsquo;s Bowling Club</span>
</div>
);
13 changes: 13 additions & 0 deletions src/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ const dirname = path.dirname(fileURLToPath(import.meta.url));
export default buildConfig({
admin: {
user: Users.slug,
meta: {
titleSuffix: " - Clark's Bowling Club",
icons: [{ rel: "icon", url: "/favicon.ico" }],
},
components: {
graphics: {
Logo: "/components/payload/Logo#Logo",
Icon: "/components/payload/Icon#Icon",
},
beforeDashboard: [
"/components/payload/DashboardWelcome#DashboardWelcome",
],
},
importMap: {
baseDir: dirname,
},
Expand Down
Loading