Skip to content

Commit

Permalink
add template banner
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkulpinski committed Aug 5, 2024
1 parent a373f4d commit 66d92eb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
36 changes: 36 additions & 0 deletions app/partials/Template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Link } from "@remix-run/react"
import { posthog } from "posthog-js"
import type { HTMLAttributes } from "react"
import { Button } from "~/components/Button"
import { Card } from "~/components/Card"
import { H2 } from "~/components/Heading"
import { FRAMER_TEMPLATE_URL } from "~/utils/constants"
import { cx } from "~/utils/cva"

export const Template = ({ className, ...props }: HTMLAttributes<HTMLElement>) => {
return (
<Card
className={cx("group/button rounded-lg md:flex-row md:items-stretch", className)}
asChild
{...props}
>
<Link to={FRAMER_TEMPLATE_URL} onClick={() => posthog.capture("template_clicked")}>
<div className="flex flex-col items-start flex-1 gap-4 lg:p-4">
<H2>Get this design as a Framer template</H2>

<p className="text-muted">
Clone this design in Framer and start building your own directory website. The template
includes animations, interactions, and code components. No design or code skills
required.
</p>

<Button size="lg" variant="fancy" className="mt-auto pointer-events-none">
Get the Aperto template
</Button>
</div>

<img src="/aperto.png" alt="" className="w-full h-auto flex-1 rounded-md md:w-1/2" />
</Link>
</Card>
)
}
3 changes: 2 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import posthog from "posthog-js"
import stylesheet from "~/styles.css?url"
import { prisma } from "./services.server/prisma"
import { categoryManyPayload } from "./services.server/api"
import { Template } from "./partials/Template"

export const shouldRevalidate = () => {
return false
Expand Down Expand Up @@ -121,7 +122,7 @@ export function Layout({ children }: PropsWithChildren) {
<Container className="flex min-h-[calc(100dvh-var(--header-height))] mt-[calc(var(--header-top)+var(--header-height))] flex-col py-8 gap-8 md:gap-10 md:py-10 lg:gap-12 lg:py-12">
{children}

<hr className="mt-auto peer-[[href]]:mt-0" />
<Template className="mt-auto peer-[[href]]:mt-0" />

<Footer categories={data?.categories} />
</Container>
Expand Down
1 change: 1 addition & 0 deletions app/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const RSS_URL = `${SITE_URL}/rss.xml`
export const TWITTER_URL = "https://x.com/ossalternative"
export const TWITTER_AUTHOR_URL = "https://x.com/piotrkulpinski"
export const GITHUB_URL = "https://github.com/piotrkulpinski/openalternative"
export const FRAMER_TEMPLATE_URL = "https://r.baseline.supply/aperto-oa"

export const LATEST_TOOLS_TRESHOLD = new Date(new Date().setDate(new Date().getDate() - 7))
export const TOPICS_PER_PAGE = 150
Expand Down
Binary file added public/aperto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 66d92eb

Please sign in to comment.