From 9b380274dcc75e06c0cdc110f91cc8f0c4738aeb Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 29 May 2008 18:33:36 +0000 Subject: [PATCH] =?utf8?q?MOD=20mise=20en=20production=20(pas=20tout=20?= =?utf8?q?=C3=A0=20fait=20fini)=20MOD=20compatibilit=C3=A9=20de=20CSS2=20a?= =?utf8?q?vec=20le=20code=20XHTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- css/2/euphorik.css | 26 +++++++++- css/2/pageMinichat.css | 28 +++++++++-- doc/TODO.txt | 10 ++-- img/css2/fleche_bulle.png | Bin 0 -> 234 bytes index.html | 14 +++--- js/euphorik.js | 14 +++--- js/pageAdmin.js | 20 ++++---- js/pageMinichat.js | 4 +- sessions/css2.session | 17 +++++++ tools/jsmin.rb | 10 ++-- tools/mise_en_prod.rb | 98 ++++++++++++++++++++++---------------- 11 files changed, 159 insertions(+), 82 deletions(-) create mode 100644 img/css2/fleche_bulle.png create mode 100644 sessions/css2.session diff --git a/css/2/euphorik.css b/css/2/euphorik.css index d15acad..a39c3b8 100755 --- a/css/2/euphorik.css +++ b/css/2/euphorik.css @@ -16,7 +16,7 @@ body { color: #EEEEEE; /*text-align: center;*/ /* uniquement pour IE */ background-color: #DFDFDF; - background-image: url(../../img/css1/fond.png) + background-image: url(../../img/css2/fond.png) } #container { @@ -111,7 +111,7 @@ ul#menu { #logo { z-index: 10; - background-image: url(../../img/css1/logo_2.png); + background-image: url(../../img/css2/logo_2.png); width: 253px; height: 37px; position: absolute; @@ -174,6 +174,28 @@ div#info .boutons div { div#info .boutons div:hover { background-color: #bc0000; } + +/***** Les infos bulles *****/ +#flecheBulle { + position: absolute; + z-index: 50; + width: 15px; + height: 8px; + background-image: url(../../img/css2/fleche_bulle.png); + display: none +} +#messageBulle { + position: absolute; + z-index: 50; + color: #ffffff; + background-color: #164200; + display: none; + font-size: 10px; +} +#messageBulle p { + padding: 3px 6px; +} + .captcha { display:none diff --git a/css/2/pageMinichat.css b/css/2/pageMinichat.css index da92691..527f650 100755 --- a/css/2/pageMinichat.css +++ b/css/2/pageMinichat.css @@ -89,7 +89,7 @@ #page.minichat form .return { height: 16px; width: 32px; - background-image: url(../../img/css1/return.png); + background-image: url(../../img/css2/return.png); background-repeat: no-repeat; background-position: 5px 2px; vertical-align: top; @@ -98,7 +98,7 @@ #page.minichat form .smiles { height: 16px; width: 16px; - background-image: url(../../img/css1/bouton_smiles.png); + background-image: url(../../img/css2/bouton_smiles.png); background-repeat: no-repeat; background-position: 2px 2px; vertical-align: top; @@ -177,6 +177,11 @@ margin-left: 3px; } + +#page.minichat div.message .pseudo:after { + content: ":" +} + #page.minichat div.message .pseudo, #page.minichat form .pseudo { margin-left: 4px; @@ -206,8 +211,12 @@ }*/ #page.minichat #conversations .repondA { - margin-left: 4px; - color: #bd7a11 + color: #bd7a11; + margin-right: 3px; +} + +#page.minichat #conversations .repondA:after { + content: ">" } /*#page.minichat #conversations .contenu { @@ -221,6 +230,10 @@ background-color: #4f5519; } +#page.minichat #conversations .extraire:after { + content: ">" +} + #page.minichat #conversations .extraire:hover { background-color: #818c27 } @@ -238,7 +251,9 @@ background-color: #7d1b1b; cursor: pointer; } - +#page.minichat #conversations .titre .fermer:after { + content: "x" +} #page.minichat #conversations .titre .fermer:hover { background-color: #c95656 } @@ -251,6 +266,9 @@ #page.minichat #conversations .titre .lien { float: right } +#page.minichat #conversations .titre .lien:after { + content: "c" +} #page.minichat #conversations .titre .lien, #page.minichat #conversations .titre .next, diff --git a/doc/TODO.txt b/doc/TODO.txt index 5b165f7..ad4ba21 100755 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -1,13 +1,13 @@ == TODO == === v1.0 === -* Rendre compatible IE 7 (pfff..) -* Stocker quelque part la version de la BD - * Créer une table "proprietes" contenant des tuples {propriete, nom, val} +* Rendre compatible IE 7 (pfff..) +* Définir la bonne feuille de style au chargement de la page pour éviter le "clignotement" pas beau + * Le cookie envoyé par le client doit permettre de retrouver le user * Finir le script de mise en production * Make des modules. * Compactage des js lors de la mise en production (afin d'optimiser la bande passante lors de l'accès au site), regarder comment fait jQuery. - * Modifier le script pour virer les lignes matchant /^\W*;;;.*$/ + * Modifier le script pour virer les lignes matchant /^\W*;;.*$/ * Virer les commentaires dans les pages HTML * processus : 1) copie des fichiers (+minimisation) @@ -172,6 +172,8 @@ [ok] Créer un style common puis adapter les CSS (classic et cold -> web2.0) * Alignement du menu, du troll et des trolls de la partie admin à l'aide de line-height [ok] Finir les options d'affichage des bulles et des dates +[ok] Stocker quelque part la version de la BD + * Créer une table "proprietes" contenant des tuples {propriete, nom, val} === Bugs === 1 : Critique diff --git a/img/css2/fleche_bulle.png b/img/css2/fleche_bulle.png new file mode 100644 index 0000000000000000000000000000000000000000..627fed06ca834ba6a0f7bef099b1a6c2e173c3b6 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^{6NgX!3HGNE-(EAq!^2X+?^QKos)S9lS| zxv6<249-QVi6yBi3gww484B*6z5(HleBwYwuAVNAArhC9MT(PtoOe)5NJ&UYP&nQY z{#!yqGEpXor(!FAlBV(|1w*z2CP^7;DGZz3*32rDY*;6_JgtOzL#7G`M=K-4l6sMC UaVK|40S#pEboFyt=akR{05AnY5&!@I literal 0 HcmV?d00001 diff --git a/index.html b/index.html index c70b03d..dd82f4a 100755 --- a/index.html +++ b/index.html @@ -4,7 +4,10 @@ euphorik.ch - + + " type="text/css" media="screen" > @@ -24,15 +27,14 @@ - +
diff --git a/js/euphorik.js b/js/euphorik.js index ca84a02..a5116ce 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -771,7 +771,7 @@ Client.prototype.enregistrement = function(login, password) Client.prototype.connexion = function(messageJson) { - ;;; dumpObj(messageJson) + ;; dumpObj(messageJson) thisClient = this jQuery.ajax( { @@ -783,7 +783,7 @@ Client.prototype.connexion = function(messageJson) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "error") thisClient.util.messageDialogue(data["error_message"]) else @@ -850,7 +850,7 @@ Client.prototype.flush = function(async) var thisClient = this var ok = true - ;;; dumpObj(this.getJSONProfile()) + ;; dumpObj(this.getJSONProfile()) jQuery.ajax( { async: async, @@ -861,7 +861,7 @@ Client.prototype.flush = function(async) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "error") { thisClient.util.messageDialogue(data["error_message"]) @@ -1028,7 +1028,7 @@ PageEvent.prototype.waitEvent = function(funSend, funReceive) for (v in poulpe) dataToSend[v] = poulpe[v] - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) this.attenteCourante = jQuery.ajax({ type: "POST", @@ -1038,7 +1038,7 @@ PageEvent.prototype.waitEvent = function(funSend, funReceive) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) funReceive(data) @@ -1076,7 +1076,7 @@ function initialiserListeStyles(client) } // charge dynamiquement le script de debug -;;; jQuery.ajax({async : false, url : "js/debug.js", dataType : "script"}) +;; jQuery.ajax({async : false, url : "js/debug.js", dataType : "script"}) // le main $(document).ready( diff --git a/js/pageAdmin.js b/js/pageAdmin.js index 2373cab..faf5f8c 100644 --- a/js/pageAdmin.js +++ b/js/pageAdmin.js @@ -91,7 +91,7 @@ PageAdmin.prototype.posterTroll = function() "content" : content } - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) jQuery.ajax( { type: "POST", @@ -101,7 +101,7 @@ PageAdmin.prototype.posterTroll = function() success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "ok") { @@ -132,7 +132,7 @@ PageAdmin.prototype.majIPs = function() "cookie" : this.client.cookie } - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) jQuery.ajax( { type: "POST", @@ -142,7 +142,7 @@ PageAdmin.prototype.majIPs = function() success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "list_banned_ips") { @@ -213,7 +213,7 @@ PageAdmin.prototype.deban = function(ip) "ip" : ip } - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) jQuery.ajax( { type: "POST", @@ -223,7 +223,7 @@ PageAdmin.prototype.deban = function(ip) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) switch(data["reply"]) { case "error" : @@ -402,7 +402,7 @@ Trolls.prototype.modifier = function(id, content) "content" : content } - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) jQuery.ajax( { type: "POST", @@ -412,7 +412,7 @@ Trolls.prototype.modifier = function(id, content) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "error") { thisTrolls.util.messageDialogue(data["error_message"]) @@ -436,7 +436,7 @@ Trolls.prototype.supprimer = function(id) "troll_id" : id } - ;;; dumpObj(dataToSend) + ;; dumpObj(dataToSend) jQuery.ajax( { type: "POST", @@ -446,7 +446,7 @@ Trolls.prototype.supprimer = function(id) success: function(data) { - ;;; dumpObj(data) + ;; dumpObj(data) if (data["reply"] == "error") { thisTrolls.util.messageDialogue(data["error_message"]) diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 461c924..03bf142 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -226,7 +226,7 @@ PageMinichat.prototype.envoyerMessage = function(pseudo, message) this.client.pseudo = pseudo - ;;; dumpObj(this.getJSONMessage(pseudo, message, repondA)) + ;; dumpObj(this.getJSONMessage(pseudo, message, repondA)) jQuery.ajax( { url : "request", @@ -239,7 +239,7 @@ PageMinichat.prototype.envoyerMessage = function(pseudo, message) }, success : function(data, textStatus) { - ;;; dumpObj(data) + ;; dumpObj(data) if(data["reply"] == "ok") { diff --git a/sessions/css2.session b/sessions/css2.session new file mode 100644 index 0000000..6a6b5f0 --- /dev/null +++ b/sessions/css2.session @@ -0,0 +1,17 @@ +# SciTE session file + +buffer.1.path=/home/gburri/projets/euphorik/css/2/euphorik.css +buffer.1.position=1 +buffer.1.current=1 + +buffer.2.path=/home/gburri/projets/euphorik/css/2/pageAbout.css +buffer.2.position=1 + +buffer.3.path=/home/gburri/projets/euphorik/css/2/pageAdmin.css +buffer.3.position=1 + +buffer.4.path=/home/gburri/projets/euphorik/css/2/pageMinichat.css +buffer.4.position=1 + +buffer.5.path=/home/gburri/projets/euphorik/css/2/pageProfileRegister.css +buffer.5.position=130 diff --git a/tools/jsmin.rb b/tools/jsmin.rb index 00fd804..05a5e7d 100644 --- a/tools/jsmin.rb +++ b/tools/jsmin.rb @@ -66,12 +66,14 @@ end # peek() is used to see if a '/' is followed by a '/' or '*'. def mynext() c = get - if (c == "/") - if(peek == "/") + # saute les commentaires (également les lignes commencant pas ;;) + if (c == "/" or c == ";") + prochain = peek + if(prochain == "/" or prochain == ";") while(true) c = get - if (c <= "\n") - return c + if (c[0] <= "\n"[0]) + return c end end end diff --git a/tools/mise_en_prod.rb b/tools/mise_en_prod.rb index fa2923f..356e2f6 100755 --- a/tools/mise_en_prod.rb +++ b/tools/mise_en_prod.rb @@ -1,45 +1,59 @@ -#!/usr/bin/ruby -=begin -Copyright 2008 Grégory Burri - -This file is part of Euphorik. - -Euphorik 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 3 of the License, or -(at your option) any later version. - -Euphorik 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 Euphorik. If not, see . -=end - - -def copy_files(dest, opt) - `rsync #{opt} index.html #{dest}` - `rsync #{opt} -r css #{dest}` - `rsync #{opt} -r img #{dest}` - #`rsync #{opt} -r js #{dest}` - `rsync #{opt} -r lightbox #{dest}` - `rsync #{opt} -r modules/include #{dest}/modules` - `rsync #{opt} -r modules/ebin #{dest}/modules` - `rsync #{opt} -r pages #{dest}` - - # copie des js avec minification - -end +#!/usr/bin/ruby +=begin +Copyright 2008 Grégory Burri + +This file is part of Euphorik. + +Euphorik 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 3 of the License, or +(at your option) any later version. + +Euphorik 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 Euphorik. If not, see . +=end + -if __FILE__ == $0 - # la destination - $dest = 'gburri@euphorik.ch:/var/www/euphorik' - $dest = $*[0] if $*.length > 1 - # les options communes - $opt = '' - - copy_files($dest, $opt) +### MAKE +Dir.chdir('../modules') +puts `make` + +### COPIE +$rep_remote = '/tmp/euphorik' #'/var/www/euphorik' +$host = 'localhost' #"gburri@euphorik.ch:#{rep_remote}" +$opt_rsync = '' + +def creer_remote_rep(rep) + begin + `ssh #{$host} "mkdir #{$rep_remote}/#{rep}"` + rescue + end end + +creer_remote_rep('BD') + +Dir.chdir('..') +print `rsync #{$opt_rsync} index.html #{$host}:#{$rep_remote}` +print `rsync #{$opt_rsync} favicon.ico #{$host}:#{$rep_remote}` +print `rsync #{$opt_rsync} -r css #{$host}:#{$rep_remote}` +print `rsync #{$opt_rsync} -r --exclude 'autres' img #{$host}:#{$rep_remote}` + +# copie des js avec minification +rep_js = 'js' +creer_remote_rep(rep_js) +Dir.entries(rep_js).each{|fichier| + if fichier[0..0] != "." and fichier != "debug.js" + puts "Minimisation et copie de #{fichier}" + print `tools/jsmin.rb < #{rep_js}/#{fichier} | ssh #{$host} "cat > #{$rep_remote}/#{rep_js}/#{fichier}"` + end +} + +creer_remote_rep('modules') +`rsync #{$opt_rsync} -r modules/ebin #{$host}:#{$rep_remote}/modules` +`rsync #{$opt_rsync} -r pages #{$host}:#{$rep_remote}` -- 2.43.0