Skip to content

Commit 7eda858

Browse files
committed
More homepage changes
1 parent 5a92cf2 commit 7eda858

16 files changed

Lines changed: 291 additions & 241 deletions

astro.config.mjs

Lines changed: 91 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,103 @@
11
// @ts-check
2-
import { defineConfig } from "astro/config";
3-
import starlight from "@astrojs/starlight";
4-
import starlightBlog from "starlight-blog";
5-
import starlightImageZoom from "starlight-image-zoom";
62

7-
import react from "@astrojs/react";
83
import mdx from "@astrojs/mdx";
4+
import react from "@astrojs/react";
95
import sitemap from "@astrojs/sitemap";
10-
6+
import starlight from "@astrojs/starlight";
117
import tailwindcss from "@tailwindcss/vite";
8+
import { defineConfig } from "astro/config";
9+
import starlightBlog from "starlight-blog";
10+
import starlightImageZoom from "starlight-image-zoom";
1211

1312
// https://astro.build/config
1413
export default defineConfig({
15-
site: "https://dojo-osp.io",
14+
site: "https://dojo-osp.io",
1615

17-
prefetch: {
18-
prefetchAll: true
19-
},
16+
prefetch: {
17+
prefetchAll: true,
18+
},
2019

21-
integrations: [
22-
starlight({
23-
title: "Samourai Dojo",
24-
social: [
25-
{
26-
icon: "github",
27-
label: "GitHub",
28-
href: "https://github.com/Dojo-Open-Source-Project/",
29-
},
30-
],
31-
sidebar: [
32-
{
33-
label: "Installing Dojo",
34-
items: [
35-
{ label: "Requirements", slug: "install/requirements" },
36-
{
37-
label: "Install dependencies",
38-
slug: "install/install-dependencies",
39-
},
40-
{
41-
label: "Create segregated user",
42-
slug: "install/segregated-user",
43-
},
44-
{
45-
label: "Download and verify Dojo",
46-
slug: "install/download-and-verify",
47-
},
48-
{ label: "Configure Dojo", slug: "install/configure-dojo" },
49-
{ label: "Install Dojo", slug: "install/install-dojo" },
50-
{
51-
label: "Monitoring syncing status",
52-
slug: "install/monitoring-syncing-status",
53-
},
54-
],
55-
},
56-
{
57-
label: "Using Dojo",
58-
items: [
59-
{
60-
label: "Dojo Maintenance Tool",
61-
slug: "usage/dojo-maintenance-tool",
62-
},
63-
{
64-
label: "General usage practice",
65-
slug: "usage/general-usage-practice",
66-
},
67-
{
68-
label: "Common terminal commands",
69-
slug: "usage/common-terminal-commands",
70-
},
71-
{
72-
label: "Personal block explorer",
73-
slug: "usage/personal-block-explorer",
74-
},
75-
{ label: "Healthy logs", slug: "usage/healthy-logs" },
76-
{
77-
label: "Viewing and editing configuration files",
78-
slug: "usage/view-edit-config-files",
79-
},
80-
{ label: "Updating Dojo", slug: "usage/updating-dojo" },
81-
],
82-
},
83-
],
84-
plugins: [
85-
starlightBlog({
86-
title: "Releases",
87-
postCount: 5,
88-
prefix: "releases",
89-
}),
90-
starlightImageZoom(),
91-
],
92-
}),
93-
react(),
94-
mdx(),
95-
sitemap(),
20+
integrations: [
21+
starlight({
22+
title: "Dojo Open Source Project",
23+
logo: {
24+
src: "./src/assets/dojo.svg",
25+
},
26+
social: [
27+
{
28+
icon: "github",
29+
label: "GitHub",
30+
href: "https://github.com/Dojo-Open-Source-Project/",
31+
},
32+
],
33+
sidebar: [
34+
{
35+
label: "Installing Dojo",
36+
items: [
37+
{ label: "Requirements", slug: "install/requirements" },
38+
{
39+
label: "Install dependencies",
40+
slug: "install/install-dependencies",
41+
},
42+
{
43+
label: "Create segregated user",
44+
slug: "install/segregated-user",
45+
},
46+
{
47+
label: "Download and verify Dojo",
48+
slug: "install/download-and-verify",
49+
},
50+
{ label: "Configure Dojo", slug: "install/configure-dojo" },
51+
{ label: "Install Dojo", slug: "install/install-dojo" },
52+
{
53+
label: "Monitoring syncing status",
54+
slug: "install/monitoring-syncing-status",
55+
},
56+
],
57+
},
58+
{
59+
label: "Using Dojo",
60+
items: [
61+
{
62+
label: "Dojo Maintenance Tool",
63+
slug: "usage/dojo-maintenance-tool",
64+
},
65+
{
66+
label: "General usage practice",
67+
slug: "usage/general-usage-practice",
68+
},
69+
{
70+
label: "Common terminal commands",
71+
slug: "usage/common-terminal-commands",
72+
},
73+
{
74+
label: "Personal block explorer",
75+
slug: "usage/personal-block-explorer",
76+
},
77+
{ label: "Healthy logs", slug: "usage/healthy-logs" },
78+
{
79+
label: "Viewing and editing configuration files",
80+
slug: "usage/view-edit-config-files",
81+
},
82+
{ label: "Updating Dojo", slug: "usage/updating-dojo" },
83+
],
84+
},
85+
],
86+
plugins: [
87+
starlightBlog({
88+
title: "Releases",
89+
postCount: 5,
90+
prefix: "releases",
91+
}),
92+
starlightImageZoom(),
93+
],
94+
}),
95+
react(),
96+
mdx(),
97+
sitemap(),
9698
],
9799

98-
vite: {
99-
plugins: [tailwindcss()],
100-
},
101-
});
100+
vite: {
101+
plugins: [tailwindcss()],
102+
},
103+
});

biome.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
"quoteStyle": "double"
2424
}
2525
},
26+
"css": {
27+
"parser": {
28+
"tailwindDirectives": true
29+
}
30+
},
2631
"assist": {
2732
"enabled": true,
2833
"actions": {

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"@astrojs/react": "^4.4.2",
1919
"@astrojs/sitemap": "^3.6.0",
2020
"@astrojs/starlight": "^0.36.2",
21+
"@fontsource/cabin": "^5.2.8",
22+
"@fontsource/roboto-condensed": "^5.2.8",
2123
"@tailwindcss/vite": "^4.1.17",
2224
"@types/react": "^19.2.6",
2325
"@types/react-dom": "^19.2.3",

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/favicon.svg

Lines changed: 12 additions & 1 deletion
Loading

src/assets/dojo.svg

Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
import "../../styles/global.css";
3+
4+
interface Props {
5+
href: string;
6+
type?: "primary" | "secondary";
7+
size?: "sm" | "md";
8+
class?: string;
9+
target?: (typeof HTMLAnchorElement)["prototype"]["target"];
10+
rel?: (typeof HTMLAnchorElement)["prototype"]["rel"];
11+
}
12+
13+
const { href, type, target, rel } = Astro.props;
14+
15+
const sizeClasses = Astro.props.size === "sm" ? "px-3 py-2" : "px-5 py-3";
16+
17+
const baseClasses =
18+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-semibold shadow-sm ring-1 ring-inset transition-colors";
19+
20+
const typeClasses =
21+
type === "primary"
22+
? "bg-[#ed3b26] text-[#0b0b0c] ring-[#ed3b26]/60 hover:bg-[#f24b38]"
23+
: "bg-white/5 text-zinc-200 ring-white/10 hover:bg-white/10";
24+
25+
const additionalClasses = Astro.props.class;
26+
---
27+
28+
<a href={href} target={target} rel={rel} class:list={[baseClasses, sizeClasses, typeClasses, additionalClasses]}>
29+
<slot />
30+
</a>

src/components/homepage/CallToAction.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
import "../../styles/global.css";
3+
import Button from "./Button.astro";
34
---
45
<!-- Call to Action -->
56
<section class="border-t border-white/5 bg-gradient-to-b from-[#0c0c0d] to-[#0a0a0b]">
@@ -11,8 +12,8 @@ import "../../styles/global.css";
1112
<p class="mt-2 text-zinc-300">Follow the install guide and connect Samourai Wallet to your own backend.</p>
1213
</div>
1314
<div class="flex flex-col gap-3 sm:flex-row">
14-
<a href="/docs/install/install-dojo" class="inline-flex items-center justify-center rounded-md bg-[#ed3b26] px-5 py-3 text-sm font-semibold text-[#0b0b0c] ring-1 ring-inset ring-[#ed3b26]/60 hover:bg-[#f24b38]">Install guide</a>
15-
<a href="/docs/usage/personal-block-explorer" class="inline-flex items-center justify-center rounded-md bg-white/5 px-5 py-3 text-sm font-semibold text-zinc-200 ring-1 ring-inset ring-white/10 hover:bg-white/10">Usage docs</a>
15+
<Button href="/install/install-dojo" type="primary">Install guide</Button>
16+
<Button href="/usage/personal-block-explorer">Usage docs</Button>
1617
</div>
1718
</div>
1819
</div>

src/components/homepage/Card.astro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
import "../../styles/global.css";
3+
4+
interface Props {
5+
hoverable?: boolean;
6+
class?: string;
7+
}
8+
9+
const { hoverable } = Astro.props;
10+
11+
const baseClasses = "rounded-xl border border-white/10 bg-white/5 p-5";
12+
const hoverClasses = hoverable ? "transition-colors hover:bg-white/10" : "";
13+
const additionalClasses = Astro.props.class;
14+
---
15+
16+
<div class:list={[baseClasses, hoverClasses, additionalClasses]}>
17+
<slot />
18+
</div>

src/components/homepage/Footer.astro

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { Image } from "astro:assets";
3+
import dojoLogo from "../../assets/dojo.svg";
24
import "../../styles/global.css";
35
46
export interface Props {
@@ -12,10 +14,8 @@ const { title } = Astro.props;
1214
<div class="grid grid-cols-1 gap-8 sm:grid-cols-3">
1315
<div>
1416
<a href="/" class="inline-flex items-center gap-2">
15-
<span class="inline-flex h-8 w-8 items-center justify-center rounded-md bg-white/5 ring-1 ring-white/10">
16-
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-[#ed3b26]">
17-
<path d="M12 3L3 21h18L12 3z" stroke="currentColor" stroke-width="1.5" fill="none"/>
18-
</svg>
17+
<span class="inline-flex h-8 w-8 items-center justify-center rounded-md ring-1 ring-white/10">
18+
<Image src={dojoLogo} alt="Samourai Dojo Logo" width="26" height="26" />
1919
</span>
2020
<span class="text-sm font-semibold text-zinc-200">{title}</span>
2121
</a>
@@ -25,10 +25,10 @@ const { title } = Astro.props;
2525
<h5 class="text-xs font-semibold uppercase tracking-wider text-zinc-400">Docs</h5>
2626
<ul class="mt-3 space-y-2 text-sm text-zinc-300">
2727
<li><a class="hover:text-zinc-100" href="/docs">Overview</a></li>
28-
<li><a class="hover:text-zinc-100" href="/docs/install/download-and-verify">Download & Verify</a></li>
29-
<li><a class="hover:text-zinc-100" href="/docs/install/install-dependencies">Install Dependencies</a></li>
30-
<li><a class="hover:text-zinc-100" href="/docs/install/install-dojo">Install Dojo</a></li>
31-
<li><a class="hover:text-zinc-100" href="/docs/install/configure-dojo">Configure Dojo</a></li>
28+
<li><a class="hover:text-zinc-100" href="/install/download-and-verify">Download & Verify</a></li>
29+
<li><a class="hover:text-zinc-100" href="/install/install-dependencies">Install Dependencies</a></li>
30+
<li><a class="hover:text-zinc-100" href="/install/install-dojo">Install Dojo</a></li>
31+
<li><a class="hover:text-zinc-100" href="/install/configure-dojo">Configure Dojo</a></li>
3232
</ul>
3333
</div>
3434
<div>
@@ -43,7 +43,7 @@ const { title } = Astro.props;
4343
</div>
4444
</div>
4545
<div class="mt-10 flex flex-col items-center justify-between gap-4 border-t border-white/5 pt-6 text-xs text-zinc-500 sm:flex-row">
46-
<p>&copy; {new Date().getFullYear()} Dojo Open‑Source Software. MIT Licensed.</p>
46+
<p>&copy; {new Date().getFullYear()} {title}</p>
4747
<div class="flex items-center gap-4">
4848
<a href="/docs" class="hover:text-zinc-300">Docs</a>
4949
<a href="https://github.com/Samourai-Wallet" target="_blank" rel="noreferrer" class="hover:text-zinc-300">GitHub</a>

0 commit comments

Comments
 (0)