-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
77 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
// Copyright 2023 the Deno authors. All rights reserved. MIT license. | ||
import { | ||
ACTIVE_LINK_STYLES, | ||
LINK_STYLES, | ||
NAV_STYLES, | ||
SITE_BAR_STYLES, | ||
SITE_NAME, | ||
} from "@/utils/constants.ts"; | ||
import classnames from "npm:[email protected]"; | ||
import { SITE_NAME } from "@/utils/constants.ts"; | ||
import IconBrandDiscord from "tabler_icons_tsx/brand-discord.tsx"; | ||
import IconBrandGithub from "tabler_icons_tsx/brand-github.tsx"; | ||
import IconRss from "tabler_icons_tsx/rss.tsx"; | ||
|
@@ -66,33 +59,31 @@ export interface FooterProps { | |
|
||
export default function Footer(props: FooterProps) { | ||
return ( | ||
<footer | ||
class={`${SITE_BAR_STYLES} flex-col md:flex-row mt-8`} | ||
> | ||
<footer class="site-bar-styles flex-col md:flex-row mt-8"> | ||
<p>© {SITE_NAME}</p> | ||
<nav class={NAV_STYLES}> | ||
<nav class="nav-styles"> | ||
<a | ||
href="/blog" | ||
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES)} | ||
class="link-styles active-link-styles" | ||
> | ||
Blog | ||
</a> | ||
<a href="/feed" aria-label="Deno Hunt RSS Feed" class={LINK_STYLES}> | ||
<a href="/feed" aria-label="Deno Hunt RSS Feed" class="link-styles"> | ||
<IconRss class="h-6 w-6" /> | ||
</a> | ||
<a | ||
href="https://discord.gg/deno" | ||
target="_blank" | ||
aria-label="Deno SaaSKit on Discord" | ||
class={LINK_STYLES} | ||
class="link-styles" | ||
> | ||
<IconBrandDiscord class="h-6 w-6" /> | ||
</a> | ||
<a | ||
href="https://github.com/denoland/saaskit" | ||
target="_blank" | ||
aria-label="Deno SaaSKit repo on GitHub" | ||
class={LINK_STYLES} | ||
class="link-styles" | ||
> | ||
<IconBrandGithub class="h-6 w-6" /> | ||
</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
// Copyright 2023 the Deno authors. All rights reserved. MIT license. | ||
import { | ||
ACTIVE_ANCESTOR_LINK_STYLES, | ||
ACTIVE_LINK_STYLES, | ||
LINK_STYLES, | ||
SITE_BAR_STYLES, | ||
SITE_NAME, | ||
} from "@/utils/constants.ts"; | ||
import { SITE_NAME } from "@/utils/constants.ts"; | ||
import { isStripeEnabled } from "@/utils/stripe.ts"; | ||
import IconX from "tabler_icons_tsx/x.tsx"; | ||
import IconMenu from "tabler_icons_tsx/menu-2.tsx"; | ||
import classnames from "npm:[email protected]"; | ||
import { User } from "@/utils/db.ts"; | ||
|
||
export interface HeaderProps { | ||
|
@@ -23,14 +16,8 @@ export interface HeaderProps { | |
} | ||
|
||
export default function Header(props: HeaderProps) { | ||
const NAV_ITEM = "text-gray-500 px-3 py-4 sm:py-2"; | ||
return ( | ||
<header | ||
class={classnames( | ||
SITE_BAR_STYLES, | ||
"flex-col sm:flex-row", | ||
)} | ||
> | ||
<header class="site-bar-styles flex-col sm:flex-row"> | ||
<input | ||
type="checkbox" | ||
id="nav-toggle" | ||
|
@@ -75,15 +62,15 @@ export default function Header(props: HeaderProps) { | |
> | ||
<a | ||
href="/dashboard" | ||
class={classnames(LINK_STYLES, ACTIVE_ANCESTOR_LINK_STYLES, NAV_ITEM)} | ||
class="link-styles data-[ancestor]:!text-black data-[ancestor]:!dark:text-white nav-item" | ||
> | ||
Dashboard | ||
</a> | ||
{isStripeEnabled() && | ||
( | ||
<a | ||
href="/pricing" | ||
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)} | ||
class="link-styles data-[current]:!text-black data-[current]:!dark:text-white nav-item" | ||
> | ||
Pricing | ||
</a> | ||
|
@@ -92,13 +79,13 @@ export default function Header(props: HeaderProps) { | |
? ( | ||
<a | ||
href="/account" | ||
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)} | ||
class="link-styles data-[current]:!text-black data-[current]:!dark:text-white nav-item" | ||
> | ||
Account | ||
</a> | ||
) | ||
: ( | ||
<a href="/signin" class={classnames(LINK_STYLES, NAV_ITEM)}> | ||
<a href="/signin" class="link-styles nav-item"> | ||
Sign in | ||
</a> | ||
)} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
// Copyright 2023 the Deno authors. All rights reserved. MIT license. | ||
import { LINK_STYLES } from "@/utils/constants.ts"; | ||
import classnames from "npm:[email protected]"; | ||
import { ComponentChildren } from "preact"; | ||
|
||
export interface TabItemProps { | ||
|
@@ -15,13 +13,11 @@ export function TabItem(props: TabItemProps) { | |
return ( | ||
<a | ||
href={props.path} | ||
class={classnames( | ||
"px-4 py-2 rounded-lg", | ||
class={`px-4 py-2 rounded-lg ${ | ||
props.active | ||
? "bg-gray-100 text-black dark:bg-gray-800 dark:text-white" | ||
: "", | ||
LINK_STYLES, | ||
)} | ||
: "" | ||
} link-styles`} | ||
> | ||
{props.children} | ||
</a> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// Copyright 2023 the Deno authors. All rights reserved. MIT license. | ||
import type { State } from "@/plugins/session.ts"; | ||
import { BUTTON_STYLES } from "@/utils/constants.ts"; | ||
import { assertIsPrice, isStripeEnabled, stripe } from "@/utils/stripe.ts"; | ||
import { formatCurrency } from "@/utils/display.ts"; | ||
import Stripe from "stripe"; | ||
|
@@ -45,7 +44,7 @@ function FreePlanCard() { | |
<div class="text-center"> | ||
<a | ||
href="/account/manage" | ||
class={`${BUTTON_STYLES} w-full rounded-md block`} | ||
class="button-styles w-full rounded-md block" | ||
> | ||
Manage | ||
</a> | ||
|
@@ -99,15 +98,15 @@ function PremiumPlanCard(props: PremiumCardPlanProps) { | |
{props.isSubscribed | ||
? ( | ||
<a | ||
class={`${BUTTON_STYLES} w-full rounded-md block`} | ||
class="button-styles w-full rounded-md block" | ||
href="/account/manage" | ||
> | ||
Manage | ||
</a> | ||
) | ||
: ( | ||
<a | ||
class={`${BUTTON_STYLES} w-full rounded-md block`} | ||
class="button-styles w-full rounded-md block" | ||
href="/account/upgrade" | ||
> | ||
Upgrade | ||
|
@@ -152,7 +151,7 @@ function EnterprisePricingCard() { | |
<div class="text-center"> | ||
<a | ||
href="mailto:[email protected]" | ||
class={`${BUTTON_STYLES} w-full rounded-md block`} | ||
class="button-styles w-full rounded-md block" | ||
> | ||
Contact us | ||
</a> | ||
|
@@ -180,7 +179,7 @@ export default defineRoute<State>(async (_req, ctx) => { | |
<Head title="Pricing" href={ctx.url.href} /> | ||
<main class="mx-auto max-w-5xl w-full flex-1 flex flex-col justify-center px-4"> | ||
<div class="mb-8 text-center"> | ||
<h1 class="text-3xl font-bold">Pricing</h1> | ||
<h1 class="heading-styles">Pricing</h1> | ||
<p class="text-gray-500">Choose the plan that suites you</p> | ||
</div> | ||
<div class="flex flex-col md:flex-row gap-4"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.