-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
195 lines (178 loc) · 7.34 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html>
<head>
<title>Comatte</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="public/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="public/css/font-awesome.min.css" rel="stylesheet">
<link href="public/css/pace.css" rel="stylesheet">
<link href="public/css/endless.min.css" rel="stylesheet">
<link href="public/css/endless-skin.css" rel="stylesheet">
</head>
<body>
<div id="wrapper" class="preload" style="padding: 40px 0 ;">
<div id="app">
<div class="padding-md">
<router-view>
</router-view>
</div>
</div>
</div>
</body>
<script id="g-header" type="text/template">
<div class="main-header clearfix" style="width:100%; position: fixed;top:0; left:0; background-color:#CCCCFF;z-index:2000;">
<a v-if="path" v-link="{ path: path }" class="pull-left btn btn-link"><i class="fa fa-arrow-left"></i></a>
<h3 class="no-margin" style="text-align:center;">{{ title }}</h3>
</div>
<p style="margin-bottom:2em;" ></p>
</script>
<script id="sign_in" type="text/template">
<div class="text-center">
<h2 class="fadeInUp animation-delay8" style="font-weight:bold">
<span class="text-success">Comatte</span> <span style="color:#ccc; text-shadow:0 1px #fff"></span>
</h2>
</div>
<div class="login-widget animation-delay1">
<div class="panel panel-default">
<div class="panel-body">
<form class="form-login text-center">
<div class="form-group">
<label>あなたのニックネーム</label>
<input type="text" class="form-control input-sm bounceIn animation-delay2" v-model="name">
</div>
<a class="btn btn-success btn-sm bounceIn animation-delay5 login-link pull-right" v-on:click="sign_in()"><i class="fa fa-sign-in"></i> Sign in</a>
</form>
</div>
</div><!-- /panel -->
</div><!-- /login-widget -->
</script>
<script id="sign_up" type="text/template">
<div class="text-center">
<h2 class="fadeInUp animation-delay8" style="font-weight:bold">
<span class="text-success">Sign up Comatte</span> <span style="color:#ccc; text-shadow:0 1px #fff"></span>
</h2>
</div>
<div class="panel panel-default">
<div class="panel-body">
<form>
<div class="form-group">
<label for="selectNickname">ニックネーム</label><br>
<input type="text" class="form-control input-sm" id="nickname"placeholder="Enter your nickname">
</div>
<div class="form-group">
<label for="selectIcon">アイコン</label><br>
<select class="form-control chzn-select" v-model="selected">
<option v-for="Icon in icons" v-bind:value="Icon.value">{{Icon.name}}</option>
</select>
<input type="radio" :value="Icon.id"></input>
<p style="margin-bottom:1em;" ></p>
<img :src="selected"></img>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">性別</label>
<div class="col-lg-10">
<label class="label-radio inline">
<input type="radio" name="stack-radio" value="male">
<span class="custom-radio"></span>
男性
</label>
<label class="label-checkbox inline">
<input type="radio" name="stack-radio" value="female">
<span class="custom-radio"></span>
女性
</label>
</div>
</form>
<a class="btn btn-success btn-sm bounceIn animation-delay5 login-link pull-right" v-on:click="sign_up()"><i class="fa fa-sign-in"></i> Sign up</a>
</div>
</div>
</script>
<script id="guchis" type="text/template">
<g-header title="いままでのグチ"></g-header>
<div class="panel panel-default">
<div class="panel-body">
<form class="form-inline no-margin">
<div class="media">
<img :src=user.icon.value class="thumbnail pull-left" style="width:32px; height:32px;">
<div class="media-body">
<input type="text" class="form-control input-sm" placeholder="なにがあったの?" style="height:36px; width: 100%;" v-model="guchi_text">
</div>
</div>
<button type="submit" class="btn btn-sm btn-success pull-right" @click="guchiru()">グチる</button>
</form>
</div>
</div>
<div class="panel" v-for="guchi in guchis">
<a v-link="{ name: 'guchi', params: {guchi_id: guchi.id} }">
<div class="panel-body">
<div class="clearfix">
<span class="label label-danger pull-right"></span>
</div>
<div class="seperator"></div>
<p>{{guchi.content}}</p>
<div class="text-muted">{{guchi.created_at}}</div>
<div class="badge badge-info" style="float: right"></div>
</div>
</a>
</div>
</script>
<script id="guchi" type="text/template">
<g-header title="かまってくれた人" path="/guchis"></g-header>
<div class="panel" v-for="reply in guchi.replies">
<a v-link="{name: 'replies', params: {guchi_id: guchi.id, deai_user_id: reply.deai_user_id}}">
<div class="panel-body">
<div class="clearfix">
<img :src="reply.deai_user.icon.value" class="img-circle" style="width:32px; height: 32px; float: left" alt="User Avatar">
<span class="badge badge-info pull-right"></span>
<strong class="block">{{reply.deai_user.name}}</strong>
<small class="text-muted">{{reply.created_at}}</small>
</div>
<div class="seperator"></div>
<p>{{reply.content}}</p>
</div>
</a>
</div>
</script>
<script id="replies" type="text/template">
<div class="chat chat-inner">
<g-header :title="deai_user.name" :path="'/guchis/' + guchi_id"></g-header>
<!--<div class="chat-message">-->
<div>
<ul class="chat" style="padding: 30;">
<li class="{{reply.is_guching ? 'right' : 'left'}} clearfix" v-for="reply in replies" style="padding-left: 0;">
<div class="chat-body clearfix" style="margin: 0;">
<div>
<small class="pull-{{reply.is_guching ? 'right' : 'left'}} text-muted"><i class="fa fa-clock-o"></i>{{reply.created_at}}</small>
</div><br>
<p class="{{reply.is_guching ? 'text-success' : ''}}">{{reply.content}}</p>
</div>
</li>
</ul>
</div>
<div class="chat-box bg-white" style="position: fixed; bottom: 10px;">
<div class="input-group">
<input class="form-control border no-shadow no-rounded" placeholder="Type your message here" v-model="reply_content">
<span class="input-group-btn">
<button class="btn btn-success no-rounded" type="button" v-on:click="reply()" style="margin-right: 10px;">Send</button>
</span>
</div><!-- /input-group -->
</div>
</div>
</script>
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script src="/public/js/jquery.timeago.js"></script>
<script>
$.ajaxSetup({
method: 'POST',
contentType: 'application/json',
dataType: 'json',
xhrFields: {
withCredentials: true
}
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.24/vue.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/0.7.13/vue-router.js"></script>
<script src="public/router.js"></script>
</html>