Changeset 376:e3fd223da7f8
- Timestamp:
- 06/16/11 13:01:26 (14 years ago)
- Branch:
- themes
- Location:
- themes/ductile
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_config.php
r357 r376 13 13 14 14 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main'); 15 16 $fonts = array( 17 __('default') => '', 18 __('Ductile primary') => 'Ductile body', 19 __('Ductile secondary') => 'Ductile alternate', 20 __('Times New Roman') => 'Times New Roman', 21 __('Georgia') => 'Georgia', 22 __('Garamond') => 'Garamond', 23 __('Helvetica/Arial') => 'Helvetica/Arial', 24 __('Verdana') => 'Verdana', 25 __('Trebuchet MS') => 'Trebuchet MS', 26 __('Impact') => 'Impact', 27 __('Monospace') => 'Monospace' 28 ); 15 29 16 30 function adjustColor($c) … … 40 54 'body_link_c' => null, 41 55 'body_link_v_c' => null, 42 'body_link_f_c' => null 56 'body_link_f_c' => null, 57 'body_font' => null, 58 'alternate_font' => null 43 59 ); 44 60 … … 59 75 $ductile_user['body_link_v_c'] = adjustColor($_POST['body_link_v_c']); 60 76 77 $ductile_user['body_font'] = $_POST['body_font']; 78 $ductile_user['alternate_font'] = $_POST['alternate_font']; 79 61 80 $core->blog->settings->addNamespace('themes'); 62 81 $core->blog->settings->themes->put('ductile_style',serialize($ductile_user)); … … 74 93 } 75 94 95 echo '<fieldset><legend>'.__('Fonts').'</legend>'. 96 '<p class="field"><label for="body_font">'.__('Main font:').' '. 97 form::combo('body_font',$fonts,$ductile_user['body_font']).'</label></p>'. 98 99 '<p class="field"><label for="alternate_font">'.__('Alternate font:').' '. 100 form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label></p>'. 101 '</fieldset>'; 102 76 103 echo '<fieldset><legend>'.__('Links').'</legend>'. 77 104 '<p class="field"><label for="body_link_c">'.__('Links color:').' '. -
themes/ductile/_public.php
r357 r376 43 43 # Properties 44 44 45 # Main font 46 $main_font_selectors = 'body, #supranav li a span, #comments.me, a.comment-number'; 47 self::prop($css,$main_font_selectors,'font-family',self::fontDef($s['body_font'])); 48 49 # Alternate font 50 $alternate_font_selectors = '#blogdesc, #supranav li, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer p'; 51 self::prop($css,$alternate_font_selectors,'font-family',self::fontDef($s['alternate_font'])); 52 53 # Link colors 45 54 self::prop($css,'a','color',$s['body_link_c']); 46 55 self::prop($css,'a:visited','color',$s['body_link_v_c']); 47 56 self::prop($css,'a:hover, a:focus, a:active','color',$s['body_link_f_c']); 48 57 58 # Style directives 49 59 $res = ''; 50 60 foreach ($css as $selector => $values) { … … 59 69 } 60 70 71 protected static $fonts = array( 72 'Ductile body' => '"Century Schoolbook", "Century Schoolbook L", Georgia, serif', 73 'Ductile alternate' => '"Franklin gothic medium", "arial narrow", "DejaVu Sans Condensed", "helvetica neue", helvetica, sans-serif', 74 'Times New Roman' => 'Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif', 75 'Georgia' => 'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif', 76 'Garamond' => '"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif', 77 'Helvetica/Arial' => 'Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif', 78 'Verdana' => 'Corbel, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "DejaVu Sans", "Bitstream Vera Sans", "Liberation Sans", Verdana, "Verdana Ref", sans-serif', 79 'Trebuchet MS' => '"Segoe UI", Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif', 80 'Impact' => 'Impact, Haettenschweiler, "Franklin Gothic Bold", Charcoal, "Helvetica Inserat", "Bitstream Vera Sans Bold", "Arial Black", sans-serif', 81 'Monospace' => 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace' 82 ); 83 84 protected static function fontDef($c) 85 { 86 return isset(self::$fonts[$c]) ? self::$fonts[$c] : null; 87 } 88 61 89 protected static function prop(&$css,$selector,$prop,$value) 62 90 { -
themes/ductile/locales/fr/main.po
r357 r376 1 1 msgid "Style sheet upgraded." 2 2 msgstr "Feuille de style mise à jour." 3 4 msgid "Fonts" 5 msgstr "Polices de caractère" 6 7 msgid "Main font:" 8 msgstr "Famille de police principale :" 9 10 msgid "Alternate font:" 11 msgstr "Famille de police secondaire :" 12 13 msgid "Ductile primary" 14 msgstr "Principale de Ductile" 15 16 msgid "Ductile secondary" 17 msgstr "Secondaire de Ductile" 18 19 msgid "Times New Roman" 20 msgstr "Times New Roman" 21 22 msgid "Georgia" 23 msgstr "Georgia" 24 25 msgid "Garamond" 26 msgstr "Garamond" 27 28 msgid "Helvetica/Arial" 29 msgstr "Helvetica/Arial" 30 31 msgid "Verdana" 32 msgstr "Verdana" 33 34 msgid "Trebuchet MS" 35 msgstr "Trebuchet MS" 36 37 msgid "Impact" 38 msgstr "Impact" 39 40 msgid "Monospace" 41 msgstr "Monospace"
Note: See TracChangeset
for help on using the changeset viewer.