-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.html
94 lines (86 loc) · 4.24 KB
/
app.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
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vote.me</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<nav class="navbar navbar-dark bg-dark">
<span class="navbar-brand mb-0 h1">Vote.me</span>
</nav>
<div class="container text-center mt-3 mb-3">
<h2>Pemilihan Kepala Desa</h2>
<h3>Nglandung, Kecamatan Geger - Kabupaten Madiun</h3>
<h4>Periode 2020-2026</h4>
</div>
<div class="container">
<div id="app">
<div class="row">
<card-member v-for="member in members" :member="member" :key="member.id"></card-member>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous">
</script>
<script type="text/x-template" id="card-member-template">
<div class="col-md-3 col-xs-12 mt-2 mb-2">
<div class="card mx-auto" style="width: 18rem;">
<img :src="member.image" class="card-img-top" :alt="member.name">
<div class="card-body">
<h4 class="card-title">{{ member.name }}</h4>
<h5 class="text-center">Total Suara</h5>
<h5 class="text-center">{{ member.count }}</h5>
<p class="card-text">{{ member.description }}</p>
<div class="text-center">
<button class="btn btn-primary text-center" @click="member.count++">Vote</button>
<br>
<button class="btn btn-link" data-toggle="modal" :data-target="'#data-' + member.id">Lihat Profil</button>
<modal-member :id="member.id">
<template #name>{{ member.name }}</template>
<template #description>{{ member.description }}</template>
</modal-member>
</div>
</div>
</div>
</div>
</script>
<script type="text/x-template" id="modal-member-template">
<!-- Modal -->
<div class="modal fade" :id="'data-' + id" data-backdrop="static" tabindex="-1" role="dialog"
aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">
<slot name="name"></slot>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<slot name="description"></slot>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Tutup</button>
</div>
</div>
</div>
</div>
</script>
<script src="vue-main.js"></script>
</body>
</html>