Skip to content

Commit fe34a53

Browse files
bencodezennaokie
authored andcommitted
docs: update video styles (#495)
* config: add dev command * feature: standardize video styles and markup
1 parent 0bc3660 commit fe34a53

7 files changed

+60
-26
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"vuepress": "^1.5.4"
1212
},
1313
"scripts": {
14+
"dev": "yarn serve",
1415
"serve": "vuepress dev src",
1516
"build": "vuepress build src",
1617
"test": "npm run lint",
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<script>
2+
export default {
3+
props: {
4+
href: {
5+
type: String,
6+
required: true
7+
},
8+
title: {
9+
type: String,
10+
default: ''
11+
}
12+
}
13+
}
14+
</script>
15+
16+
<template>
17+
<section class="video-lesson">
18+
<a :href="href" target="_blank" rel="sponsored noopener" :title="title">
19+
<slot></slot>
20+
</a>
21+
</section>
22+
</template>
23+
24+
<style lang="scss">
25+
.video-lesson {
26+
display: flex;
27+
align-items: center;
28+
background-color: #e7ecf3;
29+
padding: 1em 1.25em;
30+
border-radius: 2px;
31+
color: #486491;
32+
position: relative;
33+
margin: 24px 0;
34+
35+
a {
36+
color: #486491;
37+
position: relative;
38+
padding-left: 16px;
39+
}
40+
41+
&::before {
42+
content: '\f144';
43+
font-family: 'FontAwesome';
44+
font-size: 2em;
45+
display: inline-block;
46+
color: #73abfe;
47+
vertical-align: middle;
48+
}
49+
}
50+
</style>

src/.vuepress/styles/index.styl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -125,31 +125,6 @@
125125
}
126126
}
127127

128-
.scrimba,
129-
.vueschool {
130-
background-color: #e7ecf3;
131-
padding: 1em 1.25em;
132-
border-radius: 2px;
133-
color: #486491;
134-
position: relative;
135-
margin: 24px 0;
136-
137-
a {
138-
color: #486491;
139-
position: relative;
140-
padding-left :16px;
141-
}
142-
143-
&::before {
144-
content: "\f144";
145-
font-family: 'FontAwesome';
146-
font-size: 2em;
147-
display: inline-block;
148-
color: #73abfe;
149-
vertical-align: middle;
150-
}
151-
}
152-
153128
.sidebar-group.is-sub-group > .sidebar-heading:not(.clickable) {
154129
font-size: inherit;
155130
cursor: pointer!important;

src/guide/component-custom-events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ this.$emit('myEvent')
2323

2424
## カスタムイベントの定義
2525

26+
<VideoLesson href="https://vueschool.io/lessons/defining-custom-events-emits?friend=vuejs" title="Learn how to define which events a component can emit with Vue School">Watch a free video about Defining Custom Events on Vue School</VideoLesson>
27+
2628
発行されたイベントは、 `emits` オプションを介して、コンポーネントで定義することが出来ます。
2729

2830
```js

src/guide/composition-api-introduction.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
ドキュメントでここまで到達しているならば、[Vue の基本](introduction.md)[コンポーネントの作成](component-basics.md)の両方にすでに精通しているはずです。
77
:::
88

9+
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-essentials/why-the-composition-api" title="Learn how Composition API works in depth with Vue Mastery">Watch a free video about the Composition API on Vue Mastery</VideoLesson>
10+
911
Vue コンポーネントを作成するとその機能と結合されたインターフェースの繰り返し可能な部分を再利用可能なコードとして抽出することができます。これだけでも保守性と柔軟性の点でアプリケーションをかなり良くすることができます。しかし、蓄積された経験から、特にアプリケーションが非常に大規模な場合は、これだけでは不十分であることがわかっています。数百のコンポーネントがある場合を想像してみてください。そのような大規模なアプリケーションを扱う場合は、コードを共通化して再利用することが非常に重要になります。
1012

1113
このアプリには、特定のユーザーのリポジトリのリストを表示するビューがあると想像してみましょう。さらに、検索と絞り込みの機能を実装したいとします。このビューを処理するコンポーネントは次のようになります:
@@ -66,6 +68,8 @@ export default {
6668

6769
### `setup` コンポーネントオプション
6870

71+
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-essentials/setup-and-reactive-references" title="Learn how setup works with Vue Mastery">Watch a free video on setup on Vue Mastery</VideoLesson>
72+
6973
新しい `setup` コンポーネントオプションは、コンポーネントが作成される前に `props` が解決されると実行され、コンポジション API のエントリポイントとして機能します。
7074

7175
::: warning

src/guide/composition-api-lifecycle-hooks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> このページは、すでに [コンポジション API の基本](composition-api-introduction.html)[リアクティブの基礎](reactivity-fundamentals.html) を読んでいることを前提としています。 コンポジション API を初めて使用する場合は、最初にそちらをお読みください。
44
5+
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-essentials/lifecycle-hooks" title="Learn about how Lifecycle Hooks work with Vue Mastery">Watch a free video about Lifecycle Hooks on Vue Mastery</VideoLesson>
6+
57
ライフサイクルフックの前に "on" をつけることで、コンポーネントのライフサイクルフックにアクセスすることができます。
68

79
[setup()](composition-api-setup.html) 内で、ライフサイクルフックを呼び出す方法は、次の表の通りです:

src/guide/reactivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
さらに深く見ていきましょう!Vue の最大の特徴の 1 つは、控えめなリアクティブシステムです。モデルはプロキシされた JavaScript オブジェクトです。それらを変更するとビューが更新されます。これは状態管理を非常にシンプルかつ直感的にしますが、よくある問題を避けるためにその仕組みを理解することも重要です。このセクションでは、Vue のリアクティブシステムに関する低レベルの詳細のいくつかを掘り下げていきます。
44

5-
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-reactivity/vue3-reactivity" title="Learn how how reactivity works in depth with Vue Mastery">Vue Mastery のリアクティブの探求に関する無料ビデオを視聴する</VideoLesson>
5+
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-reactivity/vue3-reactivity" title="Vue Mastery のリアクティブの探求に関する無料ビデオを視聴する">Vue Mastery のリアクティブの探求に関する無料ビデオを視聴する</VideoLesson>
66

77
# リアクティブとは何か?
88

0 commit comments

Comments
 (0)