Don't serve static files through PHP.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Jan 2011 21:13:47 +0000 (22:13 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Jan 2011 21:13:47 +0000 (22:13 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
20 files changed:
htdocs/css/bandeau.css
modules/bandeau.php
templates/skin/common.bandeau.head.tpl [deleted file]
templates/skin/common.bandeau.tpl
templates/skin/common.header.tpl
templates/skin/default.tpl
templates/skin/espace.tpl
templates/skin/humlinux.tpl
templates/skin/keynote.tpl
templates/skin/linux.tpl
templates/skin/liteskin.tpl
templates/skin/nbviolet.tpl
templates/skin/newxorg.tpl
templates/skin/oldtimes.tpl
templates/skin/openweb.tpl
templates/skin/register.tpl
templates/skin/sharky.tpl
templates/skin/spectral.tpl
templates/skin/trapped.tpl
templates/xnet/skin.tpl

index 2ccb3d8..8c2e225 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-#bandeau-X a        { vertical-align: middle; }
-#bandeau-X a:link, #bandeau-X a:visited    { text-decoration: none ; color: #505050; }
-#bandeau-X a:hover   { text-decoration: underline; color: black; }
-#bandeau-X a:active  { color: #CCCCCC ; background: #505050 ; }
-body {margin:0px;}
-#bandeau-X {
-background:#CCCCCC;color:#505050;font-size:10px;font-family:Verdana, Arial, Helvetica, sans-serif;height:15px;border:none;padding:0;margin:0 }
-#bandeau-X img { vertical-align:middle;border:0;padding:0;margin:0 }
+@media screen {
+    #bandeau-X a        { vertical-align: middle; }
+    #bandeau-X a:link, #bandeau-X a:visited    { text-decoration: none ; color: #505050; }
+    #bandeau-X a:hover   { text-decoration: underline; color: black; }
+    #bandeau-X a:active  { color: #CCCCCC ; background: #505050 ; }
+    body {margin:0px;}
+    #bandeau-X {
+    background:#CCCCCC;color:#505050;font-size:10px;font-family:Verdana, Arial, Helvetica, sans-serif;height:15px;border:none;padding:0;margin:0 }
+    #bandeau-X img { vertical-align:middle;border:0;padding:0;margin:0 }
+}
index 09d0ad6..f5008c0 100644 (file)
@@ -43,6 +43,7 @@ class BandeauModule extends PLModule
         $page->changeTpl('skin/common.bandeau.tpl', NO_SKIN);
         $page->assign('login', $login == 'login');
         $page->assign('seed', $login);
+        $page->assign('external', true);
     }
 
     function handler_css(&$page)
diff --git a/templates/skin/common.bandeau.head.tpl b/templates/skin/common.bandeau.head.tpl
deleted file mode 100644 (file)
index 1846e97..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{**************************************************************************}
-{*                                                                        *}
-{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
-{*  http://opensource.polytechnique.org/                                  *}
-{*                                                                        *}
-{*  This program is free software; you can redistribute it and/or modify  *}
-{*  it under the terms of the GNU General Public License as published by  *}
-{*  the Free Software Foundation; either version 2 of the License, or     *}
-{*  (at your option) any later version.                                   *}
-{*                                                                        *}
-{*  This program is distributed in the hope that it will be useful,       *}
-{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
-{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
-{*  GNU General Public License for more details.                          *}
-{*                                                                        *}
-{*  You should have received a copy of the GNU General Public License     *}
-{*  along with this program; if not, write to the Free Software           *}
-{*  Foundation, Inc.,                                                     *}
-{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
-{*                                                                        *}
-{**************************************************************************}
-
-<link rel="stylesheet" media="screen" type="text/css" href="css/bandeau.css"/>
-
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index c904f1c..e790abd 100644 (file)
@@ -24,7 +24,7 @@
   incluez le fichier http://www.polytechnique.org/bandeau dans vos php
   ou http://www.polytechnique.org/bandeau/login pour profiter du login
   automatique. Et rajoutez à la liste de css de vos pages
-  http://www.polytechnique.org/bandeau.css.
+  http://www.polytechnique.org/css/bandeau.css.
   Pour avoir l'icone, pour des raisons de sécurité il n'y a pas d'accès
   direct, il faut alors rediriger bandeau/icone.png vers celle du site&nbsp;:
   http://www.polytechnique.org/bandeau/icone.png
@@ -45,7 +45,7 @@
 
 
 <div id="bandeau-X">
-  <img src="bandeau/icone.png" alt=""/>
+  <img src="{if $external}bandeau/icone.png{else}images/x.png{/if}" width="13" height="14" alt=""/>
   <a href="http://www.polytechnique.fr/">L'&Eacute;cole</a> &middot;
   <a href="http://www.polytechnique.edu/">Institutional site</a>
   &tilde;&tilde;
index 5a38e88..fc1558f 100644 (file)
@@ -29,6 +29,7 @@
     <link rel="apple-touch-icon" href="images/logo.png" type="image/png" />
 
     <link rel="stylesheet" type="text/css" href="css/base.css" media="all"/>
+    <link rel="stylesheet" type="text/css" href="css/bandeau.css" />
 
     <link rel="index"  href="index" />
     <link rel="author" href="changelog" />
index 696dc7a..3b99315 100644 (file)
@@ -23,7 +23,6 @@
 {include file=skin/common.doctype.tpl}
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index ea8d1f2..6e6bf9b 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/espace.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index dac7c4d..3b4e58d 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/humlinux.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index e31a983..1e473da 100644 (file)
@@ -23,7 +23,6 @@
 {include file=skin/common.doctype.tpl}
     <link rel="stylesheet" type="text/css" href="css/keynote.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index c8b017f..6f3dfcc 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/linux.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index dcbbad1..2d8231c 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/liteskin.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index fc46d53..09f8ce2 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/nbviolet.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index 9dd40f8..bd2e552 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/newxorg.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index 46b9abd..3077d5b 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/oldtimes.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index 519442e..aad38c6 100644 (file)
@@ -23,7 +23,6 @@
 {include file=skin/common.doctype.tpl}
     <link rel="stylesheet" type="text/css" href="css/openweb.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index fa7acdb..047629e 100644 (file)
@@ -23,7 +23,6 @@
 {include file=skin/common.doctype.tpl}
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index e8e18b8..a2fe7ea 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/sharky.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index be3b1c5..68752a1 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/spectral.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index ce5db23..7c1f581 100644 (file)
@@ -24,7 +24,6 @@
     <link rel="stylesheet" type="text/css" href="css/default.css" media="all" />
     <link rel="stylesheet" type="text/css" href="css/trapped.css" media="all" />
     {include file=skin/common.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}
index 6e67ba5..86a88ec 100644 (file)
@@ -30,7 +30,8 @@
     <link rel="apple-touch-icon" href="images/logo-xnet.png" type="image/png" />
 
     <link rel="stylesheet" type="text/css" href="css/xnet.css" media="screen" />
-    <link rel="stylesheet" type="text/css" href="css/base.css" media="screen" />
+    <link rel="stylesheet" type="text/css" href="css/base.css" media="all" />
+    <link rel="stylesheet" type="text/css" href="css/bandeau.css" />
 
     <link rel="bookmark" href="http://www.polytechnique.fr/"        title="| École polytechnique" />
     <link rel="bookmark" href="http://www.polytechnique.edu/"       title="| Institutionnal site" />
@@ -40,7 +41,6 @@
     <link rel="bookmark" href="http://www.polytechnique.fr/eleves/" title="| Site d'élèves" />
 
     {include core=plpage.header.tpl}
-    {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
     {include core=plpage.devel.tpl}