質問編集履歴
2
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,13 +10,13 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
```
|
13
|
+
```HTML
|
14
14
|
|
15
15
|
<div class="timeline-post-new">
|
16
16
|
|
17
|
-
<
|
17
|
+
<form enctype="multipart/form-data" action="/posts" accept-charset="UTF-8" data-remote="true" method="post"><input name="utf8" type="hidden" value="✓"><input type="hidden" name="authenticity_token" value="b8isHN+ByFBVxfOdZZEJijxzWS60GpmlrqCg98mfuux7b33n1DwyO8ZPgPfXyDpynkmNc2oWWXFzj2VTeBpuIQ==">
|
18
18
|
|
19
|
-
<
|
19
|
+
<textarea placeholder="投稿内容" class="timeline-post-form-new" rows="3" onkeyup="ShowLength(value);" id="text" name="post[text]" style="overflow: hidden;vertical-align: middle;"></textarea>
|
20
20
|
|
21
21
|
|
22
22
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<span class="filelabel">
|
32
32
|
|
33
|
-
<
|
33
|
+
<input id="filesend" onchange="imgPreView(event)" accept="image/*" class="photo-up" type="file" name="post[image]">
|
34
34
|
|
35
35
|
<span class="material-icons post-photo">image</span>
|
36
36
|
|
@@ -48,7 +48,7 @@
|
|
48
48
|
|
49
49
|
<span class="filelabel">
|
50
50
|
|
51
|
-
<
|
51
|
+
<input id="filesend" onchange="imgPreView(event)" accept="video/*" class="video-up" type="file" name="post[video]">
|
52
52
|
|
53
53
|
<span class="material-icons post-photo">videocam</span>
|
54
54
|
|
@@ -62,25 +62,23 @@
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
<
|
65
|
+
<input type="submit" name="commit" value="投稿" class="new-post-btn" id="submit" data-disable-with="投稿">
|
66
66
|
|
67
67
|
<p id="inputlength" class="new-textlength">0/250</p>
|
68
68
|
|
69
69
|
</div>
|
70
70
|
|
71
|
-
<% if current_user.high == true %>
|
72
|
-
|
73
71
|
<div class="accbox">
|
74
72
|
|
75
73
|
<label for="label1"><span class="material-icons">arrow_drop_down</span></label>
|
76
74
|
|
77
|
-
<input type="checkbox" id="label1" class="cssacc"
|
75
|
+
<input type="checkbox" id="label1" class="cssacc">
|
78
76
|
|
79
77
|
<div class="accshow">
|
80
78
|
|
81
79
|
<div class="md-checkbox">
|
82
80
|
|
83
|
-
<
|
81
|
+
<input name="post[noreply]" type="hidden" value="0"><input autofocus="autofocus" id="noreply" type="checkbox" value="1" name="post[noreply]">
|
84
82
|
|
85
83
|
<label for="noreply" class="check-text">この投稿へのリプライを無効にする</label>
|
86
84
|
|
@@ -90,11 +88,7 @@
|
|
90
88
|
|
91
89
|
</div>
|
92
90
|
|
93
|
-
<% end %>
|
94
|
-
|
95
|
-
<% end %>
|
96
|
-
|
97
|
-
</div>
|
91
|
+
</form></div>
|
98
92
|
|
99
93
|
|
100
94
|
|
@@ -102,6 +96,60 @@
|
|
102
96
|
|
103
97
|
|
104
98
|
|
99
|
+
```CSS
|
100
|
+
|
101
|
+
.timeline-post-new {
|
102
|
+
|
103
|
+
padding: 10px;
|
104
|
+
|
105
|
+
border-bottom: 1px solid var(--border-color);
|
106
|
+
|
107
|
+
background: var(--card-color);
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
.timeline-post-form-new {
|
112
|
+
|
113
|
+
cursor: text;
|
114
|
+
|
115
|
+
background-color: var(--card-color);
|
116
|
+
|
117
|
+
border-radius: 4px 4px 0px 0px;
|
118
|
+
|
119
|
+
width: 100%;
|
120
|
+
|
121
|
+
height: 130px;
|
122
|
+
|
123
|
+
padding: 10px;
|
124
|
+
|
125
|
+
margin: 0px 0px 10px 0px;
|
126
|
+
|
127
|
+
resize: none;
|
128
|
+
|
129
|
+
border: none;
|
130
|
+
|
131
|
+
color: var(--primary-color);
|
132
|
+
|
133
|
+
font-size: 19px;
|
134
|
+
|
135
|
+
box-sizing: border-box;
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
.timeline-new-buttons {
|
140
|
+
|
141
|
+
width: 100%;
|
142
|
+
|
143
|
+
background-color: var(--card-color);
|
144
|
+
|
145
|
+
margin: -16px 0px 0px 0px;
|
146
|
+
|
147
|
+
border-radius: 0px 0px 4px 4px;
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
```
|
152
|
+
|
105
153
|
|
106
154
|
|
107
155
|
![イメージ説明](cc3eb30cf14f808552070175e12496ec.png)
|
1
コードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,4 +10,98 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
+
```ここに言語を入力
|
14
|
+
|
15
|
+
<div class="timeline-post-new">
|
16
|
+
|
17
|
+
<%= form_with model: @post do |f| %>
|
18
|
+
|
19
|
+
<%= f.text_area :text, placeholder: "投稿内容", class: "timeline-post-form-new", rows: "3",onkeyup: "ShowLength(value);",id: "text" %>
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
<div class="timeline-new-buttons">
|
24
|
+
|
25
|
+
<div id="preview" class="preview"></div>
|
26
|
+
|
27
|
+
<label class="post-label">
|
28
|
+
|
29
|
+
<div class="tooltip1">
|
30
|
+
|
31
|
+
<span class="filelabel">
|
32
|
+
|
33
|
+
<%= f.file_field :image, id: "filesend",onChange: "imgPreView(event)",accept: "image/*",class: "photo-up" %>
|
34
|
+
|
35
|
+
<span class="material-icons post-photo">image</span>
|
36
|
+
|
37
|
+
<div class="photo-pop">画像を追加</div>
|
38
|
+
|
39
|
+
</span>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
</label>
|
44
|
+
|
45
|
+
<label class="post-label">
|
46
|
+
|
47
|
+
<div class="tooltip1">
|
48
|
+
|
49
|
+
<span class="filelabel">
|
50
|
+
|
51
|
+
<%= f.file_field :video, id: "filesend",onChange: "imgPreView(event)",accept: "video/*",class: "video-up" %>
|
52
|
+
|
53
|
+
<span class="material-icons post-photo">videocam</span>
|
54
|
+
|
55
|
+
<div class="video-pop">動画を追加</div>
|
56
|
+
|
57
|
+
</span>
|
58
|
+
|
59
|
+
</div>
|
60
|
+
|
61
|
+
</label>
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
<%= f.submit :投稿, value: "投稿", class: "new-post-btn",id: "submit" %>
|
66
|
+
|
67
|
+
<p id="inputlength" class="new-textlength">0/250</p>
|
68
|
+
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<% if current_user.high == true %>
|
72
|
+
|
73
|
+
<div class="accbox">
|
74
|
+
|
75
|
+
<label for="label1"><span class="material-icons">arrow_drop_down</span></label>
|
76
|
+
|
77
|
+
<input type="checkbox" id="label1" class="cssacc" />
|
78
|
+
|
79
|
+
<div class="accshow">
|
80
|
+
|
81
|
+
<div class="md-checkbox">
|
82
|
+
|
83
|
+
<%= f.check_box :noreply, autofocus: true, id: "noreply" %>
|
84
|
+
|
85
|
+
<label for="noreply" class="check-text">この投稿へのリプライを無効にする</label>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<% end %>
|
94
|
+
|
95
|
+
<% end %>
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
13
107
|
![イメージ説明](cc3eb30cf14f808552070175e12496ec.png)
|