Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to Fresh 1.6.1 and std 0.208.0 #646

Merged
merged 7 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ See other examples of blog post files in [/posts](/posts).

You can customize theme options such as spacing, color, etc. By default, Deno
SaaSKit comes with `primary` and `secondary` colors predefined within
`twind.config.ts`. Change these values to match your desired color scheme.
`tailwind.config.ts`. Change these values to match your desired color scheme.

### Cover Image

Expand Down
4 changes: 2 additions & 2 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SITE_BAR_STYLES,
SITE_NAME,
} from "@/utils/constants.ts";
import { cx } from "@twind/core";
import classnames from "npm:[email protected]";
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";
Expand Down Expand Up @@ -73,7 +73,7 @@ export default function Footer(props: FooterProps) {
<nav class={NAV_STYLES}>
<a
href="/blog"
class={cx(LINK_STYLES, ACTIVE_LINK_STYLES)}
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES)}
>
Blog
</a>
Expand Down
16 changes: 10 additions & 6 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { isStripeEnabled } from "@/utils/stripe.ts";
import IconX from "tabler_icons_tsx/x.tsx";
import IconMenu from "tabler_icons_tsx/menu-2.tsx";
import { cx } from "@twind/core";
import classnames from "npm:[email protected]";
import { User } from "@/utils/db.ts";

export interface HeaderProps {
Expand All @@ -26,7 +26,7 @@ export default function Header(props: HeaderProps) {
const NAV_ITEM = "text-gray-500 px-3 py-4 sm:py-2";
return (
<header
class={cx(
class={classnames(
SITE_BAR_STYLES,
"flex-col sm:flex-row",
)}
Expand Down Expand Up @@ -75,15 +75,15 @@ export default function Header(props: HeaderProps) {
>
<a
href="/dashboard"
class={cx(LINK_STYLES, ACTIVE_ANCESTOR_LINK_STYLES, NAV_ITEM)}
class={classnames(LINK_STYLES, ACTIVE_ANCESTOR_LINK_STYLES, NAV_ITEM)}
>
Dashboard
</a>
{isStripeEnabled() &&
(
<a
href="/pricing"
class={cx(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)}
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)}
>
Pricing
</a>
Expand All @@ -92,12 +92,16 @@ export default function Header(props: HeaderProps) {
? (
<a
href="/account"
class={cx(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)}
class={classnames(LINK_STYLES, ACTIVE_LINK_STYLES, NAV_ITEM)}
>
Account
</a>
)
: <a href="/signin" class={cx(LINK_STYLES, NAV_ITEM)}>Sign in</a>}
: (
<a href="/signin" class={classnames(LINK_STYLES, NAV_ITEM)}>
Sign in
</a>
)}
<div class="rounded-lg bg-gradient-to-tr from-secondary to-primary p-px">
<a
href="/submit"
Expand Down
4 changes: 2 additions & 2 deletions components/TabsBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
import { LINK_STYLES } from "@/utils/constants.ts";
import { cx } from "@twind/core";
import classnames from "npm:[email protected]";
import { ComponentChildren } from "preact";

export interface TabItemProps {
Expand All @@ -15,7 +15,7 @@ export function TabItem(props: TabItemProps) {
return (
<a
href={props.path}
class={cx(
class={classnames(
"px-4 py-2 rounded-lg",
props.active
? "bg-gray-100 text-black dark:(bg-gray-800 text-white)"
Expand Down
14 changes: 7 additions & 7 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
"imports": {
"@/": "./",
"$fresh/": "https://deno.land/x/fresh@1.5.4/",
"$fresh/": "https://deno.land/x/fresh@1.6.1/",
"$gfm": "https://deno.land/x/[email protected]/mod.ts",
"preact": "https://esm.sh/preact@10.18.1",
"preact/": "https://esm.sh/preact@10.18.1/",
"preact": "https://esm.sh/preact@10.19.2",
"preact/": "https://esm.sh/preact@10.19.2/",
"preact-render-to-string": "https://esm.sh/*[email protected]",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
"twind-preset-tailwind/": "https://esm.sh/@twind/[email protected]/",
"twind-preset-ext": "https://esm.sh/@twind/[email protected]/",
"std/": "https://deno.land/[email protected]/",
"tailwindcss": "npm:[email protected]",
"tailwindcss/": "npm:/[email protected]/",
"tailwindcss/plugin": "npm:/[email protected]/plugin.js",
"std/": "https://deno.land/[email protected]/",
"stripe": "npm:/[email protected]",
"feed": "npm:/[email protected]",
"kv_oauth/": "https://deno.land/x/[email protected]/",
"tabler_icons_tsx/": "https://deno.land/x/[email protected]/tsx/",
"@twind/core": "https://esm.sh/@twind/[email protected]",
"fresh_charts/": "https://deno.land/x/[email protected]/"
},
"exclude": ["cov/", "_fresh/", "**/_fresh/*"],
Expand Down
Loading
Loading