]> dev.renevier.net Git - syp.git/commitdiff
allow custom css rules
authorarno <arenevier@fdn.fr>
Sun, 4 Oct 2009 17:14:40 +0000 (19:14 +0200)
committerarno <arenevier@fdn.fr>
Sun, 4 Oct 2009 17:14:40 +0000 (19:14 +0200)
README.txt
inc/html/admin.php
inc/html/index.php

index 768f9a61a46120ea21df06aa0e6b012c47bf379b..838116204485a4a268028e698bd736a2995e9d21 100644 (file)
@@ -57,6 +57,14 @@ needed.
 
 Currently, SYP does not allow  
 
+Custom CSS
+----------
+You can define your own css rules by creating custom css files:
+- `media/syp_custom.css` for user interface
+- `media/admin_custom.css` for admin interface
+Those files are sourced after all other css files. So, rules defined in those
+custom files will override other rules.
+
 server API
 ----------
 Client/server communication follows an API. This allow for example creation of
index ca2dd4dcd204bca2755f3cdde29212e4519b5c80..b0df4b5c6ea866c69d40fbc09ad907ce8facd6d2 100644 (file)
@@ -53,6 +53,12 @@ if (!$usrtblexists || !$itemstblexists) {
       <link rel="stylesheet" href="./media/admin.css" type="text/css">
       <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
 
+<?php
+    if (file_exists ("./media/admin_custom.css")) {
+        printf("    <link rel=\"stylesheet\" href=\"./media/admin_custom.css\" type=\"text/css\">\n");
+    }
+?>
+
       <script type="text/javascript">
         var SypStrings = {
             AddItem: "<?php ptrans('add a place')?>",
index 696b299bf52953fe4387edfa8968ee41b1a77b30..550ee48564cde59b8e2503a3ee14afb9f6557405 100644 (file)
@@ -29,6 +29,7 @@ if (defined ("POPUPPOS")) {
     <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="news.php">
     <link rel="stylesheet" href="./openlayers/theme/default/style.css" type="text/css">
     <link rel="stylesheet" href="./media/syp.css" type="text/css">
+
     <style type="text/css">
         .olPopup {
             <?php printf("_width: expression(Math.min(parseInt(this.scrollWidth) + 7, %d) + 'px');\n", ($thumbsmaxsize + 30))?>
@@ -49,6 +50,12 @@ if (defined ("POPUPPOS")) {
         }
     </style>
 
+<?php
+    if (file_exists ("./media/syp_custom.css")) {
+        printf("    <link rel=\"stylesheet\" href=\"./media/syp_custom.css\" type=\"text/css\">\n");
+    }
+?>
+
     <script type="text/javascript">
         var SypStrings = {
             language: "<?php echo $lang ?>",