-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
292 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import { Image } from 'astro:assets'; | ||
import CrxOptionsLight from '../assets/crx-options-light.png'; | ||
import CrxOptionsDark from '../assets/crx-options-dark.png'; | ||
--- | ||
|
||
<picture> | ||
<source srcset={CrxOptionsLight.src} media="(prefers-color-scheme: dark)"/> | ||
<Image src={CrxOptionsDark} alt="Screenshot of the options page of the Capo extension" /> | ||
</picture> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
import Capo256 from '../assets/capo256.png'; | ||
const { width=20 } = Astro.props; | ||
--- | ||
|
||
<style> | ||
img { | ||
display: inline !important; | ||
margin: 0; | ||
vertical-align: text-bottom; | ||
} | ||
</style> | ||
|
||
<img src={Capo256.src} width={width}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
const DEFAULT_PALETTE = [ | ||
"#9e0142", | ||
"#d53e4f", | ||
"#f46d43", | ||
"#fdae61", | ||
"#fee08b", | ||
"#e6f598", | ||
"#abdda4", | ||
"#66c2a5", | ||
"#3288bd", | ||
"#5e4fa2", | ||
"#cccccc" | ||
]; | ||
let { weight="1", color } = Astro.props; | ||
weight = Number(weight); | ||
if (!color) { | ||
color = DEFAULT_PALETTE[11 - weight]; | ||
} | ||
const style = `color: ${color};`; | ||
const bars = new Array(weight).fill('█').join(''); | ||
--- | ||
|
||
<style> | ||
span { | ||
display: inline !important; | ||
white-space: nowrap; | ||
} | ||
</style> | ||
|
||
<span style={style}>{bars}</span> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Using the Capo extension | ||
description: Learn about the Capo extension for Chrome and how to use it with capo.js | ||
hero: | ||
actions: | ||
- text: Install the extension | ||
link: https://chrome.google.com/webstore/detail/capo-get-your-%EF%B9%A4%F0%9D%9A%91%F0%9D%9A%8E%F0%9D%9A%8A%F0%9D%9A%8D%EF%B9%A5/ohabpnaccigjhkkebjofhpmebofgpbeb | ||
icon: rocket | ||
variant: primary | ||
--- | ||
|
||
import CapoOptions from '../../../components/CapoOptions.astro'; | ||
import InlineCapoIcon from '../../../components/InlineCapoIcon.astro'; | ||
|
||
|
||
![Capo extension](../../../assets/capo-chrome.png) | ||
|
||
Capo is a Chrome extension that gives you one-click access to the capo.js script. Clicking the extension icon ( <InlineCapoIcon/> ) will open a color bar visualizing the `<head>` ordering, and log messages to the console, including validation warnings and detailed element info. | ||
|
||
## Installation | ||
|
||
To install the Capo extension: | ||
|
||
1. Navigate to the [Capo extension](https://chrome.google.com/webstore/detail/capo-get-your-%3Chead%3E-in-o/ohabpnaccigjhkkebjofhpmebofgpbeb) in the Chrome Web Store | ||
|
||
![The Capo extension in the Chrome Web Store](../../../assets/crx-store.png) | ||
|
||
2. Click the **Add to Chrome** button | ||
3. On any page, click the Capo icon ( <InlineCapoIcon/> ) in the browser toolbar | ||
- Open the DevTools Console to see additional logs | ||
|
||
![Capo extension](../../../assets/capo-extension.png) | ||
|
||
:::tip | ||
The extension will auto-update whenever new versions are released. | ||
::: | ||
|
||
## Configuration | ||
|
||
<CapoOptions/> | ||
|
||
The extension comes with a few default options for static evaluation, validation, and the color palette. | ||
|
||
See the [Configuration](/capo.js/user/config/#configuring-the-extension) guide for more info on accessing the options page and what each option does. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.