Skip to content

Commit b29a7db

Browse files
committed
fix build
1 parent f16d0e1 commit b29a7db

File tree

4 files changed

+12
-71
lines changed

4 files changed

+12
-71
lines changed

observablehq.config.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,13 @@ export default {
77
// all pages will be listed in alphabetical order. Listing pages explicitly
88
// lets you organize them into sections and have unlisted pages.
99
pages: [
10-
// { name: "Home", path: "/index.md"},
1110
{
1211
name: "Lab 0: Getting Started",
1312
open: false,
1413
pages: [
1514
{ name: "Instructions", path: "/lab_0/instructions"},
1615
{ name: "Dashboard", path: "/lab_0/index"},
1716
]
18-
},
19-
{
20-
name: "Lab 1: Intro to Observable Framework",
21-
open: false,
22-
pages: [
23-
{ name: "Instructions", path: "/lab_1/instructions"},
24-
{ name: "Dashboard", path: "/lab_1/index"},
25-
]
2617
}
2718
],
2819

src/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.observablehq/cache/
2-
/drafts/
2+
/drafts/
3+
*/class_prep/

src/lab_0/index.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,67 +6,10 @@ toc: true
66
This page is where you can iterate. Follow the lab instructions in the [readme.md](./README.md).
77

88

9-
## Writing HTML in Markdown
10-
<!-- simple divs -->
11-
<div>
12-
<p>You can write pure HTML in <a href="https://commonmark.org/">markdown files!</a></p>
13-
</div>
149

15-
<!-- hidden context -->
16-
<details>
17-
<summary>Click me</summary>
18-
This text is not visible by default.
19-
</details>
20-
21-
<!-- css grid styles -->
22-
<div class="grid grid-cols-4">
23-
<div class="card"><h1>A</h1></div>
24-
<div class="card"><h1>B</h1></div>
25-
<div class="card"><h1>C</h1></div>
26-
<div class="card"><h1>D</h1></div>
27-
</div>
28-
29-
<!-- leveraging pre-made cards -->
30-
<div class="grid grid-cols-4">
31-
<div class="card">
32-
${resize((width) => `This card is ${width}px wide.`)}
33-
</div>
34-
</div>
35-
36-
## Writing JS in Markdown
37-
Use JavaScript to render charts, inputs, and other dynamic, interactive, and graphical content on the client. JavaScript in Markdown can be expressed either as fenced code blocks or inline expressions. You can also import JavaScript modules to share code across pages.
38-
39-
You can write javascript in js blocks...
40-
<!-- function definition -->
41-
```js
42-
const addition = (x, y) => x + y;
43-
```
44-
45-
...which won't show up in the dashboard unless referred to in its own block...
46-
<!-- function reference -->
47-
```js
48-
addition
49-
```
50-
51-
<!-- display -->
52-
...or leveraging the `display` function.
53-
```js
54-
display(addition)
55-
display(addition(2, 3))
56-
```
57-
58-
There are some helpful functions already baked into Observable Framework, like now, width, or the responsive display.
59-
`now`:
6010
```js
61-
now
11+
const count = view(Inputs.button("throw confetti!", () => { return count + 1 }))
6212
```
6313

64-
`width`:
65-
```js
66-
width
67-
```
14+
You've thrown confetti ${count} times
6815

69-
`resize()`:
70-
```js
71-
resize((width) => `I am ${width} pixels wide.`)
72-
```

src/lab_0/instructions.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ The goals for this tutorial are:
1010
The assignment requirements are as follows:
1111
1. Replicate the local environment created in class on your own computer ([Installations](#installations))
1212
2. Fork this repository, set up github pages, and initialize your upstream repository ([Github Setup](#github-setup))
13-
3. Make a change: TODO
14-
3. Submit your [deployed link](#4-set-up-your-github-pages-for-your-deployment) as a comment on the lab 0 commons post.
13+
3. Edit the `index.md` file to include:
14+
1. Markdown: A page header (`#`), some smaller header (`##` or `###`), and some text content (about anything!)
15+
2. HTML: A table, an image, and a link
16+
3. JS: a button that increments some value which is displayed in the client.
17+
4. Submit your [deployed link](#4-set-up-your-github-pages-for-your-deployment) as a comment on the lab 0 commons post.
18+
19+
Bonus:
20+
- Try adding an image
1521

1622
---
1723

0 commit comments

Comments
 (0)