Skip to content

Commit

Permalink
Chore: styling and verbiage cleanup (#2451)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
josh-collinsworth authored May 23, 2024
1 parent baac482 commit 9903576
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
11 changes: 8 additions & 3 deletions www/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,19 @@ export default function Header(props: { title: string; active: string }) {

export function Logo() {
return (
<a href="/" class="flex mr-3 items-center" aria-label="Top Page">
<img src="/logo.svg" alt="Fresh logo" width={40} height={40} />
<a href="/" class="flex mr-3 items-center shrink-0" aria-label="Top Page">
<img
src="/logo.svg"
alt="Fresh logo"
width={40}
height={40}
/>
<svg
preserveAspectRatio="xMinYMin"
viewBox="0 0 250 75"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="h-5 inline-block ml-2.5"
class="h-5 ml-2.5 shrink-0 hidden sm:inline-block"
aria-label="Fresh logo"
>
<path
Expand Down
6 changes: 1 addition & 5 deletions www/components/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export default function NavigationBar(
name: "Showcase",
href: "/showcase",
},
// {
// name: "Components",
// href: "/components",
// },
{
name: "Blog",
href: "https://deno.com/blog?tag=fresh",
Expand All @@ -24,7 +20,7 @@ export default function NavigationBar(
const isHome = props.active == "/";
return (
<nav class={"flex " + props.class ?? ""} f-client-nav={false}>
<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">
<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">
{items.map((item) => (
<li>
<a
Expand Down
4 changes: 2 additions & 2 deletions www/components/homepage/IslandsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export function IslandsSection() {
</svg>
<SectionHeading>Island-based architecture</SectionHeading>
<p>
Fresh ships plain HTML to the client, and then hydrates with
JavaScript only where needed.
Fresh ships plain HTML to the client, then hydrates with JavaScript
only where needed.
</p>
<p>
Because it's Preact, you get best-in-class performance, plus the
Expand Down
3 changes: 2 additions & 1 deletion www/components/homepage/PartialsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export function PartialsSection() {
<SectionHeading>Stream HTML straight from the server</SectionHeading>
<p>
Fresh Partials let you fetch HTML and slot it directly into the
page, without a full page reload.
page, without a full page reload—perfect for interactive elements
and dynamic apps.
</p>
<FancyLink href="/docs/concepts/partials" class="mt-4">
Learn more about Partials
Expand Down
2 changes: 1 addition & 1 deletion www/components/homepage/RenderingSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function RenderingSection() {
Freshly server-rendered {new Date().toLocaleString("default", {
dateStyle: "medium",
timeStyle: "medium",
})}
})} UTC
</p>
</DemoBox>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/routes/docs/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default function DocsPage(props: PageProps<Data>) {
<Header title="docs" active="/docs" />
<div f-client-nav={true}>
<MobileSidebar page={page} />
<div class="flex mx-auto max-w-screen-2xl px-4 md:px-0 md:py-0 justify-end bg-gray-100">
<div class="flex mx-auto max-w-screen-2xl px-0 md:px-4 md:py-0 justify-start bg-gray-100">
<label
for="docs_sidebar"
class="px-4 py-3 lg:hidden flex items-center hover:bg-gray-100 rounded gap-2 cursor-pointer"
Expand Down
4 changes: 2 additions & 2 deletions www/routes/thanks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function ThanksForSubscribing(
<PageSection>
<DemoBox>
<div class="space-y-2">
<h1 class="text-lg sm:text-2xl md:text-3xl lg:text-4xl">
<h1 class="text-2xl md:text-3xl lg:text-4xl">
{vote
? `Thanks for voting for ${vote}!`
: `Form submitted successfully`}
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function ThanksForSubscribing(
<path d="M13 18l6 -6" />
<path d="M13 6l6 6" />
</svg>
Back home
Back
</a>
</div>
</DemoBox>
Expand Down

0 comments on commit 9903576

Please sign in to comment.