Skip to content

Commit 21fff43

Browse files
committed
Tweak home page style
1 parent a398f5a commit 21fff43

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

docs/_quarto.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ execute:
66

77
website:
88
navbar:
9-
background: primary
9+
title: Sverto
10+
background: black
1011
search: true
1112
left:
1213
- text: "Home"
1314
file: index.qmd
1415
- text: "Example: bar chart"
1516
file: examples/barchart/index.qmd
1617
# - about.qmd
18+
19+
format:
20+
sverto-html:
21+
title-block-banner: "#e1e4e6"

docs/index.qmd

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Sverto
3+
description: "**Sverto** is an extension for [Quarto](https://quarto.org) that lets you seamlessly write and include [Svelte](https://svelte.dev) components, like charts and other visuals, in your Quarto website."
34
author: James Goldie, 360info
45
date: last-modified
56
---
@@ -8,13 +9,7 @@ date: last-modified
89
{{< include /.sverto/index.qmd >}}
910
:::
1011

11-
```{ojs}
12-
BarChart = import_svelte("examples/barchart/BarChart.svelte")
13-
```
14-
15-
**Sverto** is an extension for [Quarto](https://quarto.org) that lets you seamlessly write and include [Svelte](https://svelte.dev) components, like charts and other visuals, in your Quarto website.
16-
17-
Your Svelte components can seamlessly react to your ObservableJS code, making it quick and easy to build visuals that animate in response to [user inputs](https://observablehq.com/@observablehq/inputs?collection=@observablehq/inputs) or other changing data in your document.
12+
Your Svelte components can seamlessly react to your ObservableJS code, making it quick and easy to build bespoke visuals that animate in response to [user inputs](https://observablehq.com/@observablehq/inputs?collection=@observablehq/inputs) or other changing data in your document.
1813

1914
<!-- examples here! -->
2015

@@ -29,19 +24,21 @@ You'll need to install two things to run Sverto:
2924

3025
Install the project extension using:
3126

32-
```
27+
```sh
3328
quarto use template 360-info/sverto@firstrelease-docs
3429
```
3530

3631
Then run:
3732

38-
```
33+
```sh
3934
npm install
4035
```
4136

4237
This will add the extension itself (which includes some project scripts) to the `_extension` folder, as well as a few other files.
4338

44-
> **Note:** Sverto depends on running [project pre-render scripts](https://quarto.org/docs/projects/scripts.html#pre-and-post-render), so you can't currently use it with single documents.
39+
:::{.callout-note}
40+
Sverto depends on running [project pre-render scripts](https://quarto.org/docs/projects/scripts.html#pre-and-post-render), so you can't currently use it with single documents.
41+
:::
4542

4643
## 🎉 Use
4744

@@ -67,18 +64,20 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
6764
6865
If you want to refer to other JavaScript libraries in your Svelte component (like d3, for example), add them to the project using `npm install package1 [package2 ...]`. For example:
6966
70-
```
67+
```sh
7168
npm install d3-scale
7269
```
7370

7471
## Use pre-compiled Svelte components
7572

7673
If you'd prefer to compile your own Svelte components instead of letting this extension do it, you can skip steps 1 and 2 and simply refer to the compiled bundle with, for example, `Component = import("Component.js")` in an OJS block.
7774

78-
> **Note:** you must compile the Svelte component to an ES6 bundle, and you must enable accessors when compiling if you want to be able to update them from OJS. Refer to `_extensions/sverto/rollup.config.js` for guidance on configuring Rollup to do this.
75+
:::{.callout-note}
76+
You must compile the Svelte component to an ES6 bundle, and you must enable accessors when compiling if you want to be able to update them from OJS. Refer to [`_extensions/sverto/rollup.config.js`](https://github.com/360-info/sverto/blob/firstrelease/_extensions/sverto/rollup.config.js) for guidance on configuring Rollup to do this.
77+
```
7978
8079
## ❓ Issues
8180
8281
If you have any problems with the extension, please feel free to [create an issue](https://github.com/360-info/sverto)!
8382
84-
Special thanks to Carlos Scheidegger from [Posit](https://posit.co) for his time and guidance in designing Sverto!
83+
Special thanks to [Carlos Scheidegger](https://github.com/cscheid) from [Posit](https://posit.co) for his time and advice!

0 commit comments

Comments
 (0)