Changeset 71544 in spip-zone
- Timestamp:
- Apr 3, 2013, 9:40:26 PM (8 years ago)
- Location:
- _plugins_/coloration_code/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/coloration_code/trunk/coloration_code_fonctions.php
r71540 r71544 52 52 if ($cadre == 'cadre') 53 53 $englobant = 'div'; 54 $balise_code = ($englobant == 'div' ? "div":"code"); 54 55 55 56 // Supprime le premier et le dernier retour chariot … … 77 78 $geshi->set_overall_style(''); 78 79 $geshi->set_code_style(''); 79 80 80 81 $stylecss = ""; 81 82 if (!PLUGIN_COLORATION_CODE_STYLES_INLINE OR PLUGIN_COLORATION_CODE_SANS_STYLES) { … … 120 121 $datatext_content = ' data-clipboard-text="'.attribut_html($code).'"'; 121 122 122 if ($cadre == 'cadre') { 123 $spip_cadre = ' spip_cadre'; 124 $geshi->set_header_type(GESHI_HEADER_DIV); 123 if ($cadre == 'cadre' OR $englobant=="div") { 124 $geshi->set_header_type(GESHI_HEADER_PRE); 125 125 $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); 126 126 } else { 127 $spip_cadre = '';128 127 $geshi->set_header_type(GESHI_HEADER_NONE); 129 128 $geshi->enable_line_numbers(GESHI_NO_LINE_NUMBERS); … … 133 132 // And echo the result! 134 133 // 135 $rempl = $stylecss . '<' . $englobant . ' class="coloration_code "><' . $englobant . ' class="spip_'.$language.' '.$cadre.$spip_cadre.'"'.$datatext_content.'>'.$geshi->parse_code().'</' . $englobant. '>';134 $rempl = $stylecss . '<' . $englobant . ' class="coloration_code '.$cadre.'"><' . $balise_code . ' class="spip_'.$language.' '.$cadre.'"'.$datatext_content.'>'.$geshi->parse_code().'</' . $balise_code . '>'; 136 135 137 136 if ($telecharge) { 138 $rempl .= "< div class='" . $cadre . "_download'><a href='$fichier'>"._T('bouton_download')."</a></div>";137 $rempl .= "<p class='download " . $cadre . "_download'><a href='$fichier'>"._T('bouton_download')."</a></p>"; 139 138 } 140 139 return $rempl.'</' . $englobant . '>'; -
_plugins_/coloration_code/trunk/css/coloration_code.css
r67979 r71544 1 .cadre_download{ 2 text-align:right; 1 .coloration_code pre { 2 background: #eee; 3 padding: 0; 4 -webkit-box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 5 -moz-box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 6 box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 7 white-space: pre-wrap; 8 word-break: break-all; 9 word-wrap: break-word; 10 padding:1em 0; 3 11 } 12 .coloration_code .download {text-align: right} 4 13 5 .cadre_download a{ 6 font-family: verdana, arial, sans; font-weight: bold; font-style: normal; 14 .coloration_code ol{ 15 list-style-type: decimal; 16 margin-left:43px; 7 17 } -
_plugins_/coloration_code/trunk/paquet.xml
r71540 r71544 2 2 prefix="coloration_code" 3 3 categorie="edition" 4 version="0. 7.2"4 version="0.8.0" 5 5 etat="stable" 6 6 compatibilite="[2.0.0;3.0.99]" -
_plugins_/coloration_code/trunk/plugin.xml
r71540 r71544 16 16 <icon>coloration-32.png</icon> 17 17 <auteur>Pierre Andrews (Mortimer) - ARNO*</auteur> 18 <version>0. 7.2</version>18 <version>0.8.0</version> 19 19 <etat>stable</etat> 20 20 <description> -
_plugins_/coloration_code/trunk/prive/themes/spip/coloration_code.css
r64737 r71544 1 .coloration_code .spip_cadre{2 margin-left:2em; 1 .coloration_code.cadre { 2 3 3 } 4 5 .coloration_code pre { 6 background: #eee; 7 padding: 0; 8 -webkit-box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 9 -moz-box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 10 box-shadow: inset 40px 0 0 #f7f7f7, inset 41px 0 0 #ececf0; 11 white-space: pre-wrap; 12 word-break: break-all; 13 word-wrap: break-word; 14 padding:1em 0; 15 } 16 .coloration_code .download {text-align: right} 4 17 5 18 .coloration_code ol{ 6 19 list-style-type: decimal; 7 margin-left: 0em;20 margin-left:43px; 8 21 }
Note: See TracChangeset
for help on using the changeset viewer.