Changeset 3531:f2de7e462b78
- Timestamp:
- 02/17/17 19:31:34 (8 years ago)
- Branch:
- default
- Location:
- themes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/berlin/_define.php
r3427 r3531 15 15 /* Description*/ "Dotclear 2.7+ default theme", 16 16 /* Author */ "Dotclear Team", 17 /* Version */ '1. 1',17 /* Version */ '1.2', 18 18 /* Properties */ array( 19 19 'type' => 'theme', -
themes/berlin/_public.php
r3427 r3531 1 1 <?php 2 namespace themes\berlin; 3 2 4 # -- BEGIN LICENSE BLOCK --------------------------------------- 3 5 # This file is part of Berlin, a theme for Dotclear … … 11 13 if (!defined('DC_RC_PATH')) { return; } 12 14 13 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');15 \l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main'); 14 16 //__('Show menu').__('Hide menu').__('Navigation'); 15 17 16 $core->addBehavior('publicHeadContent',array( 'behaviorBerlinTheme','publicHeadContent'));18 $core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\behaviorBerlinTheme','publicHeadContent')); 17 19 18 20 class behaviorBerlinTheme … … 20 22 public static function publicHeadContent() 21 23 { 22 // global $core,$_ctx; 23 24 echo dcUtils::jsVars(array( 24 echo \dcUtils::jsVars(array( 25 25 'dotclear_berlin_show_menu' => __('Show menu'), 26 26 'dotclear_berlin_hide_menu' => __('Hide menu'), -
themes/customCSS/_define.php
r2566 r3531 16 16 /* Description*/ "A CSS customizable theme", 17 17 /* Author */ "Olivier", 18 /* Version */ '1. 1',18 /* Version */ '1.2', 19 19 array( 20 20 'type' => 'theme' -
themes/customCSS/_public.php
r2566 r3531 1 1 <?php 2 namespace themes\customcss; 3 2 4 # -- BEGIN LICENSE BLOCK --------------------------------------- 3 5 # … … 12 14 if (!defined('DC_RC_PATH')) { return; } 13 15 14 $core->addBehavior('publicHeadContent',array( 'tplCustomTheme','publicHeadContent'));16 $core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\tplCustomTheme','publicHeadContent')); 15 17 16 18 class tplCustomTheme -
themes/ductile/_define.php
r2581 r3531 15 15 /* Description*/ "Mediaqueries compliant elegant theme", 16 16 /* Author */ "Dotclear Team", 17 /* Version */ '1. 4',17 /* Version */ '1.5', 18 18 /* Properties */ array( 19 19 'standalone_config' => true, -
themes/ductile/_prepend.php
r3421 r3531 1 1 <?php 2 namespace themes\ductile; 3 2 4 # -- BEGIN LICENSE BLOCK --------------------------------------- 3 5 # This file is part of Ductile, a theme for Dotclear … … 17 19 18 20 # Behaviors 19 $GLOBALS['core']->addBehavior('adminPageHTMLHead',array( 'tplDuctileThemeAdmin','adminPageHTMLHead'));21 $GLOBALS['core']->addBehavior('adminPageHTMLHead',array(__NAMESPACE__.'\tplDuctileThemeAdmin','adminPageHTMLHead')); 20 22 21 23 class tplDuctileThemeAdmin … … 30 32 if (!$core->auth->user_prefs->accessibility->nodragdrop) { 31 33 echo 32 dcPage::jsLoad('js/jquery/jquery-ui.custom.js').33 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');34 \dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 35 \dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'); 34 36 echo <<<EOT 35 37 <script type="text/javascript"> -
themes/ductile/_public.php
r2716 r3531 1 1 <?php 2 namespace themes\ductile; 3 2 4 # -- BEGIN LICENSE BLOCK --------------------------------------- 3 5 # This file is part of Ductile, a theme for Dotclear … … 12 14 if (!defined('DC_RC_PATH')) { return; } 13 15 14 l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main');16 \l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/main'); 15 17 16 18 # Behaviors 17 $core->addBehavior('publicHeadContent',array( 'tplDuctileTheme','publicHeadContent'));18 $core->addBehavior('publicInsideFooter',array( 'tplDuctileTheme','publicInsideFooter'));19 $core->addBehavior('publicHeadContent',array(__NAMESPACE__.'\tplDuctileTheme','publicHeadContent')); 20 $core->addBehavior('publicInsideFooter',array(__NAMESPACE__.'\tplDuctileTheme','publicInsideFooter')); 19 21 20 22 # Templates 21 $core->tpl->addValue('ductileEntriesList',array( 'tplDuctileTheme','ductileEntriesList'));22 $core->tpl->addBlock('EntryIfContentIsCut',array( 'tplDuctileTheme','EntryIfContentIsCut'));23 $core->tpl->addValue('ductileNbEntryPerPage',array( 'tplDuctileTheme','ductileNbEntryPerPage'));24 $core->tpl->addValue('ductileLogoSrc',array( 'tplDuctileTheme','ductileLogoSrc'));25 $core->tpl->addBlock('IfPreviewIsNotMandatory',array( 'tplDuctileTheme','IfPreviewIsNotMandatory'));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')); 26 28 27 29 class tplDuctileTheme … … 29 31 public static function ductileNbEntryPerPage($attr) 30 32 { 31 return '<?php tplDuctileTheme::ductileNbEntryPerPageHelper(); ?>';33 return '<?php '.__NAMESPACE__.'\tplDuctileTheme::ductileNbEntryPerPageHelper(); ?>'; 32 34 } 33 35 … … 110 112 111 113 // Get all _entry-*.html in tpl folder of theme 112 $list_types_templates = files::scandir($tpl_path);114 $list_types_templates = \files::scandir($tpl_path); 113 115 if (is_array($list_types_templates)) { 114 116 foreach ($list_types_templates as $v) { … … 126 128 $default = isset($attr['default']) ? trim($attr['default']) : 'short'; 127 129 $ret = '<?php '."\n". 128 'switch ( tplDuctileTheme::ductileEntriesListHelper(\''.$default.'\')) {'."\n";130 'switch ('.__NAMESPACE__.'\tplDuctileTheme::ductileEntriesListHelper(\''.$default.'\')) {'."\n"; 129 131 130 132 foreach ($list_types as $v) { … … 159 161 public static function ductileLogoSrc($attr) 160 162 { 161 return '<?php echo tplDuctileTheme::ductileLogoSrcHelper(); ?>';163 return '<?php echo '.__NAMESPACE__.'\tplDuctileTheme::ductileLogoSrcHelper(); ?>'; 162 164 } 163 165 … … 225 227 $default = true; 226 228 } else { 227 $s = array_filter($s, array('tplDuctileTheme', 'cleanStickers'));229 $s = array_filter($s,'self::cleanStickers'); 228 230 if (count($s) == 0) { 229 231 $default = true; … … 317 319 # Main font 318 320 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 319 dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']);321 \dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']); 320 322 } 321 323 } … … 335 337 # Secondary font 336 338 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 337 dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']);339 \dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']); 338 340 } 339 341 } … … 373 375 # Blog description 374 376 $selectors = '#blogdesc'; 375 if (isset($s['subtitle_hidden'])) dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));377 if (isset($s['subtitle_hidden'])) \dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null)); 376 378 377 379 # Main font 378 380 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 379 if (isset($s['body_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));381 if (isset($s['body_font'])) \dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font'])); 380 382 381 383 # Secondary font 382 384 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 383 if (isset($s['alternate_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));385 if (isset($s['alternate_font'])) \dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font'])); 384 386 385 387 # Inside posts links font weight 386 388 $selectors = '.post-excerpt a, .post-content a'; 387 if (isset($s['post_link_w'])) dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));389 if (isset($s['post_link_w'])) \dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal')); 388 390 389 391 # Inside posts links colors (normal, visited) 390 392 $selectors = '.post-excerpt a:link, .post-excerpt a:visited, .post-content a:link, .post-content a:visited'; 391 if (isset($s['post_link_v_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']);393 if (isset($s['post_link_v_c'])) \dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']); 392 394 393 395 # Inside posts links colors (hover, active, focus) 394 396 $selectors = '.post-excerpt a:hover, .post-excerpt a:active, .post-excerpt a:focus, .post-content a:hover, .post-content a:active, .post-content a:focus'; 395 if (isset($s['post_link_f_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']);397 if (isset($s['post_link_f_c'])) \dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']); 396 398 397 399 # Style directives … … 410 412 # Blog title font weight 411 413 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 412 if (isset($s['blog_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));414 if (isset($s['blog_title_w'])) \dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal')); 413 415 414 416 # Blog title font size 415 417 $selectors = 'h1'; 416 if (isset($s['blog_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']);418 if (isset($s['blog_title_s'])) \dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']); 417 419 418 420 # Blog title color 419 421 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 420 if (isset($s['blog_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']);422 if (isset($s['blog_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']); 421 423 422 424 # Post title font weight 423 425 $selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 424 if (isset($s['post_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));426 if (isset($s['post_title_w'])) \dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal')); 425 427 426 428 # Post title font size 427 429 $selectors = 'h2.post-title'; 428 if (isset($s['post_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']);430 if (isset($s['post_title_s'])) \dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']); 429 431 430 432 # Post title color 431 433 $selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 432 if (isset($s['post_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']);434 if (isset($s['post_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']); 433 435 434 436 # Simple title color (title without link) 435 437 $selectors = '#content-info h2, .post-title, .post h3, .post h4, .post h5, .post h6, .arch-block h3'; 436 if (isset($s['post_simple_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']);438 if (isset($s['post_simple_title_c'])) \dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']); 437 439 438 440 # Style directives for large screens … … 454 456 # Blog title font weight 455 457 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 456 if (isset($s['blog_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));458 if (isset($s['blog_title_w_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal')); 457 459 458 460 # Blog title font size 459 461 $selectors = 'h1'; 460 if (isset($s['blog_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);462 if (isset($s['blog_title_s_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']); 461 463 462 464 # Blog title color 463 465 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 464 if (isset($s['blog_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']);466 if (isset($s['blog_title_c_m'])) \dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']); 465 467 466 468 # Post title font weight 467 469 $selectors = 'h2.post-title, h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 468 if (isset($s['post_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));470 if (isset($s['post_title_w_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal')); 469 471 470 472 # Post title font size 471 473 $selectors = 'h2.post-title'; 472 if (isset($s['post_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);474 if (isset($s['post_title_s_m'])) \dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']); 473 475 474 476 # Post title color 475 477 $selectors = 'h2.post-title a:link, h2.post-title a:visited, h2.post-title a:hover, h2.post-title a:visited, h2.post-title a:focus'; 476 if (isset($s['post_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']);478 if (isset($s['post_title_c_m'])) \dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']); 477 479 478 480 # Style directives for small screens
Note: See TracChangeset
for help on using the changeset viewer.