Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. <style type="text/css">
  2.  
  3. /* Font */
  4. body {
  5. font-family: <?php echo theme_options( 'font', 'general_family' ); ?>;
  6. }
  7. .rtf {
  8. font-size: <?php echo theme_options( 'font', 'general_font_size' ); ?>px;
  9. line-height: <?php echo theme_options( 'font', 'general_line_height' ); ?>em;
  10. color: <?php echo theme_options( 'font', 'general_color' ); ?>;
  11. }
  12. a,
  13. .rtf a {
  14. color: <?php echo theme_options( 'font', 'general_link_color' ); ?>;
  15. }
  16. a:hover,
  17. .rtf a:hover {
  18. color: <?php echo theme_options( 'font', 'general_link_hover_color' ); ?>;
  19. }
  20. <?php if( theme_options( 'font', 'h1_font_size' ) ) : ?>
  21. h1 { font-size: <?php echo theme_options( 'font', 'h1_font_size' ); ?>px; }
  22. <?php endif; ?>
  23. <?php if( theme_options( 'font', 'h2_font_size' ) ) : ?>
  24. h2 { font-size: <?php echo theme_options( 'font', 'h2_font_size' ); ?>px; }
  25. <?php endif; ?>
  26. <?php if( theme_options( 'font', 'h3_font_size' ) ) : ?>
  27. h3 { font-size: <?php echo theme_options( 'font', 'h3_font_size' ); ?>px; }
  28. <?php endif; ?>
  29. <?php if( theme_options( 'font', 'h4_font_size' ) ) : ?>
  30. h4 { font-size: <?php echo theme_options( 'font', 'h4_font_size' ); ?>px; }
  31. <?php endif; ?>
  32. <?php if( theme_options( 'font', 'h5_font_size' ) ) : ?>
  33. h5 { font-size: <?php echo theme_options( 'font', 'h5_font_size' ); ?>px; }
  34. <?php endif; ?>
  35. <?php if( theme_options( 'font', 'h6_font_size' ) ) : ?>
  36. h6 { font-size: <?php echo theme_options( 'font', 'h6_font_size' ); ?>px; }
  37. <?php endif; ?>
  38.  
  39. /* Header */
  40. #branding { margin-top: <?php echo theme_options('header', 'branding_top_margin'); ?>px; }
  41. header,
  42. #site-title img { background-color: <?php echo theme_options('header', 'header_bg_color'); ?>; }
  43. <?php if( theme_options('header', 'branding_type') == 'text' ): ?>
  44. #branding {
  45. font-size: <?php echo theme_options('header', 'branding_font_size'); ?>px;
  46. }
  47. #site-title-text {
  48. background-color: <?php echo theme_options('header', 'header_bg_color'); ?>;
  49. }
  50.  
  51. <?php if( theme_options('header', 'branding_desc') == 'on' ): ?>
  52. #site-description {
  53. display: block;
  54. line-height: <?php echo theme_options('header', 'branding_font_size'); ?>px;
  55. }
  56. <?php endif; ?>
  57. <?php endif; ?>
  58.  
  59. /* Primary Menu */
  60. #primary-menu-container { font-size: <?php echo theme_options('header', 'menu_font_size'); ?>px; }
  61. #header-wrap,
  62. #primary-menu-container ul,
  63. #primary-menu-container li{
  64. background-color: <?php echo theme_options('header', 'header_bg_color'); ?>;
  65. }
  66.  
  67. /* Background */
  68. #show-space,
  69. #inner-page-show-space {
  70. background-color: <?php echo theme_options('appearance', 'site_bg_color'); ?>;
  71. background-image: url(<?php echo theme_get_attachment_src( theme_options('appearance', 'site_bg_image') ); ?>);
  72. }
  73. #pattern {
  74. background-image: url(<?php echo THEME_URI; ?>/images/pattern/<?php echo theme_options('appearance', 'site_bg_pattern'); ?>);
  75. }
  76.  
  77. /* Table */
  78. <?php if( theme_options( 'appearance', 'table_show' ) == 'on' ): ?>
  79. #table-top,
  80. #table-border {
  81. background-color: <?php echo theme_options('appearance', 'table_color'); ?>;
  82. background-image: url(<?php echo THEME_URI; ?>/images/pattern/table/<?php echo theme_options('appearance', 'table_texture'); ?>);
  83. }
  84. <?php endif; ?>
  85.  
  86. /* Mat */
  87. <?php if( theme_options( 'appearance', 'mat_show' ) == 'on' ): ?>
  88. #table-mat-top {
  89. border-bottom-color: <?php echo theme_options('appearance', 'mat_color'); ?>;
  90. }
  91. #table-mat-body-wrap {
  92. background-color: <?php echo theme_options('appearance', 'mat_color'); ?>;
  93. }
  94. <?php endif; ?>
  95.  
  96. /* Footer */
  97. body,
  98. footer { background-color: <?php echo theme_options('footer', 'footer_bg_color'); ?>; }
  99.  
  100. /* Custom CSS */
  101. <?php echo theme_options('advance', 'custom_css'); ?>
  102.  
  103. </style>
  104.  
  105. <!-- Theme Custom JS -->
  106. <script type="text/javascript">
  107. jQuery(document).ready(function($) {
  108. <?php echo theme_options('advance', 'custom_js'); ?>
  109. });
  110. </script>
  111. <!-- End Theme Custom JS -->
  112.  
  113. <?php
  114. // Font to Apply
  115. $site_wide_font = str_replace( '+', ' ', theme_options('font', 'google_web_font'));
  116. $site_wide_custom_font = str_replace( '+', ' ', theme_options('font', 'google_web_font_custom'));
  117. $site_wide_font = ( $site_wide_custom_font != '' ) ? $site_wide_custom_font : $site_wide_font;
  118.  
  119. $single_page_font = str_replace( '+', ' ', $appearance_google_web_font_custom = get_post_meta(get_queried_object_id(), 'appearance_google_web_font_custom', true));
  120.  
  121. if( $site_wide_font != '' || $single_page_font != '' ):
  122.  
  123. // Choose one font to load
  124. $gfont = ($single_page_font != '') ? $single_page_font : $site_wide_font;
  125.  
  126. // Apply List
  127. // $apply_lists = theme_options('font', 'google_web_font_apply');
  128. $apply_lists = array( '#site-title-text', '#page-title', '#apps-title', '.slide-caption-headline', '.rtf h1', '.rtf h2', '.rtf h3', '.rtf h4', '.rtf h5', '.rtf h6' );
  129. $site_wide_active_selector = '';
  130. $site_wide_loading_selector = '';
  131. $site_wide_inactive_selector = '';
  132. foreach( $apply_lists as $apply_list ) {
  133. $site_wide_active_selector .= '.wf-active ' . $apply_list . ',';
  134. $site_wide_loading_selector .= '.wf-loading ' . $apply_list . ', ';
  135. $site_wide_inactive_selector .= '.wf-inactive ' . $apply_list . ', ';
  136. }
  137. $site_wide_active_selector = substr( $site_wide_active_selector, 0, -2 );
  138. $site_wide_loading_selector = substr( $site_wide_loading_selector, 0, -2 );
  139. $site_wide_inactive_selector = substr( $site_wide_loading_selector, 0, -2 );
  140. ?>
  141.  
  142. <script type="text/javascript">
  143. WebFontConfig = {
  144. google: { families: [ '<?php echo str_replace( ' ', '+', $gfont ); ?>' ] }
  145. };
  146. (function() {
  147. var wf = document.createElement('script');
  148. wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
  149. '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
  150. wf.type = 'text/javascript';
  151. wf.async = 'true';
  152. var s = document.getElementsByTagName('script')[0];
  153. s.parentNode.insertBefore(wf, s);
  154. })();
  155. </script>
  156.  
  157. <style type="text/css">
  158. /* Google Web Font */
  159. <?php echo $site_wide_active_selector; ?> {
  160. font-family: "<?php echo $gfont; ?>";
  161. visibility: visible;
  162. }
  163. <?php echo $site_wide_loading_selector; ?> { visibility: hidden; }
  164. <?php echo $site_wide_inactive_selector; ?> { visibility: visible; }
  165. </style>
  166.  
  167. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement