Skip to content

Commit 56bb517

Browse files
committed
Merge branch 'main' into unify-section-reference-format
2 parents e7d5377 + 88aa4f5 commit 56bb517

File tree

14 files changed

+30
-28
lines changed

14 files changed

+30
-28
lines changed

docs/1-trial-session/03-css/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: CSS
1212
<Term>**`style`属性**</Term>は、全ての<Term>HTML要素</Term>に対して定義されている、<Term>CSS</Term>を記述するための属性です。次の例では、`div`要素の`style`属性に<Term>CSS</Term>を指定して、文字色を赤色にしています。
1313

1414
```html title="index.html"
15-
<div style="color: red; font-size: 24px;">Hello World!</div>
15+
<div style="color: red; font-size: 24px">Hello World!</div>
1616
```
1717

1818
<ViewSource url={import.meta.url} path="_samples/first-css" />

docs/1-trial-session/04-javascript/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ document.write("Hello World!");
5656

5757
:::
5858

59-
## <Term>JavaScript</Term> の基本文法
59+
## <Term>JavaScript</Term>の基本文法
6060

6161
{/* prettier-ignore */}
6262
<Term>JavaScript</Term>のプログラムで、セミコロンで区切られた部分を<Term>文</Term>と呼びます。<Term>JavaScript</Term>の実行環境は、プログラム中に含まれる<Term>文</Term>を上から下に向けて順番に実行していきます。

docs/2-browser-apps/06-project/_samples/todo/script.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ const todoList = document.getElementById("todo-list");
22
const todoInput = document.getElementById("todo-input");
33
const addButton = document.getElementById("add-button");
44

5-
todoInput.oninput = () => (addButton.disabled = todoInput === "");
5+
todoInput.oninput = () => {
6+
addButton.disabled = todoInput.value === "";
7+
};
68

79
addButton.onclick = () => {
810
const todoItem = document.createElement("li");

docs/2-browser-apps/06-project/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ addButton.onclick = () => {
271271
addButton.disabled = true; // valueへの代入はoninputイベントを発火しない
272272
editButton.textContent = "編集";
273273
editButton.onclick = () => {
274-
const input = prompt("新しい内容を入力してください");
274+
const input = prompt("新しい内容を入力してください");
275275
// prompt関数は入力された文字列が空の場合は空文字列 ("")、キャンセルされた場合はnullを返す
276276
if (input !== "" && input !== null) todoText.textContent = input;
277277
};

docs/3-web-servers/05-server/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ node main.mjs
7171

7272
ブラウザで<a href="http://localhost:3000/" target="_blank">`http://localhost:3000/`</a>にアクセスし、次の動作を確認してください。
7373

74-
- `Hello World 日本語`が表示されること
74+
- `Hello World! 日本語`が表示されること
7575
- `日本語`をクリックするとアドレスバーが<a href="http://localhost:3000/lang/ja" target="_blank">`http://localhost:3000/lang/ja`</a>に変化し`こんにちは、世界!`が表示されること
7676

7777
<video src={expressSetupVideo} muted controls />

docs/3-web-servers/07-fetch-api-post/_samples/chat-app/main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ app.get("/messages", (request, response) => {
1111

1212
app.post("/messages", (request, response) => {
1313
messages.push(request.body.message);
14-
response.send();
14+
response.sendStatus(201); // Created(新しいメッセージを作成)
1515
});
1616

1717
app.listen(3000);

docs/3-web-servers/07-fetch-api-post/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ document.getElementById("search-button").onclick = async () => {
212212
```javascript
213213
const numbers = [1, 2, 3, 4, 5, 6, 7, 8];
214214

215-
/// [2, 4, 6, 8]
215+
// [2, 4, 6, 8]
216216
const evenNumbers = numbers.filter((number) => number % 2 === 0);
217217
```
218218

@@ -283,7 +283,7 @@ document.getElementById("search-button").onclick = async () => {
283283

284284
<video src={chatAppVideo} controls muted />
285285

286-
サーバー側では、これまでのメッセージを保存する配列`messages`を用意しましょう。`/messages`に対するGETリクエストを受けたとき、配列`messages`をJSON形式で返すようにしてください。また、`/messages`に対するPOSTリクエストを受けたとき、`Array#push`メソッドで受け取ったメッセージを配列`messages`に追加するようにしてください
286+
サーバー側では、これまでのメッセージを保存する配列`messages`を用意しましょう。`/messages`に対するGETリクエストを受けたとき、配列`messages`をJSON形式で返すようにしてください。また、`/messages`に対するPOSTリクエストを受けたとき、`Array#push`メソッドで受け取ったメッセージを配列`messages`に追加して、適切な<Term>ステータスコード</Term>を返すようにしてください
287287

288288
```javascript title="main.mjsの抜粋 (サーバーとして動作するJavaScript)"
289289
const messages = [];
@@ -294,7 +294,7 @@ app.get("/messages", (request, response) => {
294294

295295
app.post("/messages", (request, response) => {
296296
// 受け取ったメッセージをmessagesに追加
297-
response.send();
297+
response.sendStatus(201); // Created(新しいメッセージを作成)
298298
});
299299
```
300300

@@ -327,7 +327,7 @@ app.get("/messages", (request, response) => {
327327

328328
app.post("/messages", (request, response) => {
329329
messages.push(request.body.message);
330-
response.send();
330+
response.sendStatus(201); // Created(新しいメッセージを作成)
331331
});
332332

333333
app.listen(3000);

docs/3-web-servers/08-database/_samples/forum/main.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ app.get("/posts", async (request, response) => {
1313

1414
app.post("/posts", async (request, response) => {
1515
await client.post.create({ data: { message: request.body.message } });
16-
response.send();
16+
response.sendStatus(201); // Created(新しいメッセージを作成)
1717
});
1818

1919
app.listen(3000);

docs/3-web-servers/08-database/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ app.post("/posts", async (request, response) => {
371371
```javascript title="main.mjsの抜粋 (サーバーとして動作するJavaScript)"
372372
app.post("/posts", async (request, response) => {
373373
await client.post.create({ data: { message: request.body.message } });
374-
response.send();
374+
response.sendStatus(201); // Created(新しいメッセージを作成)
375375
});
376376
```
377377

docs/3-web-servers/10-git-github-init/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ VS Code標準の機能だけでも多くのことができますが、より便
3131

3232
コマンドパレット (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows) / <kbd>command</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> (macOS) ) に`Git Graph: View Git Graph (git log)`というメニューが出て見やすい
3333

34-
![GitGragh](./gitGraph.png)
34+
![Git Graph](./gitGraph.png)
3535

36-
![GitGragh拡張機能の様子](./gitGraph-view.png)
36+
![Git Graph拡張機能の様子](./gitGraph-view.png)
3737

3838
## GitHubへの登録
3939

0 commit comments

Comments
 (0)