Changeset 25214
- Timestamp:
- 09/02/2013 09:24:41 PM (11 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/header.php
r25021 r25214 24 24 25 25 <body <?php body_class(); ?>> 26 <?php27 $email_link = get_theme_mod( 'email_link' );28 $twitter_link = get_theme_mod( 'twitter_link' );29 $facebook_link = get_theme_mod( 'facebook_link' );30 $pinterest_link = get_theme_mod( 'pinterest_link' );31 $google_plus_link = get_theme_mod( 'google_plus_link' );32 $linkedin_link = get_theme_mod( 'linkedin_link' );33 $flickr_link = get_theme_mod( 'flickr_link' );34 $github_link = get_theme_mod( 'github_link' );35 $dribbble_link = get_theme_mod( 'dribbble_link' );36 $vimeo_link = get_theme_mod( 'vimeo_link' );37 $youtube_link = get_theme_mod( 'youtube_link' );38 $social_links = ( '' != $email_link39 || '' != $twitter_link40 || '' != $facebook_link41 || '' != $pinterest_link42 || '' != $google_plus_link43 || '' != $linkedin_link44 || '' != $flickr_link45 || '' != $github_link46 || '' != $dribbble_link47 || '' != $vimeo_link48 || '' != $youtube_link49 ) ? true : false;50 ?>51 26 <div id="page" class="hfeed site"> 52 27 <?php do_action( 'before' ); ?> … … 62 37 63 38 <header id="masthead" class="site-header" role="banner"> 64 <div class="header-main clear">39 <div class="header-main"> 65 40 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 66 41 67 42 <div class="header-extra"> 68 <?php if ( $social_links ) : ?>69 <div class="social-links-toggle">70 <span class="genericon"><?php _e( 'Connect', 'twentyfourteen' ); ?></span>71 </div>72 <?php endif; ?>73 74 43 <div class="search-toggle"> 75 <span class="genericon "><?php _e( 'Search', 'twentyfourteen' ); ?></span>44 <span class="genericon-search"><?php _e( 'Search', 'twentyfourteen' ); ?></span> 76 45 </div> 77 46 </div> … … 82 51 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> 83 52 </nav> 84 85 53 </div> 86 54 87 55 <div id="mobile-navigations" class="hide"></div> 88 56 89 <?php if ( $social_links ) : ?>90 <div class="social-links-wrapper hide">91 <ul class="social-links clear">92 <?php if ( is_email( $email_link ) ) : ?>93 <li class="email-link">94 <a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank">95 <?php _e( 'Email', 'twentyfourteen' ); ?>96 </a>97 </li>98 <?php endif; ?>99 100 <?php if ( '' != $twitter_link ) : ?>101 <li class="twitter-link">102 <a href="<?php echo esc_url( $twitter_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Twitter', 'twentyfourteen' ); ?>" target="_blank">103 <?php _e( 'Twitter', 'twentyfourteen' ); ?>104 </a>105 </li>106 <?php endif; ?>107 108 <?php if ( '' != $facebook_link ) : ?>109 <li class="facebook-link">110 <a href="<?php echo esc_url( $facebook_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Facebook', 'twentyfourteen' ); ?>" target="_blank">111 <?php _e( 'Facebook', 'twentyfourteen' ); ?>112 </a>113 </li>114 <?php endif; ?>115 116 <?php if ( '' != $pinterest_link ) : ?>117 <li class="pinterest-link">118 <a href="<?php echo esc_url( $pinterest_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Pinterest', 'twentyfourteen' ); ?>" target="_blank">119 <?php _e( 'Pinterest', 'twentyfourteen' ); ?>120 </a>121 </li>122 <?php endif; ?>123 124 <?php if ( '' != $google_plus_link ) : ?>125 <li class="google-link">126 <a href="<?php echo esc_url( $google_plus_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Google Plus', 'twentyfourteen' ); ?>" target="_blank">127 <?php _e( 'Google Plus', 'twentyfourteen' ); ?>128 </a>129 </li>130 <?php endif; ?>131 132 <?php if ( '' != $linkedin_link ) : ?>133 <li class="linkedin-link">134 <a href="<?php echo esc_url( $linkedin_link ); ?>" class="genericon" title="<?php esc_attr_e( 'LinkedIn', 'twentyfourteen' ); ?>" target="_blank">135 <?php _e( 'LinkedIn', 'twentyfourteen' ); ?>136 </a>137 </li>138 <?php endif; ?>139 140 <?php if ( '' != $flickr_link ) : ?>141 <li class="flickr-link">142 <a href="<?php echo esc_url( $flickr_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Flickr', 'twentyfourteen' ); ?>" target="_blank">143 <?php _e( 'Flickr', 'twentyfourteen' ); ?>144 </a>145 </li>146 <?php endif; ?>147 148 <?php if ( '' != $github_link ) : ?>149 <li class="github-link">150 <a href="<?php echo esc_url( $github_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Github', 'twentyfourteen' ); ?>" target="_blank">151 <?php _e( 'Github', 'twentyfourteen' ); ?>152 </a>153 </li>154 <?php endif; ?>155 156 <?php if ( '' != $dribbble_link ) : ?>157 <li class="dribbble-link">158 <a href="<?php echo esc_url( $dribbble_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Dribbble', 'twentyfourteen' ); ?>" target="_blank">159 <?php _e( 'Dribbble', 'twentyfourteen' ); ?>160 </a>161 </li>162 <?php endif; ?>163 164 <?php if ( '' != $vimeo_link ) : ?>165 <li class="vimeo-link">166 <a href="<?php echo esc_url( $vimeo_link ); ?>" class="genericon" title="<?php esc_attr_e( 'Vimeo', 'twentyfourteen' ); ?>" target="_blank">167 <?php _e( 'Vimeo', 'twentyfourteen' ); ?>168 </a>169 </li>170 <?php endif; ?>171 172 <?php if ( '' != $youtube_link ) : ?>173 <li class="youtube-link">174 <a href="<?php echo esc_url( $youtube_link ); ?>" class="genericon" title="<?php esc_attr_e( 'YouTube', 'twentyfourteen' ); ?>" target="_blank">175 <?php _e( 'YouTube', 'twentyfourteen' ); ?>176 </a>177 </li>178 <?php endif; ?>179 </ul>180 </div>181 <?php endif; ?>182 183 57 <div class="search-box-wrapper hide"> 184 58 <div class="search-box clear"> 185 <?php get_search_form(); ?>59 <?php get_search_form(); ?> 186 60 </div> 187 61 </div> -
trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php
r25021 r25214 16 16 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 17 17 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 18 19 $wp_customize->add_section( 'twentyfourteen_theme_options', array(20 'title' => __( 'Theme Options', 'twentyfourteen' ),21 'priority' => 35,22 ) );23 24 $wp_customize->add_setting( 'email_link', array(25 'default' => '',26 'type' => 'theme_mod',27 'capability' => 'edit_theme_options',28 ) );29 30 $wp_customize->add_control( 'email_link', array(31 'label' => __( 'Email Link', 'twentyfourteen' ),32 'section' => 'twentyfourteen_theme_options',33 'settings' => 'email_link',34 'type' => 'text',35 'priority' => 1,36 ) );37 38 $wp_customize->add_setting( 'twitter_link', array(39 'default' => '',40 'type' => 'theme_mod',41 'capability' => 'edit_theme_options',42 ) );43 44 $wp_customize->add_control( 'twitter_link', array(45 'label' => __( 'Twitter Link', 'twentyfourteen' ),46 'section' => 'twentyfourteen_theme_options',47 'settings' => 'twitter_link',48 'type' => 'text',49 'priority' => 2,50 ) );51 52 $wp_customize->add_setting( 'facebook_link', array(53 'default' => '',54 'type' => 'theme_mod',55 'capability' => 'edit_theme_options',56 ) );57 58 $wp_customize->add_control( 'facebook_link', array(59 'label' => __( 'Facebook Link', 'twentyfourteen' ),60 'section' => 'twentyfourteen_theme_options',61 'settings' => 'facebook_link',62 'type' => 'text',63 'priority' => 3,64 ) );65 66 $wp_customize->add_setting( 'pinterest_link', array(67 'default' => '',68 'type' => 'theme_mod',69 'capability' => 'edit_theme_options',70 ) );71 72 $wp_customize->add_control( 'pinterest_link', array(73 'label' => __( 'Pinterest Link', 'twentyfourteen' ),74 'section' => 'twentyfourteen_theme_options',75 'settings' => 'pinterest_link',76 'type' => 'text',77 'priority' => 4,78 ) );79 80 $wp_customize->add_setting( 'google_plus_link', array(81 'default' => '',82 'type' => 'theme_mod',83 'capability' => 'edit_theme_options',84 ) );85 86 $wp_customize->add_control( 'google_plus_link', array(87 'label' => __( 'Google+ Link', 'twentyfourteen' ),88 'section' => 'twentyfourteen_theme_options',89 'settings' => 'google_plus_link',90 'type' => 'text',91 'priority' => 5,92 ) );93 94 $wp_customize->add_setting( 'linkedin_link', array(95 'default' => '',96 'type' => 'theme_mod',97 'capability' => 'edit_theme_options',98 ) );99 100 $wp_customize->add_control( 'linkedin_link', array(101 'label' => __( 'LinkedIn Link', 'twentyfourteen' ),102 'section' => 'twentyfourteen_theme_options',103 'settings' => 'linkedin_link',104 'type' => 'text',105 'priority' => 6,106 ) );107 108 $wp_customize->add_setting( 'flickr_link', array(109 'default' => '',110 'type' => 'theme_mod',111 'capability' => 'edit_theme_options',112 ) );113 114 $wp_customize->add_control( 'flickr_link', array(115 'label' => __( 'Flickr Link', 'twentyfourteen' ),116 'section' => 'twentyfourteen_theme_options',117 'settings' => 'flickr_link',118 'type' => 'text',119 'priority' => 7,120 ) );121 122 $wp_customize->add_setting( 'github_link', array(123 'default' => '',124 'type' => 'theme_mod',125 'capability' => 'edit_theme_options',126 ) );127 128 $wp_customize->add_control( 'github_link', array(129 'label' => __( 'Github Link', 'twentyfourteen' ),130 'section' => 'twentyfourteen_theme_options',131 'settings' => 'github_link',132 'type' => 'text',133 'priority' => 8,134 ) );135 136 $wp_customize->add_setting( 'dribbble_link', array(137 'default' => '',138 'type' => 'theme_mod',139 'capability' => 'edit_theme_options',140 ) );141 142 $wp_customize->add_control( 'dribbble_link', array(143 'label' => __( 'Dribbble Link', 'twentyfourteen' ),144 'section' => 'twentyfourteen_theme_options',145 'settings' => 'dribbble_link',146 'type' => 'text',147 'priority' => 9,148 ) );149 150 $wp_customize->add_setting( 'vimeo_link', array(151 'default' => '',152 'type' => 'theme_mod',153 'capability' => 'edit_theme_options',154 ) );155 156 $wp_customize->add_control( 'vimeo_link', array(157 'label' => __( 'Vimeo Link', 'twentyfourteen' ),158 'section' => 'twentyfourteen_theme_options',159 'settings' => 'vimeo_link',160 'type' => 'text',161 'priority' => 10,162 ) );163 164 $wp_customize->add_setting( 'youtube_link', array(165 'default' => '',166 'type' => 'theme_mod',167 'capability' => 'edit_theme_options',168 ) );169 170 $wp_customize->add_control( 'youtube_link', array(171 'label' => __( 'YouTube Link', 'twentyfourteen' ),172 'section' => 'twentyfourteen_theme_options',173 'settings' => 'youtube_link',174 'type' => 'text',175 'priority' => 11,176 ) );177 18 } 178 19 add_action( 'customize_register', 'twentyfourteen_customize_register' ); -
trunk/src/wp-content/themes/twentyfourteen/js/theme.js
r25094 r25214 8 8 $secondaryTop = $( '#secondary-top' ), 9 9 $mobileNavigations = $( '#mobile-navigations'), 10 $socialLinksWrapper = $( 'div.social-links-wrapper' ),11 10 $searchBoxWrapper = $( 'div.search-box-wrapper' ), 12 11 $searchToggle = $( 'div.search-toggle' ), 13 $socialLinksToggle = $( 'div.social-links-toggle' ),14 12 timeout = false; 15 13 … … 20 18 } 21 19 22 // Click event for toggle the social links23 $socialLinksToggle.click( function() {24 $( this ).toggleClass( 'active' );25 $socialLinksWrapper.toggleClass( 'hide' );26 // if .search-box-wrapper is visible hide it27 if ( ! $searchBoxWrapper.hasClass( 'hide' ) ) {28 $searchBoxWrapper.addClass( 'hide' );29 }30 if ( $searchToggle.hasClass( 'active' ) ) {31 $searchToggle.removeClass( 'active' );32 }33 } );34 35 20 // Click event for toggle the search 36 21 $searchToggle.click( function() { 37 22 $( this ).toggleClass( 'active' ); 38 23 $searchBoxWrapper.toggleClass( 'hide' ); 39 // if .social-links-wrapper is visible hide it 40 if ( ! $socialLinksWrapper.hasClass( 'hide' ) ) { 41 $socialLinksWrapper.addClass( 'hide' ); 42 } 43 if ( $socialLinksToggle.hasClass( 'active' ) ) { 44 $socialLinksToggle.removeClass( 'active' ); 45 } 24 46 25 if ( $( this ).hasClass( 'active' ) ) 47 26 $searchBoxWrapper.find( '.search-field' ).focus(); -
trunk/src/wp-content/themes/twentyfourteen/rtl.css
r25213 r25214 83 83 } 84 84 85 .social-links-toggle,86 85 .search-toggle { 87 86 float: right; 88 87 } 89 88 90 .social-links-toggle { 91 border-left: 1px solid rgba(255, 255, 255, 0.4); 92 border-right: none; 93 } 94 95 .social-links-toggle span:before, 96 .search-toggle span:before { 89 .genericon-search:before { 97 90 margin-right: -8px; 98 91 margin-right: -0.8rem; … … 100 93 left: auto; 101 94 margin-left: auto; 102 }103 104 .social-links li {105 float: left;106 margin: 8px 0 8px 10px;107 margin: 0.8rem 0 0.8rem 1.0rem;108 95 } 109 96 … … 636 623 } 637 624 638 .social-links-wrapper,639 625 .search-box-wrapper { 640 626 padding-right: 222px; -
trunk/src/wp-content/themes/twentyfourteen/style.css
r25213 r25214 432 432 .attachment-featured-featured img, 433 433 .attachment-featured-thumbnail img, 434 .social-links-toggle,435 434 .search-toggle, 436 435 button, … … 640 639 cursor: pointer; 641 640 } 642 .social-links-toggle,643 641 .search-toggle { 644 642 background-color: #24890d; … … 660 658 text-transform: uppercase; 661 659 } 662 .social-links-toggle:hover,663 660 .search-toggle:hover, 664 .social-links-toggle.active,665 661 .search-toggle.active { 666 662 background-color: #35921f; … … 669 665 display: none; 670 666 } 671 .social-links-toggle:hover,672 667 .search-toggle:hover { 673 668 cursor: pointer; 674 669 } 675 .social-links-toggle span, 676 .search-toggle span { 670 .genericon-search { 677 671 display: inline-block; 678 672 padding: 25px 0 0 0; 679 673 padding: 2.5rem 0 0 0; 680 674 } 681 .social-links-toggle span:before, 682 .search-toggle span:before { 675 .genericon-search:before { 683 676 color: #fff; 684 677 margin-left: -8px; … … 689 682 left: 50%; 690 683 } 691 .social-links-toggle span:before {692 content: '\F107';693 }694 .search-toggle span:before {695 content: '\F400';696 }697 .social-links-wrapper,698 684 .search-box-wrapper { 699 685 -moz-box-sizing: border-box; … … 702 688 width: 100%; 703 689 z-index: 2; 704 }705 .social-links {706 background-color: #35921f;707 list-style: none;708 margin: 0;709 padding-top: 8px;710 padding-top: 0.8rem;711 }712 .social-links li {713 display: block;714 float: right;715 margin: 0 10px 8px 0;716 margin: 0 1.0rem 0.8rem 0;717 width: 32px;718 width: 3.2rem;719 height: 32px;720 height: 3.2rem;721 }722 .social-links a {723 background-color: rgba(255,255,255,0.2);724 border-radius: 2px;725 color: #fff;726 display: inline-block;727 overflow: hidden;728 position: relative;729 text-align: center;730 text-decoration: none;731 width: 32px;732 width: 3.2rem;733 height: 32px;s734 height: 3.2rem;735 }736 .social-links li a:hover {737 background-color: rgba(0,0,0,0.2);738 }739 .social-links a:before {740 line-height: 2;741 }742 .email-link a:before {743 content: '\f410';744 }745 .facebook-link a:before {746 content: '\f203';747 }748 .twitter-link a:before {749 content: '\f202';750 }751 .google-link a:before {752 content: '\f206';753 }754 .pinterest-link a:before {755 content: '\f210';756 }757 .linkedin-link a:before {758 content: '\f208';759 }760 .flickr-link a:before {761 content: '\f211';762 }763 .github-link a:before {764 content: '\f200';765 }766 .dribbble-link a:before {767 content: '\f201';768 }769 .vimeo-link a:before {770 content: '\f212';771 }772 .youtube-link a:before {773 content: '\f213';774 690 } 775 691 .search-box { … … 2496 2412 display: block; 2497 2413 } 2498 .social-links-toggle {2499 border-right: 1px solid rgba(255, 255, 255, 0.4);2500 }2501 .social-links-wrapper {2502 margin: 0;2503 }2504 2414 .content-area { 2505 2415 float: left; … … 2789 2699 padding-left: 2.7rem; 2790 2700 } 2791 .social-links-wrapper,2792 2701 .search-box-wrapper { 2793 2702 padding-left: 222px;
Note: See TracChangeset
for help on using the changeset viewer.