Skip to content

Commit

Permalink
fathom & cal.com
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Mar 25, 2024
1 parent c4967ce commit a40a0bb
Show file tree
Hide file tree
Showing 5 changed files with 179 additions and 57 deletions.
2 changes: 2 additions & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
"lint": "next lint"
},
"dependencies": {
"@calcom/embed-react": "^1.3.2",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.17",
"@types/node": "18.15.11",
"@types/react": "18.0.33",
"@types/react-dom": "18.0.11",
"eslint": "8.37.0",
"eslint-config-next": "13.2.4",
"fathom-client": "^3.6.0",
"next": "13.2.4",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
27 changes: 27 additions & 0 deletions apps/site/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
import "@/styles/globals.css";
import * as Fathom from "fathom-client";
import type { AppProps } from "next/app";
import { useRouter } from "next/router";
import { useEffect } from "react";

export default function App({ Component, pageProps }: AppProps) {
const router = useRouter();

useEffect(() => {
// Initialize Fathom when the app loads
// Example: yourdomain.com
// - Do not include https://
// - This must be an exact match of your domain.
// - If you're using www. for your domain, make sure you include that here.
Fathom.load("NSYBHOYC", {
includedDomains: ["peppermint.sh"],
});

function onRouteChangeComplete() {
Fathom.trackPageview();
}
// Record a pageview when route changes
router.events.on("routeChangeComplete", onRouteChangeComplete);

// Unassign event listener
return () => {
router.events.off("routeChangeComplete", onRouteChangeComplete);
};
}, []);

//@ts-expect-error
return <Component {...pageProps} />;
}
59 changes: 59 additions & 0 deletions apps/site/pages/contact.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//@ts-nocheck
import Cal, { getCalApi } from "@calcom/embed-react";
import Link from "next/link";
import { useEffect } from "react";

const navigation = [
// { name: "About Us", href: "#" },
// { name: "Features", href: "#" },
{ name: "Github", href: "https://github.com/Peppermint-Lab/peppermint" },
{ name: "Docs", href: "https://docs.peppermint.sh/" },
];

export default function Contact() {
useEffect(() => {
(async function () {
const cal = await getCalApi();
cal("ui", {
styles: { branding: { brandColor: "#000000" } },
hideEventTypeDetails: false,
layout: "month_view",
});
})();
}, []);

return (
<div className="">
<header className="bg-white mx-auto text-base max-w-xl mb-36">
<nav className="flex justify-between py-8" aria-label="Global">
<div className="flex justify-between lg:flex-1">
<Link href="/" className="-m-1.5 p-1.5">
<span className="sm:hidden">🍵</span>
<span className="hidden sm:block font-bold text-xl">
🍵 Peppermint Labs
</span>
</Link>
</div>

<div className="flex gap-x-12">
{navigation.map((item) => (
<a
key={item.name}
href={item.href}
className="text-sm font-semibold text-gray-900"
>
{item.name}
</a>
))}
</div>
</nav>
</header>

<Cal
calLink="potts/30min"
style={{ width: "100%", height: "100%", overflow: "scroll" }}
config={{ layout: "month_view" }}
/>
</div>
);
}
123 changes: 66 additions & 57 deletions apps/site/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/no-unescaped-entities */
// @ts-nocheck
import {
BellAlertIcon,
ChevronRightIcon,
Expand All @@ -15,62 +16,63 @@ const navigation = [
// { name: "Features", href: "#" },
{ name: "Github", href: "https://github.com/Peppermint-Lab/peppermint" },
{ name: "Docs", href: "https://docs.peppermint.sh/" },
{ name: "Discord", href: "https://discord.gg/cyj86Ncygn" },
];

const footer = {
// solutions: [
// { name: "Self Hosted", href: "#" },
// { name: "Linode", href: "" },
// ],
support: [
{ name: "Documentation", href: "https://docs.peppermint.sh/" },
{ name: "Discord", href: "https://discord.gg/fs4j39FWfm" },
],
company: [
{ name: "About", href: "#" },
// { name: "Blog", href: "#" },
// { name: "Press", href: "#" },
// { name: "Investors", href: "#" },
// { name: "Open", href: "#" },
],
social: [
{
name: "Twitter",
href: "https://twitter.com/potts_dev",
icon: (props: any) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
</svg>
),
},
{
name: "GitHub",
href: "https://github.com/Peppermint-Lab/peppermint/",
icon: (props: any) => (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<path
fillRule="evenodd"
d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
clipRule="evenodd"
/>
</svg>
),
},
// {
// name: "YouTube",
// href: "#",
// icon: (props: any) => (
// <svg fill="currentColor" viewBox="0 0 24 24" {...props}>
// <path
// fillRule="evenodd"
// d="M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 0 1-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 0 1-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 0 1 1.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418ZM15.194 12 10 15V9l5.194 3Z"
// clipRule="evenodd"
// />
// </svg>
// ),
// },
],
};
// const footer = {
// // solutions: [
// // { name: "Self Hosted", href: "#" },
// // { name: "Linode", href: "" },
// // ],
// support: [
// { name: "Documentation", href: "https://docs.peppermint.sh/" },
// { name: "Discord", href: "https://discord.gg/fs4j39FWfm" },
// ],
// company: [
// { name: "About", href: "#" },
// // { name: "Blog", href: "#" },
// // { name: "Press", href: "#" },
// // { name: "Investors", href: "#" },
// // { name: "Open", href: "#" },
// ],
// social: [
// {
// name: "Twitter",
// href: "https://twitter.com/potts_dev",
// icon: (props: any) => (
// <svg fill="currentColor" viewBox="0 0 24 24" {...props}>
// <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
// </svg>
// ),
// },
// {
// name: "GitHub",
// href: "https://github.com/Peppermint-Lab/peppermint/",
// icon: (props: any) => (
// <svg fill="currentColor" viewBox="0 0 24 24" {...props}>
// <path
// fillRule="evenodd"
// d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
// clipRule="evenodd"
// />
// </svg>
// ),
// },
// // {
// // name: "YouTube",
// // href: "#",
// // icon: (props: any) => (
// // <svg fill="currentColor" viewBox="0 0 24 24" {...props}>
// // <path
// // fillRule="evenodd"
// // d="M19.812 5.418c.861.23 1.538.907 1.768 1.768C21.998 8.746 22 12 22 12s0 3.255-.418 4.814a2.504 2.504 0 0 1-1.768 1.768c-1.56.419-7.814.419-7.814.419s-6.255 0-7.814-.419a2.505 2.505 0 0 1-1.768-1.768C2 15.255 2 12 2 12s0-3.255.417-4.814a2.507 2.507 0 0 1 1.768-1.768C5.744 5 11.998 5 11.998 5s6.255 0 7.814.418ZM15.194 12 10 15V9l5.194 3Z"
// // clipRule="evenodd"
// // />
// // </svg>
// // ),
// // },
// ],
// };

const posts = [
{
Expand Down Expand Up @@ -221,20 +223,27 @@ export default function Home() {
Control your support
</span>
<div className="mt-4 flex flex-col ">
<div className="mx-auto lg:mx-0">
<div className="">
<p className="text-base text-gray-800">
Peppermint is a solution to the ever growing cost of todays
corprate world.
</p>
</div>
<div className="my-4">
<div className="my-6 space-x-4 flex flex-row">
<a
href="https://docs.peppermint.sh/docker"
className="rounded-md bg-green-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600"
className="rounded-md px-3.5 py-2.5 text-sm bg-green-600 text-white shadow-sm hover:bg-green-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600"
target="_blank"
>
Get started
</a>
<a
href="/contact"
className="px-3.5 py-2.5 text-sm font-semibold text-gray-900 hover:underline "
target="_blank"
>
Get in touch
</a>
</div>
</div>
</div>
Expand Down
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,26 @@
resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz#923ca57e173c6b232bbbb07347b1be982f03e783"
integrity sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==

"@calcom/embed-core@1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@calcom/embed-core/-/embed-core-1.3.3.tgz#546b758e249a7a8bdf73103c89b385c7a4fc6156"
integrity sha512-bz7S9cvz1JMVWFcJI+dvoOQd5F63YzdQ5gOp1vunob5idje7PoYfiTf6ncMSVeX6vsrJA1oVFD07JMxuYt/d+A==

"@calcom/embed-react@^1.3.2":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@calcom/embed-react/-/embed-react-1.3.2.tgz#273ecf4d9b10af3ca5b43f7f312798ceb4713611"
integrity sha512-tya/NJQJs0g70RLeeKtfhzF8vX7RzwwWTxlXCojCthuqKdMbx/8WEwZsdDzuJ8OjbPEiLiV3ImO2rgRRftZxNw==
dependencies:
"@calcom/embed-core" "1.3.3"
"@calcom/embed-snippet" "1.1.3"

"@calcom/embed-snippet@1.1.3":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@calcom/embed-snippet/-/embed-snippet-1.1.3.tgz#c442d062320923e326a52afa47e89f3e6b244aa9"
integrity sha512-whtpkc54btyIIDfCXsCP7BN8wE3GGgh8cTX5JiprvbcHaej+OEUcuMuhMcLlBersMADwGENpFrlB6AhSJfEA/Q==
dependencies:
"@calcom/embed-core" "1.3.3"

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
Expand Down Expand Up @@ -4808,6 +4828,11 @@ fastq@^1.6.0, fastq@^1.6.1:
dependencies:
reusify "^1.0.4"

fathom-client@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/fathom-client/-/fathom-client-3.6.0.tgz#f46d8949cf73df89998a8793e51ad2c21efd703b"
integrity sha512-/mrgmVvpw4HqDCcqUfPulERhONKgnJGL74RAxfqKDuRQ+7w9lKoTHMzqBWE7WNBvmsgZEthQWJFOWOEjv+T3gA==

fflate@^0.4.1:
version "0.4.8"
resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae"
Expand Down

0 comments on commit a40a0bb

Please sign in to comment.