-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
46 lines (46 loc) · 1.62 KB
/
index.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
<!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">
<link rel="stylesheet" href="style.css" />
<title>Random User Generator</title>
</head>
<body>
<div id="app" v-cloak>
<div class="card-group">
<div class="card-container">
<!-- you can use v-bind or : for prefix -->
<img class="round" :class="user?.gender" v-bind:src="user?.picture" :alt="`${user?.firstName} ${user?.lastName}`" />
<h3>{{ user?.firstName }} {{user?.lastName}}</h3>
<h6>{{ user?.city }}, {{ user?.country }}</h6>
<p>{{ user?.email }}</p>
<div class="skills">
<h6>Skills</h6>
<ul>
<li v-for="skill in user?.skills">{{ skill }}</li>
</ul>
</div>
</div>
<button v-on:click="getUser()" class="random-user-btn">
<box-icon class="refresh-icon" name='refresh' :animation='rotation' rotate='270' color="#fff"></box-icon>
</button>
</div>
<div class="code-container">
<pre v-html="prettyPrint(user)">
<code></code>
</pre>
<button class="copy-btn" @click="copyToClipboard(user)">
<box-icon class="copy-icon" name='copy'></box-icon>
</button>
</div>
<Alert>
<span class="alert" :active= "copyState">Copied</span>
</Alert>
</div>
<script src="https://unpkg.com/vue@3.0.11/dist/vue.global.prod.js"></script>
<script src="https://unpkg.com/boxicons@latest/dist/boxicons.js"></script>
<script src="app.js"></script>
</body>
</html>