-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (75 loc) · 2.67 KB
/
index.html
File metadata and controls
86 lines (75 loc) · 2.67 KB
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
<!DOCTYPE html>
<html>
<head>
<title>かだい</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<link type="text/css" rel="stylesheet" href="modal.css">
<script src="https://unpkg.com/vue"></script>
<div class="container" id="app">
<div class="row">
<h2 class="header center">Github APIでユーザーを検索する</h2>
<input v-model="user" placeholder="ユーザー名を入力">
<ul class="collection">
<li class="collection-item avatar">
<template v-if="user">
<img v-bind:src="response.avatar_url" alt="" class="circle">
<span class="title">{{response.name}} ({{response.login}})</span>
<p>{{response.bio}}<br>
{{response.location}}
<hr>
Followers: {{response.followers}}
</p>
<ul>
<li v-for="task in tasks">
<button @click="openModal(task)" @keyup.esc="closeModal()">more</button>
</li>
</ul>
</template>
</li>
</ul>
</div>
<modal></modal>
</div>
<!-- template for the modal component -->
<script type="text/x-template" id="modal-template">
<div class="container" id="app">
<transition name="modal">
<div class="modal-mask" v-if="active" @click="close()">
<div class="modal-wrapper">
<div class="modal-container">
<div class="modal-header">
<h3>{{ task.name }}</h3>
</div>
<div class="modal-body">
名前:{{task.login}}
<br>
ID:{{ task.id2 }}
<br>
URL:<a href="{{task.html_url}}" target="_blank" >{{task.html_url}}</a>
<br>
created_at:{{task.created_at}}
<br>
updated_at:{{task.updated_at}}
<!-- modal #{{ task.id }} -->
</div>
<div class="modal-footer">
<button class="modal-default-button" @click="close()">
close
</button>
</div>
</div>
</div>
</div>
</div>
</transition>
</script>
<!-- <script src="tasks.js"></script> -->
<!-- vue import -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="app.js"></script>
</body>
</html>