Selaa lähdekoodia

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

teo greenwood 10 vuotta sitten
vanhempi
sitoutus
5aba8acc12
2 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  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