-
Notifications
You must be signed in to change notification settings - Fork 0
/
s2text.html
162 lines (153 loc) · 5.81 KB
/
s2text.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>My Speech To Text</title>
</head>
<!--
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>
-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<body>
<div class="container">
<h1>Speech-to-Text</h1>
<!-- <div id="testapp"> {{ message }} </div> -->
<main id="app">
<router-view></router-view>
</main>
</div>
<!-- VUE template -->
<template id="product">
<div>
<h2>{{ product.title }}</h2>
<b>소요시간:</b>
<div>{{ product.elapsed }}<span class="glyphicon glyphicon-euro"></span></div>
<b>만든시간:</b>
<div>{{ product.date_created }}<span class="glyphicon glyphicon-euro"></span></div>
<b>결과: </b>
<div>{{ product.script }}</div>
<br/>
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span>
<a class="btn btn-warning" > <router-link to="/"> 돌아가기 </router-link> </a>
</div>
</template>
<template id="product-list"><div>
<div class="filters row">
<div class="input-group mb-1">
<input type="text" class="form-control" placeholder="" v-model="searchKey" id="sarch-element" required >
<div class="input-group-append">
<button class="btn btn-secondary" type="button">제목으로 찾기</button>
</div>
</div>
</div>
<table class="table table-striped table-sm">
<thead class="thead-dark">
<tr>
<th>제목</th>
<th>소요시간</th>
<th>만든시간</th>
<th>작업</th>
</tr>
</thead>
<tbody>
<tr v-for="product in filteredProducts">
<!-- tr v-for="product in products" -->
<!-- tr v-for="product in products | filterBy searchKey in 'name'" -->
<td>
<a><router-link :to="{name: 'product-edit', params: {title: product.title}}">{{ product.title }}</router-link></a>
</td>
<td>{{ product.elapsed }}</td>
<td>
{{ product.date_created }}
<span class="glyphicon glyphicon-euro" aria-hidden="true"></span>
</td>
<td>
<a class="btn btn-warning btn-xs"><router-link :to="{name: 'product-edit', params: {title: product.title}}">수정</router-link></a>
<a class="btn btn-danger btn-xs"><router-link :to="{name: 'product-delete', params: {title: product.title}}">삭제</router-link></a>
</td>
</tr>
</tbody>
</table>
<div class="actions">
<a class="btn btn-warning" >
<router-link :to="{name: 'product-add'}"> 추가하기 </router-link>
</a>
</div>
</div>
</template>
<template id="product-add">
<div>
<h2>추가 하기</h2>
<form v-on:submit="createProduct">
<div class="form-group">
<label for="add-name">title</label>
<input class="form-control" id="add-name" v-model="product.title" required/>
</div>
<button type="submit" class="btn btn-primary">생성</button>
<a class="btn btn-default"><router-link to="/">취소</router-link></a>
</form>
</div>
</template>
<template id="product-edit">
<div>
<h2></h2>
<form v-on:submit="updateProduct">
<div class="form-group">
<label for="edit-name">제목</label>
<input class="form-control" id="edit-title" v-model="product.title" required/>
</div>
<div class="form-group">
<label for="edit-price">소요시간 <span class="glyphicon glyphicon-euro"></span></label>
<input class="form-control" id="edit-elapsed" v-model="product.elapsed"/>
</div>
<div class="form-group">
<label for="edit-price">생성시간 <span class="glyphicon glyphicon-euro"></span></label>
<input class="form-control" id="edit-date_created" v-model="product.date_created"/>
</div>
<div class="form-group">
<label for="edit-description">상세</label>
<textarea class="form-control" id="edit-data" rows="15" v-model="product.script"></textarea>
</div>
<button type="submit" class="btn btn-primary">저장</button>
<a class="btn btn-default"><router-link to="/">취소</router-link></a>
</form>
</div>
</template>
<template id="product-delete">
<div>
<h2></h2>
<form v-on:submit="deleteProduct">
<div class="form-group">
<label for="edit-name">제목</label>
<input class="form-control" id="edit-title" v-model="product.title" required/>
</div>
<div class="form-group">
<label for="edit-price">소요시간 <span class="glyphicon glyphicon-euro"></span></label>
<input class="form-control" id="edit-elapsed" v-model="product.elapsed"/>
</div>
<div class="form-group">
<label for="edit-price">생성시간 <span class="glyphicon glyphicon-euro"></span></label>
<input class="form-control" id="edit-date_created" v-model="product.date_created"/>
</div>
<div class="form-group">
<label for="edit-description">상세</label>
<textarea class="form-control" id="edit-data" rows="15" v-model="product.script"></textarea>
</div>
<p>The action cannot be undone.</p>
<button type="submit" class="btn btn-danger">삭제</button>
<a class="btn btn-default"><router-link to="/">취소</router-link></a>
</form>
</div>
</template>
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue-router.js"></script>
<script src="https://npmcdn.com/axios/dist/axios.min.js"></script>
<script src="s2text-vue.js"></script>
<!--
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="testapp-vue.js"></script>
-->
</body>
</html>