Skip to content

Commit

Permalink
lesson-13
Browse files Browse the repository at this point in the history
  • Loading branch information
iamshaunjp committed Sep 22, 2020
1 parent 8252a28 commit e30e48c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const app = Vue.createApp({
data() {
return {
url: 'https://www.thenetninja.co.uk',
showBooks: true,
books: [
{ title: 'name of the wind', author: 'patrick rothfuss' },
{ title: 'the way of kings', author: 'brandon sanderson' },
{ title: 'something', author: 'something' },
{ title: 'name of the wind', author: 'patrick rothfuss', img: 'assets/1.jpg' },
{ title: 'the way of kings', author: 'brandon sanderson', img: 'assets/2.jpg' },
{ title: 'the final empire', author: 'brandon sanderson', img: 'assets/3.jpg' },
],
}
},
Expand Down
Binary file added assets/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@
<h1>Hello, Vue :)</h1>

<div id="app">
<!-- attribute binding -->
<!-- <a v-bind:href="url">Best website ever!</a> -->
<a :href="url">Best website ever!</a>

<div v-if="showBooks">
<ul>
<li v-for="book in books">
<img :src="book.img" :alt="book.title">
<h3>{{ book.title }}</h3>
<p>{{ book.author }}</p>
</li>
Expand Down

0 comments on commit e30e48c

Please sign in to comment.