質問編集履歴
2
views/layouts/aplication.html.slimの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
# 追記
|
90
90
|
|
91
|
-
aplication.scss
|
91
|
+
**aplication.scss**
|
92
92
|
|
93
93
|
```scss
|
94
94
|
|
@@ -133,3 +133,43 @@
|
|
133
133
|
```
|
134
134
|
|
135
135
|
@import "home"は記載がないとなぜかcss自体が反映されなかったので、ここに記述しました。
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
**views/layouts/aplication.html.slim**
|
140
|
+
|
141
|
+
```slim
|
142
|
+
|
143
|
+
doctype html
|
144
|
+
|
145
|
+
html
|
146
|
+
|
147
|
+
head
|
148
|
+
|
149
|
+
title
|
150
|
+
|
151
|
+
| AppTest
|
152
|
+
|
153
|
+
= csrf_meta_tags
|
154
|
+
|
155
|
+
= csp_meta_tag
|
156
|
+
|
157
|
+
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
158
|
+
|
159
|
+
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
|
160
|
+
|
161
|
+
body
|
162
|
+
|
163
|
+
.app-title.navbar.navbar-expand-md.navbar-light.bg-light
|
164
|
+
|
165
|
+
.container
|
166
|
+
|
167
|
+
- if flash.notice.present?
|
168
|
+
|
169
|
+
.alert.alert-success= flash.notice
|
170
|
+
|
171
|
+
= yield
|
172
|
+
|
173
|
+
```
|
174
|
+
|
175
|
+
参照している教材がslimを使うことを推奨していたため、slim形式で記述しています。
|
1
aplication.scssの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -83,3 +83,53 @@
|
|
83
83
|
railsのバージョンは5.2.3です。
|
84
84
|
|
85
85
|
稚拙な質問ですが、ご教授よろしくお願いいたします。
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# 追記
|
90
|
+
|
91
|
+
aplication.scss
|
92
|
+
|
93
|
+
```scss
|
94
|
+
|
95
|
+
/*
|
96
|
+
|
97
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
98
|
+
|
99
|
+
* listed below.
|
100
|
+
|
101
|
+
*
|
102
|
+
|
103
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
104
|
+
|
105
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
106
|
+
|
107
|
+
*
|
108
|
+
|
109
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
110
|
+
|
111
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
112
|
+
|
113
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
114
|
+
|
115
|
+
* file per style scope.
|
116
|
+
|
117
|
+
*
|
118
|
+
|
119
|
+
*= require bootstrap
|
120
|
+
|
121
|
+
*= require_tree .
|
122
|
+
|
123
|
+
*= require_self
|
124
|
+
|
125
|
+
*/
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
@import "bootstrap";
|
130
|
+
|
131
|
+
@import "home";
|
132
|
+
|
133
|
+
```
|
134
|
+
|
135
|
+
@import "home"は記載がないとなぜかcss自体が反映されなかったので、ここに記述しました。
|