From 2cff7afe6998d7218732f3915dd29652cf9a0296 Mon Sep 17 00:00:00 2001 From: ARNO* <arno@rezo.net> Date: Fri, 21 Nov 2003 00:22:03 +0000 Subject: [PATCH] Boutons entierement par feuilles de style --- ecrire/inc_agenda.php3 | 9 +- ecrire/inc_presentation.php3 | 47 ++++------ ecrire/spip_style.php3 | 165 ++++++++++++++++++++++++++++------- 3 files changed, 153 insertions(+), 68 deletions(-) diff --git a/ecrire/inc_agenda.php3 b/ecrire/inc_agenda.php3 index bcf330c29f..b849d3893f 100644 --- a/ecrire/inc_agenda.php3 +++ b/ecrire/inc_agenda.php3 @@ -55,7 +55,7 @@ function agenda ($mois, $annee, $jour_ved, $mois_ved, $annee_ved) { if (checkdate($mois,$j,$annee)){ if ($j == $jour_ved AND $mois == $mois_ved AND $annee == $annee_ved) { - echo "<td align='center' class='arial2' style='background-color: white; border: 1px solid $couleur_foncee; -moz-border-radius: 8px;'>"; + echo "<td class='arial2' style='background-color: white; border: 1px solid $couleur_foncee; text-align: center; -moz-border-radius: 8px;'>"; echo "<a href='calendrier_jour.php3?jour=$j&mois=$mois&annee=$annee' style='color: black'><b>$j</b></a>"; echo "</td>"; } else { @@ -75,7 +75,7 @@ function agenda ($mois, $annee, $jour_ved, $mois_ved, $annee_ved) { $couleur = "black"; } } - echo "<td align='center' class='arial2' style='background-color: $couleur_fond; -moz-border-radius: 8px;'>"; + echo "<td class='arial2' style='background-color: $couleur_fond; text-align: center; -moz-border-radius: 8px;'>"; echo "<a href='calendrier_jour.php3?jour=$j&mois=$mois&annee=$annee' style='color: $couleur;'>$j</a>"; echo "</td>"; } @@ -113,8 +113,8 @@ function calendrier_jour($jour,$mois,$annee,$large = true, $le_message = 0) { if (!$large) echo "<div align='center' style='padding: 5px;'><b class='verdana1'><a href='calendrier_jour.php3?jour=$jour&mois=$mois&annee=$annee' style='color:black;'>".affdate("$annee-$mois-$jour")."</a></b></div>"; - echo"<div style='border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;'>"; // bordure - echo "<div style='position: relative; width: 100%; height: 450; background: url(img_pack/fond-calendrier.gif)'>"; + echo "<div style='border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;'>"; // bordure + echo "<div style='position: relative; width: 100%; height: 450px; background: url(img_pack/fond-calendrier.gif);'>"; echo "<div style='position: absolute; $spip_lang_left: 2px; top: 2px; color: #666666;' class='arial0'><b class='arial0'>0:00<br />7:00</b></div>"; @@ -213,7 +213,6 @@ function calendrier_jour($jour,$mois,$annee,$large = true, $le_message = 0) { echo "</div>"; } - echo "</div>"; echo "</div>"; } diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index a064eefc9f..812db1900e 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -931,7 +931,7 @@ function debut_html($titre = "") { @Header("Pragma: no-cache"); @Header("Content-Type: text/html; charset=$charset"); - echo "<html>\n<head>\n<title>[$nom_site_spip] $titre</title>\n"; + echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>\n<head>\n<html>\n<title>[$nom_site_spip] $titre</title>\n"; echo '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'">'; echo '<link rel="stylesheet" type="text/css" href="'; if (!$flag_ecrire) echo 'ecrire/'; @@ -1248,46 +1248,28 @@ function icone($texte, $lien, $fond, $fonction="", $align="", $afficher='oui'){ $largeur = 80; } - $style = 'iconeoff'; - $classe_image = 'bouton36gris'; if ($fonction == "supprimer.gif") { - $style = 'iconedanger'; - $classe_image = 'bouton36rouge'; + $style = '-danger'; + } else { + $style = ''; } $compteur_survol ++; - if ($spip_display == 1) { - $icone .= "\n<table cellpadding=0 cellspacing=0 border=0 $aligner width=$largeur class='$style' onMouseOver=\"changeclass(this,'iconeon');\" onMouseOut=\"changeclass(this,'$style');\">"; - $icone .= "<tr><td background='' align='center' valign='middle' width=$largeur height=$hauteur>"; - } - $icone .= "\n<table cellpadding=0 class='pointeur' cellspacing=0 border=0 $aligner width=$largeur onMouseOver=\"changesurvol('survol$compteur_survol','bouton36blanc');\" onMouseOut=\"changesurvol('survol$compteur_survol','$classe_image');\">"; + $icone .= "\n<table cellpadding='0' class='pointeur' cellspacing='0' border='0' $aligner width='$largeur'>"; + $icone .= "<tr><td class='icone36$style' style='text-align:center;'><a href='$lien'>"; if ($spip_display != 1){ - $icone .= "<tr><td background='' align='center'>"; if ($fonction != "rien.gif"){ - $icone .= "\n<div class='$classe_image' id='survol$compteur_survol'><table cellpadding=0 cellspacing=0 border=0><tr><td background='img_pack/$fond'>"; - $icone .= "<a href='$lien'><img src='img_pack/$fonction'$alt$title width='24' height='24' border='0'></a>"; - $icone .= "</td></tr></table></div>\n"; + $icone .= "<img src='img_pack/$fonction'$alt$title style='background: url(img_pack/$fond) no-repeat center center;' width='24' height='24' border='0'>"; } else { - $icone .= "\n<table cellpadding=0 cellspacing=0 border=0><tr><td background=''>"; - $icone .= "<div class='$classe_image' id='survol$compteur_survol'><a href='$lien'><img src='img_pack/$fond'$alt$title width='24' height='24' border='0'></a></div>"; - $icone .= "</td></tr></table>\n"; + $icone .= "<img src='img_pack/$fond'$alt$title width='24' height='24' border='0'>"; } - $icone .= "</td></tr>"; } - $icone .= "<tr><td background=''>"; - $icone .= "<img src='img_pack/rien.gif' width=$largeur height=1>"; - $icone .= "</td></tr>"; if ($spip_display != 3){ - $icone .= "<tr><td background='' align='center' style=' filter: DropShadow(Color=white, OffX=1, OffY=1, Positive=1) DropShadow(Color=#cccccc, OffX=-1, OffY=-1, Positive=1);'>"; - $icone .= "<a href='$lien' class='icone'><font face='Verdana,Arial,Sans,sans-serif' size='1' color='#505050'><b>$texte</b></font></a>"; - $icone .= "</td></tr>"; + $icone .= "<span>$texte</span>"; } + $icone .= "</a></td></tr>"; $icone .= "</table>"; - if ($spip_display == 1) { - $icone .= "</td></tr>"; - $icone .= "</table>"; - } if ($afficher == 'oui') echo $icone; @@ -1304,7 +1286,7 @@ function icone_horizontale($texte, $lien, $fond = "", $fonction = "") { if ($danger) echo "<div class='danger'>"; if ($spip_display != 1) { echo "<a href='$lien' class='cellule-h'><table cellpadding='0' valign='middle'><tr>\n"; - echo "<td><a href='$lien'><div class='cellule-h-icone'><img class='i' style='background: url(\"img_pack/$fond\")' src='img_pack/$fonction' alt=''></div></a></td>\n"; + echo "<td><a href='$lien'><div class='cell-i'><img style='background: url(\"img_pack/$fond\"); background-repeat: no-repeat; background-position: center center;' src='img_pack/$fonction' alt=''></div></a></td>\n"; echo "<td class='cellule-h-lien'><a href='$lien' class='cellule-h'>$texte</a></td>\n"; echo "</tr></table></a>\n"; } @@ -1768,7 +1750,7 @@ function creer_colonne_droite($rubrique=""){ global $options; global $connect_id_auteur, $spip_ecran; global $flag_3_colonnes, $flag_centre_large; - global $spip_lang_rtl; + global $spip_lang_rtl, $lang_left; if ($flag_3_colonnes AND !$deja_colonne_droite) { $deja_colonne_droite = true; @@ -1786,7 +1768,7 @@ function creer_colonne_droite($rubrique=""){ echo "<td width=$espacement rowspan=2> </td>"; echo "<td rowspan=1></td>"; echo "<td width=$espacement rowspan=2> </td>"; - echo "<td width=$largeur rowspan=2 valign='top'><p />"; + echo "<td width=$largeur rowspan=2 align='$lang_left' valign='top'><p />"; if ($changer_config!="oui") { $activer_messagerie=lire_meta("activer_messagerie"); @@ -1837,6 +1819,7 @@ function debut_droite($rubrique="") { global $options, $spip_ecran, $deja_colonne_droite; global $connect_id_auteur, $connect_statut, $connect_toutes_rubriques, $clean_link; global $flag_3_colonnes, $flag_centre_large, $couleur_foncee, $couleur_claire; + global $lang_left; if ($options == "avancees") { // liste des articles bloques @@ -1907,7 +1890,7 @@ function debut_droite($rubrique="") { else $largeur = 500; - echo '<td width="'.$largeur.'" valign="top" rowspan=1><font face="Georgia,Garamond,Times,serif" size=3>'; + echo '<td width="'.$largeur.'" valign="top" align="'.$lang_left.'" rowspan=1><font face="Georgia,Garamond,Times,serif" size=3>'; // touche d'acces rapide au debut du contenu echo "\n<a name='saut' href='#saut' accesskey='s'></a>\n"; diff --git a/ecrire/spip_style.php3 b/ecrire/spip_style.php3 index 2235437d4e..f3d198589c 100644 --- a/ecrire/spip_style.php3 +++ b/ecrire/spip_style.php3 @@ -26,8 +26,12 @@ /* * Police par defaut (bof...) */ -body { font-family: Verdana,Arial,Sans,sans-serif; } - +body { + font-family: Verdana,Arial,Sans,sans-serif; +} +td { + text-align: <? echo $left; ?>; +} /* * Formulaires */ @@ -85,6 +89,83 @@ body { font-family: Verdana,Arial,Sans,sans-serif; } background-position: 5px 0px; } + +/* Icones de fonctions */ + +.icone36, icone36-danger { + border: none; + padding: 0px; + margin: 0px; + text-align: center; + vertical-align: top; + text-align: center; + text-decoration: none; +} +.icone36 a, .icone36 a:hover, icone36-danger a, .icone36-danger a:hover { + text-decoration: none; +} +.icone36 a img { + margin: 0px; + display: inline; + padding: 3px; + background-color: #eeeeee; + border: 1px solid #cccccc; + filter: alpha(opacity=100); + -moz-border-radius: 5px; +} +.icone36 a:hover img { + margin: 0px; + display: inline; + padding: 3px; + background-color: white; + border: 1px solid #666666; + filter: alpha(opacity=100); + -moz-border-radius: 5px; +} +.icone36-danger a img { + margin: 0px; + display: inline; + padding: 3px; + background-color: white; + border: 2px solid #ff9999; + filter: alpha(opacity=100); + -moz-border-radius: 5px; +} +.icone36-danger a:hover img { + margin: 0px; + display: inline; + padding: 3px; + background-color: white; + border: 2px solid red; + filter: alpha(opacity=100); + -moz-border-radius: 5px; +} +.icone36-danger a span { + font-family: Verdana, Arial, Sans, sans-serif; + font-weight: bold; + font-size: 10px; + color: red; display: block; margin: 2px; + filter: DropShadow(Color=white, OffX=1, OffY=1, Positive=1) DropShadow(Color=#cccccc, OffX=-1, OffY=-1, Positive=1); + width: 100% +} +.icone36 a span { + font-family: Verdana, Arial, Sans, sans-serif; + font-weight: bold; + font-size: 10px; + color: #666666; display: block; margin: 2px; + filter: DropShadow(Color=white, OffX=1, OffY=1, Positive=1) DropShadow(Color=#cccccc, OffX=-1, OffY=-1, Positive=1); + width: 100% +} +.icone36 a:hover span { + font-family: Verdana, Arial, Sans, sans-serif; + font-weight: bold; + font-size: 10px; + color: #000000; display: block; margin: 2px; + filter: DropShadow(Color=white, OffX=1, OffY=1, Positive=1) DropShadow(Color=#cccccc, OffX=-1, OffY=-1, Positive=1); + width: 100%; +} + + /* Icones 48 * 48 et 24 * 24 */ .cellule36, .cellule48 { @@ -108,31 +189,32 @@ body { font-family: Verdana,Arial,Sans,sans-serif; } text-decoration: none; } .cellule36 a, .cellule48 a { - display: block; text-align: center; background: url(img_pack/rien.gif) no-repeat top center; -} -.cellule36 a.selection { - display: block; text-align: center; background: url(img_pack/pave-blanc-36.png) no-repeat top center; -} -.cellule48 a.selection { - display: block; text-align: center; background: url(img_pack/pave-blanc-48.png) no-repeat top center; -} -.cellule36 a:hover { - background: url(img_pack/pave-gris-36.png) no-repeat top center; + display: block; text-align: center; } -.cellule48 a:hover { - background: url(img_pack/pave-gris-48.png) no-repeat top center; -} -.cellule36 a img { - border: 0px; margin: 6px; display: inline; -} -.cellule36 a.selection img, .cellule36 a:hover img { - border: 0px; margin: 6px; display: inline; +.cellule36 a img, .cellule48 a img { + margin: 0px; + display: inline; + padding: 4px; + border: 0px; + filter: alpha(opacity=70); } -.cellule48 a img { - border: 0px; margin: 3px; display: inline; +.cellule36 a.selection img, .cellule48 a.selection img { + margin: 0px; + display: inline; + padding: 3px; + background-color: white; + border: 1px solid #aaaaaa; + filter: alpha(opacity=100); + -moz-border-radius: 5px; } -.cellule48 a.selection img, .cellule48 a:hover img { - border: 0px; margin: 3px; display: inline; +.cellule36 a:hover img, .cellule48 a:hover img { + margin: 0px; + display: inline; + padding: 3px; + background-color: #dddddd; + border: 1px solid #999999; + filter: alpha(opacity=100); + -moz-border-radius: 5px; } .cellule36 a span, .cellule48 a span { color: #666666; display: block; margin: 2px; @@ -226,12 +308,22 @@ a.cellule-h:hover, a.cellule-h:hover a.cellule-h, a.cellule-h a.cellule-h:hover text-decoration: none; color: #000000; } -a.cellule-h div.cellule-h-icone { - background: url(img_pack/pave-gris-24.png) no-repeat center <?php echo $left; ?>; +a.cellule-h div.cell-i { + padding: 1px; + border: 0px; + margin: 0px; + margin-<?php echo $right; ?>: 3px; + filter: alpha(opacity=50); } -a.cellule-h:hover div.cellule-h-icone { - background: url(img_pack/pave-blanc-24.png) no-repeat center <?php echo $left; ?>; +a.cellule-h:hover div.cell-i { + padding: 0px; + border: 1px solid #999999; + background-color: white; + -moz-border-radius: 5px; + margin: 0px; + margin-<?php echo $right; ?>: 3px; } + a.cellule-h table { border: none; padding: 0px; @@ -246,10 +338,15 @@ a.cellule-h img { height: 24px; border: none; margin: 3px; - margin-<?php echo $right; ?>: 6px; background-repeat: no-repeat; background-position: center center; } +a.cellule-h img { + filter: alpha(opacity=40); +} +a.cellule-h:hover img { + filter: alpha(opacity=100); +} a.cellule-h a.aide img { width: 12px; height: 12px; @@ -262,11 +359,12 @@ a.cellule-h-texte { text-align: <?php echo $left; ?>; font-family: Verdana, Arial, Sans, sans-serif; font-weight: bold; - font-size: 11px; + font-size: 9px; color: #606060; padding: 4px; margin: 3px; - border: 1px dashed #aaaaaa; + border: 1px solid #dddddd; + -moz-border-radius: 5px; background-color: #f0f0f0; width: 92%; } @@ -276,6 +374,7 @@ a.cellule-h-texte { } a.cellule-h-texte:hover { text-decoration: none; + color: black; border-right: solid 1px white; border-bottom: solid 1px white; border-left: solid 1px #666666; @@ -395,6 +494,7 @@ td.icone a img { } .r-h { height: 24px; background: url('img_pack/rond-h-24.gif') repeat-x bottom; + text-align: <? echo $left; ?>; } .r-hd { width: 5px; height: 24px; background: url('img_pack/rond-hd-24.gif') no-repeat left bottom; @@ -416,6 +516,7 @@ td.icone a img { } .r-c { background: white; padding: 2px; + text-align: <? echo $left; ?>; } @@ -429,6 +530,7 @@ td.icone a img { } .e-h { height: 24px; background: url('img_pack/cadre-h.gif') repeat-x bottom; + text-align: <? echo $left; ?>; } .e-hd { width: 5px; height: 24px; background: url('img_pack/cadre-hd.gif') no-repeat left bottom; @@ -450,6 +552,7 @@ td.icone a img { } .e-c { background: #e0e0e0; padding: 2px; + text-align: <? echo $left; ?>; } -- GitLab