Skip to content

Commit 9903576

Browse files
Chore: styling and verbiage cleanup (#2451)
- Better responsive styling of header, logo, nav menu and docs sidebar - Specify UTC on homepage (since we can't localize server-side) - Minor copy updates
1 parent baac482 commit 9903576

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

www/components/Header.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,19 @@ export default function Header(props: { title: string; active: string }) {
2727

2828
export function Logo() {
2929
return (
30-
<a href="/" class="flex mr-3 items-center" aria-label="Top Page">
31-
<img src="/logo.svg" alt="Fresh logo" width={40} height={40} />
30+
<a href="/" class="flex mr-3 items-center shrink-0" aria-label="Top Page">
31+
<img
32+
src="/logo.svg"
33+
alt="Fresh logo"
34+
width={40}
35+
height={40}
36+
/>
3237
<svg
3338
preserveAspectRatio="xMinYMin"
3439
viewBox="0 0 250 75"
3540
fill="none"
3641
xmlns="http://www.w3.org/2000/svg"
37-
class="h-5 inline-block ml-2.5"
42+
class="h-5 ml-2.5 shrink-0 hidden sm:inline-block"
3843
aria-label="Fresh logo"
3944
>
4045
<path

www/components/NavigationBar.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ export default function NavigationBar(
1212
name: "Showcase",
1313
href: "/showcase",
1414
},
15-
// {
16-
// name: "Components",
17-
// href: "/components",
18-
// },
1915
{
2016
name: "Blog",
2117
href: "https://deno.com/blog?tag=fresh",
@@ -24,7 +20,7 @@ export default function NavigationBar(
2420
const isHome = props.active == "/";
2521
return (
2622
<nav class={"flex " + props.class ?? ""} f-client-nav={false}>
27-
<ul class="flex justify-center items-center gap-2 sm:gap-4 mx-4 my-2 sm:my-6 flex-wrap lg:mx-8 2xl:mr-0">
23+
<ul class="flex items-center gap-x-2 sm:gap-4 mx-4 my-2 sm:my-6 flex-wrap lg:mx-8 2xl:mr-0">
2824
{items.map((item) => (
2925
<li>
3026
<a

www/components/homepage/IslandsSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export function IslandsSection() {
5757
</svg>
5858
<SectionHeading>Island-based architecture</SectionHeading>
5959
<p>
60-
Fresh ships plain HTML to the client, and then hydrates with
61-
JavaScript only where needed.
60+
Fresh ships plain HTML to the client, then hydrates with JavaScript
61+
only where needed.
6262
</p>
6363
<p>
6464
Because it's Preact, you get best-in-class performance, plus the

www/components/homepage/PartialsSection.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export function PartialsSection() {
6868
<SectionHeading>Stream HTML straight from the server</SectionHeading>
6969
<p>
7070
Fresh Partials let you fetch HTML and slot it directly into the
71-
page, without a full page reload.
71+
page, without a full page reload—perfect for interactive elements
72+
and dynamic apps.
7273
</p>
7374
<FancyLink href="/docs/concepts/partials" class="mt-4">
7475
Learn more about Partials

www/components/homepage/RenderingSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function RenderingSection() {
5858
Freshly server-rendered {new Date().toLocaleString("default", {
5959
dateStyle: "medium",
6060
timeStyle: "medium",
61-
})}
61+
})} UTC
6262
</p>
6363
</DemoBox>
6464
</div>

www/routes/docs/[...slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default function DocsPage(props: PageProps<Data>) {
165165
<Header title="docs" active="/docs" />
166166
<div f-client-nav={true}>
167167
<MobileSidebar page={page} />
168-
<div class="flex mx-auto max-w-screen-2xl px-4 md:px-0 md:py-0 justify-end bg-gray-100">
168+
<div class="flex mx-auto max-w-screen-2xl px-0 md:px-4 md:py-0 justify-start bg-gray-100">
169169
<label
170170
for="docs_sidebar"
171171
class="px-4 py-3 lg:hidden flex items-center hover:bg-gray-100 rounded gap-2 cursor-pointer"

www/routes/thanks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function ThanksForSubscribing(
2424
<PageSection>
2525
<DemoBox>
2626
<div class="space-y-2">
27-
<h1 class="text-lg sm:text-2xl md:text-3xl lg:text-4xl">
27+
<h1 class="text-2xl md:text-3xl lg:text-4xl">
2828
{vote
2929
? `Thanks for voting for ${vote}!`
3030
: `Form submitted successfully`}
@@ -60,7 +60,7 @@ export default function ThanksForSubscribing(
6060
<path d="M13 18l6 -6" />
6161
<path d="M13 6l6 6" />
6262
</svg>
63-
Back home
63+
Back
6464
</a>
6565
</div>
6666
</DemoBox>

0 commit comments

Comments
 (0)