Skip to content

Commit f918f77

Browse files
committedFeb 5, 2024
docs(website): update colors and layout
1 parent c9ae089 commit f918f77

File tree

8 files changed

+35
-42
lines changed

8 files changed

+35
-42
lines changed
 

‎website/docusaurus.config.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,13 @@ export default {
7474
label: "Docs",
7575
},
7676
{
77-
href: "https://github.com/TheEdoRan/next-safe-action",
78-
label: "GitHub",
79-
position: "right",
77+
"href": "https://github.com/TheEdoRan/next-safe-action",
78+
"position": "right",
79+
"className": "header-github-link",
80+
"aria-label": "next-safe-action's GitHub page",
8081
},
8182
],
8283
},
83-
footer: {
84-
style: "light",
85-
copyright: `Copyleft <span class="copyleft">&copy;</span> 2023 Edoardo Ranghieri`,
86-
},
8784
prism: {
8885
additionalLanguages: ["typescript"],
8986
theme: themes.vsDark,

‎website/src/components/landing/features.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ export function Features() {
4343
<div className="text-center font-bold text-3xl sm:text-4xl lg:text-5xl">
4444
Why choose next-safe-action?
4545
</div>
46-
<div className="min-w-full bg-white dark:bg-stone-800 max-[479px]:px-5 max-[479px]:py-6 rounded-xl p-8 md:p-10 flex flex-col space-y-6">
46+
<div className="min-w-full bg-white dark:bg-zinc-800 max-[479px]:px-5 max-[479px]:py-6 rounded-xl p-8 md:p-10 flex flex-col space-y-6">
4747
{features.map(({ title, description }, idx) => (
4848
<Fragment key={idx}>
4949
{idx > 0 ? (
50-
<div className="h-px min-h-[1px] min-w-full bg-stone-200 dark:bg-stone-700"></div>
50+
<div className="h-px min-h-[1px] min-w-full bg-zinc-200 dark:bg-zinc-700"></div>
5151
) : null}
5252
<div className="flex space-x-2 sm:space-x-4 md:space-x-6">
5353
<Check className="w-8 h-8 shrink-0" />

‎website/src/components/landing/getting-started.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
export function GettingStarted() {
42
return (
53
<div className="flex min-h-screen items-center justify-center flex-col">
@@ -9,12 +7,12 @@ export function GettingStarted() {
97
<div className="flex gap-4 mt-10 flex-wrap items-center justify-center">
108
<a
119
href="/docs/getting-started"
12-
className="!no-underline hover:brightness-90 transition cursor-pointer rounded-lg mr-4 px-3 py-2 font-bold inline-flex items-center justify-center text-2xl bg-stone-800 !text-stone-100 dark:bg-stone-100 dark:!text-stone-900 w-64">
10+
className="!no-underline hover:brightness-90 transition cursor-pointer rounded-lg mr-4 px-3 py-2 font-bold inline-flex items-center justify-center text-2xl bg-zinc-800 !text-zinc-100 dark:bg-zinc-100 dark:!text-zinc-900 w-64">
1311
Getting started 🎉
1412
</a>
1513
<a
1614
href="/docs/examples/basic-implementation"
17-
className="!no-underline hover:brightness-90 transition cursor-pointer rounded-lg mr-4 px-3 py-2 font-bold inline-flex items-center justify-center text-2xl bg-[#ffa024] !text-stone-100 w-64">
15+
className="!no-underline hover:brightness-90 transition cursor-pointer rounded-lg mr-4 px-3 py-2 font-bold inline-flex items-center justify-center text-2xl bg-[#ffa024] !text-zinc-100 w-64">
1816
Explore example ➡️
1917
</a>
2018
</div>

‎website/src/components/landing/hero.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function Hero() {
66

77
return (
88
<header className="block bg-gradient-to-b from-[#f79f2d] to-[#ff8e0a] bg-center bg-cover overflow-hidden relative">
9-
<div className="absolute inset-0 pattern-dots pattern-stone-600 pattern-bg-transparent pattern-size-6 pattern-opacity-10" />
9+
<div className="absolute inset-0 pattern-dots pattern-zinc-600 pattern-bg-transparent pattern-size-6 pattern-opacity-10" />
1010
<div className="px-5 md:px-10">
1111
<div className="mx-auto w-full max-w-7xl">
1212
<div className="pt-12 pb-4 md:pt-16 md:pb-8 lg:pt-20">
@@ -16,15 +16,15 @@ export function Hero() {
1616
<h1 className="text-white text-2xl sm:text-3xl md:text-5xl font-bold tracking-tight">
1717
{siteConfig.tagline}
1818
</h1>
19-
<h2 className="text-stone-50 font-medium text-base sm:text-lg md:text-xl max-w-xl">
19+
<h2 className="text-zinc-50 font-medium text-base sm:text-lg md:text-xl max-w-xl">
2020
next-safe-action handles your Next.js app mutations type
2121
safety, input validation, server errors and even more!
2222
</h2>
2323
</div>
2424
<div className="flex justify-center items-center">
2525
<a
2626
href="/docs/getting-started"
27-
className="!no-underline hover:brightness-90 transition !text-stone-100 cursor-pointer rounded-lg mr-4 bg-stone-800 px-3 py-2 font-bold inline-flex items-center justify-center text-sm sm:text-lg md:text-xl">
27+
className="!no-underline hover:brightness-90 transition !text-zinc-100 cursor-pointer rounded-lg mr-4 bg-zinc-800 px-3 py-2 font-bold inline-flex items-center justify-center text-sm sm:text-lg md:text-xl">
2828
Getting started 🎉
2929
</a>
3030
<StarsButton />

‎website/src/components/landing/index.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from "react";
21
import { Features } from "./features";
32
import { GettingStarted } from "./getting-started";
43
import { Hero } from "./hero";
@@ -9,9 +8,9 @@ export function Landing() {
98
<main>
109
<Hero />
1110
<Features />
12-
<div className="h-px min-h-[1px] min-w-full bg-stone-200 dark:bg-stone-700"></div>
11+
<div className="h-px min-h-[1px] min-w-full bg-zinc-200 dark:bg-zinc-700"></div>
1312
<Testimonials />
14-
<div className="h-px min-h-[1px] min-w-full bg-stone-200 dark:bg-stone-700"></div>
13+
<div className="h-px min-h-[1px] min-w-full bg-zinc-200 dark:bg-zinc-700"></div>
1514
<GettingStarted />
1615
</main>
1716
);

‎website/src/components/landing/stars-button.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Star } from "lucide-react";
2-
import React, { useEffect, useState } from "react";
2+
import { useEffect, useState } from "react";
33

44
function useFetchStarsCount() {
55
const [starsCount, setStarsCount] = useState<number | null>(undefined);
@@ -27,7 +27,7 @@ export function StarsButton() {
2727
href="https://github.com/TheEdoRan/next-safe-action"
2828
target="_blank"
2929
rel="noopener noreferrer"
30-
className="!no-underline hover:!bg-sky-100 transition !text-stone-900 cursor-pointer rounded-lg mr-4 bg-stone-50 px-3 py-2 font-bold inline-flex items-center justify-center space-x-1 text-sm sm:text-lg md:text-xl">
30+
className="!no-underline hover:!bg-sky-100 transition !text-zinc-900 cursor-pointer rounded-lg mr-4 bg-zinc-50 px-3 py-2 font-bold inline-flex items-center justify-center space-x-1 text-sm sm:text-lg md:text-xl">
3131
<Star className="w-4 h-4 sm:w-6 sm:h-6" />
3232
<span>{starsCount ? starsCount : ". . ."} GitHub stars</span>
3333
</a>

‎website/src/components/landing/tweet.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ export function Tweet({
1818
href={tweetURL}
1919
target="_blank"
2020
rel="noopener noreferrer"
21-
className="p-4 bg-white dark:bg-stone-800 rounded-xl flex flex-col space-y-4 max-w-lg !no-underline transition hover:brightness-90">
21+
className="p-4 bg-white dark:bg-zinc-800 rounded-xl flex flex-col space-y-4 max-w-lg !no-underline transition hover:brightness-90">
2222
<div className="flex space-x-4 items-center">
2323
<img
2424
src={`/img/x/${authorHandle}.jpg`}
2525
className="rounded-full w-10 h-10"
2626
/>
2727
<div className="flex flex-col">
28-
<span className="text-sm font-semibold text-stone-950 dark:text-stone-50">
28+
<span className="text-sm font-semibold text-zinc-950 dark:text-zinc-50">
2929
{authorName}
3030
</span>
31-
<span className="text-sm text-stone-600 dark:text-stone-400">
31+
<span className="text-sm text-zinc-600 dark:text-zinc-400">
3232
@{authorHandle}
3333
</span>
3434
</div>
3535
</div>
3636
<div
37-
className="text-stone-950 dark:text-stone-50 flex-1"
37+
className="text-zinc-950 dark:text-zinc-50 flex-1"
3838
dangerouslySetInnerHTML={{ __html: textHTML }}
3939
/>
40-
<div className="text-sm text-stone-600 dark:text-stone-400 ">{date}</div>
40+
<div className="text-sm text-zinc-600 dark:text-zinc-400 ">{date}</div>
4141
</a>
4242
);
4343
}

‎website/src/css/custom.css

+15-16
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@
99

1010
/* You can override the default Infima variables here. */
1111
body {
12-
font-size: 18px;
12+
font-size: 105%;
1313
}
1414

15-
.footer {
16-
border-top: 1px solid #e7e5e4;
17-
background-color: transparent;
18-
padding: 1rem;
15+
.header-github-link::before {
16+
display: flex;
17+
background-repeat: no-repeat;
18+
background-position: center;
19+
height: 1.5rem;
20+
width: 1.5rem;
21+
content: "";
22+
background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%200c-6.626%200-12%205.373-12%2012%200%205.302%203.438%209.8%208.207%2011.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729%201.205.084%201.839%201.237%201.839%201.237%201.07%201.834%202.807%201.304%203.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931%200-1.311.469-2.381%201.236-3.221-.124-.303-.535-1.524.117-3.176%200%200%201.008-.322%203.301%201.23.957-.266%201.983-.399%203.003-.404%201.02.005%202.047.138%203.006.404%202.291-1.552%203.297-1.23%203.297-1.23.653%201.653.242%202.874.118%203.176.77.84%201.235%201.911%201.235%203.221%200%204.609-2.807%205.624-5.479%205.921.43.372.823%201.102.823%202.222v3.293c0%20.319.192.694.801.576%204.765-1.589%208.199-6.086%208.199-11.386%200-6.627-5.373-12-12-12z%22%2F%3E%3C%2Fsvg%3E");
1923
}
2024

2125
.navbar {
2226
background-color: #fafaf9 !important;
2327
box-shadow: 0px 1px #e7e5e4 !important;
2428
}
2529

26-
.copyleft {
27-
display: inline-block;
28-
transform: rotate(180deg);
29-
}
30-
3130
.navbar__brand::after {
3231
content: "v7";
3332
margin-left: 0.5rem;
@@ -62,16 +61,16 @@ body {
6261
--ifm-color-primary-lighter: #f9b257;
6362
--ifm-color-primary-lightest: #fac681;
6463
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
65-
--ifm-background-color: #1c1917 !important;
66-
--ifm-color-emphasis-200: #44403c !important;
64+
--ifm-background-color: #191a1d !important;
65+
--ifm-color-emphasis-200: #2b2e33 !important;
6766

68-
.footer {
69-
border-top: 1px solid #44403c !important;
67+
.header-github-link::before {
68+
filter: invert(1);
7069
}
7170

7271
.navbar {
73-
background-color: #1c1917 !important;
74-
box-shadow: 0px 1px #44403c !important;
72+
background-color: #191a1d !important;
73+
box-shadow: 0px 1px #2b2e33 !important;
7574
}
7675
}
7776

0 commit comments

Comments
 (0)
Please sign in to comment.