You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page is where you can iterate. Follow the lab instructions in the [readme.md](./README.md).
7
+
8
+
9
+
## Writing HTML in Markdown
10
+
<!-- simple divs -->
11
+
<div>
12
+
<p>You can write pure HTML in <ahref="https://commonmark.org/">markdown files!</a></p>
13
+
</div>
14
+
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
+
<divclass="grid grid-cols-4">
23
+
<divclass="card"><h1>A</h1></div>
24
+
<divclass="card"><h1>B</h1></div>
25
+
<divclass="card"><h1>C</h1></div>
26
+
<divclass="card"><h1>D</h1></div>
27
+
</div>
28
+
29
+
<!-- leveraging pre-made cards -->
30
+
<divclass="grid grid-cols-4">
31
+
<divclass="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
+
constaddition= (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.
Copy file name to clipboardExpand all lines: src/lab_0/instructions.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ The first step is to install all the appropriate software to get our environment
21
21
22
22
*Note*: while VS code is an application, the other softwares are installed via your terminal or bash. If this is your first time working with your terminal, check out [working with your terminal](#working-with-your-terminal).
23
23
24
-
-[VS Code](https://code.visualstudio.com/) - free code editor and IDE (our recommendation). This is an application to view files and code. This application also includes many handy extensions that can help us with [version control](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) and [file serving](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer).
24
+
-[VS Code](https://code.visualstudio.com/) - free code editor and IDE (our recommendation). This is an application to view files and code. This application also includes many handy extensions that can help us with [version control](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support).
25
25
- You may also use another code editor that has AI integration, like [cursor](https://cursor.com/), but these ai integrations typically require payment after reacting an interaction limit.
26
26
-[Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) version control software. You will also need an account on [Github.com](https://github.com/).
27
27
- if you have a mac, and you have installed Xcode, you _already have git_. You can test this by opening your terminal and running `git --version`.
@@ -39,11 +39,11 @@ You can read more about `forking`, `syncing`, and the overall github flow [here]
39
39
40
40
To do this, click on the "fork" button on the top right of this github account.
41
41
42
-
<imgsrc='assets/fork.png'width='700px'>
42
+
<imgsrc='assets/fork.png'>
43
43
44
44
This creates a clone of our class repository in your own github account. After the fork, you can see this worked by confirming your github username appears before the repository name:
45
45
46
-
<imgsrc='assets/forked.png'width='700px'>
46
+
<imgsrc='assets/forked.png'>
47
47
48
48
This repository is _your_ personal copy of the existing repository. This will be where you do all your lab work, and will include the deployed links that you will submit when turning in your assignments.
49
49
@@ -102,13 +102,13 @@ We use [Github Pages](https://docs.github.com/en/pages/getting-started-with-gith
102
102
103
103
To [set up your github pages site](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site#creating-your-site), you can go to your repository's `Settings` tab and then scroll down to `Pages` section. Select `Github Actions` as source ("Deploy from a branch").
104
104
105
-
<imgsrc='assets/pages.png'width='700px'>
105
+
<imgsrc='assets/pages.png'>
106
106
107
107
The workflow code is already included in the main class repository. When you push your changes up to github, then your site will automatically be redeployed and be avallable at `https://[YOUR_USERNAME].github.io/[YOUR_REPOSITORY_NAME]/`.
108
108
109
109
You can see all the deployments triggered from pushed in the deployments section of your repository page.
110
110
111
-
<imgsrc='assets/deployments.png'width='700px'>
111
+
<imgsrc='assets/deployments.png'>
112
112
113
113
*NOTE*: You must navidate in the URL to a folder with an index.html, or else you will get a 404. This will take a few minutes to update with any pushed changes.
114
114
@@ -133,7 +133,7 @@ $ npm run dev
133
133
134
134
Your terminal will now begin serving the code at the listed url. This can be [`http://127.0.0.1:3000/`](http://127.0.0.1:3000/) or another port (e.g., `:3001`). The listed url in your terminal is where your code is served. Navigate to that link in your browser. You should see the code from the class repository.
0 commit comments