소스 검색

Add ability to load custom screen.css and print.css

teo greenwood 10 년 전
부모
커밋
5aba8acc12
2개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      css/custom/.gitignore
  2. 8 0
      index.php

+ 1 - 0
css/custom/.gitignore

@@ -0,0 +1 @@
+*.css

+ 8 - 0
index.php

@@ -47,6 +47,14 @@
   <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="css/compat/ie6.css">
   <![endif]-->
+  <?php
+    if(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$basedir.'/css/custom/screen.css')) {
+      echo '<link rel="stylesheet" type="text/css" href="css/custom/screen.css" />';
+    }
+    if(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$basedir.'/css/custom/print.css')) {
+      echo '<link rel="stylesheet" type="text/css" href="css/custom/print.css" />';
+    }
+  ?>
   <link rel="icon" type="image/vnd.microsoft.icon" href="img/icon/favicon.ico" />
   <title>
    <?php