Skip to content

Commit

Permalink
feat: recreate current landing page in docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
fusion44 committed Jun 23, 2024
1 parent 3c7636e commit a9e46b4
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 55 deletions.
13 changes: 9 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { themes as prismThemes } from "prism-react-renderer";
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "RaspiBlitz",
tagline: "Bitcoin and Lightning node",
tagline: "DIY Bitcoin and Lightning Node on a RaspberryPi",
favicon: "img/favicon.ico",

// Set the production url of your site here
Expand Down Expand Up @@ -82,6 +82,11 @@ const config = {
label: "GitHub",
position: "right",
},
{
href: "./docs/setup/software-setup/download",
label: "Download",
position: "right",
},
],
},
footer: {
Expand All @@ -94,9 +99,9 @@ const config = {
darkTheme: prismThemes.dracula,
},
algolia: {
appId: 'H1OPUQUC79',
apiKey: '5ae665bb7d16f08c07105a628adcd2bc',
indexName: 'raspiblitz',
appId: "H1OPUQUC79",
apiKey: "5ae665bb7d16f08c07105a628adcd2bc",
indexName: "raspiblitz",
contextualSearch: false, // only false works
},
}),
Expand Down
3 changes: 0 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ serve:
build:
npm run build

deploy:
GIT_USER=fusion44 USE_SSH=true yarn deploy

update-all:
npm update
yarn upgrade
Expand Down
66 changes: 35 additions & 31 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,40 @@ import Heading from "@theme/Heading";
import styles from "./styles.module.css";

const FeatureList = [
{
title: "Easy to Use",
Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
),
},
{
title: "Focus on What Matters",
Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
),
},
{
title: "Powered by React",
Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
),
},
// {
// title: "Open Source",
// Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
// description: (
// <>
// The project is unapologetically open source under the MIT licence. This
// means that anyone can fork, modify and use the code to their heart's
// content.
// </>
// ),
// },
// {
// title: "Batteries Included",
// Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
// description: (
// <>
// The RaspiBlitz includes a wide range of apps and tools that are widely
// used in the ecosystem. They can be turned on and off at the user's
// discretion.
// </>
// ),
// },
// {
// title: "Two Versions",
// Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
// description: (
// <>
// The RaspiBlitz is available in two versions: the "Minimal" edition
// prioritizes robust security features, while the "Fatpack" version offers
// more features at the cost of some security.{" "}
// <a href="./docs/security.html">Learn more</a>
// </>
// ),
// },
];

function Feature({ Svg, title, description }) {
Expand All @@ -53,7 +57,7 @@ export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
<div className="column">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
Expand Down
115 changes: 98 additions & 17 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,104 @@ import styles from "./index.module.css";
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro"
>
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
<div style={{ padding: "20px 20px", fontSize: "85%", color: "lightgreen" }}>
<h2>RaspiBlitz - DIY Bitcoin &amp; Lightning Node on a RaspberryPi</h2>

<img
src="https://github.com/rootzoll/raspiblitz/raw/dev/pictures/raspiblitz.jpg"
alt="Raspberry Pi Blitz"
style={{
width: "100%",
maxWidth: "520px",
minHeight: "210px",
borderWidth: "1px",
borderColor: "grey",
borderStyle: "solid",
marginTop: "10px",
marginBottom: "6px",
}}
/>
<div style={{ paddingTop: "15px" }}>
The complete tutorial on how to build from single parts &amp; setup:
<ul style={{ padding: "0px 20px", listStyleType: "disc" }}>
<li>
<a href="https://docs.raspiblitz.org/docs/setup/intro">
docs.raspiblitz.org
</a>
</li>
</ul>
</div>
<div>
Source Code (MIT OpenSource):
<ul style={{ padding: "0px 20px" }}>
<li>
Main:{" "}
<a href="https://github.com/raspiblitz/raspiblitz">
github.com/raspiblitz/raspiblitz
</a>
</li>
<li>
WebUI:{" "}
<a href="https://github.com/raspiblitz/raspiblitz-web">
github.com/raspiblitz/raspiblitz-web
</a>
</li>
<li>
API:{" "}
<a href="https://github.com/fusion44/blitz_api">
github.com/fusion44/blitz_api
</a>
</li>
<li>
Docs:{" "}
<a href="https://github.com/raspiblitz/raspiblitz-docs">
github.com/raspiblitz/raspiblitz-docs
</a>
</li>
</ul>
Questions and Support:
<ul style={{ padding: "0px 20px" }}>
<li>
<a href="https://t.me/raspiblitz">Telegram English</a> (community
managed)
</li>
<li>
<a href="https://t.me/raspiblitz_DE">Telegram Deutsch</a> (community
managed)
</li>
<li>
<a href="https://t.me/raspiblitz_ES">Telegram Spanish</a> (community
managed)
</li>
<li>
<a href="https://t.me/raspiblitz_IT">Telegram Italian</a> (community
managed)
</li>
<li>
<a href="https://t.me/raspiblitz_RU">Telegram Russian</a> (community
managed)
</li>
<li>
<a href="https://github.com/rootzoll/raspiblitz/issues?q=is%3Aissue">
GitHub Issues
</a>
</li>
</ul>
</div>

<div style={{ paddingTop: "15px" }}>
Donations for the RaspiBlitz project are collected by{" "}
<a href="https://fulmo.org" target="_blank">
Fulmo
</a>{" "}
&amp; managed together with the developer team.
</div>

<div style={{ paddingTop: "15px" }}>
Impressum: Christian Rotzoll, christian [ at ] rotzoll.de - this site is
not using any cookies and is not storing your data.
</div>
</header>
</div>
);
}

Expand All @@ -36,9 +118,8 @@ export default function Home() {
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
<HomepageFeatures />
<HomepageHeader />
</main>
</Layout>
);
Expand Down
20 changes: 20 additions & 0 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,23 @@
align-items: center;
justify-content: center;
}

/* unvisited link */
a:link {
color: yellow;
}

/* visited link */
a:visited {
color: yellow;
}

/* mouse over link */
a:hover {
color: white;
}

/* selected link */
a:active {
color: yellow;
}

0 comments on commit a9e46b4

Please sign in to comment.