<?xml 
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
>

<channel xml:lang="fr">
	<title>Paris-Beyrouth</title>
	<link>http://www.paris-beyrouth.org/</link>
	
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>




<item xml:lang="fr">
		<title>Plugin SPIP : &#171; CSS imbriqu&#233;s &#187;, pr&#233;-processeur de CSS</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-spip-css-imbriques-pre</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-spip-css-imbriques-pre</guid>
		<dc:date>2011-09-27T12:58:01Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Voici un pr&#233;-processeur de CSS destin&#233; aux webmestres qui manipulent sous SPIP des fichiers CSS particuli&#232;rement complexes, avec des imbrications &#224; la cha&#238;ne. Une des difficult&#233;s des CSS, lorsque l'on commence &#224; entrer dans les plus petits d&#233;tails de l'interface d'un site Web et que l'on veut donc cr&#233;er des classes tr&#232;s discrimin&#233;es selon les endroits, est que l'on se retrouve alors avec des listes interminables de classes aux noms de plus en plus longs. Une id&#233;e qui circule sur le Web (par exemple sur (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Voici un pr&#233;-processeur de CSS destin&#233; aux webmestres qui manipulent sous SPIP des fichiers CSS particuli&#232;rement complexes, avec des imbrications &#224; la cha&#238;ne.&lt;/p&gt; &lt;dl class='spip_document_871 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;a href=&quot;http://files.spip.org/spip-zone/css_imbriques.zip&quot; title='Zip - 18.3 ko' type=&quot;application/zip&quot;&gt;&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 18.3 ko' style='height:52px;width:52px;' /&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dt class='spip_doc_titre' style='width:120px;'&gt;&lt;strong&gt;T&#233;l&#233;charger le plugin &#171; CSS imbriqu&#233;s &#187;&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Une des difficult&#233;s des CSS, lorsque l'on commence &#224; entrer dans les plus petits d&#233;tails de l'interface d'un site Web et que l'on veut donc cr&#233;er des classes tr&#232;s discrimin&#233;es selon les endroits, est que l'on se retrouve alors avec des listes interminables de classes aux noms de plus en plus longs.&lt;/p&gt; &lt;p&gt;Une id&#233;e qui circule sur le Web (par exemple sur le site de &lt;a href=&quot;http://shauninman.com/archive/2007/06/27/css_server_side_pre_processor&quot; class='spip_out' rel='external'&gt;Shaun Inman&lt;/a&gt;) consiste &#224; &#233;crire ses styles selon une m&#233;thode contenant des enrichissements par rapport &#224; la norme, puis &#224; faire passer ces fichiers par un pr&#233;-processeur qui les transforme en fichiers CSS standards.&lt;/p&gt; &lt;p&gt;SPIP propose d&#233;j&#224; quelques solutions pour aller dans ce sens :
&lt;br /&gt;&#8212; en passant une feuille de style par le filtre &lt;code class='spip_code' dir='ltr'&gt;direction_css&lt;/code&gt;, on peut l'adapter automatiquement aux langues qui s'&#233;crivent de droite &#224; gauche, l'interface &#233;tant int&#233;gralement invers&#233;e ;
&lt;br /&gt;&#8212; avec les balises &lt;code class='spip_code' dir='ltr'&gt;#SET&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;#GET&lt;/code&gt;, si l'on r&#233;alise ses styles sous forme de squelettes, on a un syst&#232;me de variables tr&#232;s pratique (par exemple : d&#233;finir une seule fois la valeur d'une couleur puis l'utiliser dans plusieurs classes ; par la suite, pour changer la couleur de l'ensemble, il suffit d'intervenir uniquement dans la d&#233;finition de la variable).&lt;/p&gt; &lt;p&gt;Il manque, &#224; mon avis, une autre possibilit&#233; offerte par le pr&#233;-processeur de Shaun Inman : pouvoir &#233;crire ses d&#233;finitions de classes sous forme imbriqu&#233;e (&lt;i&gt;nested&lt;/i&gt;), pour en clarifier la lecture.&lt;/p&gt; &lt;p&gt;C'est l'objet du pr&#233;sent plugin.&lt;/p&gt; &lt;p&gt;Voici un court morceau de code CSS standard :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#aaaaaa&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; li &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; li a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; li&lt;span style=&quot;color: #6666ff;&quot;&gt;.on&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; li&lt;span style=&quot;color: #6666ff;&quot;&gt;.on&lt;/span&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#ffaaaa&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/64c4a600016afa766eb14b45a0a545e4.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On peut consid&#233;rer que ce code est artificiellement compliqu&#233;, mais en r&#233;alit&#233;, quand on entre dans les d&#233;tails d'une mise en page, on se retrouve rapidement avec des syst&#232;mes d'h&#233;ritages beaucoup plus complexe.&lt;/p&gt; &lt;p&gt;L'id&#233;e de la m&#233;thode des CSS imbriqu&#233;s est de saisir une classe qui d&#233;pend d'une autre classe &lt;i&gt;&#224; l'int&#233;rieur&lt;/i&gt; de sa d&#233;finition, sans r&#233;p&#233;ter la hi&#233;rarchie des intitul&#233;s.&lt;/p&gt; &lt;p&gt;Ainsi le code pr&#233;c&#233;dent s'&#233;crit :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ul&lt;span style=&quot;color: #cc00cc;&quot;&gt;#principal&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;border&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;1px&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;solid&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;200px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#aaaaaa&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; li &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; li&lt;span style=&quot;color: #6666ff;&quot;&gt;.on&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#ffaaaa&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/da1059b5d2da49adda199903b78e89a5.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Il existe une autre subtilit&#233; : la possibilit&#233;, dans une classe imbriqu&#233;e, de faire pr&#233;c&#233;der le nom de la classe imbriqu&#233;e par un point suivi d'un espace ; cela indique que cette classe est une variante de la pr&#233;c&#233;dente (plus simplement : on &#171; colle &#187; les deux noms). Voici par exemple une mani&#232;re de code &lt;code class='spip_code' dir='ltr'&gt;a.spip_in&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;a.spip_out&lt;/code&gt; :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_in&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;...&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_out&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;...&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/fddb72c8389c53dbdc1b1e48f087dd90.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;et avec des variantes de survol :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_in&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; ...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #3333ff;&quot;&gt;:hover &lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;...&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_out&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; ...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; . &lt;span style=&quot;color: #3333ff;&quot;&gt;:hover &lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;...&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/ebbebc7564097e2783ce3f6623f26921.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notez bien : cette notation n'est pas standard et ne correspond pas &#224; la norme des CSS. Il s'agit d'un syst&#232;me de notation qui doit &#234;tre imp&#233;rativement traduit de mani&#232;re logicielle (par le pr&#233;sent plugin) pour qu'un fichier CSS standard soit envoy&#233; au visiteur.&lt;/p&gt; &lt;p&gt;Remarque : l'utilisation du plugin ne vous interdit pas d'utiliser la notation d'une mani&#232;re respectant la norme : le plugin admet des fichiers totalement standards, ou totalement imbriqu&#233;s, ou utilisant les deux notations (la m&#233;thode imbriqu&#233;e n'&#233;tant qu'une extension de la norme).&lt;/p&gt; &lt;p&gt;Pour que ce plugin traite votre fichier CSS, il faut l'utiliser de la m&#234;me fa&#231;on qu'on utilise &lt;code class='spip_code' dir='ltr'&gt;direction_css&lt;/code&gt;, ou en compl&#233;ment de ce dernier, en passant le fichier par &lt;code class='spip_code' dir='ltr'&gt;css_imbriques&lt;/code&gt; :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;monstyle.css&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|direction_css&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|css_imbriques&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&quot; type=&quot;text/css&quot; /&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Si vous r&#233;alisez votre feuille de style sous forme de squelette (ma m&#233;thode pr&#233;f&#233;r&#233;e), il suffit d'ajouter, en fin de squelettes (par exemple &#171; css.html &#187;), la balise :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#FILTRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;css_imbriques_decouper&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Une autre m&#233;thode pour utiliser des CSS imbriqu&#233;s dans une feuille de style sous forme de squelette (ici, &lt;code class='spip_code' dir='ltr'&gt;couleur.html&lt;/code&gt;) consiste &#224; l'appeler ainsi :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;link &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; rel=&quot;stylesheet&quot; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#URL_PAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;couleur&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|direction_css&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|css_imbriques&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; type=&quot;text/css&quot; /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/a9c5e8912e906064fc768d7a22281012.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Cette derni&#232;re m&#233;thode est particuli&#232;rement compatible avec la fonction de SPIP qui regroupe diff&#233;rents fichiers CSS dans un m&#234;me fichier compact&#233;.&lt;/p&gt; &lt;p&gt;Notez enfin que ces fonctions, contrairement &#224; &lt;code class='spip_code' dir='ltr'&gt;direction_css&lt;/code&gt;, ne traitent pas les &lt;code class='spip_code' dir='ltr'&gt;@import&lt;/code&gt; pr&#233;sents &#224; l'int&#233;rieur des fichiers CSS. Dans la version actuelle, il y a des chances que ces &lt;code class='spip_code' dir='ltr'&gt;@import&lt;/code&gt; disparaissent (bug &#224; corriger pour une prochaine version).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Pseudo-styles&lt;/h3&gt;
&lt;p&gt;La version 1.2 du plugin introduit des pseudo-styles, non standards, permettant de coder facilement des fonctionnalit&#233;s des CSS (g&#233;n&#233;ralement qualifi&#233;es de &#171; CSS 3 &#187;) qui demandent habituellement plusieurs lignes de code, voire des codes tr&#232;s farfelus pour assurer une compatibilit&#233; maximale pour le webkit (Safari, Chrome), Mozilla, Opera et MSIE.&lt;/p&gt; &lt;p&gt;Ces pseudo-styles, &#224; l'image des raccourcis propres &#224; Mozilla (styles commen&#231;ant par &lt;code class='spip_code' dir='ltr'&gt;-moz&lt;/code&gt;) ou le webkit (&lt;code class='spip_code' dir='ltr'&gt;-webkit&lt;/code&gt;), commencent ici par le &lt;code class='spip_code' dir='ltr'&gt;-spip&lt;/code&gt;. Il permettent en une seule ligne, assez simple, de produire automatique les diff&#233;rents codes n&#233;cessaires &#224; l'affichage coh&#233;rent sur les diff&#233;rents navigateurs.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Opacit&#233;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Voici le pseudo-style pour g&#233;rer l'opacit&#233; :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.exemple&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -spip-opacity&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0.4&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/7d9643267a49063e5e45c33f33f0f250.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ce &lt;code class='spip_code' dir='ltr'&gt;-spip-opacity&lt;/code&gt; est ainsi transform&#233; par le plugin :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.exemple&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -webkit-opacity&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0.4&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -moz-opacity&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0.4&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; opacity&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0.4&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -ms-filter&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;progid:DXImageTransform.Microsoft.Alpha(opacity=40)&quot;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; zoom&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/de538269d5328a91c5673f3d9665cfad.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#192; partir d'une seule d&#233;claration (&lt;code class='spip_code' dir='ltr'&gt;-spip-opacity&lt;/code&gt;), on obtient ainsi automatiquement le code fonctionnant sous d'anciennes versions de Safari, sous Mozilla 3.5, sous Chrome et Safari, ainsi que sous Internet Explorer (notez l'utilisation d'un &#171; filtre &#187; MSIE et la valeur d'opacit&#233; adapt&#233;e.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Coins arrondis&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Le code de base arrondi d'un coup tous les coins :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-border-radius&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;6px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On peut pr&#233;ciser une valeur pour chacun des coins du pav&#233; :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-border-top-right-radius&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-border-top-left-radius&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;3px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-border-bottom-right-radius&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;14px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-border-bottom-left-radius&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;2px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/c6c6709eee7c959d28f998bbac7eec97.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Ombre de bo&#238;te&lt;/strong&gt;&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-box-shadow&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;3px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;2px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;10px&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#666666&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La premi&#232;re valeur (&lt;code class='spip_code' dir='ltr'&gt;3px&lt;/code&gt;) est le d&#233;calage de l'ombre port&#233;e vers la droite. La seconde (&lt;code class='spip_code' dir='ltr'&gt;2px&lt;/code&gt;) est le d&#233;calage vers le bas. La troisi&#232;me (&lt;code class='spip_code' dir='ltr'&gt;10px&lt;/code&gt;) est l'intensit&#233; du floutage de l'ombre. La derni&#232;re valeur est la couleur.&lt;/p&gt; &lt;p&gt;En mettant les deux premi&#232;res valeurs &#224; z&#233;ro, on obtient assez classiquement un halo autour de la bo&#238;te, et non une ombre port&#233;e.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;D&#233;grad&#233;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-gradient&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#f0f0f0&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#bbbbbb&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Je n'ai pas trouv&#233; de consensus sur la syntaxe exacte d'un d&#233;grad&#233; de fond, aussi je me suis inspir&#233; de ce que propose le W3C, en essayant de faire aussi simple que possible. &#192; noter : les diff&#233;rents navigateurs ont de puissantes particularit&#233;s, mais la m&#233;thode propos&#233;e est simple et le rendu est tr&#232;s proche sous Mozilla, Safari, Chrome et... Internet Explorer (m&#234;me de vieilles versions !).&lt;/p&gt; &lt;p&gt;Le code produit est assez farfelu :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;color: #3333ff;&quot;&gt;:-webkit-&lt;/span&gt;gradient&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;linear&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;left&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;left&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;bottom&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;from&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#f0f0f0&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;to&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#bbbbbb&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-image&lt;/span&gt;&lt;span style=&quot;color: #3333ff;&quot;&gt;:-moz-linear-&lt;/span&gt;gradient&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#f0f0f0&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#bbbbbb&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;filter&lt;span style=&quot;color: #3333ff;&quot;&gt;:progid&lt;/span&gt;&lt;span style=&quot;color: #3333ff;&quot;&gt;:DXImageTransform&lt;/span&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.Microsoft&lt;/span&gt;.gradient&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;GradientType&lt;span style=&quot;color: #00AA00;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;startColorstr&lt;span style=&quot;color: #00AA00;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'#f0f0f0'&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt;endColorstr&lt;span style=&quot;color: #00AA00;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'#bbbbbb'&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/e1323fab76ea3e204a3274a4d7b21738.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La syntaxe de notre pseudo-style est la suivante :
&lt;br /&gt;&#8212; &#171; top &#187; l'orientation du d&#233;grad&#233; (de haut en bas) ; l'autre valeur possible est &#171; left &#187; (de gauche &#224; droite) ; il n'est pas possible de faire un d&#233;grad&#233; en biais (MSIE ne sait pas le faire, et les d&#233;grad&#233;s verticaux et horizontaux repr&#233;sentent en pratique un bonne partie des besoins) ;
&lt;br /&gt;&#8212; la premi&#232;re couleur est la couleur de d&#233;part (ici, la couleur du haut),
&lt;br /&gt;&#8212; la seconde est la couleur d'arriv&#233;e (ici, en bas).&lt;/p&gt; &lt;p&gt;Pour assurer la compatibilit&#233; avec les navigateurs qui ne g&#232;rent pas les d&#233;grad&#233;s, on pensera &#224; indiquer, dans la feuille de style, la couleur de fond que l'on souhaite. Notez bien : il faut imp&#233;rative indiquer cette valeur &lt;i&gt;avant&lt;/i&gt; le d&#233;grad&#233;, sinon on &#233;crase le d&#233;grad&#233; :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#dddddd&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-gradient&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#f0f0f0&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#bbbbbb&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/c0d9c060ee9da56938364df43dbe6093.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;i&gt;Important :&lt;/i&gt; les couleurs de d&#233;grad&#233; doivent &#234;tre indiqu&#233;es sous forme hexad&#233;cimale &#171; classique &#187; &#224; six lettres (pour la compatibilit&#233; du code pour MSIE) ; par ailleurs, l'actuel compacteur de CSS livr&#233; avec SPIP est en effet un peu trop &#171; efficace &#187;, et transforme les codes couleurs compos&#233;s de trois paires de lettres identiques (du genre &lt;code class='spip_code' dir='ltr'&gt;#ff0066&lt;/code&gt; transform&#233; en &lt;code class='spip_code' dir='ltr'&gt;#f06&lt;/code&gt;) d'une fa&#231;on qui ne permet plus au d&#233;grad&#233; MSIE de fonctionner. Si vous utilisez le compactage des CSS (et vous devriez le faire...), choisissez des couleurs qui n'ont pas d'&#233;quivalent &#224; trois lettres (tel que &lt;code class='spip_code' dir='ltr'&gt;#ff0066&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Fond de bloc semi-transparent&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Pour r&#233;aliser des fonds de bloc color&#233;s semi-transparents, dans les navigateurs modernes, il suffit de d&#233;finir la couleur de fond en &lt;code class='spip_code' dir='ltr'&gt;rgba&lt;/code&gt; (on code les 3 composantes de couleurs, suivies d'une valeur d'opacit&#233;).&lt;/p&gt; &lt;p&gt;&#201;videmment, pas sous MSIE.&lt;/p&gt; &lt;p&gt;Le pseudo-raccourci suivant transforme les valeurs pour qu'elles fonctionnent &#171; normalement &#187; en RGBA, et fabriquent le filtre appropri&#233; pour MSIE.&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -spip-&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; rgba &lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;255&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;127&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On peut aussi utiliser des pourcentages :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -spip-&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; rgba &lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #933;&quot;&gt;100%&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;100%&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;50%&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0.5&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notez bien : n'ins&#233;rez pas de &lt;code class='spip_code' dir='ltr'&gt;background-color&lt;/code&gt; traditionnel avec ce style, sinon il &#233;crasera l'effet de transparence sous MSIE.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Transitions&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;La versions 1.3 du plugin traite les transitions CSS :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-transition&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-transition-property&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-transition-duration&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-transition-timing-function&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-transition-delay&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/125077729ab5297f97248fe29b474eda.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Par exemple, pour effectuer une transition sur la couleur du fond, on peut coder ainsi :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#eeeeeee&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -spip-transition-property&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; -spip-transition-duration&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; 0.1s&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a&lt;span style=&quot;color: #3333ff;&quot;&gt;:hover &lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#cccccc&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/2db3eff6e99a7dea3475536a05d49545.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Text shadow&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;L'ombre port&#233;e du texte se code avec &lt;code class='spip_code' dir='ltr'&gt;-spip-text-shadow&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Son int&#233;r&#234;t &#224; limit&#233; &#224; une situation (qui n'est cependant pas inutile du tout) : lorsque les d&#233;calages horizontal et vertical sont nuls, c'est qu'on souhaite r&#233;aliser un halo autour du texte.&lt;/p&gt; &lt;p&gt;Dans ce cas, le plugin ins&#232;re un code compatible MSIE.&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;text-shadow&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;3px&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#000000&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Compatibilit&#233;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;D'apr&#232;s mes essais, la compatibilit&#233; est assez bonne, y compris avec MSIE. Habituellement, ces effets se d&#233;gradent bien, visuellement, lorsqu'ils ne sont pas actifs. On perd des effets de relief, mais la page n'est pas &#171; d&#233;form&#233;e &#187; (trucs qui d&#233;passent partout) et le texte reste lisible.&lt;/p&gt; &lt;p&gt;Sous MSIE, on pourra &#234;tre amen&#233; &#224; changer l'ordre des diff&#233;rents styles, certains ayant tendance &#224; en d&#233;sactiver d'autres (il semble par exemple que l'opacit&#233;, plac&#233;e apr&#232;s la d&#233;grad&#233;, annule le d&#233;grad&#233;).&lt;/p&gt; &lt;p&gt;Les deux choses &#224; surveiller principalement sont :
&lt;br /&gt;&#8212; la d&#233;gradation de l'opacit&#233; ; &lt;br /&gt;&#8212; la mention explicite d'une couleur de fond avant la d&#233;finition d'un d&#233;grad&#233; de fond.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Clearfix&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;On a souvent besoin d'&#234;tre certain que les &#171; float &#187; sont d&#233;gag&#233;s &#224; la fin d'un bloc (qui contient, donc des blocs flottants &#224; gauche et/ou &#224; droite). On souhaite &#233;viter d'ajouter un &#171; clear:both &#187; &#224; la suite de ce bloc : on veut que ce soit le bloc lui-m&#234;me qui contienne l'ordre de lib&#233;rer les blocs flottants &#224; sa suite.&lt;/p&gt; &lt;p&gt;Pour cela, il existe la m&#233;thode dite &#171; clearfix &#187;, qui consiste &#224; cr&#233;er une classe sp&#233;cifique, &lt;code class='spip_code' dir='ltr'&gt;.clearfix&lt;/code&gt;, que l'on ins&#232;re dans le code HTML des blocs concern&#233;s.&lt;/p&gt; &lt;p&gt;Voir par exemple :
&lt;a href=&quot;http://nicolasgallagher.com/micro-clearfix-hack/&quot; class='spip_url spip_out' rel='external'&gt;http://nicolasgallagher.com/micro-c...&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Le plugin CSS imbriqu&#233;s propose un pseudo-style qui donne le m&#234;me r&#233;sultat :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;float&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; fix&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le gros avantage de cette m&#233;thode, c'est qu'il n'est pas n&#233;cessaire d'ajouter une classe dans le code HTML de la page : on peut avec ce pseudo-style forcer le comportement de n'importe quelle class sans modification de code HTML.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Pseudo-styles libres&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;En dehors des cas pr&#233;vus ci-dessus, tout pseudo-style commen&#231;ant par &lt;code class='spip_code' dir='ltr'&gt;-spip-&lt;/code&gt; est automatiquement transform&#233; dans les d&#233;clinaisons pour Mozilla, Webkit, MSIE, Opera et en CSS3 &#171; simple &#187;.&lt;/p&gt; &lt;p&gt;Noter que le pr&#233;processeur ne v&#233;rifie pas que ces styles existent r&#233;ellement.&lt;/p&gt; &lt;p&gt;Ainsi,&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-spip-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;est transform&#233; en :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-moz-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-webkit-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-khtml-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-ms-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;-o-user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;user-select&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/9adeadf63a6abec34acedae61d414c92.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class=&quot;spip&quot;&gt;@media&lt;/h3&gt;
&lt;p&gt;Les CSS3 introduisent la notion de @media, qui permet de d&#233;finir des comportements de classes selon divers crit&#232;res (support, largeur d'affichage...).&lt;/p&gt; &lt;p&gt;&#192; partir de la version &lt;strong&gt;1.8&lt;/strong&gt;, le plugin CSS imbriqu&#233;s est compatible avec ces pseudo-classes d&#233;finissan les &lt;code class='spip_code' dir='ltr'&gt;@media&lt;/code&gt;. Il introduit de plus une subtilit&#233; qui permet de d&#233;finir les @media &#224; l'int&#233;rieur d'une hi&#233;rarchie (puisqu'ici, les CSS peuvent-&#234;tre imbriqu&#233;s), le plugin reconstituant ensuite des classes de @media correctes (&#224; la &#171; racine &#187; des d&#233;clarations), regroupant les diff&#233;rentes d&#233;finitions d'un m&#234;me m&#233;dia.&lt;/p&gt; &lt;p&gt;Cela permet de d&#233;finir localement la variante d'une classe en fonction du m&#233;dia, le plugin regroupant ensuite toutes les variantes de classe d'un m&#234;me m&#233;dia en fin de fichier.&lt;/p&gt; &lt;p&gt;Par exemple :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.colonne_texte&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #a1a100;&quot;&gt;@media all and (min-width: 640px) {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #a1a100;&quot;&gt;@media all and (min-width: 1024px) {&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#fond_degrade&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;100%&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;400px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;position&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;absolute&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;top&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;left&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/aead710d73f190dd81a8f8e7875caeb1.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;devient :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.colonne_texte&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.colonne_texte&lt;/span&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;blue&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #a1a100;&quot;&gt;@media all and (min-width: 640px){&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #6666ff;&quot;&gt;.colonne_texte&lt;/span&gt; a &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;red&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #a1a100;&quot;&gt;@media all and (min-width: 1024px){&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#fond_degrade&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;100%&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;height&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;400px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;position&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;absolute&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;top&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;left&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;0px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/175922de836f413684e7ac14076214ef.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class=&quot;spip&quot;&gt;Mise &#224; jour&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;1.0.&lt;/strong&gt; Accepter les crit&#232;res sur plusieurs lignes, du style :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a&lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_in&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;a&lt;span style=&quot;color: #6666ff;&quot;&gt;.spip_out&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;text-decoration&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #cc00cc;&quot;&gt;#ff0000&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/4b94c8a8bf6e9cc60758760ba71e91bd.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;1.1.&lt;/strong&gt; Les &lt;code class='spip_code' dir='ltr'&gt;ereg&lt;/code&gt; sont remplac&#233;s par des &lt;code class='spip_code' dir='ltr'&gt;mb_ereg&lt;/code&gt; (compatibilit&#233; PHP 5.3).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.2.&lt;/strong&gt; Introduction de pseudo-styles &lt;code class='spip_code' dir='ltr'&gt;-spip...&lt;/code&gt; permettant de cr&#233;er automatiquement des styles compatibles Webkit, CSS3, Mozilla et MSIE. Tous les &lt;code class='spip_code' dir='ltr'&gt;mb_ereg&lt;/code&gt; sont remplac&#233;s par des &lt;code class='spip_code' dir='ltr'&gt;preg&lt;/code&gt; plus classiques.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.3.&lt;/strong&gt; Introduction des pseudo-styles pour les transitions CSS.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.4.&lt;/strong&gt; Introduction du pseudo-style &lt;code class='spip_code' dir='ltr'&gt;-spip-background-color&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.5.&lt;/strong&gt; Introduction de &lt;code class='spip_code' dir='ltr'&gt;-spip-text-shadow&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.6.&lt;/strong&gt; Introduction de la fonction &lt;code class='spip_code' dir='ltr'&gt;couleur_rgba($couleur, $alpha)&lt;/code&gt; qui permet de fabriquer une couleur RGBA &#224; partir d'un code hexad&#233;cimal.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.7.&lt;/strong&gt; Introduction de &lt;code class='spip_code' dir='ltr'&gt;-spip-float: fix;&lt;/code&gt; qui permet de faire adopter par n'importe quelle classe le comportement &#171; clearfix &#187; (sans devoir ajouter de classe dans le code HTML).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.8.&lt;/strong&gt; Compatibilit&#233; avec les @media queries.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.9.&lt;/strong&gt; Ajout du comportement &lt;a href=&quot;http://css3pie.com/&quot; class='spip_out' rel='external'&gt;PIE.htc&lt;/a&gt;, ins&#233;r&#233; automatiquement dans les pseudo-comportements &lt;code class='spip_code' dir='ltr'&gt;-spip-border-radius&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;-spip-box-shadow&lt;/code&gt;. Ces deux pseudo-classes fonctionnent donc d&#233;sormais sous MSIE.&lt;/p&gt; &lt;p&gt;&#192; noter : dans ces deux pseudo-classes, si aucune &lt;code class='spip_code' dir='ltr'&gt;position&lt;/code&gt; n'est indiqu&#233;e explicitement, le plugin injecte automatiquement une &lt;code class='spip_code' dir='ltr'&gt;position:relative;&lt;/code&gt;, de fa&#231;on &#224; assurer le bon fonctionnement sous Internet Explorer.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2.0.&lt;/strong&gt; Gestion des mediaqueries imbriqu&#233;es. Le plugin &#171; inverse &#187; la structure par la suite.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2.1.&lt;/strong&gt; Suppression du comportement PIE.htc (et de l'ajout de &#171; position:relative &#187;) : r&#233;sultat beaucoup trop al&#233;atoire.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2.3.&lt;/strong&gt; Retour de PIE.htc, mais on peut le d&#233;sactiver avec :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;_UTILISER_PIE_HTC&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Si on n'ins&#232;re pas PIE.htc, le plugin n'ins&#232;re plus les mentions de &lt;code class='spip_code' dir='ltr'&gt;position&lt;/code&gt; dans les classes pseudo-classes &lt;code class='spip_code' dir='ltr'&gt;border-radius&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;box-shadow&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2.4.&lt;/strong&gt; Tous pseudo-style commen&#231;ant par &lt;code class='spip_code' dir='ltr'&gt;-spip-&lt;/code&gt; est transform&#233; dans ses &#233;quivalents &lt;code class='spip_code' dir='ltr'&gt;-moz-&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;-webkit-&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;-o-&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;-ms-&lt;/code&gt;&#8230;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3.0.&lt;/strong&gt; Compatibilit&#233; avec SPIP 3.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3.1&lt;/strong&gt; Compatibilit&#233; avec les &lt;code class='spip_code' dir='ltr'&gt;@keyframes&lt;/code&gt;. Par coh&#233;rence, on pourra utiliser &lt;code class='spip_code' dir='ltr'&gt;@-spip-keyframes&lt;/code&gt;. Dans tous les cas, le plugin fabriquera toutes les versions avec les diff&#233;rents pr&#233;fixes.&lt;/p&gt; &lt;p&gt;Et pour appeler ces keyframes, utiliser &#233;videmment &lt;code class='spip_code' dir='ltr'&gt;-spip-animation&lt;/code&gt;, qui fabriquera &#233;galement les versions avec les pr&#233;fixes n&#233;cessaires.&lt;/p&gt; &lt;p&gt;&lt;i&gt;Remarque.&lt;/i&gt; Le minifieur de CSS int&#233;gr&#233; a SPIP n'autorise pas d'intitul&#233; de CSS baptis&#233; &#171; &lt;code class='spip_code' dir='ltr'&gt;0%&lt;/code&gt; &#187; (il le remplace par &#171; &lt;code class='spip_code' dir='ltr'&gt;0&lt;/code&gt; &#187;). Ce qui bloque les keyframes qui commencent par cet intitul&#233;. Le pr&#233;-processeur remplace donc automatiquement l'intitul&#233; &#171; &lt;code class='spip_code' dir='ltr'&gt;0%&lt;/code&gt; &#187; par &#171; &lt;code class='spip_code' dir='ltr'&gt;from&lt;/code&gt; &#187;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Plugin &#171; Supprimer l'enveloppe du mailto&#187;</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-supprimer-l-enveloppe-du</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-supprimer-l-enveloppe-du</guid>
		<dc:date>2011-09-27T12:48:20Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>En comp&#233;tition pour le titre de plugin le plus idiot... SPIP ajoute une petite enveloppe avant tous les liens hypertextes de type mailto. C'est astucieux et pratique, puisque &#231;a permet d'identifier les liens qui ouvrent le logiciel de mail. Mais &#224; chaque fois que je d&#233;veloppe un site, &#171; on &#187; me demande de supprimer la petite enveloppe (les gens, tout de m&#234;me...). Alors plut&#244;t que de retrouver la ligne de CSS responsable de cet effet &#224; chaque fois, voici un petit plugin qui ne fait que cela. Il (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;En comp&#233;tition pour le titre de plugin le plus idiot...&lt;/p&gt; &lt;p&gt;SPIP ajoute une petite enveloppe avant tous les liens hypertextes de type &lt;code class='spip_code' dir='ltr'&gt;mailto&lt;/code&gt;. C'est astucieux et pratique, puisque &#231;a permet d'identifier les liens qui ouvrent le logiciel de mail.&lt;/p&gt; &lt;p&gt;Mais &#224; chaque fois que je d&#233;veloppe un site, &#171; on &#187; me demande de supprimer la petite enveloppe (les gens, tout de m&#234;me...). Alors plut&#244;t que de retrouver la ligne de CSS responsable de cet effet &#224; chaque fois, voici un petit plugin qui ne fait que cela.&lt;/p&gt; &lt;p&gt;Il suffit de l'activer, et d'utiliser le &lt;code class='spip_code' dir='ltr'&gt;#INSERT_HEAD&lt;/code&gt; dans ses squelettes.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		
		<enclosure url="http://files.spip.org/spip-zone/supprimer_enveloppe_mailto.zip" length="2000" type="application/zip" />
		

	</item>
<item xml:lang="fr">
		<title>Plugin &#171; Listes d'articles compl&#232;tes &#187;</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-listes-d-articles-completes</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-listes-d-articles-completes</guid>
		<dc:date>2011-09-27T12:33:38Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Ce plugin modifie la pr&#233;sentation des listes d'articles dans l'espace priv&#233; en ajoutant ; le surtitre, le soustitre, un logo deux fois plus grand, le nombre de visites, la popularit&#233; de l'article. T&#233;l&#233;charger le plugin Selon les droits de l'utilisateur connect&#233; et le statut de chaque article, le plugin affiche des liens suppl&#233;mentaires pour : acc&#233;der &#224; la page de statistiques de l'article, modifier l'article, afficher l'article en ligne. Attention, le plugin surcharge les fonctions (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;span class='spip_document_869 spip_documents spip_documents_center'&gt;
&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L500xH247/Capture_d_ecran_2010-02-24_a_22-08-38-a3877.png' width='500' height='247' alt=&quot;&quot; style='height:247px;width:500px;' /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Ce plugin modifie la pr&#233;sentation des listes d'articles dans l'espace priv&#233; en ajoutant ;
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; le surtitre,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; le soustitre,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; un logo deux fois plus grand,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; le nombre de visites,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; la popularit&#233; de l'article.&lt;/p&gt; &lt;dl class='spip_document_870 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;a href=&quot;http://files.spip.org/spip-zone/listes_articles_completes.zip&quot; title='Zip - 3.3 ko' type=&quot;application/zip&quot;&gt;&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 3.3 ko' style='height:52px;width:52px;' /&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dt class='spip_doc_titre' style='width:120px;'&gt;&lt;strong&gt;T&#233;l&#233;charger le plugin&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Selon les droits de l'utilisateur connect&#233; et le statut de chaque article, le plugin affiche des liens suppl&#233;mentaires pour :
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; acc&#233;der &#224; la page de statistiques de l'article,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; modifier l'article,
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; afficher l'article en ligne.&lt;/p&gt; &lt;p&gt;Attention, le plugin surcharge les fonctions &lt;code class='spip_code' dir='ltr'&gt;inc_afficher_articles&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;inc_formater_article&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Plugin &#171; Inclure Ajaxload &#187;</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-inclure-ajaxload</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-inclure-ajaxload</guid>
		<dc:date>2011-09-27T12:31:48Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>La fonction introduite par ce plugin est similaire au principe d'Ajax Parallel Loading introduit dans Zpip, tel que d&#233;crit ici. La m&#233;thode de fonctionnement est cependant diff&#233;rente, et surtout ce plugin est destin&#233; &#224; &#234;tre utilis&#233; dans n'importe quel jeu de squelettes (non Zpip, donc). Il ajoute un crit&#232;re, ajaxload, &#224; la balise #INCLURE, par exemple : [(#INCLUREfond=inc/footerid_rubriqueajaxload)] Au lieu d'ins&#233;rer dans le code source de la page le contenu de inc/footer avec la variable (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;La fonction introduite par ce plugin est similaire au principe d'&lt;i&gt;Ajax Parallel Loading&lt;/i&gt; introduit dans Zpip, &lt;a href=&quot;http://www.spip-blog.net/Ajax-Parallel-Loading-accelerer-un-site-SPIP.html&quot; class='spip_out' rel='external'&gt;tel que d&#233;crit ici&lt;/a&gt;. La m&#233;thode de fonctionnement est cependant diff&#233;rente, et surtout ce plugin est destin&#233; &#224; &#234;tre utilis&#233; dans n'importe quel jeu de squelettes (non Zpip, donc).&lt;/p&gt; &lt;dl class='spip_document_868 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;a href=&quot;http://files.spip.org/spip-zone/inclure-ajaxload.zip&quot; title='Zip - 4.8 ko' type=&quot;application/zip&quot;&gt;&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 4.8 ko' style='height:52px;width:52px;' /&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dt class='spip_doc_titre' style='width:120px;'&gt;&lt;strong&gt;Plugins &#171; Inclure Ajaxload &#187;&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Il ajoute un crit&#232;re, &lt;code class='spip_code' dir='ltr'&gt;{ajaxload}&lt;/code&gt;, &#224; la balise &lt;code class='spip_code' dir='ltr'&gt;#INCLURE&lt;/code&gt;, par exemple :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#INCLURE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inc/footer&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;ajaxload&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Au lieu d'ins&#233;rer dans le code source de la page le contenu de &lt;code class='spip_code' dir='ltr'&gt;inc/footer&lt;/code&gt; avec la variable d'environnement &lt;code class='spip_code' dir='ltr'&gt;id_rubrique&lt;/code&gt;, le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{ajaxload}&lt;/code&gt; modifie compl&#232;tement le fonctionnement : seul un lien hypertexte dot&#233; d'un code sp&#233;cifique est ins&#233;r&#233; dans la page. &#192; l'affichage de la page chez le visiteur, une fonction Javascript charge dynamiquement le contenu n&#233;cessaire et l'ins&#232;re &#224; l'endroit pr&#233;vu.&lt;/p&gt; &lt;p&gt;Il est imp&#233;ratif d'utiliser &lt;code class='spip_code' dir='ltr'&gt;#INSERT_HEAD&lt;/code&gt; dans le squelette appelant (le code Javascript n&#233;cessaire au bon fonctionnement est alors ins&#233;r&#233; dans la page).&lt;/p&gt; &lt;p&gt;Quelques remarques :
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; seuls les crit&#232;res sp&#233;cifi&#233;s dans l'appel &lt;code class='spip_code' dir='ltr'&gt;#INCLURE&lt;/code&gt; sont pass&#233;s &#224; la page appelante ; si ces crit&#232;res sont communs &#224; plusieurs pages, on b&#233;n&#233;ficie ainsi du chargement d'&#233;l&#233;ments communs &#224; ces pages (cache navigateur) ; &lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; si Javascript est d&#233;sactiv&#233; chez le visiteur, une version fonctionnant sans Javascript est activ&#233;e ;
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; de mani&#232;re automatique, les moteurs de recherche se voient proposer le contenu complet (identique &#224; la version sans Javascript), ce qui leur permet d'indexer correctement les pages et de profiter de la navigation du site ;
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; attention, ne pas ins&#233;rer dans ces morceaux charg&#233;s dynamiquement des publicit&#233;s ou des compteurs de visites (notamment Google), qui &#171; &#233;crivent &#187; via Javascript, ce qui g&#233;n&#233;ralement provoque un affichage de page blanche ; plus g&#233;n&#233;ralement, &#233;viter les chargements Ajax &#224; l'int&#233;rieur de ces &#233;l&#233;ments charg&#233;s dynamiquement, ils deviennent difficiles &#224; ma&#238;triser.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;M&#233;thode alternative : chargement d'un fichier statique&lt;/h3&gt;
&lt;p&gt;La &lt;strong&gt;version 0.7&lt;/strong&gt; du plugin introduit une nouvelle m&#233;thode : l'inclusion dynamique de fichiers HTML parfaitement statiques. La m&#233;thode &#171; normale &#187; fonctionne sur la base des &#171; noisettes Ajax &#187; de SPIP : les fichiers inclus sont donc bien pages SPIP dot&#233;es de toutes les caract&#233;ristiques habituelles (notamment la possibilit&#233; d'avoir du contenu dynamique).&lt;/p&gt; &lt;p&gt;La m&#233;thode alternative permet d'inclure non des pages SPIP, mais des petits fichiers HTML statiques, stock&#233;s (brutalement...) dans &lt;code class='spip_code' dir='ltr'&gt;/local/cache-ajaxload&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Pour cela, le crit&#232;re devient :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;ajaxload=html&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Dans ce cas, au calcul de la page, la noisette est imm&#233;diatement calcul&#233;e, et son contenu est stock&#233; &#171; en dur &#187; dans &lt;code class='spip_code' dir='ltr'&gt;/local/cache-ajaxload&lt;/code&gt;. Au chargement de la page, c'est ce fichier HTML qui est directement ins&#233;r&#233; dans la page.&lt;/p&gt; &lt;p&gt;Pour les visites des robots de moteurs de recherche ou sans Javascript, ce sont ces morceaux &#171; statiques &#187; qui sont directement inclus.&lt;/p&gt; &lt;p&gt;L'avantage principal de cette m&#233;thode est que ces fichiers sont appel&#233;s &#171; hors SPIP &#187;, et m&#234;me hors PHP. Ce sont des fichiers HTML enti&#232;rement statiques. On gagne en vitesse et en charge du serveur. Il est tr&#232;s probable &#233;galement que la visite du site par un robot de moteur de recherche soit beaucoup moins lourde pour le serveur avec cette m&#233;thode.&lt;/p&gt; &lt;p&gt;L'inconv&#233;nient, c'est que ces fichiers sortent totalement de SPIP :
&lt;br /&gt;&#8212; ils sont totalement statiques, et ne doivent donc contenir aucun &#233;l&#233;ment d&#233;pendant d'une &lt;code class='spip_code' dir='ltr'&gt;#SESSION&lt;/code&gt;, du statut du visiteur, ni code PHP non pr&#233;calcul&#233; (tel que l'affichage de l'heure ou de l'IP du visiteur) ; &lt;br /&gt;&#8212; le syst&#232;me n'interroge pas la dur&#233;e du cache selon la m&#233;thode SPIP ; la dur&#233;e de vie d'un tel fichier est fix&#233;e par d&#233;faut &#224; 2 heures ; on peut forcer une autre dur&#233;e, dans l'appel, avec un crit&#232;re suppl&#233;mentaire (ici : 24 heures) :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;ajaxload=html&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;ttl_ajaxload=60*60*24&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;L'appel du footer pourrait donc se faire, avec cette m&#233;thode, ainsi :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#INCLURE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inc/footer&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;ajaxload=html&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;ttl_ajaxload=60*60*24&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class=&quot;spip&quot;&gt;Pour les ceusses qui se la p&#232;tent en Javascript&lt;/h3&gt;
&lt;p&gt;Deux m&#233;thodes avanc&#233;es sont destin&#233;es &#224; ceux qui voudraient g&#233;rer eux-m&#234;mes les appels Ajax (pas de chargement automatique par ce plugin, donc, mais &#171; &#224; la demande &#187; selon du code d&#233;velopp&#233; par le webmestre lui-m&#234;me). Ces m&#233;thodes retournent directement l'URL du fichier qui contient la noisette, &#224; charge pour le cr&#233;ateur du site de savoir comment il souhaite les utiliser :
&lt;br /&gt;&#8212; &lt;code class='spip_code' dir='ltr'&gt;{ajaxload=url}&lt;/code&gt; retourne l'URL de la noisette dynamique ;
&lt;br /&gt;&#8212; &lt;code class='spip_code' dir='ltr'&gt;{ajaxload=url_html}&lt;/code&gt; retourne l'URL du fichier HTML statique.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&#201;volutions&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Version 0.5.&lt;/strong&gt; Les inclusions &lt;code class='spip_code' dir='ltr'&gt;{ajax}{ajaxload}&lt;/code&gt; conservent d&#233;sormais le fonctionnement du &lt;code class='spip_code' dir='ltr'&gt;{ajax}&lt;/code&gt;. On peut donc ainsi charger des &#233;l&#233;ments pagin&#233;s (la pagination Ajax fonctionne &#224; nouveau).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 0.6.&lt;/strong&gt; Meilleure gestion du &lt;code class='spip_code' dir='ltr'&gt;&lt;meta refresh&gt;&lt;/code&gt;, notamment dans le cas de passage des robots.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 0.7.&lt;/strong&gt; Introduction de la m&#233;thode &lt;code class='spip_code' dir='ltr'&gt;{ajaxload=html}&lt;/code&gt; et du crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{ttl_ajaxload=60*60*24}&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 0.8.&lt;/strong&gt; Divers bugs corrig&#233;s concernant la navigation sans Javascript et sans cookies.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 1.0.&lt;/strong&gt; Ajout des m&#233;thodes &lt;code class='spip_code' dir='ltr'&gt;{ajaxload=url}&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;{ajaxload=url_html}&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 1.1.&lt;/strong&gt; Insertion plus fine du code du &lt;code class='spip_code' dir='ltr'&gt;&lt;meta refresh&gt;&lt;/code&gt;, uniquement dans les pages o&#249; il est n&#233;cessaire. (En revanche, l'insertion du Javascript reste syst&#233;matique, de fa&#231;on &#224; ne pas changer, d'une page &#224; l'autre, le fichier Javascript cr&#233;&#233; par le compactage de SPIP.)&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Plugin &#171; Cr&#233;er Sprites CSS &#187;</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-creer-sprites-css</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/plugin-creer-sprites-css</guid>
		<dc:date>2011-09-27T12:24:13Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Il n'est pas rare d'utiliser de nombreuses petites vignettes diss&#233;min&#233;es sur une page. Un menu de navigation dont les titres seraient des images (g&#233;n&#233;r&#233;es automatiquement par SPIP, tant qu'&#224; faire) contient une flopp&#233;e de petites images. Chacune de ces images provoque un appel individuel au serveur Web, ce qui ralentit leur chargement (il vaut mieux charger une &#171; grosse &#187; image que la somme des &#171; petites &#187; images qui la composent) et augmente le travail du serveur. Ce plugin permet, de mani&#232;re aussi (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Il n'est pas rare d'utiliser de nombreuses petites vignettes diss&#233;min&#233;es sur une page. Un menu de navigation dont les titres seraient des images (g&#233;n&#233;r&#233;es automatiquement par SPIP, tant qu'&#224; faire) contient une flopp&#233;e de petites images.&lt;/p&gt; &lt;p&gt;Chacune de ces images provoque un appel individuel au serveur Web, ce qui ralentit leur chargement (il vaut mieux charger une &#171; grosse &#187; image que la somme des &#171; petites &#187; images qui la composent) et augmente le travail du serveur.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_255 spip_documents spip_documents_right' style='float:right; width:100px;'&gt;&lt;a href=&quot;http://www.paris-beyrouth.org/IMG/jpg/taming0020.jpg&quot; type=&quot;image/jpeg&quot;&gt;&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L100xH150/taming0020-51f07-7030d.jpg' width='100' height='150' alt='JPEG' style='height:150px;width:100px;' /&gt;&lt;/a&gt;&lt;/span&gt;Ce plugin permet, de mani&#232;re aussi simple que possible, de regrouper plusieurs vignettes en une seule &#171; grande &#187; image (qui les contient toutes), que l'on affiche &#224; la place de chaque petite vignette. Un style int&#233;gr&#233; au code permet d'afficher la bonne partie de la grande image (celle qui correspond exactement &#224; la vignette).&lt;/p&gt; &lt;dl class='spip_document_867 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;a href=&quot;http://files.spip.org/spip-zone/creer_sprites_css.zip&quot; title='Zip - 2.6 ko' type=&quot;application/zip&quot;&gt;&lt;img src='http://www.paris-beyrouth.org/local/cache-vignettes/L52xH52/zip-2bcd4.png' width='52' height='52' alt='Zip - 2.6 ko' style='height:52px;width:52px;' /&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dt class='spip_doc_titre' style='width:120px;'&gt;&lt;strong&gt;Plugin &#171; Cr&#233;er Sprites CSS &#187;&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Par exemple, je r&#233;alise un menu de navigation sur mon site en transformant chaque titre de rubrique en image (image typographique) ; chaque titre est r&#233;alis&#233; en deux versions : le texte en noir, et le texte en blanc (pour la rubrique active et pour le survol de toutes les rubriques). J'ai 9 rubriques principales, plus le lien &#171; Accueil du site &#187; ; je g&#233;n&#232;re donc 20 petites images typographiques. Un visiteur charge donc 20 petits fichiers diff&#233;rents.&lt;/p&gt; &lt;p&gt;En utilisant le plugin &#171; Cr&#233;er Sprites CSS &#187;, je regroupe automatiquement ces 20 vignettes dans un seul &#171; gros &#187; fichier, et c'est lui que j'affiche &#224; la place de chaque image initiale, avec un astuce CSS qui permet d'afficher exactement la partie de l'image dont j'ai besoin. Le visiteur charge d&#233;sormais un unique fichier au lieu de 20.&lt;/p&gt; &lt;p&gt;Pour regrouper diff&#233;rentes images en un unique fichier, il faut les faire passer par le filtre &lt;code class='spip_code' dir='ltr'&gt;|filtre{nomsprite.png}&lt;/code&gt;. &lt;code class='spip_code' dir='ltr'&gt;nomsprite.png&lt;/code&gt; est choisi par le webmestre :
&lt;br /&gt;&#8212; en utilisant plusieurs noms, on peut ainsi fabriquer diff&#233;rents sprites, soit dans le corps d'une m&#234;me page, soit entre pages diff&#233;rentes (par exemple un sprite qui changerait pour chaque article),
&lt;br /&gt;&#8212; la terminaison choisie pour le fichier (ici &lt;code class='spip_code' dir='ltr'&gt;.png&lt;/code&gt;) d&#233;termine le format final du sprite.&lt;/p&gt; &lt;p&gt;Voici par exemple comment je r&#233;alise mon menu de navigation principal :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;li&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;&lt;span style=&quot;color: #CA5200;&quot;&gt;#URL_SITE_SPIP&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;normal&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:accueil_site&lt;span style=&quot;color: #E1861A;&quot;&gt;|image_typo&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;police=mafonte.ttf&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;navigation.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;:&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;actif&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:accueil_site&lt;span style=&quot;color: #E1861A;&quot;&gt;|image_typo&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;police=mafonte.ttf&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;navigation.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;:&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #222;&quot;&gt;&lt;BOUCLE_navigation&lt;span style=&quot;color: #527EE0;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;RUBRIQUES&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_parent=0&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;par titre&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #222;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;&lt;span style=&quot;color: #CA5200;&quot;&gt;#URL_RUBRIQUE&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;normal&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#TITRE&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|image_typo&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;police=mafonte.ttf&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;navigation.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;actif&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#TITRE&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|image_typo&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;police=mafonte.ttf&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;navigation.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #222;&quot;&gt;&lt;/BOUCLE_navigation&lt;/span&gt;&lt;span style=&quot;color: #222;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/64cae53ae34024ef62a81733ad21c574.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le principe est le m&#234;me &#224; chaque fois : je prends mon texte, je le transforme en image typographique, puis je le fais passer par &lt;code class='spip_code' dir='ltr'&gt;|sprite{navigation.png}&lt;/code&gt;. Toutes ces images typographiques seront regroup&#233;es et remplac&#233;es par un seul &#171; gros &#187; fichier : &lt;code class='spip_code' dir='ltr'&gt;navigation.png&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Ailleurs dans le corps de ma page, j'ai trois vignettes explicatives. Initialement, ce sont trois &lt;code class='spip_code' dir='ltr'&gt;&lt;img src=&quot;monfichier.png&quot; alt=&quot;&quot; /&gt;&lt;/code&gt; ins&#233;r&#233;s dans mes squelettes. Pour les regrouper sous forme d'un sprite, je transforme le code ainsi :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images_site/fermer-addflip.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;boutons.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images_site/annonce-fullscreen-fr.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;boutons.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images_site/fullscreen.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;boutons.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/788273cdff4390c2861ac6c0eb9510cc.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ces trois images sont d&#233;sormais regroup&#233;es automatiquement dans un unique fichier, &lt;code class='spip_code' dir='ltr'&gt;boutons.png&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;J'effectue, enfin, la m&#234;me op&#233;ration pour r&#233;unir de petites vignettes de pr&#233;visualisation des documents joints de chaque article (mon site, tr&#232;s graphique, a souvent plus de 20 photographies associ&#233;es &#224; chaque article). De cette fa&#231;on, au lieu de charger 20 (jusqu'&#224; 100) petites vignettes, je n'en charge plus qu'une grande.&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#LOGO_DOCUMENT&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|image_reduire&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;0,90&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #E1861A;&quot;&gt;|sprite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;vignettes-&lt;span style=&quot;color: #CA5200;&quot;&gt;#ID_ARTICLE&lt;/span&gt;.jpg&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Notez bien :&lt;/strong&gt;
&lt;br /&gt;&#8212; Ce plugin est relativement rudimentaire, mais il r&#233;pond parfaitement &#224; mes besoins, et je l'utilise en production.
&lt;br /&gt;&#8212; Son fonctionnement est assez particulier par rapport aux habitudes des sprites CSS : il prend des images ins&#233;r&#233;es dans le document, et les transforme en images &#171; vides &#187; (transparentes) de m&#234;mes dimensions, et applique le sprite global en &lt;code class='spip_code' dir='ltr'&gt;background&lt;/code&gt; CSS. Il n'est pas destin&#233; &#224; traiter des images qui seraient &lt;i&gt;d&#233;j&#224;&lt;/i&gt; dans des &lt;code class='spip_code' dir='ltr'&gt;background&lt;/code&gt; CSS. (Mon id&#233;e &#233;tant qu'il est avant tout destin&#233; &#224; traiter des images g&#233;n&#233;r&#233;es par SPIP, et de telles images sont assez rarement utilis&#233;es dans des feuilles de style.)
&lt;br /&gt;&#8212; Attention : le nom que vous choisissez d&#233;termine le fichier final. Si vous utilisez plusieurs fois le m&#234;me nom pour des choses diff&#233;rentes (sur des pages diff&#233;rentes), vous &#233;craserez le fichier d'une page par l'autre. Faites attention au nom que vous choississez.
&lt;br /&gt;&#8212; Les images PNG transparentes deviendront des fond de CSS, que MSIE 6 g&#232;re mal (alors qu'il g&#232;re bien les PNG transparents affich&#233;s en tant qu'images). &lt;br /&gt;&#8212; La m&#233;thode retenue n'est pas vraiment adapt&#233;e pour g&#233;rer des images qui changent souvent (ne serait-ce que parce que le sprite conserve son nom, m&#234;me si on change son contenu).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Attention&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Une particularit&#233; de SPIP fait que le calcul de l'image ne se fait que dans le cas d'un squelette inclus, o&#249; dans le cas o&#249; un administrateur connect&#233; calcule la page au moins une fois (les boutons d'administration provoquant la fonction n&#233;cessaire).&lt;/p&gt; &lt;p&gt;L'usage &#171; simple &#187; de cette fonctionnalit&#233; fait qu'en g&#233;n&#233;ral, cela ne pose pas de gros probl&#232;me, puisqu'une fois que l'image a &#233;t&#233; calcul&#233;e, il n'est plus n&#233;cessaire de la recalculer.&lt;/p&gt; &lt;p&gt;La difficult&#233; viendra du cas o&#249; :
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; des &#171; sprites &#187; diff&#233;rents sont cr&#233;&#233;s automatiquement pour chaque page du site, et qu'il n'est donc pas envisageable que l'administrateur recalcule toutes ces pages une par une ;
&lt;br /&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; ces &#171; sprites &#187; ne sont pas calcul&#233;s dans des squelettes inclus.&lt;/p&gt; &lt;p&gt;Dans ce cas, il est possible d'ins&#233;rer&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#FILTRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;creer_sprites&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;dans le squelette pour provoquer correctement le calcul des sprites.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Trois plugins pour acc&#233;l&#233;rer encore son site SPIP</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/trois-plugins-pour-accelerer</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/trois-plugins-pour-accelerer</guid>
		<dc:date>2010-10-08T13:35:24Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>J'ai d&#233;j&#224; consacr&#233; deux articles &#224; l'am&#233;lioration de la vitesse d'un site sous SPIP. Le premier expliquait comment mettre en place, assez simplement, la parall&#233;lisation des chargements d'images sur plusieurs sous-noms de domaine ; assez simple, mais demandant tout de m&#234;me d'acc&#233;der &#224; la configuration du serveur Apache. Le second pr&#233;sentait diff&#233;rents r&#233;glages que l'on peut effectuer (soit dans SPIP, soit dans Apache, soit dans .htaccess pour am&#233;liorer son score PageSpeed, c'est-&#224;-dire am&#233;liorer la vitesse de (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;J'ai d&#233;j&#224; consacr&#233; deux articles &#224; l'am&#233;lioration de la vitesse d'un site sous SPIP. Le premier expliquait comment mettre en place, assez simplement, la &lt;a href=&quot;http://www.paris-beyrouth.org/tutoriaux-spip/article/parallelisation-des-chargements&quot; class='spip_in'&gt;parall&#233;lisation des chargements d'images sur plusieurs sous-noms de domaine&lt;/a&gt; ; assez simple, mais demandant tout de m&#234;me d'acc&#233;der &#224; la configuration du serveur Apache. Le second pr&#233;sentait diff&#233;rents r&#233;glages que l'on peut effectuer (soit dans SPIP, soit dans Apache, soit dans &lt;code class='spip_code' dir='ltr'&gt;.htaccess&lt;/code&gt; pour &lt;a href=&quot;http://www.paris-beyrouth.org/tutoriaux-spip/article/objectif-pagespeed-100-100-avec&quot; class='spip_in'&gt;am&#233;liorer son score PageSpeed&lt;/a&gt;, c'est-&#224;-dire am&#233;liorer la vitesse de chargement et de rendu de ses pages.&lt;/p&gt; &lt;p&gt;Ce troisi&#232;me article est consacr&#233; &#224; trois plugins de SPIP qui me permettent encore d'augmenter la r&#233;activit&#233; d'un site. Le r&#233;sultat est, dans certains cas, spectaculaire. &#192; nouveau, j'ai test&#233; ces solutions sur &lt;a href=&quot;http://www.flip-zone.com/&quot; class='spip_out' rel='external'&gt;Flip-Zone&lt;/a&gt;, notre site de mode, qui a les caract&#233;ristiques suivantes :
&lt;br /&gt;&#8212; beaucoup de pages (pr&#232;s de 2000),
&lt;br /&gt;&#8212; &#233;norm&#233;ment d'images (environ 50 000), et traitements sur toutes les images,
&lt;br /&gt;&#8212; beaucoup d'images &#224; afficher sur chaque page du site,
&lt;br /&gt;&#8212; une fois publi&#233;e, une page ne changera quasiment plus jamais.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Cache cool&lt;/h3&gt;
&lt;p&gt;Le plugin &lt;a href=&quot;http://www.spip-contrib.net/Cache-Cool,3251&quot; class='spip_out' rel='external'&gt;Cache cool&lt;/a&gt;, d&#233;velopp&#233; par C&#233;dric Morin, s'installe sur une version r&#233;cente de SPIP (au minimum 2.1). Il n&#233;cessite l'installation du plugin &lt;a href=&quot;http://plugins.spip.net/Job-Queue&quot; class='spip_out' rel='external'&gt;Job Queue&lt;/a&gt; (qui n'est pas, &#224; ma connaissance, document&#233;).&lt;/p&gt; &lt;p&gt;Une fois install&#233;, le plugin est imm&#233;diatement effectif.&lt;/p&gt; &lt;p&gt;Le principe du cache de SPIP est le suivant :
&lt;br /&gt;&#8212; lorsque j'arrive sur une page du site, SPIP regarde s'il existe une version d&#233;j&#224; sauvegard&#233;e de la page (un cache),
&lt;br /&gt;&#8212; il regarde la date de cr&#233;ation de ce fichier ;
&lt;br /&gt;&#8212; si cette date est r&#233;cente (par exemple, moins de deux heures), SPIP consid&#232;re que ce cache est utilisable, et l'exp&#233;die tel quel au visiteur ;
&lt;br /&gt;&#8212; en revanche, si ce cache est trop ancien, SPIP lance un nouveau calcul de la page, sauvegarde la nouvelle version calcul&#233;e en cache, et exp&#233;die le r&#233;sultat au visiteur.&lt;/p&gt; &lt;p&gt;C'est la derni&#232;re entr&#233;e qui peut poser probl&#232;me : recalculer la page peut prendre du temps. Sur Flip-Zone, quand le serveur est charg&#233;, cela peut prendre plusieurs secondes. Pendant ce temps-l&#224;, le visiteur ne voit rigoureusement rien s'afficher.&lt;/p&gt; &lt;p&gt;Or, sur un site avec beaucoup de pages, cette situation n'est pas rare : il suffit de visiter une page un peu ancienne du site, donc peu visit&#233;e, pour &#234;tre &#224; peu pr&#232;s certain que SPIP va lancer un recalcul avant de servir la page.&lt;/p&gt; &lt;p&gt;C'est l&#224; qu'intervient Cache cool. Au lieu de faire attendre le visiteur (parce qu'il recalcule le cache avant d'envoyer quoi que ce soit), il va alors (g&#233;n&#233;ralement) envoyer directement le contenu du cache &#171; p&#233;rim&#233; &#187;, et enregistrer le fait qu'il faut recalculer cette page. Le visiteur re&#231;oit donc quasiment instantan&#233;ment sa page (&#171; p&#233;rim&#233;e &#187;), et le calcul du nouveau cache est renvoy&#233; &#224; plus tard, et cela en t&#226;che de fond.&lt;/p&gt; &lt;p&gt;Sur un site comme Flip-Zone, le r&#233;sultat est spectaculaire : d&#232;s l'installation du plugin, une navigation dans le site semble instantan&#233;ment beaucoup plus r&#233;active.&lt;/p&gt; &lt;p&gt;Le plugin n'est sans doute pas adapt&#233; :
&lt;br /&gt;&#8212; aux sites ayant trop peu de trafic (la liste de pages &#224; recalculer s'allonge, sans qu'il y ait assez de visiteurs pour provoquer les calculs),
&lt;br /&gt;&#8212; aux sites dont le contenu de chaque page est cens&#233; &#234;tre mis &#224; jour souvent.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Inclure-Ajaxload&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://plugins.spip.net/Inclure-Ajaxload&quot; class='spip_out' rel='external'&gt;Le plugin Inclure-Ajaxload&lt;/a&gt; a &#233;t&#233; d&#233;velopp&#233; par Fil. Je l'ai repris r&#233;cemment pour rendre son utilisation plus g&#233;n&#233;rique, et introduire quelques automatismes suppl&#233;mentaires.&lt;/p&gt; &lt;p&gt;Son utilisation implique de modifier ses squelettes. Mais cela est particuli&#232;rement simple.&lt;/p&gt; &lt;p&gt;C&#233;dric a d&#233;crit une utilisation du chargement Ajax en parall&#232;le du contenu des pages dans &lt;a href=&quot;http://www.spip-blog.net/Ajax-Parallel-Loading-accelerer-un-site-SPIP.html&quot; class='spip_out' rel='external'&gt;un article du Spip Blog&lt;/a&gt;, technique d&#233;crite &#224; l'origine par Facebook, que C&#233;dric r&#233;sume ainsi :&lt;/p&gt;
&lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;
En r&#233;sum&#233;, pour ceux qui n'ont pas activ&#233; leur TOR ou ne comprennent pas l'anglais, l'auteur propose de rendre disponible les pages web dans le navigateur plus rapidement en les d&#233;coupant en morceaux :
&lt;br /&gt;&#8212; un morceau ossature principal envoy&#233; au plus vite au visiteur ;
&lt;br /&gt;&#8212; plusieurs morceaux de contenu (appel&#233;s pagelet), calcul&#233;s et envoy&#233;s s&#233;par&#233;ment.&lt;/p&gt; &lt;p&gt;La page compl&#232;te est reconstitu&#233;e dans le navigateur par une fonction javascript.&lt;/p&gt; &lt;p&gt;Ainsi, le rendu et l'interpr&#233;tation des CSS et JS peuvent d&#233;marrer plus t&#244;t dans le navigateur, et la page compl&#232;te peut &#234;tre construite par plusieurs processus s&#233;par&#233;s, en parall&#232;le, sur le serveur.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;C&#233;dric a inclut cet automatisme (sous le nom d'APL) directement dans ses squelettes Zpip. Malheureusement, le code est difficilement utilisable en dehors de Zpip, car il repose largement sur la structure m&#234;me des squelettes.&lt;/p&gt; &lt;p&gt;L'&#233;volution de Inclure-Ajaxload est donc destin&#233;e &#224; pouvoir adopter ces m&#233;thodes dans ses propres squelettes, sans devoir en passer par Zpip.&lt;/p&gt; &lt;p&gt;Le principe est le suivant.&lt;/p&gt; &lt;p&gt;&#8212; Dans mes squelettes, j'installe des morceaux de mes pages dans des squelettes s&#233;par&#233;s. Par exemple, le pied de page est install&#233; dans un squelette &lt;code class='spip_code' dir='ltr'&gt;inc/footer.html&lt;/code&gt;, et appel&#233; ainsi depuis chacun de mes squelettes :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #222&quot;&gt;&lt;INCLURE&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inc/footer&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span style=&quot;color: #222;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Cette forme d'inclusion est &#171; dynamique &#187;, c'est-&#224;-dire que le morceau de cache correspondant &#224; ce footer (commun &#224; de nombreuses pages) est ind&#233;pendant du cache principal.&lt;/p&gt; &lt;p&gt;Je pourrais &#233;galement l'appeler ainsi :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#INCLURE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inc/footer&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Dans cette inclusion (dite &#171; statique &#187;), le footer n'a pas de cache ind&#233;pendant, et est stock&#233; dans le cache global de la page qui l'appelle.&lt;/p&gt; &lt;p&gt;Pour utiliser Inclure-Ajaxload, je vais ajouter le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{ajaxload}&lt;/code&gt; dans l'appel de l'inclusion statique :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#INCLURE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inc/footer&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;ajaxload&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le code g&#233;n&#233;r&#233; est alors totalement diff&#233;rent. Le contenu de cette inclusion n'est plus du tout pr&#233;sent dans la page envoy&#233;e au visiteur. Seul un code tr&#232;s court (quelques caract&#232;res) est ins&#233;r&#233;.&lt;/p&gt; &lt;p&gt;Ensuite, dans l'ent&#234;te de la page (il faut donc bien utiliser &lt;code class='spip_code' dir='ltr'&gt;#INSERT_HEAD&lt;/code&gt;), un petit morceau de Javascript est ins&#233;r&#233; par le plugin. D&#232;s le chargement de la page par le visiteur, ce Javascript va d&#233;tecter le petit code tr&#232;s court, et demander au serveur de lui envoyer le contenu r&#233;el de l'inclusion, pour l'ins&#233;rer correctement dans la page.&lt;/p&gt; &lt;p&gt;Ainsi, la page est envoy&#233;e en deux temps au visiteur :
&lt;br /&gt;&#8212; la page &#171; all&#233;g&#233;e &#187; de ses inclusions est envoy&#233;e ; comme elle est plus courte et plus simple que la page compl&#232;te, elle s'affiche beaucoup plus rapidement ;
&lt;br /&gt;&#8212; d&#232;s l'affichage de la page all&#233;g&#233;e, les diff&#233;rents morceaux manquants sont appel&#233;s par Javascript et r&#233;ins&#233;r&#233;s (tr&#232;s rapidement) dans la page affich&#233;e.&lt;/p&gt; &lt;p&gt;Pour le visiteur, il y a une meilleure impression de r&#233;activit&#233; : quand il arrive sur une page, quelque chose s'affiche beaucoup plus rapidement. Et l'information se compl&#232;te rapidement apr&#232;s cet affichage initial.&lt;/p&gt; &lt;p&gt;Pour ma part, je n'utilise pas la technique compl&#232;te (j'ai d'autres imp&#233;ratifs qui limitent mes possibilit&#233;s de ce c&#244;t&#233;), mais je charge, en gros, ce qui appara&#238;t &#224; l'&#233;cran &#171; sans scroller &#187; ; tout ce qui est en bas de page (et qui est assez lourd) est charg&#233; dans un second temps.&lt;/p&gt; &lt;p&gt;Les quelques dizi&#232;mes de seconde gagn&#233;s &#224; l'affichage initial donnent r&#233;ellement une meilleure impression de r&#233;activit&#233;.&lt;/p&gt; &lt;p&gt;J'ai document&#233; le plugin sur &lt;a href=&quot;http://plugins.spip.net/Inclure-Ajaxload&quot; class='spip_out' rel='external'&gt;Plugins.SPIP&lt;/a&gt;. Cette documentation indique encore quelques recommandations (difficult&#233;s avec les paginations, pas de publicit&#233;s dynamiques, mutualiser le cache entre plusieurs pages, etc.).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Cr&#233;er Sprites CSS&lt;/h3&gt;
&lt;p&gt;Pour ma derni&#232;re intervention sur le site, j'ai d&#233;velopp&#233; un plugin qui regroupe automatiquement plusieurs &#171; petites &#187; images en une seule grande image, selon le principe des &#171; Sprites CSS &#187;.&lt;/p&gt; &lt;p&gt;Le plugin est d&#233;sormais disponible au t&#233;l&#233;chargement, et je vous invite &#224; lire sa documentation sur &lt;a href=&quot;http://plugins.spip.net/Creer-Sprites-CSS&quot; class='spip_out' rel='external'&gt;Plugins.SPIP&lt;/a&gt;. J'ai essay&#233; de faire une doc assez compl&#232;te.&lt;/p&gt; &lt;p&gt;Pour r&#233;sumer &#224; l'extr&#234;me : j'ai &#224; plusieurs endroits des pages des &#233;l&#233;ments graphiques g&#233;n&#233;r&#233;s par SPIP (images typographiques, vignettes de navigation des documents), qui ins&#232;rent beaucoup de petites images dans la page. Pour le visiteur, cela revient &#224; charger en moyenne 30 petites images diff&#233;rentes &#224; chaque page (c'est-&#224;-dire autant d'interrogations du serveur). Gr&#226;ce &#224; ce plugin, avec des modifications de code minimes et simples, ces 30 petites images sont regroup&#233;es en deux &#171; grandes &#187; images, et le visiteur ne lance donc plus que deux interrogations du serveur.&lt;/p&gt; &lt;p&gt;La vitesse de chargement et d'affichage des pages est am&#233;lori&#233;e de mani&#232;re spectaculaire (&#224; noter que &lt;a href=&quot;http://www.paris-beyrouth.org/tutoriaux-spip/article/objectif-pagespeed-100-100-avec&quot; class='spip_in'&gt;PageSpeed&lt;/a&gt; appr&#233;cie beaucoup la manip...).&lt;/p&gt; &lt;p&gt;Voil&#224;, ce sont les trois techniques que j'ai utilis&#233;es derni&#232;rement pour tenter d'am&#233;liorer la r&#233;activit&#233; de Flip-Zone. Les deux derniers plugins sont assez exp&#233;rimentaux, mais ils fonctionnent bien (sur un site en production, donc). Il est &#224; noter que les gains sont spectaculaires, sans demander autre chose que l'installation de plugins dans SPIP et la modification (assez simple) des squelettes. Il n'y a ici ni besoin de modifier la configuration g&#233;n&#233;rale du serveur, ni de toucher au &lt;code class='spip_code' dir='ltr'&gt;.htaccess&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Objectif PageSpeed 100/100 avec SPIP</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/objectif-pagespeed-100-100-avec</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/objectif-pagespeed-100-100-avec</guid>
		<dc:date>2010-05-24T13:07:56Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>J'ai r&#233;cemment refondu l'interface graphique de notre site de mode, Flip-Zone. Outre la modernisation de la maquette et la simplification de l'ergonomie, un des buts &#233;tait d'am&#233;liorer la r&#233;activit&#233; du site : vitesse de chargement, vitesse d'affichage et vitesse des effets interactifs. Un bon nombre de ces optimisations consiste en une am&#233;lioration &#171; normale &#187; du code HTML/Javascript du site (r&#233;duire le nombre d'images, de fichiers, de fichiers dynamiques...). En revanche, d'autres &#233;l&#233;ments sont plus (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;J'ai r&#233;cemment refondu l'interface graphique de notre &lt;a href=&quot;http://www.flip-zone.com/&quot; class='spip_out' rel='external'&gt;site de mode, Flip-Zone&lt;/a&gt;. Outre la modernisation de la maquette et la simplification de l'ergonomie, un des buts &#233;tait d'am&#233;liorer la r&#233;activit&#233; du site : vitesse de chargement, vitesse d'affichage et vitesse des effets interactifs.&lt;/p&gt; &lt;p&gt;Un bon nombre de ces optimisations consiste en une am&#233;lioration &#171; normale &#187; du code HTML/Javascript du site (r&#233;duire le nombre d'images, de fichiers, de fichiers dynamiques...). En revanche, d'autres &#233;l&#233;ments sont plus difficiles &#224; d&#233;tecter, et j'ai donc utilis&#233; &lt;a href=&quot;http://code.google.com/intl/fr/speed/page-speed/&quot; class='spip_out' rel='external'&gt;l'extension PageSpeed fournie par Google&lt;/a&gt; pour Firefox.&lt;/p&gt; &lt;p&gt;Cette extension analyse la structure des fichiers fournis par votre site, et les interactions avec votre serveur, et vous donne une &#171; note &#187; globale, assortie de d&#233;tails sur les diff&#233;rents points que vous pouvez am&#233;liorer. C'est un outil absolument &#233;patant pour optimiser le site Web (une fois qu'on a d&#233;j&#224;, autant que possible, optimis&#233; son HTML &#171; normal &#187;).&lt;/p&gt; &lt;p&gt;Apr&#232;s optimisation, la nouvelle version de Flip-Zone atteint (avec la version 1.8 de PageSpeed), le score tr&#232;s honorable de 92, voire 94, sur 100, et obtient le petit &#171; check vert &#187; validant l'optimisation des pages. &#192; titre de comparaison, le pr&#233;sent billet sur Paris-Beyrouth atteint 81/100 et un symbole rouge d'alerte ; &lt;a href=&quot;http://rezo.net/&quot; class='spip_out' rel='external'&gt;rezo.net&lt;/a&gt; atteint 83/100 (alerte rouge) ; la page d'accueil de &lt;a href=&quot;http://www.liberation.fr/&quot; class='spip_out' rel='external'&gt;Lib&#233;ration&lt;/a&gt; plafonne &#224; 79/100 ; celle du Monde (pourtant tr&#232;s r&#233;cente) obtient un terrible 68/100.&lt;/p&gt; &lt;p&gt;Et la page d'accueil de l'extension PageSpeed sur le site de Google obtient... 83/100. Avec 92 ou 94/100, Flip-Zone b&#233;n&#233;ficie donc d'une optimisation tr&#232;s largement au-dessus de la moyenne.&lt;/p&gt; &lt;p&gt;Attaquons diff&#233;rents points, fournis par PageSpeed, sur lesquels je suis intervenu. Notez bien : je vous pr&#233;sente mon exp&#233;rience personnelle, afin de vous donner des pistes. D'autres m&#233;thodes sont certainement possibles, voire pr&#233;f&#233;rables. N'h&#233;sitez pas &#224; livrer votre propre exp&#233;rience et vos conseils dans le forum ci-dessous.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Parallelize downloads across hostnames&lt;/h3&gt;
&lt;p&gt;J'ai d&#233;j&#224; trait&#233; la question de la &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rtt.html#ParallelizeDownloads&quot; class='spip_out' rel='external'&gt;parall&#233;lisation&lt;/a&gt; des chargements dans &lt;a href=&quot;http://www.paris-beyrouth.org/tutoriaux-spip/article/parallelisation-des-chargements&quot; class='spip_in'&gt;un pr&#233;c&#233;dent billet&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Avec un filtre relativement simple, je r&#233;partis les diff&#233;rents appels aux images sur quatre sous-domaines qui, en r&#233;alit&#233;, pointent vers le m&#234;me dossier du serveur, ce qui permet aux navigateurs de lancer plus de 2 chargements d'images en m&#234;me temps.&lt;/p&gt; &lt;p&gt;La simplicit&#233; du code et l'&#233;conomie de moyens n&#233;cessaires pour r&#233;aliser cela constituent un des points forts de SPIP.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Serve resources from a consistent URL&lt;/h3&gt;
&lt;p&gt;Le code pr&#233;c&#233;dent, fourni pour la parall&#233;lisation, est con&#231;u pour que chaque fichier d'image soit toujours situ&#233; sur le m&#234;me sous-nom de domaine. Si vous voyez appara&#238;tre &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/payload.html#duplicate_resources&quot; class='spip_out' rel='external'&gt;cette alerte de PageSpeed&lt;/a&gt;, il est probable que vous n'ayez pas activ&#233; le passage par le filtre de parall&#233;lisation correctement (pas activ&#233; sur certains squelettes, pas activ&#233; dans certains &lt;code class='spip_code' dir='ltr'&gt;include&lt;/code&gt;...).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Serve static content from a cookieless domain&lt;/h3&gt;
&lt;p&gt;PageSpeed sugg&#232;re alors de &#171; servir &#187; les images (en fait, tous les contenus &#171; statiques &#187;) depuis un domaine &#171; sans cookies &#187;. Je dois avouer que j'ai eu beaucoup de mal &#224; comprendre o&#249; &#233;tait le probl&#232;me : les fichiers statiques que sont les images &#233;tant tous pass&#233;s sur des sous-noms de domaine de mon domaine principal, je les retrouvais pourtant tous signal&#233;s par PageSpeed comme utilisant un cookie.&lt;/p&gt; &lt;p&gt;L'explication de Google est franchement cryptique, alors que la solution est tr&#232;s simple. Le probl&#232;me ne vient pas d'un r&#233;glage au niveau du serveur (et des sous-noms de domaine), contrairement &#224; ce que sugg&#232;re le terme &#171; cookieless domain &#187;.&lt;/p&gt; &lt;p&gt;C'est Google Analytics, sur mon site, qui posait des cookies &#171; trop larges &#187;. J'utilise l'ancien code (&lt;code class='spip_code' dir='ltr'&gt;ga.js&lt;/code&gt;), qui pose un cookie qui vise &#224; la fois le domaine principal et ses sous-noms de domaine. De ce fait, le script d'Analytics visait &#171; flip-zone.com &#187;, mais aussi &#171; img1.flip-zone.com &#187; (et les autres), alors que ces sous-noms ne servent que des contenus statiques.&lt;/p&gt; &lt;p&gt;Il semble que le nouveau code d'Analytics n'ait plus ce d&#233;faut, mais si vous utilisez &lt;code class='spip_code' dir='ltr'&gt;ga.js&lt;/code&gt;, la solution consiste &#224; ajouter, dans l'appel &#224; Analytics, le code suivant (en indiquant &#233;videmment votre propre domaine principal :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_javascript cadre&quot;&gt;&lt;div class=&quot;javascript&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;pageTracker._setDomainName&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'www.flip-zone.com'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Passer dans les pr&#233;f&#233;rences de Firefox, virer les cookies qui correspondaient &#224; ce domaine, et recharger. Le probl&#232;me est alors &#171; r&#233;solu &#187; pour PageSpeed.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Leverage browser caching&lt;/h3&gt;
&lt;p&gt;Ce point concerne l'indication d'une dur&#233;e de cache local du c&#244;t&#233; du client. SPIP ins&#232;re cette indication lui-m&#234;me dans les pages qu'il g&#233;n&#232;re via les squelettes, mais il reste tous les autres types de fichiers : images, fichiers CSS et fichiers Javascript. Et ce sont bien pour ces types de fichiers que PageSpeed d&#233;nonce l'absence d'indication de cache (le fait que SPIP indique tous les headers n&#233;cessaires pour les pages HTML est d&#233;j&#224; tr&#232;s appr&#233;ciable).&lt;/p&gt; &lt;p&gt;J'ai donc modifi&#233; ma configuration d'Apache pour qu'il effectue ces op&#233;rations lui-m&#234;me automatiquement. J'ai activ&#233; les modules &lt;code class='spip_code' dir='ltr'&gt;headers&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;expire&lt;/code&gt;, en for&#231;ant l'activation de l'envoi d'une dur&#233;e d'expiration longue sur les diff&#233;rents types de fichiers suivants :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='15' class='spip_cadre' dir='ltr'&gt;ExpiresActive on ExpiresByType text/html A7200 ExpiresByType text/css A604800 ExpiresByType application/x-javascript A604800 ExpiresByType application/javascript A604800 ExpiresByType text/javascript A604800 ExpiresByType image/jpeg A604800 ExpiresByType image/png A604800 ExpiresByType image/gif A604800 ExpiresByType application/x-shockwave-flash A604800 ExpiresByTYpe text/xml A604800&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Note. La plupart des caches sont ici fix&#233;s &#224; une semaine. C'est le minimum recommand&#233; par PageSpeed pour ces types de fichiers. Comme les fichiers Javascript, CSS et images passent par un traitement SPIP, &#231;a ne devrait pas poser de difficult&#233; en cas de modification du site, les noms des fichiers r&#233;sultants changeant avec la date de cr&#233;ation de chaque fichier.&lt;/p&gt; &lt;p&gt;M&#234;me si &#231;a n'est pas l'id&#233;al, il est parfois possible d'ins&#233;rer cette configuration dans &lt;code class='spip_code' dir='ltr'&gt;.htaccess&lt;/code&gt;, pour les h&#233;bergements mutualis&#233;s qui ont activ&#233; les modules d'Apache mais sans la configuration n&#233;cessaire. Je viens par exemple de le faire sur le serveur (mutualis&#233;) qui h&#233;berge le pr&#233;sent site.&lt;/p&gt; &lt;p&gt;Apr&#232;s red&#233;marrage du serveur, le probl&#232;me de cache est r&#233;solu pour PageSpeed.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Combine external JavaScript, Combine external CSS&lt;/h3&gt;
&lt;p&gt;PageSpeed sugg&#232;re de ne pas appeler plusieurs fichiers Javascript, mais de les &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rtt.html#CombineExternalJS&quot; class='spip_out' rel='external'&gt;regrouper en un seul fichier&lt;/a&gt;. M&#234;me chose &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rtt.html#CombineExternalCSS&quot; class='spip_out' rel='external'&gt;pour les fichiers CSS&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Sur ce point, SPIP offre une fonction absolument &#233;patante : il combine lui-m&#234;me automatiquement les fichiers Javascript et les fichiers CSS. Il suffit d'activer ces fonctions dans l'espace priv&#233; de SPIP : Configuration &gt; Fonctions avanc&#233;es &gt; Compactage des scripts et CSS.&lt;/p&gt; &lt;p&gt;Voil&#224; un probl&#232;me de PageSpeed r&#233;solu d'un clic dans SPIP !&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Enable compression, Specify a Vary : Accept-Encoding header&lt;/h3&gt;
&lt;p&gt;Tous les navigateurs r&#233;cents permettent d'&#233;changer des fichiers compact&#233;s avec le serveur plut&#244;t que les fichiers texte d'origine. C'est un aspect tr&#232;s important pour acc&#233;l&#233;rer les transferts (surtout que les fichiers texte, tels que HTML, Javascript et CSS, gagnent &#233;norm&#233;ment &#224; &#234;tre compact&#233;s).&lt;/p&gt; &lt;p&gt;Deux m&#233;thodes sont possibles.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;Les automatismes de SPIP&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;SPIP livre en standard tous les outils pour r&#233;aliser la compression, avec par ailleurs une mise en cache des fichiers compress&#233;s.&lt;/p&gt; &lt;p&gt;Rendez-vous dans la page &gt; Configuration &gt; Fonctions avanc&#233;es et en bas de page trouvez le pav&#233; &#171; Optimisations et compression &#187;. Activez la compression pour les 3 &#233;l&#233;ments.&lt;/p&gt; &lt;p&gt;La compression des pages HTML est alors automatiquement g&#233;r&#233;e par SPIP. (Une bonne chose de faite.)&lt;/p&gt; &lt;p&gt;Le seul point difficile est, maintenant, de parvenir &#224; servir les versions compress&#233;es des fichiers CSS et Javascript. Il faut intervenir sur la configuration d'Apache, mais ici cela peut se faire directement dans le fichier &lt;code class='spip_code' dir='ltr'&gt;.htaccess.&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Les fonctions de regroupement des fichiers CSS et Javascript, ainsi que la compression des pages Web par SPIP, stockent en cache deux versions des fichiers : le fichier non compress&#233;, et le m&#234;me fichier compress&#233;, dont le nom est compl&#233;t&#233; par la terminaison &lt;code class='spip_code' dir='ltr'&gt;.gz&lt;/code&gt;. Ainsi, dans &lt;code class='spip_code' dir='ltr'&gt;/local/cache-css&lt;/code&gt;, vous trouvez des couples de fichiers :&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;07c71327f8a0d62d77f91af0a65f7dc7.css 07c71327f8a0d62d77f91af0a65f7dc7.css.gz&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;M&#234;me chose dans &lt;code class='spip_code' dir='ltr'&gt;/local/cache-js&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Il faut donc indiquer &#224; Apache de servir, lorsque le navigateur le permet, l'un ou l'autre de ces fichiers. J'ins&#232;re le code suivant dans &lt;code class='spip_code' dir='ltr'&gt;.htacces&lt;/code&gt; :&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='19' class='spip_cadre' dir='ltr'&gt;&lt;files *.js.gz&gt; AddType &quot;text/javascript&quot; .gz AddEncoding gzip .gz Header set Vary &quot;Accept-Encoding&quot; &lt;/files&gt; &lt;files *.css.gz&gt; AddType &quot;text/css&quot; .gz AddEncoding gzip .gz Header set Vary &quot;Accept-Encoding&quot; &lt;/files&gt; #Check to see if browser can accept gzip files. ReWriteCond %{HTTP:accept-encoding} gzip #make sure there's no trailing .gz on the url ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$ #check to see if a .gz version of the file exists. RewriteCond %{REQUEST_FILENAME}.gz -f #All conditions met so add .gz to URL filename (invisibly) RewriteRule ^(.+) $1.gz [QSA,L]&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;(Le d&#233;but de ce code, qui d&#233;finit des &lt;code class='spip_code' dir='ltr'&gt;AddType&lt;/code&gt;, est assez douteux. Mais il semble fonctionner, et lorsque je le supprime, je rencontre des dysfonctionnements. Code bizarre, donc, mais qui semble bien fonctionner.)&lt;/p&gt; &lt;p&gt;Le probl&#232;me est r&#233;solu pour PageSpeed, avec une solution &#171; pur SPIP &#187;. Cette solution a l'avantage de ne pas demander des droits &#233;normes sur le serveur : si vous avez le droit d'utiliser le fichier &lt;code class='spip_code' dir='ltr'&gt;.htaccess&lt;/code&gt; de votre serveur Web, vous pouvez certainement l'utiliser.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;La solution mod deflate&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;L'autre m&#233;thode consiste &#224; demander au serveur Apache de prendre en charge la compression de tous les fichiers &#224; la vol&#233;e. Il faut activer, sur le serveur, le module &lt;code class='spip_code' dir='ltr'&gt;deflate&lt;/code&gt;, avec la configuration :&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;(la configuration par d&#233;faut ne prend pas en compte les CSS).&lt;/p&gt; &lt;p&gt;Red&#233;marrer Apache, et le probl&#232;me est r&#233;solu pour PageSpeed.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Minify CSS&lt;/h3&gt;
&lt;p&gt;PageSpeed sugg&#232;re de &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/payload.html#MinifyCSS&quot; class='spip_out' rel='external'&gt;r&#233;duire la taille des fichiers CSS&lt;/a&gt;. On &#233;crit en effet la plupart du temps les fichiers CSS avec de nombreux retours &#224; la ligne et des indentations, de fa&#231;on &#224; avoir un code tr&#232;s lisible (et donc facile &#224; modifier). Mais ces indentations et ces retours-chariot ont un poids, et PageSpeed sugg&#232;re de les supprimer.&lt;/p&gt; &lt;p&gt;Si vous activez le regroupement de fichiers CSS dans SPIP, cette fonction fabrique un fichier CSS avec la notation all&#233;g&#233;e.&lt;/p&gt; &lt;p&gt;Ma difficult&#233; est que, sur Flip-Zone, je n'utilise qu'un seul et unique fichier CSS. Du coup, la fonction de compactage de SPIP ne passe pas dessus (la fonction s'active lorsqu'il y a plusieurs appels de fichiers CSS visant le m&#234;me support).&lt;/p&gt; &lt;p&gt;Pour les fichiers CSS &#171; faits &#224; la main &#187;, il faut transformer la notation d&#233;velopp&#233;e du type :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;body &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/dfc807bf90cedd95d82129630cef4bb4.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;par la notation tr&#232;s compacte :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;body &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;background-color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;white&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;color&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;black&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pour ma part, j'utilise syst&#233;matiquement le plugin &lt;a href=&quot;http://plugins.spip.net/spip.php?article2&quot; class='spip_out' rel='external'&gt;CSS imbriqu&#233;s&lt;/a&gt; pour coder mes CSS, et ce plugin g&#233;n&#233;rait un code dot&#233; de retours-chariot et d'indentations. J'ai donc r&#233;cemment modifi&#233; ce plugin pour qu'il g&#233;n&#232;re d&#233;sormais un code &#171; minifi&#233; &#187;. Si vous utilisez une version du plugin qui ne le fait pas encore, mettez le &#224; jour.&lt;/p&gt; &lt;p&gt;&#192; noter : les diff&#233;rents fichiers Javascript et CSS &#233;tant regroup&#233;s, sur chaque page du site, dans des &#171; gros &#187; fichiers, il convient de prendre soin &#224; syst&#233;matiquement appeler les m&#234;mes fichiers dans chaque type de squelette. Pas de CSS appel&#233;s uniquement dans les rubriques et d'autres CSS uniquement dans les articles ; pas de fichiers Javascript uniquement pour les rubriques et d'autres pour les articles. En ayant bien les m&#234;mes appels de CSS et de fichiers Javascript pour les diff&#233;rents types de squelettes, quand on navigue dans le site, on est certain de toujours recharger le m&#234;me fichier CSS unique et le m&#234;me fichier Javascript unique. (Cela n'est valable, &#233;videmment, que parce qu'on regroupe automatiquement les diff&#233;rents fichiers externes.)&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Remove unused CSS&lt;/h3&gt;
&lt;p&gt;Le fait d'avoir un gros CSS regroupant les CSS pour tous les squelettes du site peut provoquer l'alerte &#171; &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/payload.html#RemoveUnusedCSS&quot; class='spip_out' rel='external'&gt;Remove unused CSS&lt;/a&gt; &#187; dans PageSpeed. Je l'ai vu passer, mais en naviguant un peu dans le site, il semble que PageSpeed ait compris que ces r&#232;gles CSS &#233;taient tout de m&#234;me utilis&#233;es dans le site, et l'alerte a disparu.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Minify HTML&lt;/h3&gt;
&lt;p&gt;De la m&#234;me fa&#231;on, PageSpeed sugg&#232;re de &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/payload.html#MinifyHTML&quot; class='spip_out' rel='external'&gt;&#171; minifier &#187; le code HTML&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Il est notoire que SPIP a tendance &#224; g&#233;n&#233;rer un code HTML avec de nombreuses lignes vides, &#224; cause de la succession de boucles. On peut &#233;videmment &#233;crire ses boucles pour limiter cet aspect, mais je trouve que le code source devient alors peu lisible ; je pr&#233;f&#232;re donc conserver mon code source qui g&#233;n&#232;re beaucoup de lignes vides, et intervenir ailleurs.&lt;/p&gt; &lt;p&gt;La premi&#232;re solution consiste &#224; activer le validateur XHTML int&#233;gr&#233; &#224; SPIP (SAX, qui succ&#232;de &#224; une premi&#232;re impl&#233;mentation bas&#233;e sur tidy). Si vous ne connaissez pas cet outil, &lt;a href=&quot;http://www.spip.net/fr_article3541.html&quot; class='spip_out' rel='external'&gt;vous devriez vous y int&#233;resser&lt;/a&gt; : c'est un outil vraiment &#233;patant lors du d&#233;veloppement de votre site.&lt;/p&gt; &lt;p&gt;Il s'active en indiquant, simplement,&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$xhtml&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;ou :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$xhtml&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;sax&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Vous obtenez alors un bouton &#171; XML &#187; suppl&#233;mentaire en haut de vos pages publiques, qui vous permet de &#171; d&#233;bugger &#187; votre code HTML.&lt;/p&gt; &lt;p&gt;Lorsque votre page est consid&#233;r&#233;e comme suffisamment valide, cette fonctionnalit&#233; transforme votre code HTML et le livre sous forme &#171; nettoy&#233;e &#187; et structur&#233;e : retours chariot bien plac&#233;s et indentation parfaite.&lt;/p&gt; &lt;p&gt;PageSpeed appr&#233;cie assez largement ce nouveau code source reformat&#233; selon la norme XML.&lt;/p&gt; &lt;p&gt;Mais cela ne suffit pas &#224; PageSpeed, qui r&#233;clame encore la disparition des retours chariot surnum&#233;raires et, surtout, des indentations.&lt;/p&gt; &lt;p&gt;Plut&#244;t que de &#171; patcher &#187; SAX, je pr&#233;f&#232;re recourir &#224; une seconde m&#233;thode. Une fois mon HTML d&#233;buggu&#233;, je d&#233;sactive SAX, et je fabrique (dans &lt;code class='spip_code' dir='ltr'&gt;mes_fonctions.php&lt;/code&gt; un petit filtre en PHP :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; mini_html&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;[&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\t&lt;/span&gt;\ ]*,&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;+,&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/fe267fd469bd8400b6b271c1d52c2566.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Cette fonction supprime les multiples lignes vides et toutes les indentations en d&#233;but de ligne. Pour la d&#233;clencher, j'ins&#232;re dans mes squelettes la mention :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#FILTRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;mini_html&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ce raccourci &lt;code class='spip_code' dir='ltr'&gt;#FILTRE&lt;/code&gt; est d&#233;j&#224; expliqu&#233; dans &lt;a href=&quot;http://www.paris-beyrouth.org/tutoriaux-spip/article/parallelisation-des-chargements&quot; class='spip_in'&gt;mon billet sur la mise en parall&#232;le des t&#233;l&#233;chargements de fichiers externes&lt;/a&gt;. Puisque j'ai d&#233;j&#224; mis en place un filtre pour la parall&#233;lisation, mes squelettes contiennent donc d&#233;sormais les mentions :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#FILTRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;filtrer_images_page&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #CA5200;&quot;&gt;#FILTRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;mini_html&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/7c09b3531517e9289a8bcbaea0464bc9.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notez bien : il faut d&#233;sactiver SAX (ne pas activer la variable &lt;code class='spip_code' dir='ltr'&gt;$xhtml&lt;/code&gt;), qui passe apr&#232;s ces filtres, et r&#233;introduirait alors les indentations.&lt;/p&gt; &lt;p&gt;Encore des points gagn&#233;s sous PageSpeed avec une &#233;conomie de moyens remarquable.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Les images&lt;/h3&gt;
&lt;p&gt;Sur Flip-Zone, quasiment toutes mes images passent par les filtres graphiques de SPIP. De ce fait, tous les commentaires concernant les images dans PageSpeed sont &#171; automatiquement &#187; respect&#233;s : indiquer la taille des images, pas de redimensionnement d'images directement dans le HTML, compression correcte des fichiers...&lt;/p&gt; &lt;p&gt;Sur tous ces points, je n'ai pas du tout eu besoin d'intervenir pour satisfaire PageSpeed (en revanche, j'ai effectu&#233; une optimisation de mon c&#244;t&#233; pour, plus &#171; normalement &#187;, limiter le nombre d'images diff&#233;rentes et leur taille autant que n&#233;cessaire).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Specify a character set early&lt;/h3&gt;
&lt;p&gt;Si vous suivez la m&#234;me logique que les squelettes standards de SPIP, vous avez bien pens&#233; &#224; indiquer :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=#CHARSET&quot; /&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;en d&#233;but de vos ent&#234;tes. Ce qui &lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rendering.html#SpecifyCharsetEarly&quot; class='spip_out' rel='external'&gt;fait plaisir &#224; PageSpeed&lt;/a&gt;.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Pourquoi je n'obtiens pas 100/100&lt;/h3&gt;
&lt;p&gt;Sur Flip-Zone, j'obtiens donc 92 ou 94/100. Il me reste deux alertes, que je ne souhaite pas corriger pour l'instant.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;&lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rendering.html#UseEfficientCSSSelectors&quot; class='spip_out' rel='external'&gt;Use efficient CSS&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;J'ai l&#224; des d&#233;clarations de CSS consid&#233;r&#233;es comme &#171; tr&#232;s inefficaces &#187; par PageSpeed. Probl&#232;me qui est accentu&#233; par le fait que j'utilise le plugin &#171; CSS imbriqu&#233;s &#187;, qui fabrique automatiquent des d&#233;clarations CSS &#224; rallonge.&lt;/p&gt; &lt;p&gt;Je pourrais donc r&#233;&#233;crire mes feuilles de style, mais je pr&#233;f&#232;re conserver mes sources CSS structur&#233;es et tr&#232;s lisibles, qui me permettent de facilement intervenir sur le code du site.&lt;/p&gt; &lt;p&gt;&lt;img src=&quot;http://www.paris-beyrouth.org/local/cache-vignettes/L8xH11/puce-32883.gif&quot; width='8' height='11' class='puce' alt=&quot;-&quot; style='height:11px;width:8px;' /&gt; &lt;strong&gt;&lt;a href=&quot;http://code.google.com/speed/page-speed/docs/rtt.html#CombineExternalJS&quot; class='spip_out' rel='external'&gt;Combine external JavaScript&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;J'ai d&#233;j&#224; regroup&#233;, sur mon site, les fichiers Javascript externes que je g&#232;re moi-m&#234;me (les nombreuses extensions jQuery). Mais je suis ici bloqu&#233; par la pr&#233;sence des publicit&#233;s, principalement les pubs AdSense, qui provoquent chacune l'appel de quatre fichiers Javascript diff&#233;rents.&lt;/p&gt; &lt;p&gt;Je ne vois pas de moyen de r&#233;ellement optimiser cet aspect. C'est un point qui m'&#233;chappe totalement sur mon site, puisque je d&#233;pends l&#224; des fichiers fournis par Google.&lt;/p&gt; &lt;p&gt;En restant raisonnable dans les modifications du code, j'obtiens par exemple 97/100 sur &lt;a href=&quot;http://www.web-design-news.com/&quot; class='spip_out' rel='external'&gt;Web Design News&lt;/a&gt; ; avant l'intervention, je plafonnais &#224; 80/100. &#192; noter que la d&#233;sactivation pure et simple des Google Ads n'en am&#233;liore pas le score.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Qu'est-ce que &#231;a apporte ?&lt;/h3&gt;
&lt;p&gt;Au niveau de l'exp&#233;rience de l'utilisateur, c'est clair : le site est beaucoup plus rapide et donne une bien meilleure impression de fluidit&#233; que dans sa version pr&#233;c&#233;dente. La visite est, &#224; mon avis, beaucoup plus agr&#233;able.&lt;/p&gt; &lt;p&gt;Est-ce que cela va augmenter mon nombre de pages vues (les visiteurs restant plus longtemps sur un site qui va &#171; plus vite &#187;) ? Est-ce que cela va augmenter le nombre de visites (les visiteurs recommandant plus facilement un site plus agr&#233;able &#224; consulter) ? Il est trop t&#244;t pour le dire, et il sera difficile de savoir si une augmentation ne serait pas plus li&#233;e au changement de graphisme et d'ergonomie. Pour l'instant, honn&#234;tement, je n'ai pas le sentiment que les chiffres soient tr&#232;s diff&#233;rents. Si Google communique beaucoup sur la vitesse absolue des sites Web, je ne suis pas certain que les utilisateurs, eux, soient tr&#232;s sensibles &#224; la diff&#233;rence de vitesse entre un site &#171; qui va plut&#244;t vite &#187; et un site &#171; qui va tr&#232;s vite &#187; (surtout sur Flip-Zone, site qui ne demande pas de beaucoup naviguer entre les pages, mais bien plus de rester longtemps sur une m&#234;me page pr&#233;sentant une collection de mode compl&#232;te).&lt;/p&gt; &lt;p&gt;Est-ce que cela va am&#233;liorer mon r&#233;f&#233;rencement dans Google ? Google a r&#233;cemment annonc&#233; qu'ils allaient prendre en compte la vitesse dans le score des sites. Mais de mani&#232;re tr&#232;s limit&#233;e, et rien n'indique que, pour Google, il y ait une grosse diff&#233;rence entre un score 84 dans PageSpeed et un score 94 (car impl&#233;menter PageSpeed au niveau du robot de Google me semble carr&#233;ment &lt;i&gt;overkill&lt;/i&gt;).&lt;/p&gt; &lt;p&gt;Est-ce que cela va r&#233;duire la charge sur mon serveur ? C&#244;t&#233; trafic, certainement : les fichiers envoy&#233;s vers le visiteur sont moins nombreux, plus petits et offrent une meilleure gestion du cache. Comme je lance beaucoup moins de services HTTP en m&#234;me temps, j'ai aussi certainement une r&#233;duction de la puissance machine utilis&#233;e. Mais cet aspect est beaucoup plus li&#233; &#224; l'am&#233;lioration de mes squelettes lors de la refonte.&lt;/p&gt; &lt;p&gt;Pour l'instant, ma conclusion est plut&#244;t une question de respect de l'utilisateur : il s'agit de lui proposer une navigation plus fluide et plus agr&#233;able. Qu'il y soit sensible au point que cela change son comportement sur le site est tr&#232;s douteux. Quant &#224; la charge du serveur, c'est largement la refonte des squelettes qui joue, bien plus que l'optimisation sp&#233;cifique pour satisfaire PageSpeed.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Pas de BOM pour PHP (utf-8)</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/pas-de-bom-pour-php-utf-8</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/pas-de-bom-pour-php-utf-8</guid>
		<dc:date>2010-04-26T10:03:23Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Le probl&#232;me m'arrive r&#233;guli&#232;rement lorsque je d&#233;veloppe mes propres fonctions dans SPIP, soit dans mes_fonctions.php et mes_options.php, soit dans un plugin : certains liens de l'espace priv&#233; me m&#232;nent &#224; une page qui m'indique un &#171; Type 302 &#187; (login, effacer un message, changer le statut d'un article...) et me demande de cliquer pour poursuivre l'op&#233;ration (et revenir &#224; l'interface priv&#233;e &#171; normale &#187;), j'obtiens un message d'erreur PHP de genre &#171; Headers already sent &#187;, je vois appara&#238;tre dans mes pages (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Le probl&#232;me m'arrive r&#233;guli&#232;rement lorsque je d&#233;veloppe mes propres fonctions dans SPIP, soit dans &lt;code class='spip_code' dir='ltr'&gt;mes_fonctions.php&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;mes_options.php&lt;/code&gt;, soit dans un plugin :
&lt;br /&gt;&#8212; certains liens de l'espace priv&#233; me m&#232;nent &#224; une page qui m'indique un &#171; Type 302 &#187; (login, effacer un message, changer le statut d'un article...) et me demande de cliquer pour poursuivre l'op&#233;ration (et revenir &#224; l'interface priv&#233;e &#171; normale &#187;),
&lt;br /&gt;&#8212; j'obtiens un message d'erreur PHP de genre &#171; Headers already sent &#187;,
&lt;br /&gt;&#8212; je vois appara&#238;tre dans mes pages publiques des caract&#232;res bizarres, g&#233;n&#233;ralement la s&#233;rie &#171; &lt;code class='spip_code' dir='ltr'&gt;&#239;&#187;&#191;&lt;/code&gt; &#187;.&lt;/p&gt; &lt;p&gt;Ces trois probl&#232;mes viennent g&#233;n&#233;ralement de la m&#234;me source : un fichier PHP ou un squelette encod&#233; en unicode (utf-8) d&#233;marrant par l'insertion d'une indication de &#171; &lt;a href=&quot;http://fr.wikipedia.org/wiki/Marque_d'ordre_des_octets&quot; class='spip_out' rel='external'&gt;BOM&lt;/a&gt; &#187; : &#171; Marque d'ordre des octets &#187;.&lt;/p&gt; &lt;p&gt;Ce marqueur est un caract&#232;re ins&#233;r&#233; en d&#233;but de fichier unicode, automatiquement : il est utile en utf-16 et utf-32, mais pas indispensable en utf-8 (qui est le format d'encodage des caract&#232;res que l'on utilise d&#233;sormais de plus en plus sur le Web - et que j'utilise d&#233;sormais syt&#233;matiquement pour ne plus avoir &#224; coder les caract&#232;res sous formes d'entit&#233;s HTML du genre &lt;code class='spip_code' dir='ltr'&gt;&amp;eacute;&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;C'est ce caract&#232;re qui est ins&#233;r&#233; en tout d&#233;but de fichier provoque les erreurs :
&lt;br /&gt;&#8212; dans un squelette, il peut devenir un caract&#232;re &#171; visible &#187;, et sur un site qui n'est pas lui-m&#234;me en utf-8, on voit appara&#238;tre la s&#233;rie &lt;code class='spip_code' dir='ltr'&gt;&#239;&#187;&#191;&lt;/code&gt; (qui est sa translitt&#233;ration en iso-8859-1),
&lt;br /&gt;&#8212; dans un fichier PHP, cela provoque l'envoi de caract&#232;res avant le d&#233;marrage du PHP, avec notamment l'interdiction d'envoyer des ent&#234;tes PHP par la suite ; dans notre cas : les ent&#234;tes qui provoquent une redirection vers une autre page.&lt;/p&gt; &lt;p&gt;La solution est simple :
&lt;br /&gt;&#8212; ouvrir le ou les fichiers fautifs avec l'&#233;diteur et forcer la sauvegarde dans le format &#171; &lt;strong&gt;UTF-8 NO BOM&lt;/strong&gt; &#187; ; c'est la meilleure solution ; le fichier est ainsi sauvegard&#233; correctement en Unicode utf-8, mais sans ce caract&#232;re ; en g&#233;n&#233;ral, il suffit de traiter &lt;code class='spip_code' dir='ltr'&gt;mes_fonctions.php&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;mes_options.php&lt;/code&gt; pour corriger tous les dysfonctionnements ;
&lt;br /&gt;&#8212; si vous ne pouvez pas sauvegarde en UTF-8 NO BOM, sauvegarder le fichier en ISO-8859-1, mais en prenant soin de transformer d'abord les caract&#232;res accentu&#233;s en entit&#233;s HTML. &#199;a n'est pas la solution id&#233;ale, surtout si comme moi on fait des fonctions PHP testant des cha&#238;nes multi-bytes. Mais pour beaucoup de sites, c'est souvent tr&#232;s suffisant. (Mais id&#233;alement, adoptez un &#233;diteur de texte qui vous permet de s&#233;lectionner la sauvegarde au format UTF-8 NO BOM.)&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Parall&#233;lisation des chargements avec SPIP</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/parallelisation-des-chargements</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/parallelisation-des-chargements</guid>
		<dc:date>2010-04-17T12:25:50Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Ces derniers temps, je constatais de lourds ralentissements sur mon site Flip-Zone. La charge processeur &#233;tait loin d'atteindre le maximum, et la bande passante n'&#233;tait pas satur&#233;e non plus. Solution : la configuration par d&#233;faut d'Apache de la Debian est excessivement sous-dimensionn&#233;e ; en augmentant le MaxServers et le ServerLimit &#224; nettement plus que 256, le serveur s'est remis &#224; donner des r&#233;sultats satisfaisants. Toujours est-il que, cherchant &#224; am&#233;liorer la r&#233;activit&#233; du site, je me suis tourn&#233; (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Ces derniers temps, je constatais de lourds ralentissements sur mon site &lt;a href=&quot;http://www.flip-zone.com/&quot; class='spip_out' rel='external'&gt;Flip-Zone&lt;/a&gt;. La charge processeur &#233;tait loin d'atteindre le maximum, et la bande passante n'&#233;tait pas satur&#233;e non plus. Solution : la configuration par d&#233;faut d'Apache de la Debian est excessivement sous-dimensionn&#233;e ; en augmentant le &lt;code class='spip_code' dir='ltr'&gt;MaxServers&lt;/code&gt; et le &lt;code class='spip_code' dir='ltr'&gt;ServerLimit&lt;/code&gt; &#224; nettement plus que 256, le serveur s'est remis &#224; donner des r&#233;sultats satisfaisants.&lt;/p&gt; &lt;p&gt;Toujours est-il que, cherchant &#224; am&#233;liorer la r&#233;activit&#233; du site, je me suis tourn&#233; vers l'outil &lt;a href=&quot;http://code.google.com/intl/fr/speed/page-speed/&quot; class='spip_out' rel='external'&gt;PageSpeed pour Firefox&lt;/a&gt;. Quelque soit votre niveau, en tant que webmestre, je vous sugg&#232;re de l'installer et de tester vos sites. L'outil fournit non seulement les tests, mais aussi de tr&#232;s int&#233;ressants conseils d'optimisation de votre site. Il y a de plus des tutoriaux pour tous niveaux sur le site du plugin.&lt;/p&gt; &lt;p&gt;Un point en particulier m'a int&#233;ress&#233; : la mise en parall&#232;le des t&#233;l&#233;chargements des &#233;l&#233;ments appel&#233;s par la page : images, feuilles de style, javascript. Le principe est que le protocole HTTP n'autorise qu'un nombre tr&#232;s r&#233;duit de t&#233;l&#233;chargements simultan&#233;s de fichier sur un m&#234;me domaine (sans doute deux chargements). Quand la page contient beaucoup d'appels &#224; des fichiers externes, tels que des images, le navigateur va charger ces fichiers les uns apr&#232;s les autres (deux par deux). On voit ainsi se charger les images les unes apr&#232;s les autres, de mani&#232;re s&#233;quentielle. Or, avec une connexion rapide, on n'exploite pas la totalit&#233; de la bande passante disponible. Il y aurait donc moyen de charger ces images plus rapidement, en lan&#231;ant plus de chargements en m&#234;me temps (en parall&#232;le).&lt;/p&gt; &lt;p&gt;La m&#233;thode pour r&#233;aliser cela est de fournir les images sur plusieurs adresses (noms de domaines) diff&#233;rents. En effet, si le navigateur ne peut charger que deux fichiers en m&#234;me temps pour un nom de domaine, il peut lancer en m&#234;me temps les chargements sur plusieurs domaines. C'est expliqu&#233;, par exemple, sur &lt;a href=&quot;http://yuiblog.com/blog/2007/04/11/performance-research-part-4/&quot; class='spip_out' rel='external'&gt;cette page du Yahoo User Interface Blog&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Je vous livre comment j'ai proc&#233;d&#233; pour mon site sous SPIP. Il faut, &#233;videmment, disposer d'une machine d&#233;di&#233;e sur laquelle on peut soit-m&#234;me g&#233;rer des sous-noms de domaine, ainsi que la gestion des zones de son nom de domaine au niveau du registrat.&lt;/p&gt; &lt;p&gt;Le principe consiste &#224; cr&#233;er autant de sous-noms de domaine que n&#233;cessaire (pour mes essais actuels : quatre sous-noms de domaine), et &#224; les faire pointer vers le m&#234;me dossier du serveur (le dossier qui contient d&#233;j&#224; le site sous SPIP). De cette fa&#231;on, l'image qui se trouve habituellement &#224; l'adresse :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;http://www.flip-zone.com/local/cache-renommer/image_une/c25bdc7f9d5cc9d7d885282f1df6e27b.jpg&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;est &#233;galement accessible via les adresses :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='8' class='spip_cadre' dir='ltr'&gt;http://img0.flip-zone.com/local/cache-renommer/image_une/c25bdc7f9d5cc9d7d885282f1df6e27b.jpg http://img1.flip-zone.com/local/cache-renommer/image_une/c25bdc7f9d5cc9d7d885282f1df6e27b.jpg http://img2.flip-zone.com/local/cache-renommer/image_une/c25bdc7f9d5cc9d7d885282f1df6e27b.jpg http://img3.flip-zone.com/local/cache-renommer/image_une/c25bdc7f9d5cc9d7d885282f1df6e27b.jpg&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Il s'agit, physiquement sur le serveur, du m&#234;me fichier (fabriqu&#233; par les filtres graphiques de SPIP). En revanche, pour le visiteur, ce sont bien des domaines diff&#233;rents, ce qui permet de d&#233;passer la limite de t&#233;l&#233;chargements simultan&#233;s. Le navigateur ne peut lancer simultan&#233;ment que le chargement de deux images sur &lt;code class='spip_code' dir='ltr'&gt;www.flip-zone.com&lt;/code&gt;, mais il peut lancer en m&#234;me temps deux chargements sur chacun des sous-domaines. Je peux donc d&#233;marrer le chargement, ici, de huit images en m&#234;me temps sur mes sous-noms de domaine.&lt;/p&gt; &lt;p&gt;Au niveau de la &lt;strong&gt;gestion du nom de domaine&lt;/strong&gt;, il faut &#233;videmment que je fasse pointer tous les sous-noms de domaine vers le m&#234;me serveur. Plut&#244;t que de me contenter d'une zone du style :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;www	A	88.191.102.6&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;je fais pointer &#171; tout &#187; vers le serveur, gr&#226;ce &#224; l'ast&#233;risque :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;*	A	88.181.102.6&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Avec cette configuration, tous les sous-noms de domaine de &lt;code class='spip_code' dir='ltr'&gt;flip-zone.com&lt;/code&gt; pointent vers le m&#234;me serveur. C'est pratique, dans l'absolu, pour se cr&#233;er des domaines &#224; la demande (&lt;code class='spip_code' dir='ltr'&gt;dev.flip-zone.com&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;test.flip-zone.com&lt;/code&gt;...), et pour le cas qui m'int&#233;resse, faire directement pointer &lt;code class='spip_code' dir='ltr'&gt;img0.flip-zone.com&lt;/code&gt; &#224; &lt;code class='spip_code' dir='ltr'&gt;img3.flip-zone.com&lt;/code&gt; vers le serveur.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Au niveau du serveur,&lt;/strong&gt; il faut &#233;videmment indiquer &#224; Apache vers quel dossier du serveur faire pointer ces nouveaux sous-noms de domaine. C'est simple : vers le m&#234;me dossier d&#233;j&#224; utilis&#233; pour &lt;code class='spip_code' dir='ltr'&gt;www.flip-zone.com&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;J'avais d&#233;j&#224; une d&#233;finition compl&#232;te (avec la gestion des droits) pour &lt;code class='spip_code' dir='ltr'&gt;www.flip-zone&lt;/code&gt;, pointant notamment vers :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;VirtualHost&lt;/span&gt; www.flip-zone.com:80&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; DocumentRoot /var/www/flip/zone/&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; ...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/VirtualHost&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/99a7355f3daa86a390706f26c47ff5ef.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Je modifie ce VirtualHost en indiquant qu'il sert d'alias &#224; certains sous-domaines (merci &#224; Fred pour le truc) :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;VirtualHost&lt;/span&gt; www.flip-zone.com:80&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; DocumentRoot /var/www/flip/zone/&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; ServerAlias img*.flip-zone.com&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; ...&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/VirtualHost&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/7e185ff691acf14b3d226e259ec167a5.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Je red&#233;marre Apache, et voil&#224;. Pour tester, je me rends sur mon site, j'affiche une image (qui est pour l'instant en &lt;code class='spip_code' dir='ltr'&gt;http://www.flip-zone.com/...&lt;/code&gt;, et je remplace son URL par &lt;code class='spip_code' dir='ltr'&gt;http://img0.flip-zone.com/...&lt;/code&gt;. Si l'image se charge &#224; nouveau, c'est que la configuration est correcte.&lt;/p&gt; &lt;p&gt;Il faut maintenant que j'intervienne dans SPIP pour que mes pages lient les images non plus en relatif (donc vers &lt;code class='spip_code' dir='ltr'&gt;www.flip-zone.com&lt;/code&gt;), mais avec des URL absolues r&#233;parties sur les quatre sous-noms de domaine.&lt;/p&gt; &lt;p&gt;Je vous livre ma m&#233;thode, tr&#232;s simple et qui ne demande pas beaucoup de modifications des squelettes.&lt;/p&gt; &lt;p&gt;D'abord, je vais faire passer le r&#233;sultat des pages, en fin de compilation, par un filtre. J'ins&#232;re dans chaque squelette concern&#233; (&lt;code class='spip_code' dir='ltr'&gt;sommaire.html&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;rubrique.html&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;article.html&lt;/code&gt;...) le code suivant :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;#FILTRE{filtrer_images_page}&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Cette fonctionnalit&#233; de SPIP indique que l'int&#233;gralit&#233; du squelette, une fois compil&#233;, doit passer par le filtre &lt;code class='spip_code' dir='ltr'&gt;|filtrer_images_page&lt;/code&gt;. Elle s'applique avant la sauvegarde en cache, le r&#233;sultat est donc bien g&#233;r&#233; par le cache de SPIP.&lt;/p&gt; &lt;p&gt;Il me faut d&#233;finir cette fonction PHP. Je l'installe par exemple dans &lt;code class='spip_code' dir='ltr'&gt;/config/mes_options.php&lt;/code&gt;, de fa&#231;on &#224; pouvoir en profiter dans tous mes jeux de squelettes (puisque j'ai des squelettes sp&#233;cifiques pour iPad et iPod sur ce site).&lt;/p&gt; &lt;p&gt;La fonction est un peu rustique et on pourra sans doute ais&#233;ment rendre son &#233;criture plus &#233;l&#233;gante. Mais elle fonctionne, et j'ai besoin pour mes tests qu'elle soit simple &#224; lire et &#224; modifier (merci cependant &#224; Marcimat pour le morceau de code qui rend &#231;a beaucoup plus propre).&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; filtrer_rediriger_images&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$reg&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$reg&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,^http,&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$code&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/md5&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;md5&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$code&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/hexdec&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;hexdec&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$code&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;http://img&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$code&lt;/span&gt;.flip-zone.com/&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$lien&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot; src=&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$lien&lt;/span&gt;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; filtrer_images_page&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace_callback&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_replace_callback&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,[[:space:]]src=[&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;\']([^&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;\']*)[&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;\'],&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;filtrer_rediriger_images&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/ebddceff9441192c0a395c43ecf8f944.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La fonction extrait toutes les cha&#238;nes du style :&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;src=&quot;lien&quot;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;C'est peu pr&#233;cis, mais &#231;a ne semble pas provoquer de d&#233;g&#226;ts par ailleurs. Cela me permet de r&#233;cup&#233;rer, en une passe, les liens vers des images et vers des fichiers Javascript. On peut facilement la rendre plus pr&#233;cise, ou lui faire &#233;galement traiter les appels aux feuilles de style.&lt;/p&gt; &lt;p&gt;Pour ma part, j'ai tout de m&#234;me un dommage collat&#233;ral sur l'appel des Javascript externes. J'ai donc modifi&#233; le script ainsi (ligne 4) pour les exclure :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,^http,&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&amp;&amp;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;,\.js$,&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lien&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pour chaque lien ainsi r&#233;cup&#233;r&#233;, j'exclus les liens qui sont d&#233;j&#224; en URL absolue. J'effectue un hachage md5 du lien, ce qui me donne une cha&#238;ne en hexad&#233;cimal, et je r&#233;cup&#232;re le premier caract&#232;re (de 0 &#224; 9 et de a &#224; f). &#192; partir de ce caract&#232;re, de mani&#232;re syst&#233;matique, je fabrique une valeur entre 0 et 3. Et je retourne le lien en URL absolue vers un des sous-noms de domaine en &lt;code class='spip_code' dir='ltr'&gt;img0.flip-zone.com&lt;/code&gt; &#224; &lt;code class='spip_code' dir='ltr'&gt;img3.flip-zone.com&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;La fonction ne cherche pas &#224; r&#233;partir &#233;quitablement les liens sur les quatre sous-noms de domaine, mais applique un filtre syst&#233;matique en fonction de l'URL du fichier (de toute fa&#231;on, j'ai tellement d'images dans chaque page que la r&#233;partition est statistiquement &#233;quitable). C'est ce qui garantit que, d'une page &#224; l'autre du site, une image sera toujours sur le m&#234;me sous-nom de domaine. Sinon, je provoquerais des rechargements d'une image d&#233;j&#224; charg&#233;e, parce que son URL serait sur un sous-nom de domaine diff&#233;rent.&lt;/p&gt; &lt;p&gt;Et voil&#224;. Au recalcul de la page, les appels vers les images et les fichiers Javascript sont r&#233;partis sur les quatre sous-noms de domaine, et j'ai donc le chargement simultan&#233; d'au moins 8 fichiers par le navigateur.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&#192; noter.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&#8212; La fonction &lt;code class='spip_code' dir='ltr'&gt;#FILTRE&lt;/code&gt; ne concerne que le contenu de la page compil&#233;e. S'il y a des inclusions, il faut consid&#233;rer que :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; les inclusions statiques en &lt;code class='spip_code' dir='ltr'&gt;[(#INCLURE...)]&lt;/code&gt; sont trait&#233;es (puisque le contenu est ins&#233;r&#233; dans la page avant le passage &#224; &lt;code class='spip_code' dir='ltr'&gt;#FILTRE&lt;/code&gt; ;&lt;/li&gt;&lt;li&gt; les inclusions dynamiques en &lt;code class='spip_code' dir='ltr'&gt;&lt;INCLURE...&gt;&lt;/code&gt; ne sont pas trait&#233;es. Si l'on veut traiter ces &#233;l&#233;ments, il faut ajouter &lt;code class='spip_code' dir='ltr'&gt;#FILTRE&lt;/code&gt; &#224; l'int&#233;rieur m&#234;me de ces morceaux de squelettes. Mais c'est aussi une fa&#231;on d'exclure certaines parties du site.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&#8212; Les appels &#224; Google Analytics tels que fournis par Google sont corrompus par le script. Les appels au serveur de publicit&#233; OpenX &#233;galement. Il suffit de placer ces &#233;l&#233;ments dans des squelettes s&#233;par&#233;s sur lesquels on ne fait pas passer le filtre (donc appel&#233;s par &lt;code class='spip_code' dir='ltr'&gt;&lt;INCLURE...&gt;&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;&#8212; Il est d&#233;conseill&#233; de trop multiplier les sous-noms de domaine (mon script peut facilement g&#233;rer 16 sous-noms de domaine) : il faut en effet que le navigateur interroge le DNS pour chacun des sous-noms de domaine, et on perdrait trop temps avec trop de domaines diff&#233;rents.&lt;/p&gt; &lt;p&gt;&#8212; Au niveau du serveur Apache, penser &#224; activer le fonctionnement &lt;code class='spip_code' dir='ltr'&gt;KeepAlive&lt;/code&gt;, et &#224; avoir un &lt;code class='spip_code' dir='ltr'&gt;MaxServers&lt;/code&gt; suffisant (puisqu'on lance plus de connexions simultan&#233;ment &#224; chaque page).&lt;/p&gt; &lt;p&gt;&#8212; Comme pr&#233;conis&#233; par PageSpeed, j'ai &#233;galement activ&#233; les modules &lt;code class='spip_code' dir='ltr'&gt;expires&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;headers&lt;/code&gt;, pour que le serveur envoie automatiquement les indications de mise en cache pour les images, les fichiers CSS et les fichiers javascript. Une fois install&#233;s, j'ai ajout&#233; la configuration suivante :&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='8' class='spip_cadre' dir='ltr'&gt;ExpiresActive on ExpiresByType text/css A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 ExpiresByType image/gif A2592000&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;&#8212; Enfin, je r&#233;p&#232;te ce que j'ai d&#233;j&#224; indiqu&#233; dans d'autres billets : la gestion/configuration d'un serveur n'est vraiment pas mon domaine. Je bidouille. Je suis donc tr&#232;s preneur de conseils et commentaires de la part d'informaticiens cal&#233;s sur le sujet pour am&#233;liorer cette technique.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Scroll auto sur iPhone, iPod et iPad</title>
		<link>http://www.paris-beyrouth.org/tutoriaux-spip/article/scroll-auto-sur-iphone-ipod-et</link>
		<guid isPermaLink="true">http://www.paris-beyrouth.org/tutoriaux-spip/article/scroll-auto-sur-iphone-ipod-et</guid>
		<dc:date>2010-04-06T15:00:17Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>ARNO*</dc:creator>



		<description>Avertissement : cette astuce n'est pas r&#233;serv&#233;e &#224; SPIP. Elle concerne n'importe quelle page HTML destin&#233;e &#224; l'affichage sur iPhone ou iPad. (Mais personnellement, je d&#233;veloppe jamais que du HTML avec SPIP...) Sur Safari versions iPhone, iPad et iPad, il est tr&#232;s difficile d'utiliser le scroll automatique pour des &#233;l&#233;ments de hauteur fix&#233;e dot&#233;e du style : overflow : auto ; Le comportement existe, mais est g&#233;n&#233;ralement inconnu des usagers : le scroll s'obtient en caressant l'engin avec deux doigts. Le (...)

-
&lt;a href="http://www.paris-beyrouth.org/tutoriaux-spip/" rel="directory"&gt;999. Tutoriaux SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Avertissement : cette astuce n'est pas r&#233;serv&#233;e &#224; SPIP. Elle concerne n'importe quelle page HTML destin&#233;e &#224; l'affichage sur iPhone ou iPad. (Mais personnellement, je d&#233;veloppe jamais que du HTML avec SPIP...)&lt;/p&gt; &lt;p&gt;Sur Safari versions iPhone, iPad et iPad, il est tr&#232;s difficile d'utiliser le scroll automatique pour des &#233;l&#233;ments de hauteur fix&#233;e dot&#233;e du style :&lt;/p&gt;
&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;overflow&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le comportement existe, mais est g&#233;n&#233;ralement inconnu des usagers : le scroll s'obtient en caressant l'engin avec deux doigts. Le scroll avec un doigt est r&#233;serv&#233; au scroll g&#233;n&#233;ral de la page.&lt;/p&gt; &lt;p&gt;Si votre page est con&#231;ue comme une &#171; application Web &#187;, ce comportement est tr&#232;s p&#233;nible. Je n'ai pas trouv&#233; de solution satisfaisante pour r&#233;tablir le comportement &#171; habituel &#187; sur ces machines, aussi j'ai d&#233;velopp&#233; un petit javascript (utilisant jQuery).&lt;/p&gt; &lt;p&gt;Je vous le livre donc ci-dessous, tel quel.&lt;/p&gt; &lt;p&gt;Outre le retour du scroll &#224; un doigt sur les &#233;l&#233;ments &#224; &lt;code class='spip_code' dir='ltr'&gt;overflow&lt;/code&gt;, le script simule l'apparition et la disparition d'une scrollbar &#224; la fa&#231;on de Safari.&lt;/p&gt; &lt;p&gt;Pour l'utiliser, il faut ajouter la classe &lt;code class='spip_code' dir='ltr'&gt;scroll_auto&lt;/code&gt; aux &#233;l&#233;ments concern&#233;s (les &#233;l&#233;ments qui sont con&#231;us pour la classe &lt;code class='spip_code' dir='ltr'&gt;overflow&lt;/code&gt;). Par exemple :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_html4strict cadre&quot;&gt;&lt;div class=&quot;html4strict&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #000066;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;cadredemo&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;scroll_auto&quot;&lt;/span&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; Ceci est mon texte.&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; [...]&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; Ce contenu est suffisamment long pour d&#233;clencher le syst&#232;me de scroll.&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;&lt;span style=&quot;color: #66cc66;&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://december.com/html/4/element/div.html&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;div&lt;/span&gt;&lt;/a&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/ee0eb9b7baf4335ce14ee2bed61befaa.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pour &#234;tre coh&#233;rent, il faut &#233;videmment que le cadre dot&#233; du &lt;code class='spip_code' dir='ltr'&gt;scroll_auto&lt;/code&gt; soit de hauteur fixe et dot&#233; d'un &lt;code class='spip_code' dir='ltr'&gt;overflow&lt;/code&gt;, par exemple :&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;div class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #cc00cc;&quot;&gt;#cadredemo&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #933;&quot;&gt;400px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;overflow&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #993333;&quot;&gt;auto&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/4ce946868502f1946e828b6a97e37bc5.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Il suffit ensuite d'appeler le fichier Javascript dans votre header, il d&#233;clenchera tout seul tout le comportement n&#233;cessaire.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Notez bien :&lt;/strong&gt; si vous testez votre page Safari sous Mac (ou sous Windows) en modifiant son indication d'agent utilisateur, le comportement ne fonctionnera pas : les &#233;v&#233;nements &lt;code class='spip_code' dir='ltr'&gt;touchstart&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;touchmove&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;touchend&lt;/code&gt; ne sont int&#233;gr&#233;s qu'aux versions iPhone, iPod et iPad.&lt;/p&gt; &lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_javascript cadre&quot;&gt;&lt;div class=&quot;javascript&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; debut_scroll_Y &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; debut_marginTop &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; hauteur_scrollbar_auto &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt; fix_scroll_auto&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;navigator.&lt;span style=&quot;color: #660066;&quot;&gt;userAgent&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009966; font-style: italic;&quot;&gt;/iPhone|iPod|iPad/i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.scroll_auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; contenu &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; start_time &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; last_decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; rapport &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; hauteur_max &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; hauteur_boite &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; .&lt;span style=&quot;color: #660066;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;&lt;div class='scrollbar_auto' style='position: absolute; top: 0px; right: 3px; -webkit-box-shadow: 0px 0px 2px rgba(255,255,255, 0.3); width: 5px; height: 100px; -webkit-border-radius: 3px; background-color: rgba(0,0,0,0.5); z-index: 100; display: none; '&gt;&lt;/div&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;&lt;div class='wrapper' style='height: auto; -webkit-transition-property: margin-top; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: ease-out;'&gt;&quot;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; contenu &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;&lt;div style='clear: both;'&gt;&lt;/div&gt;&lt;/div&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;&lt;div class='bidon' style='position: absolute; opacity: 0;'&gt;&lt;/div&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; .&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;position&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;relative&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; .&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;overflow&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;hidden&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;ontouchstart&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;evt&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; debut_scroll_Y &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; evt.&lt;span style=&quot;color: #660066;&quot;&gt;touches&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;pageY&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; now &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;new&lt;/span&gt; Date&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getTime&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; start_time &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; parseInt&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;now&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; last_decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; debut_marginTop &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; parseInt&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;marginTop&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; rapport &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;rapport &lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.scrollbar_auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;fadeIn&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; hauteur_scrollbar_auto &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; Math.&lt;span style=&quot;color: #660066;&quot;&gt;floor&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;rapport &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.scrollbar_auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;hauteur_scrollbar_auto&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; hauteur_max &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; hauteur_max &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; hauteur_boite &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;outerHeight&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;ontouchmove&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;event&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;rapport &lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; y &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; event.&lt;span style=&quot;color: #660066;&quot;&gt;touches&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;pageY&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; y &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt; debut_scroll_Y&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; last_decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; decal&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; debut_marginTop&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;decal &lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;decal &lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;marginTop&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; decal&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;// Hack bizarre: dans certains cas, il faut ecrire quelque chose quelquepart pour que le scroll fonctionne en direct&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.bidon&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;bidon&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; rapport_pos &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;decal &lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; vide &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; Math.&lt;span style=&quot;color: #660066;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; rapport_pos &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;hauteur_boite &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt; hauteur_scrollbar_auto&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.scrollbar_auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;marginTop&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; vide&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;ontouchend&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;event&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; now_end &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;new&lt;/span&gt; Date&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getTime&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; end_time &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; parseInt&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;now_end&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; duree &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; end_time &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt; start_time&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; Math.&lt;span style=&quot;color: #660066;&quot;&gt;round&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;last_decal &lt;span style=&quot;color: #339933;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;/&lt;/span&gt;duree&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; debut_marginTop&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;hauteur_max &lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;decal &lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;decal &lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; decal &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; hauteur_max&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.wrapper&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;css&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;marginTop&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; decal&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;// Hack bizarre: dans certains cas, il faut ecrire quelque chose quelquepart pour que le scroll fonctionne en direct&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;children&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.bidon&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;bidon&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;document&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;ready&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; fix_scroll_auto&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;document&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;bind&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;touchend touchcancel&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;.scrollbar_auto&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;fadeOut&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://www.paris-beyrouth.org/local/cache-code/81d4dee231b41167c9a21dd44b52d9f1.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Version 0.2.&lt;/strong&gt;&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Am&#233;lioration du rendu visuel de la scrollbar.&lt;/li&gt;&lt;li&gt; Effet de transition du scroll : &#224; la fin du scroll, si on a effectu&#233; un mouvement vertical rapide (&#171; swipe &#187;), le scroll continue un peu plus loin.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Version 0.3&lt;/strong&gt; Les clicks (pas de scroll) &#224; l'int&#233;rieur du scroll provoquaient un d&#233;calage apr&#232;s un premier scroll (&#224; noter : dans un simple &#171; click &#187;, il n'y a semble-t-il pas de ontouchmove du tout).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Version 0.4&lt;/strong&gt; Optimiser le code, augmenter la vitesse d'ex&#233;cution.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
