Skip to content

Commit f16d0e1

Browse files
committed
remove lab 1
1 parent 353bf7f commit f16d0e1

File tree

5 files changed

+75
-20
lines changed

5 files changed

+75
-20
lines changed

src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.observablehq/cache/
2+
/drafts/

src/lab_0/index.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,72 @@
11
---
22
title: "Lab 0: Getting Started"
3+
toc: true
34
---
45

5-
Lab instructions in the [readme.md](./README.md).
6+
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 <a href="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+
<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`:
60+
```js
61+
now
62+
```
63+
64+
`width`:
65+
```js
66+
width
67+
```
68+
69+
`resize()`:
70+
```js
71+
resize((width) => `I am ${width} pixels wide.`)
72+
```

src/lab_0/instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The first step is to install all the appropriate software to get our environment
2121

2222
*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).
2323

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).
2525
- 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.
2626
- [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/).
2727
- 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]
3939

4040
To do this, click on the "fork" button on the top right of this github account.
4141

42-
<img src='assets/fork.png' width='700px'>
42+
<img src='assets/fork.png'>
4343

4444
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:
4545

46-
<img src='assets/forked.png' width='700px'>
46+
<img src='assets/forked.png'>
4747

4848
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.
4949

@@ -102,13 +102,13 @@ We use [Github Pages](https://docs.github.com/en/pages/getting-started-with-gith
102102

103103
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").
104104

105-
<img src='assets/pages.png' width='700px'>
105+
<img src='assets/pages.png'>
106106

107107
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]/`.
108108

109109
You can see all the deployments triggered from pushed in the deployments section of your repository page.
110110

111-
<img src='assets/deployments.png' width='700px'>
111+
<img src='assets/deployments.png'>
112112

113113
*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.
114114

@@ -133,7 +133,7 @@ $ npm run dev
133133

134134
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.
135135

136-
<img src='assets/local_serve.png' width='700px'>
136+
<img src='assets/local_serve.png'>
137137

138138
## 6. Push up and deploy your changes
139139

src/lab_1/index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/lab_1/instructions.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)