質問編集履歴

1

最新情報

2017/04/25 06:27

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -8,13 +8,11 @@
8
8
 
9
9
 
10
10
 
11
+ (最新画像。色々コードいじりました)
12
+
11
- ![イメージ説明](f180b5a10c8153582f6b148504e4f8eb.jpeg)
13
+ ![イメージ説明](3ddd37699de643ae3a3abc4e2f73834b.jpeg)
12
-
13
-
14
-
15
-
16
-
17
- ###該当のソースコード
14
+
15
+
18
16
 
19
17
  <!-- File: /app/View/Posts/index.ctp -->
20
18
 
@@ -22,469 +20,645 @@
22
20
 
23
21
  <head>
24
22
 
25
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
23
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
26
-
24
+
25
+
26
+
27
+
28
+
27
- <link rel="stylesheet" href="stylesheet.css">
29
+ <style type="text/css">
30
+
31
+
32
+
33
+ * {
34
+
35
+
36
+
37
+ margin: 0;
38
+
39
+ padding: 0;
40
+
41
+ font-size:28px;
42
+
43
+ font-family:Verdana, "ヒラギノ明朝 Pro", sans-serif;
44
+
45
+
46
+
47
+ }
48
+
49
+
50
+
51
+ a {
52
+
53
+
54
+
55
+ text-decoration: none;
56
+
57
+
58
+
59
+ }
60
+
61
+
62
+
63
+
64
+
65
+ .annai a:link {color:#2E2E2E; } /*未訪問のリンクの色*/
66
+
67
+ .annai a:visited {color:#2E2E2E;} /*訪問済みのリンクの色*/
68
+
69
+ .annai a:hover {
70
+
71
+
72
+
73
+ color:#FA58D0;
74
+
75
+ transition: color .3s;
76
+
77
+
78
+
79
+
80
+
81
+ }
82
+
83
+
84
+
85
+ .content a:link {color:#2E2E2E; }
86
+
87
+ .content a:visited {color:#2E2E2E;}
88
+
89
+ .content a:hover {color:#2E2E2E; text-decoration: underline;}
90
+
91
+ .content a:active {color:#2E2E2E; background:#BDBDBD}
92
+
93
+
94
+
95
+
96
+
97
+ .toukoubtn a:link {color:#2E2E2E; }
98
+
99
+ .toukoubtn a:visited {color:#2E2E2E; }
100
+
101
+ .toukoubtn a:hover {
102
+
103
+
104
+
105
+ color:#0BC1CE;
106
+
107
+ transition: color .3s;
108
+
109
+
110
+
111
+ }
112
+
113
+
114
+
115
+ .toukoubtn a {
116
+
117
+
118
+
119
+ border: 1px solid #B3B3B3;
120
+
121
+ padding: 1%;
122
+
123
+
124
+
125
+ }
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ h1,th { color: #2E2E2E; }
144
+
145
+
146
+
147
+
148
+
149
+ .header1 {
150
+
151
+
152
+
153
+ height: 10%;
154
+
155
+ position: fixed;
156
+
157
+ top: 0;
158
+
159
+ left: 0;
160
+
161
+ right: 0;
162
+
163
+ background-color: #F2F2F2;
164
+
165
+ border-bottom: 1px solid #eee;
166
+
167
+ display: block;
168
+
169
+ line-height: 70px;
170
+
171
+
172
+
173
+ }
174
+
175
+
176
+
177
+ .footer1 {
178
+
179
+
180
+
181
+ height: 10%;
182
+
183
+ position: fixed;
184
+
185
+ left: 0;
186
+
187
+ right: 0;
188
+
189
+ bottom: 0;
190
+
191
+ background-color: #F2F2F2;
192
+
193
+ border-bottom: 1px solid #eee;
194
+
195
+ line-height: 50px;
196
+
197
+
198
+
199
+ }
200
+
201
+
202
+
203
+ .logo {
204
+
205
+
206
+
207
+ margin: 10px;
208
+
209
+ float: left;
210
+
211
+ }
212
+
213
+
214
+
215
+
216
+
217
+ .annai {
218
+
219
+
220
+
221
+ float: right;
222
+
223
+ }
224
+
225
+ .annai li {
226
+
227
+ float: left;
228
+
229
+ list-style: none;
230
+
231
+ }
232
+
233
+
234
+
235
+ .annai a {
236
+
237
+
238
+
239
+ padding-left: 20px;
240
+
241
+ padding-right: 20px;
242
+
243
+ padding-top: 10px;
244
+
245
+ }
246
+
247
+
248
+
249
+ /*
250
+
251
+ li {
252
+
253
+
254
+
255
+ float: left;
256
+
257
+ }
258
+
259
+ */
260
+
261
+
262
+
263
+ .maincontent {
264
+
265
+
266
+
267
+ padding-top:10%;
268
+
269
+ height:auto;
270
+
271
+ padding-bottom:10px;
272
+
273
+ text-align: center;
274
+
275
+ display: block;
276
+
277
+ }
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ .content {
286
+
287
+ margin-top:10%;
288
+
289
+ display: block;
290
+
291
+ }
292
+
293
+
294
+
295
+ .toukoubtn {
296
+
297
+
298
+
299
+ margin: 2%;
300
+
301
+
302
+
303
+ }
304
+
305
+
306
+
307
+
308
+
309
+ .bangou {
310
+
311
+
312
+
313
+ display:none;
314
+
315
+
316
+
317
+ }
318
+
319
+
320
+
321
+ .title {
322
+
323
+ font-weight: lighter;
324
+
325
+ font-size:90%;
326
+
327
+ background-color:#E6E6E6;
328
+
329
+
330
+
331
+ }
332
+
333
+
334
+
335
+ .hensyuu {
336
+
337
+
338
+
339
+ font-weight: lighter;
340
+
341
+ font-size:90%;
342
+
343
+ background-color:#E6E6E6;
344
+
345
+ }
346
+
347
+
348
+
349
+ .nitiji {
350
+
351
+
352
+
353
+ font-weight: lighter;
354
+
355
+ font-size:90%;
356
+
357
+ background-color:#E6E6E6;
358
+
359
+ }
360
+
361
+
362
+
363
+ table {
364
+
365
+
366
+
367
+ width:100%;
368
+
369
+
370
+
371
+ }
372
+
373
+
374
+
375
+ .time {
376
+
377
+ font-size:50%;
378
+
379
+
380
+
381
+ }
382
+
383
+
384
+
385
+ table {
386
+
387
+
388
+
389
+ text-align: center;
390
+
391
+
392
+
393
+ }
394
+
395
+
396
+
397
+
398
+
399
+ tr,td {
400
+
401
+
402
+
403
+ text-align: center;
404
+
405
+
406
+
407
+ }
408
+
409
+
410
+
411
+ .twitterbtn {
412
+
413
+
414
+
415
+ margin: 2%;
416
+
417
+
418
+
419
+ }
420
+
421
+
422
+
423
+ .omoi {
424
+
425
+
426
+
427
+ font-size: 60%;
428
+
429
+
430
+
431
+
432
+
433
+ }
434
+
435
+
436
+
437
+ .small {
438
+
439
+
440
+
441
+ font-size: 70%;
442
+
443
+ }
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+ </style>
458
+
459
+
460
+
461
+ </head>
462
+
463
+
464
+
465
+ <body>
466
+
467
+
468
+
469
+
470
+
471
+ <header class="header1">
472
+
473
+ <div class="header01">
474
+
475
+ <div class="headerL">
476
+
477
+ <div class="logo">Hatena Blog <span class="omoi">―思いは言葉に。</span></div>
478
+
479
+ </div>
480
+
481
+
482
+
483
+ <div class="headerR">
484
+
485
+ <ul class="annai">
486
+
487
+ <li>
488
+
489
+ <a href="#">ログイン</a>
490
+
491
+ </li>
492
+
493
+ <li>
494
+
495
+ <a href="#">会員登録</a>
496
+
497
+ </li>
498
+
499
+ </ul>
500
+
501
+ </div>
502
+
503
+ </div>
504
+
505
+
506
+
507
+ </header>
28
508
 
29
509
 
30
510
 
31
- <style type="text/css">
511
+ <div class="maincontent">
32
512
 
33
513
 
34
514
 
35
- * {
36
-
37
- margin: 0;
38
-
39
- padding: 0;
40
-
41
- font-size:28px;
42
-
43
- }
44
-
45
515
 
46
516
 
47
- body {
48
-
49
- font-family:Verdana, "MS Pゴシック", sans-serif;
50
-
51
-
52
-
53
- }
517
+
518
+
519
+ <h1>僕が考える最強のはてなブログ</h1>
520
+
521
+
522
+
523
+ <p class="toukoubtn"><?php echo $this->Html->link('投稿する', array('action' => 'add')); ?></p>
524
+
525
+
526
+
527
+
528
+
529
+ <div class="content">
530
+
531
+ <table>
532
+
533
+ <tr>
534
+
535
+ <th class="bangou">記事番号</th>
536
+
537
+ <th class="title">タイトル</th>
538
+
539
+ <th class="hensyuu">削除・編集</th>
540
+
541
+ <th class="nitiji">投稿日時</th>
542
+
543
+ </tr>
544
+
545
+
546
+
547
+ <div class="nakami">
548
+
549
+ <!-- ここで $posts 配列をループして、投稿情報を表示 -->
550
+
551
+
552
+
553
+ <?php foreach ($posts as $post): ?>
554
+
555
+ <tr>
556
+
557
+ <td class="bangou"><?php echo $post['Post']['id']; ?></td>
558
+
559
+ <td>
560
+
561
+ <?php
562
+
563
+ echo $this->Html->link(
564
+
565
+ $post['Post']['title'],
566
+
567
+ array('action' => 'view', $post['Post']['id'])
568
+
569
+ );
570
+
571
+ ?>
572
+
573
+ </td>
574
+
575
+
576
+
577
+ <td>
578
+
579
+
580
+
581
+ <?php
582
+
583
+ echo $this->Form->postLink(
584
+
585
+ '<span class="small">削除</span>',
586
+
587
+ array('action' => 'delete', $post['Post']['id']),
588
+
589
+ array('confirm' => 'Are you sure?')
590
+
591
+ );
592
+
593
+ ?>
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+ <?php
602
+
603
+ echo $this->Html->link(
604
+
605
+ '<span class="small">編集</span>', array('action' => 'edit', $post['Post']['id'])
606
+
607
+ );
608
+
609
+ ?>
610
+
611
+
612
+
613
+
614
+
615
+ </td>
616
+
617
+ <td class="time">
618
+
619
+ <?php echo $post['Post']['created']; ?>
620
+
621
+ </td>
622
+
623
+ </tr>
624
+
625
+ <?php endforeach; ?>
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+ </table>
634
+
635
+ </div>
636
+
637
+ </div>
638
+
639
+ </div>
640
+
641
+
642
+
643
+ <footer class="footer1">
644
+
645
+
646
+
647
+ <div class="twitterbtn">
648
+
649
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://localhost/cake/posts" data-text="呟いてね" data-lang="ja" data-size="large">ツイート</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
650
+
651
+ </div>
54
652
 
55
653
 
56
654
 
57
655
 
58
656
 
657
+ </footer>
658
+
59
659
 
60
660
 
61
- h1,th { color: #2E2E2E; }
62
-
63
-
64
-
65
- .header01 {
66
-
67
-
68
-
69
- height: 50px;
70
-
71
- position: fixed;
72
-
73
- top: 0;
74
-
75
- left: 0;
76
-
77
- right: 0;
78
-
79
- bottom: 0;
80
-
81
- background-color: #F2F2F2;
82
-
83
- border-bottom: 1px solid #eee;
84
-
85
- z-index: 10;
86
-
87
- }
88
-
89
-
90
-
91
- .footer01 {
92
-
93
-
94
-
95
- height: 50px;
96
-
97
- position: fixed;
98
-
99
- left: 0;
100
-
101
- right: 0;
102
-
103
- background-color: #F2F2F2;
104
-
105
- border-bottom: 1px solid #eee;
106
-
107
- z-index: 10;
108
-
109
- }
110
-
111
-
112
-
113
- .logo {
114
-
115
- float: left;
116
-
117
- }
118
-
119
- .annai {
120
-
121
- float: right;
122
-
123
- }
124
-
125
- li {
126
-
127
- list-style: none;
128
-
129
- float: left;
130
-
131
- }
132
-
133
-
134
-
135
- .headerL {
136
-
137
-
138
-
139
- margin-top: 10px;
140
-
141
- margin-left: 10px;
142
-
143
-
144
-
145
- }
146
-
147
-
148
-
149
- .headerR {
150
-
151
-
152
-
153
- margin-top: 10px;
154
-
155
- margin-rgiht: 10px;
156
-
157
-
158
-
159
- }
160
-
161
-
162
-
163
- .content {
164
-
165
-
166
-
167
- width:60%;
168
-
169
- margin: auto;
170
-
171
-
172
-
173
- }
174
-
175
-
176
-
177
- .bangou {
178
-
179
-
180
-
181
- width:10%;
182
-
183
- display:none;
184
-
185
-
186
-
187
-
188
-
189
- }
190
-
191
-
192
-
193
- .title {
194
-
195
-
196
-
197
- width:50%;
198
-
199
-
200
-
201
-
202
-
203
- }
204
-
205
-
206
-
207
- .hensyuu {
208
-
209
-
210
-
211
- width:20%;
212
-
213
-
214
-
215
- }
216
-
217
-
218
-
219
- .nitiji {
220
-
221
-
222
-
223
- width:20%;
224
-
225
-
226
-
227
- }
228
-
229
-
230
-
231
- table {
232
-
233
-
234
-
235
- width:100%;
236
-
237
-
238
-
239
- }
240
-
241
-
242
-
243
- .time {
244
-
245
- font-size:50%;
246
-
247
-
248
-
249
- }
250
-
251
-
252
-
253
- .henbo {
254
-
255
-
256
-
257
- font-size:50%;
258
-
259
- }
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
- .footerL {
268
-
269
-
270
-
271
- margin-top: 10px;
272
-
273
- margin-left: 10px;
274
-
275
-
276
-
277
- }
278
-
279
-
280
-
281
- .footerR {
282
-
283
-
284
-
285
- margin-top: 10px;
286
-
287
- margin-rgiht: 10px;
288
-
289
-
290
-
291
- }
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
- </style>
304
-
305
-
306
-
307
- </head>
308
-
309
-
310
-
311
- <body>
312
-
313
-
314
-
315
- <header>
316
-
317
- <div class="header01">
318
-
319
- <div class="headerL">
320
-
321
- <div class="logo">Hatena Blog ―思いは言葉に。</div>
322
-
323
- </div>
324
-
325
-
326
-
327
- <div class="headerR">
328
-
329
- <ul class="annai">
330
-
331
- <li>
332
-
333
- <a href="#">ログイン</a>
334
-
335
- </li>
336
-
337
- <li>
338
-
339
- <a href="#">会員登録</a>
340
-
341
- </li>
342
-
343
- </ul>
344
-
345
- </div>
346
-
347
- </div>
348
-
349
-
350
-
351
- </header>
352
-
353
-
354
-
355
- <h1>僕が考える最強のはてなブログ</h1>
356
-
357
- <p><?php echo $this->Html->link('Add Post', array('action' => 'add')); ?></p>
358
-
359
-
360
-
361
- <div class="content">
362
-
363
- <table>
364
-
365
- <tr>
366
-
367
- <th class="bangou">記事番号</th>
368
-
369
- <th class="title">タイトル</th>
370
-
371
- <th class="hensyuu">削除・編集</th>
372
-
373
- <th class="nitiji">投稿日時</th>
374
-
375
- </tr>
376
-
377
-
378
-
379
-
380
-
381
- <!-- ここで $posts 配列をループして、投稿情報を表示 -->
382
-
383
-
384
-
385
- <?php foreach ($posts as $post): ?>
386
-
387
- <tr>
388
-
389
- <td class="bangou"><?php echo $post['Post']['id']; ?></td>
390
-
391
- <td>
392
-
393
- <?php
394
-
395
- echo $this->Html->link(
396
-
397
- $post['Post']['title'],
398
-
399
- array('action' => 'view', $post['Post']['id'])
400
-
401
- );
402
-
403
- ?>
404
-
405
- </td>
406
-
407
-
408
-
409
- <td>
410
-
411
-
412
-
413
- <div class="henbo">
414
-
415
- <?php
416
-
417
- echo $this->Form->postLink(
418
-
419
- '削除',
420
-
421
- array('action' => 'delete', $post['Post']['id']),
422
-
423
- array('confirm' => 'Are you sure?')
424
-
425
- );
426
-
427
- ?>
428
-
429
-
430
-
431
- <?php
432
-
433
- echo $this->Html->link(
434
-
435
- '編集', array('action' => 'edit', $post['Post']['id'])
436
-
437
- );
438
-
439
- ?>
440
-
441
-
442
-
443
- </div>
444
-
445
- </td>
446
-
447
- <td class="time">
448
-
449
- <?php echo $post['Post']['created']; ?>
450
-
451
- </td>
452
-
453
- </tr>
454
-
455
- <?php endforeach; ?>
456
-
457
-
458
-
459
- </table>
460
-
461
- </div>
462
-
463
-
464
-
465
- <footer>
466
-
467
- <div class="footer01">
468
-
469
-
470
-
471
- <div class="footerL">
472
-
473
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://localhost/cake/posts" data-text="呟いてね" data-lang="ja" data-size="large">ツイート</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
474
-
475
- </div>
476
-
477
-
478
-
479
-
480
-
481
- </div>
482
-
483
-
484
-
485
-
486
-
487
- </footer>
661
+
488
662
 
489
663
 
490
664