Skip to content

Commit 994c74e

Browse files
committed
Improve Getting Started Page
1 parent 6d6c7a4 commit 994c74e

3 files changed

Lines changed: 138 additions & 19 deletions

File tree

docs/.vuepress/config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,47 @@
1+
const path = require('path')
2+
13
const siteUrl = 'https://docs.mynodebtc.com'
24
const defaultSocialImage = 'https://mynodebtc.com/images/og_image_2.jpg'
35

46
module.exports = {
57
title: "Guides and Documentation",
68
description: "Helpful guides and documentation for using MyNode and getting the most out of all it has to offer!",
79
base: "/",
10+
// `fsevents` (chokidar's native macOS watcher) isn't installed for this
11+
// Node/arch combo — it's an old native module with no build for newer
12+
// Node on Apple Silicon. Without it, webpack's file watcher (watchpack,
13+
// which watches per-directory with `atomic: false`) can lose track of
14+
// a file after a few edits, especially if the editor saves atomically
15+
// (write-temp-then-rename), leaving `yarn docs:dev` showing stale/blank
16+
// content until it's restarted. `poll` forces polling instead, which
17+
// just re-stats files on an interval — slower to notice a change (up to
18+
// ~1s) but immune to missed/misordered native fs events.
19+
//
20+
// This also excludes .vuepress/dist from the watcher, since running
21+
// `yarn docs:build` while `yarn docs:dev` is running would otherwise
22+
// flood it with the build's writes.
23+
//
24+
// Note: this key replaces (does not merge with) VuePress's default
25+
// devServer.watchOptions, so the `ignored` fn below also reimplements
26+
// the default node_modules exclusion — and its carve-out for VuePress's
27+
// own temp dir, which lives under node_modules and must stay watched
28+
// for HMR of generated routes/theme files to keep working.
29+
devServer: {
30+
watchOptions: {
31+
poll: 1000,
32+
ignored: [
33+
(testPath) => {
34+
if (testPath.includes(path.join('node_modules', '@vuepress', '.temp'))) {
35+
return false
36+
}
37+
if (testPath.includes(path.join('.vuepress', 'dist'))) {
38+
return true
39+
}
40+
return /node_modules/.test(testPath)
41+
}
42+
]
43+
}
44+
},
845
head: [
946
// Must be first — sets data-theme before any CSS renders to prevent flash.
1047
['script', {}, `(function(){var t=localStorage.getItem('mn-theme');if(t==='light')document.documentElement.setAttribute('data-theme','light');})()`],

docs/.vuepress/styles/index.styl

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,94 @@ div[class*='language-'] button:hover
728728
.theme-default-content .details-body > *:last-child
729729
margin-bottom 0 !important
730730

731+
// ─── Segmented tabs (mn-tabs) ──────────────────────────────────────────────
732+
// Pure-CSS, JS-free tab switcher driven by a hidden radio group. Markup is
733+
// radio+label pairs (one per tab, in the order they should appear as
734+
// buttons) followed by one .mn-tabs-panel per tab:
735+
//
736+
// <div class="mn-tabs">
737+
// <input type="radio" id="my-tab-a" name="my-tabs" checked>
738+
// <label for="my-tab-a" class="mn-tabs-button">Tab A</label>
739+
// <input type="radio" id="my-tab-b" name="my-tabs">
740+
// <label for="my-tab-b" class="mn-tabs-button">Tab B</label>
741+
//
742+
// <div class="mn-tabs-panel" data-tab-panel="my-tab-a">…</div>
743+
// <div class="mn-tabs-panel" data-tab-panel="my-tab-b">…</div>
744+
// </div>
745+
//
746+
// Button styling below is fully generic. Showing/hiding the right panel
747+
// needs one #id:checked ~ [data-tab-panel="id"] rule per tab (pure CSS
748+
// can't match an attribute value against a sibling's id) — add a pair
749+
// whenever a new tab group is introduced. Give every group its own
750+
// name="…" and prefix ids per page (e.g. "gs-" below) so groups on
751+
// different pages never collide.
752+
753+
.theme-default-content .mn-tabs
754+
position relative !important
755+
display flex !important
756+
flex-wrap wrap !important
757+
align-items flex-start !important
758+
margin 1.5rem 0 !important
759+
760+
// Visually hidden but still focusable/keyboard-operable (native radio
761+
// group behavior — Tab to focus, arrow keys to switch, Space to select).
762+
.theme-default-content .mn-tabs-radio
763+
position absolute !important
764+
width 1px !important
765+
height 1px !important
766+
padding 0 !important
767+
margin -1px !important
768+
overflow hidden !important
769+
clip-path inset(50%) !important
770+
white-space nowrap !important
771+
border 0 !important
772+
773+
.theme-default-content .mn-tabs-button
774+
display inline-flex !important
775+
align-items center !important
776+
justify-content center !important
777+
padding 0.6em 1.2em !important
778+
margin 0 0.6rem 0.85rem 0 !important
779+
border 1px solid var(--mn-border) !important
780+
border-radius 8px !important
781+
background var(--mn-card-bg) !important
782+
color var(--mn-text) !important
783+
font-size 0.9rem !important
784+
font-weight 600 !important
785+
line-height 1.2 !important
786+
cursor pointer !important
787+
user-select none !important
788+
white-space nowrap !important
789+
transition background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important
790+
791+
.theme-default-content .mn-tabs-button:hover
792+
border-color var(--mn-orange) !important
793+
color var(--mn-orange) !important
794+
795+
// Active button — generic, driven by adjacency to its own radio.
796+
.theme-default-content .mn-tabs-radio:checked + .mn-tabs-button
797+
background var(--mn-orange) !important
798+
border-color var(--mn-orange) !important
799+
color #000 !important
800+
801+
.theme-default-content .mn-tabs-radio:focus-visible + .mn-tabs-button
802+
box-shadow 0 0 0 3px rgba(240,142,32,0.35) !important
803+
804+
.theme-default-content .mn-tabs-panel
805+
display none !important
806+
flex 1 1 100% !important
807+
margin-top 0.25rem !important
808+
padding-left 1.1rem !important
809+
border-left 2px solid var(--mn-border) !important
810+
811+
.theme-default-content .mn-tabs-panel > *:last-child
812+
margin-bottom 0 !important
813+
814+
// Getting Started — "Power On Device" (Build Your Own Device / Model Two)
815+
#gs-tab-build:checked ~ [data-tab-panel="gs-tab-build"],
816+
#gs-tab-model-two:checked ~ [data-tab-panel="gs-tab-model-two"]
817+
display block !important
818+
731819
// ─── Page edit / prev-next nav ────────────────────────────────────────────
732820

733821
.page-edit

docs/intro/getting-started.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,24 @@ sidebarDepth: 0
1111

1212
# Getting Started with MyNode
1313

14-
Choose the section that corresponds to your situation and expand the details to get started.
14+
Welcome! Setting up a new MyNode device can be done in a few simple steps and you will soon be running a Bitcoin and Lightning node!
1515

16-
## Building your Own Device
16+
## Assemble your Device
1717

18-
Expand this section if you are building a MyNode device.
18+
Select your MyNode device or "Build Your Own" to get setup steps specific to your situation.
1919

20-
<details>
21-
<summary><b>Show Details</b></summary>
20+
<div class="mn-tabs">
2221

23-
<div class="details-body">
22+
<input type="radio" id="gs-tab-build" name="gs-device-tabs" class="mn-tabs-radio" checked>
23+
<label for="gs-tab-build" class="mn-tabs-button">Build Your Own Device</label>
24+
<input type="radio" id="gs-tab-model-two" name="gs-device-tabs" class="mn-tabs-radio">
25+
<label for="gs-tab-model-two" class="mn-tabs-button">Model Two</label>
2426

25-
Setting up a new MyNode device can be done in a few simple steps!
27+
<div class="mn-tabs-panel" data-tab-panel="gs-tab-build">
2628

2729
**Acquire Parts**
2830

29-
First, you need to acquire the parts you will need to assemble the device. A full parts list can be found on the <a href="https://mynodebtc.com/download" target="_blank">MyNode download page</a>.
31+
First, you need to acquire parts to assemble the device. A full parts list can be found on the <a href="https://mynodebtc.com/download" target="_blank">MyNode download page</a>.
3032

3133
In general, you will need:
3234
- A Mini PC or Raspberry Pi 5
@@ -65,17 +67,8 @@ For external storage, follow these steps:
6567
Your node is now booting and will be accessible shortly!
6668

6769
</div>
68-
</details>
6970

70-
71-
## Model Two
72-
73-
Expand this section if you purchased a MyNode Model Two.
74-
75-
<details>
76-
<summary><b>Show Details</b></summary>
77-
78-
<div class="details-body">
71+
<div class="mn-tabs-panel" data-tab-panel="gs-tab-model-two">
7972

8073
**Setup Device**
8174

@@ -90,7 +83,8 @@ Expand this section if you purchased a MyNode Model Two.
9083
Your node is now booting and will be accessible shortly!
9184

9285
</div>
93-
</details>
86+
87+
</div>
9488

9589
## Connecting to MyNode
9690

0 commit comments

Comments
 (0)