|
|
|
<!Doctype HTML>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta name="description" content="A vuejs playground">
|
|
|
|
<title>Vuejs Basics</title>
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Martel+Sans" rel="stylesheet">
|
|
|
|
<link rel="stylesheet" href="css/app.css">
|
|
|
|
<link rel="stylesheet" href="css/vendor/font-awesome-4.7.0/css/font-awesome.min.css">
|
|
|
|
<script type="text/javascript" src="https://unpkg.com/vue"></script>
|
|
|
|
<script type="text/javascript" src="https://unpkg.com/vue-resource@1.3.4"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header></header>
|
|
|
|
<nav></nav>
|
|
|
|
<main>
|
|
|
|
<h1>Vue JS Experiments</h1>
|
|
|
|
<div id="app">
|
|
|
|
<i class="fa fa-user-circle-o fa-2x" aria-hidden="true"></i> ${message}
|
|
|
|
</div>
|
|
|
|
<div id="app2">
|
|
|
|
<span v-bind:title="message">
|
|
|
|
Hover your mouse over this element to see that the attribute title displays as your message for app2
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div id="app3">
|
|
|
|
<p v-if="seen">This will be displayed if the seen data attribute of the Vue app evaluates to true</p>
|
|
|
|
<button v-on:click="seen = !seen">Toggle</button>
|
|
|
|
</div>
|
|
|
|
<div id="app4">
|
|
|
|
<ol>
|
|
|
|
<li v-for="todo in todos">
|
|
|
|
{{todo.text}}
|
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
<div id="app5">
|
|
|
|
<p>{{message}}</p>
|
|
|
|
<button v-on:click="reverseMessage">Reverse</button>
|
|
|
|
</div>
|
|
|
|
<div id="app6">
|
|
|
|
<p>{{message}}</p>
|
|
|
|
<input v-model="message" type="text">
|
|
|
|
</div>
|
|
|
|
<div id="app7">
|
|
|
|
<ol>
|
|
|
|
<todo-item v-for="item in groceryList" v-bind:todo="item" v-bind:key="item.id"></todo-item>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
<div id="form-wrapper">
|
|
|
|
<form action="get">
|
|
|
|
<label for="email">Email:
|
|
|
|
<input type="email" name="email" placeholder="dirp@email.com">
|
|
|
|
</label>
|
|
|
|
<input type="submit" value="Sign me up">
|
|
|
|
</form>
|
|
|
|
<legend>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<img src="http://placehold.it/320x240" alt="placeholder">
|
|
|
|
</div>
|
|
|
|
<div id="app8">
|
|
|
|
<h3><a href="https://github.com/pagekit/vue-resource">Vue-resource Example:</a></h3>
|
|
|
|
<ul>
|
|
|
|
<li v-for="user in users">{{user.name}}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<footer></footer>
|
|
|
|
<!--<script type="application/javascript" src="js/vue.js"></script>-->
|
|
|
|
<script type="application/javascript" src="js/app.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|