Skip to content

docs: update video styles #495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"vuepress": "^1.5.4"
},
"scripts": {
"dev": "yarn serve",
"serve": "vuepress dev src",
"build": "vuepress build src"
},
Expand Down
50 changes: 50 additions & 0 deletions src/.vuepress/components/VideoLesson.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<script>
export default {
props: {
href: {
type: String,
required: true
},
title: {
type: String,
default: ''
}
}
}
</script>

<template>
<section class="video-lesson">
<a :href="href" target="_blank" rel="sponsored noopener" :title="title">
<slot></slot>
</a>
</section>
</template>

<style lang="scss">
.video-lesson {
display: flex;
align-items: center;
background-color: #e7ecf3;
padding: 1em 1.25em;
border-radius: 2px;
color: #486491;
position: relative;
margin: 24px 0;

a {
color: #486491;
position: relative;
padding-left: 16px;
}

&::before {
content: '\f144';
font-family: 'FontAwesome';
font-size: 2em;
display: inline-block;
color: #73abfe;
vertical-align: middle;
}
}
</style>
25 changes: 0 additions & 25 deletions src/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,6 @@
}
}

.scrimba,
.vueschool {
background-color: #e7ecf3;
padding: 1em 1.25em;
border-radius: 2px;
color: #486491;
position: relative;
margin: 24px 0;

a {
color: #486491;
position: relative;
padding-left :16px;
}

&::before {
content: "\f144";
font-family: 'FontAwesome';
font-size: 2em;
display: inline-block;
color: #73abfe;
vertical-align: middle;
}
}

.sidebar-group.is-sub-group > .sidebar-heading:not(.clickable) {
font-size: inherit;
cursor: pointer!important;
Expand Down
2 changes: 1 addition & 1 deletion src/guide/component-custom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For these reasons, we recommend you **always use kebab-case for event names**.

## Defining Custom Events

<div class="vueschool"><a href="https://vueschool.io/lessons/defining-custom-events-emits?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to define which events a component can emit with Vue School">Learn how to define emitted events with a free lesson on Vue School</a></div>
<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>

Emitted events can be defined on the component via the `emits` option.

Expand Down
4 changes: 2 additions & 2 deletions src/guide/composition-api-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Reaching this far in the documentation, you should already be familiar with both [the basics of Vue](introduction.md) and [creating components](component-basics.md).
:::

[Watch a free video about the Composition API on Vue Mastery](https://www.vuemastery.com/courses/vue-3-essentials/why-the-composition-api)
<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>

Creating Vue components allows us to extract repeatable parts of the interface coupled with its functionality into reusable pieces of code. This alone can get our application pretty far in terms of maintainability and flexibility. However, our collective experience has proved that this alone might not be enough, especially when your application is getting really big – think several hundreds of components. When dealing with such large applications, sharing and reusing code becomes especially important.

Expand Down Expand Up @@ -68,7 +68,7 @@ Now that we know the **why** we can get to the **how**. To start working with th

### `setup` Component Option

[Watch a free video about setup on Vue Mastery](https://www.vuemastery.com/courses/vue-3-essentials/setup-and-reactive-references)
<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>

The new `setup` component option is executed **before** the component is created, once the `props` are resolved, and serves as the entry point for composition API's.

Expand Down
2 changes: 1 addition & 1 deletion src/guide/composition-api-lifecycle-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> This guide assumes that you have already read the [Composition API Introduction](composition-api-introduction.html) and [Reactivity Fundamentals](reactivity-fundamentals.html). Read that first if you are new to Composition API.

[Watch a free video about Lifecycle Hooks on Vue Mastery](https://www.vuemastery.com/courses/vue-3-essentials/lifecycle-hooks)
<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>

You can access a component's lifecycle hook by prefixing the lifecycle hook with "on".

Expand Down
2 changes: 1 addition & 1 deletion src/guide/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Now it’s time to take a deep dive! One of Vue’s most distinct features is the unobtrusive reactivity system. Models are proxied JavaScript objects. When you modify them, the view updates. It makes state management simple and intuitive, but it’s also important to understand how it works to avoid some common gotchas. In this section, we are going to dig into some of the lower-level details of Vue’s reactivity system.

[Watch a free video about Reactivity on Vue Mastery](https://www.vuemastery.com/courses/vue-3-reactivity/vue3-reactivity)
<VideoLesson href="https://www.vuemastery.com/courses/vue-3-reactivity/vue3-reactivity" title="Learn how how reactivity works in depth with Vue Mastery">Watch a free video on Reactivity in Depth on Vue Mastery</VideoLesson>

## What is Reactivity?

Expand Down