-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (113 loc) · 4.66 KB
/
Copy pathindex.html
File metadata and controls
125 lines (113 loc) · 4.66 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>完璧で究極のシャキシャキ</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.3/css/all.css">
<link rel="stylesheet" href="./main.css">
<link href="https://fonts.googleapis.com/earlyaccess/hannari.css" rel="stylesheet">
</head>
<body>
<div id="app">
<h1 class="fuwafuwa">
<img src="vege2.png" alt=""></h1>
<h1 class="title"></h1>
<a class="pagetop" href="#button"><div class="pagetop__arrow"></div></a>
<a class="listtop" href="#list"><div class="listtop__arrow"></div></a>
<a name="button"></a>
<br>
<h2 class="text">
新しい品目の追加
<div class="tooltip">
<i class="fas fa-question-circle tooltip-icon fa-lg fa-spin"></i>
<span class="tooltiptext">買った食材のボタンを追加していきましょう<span class="arrow"></span></span>
</div>
</h2>
<form class="text" v-on:submit.prevent="addButton" id="list_top">
食材名 <input type="text" ref="buttonName">
消費期限日数 <select ref="buttonDate" >
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
</select>
<button type="submit" class="btn btn--blue">ボタン追加</button>
</form>
<div class="square_contents">
<div v-for="button in buttons"><button type="submit" v-on:click="addItem(button.name, button.date)" class="addbutton" >{{ button.name }}</button></div>
<div><button class="b" type="submit" v-on:click="addItem('キャベツ', 14)">キャベツ</button></div>
<div><button class="b" type="submit" v-on:click="addItem('ピーマン',2)">ピーマン</button></div>
<div><button class="b" type="submit" v-on:click="addItem('もやし', 3)">もやし</button></div>
<div><button class="b" type="submit" v-on:click="addItem('鶏肉', 2)">鶏肉</button></div>
<div><button class="b" type="submit" v-on:click="addItem('きゅうり',4)">きゅうり</button></div>
<div><button class="b" type="submit" v-on:click="addItem('大根', 7)">大根</button></div>
<div><button class="b" type="submit" v-on:click="addItem('トマト', 7)">トマト</button></div>
<div><button class="b" type="submit" v-on:click="addItem('ブロッコリー', 3)">ブロッコリー</button></div>
<div><button class="b" type="submit" v-on:click="addItemDemo('デモ', 1)">デモ用ボタン</button></div>
</div>
<br>
<a name="list"></a>
<br>
<!-- ★STEP11 -->
<label class="text" v-for="label in options" >
<input type="radio"
v-model="current"
v-bind:value="label.value">{{ label.label }}
</label>
<!-- ★STEP12 -->
({{ computedTodos.length }} 件を表示)
<div class="tooltip">
<i class="fas fa-question-circle tooltip-icon fa-lg fa-spin"></i>
<span class="tooltiptext">買った食材の消費期限を確認しましょう<span class="arrow"></span></span>
</div>
<!-- ★STEP4 リスト用テーブル -->
<table>
<thead v-pre>
<tr>
<!--<th class="id">ID</th>-->
<th class="comment">品目</th>
<!--<th class="date">登録日</th>-->
<th class="deadline">消費期限</th>
<th class="state">状態</th>
<th class="button">-</th>
<th class="tooltip">
</th>
</tr>
</thead>
<tbody>
<!-- ★STEP5 ToDo の要素をループ -->
<tr
v-for="item in computedTodos"
v-bind:key="item.id"
v-bind:class="{done:item.state}">
<!--<th>{{ item.id }}</th>-->
<td>{{ item.comment }}</td>
<!--<td>{{ item.date }} </td>-->
<td>{{ item.deadline }} </td>
<!-- <script type="application/javascript">doPrint(item)</script> -->
<td class="state">
<!-- ★STEP10 状態変更ボタン -->
<button id="box">
{{ labels[item.state] }}
</button>
</td>
<td class="button">
<!-- ★STEP10 削除ボタン -->
<button v-on:click="doRemove(item)">
削除
</button>
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://unpkg.com/vue@2"></script>
<script src="./main.js"></script>
</body>
</html>