-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
39 lines (36 loc) · 1.38 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
<!DOCTYPE html>
<html lang="jp">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.3.1/css/foundation.min.css">
<title>VueJSを使って外部APIから非同期でデータ通信を行うAppのサンプルコード</title>
</head>
<body>
<div class="container" id="app">
<h3 class="text-center">VueNews</h3>
<section class="callout secondary">
<h5 class="text-center">Filter by Category</h5>
<form>
<div class="row">
<div class="large-6 columns">
<select v-model="section">
<option v-for="section in sections" :value="section">{{ section }}</option>
</select>
</div>
<div class="medium-6 columns">
<a @click="getPost(section)" class="button expanded">Retrieve</a>
</div>
</div>
</form>
</section>
<div v-if="loading" style="text-align: center;padding: 40px;">
<img src="http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.16.1/images/loader-large.gif" alt="loader">
</div>
<news-list :results="results"></news-list>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="config.js"></script>
<script src="app.js"></script>
</body>
</html>