s2e26 colors and css

This commit is contained in:
Tyrel Souza 2018-04-13 14:55:09 -04:00
parent 12053e4e2b
commit 41c5af3862
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 17 additions and 10 deletions

12
app.js
View File

@ -1,12 +1,8 @@
var app = new Vue({
el: '#app',
data: {
link: 'https://tyrelsouza.com',
attachRed: false,
attachGreen: false,
attachBlue: true
},
methods: {
changeLink(){
this.link = "https://tyrel.bike";
}
}
})
});

View File

@ -3,11 +3,22 @@
<head>
<meta charset="utf-8">
<script src="vue.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id='app'>
<button @click="changeLink">Change to Link</button>
<a :href='link'>Link</a>
<div class="demo"
@click="attachRed = !attachRed"
:class="{red: attachRed}"
></div>
<div class="demo"
@click="attachGreen = !attachGreen"
:class="{green: attachGreen}"
></div>
<div class="demo"
@click="attachBlue = !attachBlue"
:class="{blue: attachBlue}"
></div>
</div>
<script src="app.js" charset="utf-8"></script>
</body>