• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン6506c6df874a3e661581eaf78497a652382fff42 (tree)
日時2016-10-23 21:38:42
作者Akito Hachiya <s.beec1e@gmai...>
コミッターumorigu

ログメッセージ

Remove media selector, use media query

変更サマリ

差分

--- a/skin/pukiwiki.css.php
+++ b/skin/pukiwiki.css.php
@@ -16,10 +16,6 @@ if(ini_get('zlib.output_compression') && preg_match('/\b(gzip|deflate)\b/i', $_S
1616 header('Vary: Accept-Encoding');
1717 }
1818
19-// Media
20-$media = isset($_GET['media']) ? $_GET['media'] : '';
21-if ($media != 'print') $media = 'screen';
22-
2319 // Output CSS ----
2420 ?>
2521 @charset "UTF-8";
@@ -38,13 +34,9 @@ body,td {
3834 }
3935
4036 a:link {
41-<?php if ($media == 'print') { ?>
42- text-decoration: underline;
43-<?php } else { ?>
4437 color:#215dc6;
4538 background-color:inherit;
4639 text-decoration:none;
47-<?php } ?>
4840 }
4941
5042 a:active {
@@ -54,13 +46,9 @@ a:active {
5446 }
5547
5648 a:visited {
57-<?php if ($media == 'print') { ?>
58- text-decoration: underline;
59-<?php } else { ?>
6049 color:#a63d21;
6150 background-color:inherit;
6251 text-decoration:none;
63-<?php } ?>
6452 }
6553
6654 a:hover {
@@ -328,35 +316,23 @@ div#header {
328316 }
329317
330318 div#navigator {
331-<?php if ($media == 'print') { ?>
332- display:none;
333-<?php } else { ?>
334319 clear:both;
335320 padding:4px 0px 0px 0px;
336321 margin:0px;
337-<?php } ?>
338322 }
339323
340324 td.menubar {
341-<?php if ($media == 'print') { ?>
342- display:none;
343-<?php } else { ?>
344325 width:9em;
345326 vertical-align:top;
346-<?php } ?>
347327 }
348328
349329 div#menubar {
350-<?php if ($media == 'print') { ?>
351- display:none;
352-<?php } else { ?>
353330 width:9em;
354331 padding:0px;
355332 margin:4px;
356333 word-break:break-all;
357334 font-size:90%;
358335 overflow:hidden;
359-<?php } ?>
360336 }
361337
362338 div#menubar ul {
@@ -380,24 +356,16 @@ div#note {
380356 }
381357
382358 div#attach {
383-<?php if ($media == 'print') { ?>
384- display:none;
385-<?php } else { ?>
386359 clear:both;
387360 padding:0px;
388361 margin:0px;
389-<?php } ?>
390362 }
391363
392364 div#toolbar {
393-<?php if ($media == 'print') { ?>
394- display:none;
395-<?php } else { ?>
396365 clear:both;
397366 padding:0px;
398367 margin:0px;
399368 text-align:right;
400-<?php } ?>
401369 }
402370
403371 div#lastmodified {
@@ -407,13 +375,9 @@ div#lastmodified {
407375 }
408376
409377 div#related {
410-<?php if ($media == 'print') { ?>
411- display:none;
412-<?php } else { ?>
413378 font-size:80%;
414379 padding:0px;
415380 margin:16px 0px 0px 0px;
416-<?php } ?>
417381 }
418382
419383 div#footer {
@@ -433,12 +397,8 @@ div#preview {
433397 }
434398
435399 img#logo {
436-<?php if ($media == 'print') { ?>
437- display:none;
438-<?php } else { ?>
439400 float:left;
440401 margin-right:20px;
441-<?php } ?>
442402 }
443403
444404 /* aname.inc.php */
@@ -601,7 +561,6 @@ span.new5 {
601561 /* popular.inc.php */
602562 span.counter { font-size:70%; }
603563 ul.popular_list {
604-<?php
605564 /*
606565 padding:0px;
607566 border:0px;
@@ -609,12 +568,10 @@ ul.popular_list {
609568 word-wrap:break-word;
610569 word-break:break-all;
611570 */
612-?>
613571 }
614572
615573 /* recent.inc.php,showrss.inc.php */
616574 ul.recent_list {
617-<?php
618575 /*
619576 padding:0px;
620577 border:0px;
@@ -622,7 +579,6 @@ ul.recent_list {
622579 word-wrap:break-word;
623580 word-break:break-all;
624581 */
625-?>
626582 }
627583
628584 /* ref.inc.php */
@@ -644,3 +600,19 @@ td.vote_td2 {
644600 color:inherit;
645601 background-color:#EEF5FF;
646602 }
603+
604+@media print {
605+ a:link,
606+ a:visited {
607+ text-decoration: underline;
608+ }
609+ img#logo,
610+ div#navigator,
611+ div#menubar,
612+ td.menubar,
613+ div#related,
614+ div#attach,
615+ div#toolbar {
616+ display: none;
617+ }
618+}
--- a/skin/pukiwiki.skin.php
+++ b/skin/pukiwiki.skin.php
@@ -73,8 +73,7 @@ if (isset($pkwk_dtd)) {
7373 <title><?php echo $title ?> - <?php echo $page_title ?></title>
7474
7575 <link rel="SHORTCUT ICON" href="<?php echo $image['favicon'] ?>" />
76- <link rel="stylesheet" type="text/css" media="screen" href="<?php echo SKIN_DIR ?>pukiwiki.css.php" />
77- <link rel="stylesheet" type="text/css" media="print" href="<?php echo SKIN_DIR ?>pukiwiki.css.php?media=print" />
76+ <link rel="stylesheet" type="text/css" href="<?php echo SKIN_DIR ?>pukiwiki.css.php" />
7877 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $link['rss'] ?>" /><?php // RSS auto-discovery ?>
7978
8079 <?php echo $head_tag ?>
--- a/skin/tdiary.css.php
+++ b/skin/tdiary.css.php
@@ -16,10 +16,6 @@ if(ini_get('zlib.output_compression') && preg_match('/\b(gzip|deflate)\b/i', $_S
1616 header('Vary: Accept-Encoding');
1717 }
1818
19-// Media
20-$media = isset($_GET['media']) ? $_GET['media'] : '';
21-if ($media != 'print') $media = 'screen';
22-
2319 // Color theme
2420 $color_theme = isset($_GET['color']) ? $_GET['color'] : '';
2521
@@ -278,35 +274,23 @@ div#header {
278274 }
279275
280276 div#navigator {
281-<?php if ($media == 'print') { ?>
282- display:none;
283-<?php } else { ?>
284277 clear:both;
285278 padding:4px 0px 0px 0px;
286279 margin:0px;
287-<?php } ?>
288280 }
289281
290282 td.menubar {
291-<?php if ($media == 'print') { ?>
292- display:none;
293-<?php } else { ?>
294283 width:9em;
295284 vertical-align:top;
296-<?php } ?>
297285 }
298286
299287 div#menubar {
300-<?php if ($media == 'print') { ?>
301- display:none;
302-<?php } else { ?>
303288 width:9em;
304289 padding:0px;
305290 margin:4px;
306291 word-break:break-all;
307292 font-size:90%;
308293 overflow:hidden;
309-<?php } ?>
310294 }
311295
312296 div#menubar ul {
@@ -328,24 +312,16 @@ div#note {
328312 }
329313
330314 div#attach {
331-<?php if ($media == 'print') { ?>
332- display:none;
333-<?php } else { ?>
334315 clear:both;
335316 padding:0px;
336317 margin:0px;
337-<?php } ?>
338318 }
339319
340320 div#toolbar {
341-<?php if ($media == 'print') { ?>
342- display:none;
343-<?php } else { ?>
344321 clear:both;
345322 padding:0px;
346323 margin:0px;
347324 text-align:right;
348-<?php } ?>
349325 }
350326
351327 div#lastmodified {
@@ -356,13 +332,9 @@ div#lastmodified {
356332
357333 /* for tDiary theme */
358334 div#related {
359-<?php if ($media == 'print') { ?>
360- display:none;
361-<?php } else { ?>
362335 font-size:80%;
363336 padding:0px;
364337 margin:0px 0px 0px 0px;
365-<?php } ?>
366338 }
367339
368340 div#footer {
@@ -382,12 +354,8 @@ div#preview {
382354 }
383355
384356 img#logo {
385-<?php if ($media == 'print') { ?>
386- display:none;
387-<?php } else { ?>
388357 float:left;
389358 margin-right:20px;
390-<?php } ?>
391359 }
392360
393361 /* aname.inc.php */
@@ -571,3 +539,15 @@ td.vote_td2 {
571539 color:inherit;
572540 background-color:#<?php echo $color['td.vote_td2'] ?>;
573541 }
542+
543+@media print {
544+ img#logo,
545+ div#navigator,
546+ div#menubar,
547+ td.menubar,
548+ div#related,
549+ div#attach,
550+ div#toolbar {
551+ display: none;
552+ }
553+}
--- a/skin/tdiary.skin.php
+++ b/skin/tdiary.skin.php
@@ -575,8 +575,7 @@ if (isset($pkwk_dtd)) {
575575 <link rel="SHORTCUT ICON" href="<?php echo $image['favicon'] ?>" />
576576 <link rel="stylesheet" type="text/css" media="all" href="<?php echo SKIN_DIR ?>theme/base.css" />
577577 <link rel="stylesheet" type="text/css" media="all" href="<?php echo SKIN_DIR ?>theme/<?php echo $theme ?>/<?php echo $theme ?>.css" />
578- <link rel="stylesheet" type="text/css" media="screen" href="<?php echo SKIN_DIR ?>tdiary.css.php?color=<?php echo $css_theme ?>" />
579- <link rel="stylesheet" type="text/css" media="print" href="<?php echo SKIN_DIR ?>tdiary.css.php?color=<?php echo $css_theme ?>&amp;media=print" />
578+ <link rel="stylesheet" type="text/css" href="<?php echo SKIN_DIR ?>tdiary.css.php?color=<?php echo $css_theme ?>" />
580579 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $link['rss'] ?>" /><?php // RSS auto-discovery ?>
581580
582581 <?php echo $head_tag ?>