Skip to content

Commit c9dd38b

Browse files
authored
docs! (#67)
1 parent bc26e42 commit c9dd38b

22 files changed

+292
-56
lines changed

docs/astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export default defineConfig({
5151
label: 'Getting started',
5252
items: [
5353
{ label: 'Quick start', link: '/user/quick-start/' },
54+
{ label: 'Rules', link: '/user/rules/' },
5455
{ label: 'Improve performance', link: '/user/performance/' },
5556
{ label: 'Interpret results', link: '/user/actionability/' },
5657
{ label: 'Static vs dynamic assessment', link: '/user/assessment-mode/' },

docs/src/assets/crx-store.png

110 KB
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
import { Image } from 'astro:assets';
3+
import CrxOptionsLight from '../assets/crx-options-light.png';
4+
import CrxOptionsDark from '../assets/crx-options-dark.png';
5+
---
6+
7+
<picture>
8+
<source srcset={CrxOptionsLight.src} media="(prefers-color-scheme: dark)"/>
9+
<Image src={CrxOptionsDark} alt="Screenshot of the options page of the Capo extension" />
10+
</picture>

docs/src/components/CapoPalette.astro

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,7 @@ const bgcolors = JSON.parse(colors).map(color => {
2020
</style>
2121

2222
<div>
23-
<span class="capo-color" style={bgcolors[0]}></span>
24-
<span class="capo-color" style={bgcolors[1]}></span>
25-
<span class="capo-color" style={bgcolors[2]}></span>
26-
<span class="capo-color" style={bgcolors[3]}></span>
27-
<span class="capo-color" style={bgcolors[4]}></span>
28-
<span class="capo-color" style={bgcolors[5]}></span>
29-
<span class="capo-color" style={bgcolors[6]}></span>
30-
<span class="capo-color" style={bgcolors[7]}></span>
31-
<span class="capo-color" style={bgcolors[8]}></span>
32-
<span class="capo-color" style={bgcolors[9]}></span>
33-
<span class="capo-color" style={bgcolors[10]}></span>
23+
{bgcolors.map(style => (
24+
<span style={style}></span>
25+
))}
3426
</div>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
import Capo256 from '../assets/capo256.png';
3+
4+
const { width=20 } = Astro.props;
5+
---
6+
7+
<style>
8+
img {
9+
display: inline !important;
10+
margin: 0;
11+
vertical-align: text-bottom;
12+
}
13+
</style>
14+
15+
<img src={Capo256.src} width={width}/>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
const DEFAULT_PALETTE = [
3+
"#9e0142",
4+
"#d53e4f",
5+
"#f46d43",
6+
"#fdae61",
7+
"#fee08b",
8+
"#e6f598",
9+
"#abdda4",
10+
"#66c2a5",
11+
"#3288bd",
12+
"#5e4fa2",
13+
"#cccccc"
14+
];
15+
16+
17+
let { weight="1", color } = Astro.props;
18+
19+
weight = Number(weight);
20+
21+
if (!color) {
22+
color = DEFAULT_PALETTE[11 - weight];
23+
}
24+
25+
const style = `color: ${color};`;
26+
const bars = new Array(weight).fill('').join('');
27+
---
28+
29+
<style>
30+
span {
31+
display: inline !important;
32+
white-space: nowrap;
33+
}
34+
</style>
35+
36+
<span style={style}>{bars}</span>
File renamed without changes.
File renamed without changes.

docs/src/content/docs/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: Get your ﹤𝚑𝚎𝚊𝚍﹥ in order
2+
title: "capo.js: get your ﹤𝚑𝚎𝚊𝚍﹥ in order"
33
description: Getting starting with capo.js
44
hero:
5-
title: Get your <code>&lt;head></code> in order
6-
tagline: Getting started with capo.js
5+
title: capo.js
6+
tagline: Get your <code>&lt;head></code> in order
77
image:
88
file: ../../assets/capo256.png
99
actions:
File renamed without changes.

0 commit comments

Comments
 (0)