From 5cd997609bd87f88f628830a8b265791ee0ad992 Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 20 Jun 2024 14:02:08 +0100 Subject: [PATCH] Add the start of a homepage --- src/index.md | 70 ++++------------------------------------------------ 1 file changed, 5 insertions(+), 65 deletions(-) diff --git a/src/index.md b/src/index.md index 09219c6..a1a908e 100644 --- a/src/index.md +++ b/src/index.md @@ -4,66 +4,16 @@ toc: false

PREreview Stats

-

Welcome to your new project! Edit src/index.md to change this page.

- Get started↗︎
-
-
${ - resize((width) => Plot.plot({ - title: "Your awesomeness over time 🚀", - subtitle: "Up and to the right!", - width, - y: {grid: true, label: "Awesomeness"}, - marks: [ - Plot.ruleY([0]), - Plot.lineY(aapl, {x: "Date", y: "Close", tip: true}) - ] - })) - }
-
${ - resize((width) => Plot.plot({ - title: "How big are penguins, anyway? 🐧", - width, - grid: true, - x: {label: "Body mass (g)"}, - y: {label: "Flipper length (mm)"}, - color: {legend: true}, - marks: [ - Plot.linearRegressionY(penguins, {x: "body_mass_g", y: "flipper_length_mm", stroke: "species"}), - Plot.dot(penguins, {x: "body_mass_g", y: "flipper_length_mm", stroke: "species", tip: true}) - ] - })) - }
-
- ---- - -## Next steps - -Here are some ideas of things you could try… +```js +const requests = FileAttachment('./data/requests.json').json() +```
- Chart your own data using Plot and FileAttachment. Make it responsive using resize. -
-
- Create a new page by adding a Markdown file (whatever.md) to the src folder. -
-
- Add a drop-down menu using Inputs.select and use it to filter the data shown in a chart. -
-
- Write a data loader that queries a local database or API, generating a data snapshot on build. -
-
- Import a recommended library from npm, such as Leaflet, GraphViz, TeX, or DuckDB. -
-
- Ask for help, or share your work or ideas, on the Observable forum. -
-
- Visit Framework on GitHub and give us a star. Or file an issue if you’ve found a bug! +

Total requests

+ ${requests.length.toLocaleString("en-US")}
@@ -92,16 +42,6 @@ Here are some ideas of things you could try… background-clip: text; } -.hero h2 { - margin: 0; - max-width: 34em; - font-size: 20px; - font-style: initial; - font-weight: 500; - line-height: 1.5; - color: var(--theme-foreground-muted); -} - @media (min-width: 640px) { .hero h1 { font-size: 90px;