質問編集履歴
8
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -88,61 +88,8 @@
|
|
88
88
|
サーバーサイドやデータベースのシステムなど、ユーザーの目に見えない部分のことです。
|
89
89
|
%br バックエンドの開発で利用する言語には、JavaやJavaScript、PHP、Python、Rubyといったプログラミング言語があります。
|
90
90
|
|
91
|
-
//フロントエンド、バックエンドの説明まで
|
92
91
|
|
93
|
-
.Content
|
94
|
-
.Content__like
|
95
|
-
%h2 オススメ一覧
|
96
|
-
.Content__like__end
|
97
|
-
フロントエンド編
|
98
|
-
//swiperの実装
|
99
|
-
.Content__like__end__container.swiper-container
|
100
|
-
.Content__like__end__container__wrapper.swiper-wrapper
|
101
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
102
|
-
= link_to "https://amazon.co.jp/dp/4839956758/", class: "categorys-book" do
|
103
|
-
= image_tag "recommended/front1.jpg", class: "img"
|
104
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
105
|
-
= link_to "https://amazon.co.jp/dp/4797398892/", class: "categorys-book" do
|
106
|
-
= image_tag "recommended/front2.jpg", class: "img"
|
107
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
108
|
-
= link_to "https://amazon.co.jp/dp/4797383585", class: "categorys-book" do
|
109
|
-
= image_tag "recommended/front3.jpg", class: "img"
|
110
|
-
// pagination,buttonの色を青から白に変更
|
111
|
-
.Content__like__end__prev.swiper-button-prev.swiper-button-white
|
112
|
-
.Content__like__end__next.swiper-button-next.swiper-button-white
|
113
|
-
.Content__like__end__pagination.swiper-pagination.swiper-pagination-white
|
114
92
|
|
115
|
-
.Content__like__end
|
116
|
-
バックエンド編
|
117
|
-
//swiperの実装
|
118
|
-
.Content__like__end__container.swiper-container
|
119
|
-
.Content__like__end__container__wrapper.swiper-wrapper
|
120
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
121
|
-
= link_to "https://amazon.co.jp/dp/4297114623", class: "categorys-book" do
|
122
|
-
= image_tag "recommended/back1.jpg", class: "img"
|
123
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
124
|
-
= link_to "https://amazon.co.jp/dp/4295003867", class: "categorys-book" do
|
125
|
-
= image_tag "recommended/back2.jpg", class: "img"
|
126
|
-
.Content__like__end__container__wrapper__slide.swiper-slide
|
127
|
-
= link_to "https://amazon.co.jp/dp/B07Z63J7Z4", class: "categorys-book" do
|
128
|
-
= image_tag "recommended/back3.jpg", class: "img"
|
129
|
-
// pagination,buttonの色を青から白に変更
|
130
|
-
.Content__like__end__prev.swiper-button-prev.swiper-button-white
|
131
|
-
.Content__like__end__next.swiper-button-next.swiper-button-white
|
132
|
-
.Content__like__end__pagination.swiper-pagination.swiper-pagination-white
|
133
|
-
|
134
|
-
.Data
|
135
|
-
.Data__categorys
|
136
|
-
%h2 登録データ一覧
|
137
|
-
.Data__categorys__category
|
138
|
-
.Data__categorys__category__id
|
139
|
-
ID
|
140
|
-
.Data__categorys__category__title
|
141
|
-
Title
|
142
|
-
.Data__categorys__category__language
|
143
|
-
Language
|
144
|
-
= render partial: "card"
|
145
|
-
|
146
93
|
.Pagenation
|
147
94
|
.Pagenation__page
|
148
95
|
= paginate @cards
|
@@ -154,139 +101,16 @@
|
|
154
101
|
|
155
102
|
```
|
156
103
|
|
157
|
-
### リセットcss
|
158
104
|
|
159
|
-
```
|
160
|
-
/*
|
161
|
-
TODO will need to remove settings on HTML since we can't namespace it.
|
162
|
-
TODO with the prefix, should I group by selector or property for weight savings?
|
163
|
-
*/
|
164
|
-
html{
|
165
|
-
color:#000;
|
166
|
-
background:#FFF;
|
167
|
-
}
|
168
|
-
/*
|
169
|
-
TODO remove settings on BODY since we can't namespace it.
|
170
|
-
*/
|
171
|
-
/*
|
172
|
-
TODO test putting a class on HEAD.
|
173
|
-
- Fails on FF.
|
174
|
-
*/
|
175
|
-
body,
|
176
|
-
div,
|
177
|
-
dl,
|
178
|
-
dt,
|
179
|
-
dd,
|
180
|
-
ul,
|
181
|
-
ol,
|
182
|
-
li,
|
183
|
-
h1,
|
184
|
-
h2,
|
185
|
-
h3,
|
186
|
-
h4,
|
187
|
-
h5,
|
188
|
-
h6,
|
189
|
-
pre,
|
190
|
-
code,
|
191
|
-
form,
|
192
|
-
fieldset,
|
193
|
-
legend,
|
194
|
-
input,
|
195
|
-
textarea,
|
196
|
-
p,
|
197
|
-
blockquote,
|
198
|
-
th,
|
199
|
-
td {
|
200
|
-
margin:0;
|
201
|
-
padding:0;
|
202
|
-
}
|
203
|
-
table {
|
204
|
-
border-collapse:collapse;
|
205
|
-
border-spacing:0;
|
206
|
-
}
|
207
|
-
fieldset,
|
208
|
-
img {
|
209
|
-
border:0;
|
210
|
-
}
|
211
|
-
/*
|
212
|
-
TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
|
213
|
-
*/
|
214
|
-
address,
|
215
|
-
caption,
|
216
|
-
cite,
|
217
|
-
code,
|
218
|
-
dfn,
|
219
|
-
em,
|
220
|
-
strong,
|
221
|
-
th,
|
222
|
-
var {
|
223
|
-
font-style:normal;
|
224
|
-
font-weight:normal;
|
225
|
-
}
|
226
105
|
|
227
|
-
ol,
|
228
|
-
ul {
|
229
|
-
list-style:none;
|
230
|
-
}
|
231
|
-
|
232
|
-
caption,
|
233
|
-
th {
|
234
|
-
text-align:left;
|
235
|
-
}
|
236
|
-
h1,
|
237
|
-
h2,
|
238
|
-
h3,
|
239
|
-
h4,
|
240
|
-
h5,
|
241
|
-
h6 {
|
242
|
-
font-size:100%;
|
243
|
-
font-weight:normal;
|
244
|
-
}
|
245
|
-
q:before,
|
246
|
-
q:after {
|
247
|
-
content:'';
|
248
|
-
}
|
249
|
-
abbr,
|
250
|
-
acronym {
|
251
|
-
border:0;
|
252
|
-
font-variant:normal;
|
253
|
-
}
|
254
|
-
/* to preserve line-height and selector appearance */
|
255
|
-
sup {
|
256
|
-
vertical-align:text-top;
|
257
|
-
}
|
258
|
-
sub {
|
259
|
-
vertical-align:text-bottom;
|
260
|
-
}
|
261
|
-
input,
|
262
|
-
textarea,
|
263
|
-
select {
|
264
|
-
font-family:inherit;
|
265
|
-
font-size:inherit;
|
266
|
-
font-weight:inherit;
|
267
|
-
*font-size:100%; /*to enable resizing for IE*/
|
268
|
-
}
|
269
|
-
/*because legend doesn't inherit in IE */
|
270
|
-
legend {
|
271
|
-
color:#000;
|
272
|
-
}
|
273
|
-
```
|
274
|
-
|
275
106
|
### application.scss
|
276
107
|
```
|
277
108
|
@import "reset";
|
278
109
|
@import "font-awesome-sprockets";
|
279
110
|
@import "font-awesome";
|
280
111
|
@import "bootstrap/scss/bootstrap";
|
281
|
-
@import "page/cards/index.scss";
|
282
|
-
@import "page/cards/new.scss";
|
283
|
-
@import "page/cards/edit.scss";
|
284
|
-
@import "page/cards/search.scss";
|
285
|
-
@import "page/cards/show.scss";
|
286
|
-
@import "page/categories/show.scss";
|
287
|
-
@import "page/devise/registrations/new.scss";
|
288
|
-
@import "page/devise/sessions/new.scss";
|
289
112
|
|
113
|
+
|
290
114
|
.mw-md {
|
291
115
|
max-width: 576px;
|
292
116
|
}
|
@@ -316,5 +140,323 @@
|
|
316
140
|
### 画像の追加
|
317
141
|

|
318
142
|
|
143
|
+
### index.scss
|
144
|
+
```
|
145
|
+
.Main {
|
146
|
+
background-image: image-url("book1.jpg");
|
147
|
+
background-size: cover;
|
148
|
+
position: relative;
|
149
|
+
&__devise {
|
150
|
+
width: 20%;
|
151
|
+
color: #f2f2f2;
|
152
|
+
font-size: 20px;
|
153
|
+
padding: 20px;
|
154
|
+
a {
|
155
|
+
color: #fff; //リンクの色の変更
|
156
|
+
}
|
157
|
+
}
|
158
|
+
&__header{
|
159
|
+
display: flex;
|
160
|
+
justify-content: center;
|
161
|
+
align-items: center;
|
162
|
+
width: 100%;
|
163
|
+
font-weight: bold;
|
164
|
+
&__nav h1 {
|
165
|
+
text-align: center;
|
166
|
+
padding: 1em;
|
167
|
+
border: 9px solid rgb(255,255,255);
|
168
|
+
border-radius: 3em .7em 2em .7em/.7em 2em .7em 3em; //手書き風の枠の作成
|
169
|
+
color: #fff;
|
170
|
+
font-size: 30px;
|
171
|
+
margin-top: 10px;
|
172
|
+
font-weight: bold;
|
173
|
+
}
|
174
|
+
&__nav ul {
|
175
|
+
display: flex;
|
176
|
+
align-items: center;
|
177
|
+
justify-content: space-between;
|
178
|
+
height: 80px;
|
179
|
+
font-size: 20px;
|
180
|
+
// display: none; // 縮小した時にハンバーガーメニュの表示
|
181
|
+
}
|
182
|
+
&__nav li {
|
183
|
+
margin: 10px;
|
184
|
+
}
|
185
|
+
|
186
|
+
}
|
187
|
+
&__body {
|
188
|
+
font-size: 40px;
|
189
|
+
display: flex;
|
190
|
+
justify-content: space-between;
|
191
|
+
&__left {
|
192
|
+
margin: 40px;
|
193
|
+
width: 50%;
|
194
|
+
&__top {
|
195
|
+
color: #fff;
|
196
|
+
}
|
197
|
+
&__text {
|
198
|
+
color: #fff;
|
199
|
+
font-size: 20px;
|
200
|
+
line-height: 40px;
|
201
|
+
letter-spacing: 5px;
|
202
|
+
text-indent: 1em;
|
203
|
+
font-weight: bold;
|
204
|
+
text-decoration: underline;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
.search-top { //検索機能
|
211
|
+
position: relative;
|
212
|
+
left: 20px;
|
213
|
+
padding-left: 5px;
|
214
|
+
}
|
215
|
+
|
216
|
+
.Content {
|
217
|
+
margin: 2px;
|
218
|
+
background: image-url('book2.jpg');
|
219
|
+
background-size: cover;
|
220
|
+
animation: SlideIn 7.6s;
|
221
|
+
@keyframes SlideIn {
|
222
|
+
0% {
|
223
|
+
opacity: 0;
|
224
|
+
}
|
225
|
+
100% {
|
226
|
+
opacity: 1;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
&__like {
|
231
|
+
color:#fff;
|
232
|
+
h2 {
|
233
|
+
padding: .5em;
|
234
|
+
font-size: 32px;
|
235
|
+
&:first-letter {
|
236
|
+
margin-right: .1em;
|
237
|
+
font-size: 1.5em;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
&__end {
|
241
|
+
color:#fff;
|
242
|
+
font-size: 24px;
|
243
|
+
margin: 50px;
|
244
|
+
|
245
|
+
.swiper-container {
|
246
|
+
width: 40%; //全体の幅の設定
|
247
|
+
margin-top: 20px;
|
248
|
+
padding: 20px; //画像と矢印の幅の設定
|
249
|
+
}
|
250
|
+
|
251
|
+
.swiper-slide {
|
252
|
+
text-align: center;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
|
259
|
+
.categorys {
|
260
|
+
color: #fff;
|
261
|
+
&:hover {
|
262
|
+
background:#fff;
|
263
|
+
color: #555;
|
264
|
+
box-shadow: 0 4px 7px rgba(0,0,0,0.5);
|
265
|
+
transform: translateY(-5px);
|
266
|
+
cursor: pointer;
|
267
|
+
}
|
268
|
+
}
|
269
|
+
|
270
|
+
.img {
|
271
|
+
height: 300px;
|
272
|
+
transition-duration: 2s;
|
273
|
+
&:hover {
|
274
|
+
box-shadow: 0 4px 7px 0 rgba(0,0,0,0.5);
|
275
|
+
transform: rotate(-10deg);
|
276
|
+
cursor: pointer;
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
//データの一覧表示
|
281
|
+
.Data {
|
282
|
+
margin: 80px;
|
283
|
+
&__categorys {
|
284
|
+
margin: 20px;
|
285
|
+
h2 {
|
286
|
+
font-size: 30px;
|
287
|
+
text-align: center;
|
288
|
+
font-weight: bold;
|
289
|
+
}
|
290
|
+
&__category {
|
291
|
+
display: flex;
|
292
|
+
margin: 20px;
|
293
|
+
&__id {
|
294
|
+
color: blue;
|
295
|
+
}
|
296
|
+
&__title {
|
297
|
+
width: 70%;
|
298
|
+
color:red;
|
299
|
+
margin: 0 30px 0 30px;
|
300
|
+
}
|
301
|
+
&__language {
|
302
|
+
color: green;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
}
|
306
|
+
&__table {
|
307
|
+
margin-top: 15px;
|
308
|
+
&__list {
|
309
|
+
display: flex;
|
310
|
+
margin: 40px;
|
311
|
+
a {
|
312
|
+
text-decoration: none; //下線の消去
|
313
|
+
color: #000;
|
314
|
+
}
|
315
|
+
&__id {
|
316
|
+
width: 5%;
|
317
|
+
}
|
318
|
+
&__title {
|
319
|
+
width: 70%;
|
320
|
+
margin-right: 30px;
|
321
|
+
position: relative;
|
322
|
+
display: inline-block;
|
323
|
+
color: #1b1b1b;
|
324
|
+
text-decoration: none;
|
325
|
+
&:hover {
|
326
|
+
cursor: pointer;
|
327
|
+
text-decoration: none;
|
328
|
+
}
|
329
|
+
&:after {
|
330
|
+
position: absolute;
|
331
|
+
bottom: -8px;
|
332
|
+
left: 0;
|
333
|
+
content: '';
|
334
|
+
width: 100%;
|
335
|
+
height: 2px;
|
336
|
+
background: #333;
|
337
|
+
opacity: 0;
|
338
|
+
visibility: hidden;
|
339
|
+
transition: .3s;
|
340
|
+
}
|
341
|
+
&:hover::after {
|
342
|
+
bottom: -4px;
|
343
|
+
opacity: 1;
|
344
|
+
visibility: visible;
|
345
|
+
}
|
346
|
+
}
|
347
|
+
&__language {
|
348
|
+
width: 10%;
|
349
|
+
}
|
350
|
+
&__btn {
|
351
|
+
margin-right: 30px;
|
352
|
+
display: block;
|
353
|
+
position: relative;
|
354
|
+
text-decoration: none;
|
355
|
+
color: #1b1b1b;
|
356
|
+
background: #fff;
|
357
|
+
border: 1px solid #fff;
|
358
|
+
&:hover {
|
359
|
+
background: #f2f2f2;
|
360
|
+
cursor: pointer;
|
361
|
+
text-decoration: none;
|
362
|
+
transform: translateY(-0.3em);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
//ページネーションのデザイン
|
369
|
+
.Pagenation{
|
370
|
+
margin-left: 120px;
|
371
|
+
text-align: center;
|
372
|
+
font-size: 18px;
|
373
|
+
a {
|
374
|
+
margin: 20px;
|
375
|
+
color: #1b1b1b;
|
376
|
+
text-decoration: none;
|
377
|
+
}
|
378
|
+
}
|
379
|
+
// 新しい本の追加
|
380
|
+
.New {
|
381
|
+
margin-bottom: 30px;
|
382
|
+
text-align: center;
|
383
|
+
&__book {
|
384
|
+
box-shadow: 0 0 3px 0 rgba(0,0,0,0.25);
|
385
|
+
color: #fff;
|
386
|
+
display: inline-block;
|
387
|
+
padding: 0.6em 2em;
|
388
|
+
margin: 0 01em;
|
389
|
+
cursor: pointer;
|
390
|
+
transition: all 0.3s ease 0s;
|
391
|
+
a {
|
392
|
+
text-decoration: none;
|
393
|
+
color: #000;
|
394
|
+
}
|
395
|
+
&:hover {
|
396
|
+
box-shadow: 0 3px 6px 0 rgba(0,0,0,0.25);
|
397
|
+
transform: translateY(-0.2em);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
//プルダウンメニュー
|
403
|
+
.menu {
|
404
|
+
list-style-type: none;
|
405
|
+
margin: 0;
|
406
|
+
padding: 0;
|
407
|
+
color:#000;
|
408
|
+
|
409
|
+
li {
|
410
|
+
float: left;
|
411
|
+
position: relative;
|
412
|
+
margin: 0 0 0 9px;
|
413
|
+
padding: 3px;
|
414
|
+
width: 160px;
|
415
|
+
background: #fff;
|
416
|
+
display: block;
|
417
|
+
}
|
418
|
+
|
419
|
+
.sub {
|
420
|
+
display: none;
|
421
|
+
position: absolute;
|
422
|
+
margin-left: -6px;
|
423
|
+
padding: 0;
|
424
|
+
font-size: 16px;
|
425
|
+
|
426
|
+
li a {
|
427
|
+
padding: 5px 10px;
|
428
|
+
margin-left: -5px;
|
429
|
+
margin-right: -5px;
|
430
|
+
margin-bottom: -5px;
|
431
|
+
display: block;
|
432
|
+
color:#000;
|
433
|
+
text-decoration: none;
|
434
|
+
transition: all 0.2s ease 0s;
|
435
|
+
&:hover {
|
436
|
+
text-decoration: none;
|
437
|
+
text-decoration: underline;
|
438
|
+
transform: translateY(-2px);
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
&:nth-child(2), &:nth-child(3) {
|
448
|
+
top: 16px;
|
449
|
+
background: #fff;
|
450
|
+
-webkit-transform: rotate(45deg);
|
451
|
+
-moz-transform: rotate(45deg);
|
452
|
+
transform: rotate(45deg);
|
453
|
+
}
|
454
|
+
}
|
455
|
+
}
|
456
|
+
|
457
|
+
|
458
|
+
}
|
459
|
+
```
|
460
|
+
|
319
461
|
このようになっています。
|
320
462
|
どなたかお願いします。。。
|
7
画像の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -313,6 +313,8 @@
|
|
313
313
|
|
314
314
|
### bootstrap4.6.0導入
|
315
315
|
|
316
|
+
### 画像の追加
|
317
|
+

|
316
318
|
|
317
319
|
このようになっています。
|
318
320
|
どなたかお願いします。。。
|
6
追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -311,6 +311,8 @@
|
|
311
311
|
= yield
|
312
312
|
```
|
313
313
|
|
314
|
+
### bootstrap4.6.0導入
|
314
315
|
|
316
|
+
|
315
317
|
このようになっています。
|
316
318
|
どなたかお願いします。。。
|
5
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -272,5 +272,45 @@
|
|
272
272
|
}
|
273
273
|
```
|
274
274
|
|
275
|
+
### application.scss
|
276
|
+
```
|
277
|
+
@import "reset";
|
278
|
+
@import "font-awesome-sprockets";
|
279
|
+
@import "font-awesome";
|
280
|
+
@import "bootstrap/scss/bootstrap";
|
281
|
+
@import "page/cards/index.scss";
|
282
|
+
@import "page/cards/new.scss";
|
283
|
+
@import "page/cards/edit.scss";
|
284
|
+
@import "page/cards/search.scss";
|
285
|
+
@import "page/cards/show.scss";
|
286
|
+
@import "page/categories/show.scss";
|
287
|
+
@import "page/devise/registrations/new.scss";
|
288
|
+
@import "page/devise/sessions/new.scss";
|
289
|
+
|
290
|
+
.mw-md {
|
291
|
+
max-width: 576px;
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
.alert-notice {
|
297
|
+
@extend .alert-info;
|
298
|
+
}
|
299
|
+
|
300
|
+
.alert-alert {
|
301
|
+
@extend .alert-danger;
|
302
|
+
}
|
303
|
+
```
|
304
|
+
|
305
|
+
### application.html.haml
|
306
|
+
```
|
307
|
+
%body
|
308
|
+
//devise関連のページのみ最大の横幅を576pxとして、それ以外は別の横幅にする
|
309
|
+
//条件分岐で付与するクラスを付け替え
|
310
|
+
%div{:class => "container-fluid px-0 #{devise_controller? ? 'mw-md' : 'mw-xl'}"}
|
311
|
+
= yield
|
312
|
+
```
|
313
|
+
|
314
|
+
|
275
315
|
このようになっています。
|
276
316
|
どなたかお願いします。。。
|
4
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,9 +28,130 @@
|
|
28
28
|
}
|
29
29
|
```
|
30
30
|
|
31
|
+
### index.html.haml
|
32
|
+
|
31
33
|
```
|
34
|
+
.Main
|
35
|
+
.Main__devise
|
36
|
+
- if user_signed_in?
|
37
|
+
= link_to "ログアウト", destroy_user_session_path, method: :delete
|
38
|
+
= link_to "投稿する", new_card_path
|
39
|
+
- else
|
40
|
+
= icon("fas", "sign-in-alt")
|
41
|
+
= link_to "ログイン", new_user_session_path
|
42
|
+
= link_to "新規登録", new_user_registration_path
|
43
|
+
.Main__header
|
44
|
+
.Main__header__nav
|
45
|
+
%h1 エンジニアのための本
|
46
|
+
.hamburger
|
47
|
+
%span
|
48
|
+
%span
|
49
|
+
%span
|
50
|
+
%nav.nav-button
|
51
|
+
%ul.menu
|
52
|
+
%li
|
53
|
+
フロントエンド
|
54
|
+
%ul.sub
|
55
|
+
%li
|
56
|
+
= link_to "①HTML", card_category_path(:card_id ,1)
|
57
|
+
%li
|
58
|
+
= link_to "②CSS", card_category_path(:card_id, 2)
|
59
|
+
%li
|
60
|
+
= link_to "③JavaScript", card_category_path(:card_id, 3)
|
61
|
+
%li
|
62
|
+
バックエンド
|
63
|
+
%ul.sub
|
64
|
+
%li
|
65
|
+
= link_to "④Java", card_category_path(:card_id, 4)
|
66
|
+
%li
|
67
|
+
= link_to "⑤PHP", card_category_path(:card_id, 5)
|
68
|
+
%li
|
69
|
+
= link_to "⑥Python", card_category_path(:card_id, 6)
|
70
|
+
%li
|
71
|
+
= link_to "⑦Ruby", card_category_path(:card_id, 7)
|
72
|
+
= form_with(url: search_cards_path, local: true, method: :get, class: "search-top") do |f|
|
73
|
+
= f.text_field :keyword, placeholder: "検索", class: "search-top"
|
74
|
+
= f.submit "検索", class: "search-top"
|
75
|
+
.Main__body
|
76
|
+
.Main__body__left
|
77
|
+
.Main__body__left__top
|
78
|
+
フロントエンド
|
79
|
+
.Main__body__left__text
|
80
|
+
WebサービスやWebアプリケーションで直接ユーザーの
|
81
|
+
%br 目に触れる部分のことです。
|
82
|
+
フロントエンドの開発で利用する言語は主に、
|
83
|
+
HTMLやCSS,JavaScriptです。
|
84
|
+
.Main__body__left
|
85
|
+
.Main__body__left__top
|
86
|
+
バックエンド
|
87
|
+
.Main__body__left__text
|
88
|
+
サーバーサイドやデータベースのシステムなど、ユーザーの目に見えない部分のことです。
|
89
|
+
%br バックエンドの開発で利用する言語には、JavaやJavaScript、PHP、Python、Rubyといったプログラミング言語があります。
|
90
|
+
|
91
|
+
//フロントエンド、バックエンドの説明まで
|
92
|
+
|
93
|
+
.Content
|
94
|
+
.Content__like
|
95
|
+
%h2 オススメ一覧
|
96
|
+
.Content__like__end
|
97
|
+
フロントエンド編
|
98
|
+
//swiperの実装
|
99
|
+
.Content__like__end__container.swiper-container
|
100
|
+
.Content__like__end__container__wrapper.swiper-wrapper
|
101
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
102
|
+
= link_to "https://amazon.co.jp/dp/4839956758/", class: "categorys-book" do
|
103
|
+
= image_tag "recommended/front1.jpg", class: "img"
|
104
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
105
|
+
= link_to "https://amazon.co.jp/dp/4797398892/", class: "categorys-book" do
|
106
|
+
= image_tag "recommended/front2.jpg", class: "img"
|
107
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
108
|
+
= link_to "https://amazon.co.jp/dp/4797383585", class: "categorys-book" do
|
109
|
+
= image_tag "recommended/front3.jpg", class: "img"
|
110
|
+
// pagination,buttonの色を青から白に変更
|
111
|
+
.Content__like__end__prev.swiper-button-prev.swiper-button-white
|
112
|
+
.Content__like__end__next.swiper-button-next.swiper-button-white
|
113
|
+
.Content__like__end__pagination.swiper-pagination.swiper-pagination-white
|
114
|
+
|
115
|
+
.Content__like__end
|
116
|
+
バックエンド編
|
117
|
+
//swiperの実装
|
118
|
+
.Content__like__end__container.swiper-container
|
119
|
+
.Content__like__end__container__wrapper.swiper-wrapper
|
120
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
121
|
+
= link_to "https://amazon.co.jp/dp/4297114623", class: "categorys-book" do
|
122
|
+
= image_tag "recommended/back1.jpg", class: "img"
|
123
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
124
|
+
= link_to "https://amazon.co.jp/dp/4295003867", class: "categorys-book" do
|
125
|
+
= image_tag "recommended/back2.jpg", class: "img"
|
126
|
+
.Content__like__end__container__wrapper__slide.swiper-slide
|
127
|
+
= link_to "https://amazon.co.jp/dp/B07Z63J7Z4", class: "categorys-book" do
|
128
|
+
= image_tag "recommended/back3.jpg", class: "img"
|
129
|
+
// pagination,buttonの色を青から白に変更
|
130
|
+
.Content__like__end__prev.swiper-button-prev.swiper-button-white
|
131
|
+
.Content__like__end__next.swiper-button-next.swiper-button-white
|
132
|
+
.Content__like__end__pagination.swiper-pagination.swiper-pagination-white
|
133
|
+
|
134
|
+
.Data
|
135
|
+
.Data__categorys
|
136
|
+
%h2 登録データ一覧
|
137
|
+
.Data__categorys__category
|
138
|
+
.Data__categorys__category__id
|
139
|
+
ID
|
140
|
+
.Data__categorys__category__title
|
141
|
+
Title
|
142
|
+
.Data__categorys__category__language
|
143
|
+
Language
|
144
|
+
= render partial: "card"
|
145
|
+
|
32
146
|
.Pagenation
|
147
|
+
.Pagenation__page
|
33
|
-
|
148
|
+
= paginate @cards
|
149
|
+
|
150
|
+
.New
|
151
|
+
.New__book
|
152
|
+
= link_to "新しい本の追加", new_card_path
|
153
|
+
|
154
|
+
|
34
155
|
```
|
35
156
|
|
36
157
|
### リセットcss
|
3
リセットcssの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,5 +33,123 @@
|
|
33
33
|
= paginate @cards
|
34
34
|
```
|
35
35
|
|
36
|
+
### リセットcss
|
37
|
+
|
38
|
+
```
|
39
|
+
/*
|
40
|
+
TODO will need to remove settings on HTML since we can't namespace it.
|
41
|
+
TODO with the prefix, should I group by selector or property for weight savings?
|
42
|
+
*/
|
43
|
+
html{
|
44
|
+
color:#000;
|
45
|
+
background:#FFF;
|
46
|
+
}
|
47
|
+
/*
|
48
|
+
TODO remove settings on BODY since we can't namespace it.
|
49
|
+
*/
|
50
|
+
/*
|
51
|
+
TODO test putting a class on HEAD.
|
52
|
+
- Fails on FF.
|
53
|
+
*/
|
54
|
+
body,
|
55
|
+
div,
|
56
|
+
dl,
|
57
|
+
dt,
|
58
|
+
dd,
|
59
|
+
ul,
|
60
|
+
ol,
|
61
|
+
li,
|
62
|
+
h1,
|
63
|
+
h2,
|
64
|
+
h3,
|
65
|
+
h4,
|
66
|
+
h5,
|
67
|
+
h6,
|
68
|
+
pre,
|
69
|
+
code,
|
70
|
+
form,
|
71
|
+
fieldset,
|
72
|
+
legend,
|
73
|
+
input,
|
74
|
+
textarea,
|
75
|
+
p,
|
76
|
+
blockquote,
|
77
|
+
th,
|
78
|
+
td {
|
79
|
+
margin:0;
|
80
|
+
padding:0;
|
81
|
+
}
|
82
|
+
table {
|
83
|
+
border-collapse:collapse;
|
84
|
+
border-spacing:0;
|
85
|
+
}
|
86
|
+
fieldset,
|
87
|
+
img {
|
88
|
+
border:0;
|
89
|
+
}
|
90
|
+
/*
|
91
|
+
TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
|
92
|
+
*/
|
93
|
+
address,
|
94
|
+
caption,
|
95
|
+
cite,
|
96
|
+
code,
|
97
|
+
dfn,
|
98
|
+
em,
|
99
|
+
strong,
|
100
|
+
th,
|
101
|
+
var {
|
102
|
+
font-style:normal;
|
103
|
+
font-weight:normal;
|
104
|
+
}
|
105
|
+
|
106
|
+
ol,
|
107
|
+
ul {
|
108
|
+
list-style:none;
|
109
|
+
}
|
110
|
+
|
111
|
+
caption,
|
112
|
+
th {
|
113
|
+
text-align:left;
|
114
|
+
}
|
115
|
+
h1,
|
116
|
+
h2,
|
117
|
+
h3,
|
118
|
+
h4,
|
119
|
+
h5,
|
120
|
+
h6 {
|
121
|
+
font-size:100%;
|
122
|
+
font-weight:normal;
|
123
|
+
}
|
124
|
+
q:before,
|
125
|
+
q:after {
|
126
|
+
content:'';
|
127
|
+
}
|
128
|
+
abbr,
|
129
|
+
acronym {
|
130
|
+
border:0;
|
131
|
+
font-variant:normal;
|
132
|
+
}
|
133
|
+
/* to preserve line-height and selector appearance */
|
134
|
+
sup {
|
135
|
+
vertical-align:text-top;
|
136
|
+
}
|
137
|
+
sub {
|
138
|
+
vertical-align:text-bottom;
|
139
|
+
}
|
140
|
+
input,
|
141
|
+
textarea,
|
142
|
+
select {
|
143
|
+
font-family:inherit;
|
144
|
+
font-size:inherit;
|
145
|
+
font-weight:inherit;
|
146
|
+
*font-size:100%; /*to enable resizing for IE*/
|
147
|
+
}
|
148
|
+
/*because legend doesn't inherit in IE */
|
149
|
+
legend {
|
150
|
+
color:#000;
|
151
|
+
}
|
152
|
+
```
|
153
|
+
|
36
154
|
このようになっています。
|
37
155
|
どなたかお願いします。。。
|
2
文法の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
display: flexが適用されてしまう
|
1
|
+
検証を見てみるとコードにないdisplay: flexが適用されてしまう
|
body
CHANGED
File without changes
|
1
エラーの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-

|
1
|
+

|
2
2
|
|
3
|
+
## 解決したいこと
|
4
|
+
|
5
|
+
ページネーションを中央に当てたい
|
6
|
+
text-align: centerを書いたが適用されずでした。
|
7
|
+
|
8
|
+
### 現状
|
9
|
+
|
3
10
|
検証ツールを見てみると
|
4
11
|
display: flexを記述してないのに、cssが適用されている
|
5
12
|
|