Changeset 2658:0686a9a71a3f for themes/ductile/_public.php
- Timestamp:
- 02/13/14 14:13:01 (11 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_public.php
r2581 r2658 314 314 # Main font 315 315 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 316 self::prop($css,$selectors,'font-family',$s['body_webfont_family']);316 dcThemeConfig::prop($css,$selectors,'font-family',$s['body_webfont_family']); 317 317 } 318 318 } … … 332 332 # Secondary font 333 333 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 334 self::prop($css,$selectors,'font-family',$s['alternate_webfont_family']);334 dcThemeConfig::prop($css,$selectors,'font-family',$s['alternate_webfont_family']); 335 335 } 336 336 } … … 370 370 # Blog description 371 371 $selectors = '#blogdesc'; 372 if (isset($s['subtitle_hidden'])) self::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null));372 if (isset($s['subtitle_hidden'])) dcThemeConfig::prop($css,$selectors,'display',($s['subtitle_hidden'] ? 'none' : null)); 373 373 374 374 # Main font 375 375 $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 376 if (isset($s['body_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['body_font']));376 if (isset($s['body_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['body_font'])); 377 377 378 378 # Secondary font 379 379 $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 380 if (isset($s['alternate_font'])) self::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font']));380 if (isset($s['alternate_font'])) dcThemeConfig::prop($css,$selectors,'font-family',self::fontDef($s['alternate_font'])); 381 381 382 382 # Inside posts links font weight 383 383 $selectors = '.post-excerpt a, .post-content a'; 384 if (isset($s['post_link_w'])) self::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal'));384 if (isset($s['post_link_w'])) dcThemeConfig::prop($css,$selectors,'font-weight',($s['post_link_w'] ? 'bold' : 'normal')); 385 385 386 386 # Inside posts links colors (normal, visited) 387 387 $selectors = '.post-excerpt a:link, .post-excerpt a:visited, .post-content a:link, .post-content a:visited'; 388 if (isset($s['post_link_v_c'])) self::prop($css,$selectors,'color',$s['post_link_v_c']);388 if (isset($s['post_link_v_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_v_c']); 389 389 390 390 # Inside posts links colors (hover, active, focus) 391 391 $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'; 392 if (isset($s['post_link_f_c'])) self::prop($css,$selectors,'color',$s['post_link_f_c']);392 if (isset($s['post_link_f_c'])) dcThemeConfig::prop($css,$selectors,'color',$s['post_link_f_c']); 393 393 394 394 # Style directives … … 407 407 # Blog title font weight 408 408 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 409 if (isset($s['blog_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal'));409 if (isset($s['blog_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['blog_title_w'] ? 'bold' : 'normal')); 410 410 411 411 # Blog title font size 412 412 $selectors = 'h1'; 413 if (isset($s['blog_title_s'])) self::prop($css_large,$selectors,'font-size',$s['blog_title_s']);413 if (isset($s['blog_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['blog_title_s']); 414 414 415 415 # Blog title color 416 416 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 417 if (isset($s['blog_title_c'])) self::prop($css_large,$selectors,'color',$s['blog_title_c']);417 if (isset($s['blog_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['blog_title_c']); 418 418 419 419 # Post title font weight 420 420 $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'; 421 if (isset($s['post_title_w'])) self::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal'));421 if (isset($s['post_title_w'])) dcThemeConfig::prop($css_large,$selectors,'font-weight',($s['post_title_w'] ? 'bold' : 'normal')); 422 422 423 423 # Post title font size 424 424 $selectors = 'h2.post-title'; 425 if (isset($s['post_title_s'])) self::prop($css_large,$selectors,'font-size',$s['post_title_s']);425 if (isset($s['post_title_s'])) dcThemeConfig::prop($css_large,$selectors,'font-size',$s['post_title_s']); 426 426 427 427 # Post title color 428 428 $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'; 429 if (isset($s['post_title_c'])) self::prop($css_large,$selectors,'color',$s['post_title_c']);429 if (isset($s['post_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_title_c']); 430 430 431 431 # Simple title color (title without link) 432 432 $selectors = '#content-info h2, .post-title, .post h3, .post h4, .post h5, .post h6, .arch-block h3'; 433 if (isset($s['post_simple_title_c'])) self::prop($css_large,$selectors,'color',$s['post_simple_title_c']);433 if (isset($s['post_simple_title_c'])) dcThemeConfig::prop($css_large,$selectors,'color',$s['post_simple_title_c']); 434 434 435 435 # Style directives for large screens … … 451 451 # Blog title font weight 452 452 $selectors = 'h1, h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 453 if (isset($s['blog_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal'));453 if (isset($s['blog_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['blog_title_w_m'] ? 'bold' : 'normal')); 454 454 455 455 # Blog title font size 456 456 $selectors = 'h1'; 457 if (isset($s['blog_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']);457 if (isset($s['blog_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['blog_title_s_m']); 458 458 459 459 # Blog title color 460 460 $selectors = 'h1 a:link, h1 a:visited, h1 a:hover, h1 a:visited, h1 a:focus'; 461 if (isset($s['blog_title_c_m'])) self::prop($css_small,$selectors,'color',$s['blog_title_c_m']);461 if (isset($s['blog_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['blog_title_c_m']); 462 462 463 463 # Post title font weight 464 464 $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'; 465 if (isset($s['post_title_w_m'])) self::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal'));465 if (isset($s['post_title_w_m'])) dcThemeConfig::prop($css_small,$selectors,'font-weight',($s['post_title_w_m'] ? 'bold' : 'normal')); 466 466 467 467 # Post title font size 468 468 $selectors = 'h2.post-title'; 469 if (isset($s['post_title_s_m'])) self::prop($css_small,$selectors,'font-size',$s['post_title_s_m']);469 if (isset($s['post_title_s_m'])) dcThemeConfig::prop($css_small,$selectors,'font-size',$s['post_title_s_m']); 470 470 471 471 # Post title color 472 472 $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'; 473 if (isset($s['post_title_c_m'])) self::prop($css_small,$selectors,'color',$s['post_title_c_m']);473 if (isset($s['post_title_c_m'])) dcThemeConfig::prop($css_small,$selectors,'color',$s['post_title_c_m']); 474 474 475 475 # Style directives for small screens … … 515 515 return isset(self::$fonts[$c]) ? self::$fonts[$c] : null; 516 516 } 517 518 protected static function prop(&$css,$selector,$prop,$value)519 {520 if ($value) {521 $css[$selector][$prop] = $value;522 }523 }524 517 }
Note: See TracChangeset
for help on using the changeset viewer.