質問編集履歴
4
タグの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
3
HTMLの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -139,3 +139,63 @@
|
|
139
139
|
= yield
|
140
140
|
|
141
141
|
```
|
142
|
+
|
143
|
+
```
|
144
|
+
|
145
|
+
HTML
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<body>
|
150
|
+
|
151
|
+
<div class='header'>
|
152
|
+
|
153
|
+
<div class='header__center'>
|
154
|
+
|
155
|
+
<a class="header__center__link" href="#">Management screen
|
156
|
+
|
157
|
+
</a></div>
|
158
|
+
|
159
|
+
<div class='header__right_btn'>
|
160
|
+
|
161
|
+
<div class='header__right_btn__menu_btn'>
|
162
|
+
|
163
|
+
<a class="header__right_btn__menu_btn__icon" href="#"><i class="fas fa-align-justify"></i>
|
164
|
+
|
165
|
+
</a></div>
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div class='main'>
|
172
|
+
|
173
|
+
<div class='main__tweets_head_name'>
|
174
|
+
|
175
|
+
test6
|
176
|
+
|
177
|
+
</div>
|
178
|
+
|
179
|
+
<div class='main__tweets_head_sign_out_btn'>
|
180
|
+
|
181
|
+
<a class="btn" rel="nofollow" data-method="delete" href="/users/sign_out">ログアウト</a>
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div class='main__tweets_head_new_events_btn'>
|
186
|
+
|
187
|
+
<a class="btn" href="/users/c7992877-9685-439e-8d5c-aeb317199c15/events/new">new_events
|
188
|
+
|
189
|
+
</a></div>
|
190
|
+
|
191
|
+
<div class='main__url_copy'>
|
192
|
+
|
193
|
+
<input id='input_copy' readonly='readonly' type='text' value='http://localhost:3000/users/c7992877-9685-439e-8d5c-aeb317199c15/events/new'>
|
194
|
+
|
195
|
+
<button id='btn_copy'>送信URLをコピー</button>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
</div>
|
200
|
+
|
201
|
+
```
|
2
htmlの部分とhead部分の読み込みを行っているファイルの追加です。
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,12 +56,86 @@
|
|
56
56
|
|
57
57
|
```
|
58
58
|
|
59
|
+
show.html.haml
|
59
60
|
|
60
61
|
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
.-# management_screenの画面
|
66
|
+
|
67
|
+
.header
|
68
|
+
|
69
|
+
.header__center
|
70
|
+
|
71
|
+
= link_to "#", class: "header__center__link" do
|
72
|
+
|
73
|
+
Management screen
|
74
|
+
|
75
|
+
.header__right_btn
|
76
|
+
|
77
|
+
.header__right_btn__menu_btn
|
78
|
+
|
79
|
+
= link_to "#", class: "header__right_btn__menu_btn__icon" do
|
80
|
+
|
81
|
+
= icon('fas', 'align-justify')
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
.main
|
88
|
+
|
89
|
+
.main__tweets_head_name
|
90
|
+
|
91
|
+
= @user.name
|
92
|
+
|
93
|
+
.main__tweets_head_sign_out_btn
|
94
|
+
|
95
|
+
= link_to "ログアウト", destroy_user_session_path, method: :delete, class:"btn"
|
96
|
+
|
97
|
+
.main__tweets_head_new_events_btn
|
98
|
+
|
99
|
+
= link_to new_user_event_path(@user), class: "btn" do
|
100
|
+
|
101
|
+
new_events
|
102
|
+
|
61
|
-
.main__url_copy
|
103
|
+
.main__url_copy
|
62
104
|
|
63
105
|
%input#input_copy{:readonly => "readonly", :type => "text", :value => "http://localhost:3000" + new_user_event_path(current_user)}/
|
64
106
|
|
65
107
|
%button#btn_copy 送信URLをコピー
|
66
108
|
|
67
109
|
```
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
head部分の読み込みはapplication.html.hamlで行ってます。
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
application.html.haml
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
!!!
|
122
|
+
|
123
|
+
%html
|
124
|
+
|
125
|
+
%head
|
126
|
+
|
127
|
+
%title ConditionMyApp
|
128
|
+
|
129
|
+
= csrf_meta_tags
|
130
|
+
|
131
|
+
= csp_meta_tag
|
132
|
+
|
133
|
+
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
134
|
+
|
135
|
+
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
|
136
|
+
|
137
|
+
%body
|
138
|
+
|
139
|
+
= yield
|
140
|
+
|
141
|
+
```
|
1
エラー文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,13 @@
|
|
2
2
|
|
3
3
|
初心者で申し訳ないのですが、どこが間違っているのか教えていただけるとありがたいです。
|
4
4
|
|
5
|
-
エラー
|
5
|
+
コンソールで確認するとエラーが出ていました。
|
6
|
+
|
7
|
+
```
|
8
|
+
|
9
|
+
Uncaught TypeError: Cannot read property 'addEventListener' of null
|
10
|
+
|
11
|
+
```
|
6
12
|
|
7
13
|
よろしくお願いします。
|
8
14
|
|