Skip to content

Commit

Permalink
refactor: design and code cleanups (#365)
Browse files Browse the repository at this point in the history
* cleanups

* fix

* work

* fix

* tweaks
  • Loading branch information
iuioiua authored Jul 13, 2023
1 parent 57f8946 commit 0e11bcd
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 38 deletions.
11 changes: 8 additions & 3 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
import {
BUTTON_STYLES,
LINK_STYLES,
NAV_STYLES,
SITE_BAR_STYLES,
SITE_NAME,
} from "@/utils/constants.ts";
import Logo from "./Logo.tsx";
import { stripe } from "@/utils/payments.ts";
import { Bell, CircleFilled } from "./Icons.tsx";

Expand All @@ -15,7 +14,13 @@ export default function Header(
return (
<header class={SITE_BAR_STYLES}>
<a href="/">
<Logo height="48" />
<img
height="48"
width="48"
src="/logo.webp"
alt={SITE_NAME + " logo"}
class="h-12 w-12"
/>
</a>
<nav class={NAV_STYLES}>
{stripe ? <a href="/pricing" class={LINK_STYLES}>Pricing</a> : null}
Expand Down
2 changes: 1 addition & 1 deletion components/ItemSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function ItemSummary(props: ItemSummaryProps) {
item={props.item}
isVoted={props.isVoted}
/>
<div>
<div class="space-y-1">
<span class="mr-2">
<a
class="hover:underline"
Expand Down
20 changes: 0 additions & 20 deletions components/Logo.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions islands/VoteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export default function VoteButton(props: VoteButtonProps) {
}

return (
<div
<button
class={(isVoted.value ? "text-pink-700" : "text-inherit") +
" pr-2 text-center"}
onClick={onClick}
>
<br />
{score.value}
</div>
</button>
);
}
3 changes: 0 additions & 3 deletions routes/_404.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
import Logo from "@/components/Logo.tsx";

export default function NotFoundPage() {
return (
<main class="flex-1 flex flex-col justify-center p-4 text-center space-y-4">
<Logo />
<h1 class="text-4xl inline-block font-bold">Page not found</h1>
<p class="text-xl text-blue-900">
<a href="/">Return home</a>
Expand Down
2 changes: 0 additions & 2 deletions routes/_500.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
import { ErrorPageProps } from "$fresh/server.ts";
import Logo from "@/components/Logo.tsx";

export default function Error500Page(props: ErrorPageProps) {
return (
<main class="flex flex-col justify-center p-4 text-center space-y-4">
<Logo />
<h1 class="text-4xl inline-block font-bold">Server error</h1>
<p>500 internal error: {(props.error as Error).message}</p>
<p class="text-xl text-blue-900">
Expand Down
12 changes: 6 additions & 6 deletions routes/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ function FreePlanCard() {
<div class={CARD_STYLES}>
<div class="flex-1 space-y-4">
<div>
<h3 class="text-xl font-bold">
<h2 class="text-xl font-bold">
Free
</h3>
</h2>
<p class="text-gray-500">
Discover and share your favorite Deno projects.
</p>
Expand Down Expand Up @@ -107,9 +107,9 @@ function PremiumPlanCard(
<div class={CARD_STYLES + " border-primary border"}>
<div class="flex-1 space-y-4">
<div>
<h3 class="text-xl font-bold">
<h2 class="text-xl font-bold">
{props.product.name}
</h3>
</h2>
<p class="text-gray-500">
{props.product.description}
</p>
Expand Down Expand Up @@ -165,9 +165,9 @@ function EnterprisePricingCard() {
<div class={CARD_STYLES}>
<div class="flex-1 space-y-4">
<div>
<h3 class="text-xl font-bold">
<h2 class="text-xl font-bold">
Enterprise
</h3>
</h2>
<p class="text-gray-500">
Make the Deno Hunt experience yours.
</p>
Expand Down
1 change: 0 additions & 1 deletion static/github-mark.svg

This file was deleted.

Binary file removed static/logo-small.webp
Binary file not shown.
Binary file modified static/logo.webp
Binary file not shown.

0 comments on commit 0e11bcd

Please sign in to comment.