template-tags.php 0000644 00000016416 15237733475 0010054 0 ustar 00 %2$s'; $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ) ); echo ''; printf( /* translators: %s: Publish date. */ esc_html__( 'Published %s', 'twentytwentyone' ), $time_string // phpcs:ignore WordPress.Security.EscapeOutput ); echo ''; } } if ( ! function_exists( 'twenty_twenty_one_posted_by' ) ) { /** * Prints HTML with meta information about theme author. * * @since Twenty Twenty-One 1.0 * * @return void */ function twenty_twenty_one_posted_by() { if ( ! get_the_author_meta( 'description' ) && post_type_supports( get_post_type(), 'author' ) ) { echo ''; } } } if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) { /** * Prints HTML with meta information for the categories, tags and comments. * Footer entry meta is displayed differently in archives and single posts. * * @since Twenty Twenty-One 1.0 * * @return void */ function twenty_twenty_one_entry_meta_footer() { // Early exit if not a post. if ( 'post' !== get_post_type() ) { return; } // Hide meta information on pages. if ( ! is_single() ) { if ( is_sticky() ) { echo '
' . esc_html_x( 'Featured post', 'Label for sticky posts', 'twentytwentyone' ) . '
'; } $post_format = get_post_format(); if ( 'aside' === $post_format || 'status' === $post_format ) { echo '' . twenty_twenty_one_continue_reading_text() . '
'; // phpcs:ignore WordPress.Security.EscapeOutput } // Posted on. twenty_twenty_one_posted_on(); // Edit post link. edit_post_link( sprintf( /* translators: %s: Post title. Only visible to screen readers. */ esc_html__( 'Edit %s', 'twentytwentyone' ), '' . get_the_title() . '' ), '', ''; printf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), esc_html( $GLOBALS['wp_version'] ) ); echo '
'; } /** * Prevents the Customizer from being loaded on WordPress versions prior to 5.3. * * @since Twenty Twenty-One 1.0 * * @global string $wp_version WordPress version. * * @return void */ function twenty_twenty_one_customize() { wp_die( sprintf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), esc_html( $GLOBALS['wp_version'] ) ), '', array( 'back_link' => true, ) ); } add_action( 'load-customize.php', 'twenty_twenty_one_customize' ); /** * Prevents the Theme Preview from being loaded on WordPress versions prior to 5.3. * * @since Twenty Twenty-One 1.0 * * @global string $wp_version WordPress version. * * @return void */ function twenty_twenty_one_preview() { if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification wp_die( sprintf( /* translators: %s: WordPress Version. */ esc_html__( 'This theme requires WordPress 5.3 or newer. You are running version %s. Please upgrade.', 'twentytwentyone' ), esc_html( $GLOBALS['wp_version'] ) ) ); } } add_action( 'template_redirect', 'twenty_twenty_one_preview' ); customizer.php 0000644 00000015305 15237733475 0007505 0 ustar 00 get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'twentyseventeen_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'twentyseventeen_customize_partial_blogdescription', ) ); /** * Custom colors. */ $wp_customize->add_setting( 'colorscheme', array( 'default' => 'light', 'transport' => 'postMessage', 'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme', ) ); $wp_customize->add_setting( 'colorscheme_hue', array( 'default' => 250, 'transport' => 'postMessage', 'sanitize_callback' => 'absint', // The hue is stored as a positive integer. ) ); $wp_customize->add_control( 'colorscheme', array( 'type' => 'radio', 'label' => __( 'Color Scheme', 'twentyseventeen' ), 'choices' => array( 'light' => __( 'Light', 'twentyseventeen' ), 'dark' => __( 'Dark', 'twentyseventeen' ), 'custom' => __( 'Custom', 'twentyseventeen' ), ), 'section' => 'colors', 'priority' => 5, ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'colorscheme_hue', array( 'mode' => 'hue', 'section' => 'colors', 'priority' => 6, ) ) ); /** * Theme options. */ $wp_customize->add_section( 'theme_options', array( 'title' => __( 'Theme Options', 'twentyseventeen' ), 'priority' => 130, // Before Additional CSS. ) ); $wp_customize->add_setting( 'page_layout', array( 'default' => 'two-column', 'sanitize_callback' => 'twentyseventeen_sanitize_page_layout', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'page_layout', array( 'label' => __( 'Page Layout', 'twentyseventeen' ), 'section' => 'theme_options', 'type' => 'radio', 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen' ), 'choices' => array( 'one-column' => __( 'One Column', 'twentyseventeen' ), 'two-column' => __( 'Two Column', 'twentyseventeen' ), ), 'active_callback' => 'twentyseventeen_is_view_with_layout_option', ) ); /** * Filter number of front page sections in Twenty Seventeen. * * @since Twenty Seventeen 1.0 * * @param int $num_sections Number of front page sections. */ $num_sections = apply_filters( 'twentyseventeen_front_page_sections', 4 ); // Create a setting and control for each of the sections available in the theme. for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) { $wp_customize->add_setting( 'panel_' . $i, array( 'default' => false, 'sanitize_callback' => 'absint', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'panel_' . $i, array( /* translators: %d is the front page section number */ 'label' => sprintf( __( 'Front Page Section %d Content', 'twentyseventeen' ), $i ), 'description' => ( 1 !== $i ? '' : __( 'Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen' ) ), 'section' => 'theme_options', 'type' => 'dropdown-pages', 'allow_addition' => true, 'active_callback' => 'twentyseventeen_is_static_front_page', ) ); $wp_customize->selective_refresh->add_partial( 'panel_' . $i, array( 'selector' => '#panel' . $i, 'render_callback' => 'twentyseventeen_front_page_section', 'container_inclusive' => true, ) ); } } add_action( 'customize_register', 'twentyseventeen_customize_register' ); /** * Sanitize the page layout options. * * @param string $input Page layout. */ function twentyseventeen_sanitize_page_layout( $input ) { $valid = array( 'one-column' => __( 'One Column', 'twentyseventeen' ), 'two-column' => __( 'Two Column', 'twentyseventeen' ), ); if ( array_key_exists( $input, $valid ) ) { return $input; } return ''; } /** * Sanitize the colorscheme. * * @param string $input Color scheme. */ function twentyseventeen_sanitize_colorscheme( $input ) { $valid = array( 'light', 'dark', 'custom' ); if ( in_array( $input, $valid, true ) ) { return $input; } return 'light'; } /** * Render the site title for the selective refresh partial. * * @since Twenty Seventeen 1.0 * @see twentyseventeen_customize_register() * * @return void */ function twentyseventeen_customize_partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * * @since Twenty Seventeen 1.0 * @see twentyseventeen_customize_register() * * @return void */ function twentyseventeen_customize_partial_blogdescription() { bloginfo( 'description' ); } /** * Return whether we're previewing the front page and it's a static page. */ function twentyseventeen_is_static_front_page() { return ( is_front_page() && ! is_home() ); } /** * Return whether we're on a view that supports a one or two column layout. */ function twentyseventeen_is_view_with_layout_option() { // This option is available on all pages. It's also available on archives when there isn't a sidebar. return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) ); } /** * Bind JS handlers to instantly live-preview changes. */ function twentyseventeen_customize_preview_js() { wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '1.0', true ); } add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' ); /** * Load dynamic logic for the customizer controls area. */ function twentyseventeen_panels_js() { wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '1.0', true ); } add_action( 'customize_controls_enqueue_scripts', 'twentyseventeen_panels_js' ); icon-functions.php 0000644 00000015716 15237733475 0010245 0 ustar 00 '', 'title' => '', 'desc' => '', 'fallback' => false, ); // Parse args. $args = wp_parse_args( $args, $defaults ); // Set aria hidden. $aria_hidden = ' aria-hidden="true"'; // Set ARIA. $aria_labelledby = ''; /* * Twenty Seventeen doesn't use the SVG title or description attributes; non-decorative icons are described with .screen-reader-text. * * However, child themes can use the title and description to add information to non-decorative SVG icons to improve accessibility. * * Example 1 with title: 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ) ) ); ?> * * Example 2 with title and description: 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ), 'desc' => __( 'This is the description', 'textdomain' ) ) ); ?> * * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/. */ if ( $args['title'] ) { $aria_hidden = ''; $unique_id = twentyseventeen_unique_id(); $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"'; if ( $args['desc'] ) { $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"'; } } // Begin SVG markup. $svg = ''; return $svg; } /** * Display SVG icons in social links menu. * * @param string $item_output The menu item output. * @param WP_Post $item Menu item object. * @param int $depth Depth of the menu. * @param array $args wp_nav_menu() arguments. * @return string $item_output The menu item output with social icon. */ function twentyseventeen_nav_menu_social_icons( $item_output, $item, $depth, $args ) { // Get supported social icons. $social_icons = twentyseventeen_social_links_icons(); // Change SVG icon inside social links menu if there is supported URL. if ( 'social' === $args->theme_location ) { foreach ( $social_icons as $attr => $value ) { if ( false !== strpos( $item_output, $attr ) ) { $item_output = str_replace( $args->link_after, '' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output ); } } } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twentyseventeen_nav_menu_social_icons', 10, 4 ); /** * Add dropdown icon if menu item has children. * * @param string $title The menu item's title. * @param WP_Post $item The current menu item. * @param array $args An array of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. * @return string $title The menu item's title with dropdown icon. */ function twentyseventeen_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) { if ( 'top' === $args->theme_location ) { foreach ( $item->classes as $value ) { if ( 'menu-item-has-children' === $value || 'page_item_has_children' === $value ) { $title = $title . twentyseventeen_get_svg( array( 'icon' => 'angle-down' ) ); } } } return $title; } add_filter( 'nav_menu_item_title', 'twentyseventeen_dropdown_icon_to_menu_link', 10, 4 ); /** * Returns an array of supported social links (URL and icon name). * * @return array $social_links_icons */ function twentyseventeen_social_links_icons() { // Supported social links icons. $social_links_icons = array( 'behance.net' => 'behance', 'codepen.io' => 'codepen', 'deviantart.com' => 'deviantart', 'digg.com' => 'digg', 'docker.com' => 'dockerhub', 'dribbble.com' => 'dribbble', 'dropbox.com' => 'dropbox', 'facebook.com' => 'facebook', 'flickr.com' => 'flickr', 'foursquare.com' => 'foursquare', 'plus.google.com' => 'google-plus', 'github.com' => 'github', 'instagram.com' => 'instagram', 'linkedin.com' => 'linkedin', 'mailto:' => 'envelope-o', 'medium.com' => 'medium', 'pinterest.com' => 'pinterest-p', 'pscp.tv' => 'periscope', 'getpocket.com' => 'get-pocket', 'reddit.com' => 'reddit-alien', 'skype.com' => 'skype', 'skype:' => 'skype', 'slideshare.net' => 'slideshare', 'snapchat.com' => 'snapchat-ghost', 'soundcloud.com' => 'soundcloud', 'spotify.com' => 'spotify', 'stumbleupon.com' => 'stumbleupon', 'tumblr.com' => 'tumblr', 'twitch.tv' => 'twitch', 'twitter.com' => 'twitter', 'vimeo.com' => 'vimeo', 'vine.co' => 'vine', 'vk.com' => 'vk', 'wordpress.org' => 'wordpress', 'wordpress.com' => 'wordpress', 'yelp.com' => 'yelp', 'youtube.com' => 'youtube', ); /** * Filter Twenty Seventeen social links icons. * * @since Twenty Seventeen 1.0 * * @param array $social_links_icons Array of social links icons. */ return apply_filters( 'twentyseventeen_social_links_icons', $social_links_icons ); } color-patterns.php 0000644 00000053734 15237733475 0010265 0 ustar 00 .comment-body > .comment-meta > .comment-author .avatar { border-color: hsl( ' . $hue . ', ' . $reduced_saturation . ', 20% ); /* base: #333; */ } .colors-custom h2, .colors-custom blockquote, .colors-custom input[type="text"], .colors-custom input[type="email"], .colors-custom input[type="url"], .colors-custom input[type="password"], .colors-custom input[type="search"], .colors-custom input[type="number"], .colors-custom input[type="tel"], .colors-custom input[type="range"], .colors-custom input[type="date"], .colors-custom input[type="month"], .colors-custom input[type="week"], .colors-custom input[type="time"], .colors-custom input[type="datetime"], .colors-custom input[type="datetime-local"], .colors-custom input[type="color"], .colors-custom textarea, .colors-custom .site-description, .colors-custom .entry-content blockquote.alignleft, .colors-custom .entry-content blockquote.alignright, .colors-custom .colors-custom .taxonomy-description, .colors-custom .site-info a, .colors-custom .wp-caption, .colors-custom .gallery-caption { color: hsl( ' . $hue . ', ' . $saturation . ', 40% ); /* base: #666; */ } .colors-custom abbr, .colors-custom acronym { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 40% ); /* base: #666; */ } .colors-custom h5, .colors-custom .entry-meta, .colors-custom .entry-meta a, .colors-custom.blog .entry-meta a.post-edit-link, .colors-custom.archive .entry-meta a.post-edit-link, .colors-custom.search .entry-meta a.post-edit-link, .colors-custom .nav-subtitle, .colors-custom .comment-metadata, .colors-custom .comment-metadata a, .colors-custom .no-comments, .colors-custom .comment-awaiting-moderation, .colors-custom .page-numbers.current, .colors-custom .page-links .page-number, .colors-custom .navigation-top .current-menu-item > a, .colors-custom .navigation-top .current_page_item > a, .colors-custom .main-navigation a:hover, .colors-custom .site-content .wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist { color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */ } .colors-custom button:hover:not( .mejs-container > button ), .colors-custom button:focus, .colors-custom input[type="button"]:hover, .colors-custom input[type="button"]:focus, .colors-custom input[type="submit"]:hover, .colors-custom input[type="submit"]:focus, .colors-custom .entry-footer .edit-link a.post-edit-link:hover, .colors-custom .entry-footer .edit-link a.post-edit-link:focus, .colors-custom .social-navigation a, .colors-custom .prev.page-numbers:focus, .colors-custom .prev.page-numbers:hover, .colors-custom .next.page-numbers:focus, .colors-custom .next.page-numbers:hover, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus { background: hsl( ' . esc_attr( $hue ) . ', ' . esc_attr( $saturation ) . ', 46% ); /* base: #767676; */ } .colors-custom button.secondary:hover, .colors-custom button.secondary:focus, .colors-custom input[type="reset"]:hover, .colors-custom input[type="reset"]:focus, .colors-custom input[type="button"].secondary:hover, .colors-custom input[type="button"].secondary:focus, .colors-custom input[type="reset"].secondary:hover, .colors-custom input[type="reset"].secondary:focus, .colors-custom input[type="submit"].secondary:hover, .colors-custom input[type="submit"].secondary:focus, .colors-custom hr { background: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ } .colors-custom input[type="text"], .colors-custom input[type="email"], .colors-custom input[type="url"], .colors-custom input[type="password"], .colors-custom input[type="search"], .colors-custom input[type="number"], .colors-custom input[type="tel"], .colors-custom input[type="range"], .colors-custom input[type="date"], .colors-custom input[type="month"], .colors-custom input[type="week"], .colors-custom input[type="time"], .colors-custom input[type="datetime"], .colors-custom input[type="datetime-local"], .colors-custom input[type="color"], .colors-custom textarea, .colors-custom select, .colors-custom fieldset, .colors-custom .widget .tagcloud a:hover, .colors-custom .widget .tagcloud a:focus, .colors-custom .widget.widget_tag_cloud a:hover, .colors-custom .widget.widget_tag_cloud a:focus, .colors-custom .wp_widget_tag_cloud a:hover, .colors-custom .wp_widget_tag_cloud a:focus { border-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ } .colors-custom thead th { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ } .colors-custom .entry-footer .cat-links .icon, .colors-custom .entry-footer .tags-links .icon { color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ } .colors-custom button.secondary, .colors-custom input[type="reset"], .colors-custom input[type="button"].secondary, .colors-custom input[type="reset"].secondary, .colors-custom input[type="submit"].secondary, .colors-custom .prev.page-numbers, .colors-custom .next.page-numbers { background-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */ } .colors-custom .widget .tagcloud a, .colors-custom .widget.widget_tag_cloud a, .colors-custom .wp_widget_tag_cloud a { border-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */ } .colors-custom.twentyseventeen-front-page article:not(.has-post-thumbnail):not(:first-child), .colors-custom .widget ul li { border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */ } .colors-custom .widget ul li { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */ } .colors-custom pre, .colors-custom mark, .colors-custom ins { background: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */ } .colors-custom .navigation-top, .colors-custom .main-navigation > div > ul, .colors-custom .pagination, .colors-custom .comments-pagination, .colors-custom .entry-footer, .colors-custom .site-footer { border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */ } .colors-custom .navigation-top, .colors-custom .main-navigation li, .colors-custom .entry-footer, .colors-custom .single-featured-image-header, .colors-custom .site-content .wp-playlist-light .wp-playlist-item, .colors-custom tr { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */ } .colors-custom .site-content .wp-playlist-light { border-color: hsl( ' . $hue . ', ' . $saturation . ', 93% ); /* base: #eee; */ } .colors-custom .site-header, .colors-custom .single-featured-image-header { background-color: hsl( ' . $hue . ', ' . $saturation . ', 98% ); /* base: #fafafa; */ } .colors-custom button, .colors-custom input[type="button"], .colors-custom input[type="submit"], .colors-custom .entry-footer .edit-link a.post-edit-link, .colors-custom .social-navigation a, .colors-custom .site-content .wp-playlist-light a.wp-playlist-caption:hover, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover a, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus a, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:hover, .colors-custom .site-content .wp-playlist-light .wp-playlist-item:focus, .colors-custom .prev.page-numbers:focus, .colors-custom .prev.page-numbers:hover, .colors-custom .next.page-numbers:focus, .colors-custom .next.page-numbers:hover, .colors-custom.has-header-image .site-title, .colors-custom.has-header-video .site-title, .colors-custom.has-header-image .site-title a, .colors-custom.has-header-video .site-title a, .colors-custom.has-header-image .site-description, .colors-custom.has-header-video .site-description { color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ } body.colors-custom, .colors-custom .navigation-top, .colors-custom .main-navigation ul { background: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ } .colors-custom .widget ul li a, .colors-custom .site-footer .widget-area ul li a { -webkit-box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: rgba(255, 255, 255, 1); */ box-shadow: inset 0 -1px 0 hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: rgba(255, 255, 255, 1); */ } .colors-custom .menu-toggle, .colors-custom .menu-toggle:hover, .colors-custom .menu-toggle:focus, .colors-custom .menu .dropdown-toggle, .colors-custom .menu-scroll-down, .colors-custom .menu-scroll-down:hover, .colors-custom .menu-scroll-down:focus { background-color: transparent; } .colors-custom .widget .tagcloud a, .colors-custom .widget .tagcloud a:focus, .colors-custom .widget .tagcloud a:hover, .colors-custom .widget.widget_tag_cloud a, .colors-custom .widget.widget_tag_cloud a:focus, .colors-custom .widget.widget_tag_cloud a:hover, .colors-custom .wp_widget_tag_cloud a, .colors-custom .wp_widget_tag_cloud a:focus, .colors-custom .wp_widget_tag_cloud a:hover, .colors-custom .entry-footer .edit-link a.post-edit-link:focus, .colors-custom .entry-footer .edit-link a.post-edit-link:hover { -webkit-box-shadow: none !important; box-shadow: none !important; } /* Reset non-customizable hover styling for links */ .colors-custom .entry-content a:hover, .colors-custom .entry-content a:focus, .colors-custom .entry-summary a:hover, .colors-custom .entry-summary a:focus, .colors-custom .comment-content a:focus, .colors-custom .comment-content a:hover, .colors-custom .widget a:hover, .colors-custom .widget a:focus, .colors-custom .site-footer .widget-area a:hover, .colors-custom .site-footer .widget-area a:focus, .colors-custom .posts-navigation a:hover, .colors-custom .posts-navigation a:focus, .colors-custom .widget_authors a:hover strong, .colors-custom .widget_authors a:focus strong { -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1); box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 3px 0 rgba(0, 0, 0, 1); } .colors-custom .gallery-item a, .colors-custom .gallery-item a:hover, .colors-custom .gallery-item a:focus { -webkit-box-shadow: none; box-shadow: none; } @media screen and (min-width: 48em) { .colors-custom .nav-links .nav-previous .nav-title .icon, .colors-custom .nav-links .nav-next .nav-title .icon { color: hsl( ' . $hue . ', ' . $saturation . ', 20% ); /* base: #222; */ } .colors-custom .main-navigation li li:hover, .colors-custom .main-navigation li li.focus { background: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */ } .colors-custom .navigation-top .menu-scroll-down { color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */; } .colors-custom abbr[title] { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 46% ); /* base: #767676; */; } .colors-custom .main-navigation ul ul { border-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ background: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ } .colors-custom .main-navigation ul li.menu-item-has-children:before, .colors-custom .main-navigation ul li.page_item_has_children:before { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 73% ); /* base: #bbb; */ } .colors-custom .main-navigation ul li.menu-item-has-children:after, .colors-custom .main-navigation ul li.page_item_has_children:after { border-bottom-color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ } .colors-custom .main-navigation li li.focus > a, .colors-custom .main-navigation li li:focus > a, .colors-custom .main-navigation li li:hover > a, .colors-custom .main-navigation li li a:hover, .colors-custom .main-navigation li li a:focus, .colors-custom .main-navigation li li.current_page_item a:hover, .colors-custom .main-navigation li li.current-menu-item a:hover, .colors-custom .main-navigation li li.current_page_item a:focus, .colors-custom .main-navigation li li.current-menu-item a:focus { color: hsl( ' . $hue . ', ' . $saturation . ', 100% ); /* base: #fff; */ } }'; /** * Filters Twenty Seventeen custom colors CSS. * * @since Twenty Seventeen 1.0 * * @param string $css Base theme colors CSS. * @param int $hue The user's selected color hue. * @param string $saturation Filtered theme color saturation level. */ return apply_filters( 'twentyseventeen_custom_colors_css', $css, $hue, $saturation ); } custom-header.php 0000644 00000010516 15237733475 0010040 0 ustar 00 get_parent_theme_file_uri( '/assets/images/header.jpg' ), 'width' => 2000, 'height' => 1200, 'flex-height' => true, 'video' => true, 'wp-head-callback' => 'twentyseventeen_header_style', ) ) ); register_default_headers( array( 'default-image' => array( 'url' => '%s/assets/images/header.jpg', 'thumbnail_url' => '%s/assets/images/header.jpg', 'description' => __( 'Default Header Image', 'twentyseventeen' ), ), ) ); } add_action( 'after_setup_theme', 'twentyseventeen_custom_header_setup' ); if ( ! function_exists( 'twentyseventeen_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see twentyseventeen_custom_header_setup(). */ function twentyseventeen_header_style() { $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail. // get_header_textcolor() options: add_theme_support( 'custom-header' ) is default, hide text (returns 'blank') or any hex value. if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> ' . __( 'Play background video', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'play' ) ); $settings['l10n']['pause'] = '' . __( 'Pause background video', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'pause' ) ); return $settings; } add_filter( 'header_video_settings', 'twentyseventeen_video_controls' ); system_properties.php 0000644 00000003010 15237752276 0011067 0 ustar 00 custom_css(); ?>