35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Vue Basics</title>
|
|
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet" />
|
|
<link rel="stylesheet" href="styles.css" />
|
|
<script src="https://unpkg.com/vue@next" defer></script>
|
|
<script src="app.js" defer></script>
|
|
</head>
|
|
|
|
<body>
|
|
<section id="assignment">
|
|
<!-- 1) Output your name -->
|
|
<h2>{{ person.name }}</h2>
|
|
<!-- 2) Output your age -->
|
|
<p>{{ person.age }}</p>
|
|
<!-- 3) Output your age + 5 -->
|
|
<p>{{ ageInFiveYears(person.age) }}</p>
|
|
<!-- 4) Output a random number (0 to 1) -->
|
|
<p>Favorite Number: {{ randomNumber() }}</p>
|
|
<p>Favorite Number: {{ Math.random() }}</p>
|
|
<div>
|
|
<!-- 5) Display some image you found via Google -->
|
|
<img v-bind:src="imageUrl" />
|
|
</div>
|
|
<!-- 6) Prepopulate the input field with your name via the "value" attribute -->
|
|
<input type="text" v-bind:value="person.name" />
|
|
</section>
|
|
</body>
|
|
|
|
</html>
|