skin proof of concept.
authorx2000habouzit <x2000habouzit>
Sun, 29 Aug 2004 21:14:40 +0000 (21:14 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 29 Aug 2004 21:14:40 +0000 (21:14 +0000)
doesnt work with IE.

try it with mozilla : skin noIE

htdocs/css/noie.css [new file with mode: 0644]
plugins/insert.mkStats.php
templates/skin/default.tpl
templates/skin/noIE.tpl [new file with mode: 0644]
templates/skin/sharky.tpl

diff --git a/htdocs/css/noie.css b/htdocs/css/noie.css
new file mode 100644 (file)
index 0000000..40d8046
--- /dev/null
@@ -0,0 +1,465 @@
+/*******************************************************************************
+    1   Styles par défauts
+        [ balises sans attributs ou classes sans contexte ]
+*******************************************************************************/
+
+body {
+    font-family: "Arial", sans-serif;
+    background: #99afc1;
+    color: #000000;
+}
+
+a:link, a:visited, a:active, a:hover { color: #003399; background: inherit; }
+a img { border: 0px; }
+td    { vertical-align: top; }
+li    { padding-left: 3px; padding-right: 3px; text-align: justify; }
+hr    { width: 90%; text-align: center }
+
+.center { text-align: center; }
+.right  { text-align: right; }
+.floatright { float: right; }
+.middle { vertical-align: middle; }
+.smaller { font-size: smaller; font-style: italic; }
+
+/*******************************************************************************
+    2   Styles <p>, <div>, <span>, <li>
+        [ styles classiques d'effets de texte ]
+*******************************************************************************/
+
+p {
+    margin-bottom: 0.5em;
+    text-align: justify;
+}
+
+p.error, span.error, p.erreur, span.erreur {
+    font-weight: bold;
+    color: #ff0000;
+    background: inherit;
+    margin-top: 0.5em;
+    margin-bottom: 0.5em;
+}
+
+.erreur a:link, .erreur a:visited, .erreur a:active, .erreur a:hover {
+    color: #ff3333;
+    background: inherit;
+}
+
+div.rubrique {
+    color: #ffffff;
+    background: #657590;
+
+    text-indent: 0.2em;
+    text-align: left;
+    font-weight: bolder;
+
+    border-top: 1px solid #305070;
+    border-bottom: 1px solid #305070;
+    font-size: 100%;
+
+    margin-top: 1em;
+    margin-bottom: 1em;
+    padding-left: 0.5em;
+}
+
+div.ssrubrique {
+    padding-top: 0.5em;
+    font-weight: bold;
+}
+
+p.sstitre, div.sstitre {
+    margin-top: 1em;
+    font-weight: bold;
+}
+
+p.explication, div.explication {
+    font-style: italic;
+    padding: 0.25em;
+    text-align: justify;
+}
+p.question, div.question {
+    font-weight: bold;
+    padding: 0.25em;
+}
+p.warn, div.warn {
+    font-style : italic;
+    padding-top: 1em;
+    padding-bottom: 1em;
+}
+
+li.spaced {
+    padding-top: 0.5em;
+    padding-bottom: 0.5em;
+    text-align: justify;
+}
+
+/*******************************************************************************
+    3   Tableaux bicolores + classes utiles
+        [ Tableaux à lignes alternées, en taille normale, ou tiny ]
+*******************************************************************************/
+
+table.bicol {
+    color: inherit;
+    background: #80a0c0;
+    border: 1px solid #305070;
+    border-collapse: collapse;
+    width: 98%;
+    margin-left: 1%;
+}
+table.tinybicol {
+    color: inherit;
+    background: #eeeeee;
+    border: 1px solid #336699;
+    border-collapse: collapse;
+    width: 70%;
+    margin-left: 15%;
+}
+
+table.tinybicol tr.impair, table.bicol tr.impair { color: inherit; background: #80a0c0; }
+table.tinybicol tr.pair, table.bicol tr.pair { color: inherit; background: #99b9d0;
+}
+
+table.tinybicol th, table.bicol th {
+    color: #ffffff;
+    background: #336699;
+    font-weight: bold;
+    text-align: center;
+    vertical-align: middle;
+}
+table.tinybicol td, table.bicol td {
+    color: #000000;
+    background: inherit;
+}
+
+
+td.half { width: 50%; padding: 4px; }
+td.titre {
+    color: #000000;
+    background: inherit;
+    font-weight: bold;
+}
+td.action {
+    white-space: nowrap;
+    text-align: right;
+    font-weight: bold;
+    vertical-align: middle;
+}
+td.action a {  padding: 4px; }
+
+/*******************************************************************************
+    4   Tableau de choix de skins
+        [ Styles pour les tableaux de types de ceux des skins ]
+*******************************************************************************/
+
+#skin {
+    background: #99b9d0;
+    border-top: 1px solid #305070;
+    border-bottom: none;
+    width: 80%;
+    margin-left: 10%;
+}
+
+#skin td {
+    border-top: none;
+    border-bottom: 1px solid #305070;
+    vertical-align: middle;
+}
+#skin td.skigauche {
+    background: #99b9d0;
+    color: inherit;
+    vertical-align: middle;
+}
+#skin td.skimilieu {
+    padding-left: 1em;
+    width: 100%;
+}
+#skin td.skidroite { padding: 0; }
+
+/*******************************************************************************
+    5   Contacts
+        [ Styles liés à l'affichage de contacts ]
+*******************************************************************************/
+
+div.contact-list {
+    width: 98%;
+    margin-left: 1%;
+}
+
+div.contact-list div.contact {
+    width: 100%;
+    text-align: left;
+    border-top: 1px solid #305070;
+    background: #80a0c0;
+    color: inherit;
+}
+
+div.contact div.nom {
+    font-weight: bold;
+    width: 35%;
+    float: left;
+}
+
+div.contact div.appli {
+    width: 50%;
+    float: left;
+}
+
+div.contact div.bits {
+    text-align: right;
+    width: 15%;
+    float: left;
+}
+
+div.bits .smaller { display: none; }
+div.contact:hover div.bits .smaller { display: inline; }
+
+div.contact div.long {
+    width: 100%;
+    clear: both;
+    background: #99b9d0;
+    color: inherit;
+    padding-top: 1px;
+    padding-bottom: 1px;
+}
+
+div.long table { width: 100%; }
+div.long td.lt { width: 35%; }
+div.long td.rt { width: 65%; }
+
+/*******************************************************************************
+    6   Profil
+        [ onglets des profils ]
+*******************************************************************************/
+  
+table.flags td.texte {
+    font-size: smaller;
+    font-weight: bold;
+    padding-left: 0.5em;
+}
+table.flags td.vert {
+    background: green;
+    width: 1.5em; height: 1.5em;
+    text-align: center;
+}
+table.flags td.orange {
+    background: #ff9900;
+    width: 1.5em;
+    height: 1.5em;
+    text-align: center;
+}
+table.flags td.rouge {
+    background: red;
+    width: 1.5em;
+    height: 1.5em;
+    text-align: center;
+}
+
+table.cadre_a_onglet{
+    border-width: 0;
+    padding : 0;
+    margin: 0;
+}
+
+div.conteneur_onglets{ /*padding : 2px;*/ }
+
+div.conteneur_tab {
+    border-width : 1px 2px 2px 1px;
+    border-style : solid;
+    border-color : #999;
+    padding : 4px 0px 0px 4px;
+    background : #eceade;
+}
+
+#onglet {
+    display : block;
+    margin : 0;
+    padding : 0;
+    /*height : 50px;*/
+}
+
+#onglet li {
+    display : block;
+    float : left;
+    padding : 0.5ex;
+    margin : 0 0.3ex -1px 0;
+    background : #D2E0E6  repeat-x 0 100%;
+    border-width : 1px 1px 0px 1px;
+    border-style : solid;
+    border-color : #999;
+    border-bottom-color : #999;
+    width: auto;
+    height: 6ex;
+    text-align: center;
+}
+
+#onglet li:hover { background : #fc3 repeat-x 0 100%; }
+
+#onglet li.actif {
+    background : #eceade;
+    border-bottom-color : #eceade;
+    font-weight: bold;
+}
+
+#onglet li a {
+    /*font-family : Arial,Helvetica,sans-serif;*/
+    font-size: 80%;
+    font-weight : normal;
+    text-decoration : none;
+    color : #000;
+}
+
+#onglet li a:hover { text-decoration: underline; }
+#onglet li img { margin-right : 2px; }
+
+/*******************************************************************************
+    7   fiche.php
+        [ cas de la fiche ]
+*******************************************************************************/
+
+div.boite {
+  border: 1px solid #5555BB;
+  background: #FFFFC0;
+  padding: 5px;
+  margin: 5px;
+}
+
+div.boite div.titre {
+  background: #9999FF;
+  margin: 5px;
+  padding: 5px;
+  text-align: center;
+}
+
+div.boite div.item {
+  float: left;
+  padding: 5px;
+  margin: 5px;
+}
+
+div.spacer { clear: both; }
+div.item div.title { font-weight: bold; }
+div.item div.value { }
+
+/*******************************************************************************
+    A   SKIN
+        [ choix de classes faites par le skinneur
+*******************************************************************************/
+
+#dev {
+    position: fixed;
+    top     : 32px;
+    right   : 14px;
+    width   : 128px;
+    z-index : 1;
+
+    color: #003399;
+    background: #e0ffff;
+    border: 1px dashed #003399;
+
+    font-family: 'Bauhaus Md BT','Bitstream Vera',sans-serif;
+    font-size: 10pt;
+    font-weight: bold;
+}
+#dev div { padding: 3px; }
+#dev .title {
+    text-align: center;
+    font-size: larger;
+    text-decoration: underline;
+}
+#dev a:hover {
+    color: inherit;
+    background: #c0e0e0;
+}
+
+#db-trace div.hide       { display: none; }
+#db-trace:hover div.hide { display: block }
+
+#suid {
+    color: red;
+    background: #ffc0cb;
+    width: 100%;
+    font-weight: bold;
+    position: fixed;
+    padding: 2px;
+}
+#suid a { color: red; }
+
+#top {
+    width: 100%;
+    padding: 0px;
+    background: inherit;
+    
+    position: fixed;
+    top: 0px;
+}
+
+#top span {
+    display: block;
+    font-weight: bold;
+    font-family: georgia,serif;
+    padding-bottom: 4px;
+}
+
+#menu {
+    position: absolute;
+    background: #657590;
+    color: #ffffff;
+    padding: 0px;
+    margin: 0px;
+    width: 100%;
+    border-top: 1px solid #305070;
+    border-bottom: 1px solid #305070;
+    padding-left: 10%;
+}
+
+#menu li:first-child  { border-left: 1px solid #305070; }
+
+#menu li {
+    float: left;
+    font-family: ms sans serif,sans-serif;
+    font-size: 75%;
+    font-weight: bold;
+    padding: 0px 1em 0px 1em;
+    list-style: none;
+    border-right: 1px solid #305070;
+}
+
+#menu li div {
+    display: none;
+    color: inherit;
+    background: #99afc1;
+    border: 1px solid #305070;
+    position: absolute;
+    padding: 2px;
+    margin: 0px;
+}
+
+#menu a { display: block; }
+#menu li:hover div { display: block; }
+
+#bottom {
+    width: 100%;
+    background: inherit;
+    border-top: 1px solid #305070;
+    text-align: center;
+    padding: 4px;
+    height: 36px;
+    font-size: 75%;
+    font-family: "MS Sans Serif", sans-serif;
+    position: fixed;
+    bottom: 0px;
+}
+
+#content {
+    width: 80%;
+    margin-left: 10%;
+    padding: 100px 0px 42px 0px;
+    font-size: 95%;
+    vertical-align: top;
+}
+
+#content input {
+    font-size: 95%;
+}
+
+/* vim: set et ts=4 sts=4 sw=4: */
+/* $Id: noie.css,v 1.1 2004-08-29 21:14:40 x2000habouzit Exp $ */
index 4200637..a568977 100644 (file)
@@ -1,14 +1,5 @@
 <?php
 
-function url()
-{
-  $chemins = Array('.', '..', '../..');
-  foreach ($chemins as $ch) {
-    if (file_exists("$ch/login.php"))
-      return "$ch";
-  }
-  return "";
-}
 /*
  * Smarty plugin
  * ------------------------------------------------------------- 
@@ -24,19 +15,6 @@ function smarty_insert_mkStats($params, &$smarty)
     $req = mysql_query("select count(*) from requests",$conn);
     list($stats_req) = mysql_fetch_row($req);
     mysql_free_result($req);
-    $stats_req = ($stats_req ? $stats_req : "-");
-
-    $rel = url();
-    return <<<EOF
-        <table class="bicol"
-          style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
-        <tr>
-          <th>Valid</th>
-        </tr>
-        <tr class="impair">
-          <td><a href="$rel/admin/valider.php">$stats_req</a></td>
-        </tr>
-        </table>
-EOF;
+    return ($stats_req ? $stats_req : "-");
 }
 ?>
index 9798c9f..a1f5bdd 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: default.tpl,v 1.12 2004-08-29 17:35:35 x2000habouzit Exp $ *}
+{* $Id: default.tpl,v 1.13 2004-08-29 21:14:41 x2000habouzit Exp $ *}
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
           <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
           {/foreach}
           {/foreach}
-          {perms level=admin}{insert name="mkStats"}{/perms}
+          {perms level=admin}
+          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
+            <tr><th>Valid</th></tr>
+            <tr class="impair">
+              <td><a href="{"admin/valider.php"|url}">{insert name="mkStats"}</a></td>
+            </tr>
+          </table>
+          {/perms}
         </td>
         <td id="content">
           {include file=$xorg_tpl}
diff --git a/templates/skin/noIE.tpl b/templates/skin/noIE.tpl
new file mode 100644 (file)
index 0000000..7885b13
--- /dev/null
@@ -0,0 +1,86 @@
+{* $Id: noIE.tpl,v 1.1 2004-08-29 21:14:41 x2000habouzit Exp $ *}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    {include file=skin/common.header.tpl}
+    <link rel="stylesheet" type="text/css" href="{"css/noie.css"|url}" media="screen" />
+    {if $xorg_head}
+    {include file=$xorg_head}
+    {/if}
+    {include file=skin/common.bandeau.head.tpl}
+  </head>
+  <body>
+
+  {if $simple}
+
+    <div id="content">
+      {include file=$xorg_tpl}
+    </div>
+
+  {else}
+
+    <div id="top">
+      {if $smarty.session.suid}
+      <div id="suid">
+        {dynamic}
+        {$smarty.session.suid} ({$smarty.session.username})
+        {/dynamic}
+        [<a href="{"exit.php"|url}">exit</a>]
+      </div>
+      {/if}
+
+      {include file=skin/common.bandeau.tpl}
+     
+      <div class="center">
+        <img src="{"images/sk_sharky_ban.png"|url}" alt="[ BAN ]" />
+        <span>
+          {insert name="getNbIns"} polytechniciens sur le web
+        </span>
+      </div>
+
+      <ul id="menu">
+        {include_php file=menu.conf.php}
+        {foreach key=menu_title item=menu_list from=$menu}
+        {if $menu_title}
+        
+        <li>
+        {$menu_title}
+        <div class="liens">
+          {foreach key=menu_item item=menu_url from=$menu_list}
+          <a class="menu_item" href="{$menu_url|url}">{$menu_item}</a>
+          {/foreach}
+        </div>
+        </li>
+        
+        {else}
+        
+        {foreach key=menu_item item=menu_url from=$menu_list}
+        <li>
+        <a class="menu_item" href="{$menu_url|url}">{$menu_item}</a>
+        </li>
+        {/foreach}
+       
+        {/if}
+        {/foreach}
+        
+        {perms level=admin}
+        <li><a href="{"admin/valider.php"|url}">{insert name="mkStats"}</a></li>
+        {/perms}
+        <li style="clear:both"></li>
+      </ul>
+
+    </div>
+    
+    <div id="content">
+      {include file=$xorg_tpl}
+      {include file=skin/common.devel.tpl}
+    </div>
+
+    <div id="bottom">
+      {include file=skin/common.footer.tpl}
+    </div>
+  {/if}
+  </body>
+</html>
+{* vim:set et sw=2 sts=2 sws=2: *}
index d2f6bfb..9f619d2 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: sharky.tpl,v 1.2 2004-08-29 17:35:35 x2000habouzit Exp $ *}
+{* $Id: sharky.tpl,v 1.3 2004-08-29 21:14:41 x2000habouzit Exp $ *}
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
           <div class="menu_item"><a href="{$menu_url|url}">{$menu_item}</a></div>
           {/foreach}
           {/foreach}
-          {perms level=admin}{insert name="mkStats"}{/perms}
+          {perms level=admin}
+          <table class="bicol" style="font-weight:normal;text-align:center; border-left:0px; border-right:0px; margin-top:0.5em; width:100%; margin-left: 0; font-size: smaller;">
+            <tr><th>Valid</th></tr>
+            <tr class="impair">
+              <td><a href="{"admin/valider.php"|url}">{insert name="mkStats"}</a></td>
+            </tr>
+          </table>
+          {/perms}
         </td>
         <td id="content">
           {include file=$xorg_tpl}