Skip to content

Commit

Permalink
Merge pull request #121 from midday-ai/feature/website-branding
Browse files Browse the repository at this point in the history
Branding
  • Loading branch information
pontusab committed May 18, 2024
2 parents 9d411df + 2889a07 commit 679e9f8
Show file tree
Hide file tree
Showing 18 changed files with 247 additions and 11 deletions.
3 changes: 2 additions & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@calcom/embed-react": "^1.5.0",
"@logsnag/next": "^1.0.3",
"@midday/supabase": "workspace:*",
"@midday/ui": "workspace:*",
Expand All @@ -21,7 +22,6 @@
"@team-plain/typescript-sdk": "3.9.0",
"@uidotdev/usehooks": "^2.4.1",
"@vercel/analytics": "^1.2.2",
"@calcom/embed-react": "^1.5.0",
"d3": "^7.9.0",
"date-fns": "^3.6.0",
"framer-motion": "^11.2.2",
Expand All @@ -33,6 +33,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hls-player": "^3.0.7",
"react-use-draggable-scroll": "^0.4.7",
"server-only": "^0.0.1",
"sharp": "^0.33.3",
"sugar-high": "^0.6.1"
Expand Down
Binary file added apps/website/public/branding/1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/10.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/website/public/branding/9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/website/src/app/branding/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { BrandCanvas } from "@/components/brand-canvas";
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "Branding",
};

export default function Page() {
return <BrandCanvas />;
}
158 changes: 158 additions & 0 deletions apps/website/src/components/brand-canvas.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
"use client";

import { Button } from "@midday/ui/button";
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
} from "@midday/ui/select";
import Image from "next/image";
import { useRef, useState } from "react";
import { useDraggable } from "react-use-draggable-scroll";

const assets = [
<Image
key="1"
src={require("public/branding/1.png")}
width={600}
alt="keyboard"
/>,
<Image
key="2"
src={require("public/branding/2.png")}
width={600}
alt="founders"
/>,
<Image
key="3"
src={require("public/branding/3.png")}
width={600}
alt="screens"
/>,
<Image
key="1"
src={require("public/branding/11.png")}
width={600}
alt="screens"
/>,
<Image
key="4"
src={require("public/branding/4.png")}
width={600}
alt="screens"
/>,
<Image
key="5"
src={require("public/branding/5.png")}
width={600}
alt="screens"
/>,
<Image
key="7"
src={require("public/branding/7.png")}
width={600}
alt="screens"
/>,
<Image
key="8"
src={require("public/branding/8.png")}
width={600}
alt="screens"
/>,
<Image
key="9"
src={require("public/branding/9.png")}
width={600}
alt="screens"
/>,
<Image
key="10"
src={require("public/branding/10.png")}
width={600}
alt="screens"
/>,
<Image
key="1"
src={require("public/branding/1.png")}
width={600}
alt="keyboard"
/>,
<Image
key="2"
src={require("public/branding/2.png")}
width={600}
alt="founders"
/>,
<Image
key="3"
src={require("public/branding/3.png")}
width={600}
alt="screens"
/>,
];

const repeated = [...assets, ...assets, ...assets, ...assets, ...assets];

export function BrandCanvas() {
const [value, setValue] = useState(
"https://pub-842eaa8107354d468d572ebfca43b6e3.r2.dev/all.zip"
);
const ref = useRef();
const { events } = useDraggable(ref);

return (
<div className="sm:h-screen sm:w-screen overflow-hidden">
<div
className="fixed bg-background z-10 top-0 left-0 right-0 overflow-scroll scrollbar-hide cursor-grabbing"
{...events}
ref={ref}
>
<div className="w-[4900px] flex h-screen">
<div className="grid grid-cols-8 gap-4 items-center">
{repeated.map((asset, index) => (
<div className="h-auto max-w-full" key={index.toString()}>
{asset}
</div>
))}
</div>
</div>
</div>

<div className="fixed bottom-10 z-20 w-full flex justify-center items-center">
<div className="h-[48px] w-[200px] rounded-full border border-border backdrop-filter backdrop-blur-xl bg-[#121212] bg-opacity-70 text-center flex items-center p-1 pl-2 justify-between space-x-4">
<Select onValueChange={setValue} value={value}>
<SelectTrigger className="w-[180px] border-0 space-x-2">
<SelectValue placeholder="All" className="border-0" />
</SelectTrigger>
<SelectContent>
<SelectGroup>
<SelectItem value="https://pub-842eaa8107354d468d572ebfca43b6e3.r2.dev/all.zip">
All
</SelectItem>
<SelectItem value="https://pub-842eaa8107354d468d572ebfca43b6e3.r2.dev/videos.zip">
Videos
</SelectItem>
<SelectItem value="https://pub-842eaa8107354d468d572ebfca43b6e3.r2.dev/founders.png">
Founders
</SelectItem>
<SelectItem value="https://pub-842eaa8107354d468d572ebfca43b6e3.r2.dev/screens.zip">
Screens
</SelectItem>
</SelectGroup>
</SelectContent>
</Select>

<Button className="rounded-full">
<a href={value} download title="Download">
Download
</a>
</Button>
</div>
</div>
</div>
);
}
3 changes: 3 additions & 0 deletions apps/website/src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export function Footer() {
<li className="transition-colors text-[#878787]">
<Link href="/pitch">Investors</Link>
</li>
<li className="transition-colors text-[#878787]">
<Link href="/brand">Branding</Link>
</li>
</ul>
</div>

Expand Down
74 changes: 69 additions & 5 deletions apps/website/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
"use client";

import { cn } from "@midday/ui/cn";
import {
ContextMenu,
ContextMenuContent,
ContextMenuItem,
ContextMenuTrigger,
} from "@midday/ui/context-menu";
import { Icons } from "@midday/ui/icons";
import { motion } from "framer-motion";
import Link from "next/link";
import { usePathname } from "next/navigation";
Expand Down Expand Up @@ -73,11 +80,68 @@ export function Header() {
"transition duration-1s ease-in-out animate-header-slide-down-fade"
)}
>
<nav className="border border-border px-4 flex items-center backdrop-filter backdrop-blur-xl bg-[#121212] bg-opacity-70 h-[56px]">
<Link href="/">
<span className="sr-only">Midday Logo</span>
<LogoIcon />
</Link>
<nav className="border border-border px-4 flex items-center backdrop-filter backdrop-blur-xl bg-[#121212] bg-opacity-70 h-[50px]">
<ContextMenu>
<ContextMenuTrigger>
<Link href="/">
<span className="sr-only">Midday Logo</span>
<LogoIcon />
</Link>
</ContextMenuTrigger>

<ContextMenuContent
className="w-[200px] bg-[#121212] rounded-none"
alignOffset={20}
>
<div className="divide-y">
<ContextMenuItem
className="flex items-center space-x-2"
onClick={async () => {
try {
await navigator.clipboard.writeText(
`<svg
xmlns="http://www.w3.org/2000/svg"
width={102}
height={30}
fill="none"
>
<path
fill="currentColor"
fillRule="evenodd"
d="M14.347 0a14.931 14.931 0 0 0-6.282 1.68l6.282 10.88V0Zm0 17.443L8.067 28.32a14.933 14.933 0 0 0 6.28 1.68V17.443ZM15.652 30V17.432l6.285 10.887A14.932 14.932 0 0 1 15.652 30Zm0-17.43V0c2.26.097 4.392.693 6.287 1.682l-6.287 10.889ZM2.336 23.068l10.884-6.284-6.284 10.884a15.093 15.093 0 0 1-4.6-4.6Zm25.33-16.132-10.88 6.282 6.282-10.88a15.094 15.094 0 0 1 4.598 4.598ZM2.335 6.934a15.094 15.094 0 0 1 4.6-4.6l6.284 10.884L2.335 6.934Zm-.654 1.13A14.931 14.931 0 0 0 0 14.35h12.568L1.681 8.064Zm0 13.873a14.932 14.932 0 0 1-1.68-6.282h12.562L1.682 21.938Zm15.754-7.587H30a14.93 14.93 0 0 0-1.68-6.285L17.435 14.35Zm10.884 7.586-10.878-6.28H30a14.932 14.932 0 0 1-1.68 6.28Zm-11.533-5.151 6.281 10.88a15.092 15.092 0 0 0 4.598-4.599l-10.88-6.281Z"
clipRule="evenodd"
/>
<path
fill="currentColor"
d="M92.34 11.912h1.637l2.995 8.223 2.884-8.223h1.619l-4 11.107c-.372 1.06-1.08 1.544-2.196 1.544h-1.172v-1.358h1.024c.502 0 .8-.186.986-.707l.353-.912h-.52l-3.61-9.674ZM82.744 14.814c.39-1.916 1.916-3.126 4.018-3.126 2.549 0 3.963 1.489 3.963 4.13v3.964c0 .446.186.632.614.632h.39v1.358h-.65c-1.005 0-1.88-.335-1.861-1.544-.428.93-1.544 1.767-3.107 1.767-1.954 0-3.535-1.041-3.535-2.79 0-2.028 1.544-2.55 3.702-2.977l2.921-.558c-.018-1.712-.818-2.53-2.437-2.53-1.265 0-2.102.65-2.4 1.804l-1.618-.13Zm1.432 4.39c0 .8.689 1.452 2.14 1.433 1.637 0 2.92-1.153 2.92-3.442v-.167l-2.362.41c-1.47.26-2.698.371-2.698 1.767ZM80.129 8.563v13.21h-1.377l-.056-1.452c-.558 1.042-1.618 1.675-3.144 1.675-2.847 0-4.168-2.419-4.168-5.154s1.321-5.153 4.168-5.153c1.451 0 2.493.558 3.051 1.562V8.563h1.526Zm-7.145 8.28c0 1.915.819 3.701 2.884 3.701 2.028 0 2.865-1.823 2.865-3.702 0-1.953-.837-3.758-2.865-3.758-2.065 0-2.884 1.786-2.884 3.758ZM68.936 8.563v13.21H67.56l-.056-1.452c-.558 1.042-1.619 1.675-3.144 1.675-2.847 0-4.168-2.419-4.168-5.154s1.321-5.153 4.168-5.153c1.45 0 2.493.558 3.05 1.562V8.563h1.526Zm-7.144 8.28c0 1.915.819 3.701 2.884 3.701 2.028 0 2.865-1.823 2.865-3.702 0-1.953-.837-3.758-2.865-3.758-2.065 0-2.884 1.786-2.884 3.758ZM56.212 11.912h1.525v9.86h-1.525v-9.86Zm-.037-1.544V8.6h1.6v1.768h-1.6ZM40.224 11.912h1.395l.056 1.674c.446-1.21 1.47-1.898 2.846-1.898 1.414 0 2.438.763 2.865 2.084.428-1.34 1.47-2.084 3.014-2.084 1.973 0 3.126 1.377 3.126 3.74v6.344H52v-5.897c0-1.805-.707-2.828-1.916-2.828-1.544 0-2.437 1.041-2.437 2.846v5.88H46.12v-5.899c0-1.767-.725-2.827-1.916-2.827-1.526 0-2.456 1.079-2.456 2.827v5.898h-1.525v-9.86Z"
/>
</svg>
`
);
} catch {}
}}
>
<Icons.LogoIcon />
<span className="font-medium text-sm">Copy Logo as SVG</span>
</ContextMenuItem>
<ContextMenuItem asChild>
<Link href="/branding" className="flex items-center space-x-2">
<Icons.Change />
<span className="font-medium text-sm">Branding</span>
</Link>
</ContextMenuItem>
<ContextMenuItem>
<a
href="https://ui.midday.ai"
className="flex items-center space-x-2"
>
<Icons.Palette />
<span className="font-medium text-sm">Design System</span>
</a>
</ContextMenuItem>
</div>
</ContextMenuContent>
</ContextMenu>

<ul className="space-x-2 font-medium text-sm hidden md:flex mx-3">
{links.map(({ path, name, title }) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function Hero() {
<p className="text-xs text-[#707070] mt-8 font-mono">
Used by over{" "}
<Link href="/open-startup">
<span className="underline">2800+</span>
<span className="underline">2900+</span>
</Link>{" "}
businesses.
</p>
Expand Down
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions packages/ui/src/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import { FiGithub } from "react-icons/fi";
import {
MdAdd,
MdArrowBack,
MdArrowDownward,
MdArrowDropDown,
MdArrowDropUp,
MdArrowLeft,
MdArrowRight,
MdArrowUpward,
MdAutoAwesome,
MdBarChart,
MdChangeHistory,
MdChevronLeft,
MdChevronRight,
MdClose,
Expand Down Expand Up @@ -62,6 +60,7 @@ import {
MdOutlineMoveToInbox,
MdOutlineNotificationsNone,
MdOutlineOpenInFull,
MdOutlinePalette,
MdOutlinePause,
MdOutlinePlayArrow,
MdOutlineQuestionAnswer,
Expand Down Expand Up @@ -500,7 +499,7 @@ export const Icons = {
QuestionAnswer: MdOutlineQuestionAnswer,
Click: MdSignalCellularAlt,
Tune: MdOutlineTune,

Change: MdChangeHistory,
Forwarded: MdOutlineForwardToInbox,
Delete: MdOutlineDelete,
FolderImports: MdRuleFolder,
Expand All @@ -509,4 +508,5 @@ export const Icons = {
Reply: MdReplay,
Sort: MdSort,
Backspace: MdOutlineBackspace,
Palette: MdOutlinePalette,
};

0 comments on commit 679e9f8

Please sign in to comment.