Changeset 3874:ab8368569446 for themes
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- Location:
- themes
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/berlin/_define.php
r3731 r3874 17 17 "Dotclear Team", // Author 18 18 '1.2', // Version 19 array(// Properties19 [ // Properties 20 20 'type' => 'theme', 21 21 'tplset' => 'dotty' 22 )22 ] 23 23 ); -
themes/berlin/_public.php
r3731 r3874 17 17 //__('Show menu').__('Hide menu').__('Navigation'); 18 18 19 $core->addBehavior('publicHeadContent', array(__NAMESPACE__ . '\behaviorBerlinTheme', 'publicHeadContent'));19 $core->addBehavior('publicHeadContent', [__NAMESPACE__ . '\behaviorBerlinTheme', 'publicHeadContent']); 20 20 21 21 class behaviorBerlinTheme … … 23 23 public static function publicHeadContent() 24 24 { 25 echo \dcUtils::jsVars( array(25 echo \dcUtils::jsVars([ 26 26 'dotclear_berlin_show_menu' => __('Show menu'), 27 27 'dotclear_berlin_hide_menu' => __('Hide menu'), 28 28 'dotclear_berlin_navigation' => __('Navigation') 29 ));29 ]); 30 30 } 31 31 } -
themes/blueSilence/_define.php
r3731 r3874 17 17 "Marco / marcarea.com", // Author 18 18 '1.0', // Version 19 array(19 [ 20 20 'type' => 'theme' 21 )21 ] 22 22 ); -
themes/customCSS/_define.php
r3731 r3874 17 17 "Olivier", // Author 18 18 '1.2', // Version 19 array(19 [ 20 20 'type' => 'theme' 21 )21 ] 22 22 ); -
themes/customCSS/_public.php
r3731 r3874 14 14 if (!defined('DC_RC_PATH')) {return;} 15 15 16 $core->addBehavior('publicHeadContent', array(__NAMESPACE__ . '\tplCustomTheme', 'publicHeadContent'));16 $core->addBehavior('publicHeadContent', [__NAMESPACE__ . '\tplCustomTheme', 'publicHeadContent']); 17 17 18 18 class tplCustomTheme -
themes/default/_define.php
r3731 r3874 17 17 "Marco & Olivier", // Author 18 18 '1.0', // Version 19 array(19 [ 20 20 'type' => 'theme' 21 )21 ] 22 22 ); -
themes/ductile/_config.php
r3731 r3874 30 30 } 31 31 32 $list_types = array(32 $list_types = [ 33 33 __('Title') => 'title', 34 34 __('Short') => 'short', 35 35 __('Full') => 'full' 36 );36 ]; 37 37 // Get all _entry-*.html in tpl folder of theme 38 38 $list_types_templates = files::scandir($tpl_path); … … 50 50 } 51 51 52 $contexts = array(52 $contexts = [ 53 53 'default' => __('Home (first page)'), 54 54 'default-page' => __('Home (other pages)'), … … 57 57 'search' => __('Search result entries'), 58 58 'archive' => __('Month archive entries') 59 );60 61 $fonts = array(59 ]; 60 61 $fonts = [ 62 62 __('Default') => '', 63 63 __('Ductile primary') => 'Ductile body', … … 71 71 __('Impact') => 'Impact', 72 72 __('Monospace') => 'Monospace' 73 );74 75 $webfont_apis = array(73 ]; 74 75 $webfont_apis = [ 76 76 __('none') => '', 77 77 __('javascript (Adobe)') => 'js', 78 78 __('stylesheet (Google)') => 'css' 79 );80 81 $font_families = array(79 ]; 80 81 $font_families = [ 82 82 // Theme standard 83 83 'Ductile body' => '"Century Schoolbook", "Century Schoolbook L", Georgia, serif', … … 99 99 // Monospace families 100 100 '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' 101 );101 ]; 102 102 103 103 function fontDef($c) … … 108 108 } 109 109 110 $ductile_base = array(110 $ductile_base = [ 111 111 // HTML 112 112 'subtitle_hidden' => null, … … 138 138 'post_title_c_m' => null, 139 139 'post_simple_title_c' => null 140 );141 142 $ductile_lists_base = array(140 ]; 141 142 $ductile_lists_base = [ 143 143 'default' => 'short', 144 144 'default-page' => 'short', … … 147 147 'search' => 'short', 148 148 'archive' => 'short' 149 );150 151 $ductile_counts_base = array(149 ]; 150 151 $ductile_counts_base = [ 152 152 'default' => null, 153 153 'default-page' => null, … … 155 155 'tag' => null, 156 156 'search' => null 157 );157 ]; 158 158 159 159 $ductile_user = $core->blog->settings->themes->get($core->blog->settings->system->theme . '_style'); 160 160 $ductile_user = @unserialize($ductile_user); 161 161 if (!is_array($ductile_user)) { 162 $ductile_user = array();162 $ductile_user = []; 163 163 } 164 164 $ductile_user = array_merge($ductile_base, $ductile_user); … … 183 183 // If no stickers defined, add feed Atom one 184 184 if (!is_array($ductile_stickers)) { 185 $ductile_stickers = array(array(185 $ductile_stickers = [[ 186 186 'label' => __('Subscribe'), 187 187 'url' => $core->blog->url . 188 188 $core->url->getURLFor('feed', 'atom'), 189 189 'image' => 'sticker-feed.png' 190 ));191 } 192 193 $ductile_stickers_full = array();190 ]]; 191 } 192 193 $ductile_stickers_full = []; 194 194 // Get all sticker images already used 195 195 if (is_array($ductile_stickers)) { … … 205 205 if (!in_array($v, $ductile_stickers_full)) { 206 206 // image not already used 207 $ductile_stickers[] = array(207 $ductile_stickers[] = [ 208 208 'label' => null, 209 209 'url' => null, 210 'image' => $v );210 'image' => $v]; 211 211 } 212 212 } … … 225 225 $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']); 226 226 227 $ductile_stickers = array();227 $ductile_stickers = []; 228 228 for ($i = 0; $i < count($_POST['sticker_image']); $i++) { 229 $ductile_stickers[] = array(229 $ductile_stickers[] = [ 230 230 'label' => $_POST['sticker_label'][$i], 231 231 'url' => $_POST['sticker_url'][$i], 232 232 'image' => $_POST['sticker_image'][$i] 233 );234 } 235 236 $order = array();233 ]; 234 } 235 236 $order = []; 237 237 if (empty($_POST['ds_order']) && !empty($_POST['order'])) { 238 238 $order = $_POST['order']; … … 241 241 } 242 242 if (!empty($order)) { 243 $new_ductile_stickers = array();243 $new_ductile_stickers = []; 244 244 foreach ($order as $i => $k) { 245 $new_ductile_stickers[] = array(245 $new_ductile_stickers[] = [ 246 246 'label' => $ductile_stickers[$k]['label'], 247 247 'url' => $ductile_stickers[$k]['url'], 248 248 'image' => $ductile_stickers[$k]['image'] 249 );249 ]; 250 250 } 251 251 $ductile_stickers = $new_ductile_stickers; … … 325 325 '<h3>' . __('Content') . '</h3>'; 326 326 327 echo '<form id="theme_config" action="' . $core->adminurl->get('admin.blog.theme', array('conf' => '1')) .327 echo '<form id="theme_config" action="' . $core->adminurl->get('admin.blog.theme', ['conf' => '1']) . 328 328 '" method="post" enctype="multipart/form-data">'; 329 329 … … 357 357 echo 358 358 '<tr class="line" id="l_' . $i . '">' . 359 '<td class="handle minimal">' . form::number( array('order[' . $i . ']'), array(359 '<td class="handle minimal">' . form::number(['order[' . $i . ']'], [ 360 360 'min' => 0, 361 361 'default' => $count, 362 362 'class' => 'position' 363 )) .364 form::hidden( array('dynorder[]', 'dynorder-' . $i), $i) . '</td>' .365 '<td>' . form::hidden( array('sticker_image[]'), $v['image']) . '<img src="' . $img_url . $v['image'] . '" alt="' . $v['image'] . '" /> ' . '</td>' .366 '<td scope="row">' . form::field( array('sticker_label[]', 'dsl-' . $i), 20, 255, $v['label']) . '</td>' .367 '<td>' . form::field( array('sticker_url[]', 'dsu-' . $i), 40, 255, $v['url']) . '</td>' .363 ]) . 364 form::hidden(['dynorder[]', 'dynorder-' . $i], $i) . '</td>' . 365 '<td>' . form::hidden(['sticker_image[]'], $v['image']) . '<img src="' . $img_url . $v['image'] . '" alt="' . $v['image'] . '" /> ' . '</td>' . 366 '<td scope="row">' . form::field(['sticker_label[]', 'dsl-' . $i], 20, 255, $v['label']) . '</td>' . 367 '<td>' . form::field(['sticker_url[]', 'dsu-' . $i], 40, 255, $v['url']) . '</td>' . 368 368 '</tr>'; 369 369 } … … 387 387 '<tr>' . 388 388 '<td scope="row">' . $contexts[$k] . '</td>' . 389 '<td>' . form::hidden( array('list_ctx[]'), $k) . form::combo(array('list_type[]'), $list_types, $v) . '</td>';389 '<td>' . form::hidden(['list_ctx[]'], $k) . form::combo(['list_type[]'], $list_types, $v) . '</td>'; 390 390 if (array_key_exists($k, $ductile_counts)) { 391 echo '<td>' . form::hidden( array('count_ctx[]'), $k) . form::number(array('count_nb[]'), array(391 echo '<td>' . form::hidden(['count_ctx[]'], $k) . form::number(['count_nb[]'], [ 392 392 'min' => 0, 393 393 'max' => 999, 394 394 'default' => $ductile_counts[$k] 395 )) . '</td>';395 ]) . '</td>'; 396 396 } else { 397 397 echo '<td></td>'; … … 418 418 echo '<div class="multi-part" id="themes-list' . ($conf_tab == 'css' ? '' : '-css') . '" title="' . __('Presentation') . '">'; 419 419 420 echo '<form id="theme_config" action="' . $core->adminurl->get('admin.blog.theme', array('conf' => '1')) .420 echo '<form id="theme_config" action="' . $core->adminurl->get('admin.blog.theme', ['conf' => '1']) . 421 421 '" method="post" enctype="multipart/form-data">'; 422 422 … … 469 469 470 470 '<p class="field picker"><label for="blog_title_c">' . __('Color:') . '</label> ' . 471 form::color('blog_title_c', array('default' => $ductile_user['blog_title_c'])) .471 form::color('blog_title_c', ['default' => $ductile_user['blog_title_c']]) . 472 472 dcThemeConfig::contrastRatio($ductile_user['blog_title_c'], '#ffffff', 473 473 (!empty($ductile_user['blog_title_s']) ? $ductile_user['blog_title_s'] : '2em'), … … 486 486 487 487 '<p class="field picker"><label for="post_title_c">' . __('Color:') . '</label> ' . 488 form::color('post_title_c', array('default' => $ductile_user['post_title_c'])) .488 form::color('post_title_c', ['default' => $ductile_user['post_title_c']]) . 489 489 dcThemeConfig::contrastRatio($ductile_user['post_title_c'], '#ffffff', 490 490 (!empty($ductile_user['post_title_s']) ? $ductile_user['post_title_s'] : '2.5em'), … … 498 498 499 499 '<p class="field picker"><label for="post_simple_title_c">' . __('Color:') . '</label> ' . 500 form::color('post_simple_title_c', array('default' => $ductile_user['post_simple_title_c'])) .500 form::color('post_simple_title_c', ['default' => $ductile_user['post_simple_title_c']]) . 501 501 dcThemeConfig::contrastRatio($ductile_user['post_simple_title_c'], '#ffffff', 502 502 '1.1em', // H5 minimum size … … 509 509 510 510 '<p class="field picker"><label for="post_link_v_c">' . __('Normal and visited links color:') . '</label> ' . 511 form::color('post_link_v_c', array('default' => $ductile_user['post_link_v_c'])) .511 form::color('post_link_v_c', ['default' => $ductile_user['post_link_v_c']]) . 512 512 dcThemeConfig::contrastRatio($ductile_user['post_link_v_c'], '#ffffff', 513 513 '1em', … … 516 516 517 517 '<p class="field picker"><label for="post_link_f_c">' . __('Active, hover and focus links color:') . '</label> ' . 518 form::color('post_link_f_c', array('default' => $ductile_user['post_link_f_c'])) .518 form::color('post_link_f_c', ['default' => $ductile_user['post_link_f_c']]) . 519 519 dcThemeConfig::contrastRatio($ductile_user['post_link_f_c'], '#ebebee', 520 520 '1em', … … 535 535 536 536 '<p class="field picker"><label for="blog_title_c_m">' . __('Color:') . '</label> ' . 537 form::color('blog_title_c_m', array('default' => $ductile_user['blog_title_c_m'])) .537 form::color('blog_title_c_m', ['default' => $ductile_user['blog_title_c_m']]) . 538 538 dcThemeConfig::contrastRatio($ductile_user['blog_title_c_m'], '#d7d7dc', 539 539 (!empty($ductile_user['blog_title_s_m']) ? $ductile_user['blog_title_s_m'] : '1.8em'), … … 552 552 553 553 '<p class="field picker"><label for="post_title_c_m">' . __('Color:') . '</label> ' . 554 form::color('post_title_c_m', array('default' => $ductile_user['post_title_c_m'])) .554 form::color('post_title_c_m', ['default' => $ductile_user['post_title_c_m']]) . 555 555 dcThemeConfig::contrastRatio($ductile_user['post_title_c_m'], '#ffffff', 556 556 (!empty($ductile_user['post_title_s_m']) ? $ductile_user['post_title_s_m'] : '1.5em'), -
themes/ductile/_define.php
r3731 r3874 17 17 "Dotclear Team", // Author 18 18 '1.5', // Version 19 array(// Properties19 [ // Properties 20 20 'standalone_config' => true, 21 21 'type' => 'theme' 22 )22 ] 23 23 ); -
themes/ductile/_prepend.php
r3731 r3874 19 19 20 20 # Behaviors 21 $GLOBALS['core']->addBehavior('adminPageHTMLHead', array(__NAMESPACE__ . '\tplDuctileThemeAdmin', 'adminPageHTMLHead'));21 $GLOBALS['core']->addBehavior('adminPageHTMLHead', [__NAMESPACE__ . '\tplDuctileThemeAdmin', 'adminPageHTMLHead']); 22 22 23 23 class tplDuctileThemeAdmin -
themes/ductile/_public.php
r3731 r3874 17 17 18 18 # Behaviors 19 $core->addBehavior('publicHeadContent', array(__NAMESPACE__ . '\tplDuctileTheme', 'publicHeadContent'));20 $core->addBehavior('publicInsideFooter', array(__NAMESPACE__ . '\tplDuctileTheme', 'publicInsideFooter'));19 $core->addBehavior('publicHeadContent', [__NAMESPACE__ . '\tplDuctileTheme', 'publicHeadContent']); 20 $core->addBehavior('publicInsideFooter', [__NAMESPACE__ . '\tplDuctileTheme', 'publicInsideFooter']); 21 21 22 22 # Templates 23 $core->tpl->addValue('ductileEntriesList', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileEntriesList'));24 $core->tpl->addBlock('EntryIfContentIsCut', array(__NAMESPACE__ . '\tplDuctileTheme', 'EntryIfContentIsCut'));25 $core->tpl->addValue('ductileNbEntryPerPage', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileNbEntryPerPage'));26 $core->tpl->addValue('ductileLogoSrc', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileLogoSrc'));27 $core->tpl->addBlock('IfPreviewIsNotMandatory', array(__NAMESPACE__ . '\tplDuctileTheme', 'IfPreviewIsNotMandatory'));23 $core->tpl->addValue('ductileEntriesList', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileEntriesList']); 24 $core->tpl->addBlock('EntryIfContentIsCut', [__NAMESPACE__ . '\tplDuctileTheme', 'EntryIfContentIsCut']); 25 $core->tpl->addValue('ductileNbEntryPerPage', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileNbEntryPerPage']); 26 $core->tpl->addValue('ductileLogoSrc', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileLogoSrc']); 27 $core->tpl->addBlock('IfPreviewIsNotMandatory', [__NAMESPACE__ . '\tplDuctileTheme', 'IfPreviewIsNotMandatory']); 28 28 29 29 class tplDuctileTheme … … 109 109 110 110 $tpl_path = dirname(__FILE__) . '/tpl/'; 111 $list_types = array('title', 'short', 'full');111 $list_types = ['title', 'short', 'full']; 112 112 113 113 // Get all _entry-*.html in tpl folder of theme … … 133 133 $ret .= ' case \'' . $v . '\':' . "\n" . 134 134 '?>' . "\n" . 135 $core->tpl->includeFile( array('src' => '_entry-' . $v . '.html')) . "\n" .135 $core->tpl->includeFile(['src' => '_entry-' . $v . '.html']) . "\n" . 136 136 '<?php ' . "\n" . 137 137 ' break;' . "\n"; … … 303 303 304 304 $ret = ''; 305 $css = array();306 $uri = array();305 $css = []; 306 $uri = []; 307 307 if (!isset($s['body_font']) || ($s['body_font'] == '')) { 308 308 // See if webfont defined for main font … … 369 369 } 370 370 371 $css = array();371 $css = []; 372 372 373 373 # Properties … … 420 420 421 421 # Large screens 422 $css_large = array();422 $css_large = []; 423 423 424 424 # Blog title font weight … … 478 478 479 479 # Small screens 480 $css_small = array();480 $css_small = []; 481 481 482 482 # Blog title font weight … … 532 532 } 533 533 534 protected static $fonts = array(534 protected static $fonts = [ 535 535 // Theme standard 536 536 'Ductile body' => '"Century Schoolbook", "Century Schoolbook L", Georgia, serif', … … 552 552 // Monospace families 553 553 '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' 554 );554 ]; 555 555 556 556 protected static function fontDef($c)
Note: See TracChangeset
for help on using the changeset viewer.