Skip to content
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

start at lesson 77 (vid 21) #9

Open
wants to merge 7 commits into
base: video/21
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"spellright.language": [
"en"
],
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext",
"html",
"javascript"
]
}
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ See the completed project here: [http://vuejs-cinema.vuejsdevelopers.com/](http:

Your site will be available at *localhost:[PORT]* where `PORT` is whatever value is set in your `.env` file.

#### Lecture branches
## Sponsors

<a href="https://vueschool.io" target="_blank"><img src="https://vueschool.io/img/logo/vueschool_logo_multicolor.svg" height="40" alt="Vue School"/></a>

[Support Vue.js Developers](https://www.patreon.com/anthonygore?utm-source=github-vjd&utm-medium=link&utm_campaign=sponsors) to get your logo here.

## Lecture branches

Each branch of of the repo shows the state of the code at the end of any particular video e.g. `video/08` shows the state at the end of video 8.

Expand Down Expand Up @@ -105,4 +111,4 @@ If you're doing the *Vue.js Essentials - 3 Course Bundle* course on Udemy, you'l
| 115 | video/59 |
| 117 | video/61 |
| 118 | video/62 |
| 119 | video/63 |
| 119 | video/63 |
23 changes: 16 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand All @@ -12,13 +13,21 @@
}
</style>
</head>

<body>
<div id="app">
<div id="title">
<img src="/public/logo.png">
<h1>Vue.js Cinema</h1>
<div id="app">
<div id="title">
<img src="/public/logo.png">
<h1>Vue.js Cinema</h1>
</div>
<div id="overview">
<div class="main">
<movie-list></movie-list>
<movie-filter></movie-filter>
</div>
</div>
</div>
</div>
<script src="/dist/build.js"></script>
<script src="/dist/build.js"></script>
</body>
</html>

</html>
41 changes: 30 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 63 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import Vue from 'vue';
import './style.scss';
import genres from './util/genres'

new Vue({
el: '#app',
components: {
'movie-list': {
template: `<div id="movie-list">
<div class="movie" v-for="movie in movies">{{movie.title}}</div>
</div>`,
data() {
return {
movies: [
{ title: 'Pulp Fiction' },
{ title: 'Home Alone' },
{ title: 'Austin Powers' },
]
}
},
},
'movie-filter': {
data() {
return {
genres
}
},
template: `<div id="movie-filter">
<h2>Filter results</h2>
<div class="filter-group">
<check-filter v-for="genre in genres" :title="genre" v-on:check-filter="checkFilter"></check-filter>
</div>
</div>`,
methods: {
checkFilter() {
console.log('CheckFilter')
}
},
components: {
'check-filter': {
data() {
return {
checked: false
}
},
props: [
'title'
],
template: `<div :class="{'check-filter': true, active: checked}" @click="checkFilter">
<span class="checkbox"></span>
<span class="check-filter-title">{{title}}</span>
</div>`,
methods: {
checkFilter() {
this.checked = !this.checked
this.$emit('check-filter');
}
}
}
}
}
},
})
3 changes: 2 additions & 1 deletion src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ body, html {

h1 {
display: inline-block;
font-family: 'Orbitron', sans-serif;
// font-family: 'Orbitron', sans-serif;
font-family: sans-serif;
margin: 0;
padding: 0 0 0 1rem;
font-size: 2.5rem;
Expand Down