質問編集履歴
1
indexのviewを全て記述させて頂きました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,11 +6,156 @@
|
|
6
6
|
実際のエラー文は以下です。
|
7
7
|
関係するファイルを添付させて頂きます。
|
8
8
|
```views/tweets/index.html.erb
|
9
|
-
<
|
9
|
+
<link href="https://fonts.googleapis.com/css?family=DM+Sans:400,500,700&display=swap" rel="stylesheet">
|
10
|
+
<div class="app-wrapper">
|
11
|
+
<div class="left-area hide-on-mobile">
|
12
|
+
<div class="app-header">Aller<br>
|
13
|
+
<span class="inner-text">a</span>
|
14
|
+
<button class="close-menu">
|
15
|
+
<svg width="24" height="24" fill="none" stroke="#51a380" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="feather feather-x">
|
16
|
+
<defs />
|
17
|
+
<path d="M18 6L6 18M6 6l12 12" />
|
18
|
+
</svg>
|
19
|
+
</button>
|
20
|
+
</div>
|
21
|
+
<div class="left-area-content">
|
22
|
+
<div class="profile">
|
23
|
+
<%= image_tag '/assets/sample.jpeg' %>
|
24
|
+
<div class="profile-info">
|
25
|
+
<span class="profile-name">名前さん</span>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="page-link-list">
|
29
|
+
<a href="#" class="item-link" id="pageLink">
|
30
|
+
<svg class="link-icon" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="feather feather-home" viewBox="0 0 24 24">
|
31
|
+
<defs />
|
32
|
+
<path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z" />
|
33
|
+
<path d="M9 22V12h6v10" /></svg>
|
34
|
+
マイページ</a>
|
35
|
+
<a href="#" class="item-link" id="pageLink">
|
36
|
+
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart">
|
37
|
+
<path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 000-7.78z" />
|
38
|
+
</svg>
|
39
|
+
記録</a>
|
40
|
+
<a href="#" class="item-link" id="pageLink">
|
41
|
+
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-play">
|
42
|
+
<path d="M5 3l14 9-14 9V3z" />
|
43
|
+
</svg>
|
44
|
+
おすすめメニュー</a>
|
45
|
+
<a href="#" class="item-link" id="pageLink">
|
46
|
+
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">
|
47
|
+
<path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" />
|
48
|
+
</svg>
|
49
|
+
寄付</a>
|
50
|
+
<a href="#" class="item-link" id="pageLink">
|
51
|
+
<svg class="link-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock">
|
52
|
+
<circle cx="12" cy="12" r="10" />
|
53
|
+
<polyline points="12 6 12 12 16 14" /></svg>
|
54
|
+
History</a>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<button class="btn-invite">Invite Team</button>
|
60
|
+
</div>
|
61
|
+
<div class="right-area">
|
62
|
+
<div class="right-area-upper">
|
63
|
+
<button class="menu-button">
|
64
|
+
<svg width="24" height="24" fill="none" stroke="#51a380" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
65
|
+
<defs />
|
66
|
+
<path d="M3 12h18M3 6h18M3 18h18" />
|
67
|
+
</svg>
|
68
|
+
</button>
|
69
|
+
<div class="search-part-wrapper">
|
70
|
+
<input class="search-input" type="text" placeholder="Search tweets...">
|
71
|
+
<a class="menu-links" href="#">検索</a>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div class="action-buttons-wrapper">
|
75
|
+
<% if user_signed_in? %>
|
76
|
+
<button class="action-buttons btn-record"><%= link_to current_user.nickname, root_path, class: "user-nickname" %></button>
|
77
|
+
<button class="action-buttons btn-upload"><%= link_to 'ログアウト', destroy_user_session_path , method: :delete, class: "logout" %></button>
|
78
|
+
<% else %>
|
79
|
+
<button class="action-buttons btn-record"><%= link_to 'ログイン', new_user_session_path, class: "login" %></button>
|
80
|
+
<button class="action-buttons btn-upload"><%= link_to '新規登録', new_user_registration_path, class: "sign-up" %></button>
|
81
|
+
<% end %>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
<div class="page-right-content">
|
85
|
+
<div class="content-line content-line-hero">
|
86
|
+
<div class="line-header">
|
87
|
+
<span class="header-text">トップページ</span>
|
88
|
+
</div>
|
89
|
+
<div class="slider-wrapper owl-carousel owl-theme" id="owl-slider-1">
|
90
|
+
<div class="item hero-img-wrapper img-1">
|
91
|
+
<div class="upload-text-wrapper">
|
92
|
+
<p class="upload-text-info">Aller <span> a</span>
|
93
|
+
<button class="btn-new-1"><%= link_to "つぶやき", new_tweet_path %></button>
|
94
|
+
<button class="btn-new-2">寄付募集</button>
|
95
|
+
</p>
|
96
|
+
</div>
|
97
|
+
<%= image_tag '/assets/food',:size => '500x300'%>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<div class="content-line content-line-list">
|
102
|
+
<div class="line-header">
|
103
|
+
<span class="header-text">つぶやき</span>
|
104
|
+
</div>
|
105
|
+
<div id="owl-slider-2" class="slider-wrapper owl-carousel">
|
106
|
+
<div class="item video-box-wrapper">
|
107
|
+
<div class="img-preview">
|
10
108
|
<%= image_tag @tweets.image %>
|
11
109
|
</div>
|
12
110
|
<div class="video-description-wrapper">
|
13
111
|
<p class="video-description-header"><%= @tweets.title %></p>
|
112
|
+
<p class="video-description-subheader"><%#= "by#{tweet.user.name}" %></p>
|
113
|
+
<p class="video-description-info">いいね <span><%#= tweet.created_at %></span></p>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div class="item video-box-wrapper">
|
117
|
+
<div class="img-preview">
|
118
|
+
<img src="https://images.unsplash.com/photo-1531736275454-adc48d079ce9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2250&q=80" alt="video">
|
119
|
+
</div>
|
120
|
+
<div class="video-description-wrapper">
|
121
|
+
<p class="video-description-header">Puppet Theatre</p>
|
122
|
+
<p class="video-description-subheader">By July</p>
|
123
|
+
<p class="video-description-info">116K views <span>1 hour ago</span></p>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
<div class="content-line content-line-list">
|
129
|
+
<div class="line-header">
|
130
|
+
<span class="header-text">寄付</span>
|
131
|
+
</div>
|
132
|
+
<div id="owl-slider-3" class="slider-wrapper owl-carousel">
|
133
|
+
<div class="item video-box-wrapper">
|
134
|
+
<div class="img-preview">
|
135
|
+
<img src="https://images.unsplash.com/photo-1494252713559-f26b4bf0b174?ixlib=rb-1.2.1&auto=format&fit=crop&w=2250&q=80" alt="video">
|
136
|
+
</div>
|
137
|
+
<div class="video-description-wrapper">
|
138
|
+
<p class="video-description-header">Minimal Photography</p>
|
139
|
+
<p class="video-description-subheader">By July</p>
|
140
|
+
<p class="video-description-info">116K views <span>1 hour ago</span></p>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
<div class="item video-box-wrapper">
|
144
|
+
<div class="img-preview">
|
145
|
+
<img src="https://images.unsplash.com/photo-1524678714210-9917a6c619c2?ixlib=rb-1.2.1&auto=format&fit=crop&w=2249&q=80" alt="video">
|
146
|
+
</div>
|
147
|
+
<div class="video-description-wrapper">
|
148
|
+
<p class="video-description-header">Puppet Theatre</p>
|
149
|
+
<p class="video-description-subheader">By July</p>
|
150
|
+
<p class="video-description-info">116K views <span>1 hour ago</span></p>
|
151
|
+
</div>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
14
159
|
```
|
15
160
|
```models/tweet.rb
|
16
161
|
class Tweet < ApplicationRecord
|