-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconditional.html
93 lines (84 loc) · 3.07 KB
/
conditional.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.1/css/bulma.min.css">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Merriweather&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.1/vue.js"></script>
<style>
</style>
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="https://bulma.io">
<img src="https://upload.wikimedia.org/wikipedia/commons/9/95/Vue.js_Logo_2.svg" width="148"
height="36">
</a>
</div>
<div class="navbar-menu">
<div class="navbar-end">
<a class="navbar-item" href="/index.html">
HOME
</a>
<a class="navbar-item" href="/pokemon.html">
POKEMON
</a>
<a class="navbar-item" href="/about.html">
ABOUT
</a>
<a class="navbar-item" href="/animation.html">
ANIMATION
</a>
<a class="navbar-item" href="/conditional.html">
CONDITION
</a>
</div>
</div>
</nav>
<!-- Hero del producto -->
<section class="hero is-white is-fullheight" id="app">
<div v-show="showFrame" class="hero-body">
<p class="has-text-primary">
This would be displayed when isShow variable is true
</p>
</div>
<div class="container">
<button class="button is-dark" @click="showFrame = !showFrame">
{{ showFrame ? 'Hide' : 'Show' }}
</button>
</div>
<div v-if="isOpened" class="hero-body">
<p class="has-text-primary">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequatur, eius.
</p>
</div>
<div class="container">
<button class="button is-dark" @click="isOpened = !isOpened">
{{ isOpened ? 'Close' : 'Open' }}
</button>
</div>
</section>
<script>
let app = new Vue({
el: "#app",
data() {
return {
isOpened: false,
showFrame: false
}
},
watch: {
// whenever question changes, this function will run
isOpened(newValue, oldValue) {
console.log('Watcher triggered', newValue, oldValue)
}
},
});
</script>
</body>
</html>