-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetails.html
166 lines (147 loc) · 5.73 KB
/
details.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>投稿一覧</title>
<!-- load library -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css">
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<!-- load common files -->
<link rel="stylesheet" href="./common/style.css">
</head>
<div id="app">
<common-menu></common-menu>
<div class="ui main container">
<div class="ui two column stackable grid">
<div class="column"><div class="ui image"><img :src="items[0].image_url"></div></div>
<div class="column">
<div class="upper_row">
<h2>{{items[0].name}}</h2>
<h3>{{items[0].price}} 円</h3>
<p>{{items[0].description}}</p>
</div>
<div class="middle_row1">
<select class="ui selection dropdown" v-model="selected_size">
<option v-for="size in sizes" v-bind:value="size">{{size}}</option>
</select>
</div>
<div class="middle_row2">
<select class="ui selection dropdown">
<option value="Black">Black</option>
<option value="White" selected>White</option>
<option value="Red">Red</option>
</select>
</div>
<div class="middle_row3">
<div class="ui input">
<input type="number" placeholder="数量" min="1" value="1" v-model="selected_amount">
</div>
</div>
<div class="lower_row">
<button class="ui primary button" v-on:click="set_product">
買い物カゴへ
</button>
<button class="ui button" v-on:click="clear_product">
購入手続きへ
</button>
</div>
<!-- <div class="upper_row">
<h2>Title</h2>
<h3>price</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quod, ad sapiente sunt. Numquam, rerum officia error non molestiae temporibus? Excepturi sit sed dolorem doloribus repudiandae in eveniet sequi deleniti aut!</p>
</div>
<div class="middle_row1">
<select class="ui selection dropdown" v-model="selected_size">
<option v-for="size in sizes" v-bind:value="size">{{size}}</option>
</select>
</div>
<div class="middle_row2">
<select class="ui selection dropdown">
<option value="Black">Black</option>
<option value="White" selected>White</option>
<option value="Red">Red</option>
</select>
</div>
<div class="middle_row3">
<div class="ui input">
<input type="number" placeholder="数量" min="1" value="1" v-model="selected_amount">
</div>
</div>
<div class="lower_row">
<button class="ui primary button" v-on:click="set_product">
買い物カゴへ
</button>
<button class="ui button" v-on:click="clear_product">
購入手続きへ
</button>
</div> -->
</div>
</div>
</div>
<!-- <div class="ui main container">
<div class="ui segment">
<form class="ui form" v-on:submit.prevent="post">
<div class="field">
<textarea rows="3" v-model="postForm.text" required></textarea>
</div>
<div class="inline fields">
<div class="field">
<label>カテゴリー</label>
<input type="text" v-model="postForm.category">
</div>
<button class="ui button" type="submit">投稿</button>
</div>
</form>
</div>
<div class="ui segment">
<form class="ui form" v-on:submit.prevent="search">
<div class="field">
<label>ユーザー名</label>
<input type="text" placeholder="ID" v-model="query.userId" required>
</div>
<div class="field">
<label>カテゴリー名</label>
<input type="text" placeholder="Category" v-model="query.category" required>
</div>
<div class="field">
<label>投稿日時</label>
<div class="inline fields">
<div class="field">
<input type="date" v-model="query.start" required>
<label>から</label>
</div>
<div class="field">
<input type="date" v-model="query.end" required>
<label>まで</label>
</div>
</div>
</div>
<button class="ui fluid button" type="submit">検索</button>
</form>
</div>
<div class="ui segments" v-if="sortedPosts.length > 0">
<div class="ui segment" v-for="post in sortedPosts">
<div class="ui right floated red icon button" v-on:click="deletePost(post)" v-if="post.userId===userId">
<i class="trash icon"></i>
</div>
<h2 class="ui header">
<div class="content">
{{ post.userId }}
</div>
<div class="sub header">{{ post.date }}</div>
</h2>
<p>{{ post.text }}</p>
<div class="ui label" v-if="post.category">
{{ post.category }}
</div>
</div>
</div>
</div> -->
</div>
<script src="./common/config.js" charset="utf-8"></script>
<script src="./common/menu.js" charset="utf-8"></script>
<script src="./js/details.js" charset="utf-8"></script>
</body>
</html>