├── 404.php ├── Dockunit.json ├── README.md ├── archive.php ├── comments.php ├── content-none.php ├── content-page.php ├── content-single.php ├── content.php ├── footer.php ├── functions.php ├── header.php ├── inc ├── custom-header.php ├── customizer.php ├── extras.php ├── template-tags.php ├── utils.php └── wpcom.php ├── index.php ├── js ├── customizer.js ├── loop.js ├── navigation.js └── skip-link-focus-fix.js ├── languages ├── _s_backbone.pot └── readme.txt ├── layouts ├── content-sidebar.css └── sidebar-content.css ├── page.php ├── rtl.css ├── sass ├── _reset.scss ├── elements │ ├── _elements.scss │ ├── _lists.scss │ └── _tables.scss ├── forms │ ├── _buttons.scss │ ├── _fields.scss │ └── _forms.scss ├── layout │ ├── _content-sidebar.scss │ └── _sidebar-content.scss ├── media │ ├── _captions.scss │ ├── _galleries.scss │ └── _media.scss ├── mixins │ └── _mixins-master.scss ├── modules │ ├── _accessibility.scss │ ├── _alignments.scss │ ├── _clearings.scss │ └── _infinite-scroll.scss ├── navigation │ ├── _links.scss │ ├── _menus.scss │ └── _navigation.scss ├── site │ ├── _site.scss │ ├── primary │ │ ├── _asides.scss │ │ ├── _comments.scss │ │ └── _posts-and-pages.scss │ └── secondary │ │ └── _widgets.scss ├── style.scss ├── typography │ ├── _copy.scss │ ├── _headers.scss │ └── _typography.scss └── variables-site │ ├── _colors.scss │ ├── _structure.scss │ ├── _typography.scss │ └── _variables-site.scss ├── screenshot.png ├── search.php ├── sidebar.php ├── single.php ├── style.css └── underscore-templates.php /404.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 |
14 | 17 | 18 |
19 |

20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |

28 |
    29 | 'count', 32 | 'order' => 'DESC', 33 | 'show_count' => 1, 34 | 'title_li' => '', 35 | 'number' => 10, 36 | ) ); 37 | ?> 38 |
39 |
40 | 41 | 42 | ' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', '_s_backbone' ), convert_smilies( ':)' ) ) . '

'; 45 | the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=$archive_content" ); 46 | ?> 47 | 48 | 49 | 50 |
51 |
52 | 53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /Dockunit.json: -------------------------------------------------------------------------------- 1 | { 2 | "containers": [ 3 | { 4 | "prettyName": "PHP-FPM 5.2 WordPress Latest", 5 | "image": "dockunit/prebuilt-images:php-mysql-phpunit-wordpress-5.2-fpm", 6 | "beforeScripts": [ 7 | "service mysql start", 8 | "wp-install latest" 9 | ], 10 | "testCommand": "wp-activate-theme test" 11 | }, 12 | { 13 | "prettyName": "PHP-FPM 5.6 WordPress Latest", 14 | "image": "dockunit/prebuilt-images:php-mysql-phpunit-wordpress-5.6-fpm", 15 | "beforeScripts": [ 16 | "service mysql start", 17 | "wp core download --path=/temp/wp --allow-root", 18 | "wp core config --path=/temp/wp --dbname=test --dbuser=root --allow-root", 19 | "wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 --admin_email=test@test.com --path=/temp/wp --allow-root", 20 | "mkdir /temp/wp/wp-content/themes/test", 21 | "cp -r . /temp/wp/wp-content/themes/test" 22 | ], 23 | "testCommand": "wp theme activate test --allow-root --path=/temp/wp" 24 | }, 25 | { 26 | "prettyName": "PHP-FPM 7.0 WordPress Latest", 27 | "image": "dockunit/prebuilt-images:php-mysql-phpunit-wordpress-7.0-rc-1-fpm", 28 | "beforeScripts": [ 29 | "service mysql start", 30 | "wp core download --path=/temp/wp --allow-root", 31 | "wp core config --path=/temp/wp --dbname=test --dbuser=root --allow-root", 32 | "wp core install --url=http://localhost --title=Test --admin_user=admin --admin_password=12345 --admin_email=test@test.com --path=/temp/wp --allow-root", 33 | "mkdir /temp/wp/wp-content/themes/test", 34 | "cp -r . /temp/wp/wp-content/themes/test" 35 | ], 36 | "testCommand": "wp theme activate test --allow-root --path=/temp/wp" 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | _s_backbone WordPress Starter Theme [![Dockunit Status](https://dockunit.io/svg/tlovett1/_s_backbone?master)](https://dockunit.io/projects/tlovett1/_s_backbone#master) 2 | === 3 | 4 | Hi. I'm a starter theme called `_s_backbone` for WordPress based off [_s](https://github.com/Automattic/_s) and the [JSON REST API](https://github.com/WP-API/wp-api) [Backbone client](https://github.com/WP-API/client-js). 5 | I'm very similar to my cousin _s. Really, the only difference between us is that all my loops have infinite scroll built in using a "more" button. Also, I don' support post formats like _s. 6 | 7 | I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for. 8 | 9 | My ultra-minimal CSS might make me look like theme tartare but that means less stuff to get in your way when you're designing your awesome theme. Here are some of the other more interesting things you'll find here: 10 | 11 | * A just right amount of lean, well-commented, modern, HTML5 templates. 12 | * A helpful 404 template. 13 | * A sample custom header implementation in `inc/custom-header.php` that can be activated by uncommenting one line in `functions.php` and adding the code snippet found in the comments of `inc/custom-header.php` to your `header.php` template. 14 | * Custom template tags in `inc/template-tags.php` that keep your templates clean and neat and prevent code duplication. 15 | * Some small tweaks in `inc/extras.php` that can improve your theming experience. 16 | * A script at `js/navigation.js` that makes your menu a toggled dropdown on small screens (like your phone), ready for CSS artistry. It's enqueued in `functions.php`. 17 | * 2 sample CSS layouts in `layouts/` for a sidebar on either side of your content. 18 | * Smartly organized starter CSS in `style.css` that will help you to quickly get your design off the ground. 19 | * Licensed under GPLv2 or later like _s. :) Use it to make something cool. 20 | 21 | Getting Started 22 | --------------- 23 | 24 | Download `_s_backbone` from GitHub. The first thing you want to do is copy the `_s_backbone` directory and change the name to something else (like, say, `megatherium`), and then you'll need to do a five-step find and replace on the name in all the templates. 25 | 26 | 1. Search for `'_s_backbone'` (inside single quotations) to capture the text domain. 27 | 2. Search for `_s_backbone_` to capture all the function names. 28 | 3. Search for `Text Domain: _s_backbone` in style.css. 29 | 4. Search for  _s_backbone (with a space before it) to capture DocBlocks. 30 | 5. Search for `_s_backbone-` to capture prefixed handles. 31 | 32 | OR 33 | 34 | * Search for: `'_s_backbone'` and replace with: `'megatherium'` 35 | * Search for: `_s_backbone_` and replace with: `megatherium_` 36 | * Search for: `Text Domain: _s_backbone` and replace with: `Text Domain: megatherium` in style.css. 37 | * Search for:  _s_backbone and replace with:  Megatherium 38 | * Search for: `_s_backbone-` and replace with: `megatherium-` 39 | 40 | Then, update the stylesheet header in `style.css` and the links in `footer.php` with your own information. Next, update or delete this readme. 41 | 42 | Now you're ready to go! The next step is easy to say, but harder to do: make an awesome WordPress theme. :) 43 | 44 | Good luck! 45 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
69 |
70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | 23 | 24 | 25 | 26 |

27 | ' . get_the_title() . '' ); 30 | ?> 31 |

32 | 33 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 34 | 39 | 40 | 41 |
    42 | 'ol', 45 | 'short_ping' => true, 46 | ) ); 47 | ?> 48 |
49 | 50 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 51 | 56 | 57 | 58 | 59 | 60 | 64 |

65 | 66 | 67 | 68 | 69 |
70 | -------------------------------------------------------------------------------- /content-none.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 15 | 16 |
17 | 18 | 19 |

Get started here.', '_s_backbone' ), esc_url( admin_url( 'post-new.php' ) ) ); ?>

20 | 21 | 22 | 23 |

24 | 25 | 26 | 27 | 28 |

29 | 30 | 31 | 32 |
33 |
34 | -------------------------------------------------------------------------------- /content-page.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
> 10 |
11 | ', '' ); ?> 12 |
13 | 14 |
15 | 16 | '', 20 | ) ); 21 | ?> 22 |
23 | 26 |
27 | -------------------------------------------------------------------------------- /content-single.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
> 8 |
9 | ', '' ); ?> 10 | 11 | 29 |
30 | 31 |
32 | 33 | '', 37 | ) ); 38 | ?> 39 |
40 | 41 | 77 |
78 | -------------------------------------------------------------------------------- /content.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |
9 | ', esc_url( get_permalink() ) ), '' ); ?> 10 | 11 | 12 | 30 | 31 |
32 | 33 |
34 | 35 |
36 | 37 | 60 |
-------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Primary Menu', '_s_backbone' ), 51 | ) ); 52 | 53 | /* 54 | * Switch default core markup for search form, comment form, and comments 55 | * to output valid HTML5. 56 | */ 57 | add_theme_support( 'html5', array( 58 | 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' 59 | ) ); 60 | 61 | /* 62 | * Enable support for Post Formats. 63 | * See http://codex.wordpress.org/Post_Formats 64 | */ 65 | add_theme_support( 'post-formats', array( 66 | 'aside', 'image', 'video', 'quote', 'link' 67 | ) ); 68 | 69 | // Setup the WordPress core custom background feature. 70 | add_theme_support( 'custom-background', apply_filters( '_s_backbone_custom_background_args', array( 71 | 'default-color' => 'ffffff', 72 | 'default-image' => '', 73 | ) ) ); 74 | } 75 | endif; // _s_backbone_setup 76 | add_action( 'after_setup_theme', '_s_backbone_setup' ); 77 | 78 | /** 79 | * Register widget area. 80 | * 81 | * @link http://codex.wordpress.org/Function_Reference/register_sidebar 82 | */ 83 | function _s_backbone_widgets_init() { 84 | register_sidebar( array( 85 | 'name' => esc_html__( 'Sidebar', '_s_backbone' ), 86 | 'id' => 'sidebar-1', 87 | 'description' => '', 88 | 'before_widget' => '', 90 | 'before_title' => '

', 91 | 'after_title' => '

', 92 | ) ); 93 | } 94 | add_action( 'widgets_init', '_s_backbone_widgets_init' ); 95 | 96 | /** 97 | * Enqueue scripts and styles. 98 | */ 99 | function _s_backbone_scripts() { 100 | wp_enqueue_style( '_s_backbone-style', get_stylesheet_uri() ); 101 | 102 | wp_enqueue_script( '_s_backbone-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); 103 | 104 | wp_enqueue_script( '_s_backbone-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); 105 | 106 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 107 | wp_enqueue_script( 'comment-reply' ); 108 | } elseif ( is_home() || is_front_page() || is_archive() || is_search() ) { 109 | global $wp_rewrite; 110 | 111 | wp_enqueue_script( '_s_backbone-loop', get_template_directory_uri() . '/js/loop.js', array( 'jquery', 'backbone', 'underscore', 'wp-api' ), '1.0', true ); 112 | 113 | $queried_object = get_queried_object(); 114 | 115 | $local = array( 116 | 'loopType' => 'home', 117 | 'queriedObject' => $queried_object, 118 | 'pathInfo' => array( 119 | 'author_permastruct' => $wp_rewrite->get_author_permastruct(), 120 | 'host' => preg_replace( '#^http(s)?://#i', '', untrailingslashit( get_option( 'home' ) ) ), 121 | 'path' => _s_backbone_get_request_path(), 122 | 'use_trailing_slashes' => $wp_rewrite->use_trailing_slashes, 123 | 'parameters' => _s_backbone_get_request_parameters(), 124 | ), 125 | ); 126 | 127 | if ( is_category() || is_tag() || is_tax() ) { 128 | $local['loopType'] = 'archive'; 129 | $local['taxonomy'] = get_taxonomy( $queried_object->taxonomy ); 130 | } elseif ( is_search() ) { 131 | $local['loopType'] = 'search'; 132 | $local['searchQuery'] = get_search_query(); 133 | } elseif ( is_author() ) { 134 | $local['loopType'] = 'author'; 135 | } 136 | 137 | //set the page we're on so that Backbone can load the proper state 138 | if ( is_paged() ) { 139 | $local['page'] = absint( get_query_var( 'paged' ) ) + 1; 140 | } 141 | 142 | wp_localize_script( '_s_backbone-loop', 'settings', $local ); 143 | } 144 | } 145 | add_action( 'wp_enqueue_scripts', '_s_backbone_scripts' ); 146 | 147 | /** 148 | * Implement the Custom Header feature. 149 | */ 150 | //require get_template_directory() . '/inc/custom-header.php'; 151 | 152 | /** 153 | * Custom template tags for this theme. 154 | */ 155 | require get_template_directory() . '/inc/template-tags.php'; 156 | 157 | /** 158 | * Custom functions that act independently of the theme templates. 159 | */ 160 | require get_template_directory() . '/inc/extras.php'; 161 | 162 | /** 163 | * Customizer additions. 164 | */ 165 | require get_template_directory() . '/inc/customizer.php'; 166 | 167 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | section and everything up till
6 | * 7 | * @package _s_backbone 8 | */ 9 | ?> 10 | > 11 | 12 | 13 | 14 | <?php wp_title( '|', true, 'right' ); ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | > 22 |
23 | 24 | 25 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /inc/custom-header.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | * 15 | * @package _s_backbone 16 | */ 17 | 18 | /** 19 | * Set up the WordPress core custom header feature. 20 | * 21 | * @uses _s_backbone_header_style() 22 | * @uses _s_backbone_admin_header_style() 23 | * @uses _s_backbone_admin_header_image() 24 | */ 25 | function _s_backbone_custom_header_setup() { 26 | add_theme_support( 'custom-header', apply_filters( '_s_backbone_custom_header_args', array( 27 | 'default-image' => '', 28 | 'default-text-color' => '000000', 29 | 'width' => 1000, 30 | 'height' => 250, 31 | 'flex-height' => true, 32 | 'wp-head-callback' => '_s_backbone_header_style', 33 | 'admin-head-callback' => '_s_backbone_admin_header_style', 34 | 'admin-preview-callback' => '_s_backbone_admin_header_image', 35 | ) ) ); 36 | } 37 | add_action( 'after_setup_theme', '_s_backbone_custom_header_setup' ); 38 | 39 | if ( ! function_exists( '_s_backbone_header_style' ) ) : 40 | /** 41 | * Styles the header image and text displayed on the blog 42 | * 43 | * @see _s_backbone_custom_header_setup(). 44 | */ 45 | function _s_backbone_header_style() { 46 | $header_text_color = get_header_textcolor(); 47 | 48 | // If no custom options for text are set, let's bail 49 | // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value 50 | if ( HEADER_TEXTCOLOR == $header_text_color ) { 51 | return; 52 | } 53 | 54 | // If we get this far, we have custom styles. Let's do this. 55 | ?> 56 | 76 | Header admin panel. 83 | * 84 | * @see _s_backbone_custom_header_setup(). 85 | */ 86 | function _s_backbone_admin_header_style() { 87 | ?> 88 | 104 | Header admin panel. 111 | * 112 | * @see _s_backbone_custom_header_setup(). 113 | */ 114 | function _s_backbone_admin_header_image() { 115 | $style = sprintf( ' style="color:#%s;"', get_header_textcolor() ); 116 | ?> 117 |
118 |

onclick="return false;" href="">

119 |
>
120 | 121 | 122 | 123 |
124 | get_setting( 'blogname' )->transport = 'postMessage'; 15 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 16 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 17 | } 18 | add_action( 'customize_register', '_s_backbone_customize_register' ); 19 | 20 | /** 21 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 22 | */ 23 | function _s_backbone_customize_preview_js() { 24 | wp_enqueue_script( '_s_backbone_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); 25 | } 26 | add_action( 'customize_preview_init', '_s_backbone_customize_preview_js' ); 27 | -------------------------------------------------------------------------------- /inc/extras.php: -------------------------------------------------------------------------------- 1 | tag based on what is being viewed. 40 | * 41 | * @param string $title Default title text for current view. 42 | * @param string $sep Optional separator. 43 | * @return string The filtered title. 44 | */ 45 | function _s_backbone_wp_title( $title, $sep ) { 46 | if ( is_feed() ) { 47 | return $title; 48 | } 49 | 50 | global $page, $paged; 51 | 52 | // Add the blog name 53 | $title .= get_bloginfo( 'name', 'display' ); 54 | 55 | // Add the blog description for the home/front page. 56 | $site_description = get_bloginfo( 'description', 'display' ); 57 | if ( $site_description && ( is_home() || is_front_page() ) ) { 58 | $title .= " $sep $site_description"; 59 | } 60 | 61 | // Add a page number if necessary: 62 | if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { 63 | $title .= " $sep " . sprintf( esc_html__( 'Page %s', '_s_backbone' ), max( $paged, $page ) ); 64 | } 65 | 66 | return $title; 67 | } 68 | add_filter( 'wp_title', '_s_backbone_wp_title', 10, 2 ); 69 | 70 | /** 71 | * Sets the authordata global when viewing an author archive. 72 | * 73 | * This provides backwards compatibility with 74 | * http://core.trac.wordpress.org/changeset/25574 75 | * 76 | * It removes the need to call the_post() and rewind_posts() in an author 77 | * template to print information about the author. 78 | * 79 | * @global WP_Query $wp_query WordPress Query object. 80 | * @return void 81 | */ 82 | function _s_backbone_setup_author() { 83 | global $wp_query; 84 | 85 | if ( $wp_query->is_author() && isset( $wp_query->post ) ) { 86 | $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author ); 87 | } 88 | } 89 | add_action( 'wp', '_s_backbone_setup_author' ); 90 | -------------------------------------------------------------------------------- /inc/template-tags.php: -------------------------------------------------------------------------------- 1 | post_parent ) : get_adjacent_post( false, '', true ); 17 | $next = get_adjacent_post( false, '', false ); 18 | 19 | if ( ! $next && ! $previous ) { 20 | return; 21 | } 22 | ?> 23 |
31 | 32 | 'ids', 46 | 'hide_empty' => 1, 47 | 48 | // We only need to know if there is more than one category. 49 | 'number' => 2, 50 | ) ); 51 | 52 | // Count the number of categories that are attached to the posts. 53 | $all_the_cool_cats = count( $all_the_cool_cats ); 54 | 55 | set_transient( '_s_backbone_categories', $all_the_cool_cats ); 56 | } 57 | 58 | if ( $all_the_cool_cats > 1 ) { 59 | // This blog has more than 1 category so _s_backbone_categorized_blog should return true. 60 | return true; 61 | } else { 62 | // This blog has only 1 category so _s_backbone_categorized_blog should return false. 63 | return false; 64 | } 65 | } 66 | 67 | /** 68 | * Flush out the transients used in _s_backbone_categorized_blog. 69 | */ 70 | function _s_backbone_category_transient_flusher() { 71 | // Like, beat it. Dig? 72 | delete_transient( '_s_backbone_categories' ); 73 | } 74 | add_action( 'edit_category', '_s_backbone_category_transient_flusher' ); 75 | add_action( 'save_post', '_s_backbone_category_transient_flusher' ); 76 | -------------------------------------------------------------------------------- /inc/utils.php: -------------------------------------------------------------------------------- 1 | using_permalinks() ) { 12 | global $wp; 13 | 14 | // If called too early, bail 15 | if ( ! isset( $wp->request ) ) { 16 | return false; 17 | } 18 | 19 | // Determine path for paginated version of current request 20 | if ( false != preg_match( '#' . $wp_rewrite->pagination_base . '/\d+/?$#i', $wp->request ) ) { 21 | $path = preg_replace( '#' . $wp_rewrite->pagination_base . '/\d+$#i', $wp_rewrite->pagination_base . '/%d', $wp->request ); 22 | } else { 23 | $path = $wp->request . '/' . $wp_rewrite->pagination_base . '/%d'; 24 | } 25 | 26 | // Slashes everywhere we need them 27 | if ( 0 !== strpos( $path, '/' ) ) 28 | $path = '/' . $path; 29 | 30 | $path = user_trailingslashit( $path ); 31 | } else { 32 | // Clean up raw $_REQUEST input 33 | $path = array_map( 'sanitize_text_field', $_REQUEST ); 34 | $path = array_filter( $path ); 35 | 36 | $path['paged'] = '%d'; 37 | 38 | $path = add_query_arg( $path, '/' ); 39 | } 40 | 41 | return empty( $path ) ? false : $path; 42 | } 43 | 44 | /** 45 | * Return query string for current request, prefixed with '?'. 46 | * 47 | * @return string 48 | */ 49 | function _s_backbone_get_request_parameters() { 50 | $uri = $_SERVER[ 'REQUEST_URI' ]; 51 | $uri = preg_replace( '/^[^?]*(\?.*$)/', '$1', $uri, 1, $count ); 52 | if ( $count != 1 ) { 53 | return ''; 54 | } 55 | 56 | return $uri; 57 | } -------------------------------------------------------------------------------- /inc/wpcom.php: -------------------------------------------------------------------------------- 1 | '', 22 | 'border' => '', 23 | 'text' => '', 24 | 'link' => '', 25 | 'url' => '', 26 | ); 27 | } 28 | } 29 | add_action( 'after_setup_theme', '_s_backbone_wpcom_setup' ); 30 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /js/customizer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Theme Customizer enhancements for a better user experience. 3 | * 4 | * Contains handlers to make Theme Customizer preview reload changes asynchronously. 5 | */ 6 | 7 | ( function( $ ) { 8 | // Site title and description. 9 | wp.customize( 'blogname', function( value ) { 10 | value.bind( function( to ) { 11 | $( '.site-title a' ).text( to ); 12 | } ); 13 | } ); 14 | wp.customize( 'blogdescription', function( value ) { 15 | value.bind( function( to ) { 16 | $( '.site-description' ).text( to ); 17 | } ); 18 | } ); 19 | // Header text color. 20 | wp.customize( 'header_textcolor', function( value ) { 21 | value.bind( function( to ) { 22 | if ( 'blank' === to ) { 23 | $( '.site-title, .site-description' ).css( { 24 | 'clip': 'rect(1px, 1px, 1px, 1px)', 25 | 'position': 'absolute' 26 | } ); 27 | } else { 28 | $( '.site-title, .site-description' ).css( { 29 | 'clip': 'auto', 30 | 'color': to, 31 | 'position': 'relative' 32 | } ); 33 | } 34 | } ); 35 | } ); 36 | } )( jQuery ); 37 | -------------------------------------------------------------------------------- /js/loop.js: -------------------------------------------------------------------------------- 1 | ( function( $, Backbone, _, settings, undefined ) { 2 | 'use strict'; 3 | 4 | var document = window.document; 5 | 6 | var $postContainer = $( document.getElementById( 'main' ) ); 7 | var moreButtonTemplate = document.getElementById( 'more-button-template' ); 8 | var contentTemplate = document.getElementById( 'content-template' ); 9 | 10 | // Abort completely if we don't have this stuff 11 | if ( ! $postContainer || ! moreButtonTemplate || ! contentTemplate ) { 12 | return false; 13 | } 14 | 15 | var $moreButton = $( _.template( moreButtonTemplate.innerHTML )() ); 16 | var postTemplate = _.template( contentTemplate.innerHTML ); 17 | 18 | var origURL = window.location.href; 19 | var offset = 1; 20 | var page = 1; 21 | var timer; 22 | 23 | var posts = new wp.api.collections.Posts(); 24 | var options = { 25 | data: { 26 | page: settings.page || 2 27 | } 28 | }; 29 | 30 | if ( 'archive' === settings.loopType ) { 31 | options.data.filter = {}; 32 | options.data.filter[settings.taxonomy['query_var']] = settings.queriedObject.slug; 33 | 34 | } else if ( 'search' === settings.loopType ) { 35 | options.data.filter = { 36 | s: settings.searchQuery 37 | }; 38 | } else if ( 'author' === settings.loopType ) { 39 | options.data.filter = { 40 | author: settings.queriedObject.data.ID 41 | }; 42 | } 43 | 44 | /** 45 | * Update current url using HTML5 history API 46 | * 47 | * @param {Number} pageNum 48 | */ 49 | function updateURL( pageNum ) { 50 | var offset = offset > 0 ? offset - 1 : 0; 51 | var pageSlug = ( -1 === pageNum ) ? origURL : window.location.protocol + '//' + settings.pathInfo.host + settings.pathInfo.path.replace( /%d/, pageNum + offset ) + settings.pathInfo.parameters; 52 | 53 | if ( window.location.href !== pageSlug ) { 54 | history.pushState( null, null, pageSlug ); 55 | } 56 | } 57 | 58 | /** 59 | * Determine URL for pushing new history. Props to Automattic's Jetpack plugin 60 | * for much of this code. 61 | */ 62 | function determineURL() { 63 | var windowTop = $( window ).scrollTop(); 64 | var windowBottom = windowTop + $( window ).height(); 65 | var windowSize = $( window ).height(); 66 | var setsInView = []; 67 | var pageNum = false; 68 | 69 | $postContainer.find( '.post-set' ).each( function() { 70 | var $currentSet = $( this ); 71 | 72 | var setTop = $currentSet.offset().top; 73 | var setHeight = $currentSet.outerHeight( false ); 74 | var setBottom = setTop + setHeight; 75 | var setPageNum = parseInt( $currentSet.attr( 'data-page-num' ) ); 76 | 77 | if ( 0 === setHeight ) { 78 | $( '> *', this ).each( function() { 79 | setHeight += $currentSet.outerHeight( false ); 80 | }); 81 | } 82 | 83 | if ( setTop < windowTop && setBottom > windowBottom ) { // top of set is above window, bottom is below 84 | setsInView.push( { 'id': $currentSet.attr( 'id' ), 'top': setTop, 'bottom': setBottom, 'pageNum': setPageNum } ); 85 | } else if( setTop > windowTop && setTop < windowBottom ) { // top of set is between top (gt) and bottom (lt) 86 | setsInView.push( { 'id': $currentSet.attr( 'id' ), 'top': setTop, 'bottom': setBottom, 'pageNum': setPageNum } ); 87 | } else if( setBottom > windowTop && setBottom < windowBottom ) { // bottom of set is between top (gt) and bottom (lt) 88 | setsInView.push( { 'id': $currentSet.attr( 'id' ), 'top': setTop, 'bottom': setBottom, 'pageNum': setPageNum } ); 89 | } 90 | 91 | }); 92 | 93 | // Parse number of sets found in view in an attempt to update the URL to match the set that comprises the majority of the window. 94 | if ( 0 === setsInView.length ) { 95 | pageNum = -1; 96 | } else if ( 1 === setsInView.length ) { 97 | var setData = setsInView.pop(); 98 | 99 | // If the first set of IS posts is in the same view as the posts loaded in the template by WordPress, determine how much of the view is comprised of IS-loaded posts 100 | if ( ( ( windowBottom - setData.top ) / windowSize ) < 0.5 ) { 101 | pageNum = -1; 102 | } else { 103 | pageNum = setData.pageNum; 104 | } 105 | } else { 106 | var majorityPercentageInView = 0; 107 | 108 | // Identify the IS set that comprises the majority of the current window and set the URL to it. 109 | $.each( setsInView, function( i, setData ) { 110 | var topInView = 0; 111 | var bottomInView = 0; 112 | var percentOfView = 0; 113 | 114 | // Figure percentage of view the current set represents 115 | if ( setData.top > windowTop && setData.top < windowBottom ) { 116 | topInView = ( windowBottom - setData.top ) / windowSize; 117 | } 118 | 119 | if ( setData.bottom > windowTop && setData.bottom < windowBottom ) { 120 | bottomInView = ( setData.bottom - windowTop ) / windowSize; 121 | } 122 | 123 | // Figure out largest percentage of view for current set 124 | if ( topInView >= bottomInView ) { 125 | percentOfView = topInView; 126 | } else if ( bottomInView >= topInView ) { 127 | percentOfView = bottomInView; 128 | } 129 | 130 | // Does current set's percentage of view supplant the largest previously-found set? 131 | if ( percentOfView > majorityPercentageInView ) { 132 | pageNum = setData.pageNum; 133 | majorityPercentageInView = percentOfView; 134 | } 135 | } ); 136 | } 137 | 138 | // We do this last check in case something bad happened 139 | if ( 'number' == typeof pageNum ) { 140 | updateURL( pageNum ); 141 | } 142 | } 143 | 144 | /** 145 | * Setup scroll listeners for changing history 146 | */ 147 | function setupScrollListener() { 148 | $( window ).on( 'scroll', function() { 149 | 150 | clearTimeout( timer ); 151 | timer = setTimeout( determineURL , 100 ); 152 | }); 153 | } 154 | 155 | /** 156 | * Grab more posts if more button is clicked and append them to loop 157 | */ 158 | function setupMoreListener() { 159 | $postContainer.on( 'click', '.more-button', function( event ) { 160 | event.preventDefault(); 161 | 162 | $moreButton.hide(); 163 | 164 | var $setContainer = $( '
' ); 165 | posts.each( function( model ) { 166 | $setContainer.append( postTemplate( { post: model.attributes, settings: settings } ) ); 167 | }); 168 | 169 | $postContainer.append( $setContainer ); 170 | 171 | if ( posts.hasMore() ) { 172 | posts.more().done( function() { 173 | $moreButton.appendTo( $postContainer).show(); 174 | } ); 175 | } 176 | }); 177 | }; 178 | 179 | /** 180 | * Initial posts fetch 181 | */ 182 | posts.fetch( options ).done( function() { 183 | 184 | if ( posts.length > 0 ) { 185 | $postContainer.append( $moreButton ); 186 | 187 | setupMoreListener(); 188 | setupScrollListener(); 189 | } 190 | }); 191 | 192 | })( jQuery, Backbone, _, settings ); -------------------------------------------------------------------------------- /js/navigation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * navigation.js 3 | * 4 | * Handles toggling the navigation menu for small screens. 5 | */ 6 | ( function() { 7 | var container, button, menu; 8 | 9 | container = document.getElementById( 'site-navigation' ); 10 | if ( ! container ) 11 | return; 12 | 13 | button = container.getElementsByTagName( 'button' )[0]; 14 | if ( 'undefined' === typeof button ) 15 | return; 16 | 17 | menu = container.getElementsByTagName( 'ul' )[0]; 18 | 19 | // Hide menu toggle button if menu is empty and return early. 20 | if ( 'undefined' === typeof menu ) { 21 | button.style.display = 'none'; 22 | return; 23 | } 24 | 25 | if ( -1 === menu.className.indexOf( 'nav-menu' ) ) 26 | menu.className += ' nav-menu'; 27 | 28 | button.onclick = function() { 29 | if ( -1 !== container.className.indexOf( 'toggled' ) ) 30 | container.className = container.className.replace( ' toggled', '' ); 31 | else 32 | container.className += ' toggled'; 33 | }; 34 | } )(); 35 | -------------------------------------------------------------------------------- /js/skip-link-focus-fix.js: -------------------------------------------------------------------------------- 1 | ( function() { 2 | var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, 3 | is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, 4 | is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; 5 | 6 | if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) { 7 | window.addEventListener( 'hashchange', function() { 8 | var element = document.getElementById( location.hash.substring( 1 ) ); 9 | 10 | if ( element ) { 11 | if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) 12 | element.tabIndex = -1; 13 | 14 | element.focus(); 15 | } 16 | }, false ); 17 | } 18 | })(); 19 | -------------------------------------------------------------------------------- /languages/_s_backbone.pot: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: _s_backbone\n" 4 | "POT-Creation-Date: 2014-08-16 02:07-0500\n" 5 | "PO-Revision-Date: 2014-08-16 02:07-0500\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: en\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "X-Generator: Poedit 1.6.6\n" 13 | "X-Poedit-Basepath: ../\n" 14 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 15 | "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e\n" 16 | "X-Poedit-SearchPath-0: .\n" 17 | 18 | #: 404.php:15 19 | msgid "Oops! That page can’t be found." 20 | msgstr "" 21 | 22 | #: 404.php:19 23 | msgid "" 24 | "It looks like nothing was found at this location. Maybe try one of the links " 25 | "below or a search?" 26 | msgstr "" 27 | 28 | #: 404.php:27 29 | msgid "Most Used Categories" 30 | msgstr "" 31 | 32 | #: 404.php:44 33 | #, php-format 34 | msgid "Try looking in the monthly archives. %1$s" 35 | msgstr "" 36 | 37 | #: archive.php:29 38 | #, php-format 39 | msgid "Author: %s" 40 | msgstr "" 41 | 42 | #: archive.php:32 43 | #, php-format 44 | msgid "Day: %s" 45 | msgstr "" 46 | 47 | #: archive.php:35 48 | #, php-format 49 | msgid "Month: %s" 50 | msgstr "" 51 | 52 | #: archive.php:38 53 | #, php-format 54 | msgid "Year: %s" 55 | msgstr "" 56 | 57 | #: archive.php:41 58 | msgid "Archives" 59 | msgstr "" 60 | 61 | #: comments.php:35 comments.php:52 62 | msgid "Comment navigation" 63 | msgstr "" 64 | 65 | #: comments.php:36 comments.php:53 66 | msgid "← Older Comments" 67 | msgstr "" 68 | 69 | #: comments.php:37 comments.php:54 70 | msgid "Newer Comments →" 71 | msgstr "" 72 | 73 | #: comments.php:64 74 | msgid "Comments are closed." 75 | msgstr "" 76 | 77 | #: content-none.php:13 78 | msgid "Nothing Found" 79 | msgstr "" 80 | 81 | #: content-none.php:19 82 | #, php-format 83 | msgid "" 84 | "Ready to publish your first post? Get started here." 85 | msgstr "" 86 | 87 | #: content-none.php:23 88 | msgid "" 89 | "Sorry, but nothing matched your search terms. Please try again with some " 90 | "different keywords." 91 | msgstr "" 92 | 93 | #: content-none.php:28 94 | msgid "" 95 | "It seems we can’t find what you’re looking for. Perhaps " 96 | "searching can help." 97 | msgstr "" 98 | 99 | #: content-page.php:18 content-single.php:35 100 | msgid "Pages:" 101 | msgstr "" 102 | 103 | #: content-page.php:24 content-single.php:75 104 | msgid "Edit" 105 | msgstr "" 106 | 107 | #: content-single.php:13 content.php:14 underscore-templates.php:10 108 | msgid "Posted on" 109 | msgstr "" 110 | 111 | #: content-single.php:20 content.php:21 underscore-templates.php:17 112 | msgid "by" 113 | msgstr "" 114 | 115 | #: content-single.php:44 content-single.php:47 content.php:41 content.php:51 116 | msgid ", " 117 | msgstr "" 118 | 119 | #: content-single.php:52 120 | #, php-format 121 | msgid "" 122 | "This entry was tagged %2$s. Bookmark the permalink." 124 | msgstr "" 125 | 126 | #: content-single.php:54 127 | #, php-format 128 | msgid "Bookmark the permalink." 129 | msgstr "" 130 | 131 | #: content-single.php:60 132 | #, php-format 133 | msgid "" 134 | "This entry was posted in %1$s and tagged %2$s. Bookmark the permalink." 136 | msgstr "" 137 | 138 | #: content-single.php:62 139 | #, php-format 140 | msgid "" 141 | "This entry was posted in %1$s. Bookmark the permalink." 143 | msgstr "" 144 | 145 | #: content.php:45 146 | #, php-format 147 | msgid "Posted in %1$s" 148 | msgstr "" 149 | 150 | #: content.php:55 151 | #, php-format 152 | msgid "Tagged %1$s" 153 | msgstr "" 154 | 155 | #: footer.php:15 156 | #, php-format 157 | msgid "Proudly powered by %s" 158 | msgstr "" 159 | 160 | #: functions.php:50 header.php:32 161 | msgid "Primary Menu" 162 | msgstr "" 163 | 164 | #: functions.php:85 165 | msgid "Sidebar" 166 | msgstr "" 167 | 168 | #: header.php:23 169 | msgid "Skip to content" 170 | msgstr "" 171 | 172 | #: inc/extras.php:63 173 | #, php-format 174 | msgid "Page %s" 175 | msgstr "" 176 | 177 | #: inc/template-tags.php:24 178 | msgid "Post navigation" 179 | msgstr "" 180 | 181 | #: search.php:18 182 | #, php-format 183 | msgid "Search Results for: %s" 184 | msgstr "" 185 | 186 | #: underscore-templates.php:37 187 | msgid "Posted in" 188 | msgstr "" 189 | 190 | #: underscore-templates.php:59 191 | msgid "More" 192 | msgstr "" 193 | -------------------------------------------------------------------------------- /languages/readme.txt: -------------------------------------------------------------------------------- 1 | Place your theme language files in this directory. 2 | 3 | Please visit the following links to learn more about translating WordPress themes: 4 | 5 | http://codex.wordpress.org/Translating_WordPress 6 | http://codex.wordpress.org/Function_Reference/load_theme_textdomain 7 | -------------------------------------------------------------------------------- /layouts/content-sidebar.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: _s_backbone 3 | Layout: Content-Sidebar 4 | */ 5 | 6 | .content-area { 7 | float: left; 8 | margin: 0 -25% 0 0; 9 | width: 100%; 10 | } 11 | .site-main { 12 | margin: 0 25% 0 0; 13 | } 14 | .site-content .widget-area { 15 | float: right; 16 | overflow: hidden; 17 | width: 25%; 18 | } 19 | .site-footer { 20 | clear: both; 21 | width: 100%; 22 | } -------------------------------------------------------------------------------- /layouts/sidebar-content.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: _s_backbone 3 | Layout: Sidebar-Content 4 | */ 5 | 6 | .content-area { 7 | float: right; 8 | margin: 0 0 0 -25%; 9 | width: 100%; 10 | } 11 | .site-main { 12 | margin: 0 0 0 25%; 13 | } 14 | .site-content .widget-area { 15 | float: left; 16 | overflow: hidden; 17 | width: 25%; 18 | } 19 | .site-footer { 20 | clear: both; 21 | width: 100%; 22 | } -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: _s_backbone 3 | 4 | Adding support for language written in a Right To Left (RTL) direction is easy - 5 | it's just a matter of overwriting all the horizontal positioning attributes 6 | of your CSS stylesheet in a separate stylesheet file named rtl.css. 7 | 8 | http://codex.wordpress.org/Right_to_Left_Language_s_backboneupport 9 | 10 | */ 11 | 12 | /* 13 | body { 14 | direction: rtl; 15 | unicode-bidi: embed; 16 | } 17 | */ -------------------------------------------------------------------------------- /sass/_reset.scss: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, 2 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 3 | a, abbr, acronym, address, big, cite, code, 4 | del, dfn, em, font, ins, kbd, q, s, samp, 5 | small, strike, strong, sub, sup, tt, var, 6 | dl, dt, dd, ol, ul, li, 7 | fieldset, form, label, legend, 8 | table, caption, tbody, tfoot, thead, tr, th, td { 9 | border: 0; 10 | font-family: inherit; 11 | font-size: 100%; 12 | font-style: inherit; 13 | font-weight: inherit; 14 | margin: 0; 15 | outline: 0; 16 | padding: 0; 17 | vertical-align: baseline; 18 | } 19 | html { 20 | font-size: 62.5%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */ 21 | overflow-y: scroll; /* Keeps page centered in all browsers regardless of content height */ 22 | -webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */ 23 | -ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_s_backboneize_in_s_backboneafari_for_ios_without_disabling_user_zoom/ */ 24 | } 25 | *, 26 | *:before, 27 | *:after { /* apply a natural box layout model to all elements; see http://www.paulirish.com/2012/box-sizing-border-box-ftw/ */ 28 | @include box-sizing(border-box); 29 | } 30 | body { 31 | background: $color__background-body; /* Fallback for when there is no custom background color defined. */ 32 | } 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | main, 41 | nav, 42 | section { 43 | display: block; 44 | } 45 | ol, ul { 46 | list-style: none; 47 | } 48 | table { /* tables still need 'cellspacing="0"' in the markup */ 49 | border-collapse: separate; 50 | border-spacing: 0; 51 | } 52 | caption, th, td { 53 | font-weight: normal; 54 | text-align: left; 55 | } 56 | blockquote:before, blockquote:after, 57 | q:before, q:after { 58 | content: ""; 59 | } 60 | blockquote, q { 61 | quotes: "" ""; 62 | } 63 | a:focus { 64 | outline: thin dotted; 65 | } 66 | a:hover, 67 | a:active { 68 | outline: 0; 69 | } 70 | a img { 71 | border: 0; 72 | } -------------------------------------------------------------------------------- /sass/elements/_elements.scss: -------------------------------------------------------------------------------- 1 | hr { 2 | background-color: $color__background-hr; 3 | border: 0; 4 | height: 1px; 5 | margin-bottom: 1.5em; 6 | } 7 | 8 | @import "lists"; 9 | 10 | img { 11 | height: auto; /* Make sure images are scaled correctly. */ 12 | max-width: 100%; /* Adhere to container width. */ 13 | } 14 | 15 | figure { 16 | margin: 0; 17 | } 18 | 19 | @import "tables"; -------------------------------------------------------------------------------- /sass/elements/_lists.scss: -------------------------------------------------------------------------------- 1 | ul, ol { 2 | margin: 0 0 1.5em 3em; 3 | } 4 | 5 | ul { 6 | list-style: disc; 7 | } 8 | 9 | ol { 10 | list-style: decimal; 11 | } 12 | 13 | li > ul, 14 | li > ol { 15 | margin-bottom: 0; 16 | margin-left: 1.5em; 17 | } 18 | 19 | dt { 20 | font-weight: bold; 21 | } 22 | 23 | dd { 24 | margin: 0 1.5em 1.5em; 25 | } -------------------------------------------------------------------------------- /sass/elements/_tables.scss: -------------------------------------------------------------------------------- 1 | table { 2 | margin: 0 0 1.5em; 3 | width: 100%; 4 | } 5 | 6 | th { 7 | font-weight: bold; 8 | } -------------------------------------------------------------------------------- /sass/forms/_buttons.scss: -------------------------------------------------------------------------------- 1 | button, 2 | input[type="button"], 3 | input[type="reset"], 4 | input[type="submit"] { 5 | border: 1px solid; 6 | border-color: $color__border-button; 7 | @include border-radius(3px); 8 | background: $color__background-button; 9 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05); 10 | color: rgba(0, 0, 0, .8); 11 | cursor: pointer; /* Improves usability and consistency of cursor style between image-type 'input' and others */ 12 | -webkit-appearance: button; /* Corrects inability to style clickable 'input' types in iOS */ 13 | @include font-size(1.2); 14 | line-height: 1; 15 | padding: .6em 1em .4em; 16 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); 17 | } 18 | 19 | button:hover, 20 | input[type="button"]:hover, 21 | input[type="reset"]:hover, 22 | input[type="submit"]:hover { 23 | border-color: $color__border-button-hover; 24 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02); 25 | } 26 | 27 | button:focus, 28 | input[type="button"]:focus, 29 | input[type="reset"]:focus, 30 | input[type="submit"]:focus, 31 | button:active, 32 | input[type="button"]:active, 33 | input[type="reset"]:active, 34 | input[type="submit"]:active { 35 | border-color: $color__border-button-focus; 36 | box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15); 37 | } -------------------------------------------------------------------------------- /sass/forms/_fields.scss: -------------------------------------------------------------------------------- 1 | input[type="checkbox"], 2 | input[type="radio"] { 3 | padding: 0; /* Addresses excess padding in IE8/9 */ 4 | } 5 | 6 | input[type="search"] { 7 | -webkit-appearance: textfield; /* Addresses appearance set to searchfield in S5, Chrome */ 8 | -webkit-box-sizing: content-box; /* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */ 9 | -moz-box-sizing: content-box; 10 | box-sizing: content-box; 11 | } 12 | 13 | input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ 14 | -webkit-appearance: none; 15 | } 16 | 17 | button::-moz-focus-inner, 18 | input::-moz-focus-inner { /* Corrects inner padding and border displayed oddly in FF3/4 www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */ 19 | border: 0; 20 | padding: 0; 21 | } 22 | 23 | input[type="text"], 24 | input[type="email"], 25 | input[type="url"], 26 | input[type="password"], 27 | input[type="search"], 28 | textarea { 29 | color: $color__text-input; 30 | border: 1px solid $color__border-input; 31 | @include border-radius(3px); 32 | } 33 | 34 | input[type="text"]:focus, 35 | input[type="email"]:focus, 36 | input[type="url"]:focus, 37 | input[type="password"]:focus, 38 | input[type="search"]:focus, 39 | textarea:focus { 40 | color: $color__text-input-focus; 41 | } 42 | 43 | input[type="text"], 44 | input[type="email"], 45 | input[type="url"], 46 | input[type="password"], 47 | input[type="search"] { 48 | padding: 3px; 49 | } 50 | 51 | textarea { 52 | overflow: auto; /* Removes default vertical scrollbar in IE6/7/8/9 */ 53 | padding-left: 3px; 54 | vertical-align: top; /* Improves readability and alignment in all browsers */ 55 | width: 100%; 56 | } -------------------------------------------------------------------------------- /sass/forms/_forms.scss: -------------------------------------------------------------------------------- 1 | button, 2 | input, 3 | select, 4 | textarea { 5 | font-size: 100%; /* Corrects font size not being inherited in all browsers */ 6 | margin: 0; /* Addresses margins set differently in IE6/7, F3/4, S5, Chrome */ 7 | vertical-align: baseline; /* Improves appearance and consistency in all browsers */ 8 | } 9 | 10 | @import "buttons"; 11 | 12 | @import "fields"; -------------------------------------------------------------------------------- /sass/layout/_content-sidebar.scss: -------------------------------------------------------------------------------- 1 | .content-area { 2 | float: left; 3 | margin: 0 -$size__site-sidebar 0 0; 4 | width: $size__site-main; 5 | } 6 | 7 | .site-main { 8 | margin: 0 $size__site-sidebar 0 0; 9 | } 10 | 11 | .site-content .widget-area { 12 | float: right; 13 | overflow: hidden; 14 | width: $size__site-sidebar; 15 | } 16 | 17 | .site-footer { 18 | clear: both; 19 | width: $size__site-main; 20 | } -------------------------------------------------------------------------------- /sass/layout/_sidebar-content.scss: -------------------------------------------------------------------------------- 1 | .content-area { 2 | float: right; 3 | margin: 0 0 0 -$size__site-sidebar; 4 | width: $size__site-main; 5 | } 6 | 7 | .site-main { 8 | margin: 0 0 0 $size__site-sidebar; 9 | } 10 | 11 | .site-content .widget-area { 12 | float: left; 13 | overflow: hidden; 14 | width: $size__site-sidebar; 15 | } 16 | 17 | .site-footer { 18 | clear: both; 19 | width: $size__site-main; 20 | } -------------------------------------------------------------------------------- /sass/media/_captions.scss: -------------------------------------------------------------------------------- 1 | .wp-caption { 2 | margin-bottom: 1.5em; 3 | max-width: 100%; 4 | 5 | img[class*="wp-image-"] { 6 | @include center-block; 7 | } 8 | 9 | .wp-caption-text { 10 | margin: 0.8075em 0; 11 | } 12 | } 13 | 14 | .wp-caption-text { 15 | text-align: center; 16 | } -------------------------------------------------------------------------------- /sass/media/_galleries.scss: -------------------------------------------------------------------------------- 1 | .gallery { 2 | margin-bottom: 1.5em; 3 | } 4 | 5 | .gallery-item { 6 | display: inline-block; 7 | text-align: center; 8 | vertical-align: top; 9 | width: 100%; 10 | } 11 | 12 | .gallery-columns-2 .gallery-item { 13 | max-width: 50%; 14 | } 15 | 16 | .gallery-columns-3 .gallery-item { 17 | max-width: 33.33%; 18 | } 19 | 20 | .gallery-columns-4 .gallery-item { 21 | max-width: 25%; 22 | } 23 | 24 | .gallery-columns-5 .gallery-item { 25 | max-width: 20%; 26 | } 27 | 28 | .gallery-columns-6 .gallery-item { 29 | max-width: 16.66%; 30 | } 31 | 32 | .gallery-columns-7 .gallery-item { 33 | max-width: 14.28%; 34 | } 35 | 36 | .gallery-columns-8 .gallery-item { 37 | max-width: 12.5%; 38 | } 39 | 40 | .gallery-columns-9 .gallery-item { 41 | max-width: 11.11%; 42 | } 43 | 44 | .gallery-caption { 45 | display: block; 46 | } -------------------------------------------------------------------------------- /sass/media/_media.scss: -------------------------------------------------------------------------------- 1 | .page-content img.wp-smiley, 2 | .entry-content img.wp-smiley, 3 | .comment-content img.wp-smiley { 4 | border: none; 5 | margin-bottom: 0; 6 | margin-top: 0; 7 | padding: 0; 8 | } 9 | 10 | /* Make sure embeds and iframes fit their containers */ 11 | embed, 12 | iframe, 13 | object { 14 | max-width: 100%; 15 | } 16 | 17 | /*-------------------------------------------------------------- 18 | 12.1 Captions 19 | --------------------------------------------------------------*/ 20 | @import "captions"; 21 | 22 | /*-------------------------------------------------------------- 23 | 12.2 Galleries 24 | --------------------------------------------------------------*/ 25 | @import "galleries"; -------------------------------------------------------------------------------- /sass/mixins/_mixins-master.scss: -------------------------------------------------------------------------------- 1 | // Rem output with px fallback 2 | @mixin font-size($sizeValue: 1.6) { 3 | font-size: ($sizeValue * 10) + px; 4 | font-size: $sizeValue + rem; 5 | } 6 | 7 | // Box model 8 | @mixin box-sizing($box-model) { 9 | box-sizing: $box-model; 10 | -moz-box-sizing: $box-model; // Firefox <= 19 11 | -webkit-box-sizing: $box-model; // Safari <= 5 12 | } 13 | 14 | // Border radius 15 | @mixin border-radius($radius) { 16 | background-clip: padding-box; /* stops bg color from leaking outside the border: */ 17 | border-radius: $radius; 18 | -webkit-border-radius: $radius; 19 | } 20 | 21 | // Center block 22 | @mixin center-block { 23 | display: block; 24 | margin: 0 auto; 25 | } 26 | 27 | // Clearfix 28 | @mixin clearfix() { 29 | content: ""; 30 | display: table; 31 | } 32 | 33 | // Center after (not all clearfix need this also) 34 | @mixin clearfix-after() { 35 | clear: both; 36 | } -------------------------------------------------------------------------------- /sass/modules/_accessibility.scss: -------------------------------------------------------------------------------- 1 | /* Text meant only for screen readers */ 2 | .screen-reader-text { 3 | clip: rect(1px, 1px, 1px, 1px); 4 | position: absolute !important; 5 | height: 1px; 6 | width: 1px; 7 | overflow: hidden; 8 | 9 | &:hover, 10 | &:active, 11 | &:focus { 12 | background-color: $color__background-screen; 13 | @include border-radius(3px); 14 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 15 | clip: auto !important; 16 | color: $color__text-screen; 17 | display: block; 18 | @include font-size(1.4); 19 | font-weight: bold; 20 | height: auto; 21 | left: 5px; 22 | line-height: normal; 23 | padding: 15px 23px 14px; 24 | text-decoration: none; 25 | top: 5px; 26 | width: auto; 27 | z-index: 100000; /* Above WP toolbar */ 28 | } 29 | } -------------------------------------------------------------------------------- /sass/modules/_alignments.scss: -------------------------------------------------------------------------------- 1 | .alignleft { 2 | display: inline; 3 | float: left; 4 | margin-right: 1.5em; 5 | } 6 | 7 | .alignright { 8 | display: inline; 9 | float: right; 10 | margin-left: 1.5em; 11 | } 12 | 13 | .aligncenter { 14 | @include center-block; 15 | } -------------------------------------------------------------------------------- /sass/modules/_clearings.scss: -------------------------------------------------------------------------------- 1 | .clear:before, 2 | .clear:after, 3 | .entry-content:before, 4 | .entry-content:after, 5 | .comment-content:before, 6 | .comment-content:after, 7 | .site-header:before, 8 | .site-header:after, 9 | .site-content:before, 10 | .site-content:after, 11 | .site-footer:before, 12 | .site-footer:after { 13 | @include clearfix; 14 | } 15 | 16 | .clear:after, 17 | .entry-content:after, 18 | .comment-content:after, 19 | .site-header:after, 20 | .site-content:after, 21 | .site-footer:after { 22 | @include clearfix-after; 23 | } -------------------------------------------------------------------------------- /sass/modules/_infinite-scroll.scss: -------------------------------------------------------------------------------- 1 | /* Globally hidden elements when Infinite Scroll is supported and in use. */ 2 | .infinite-scroll .paging-navigation, /* Older / Newer Posts Navigation (always hidden) */ 3 | .infinite-scroll.neverending .site-footer { /* Theme Footer (when set to scrolling) */ 4 | display: none; 5 | } 6 | 7 | /* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before */ 8 | .infinity-end.neverending .site-footer { 9 | display: block; 10 | } -------------------------------------------------------------------------------- /sass/navigation/_links.scss: -------------------------------------------------------------------------------- 1 | a { 2 | color: $color__link; 3 | 4 | &:visited { 5 | color: $color__link-visited; 6 | } 7 | &:hover, 8 | &:focus, 9 | &:active { 10 | color: $color__link-hover; 11 | } 12 | } -------------------------------------------------------------------------------- /sass/navigation/_menus.scss: -------------------------------------------------------------------------------- 1 | .main-navigation { 2 | clear: both; 3 | display: block; 4 | float: left; 5 | width: 100%; 6 | 7 | ul { 8 | list-style: none; 9 | margin: 0; 10 | padding-left: 0; 11 | 12 | ul { 13 | box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); 14 | float: left; 15 | position: absolute; 16 | top: 1.5em; 17 | left: -999em; 18 | z-index: 99999; 19 | 20 | ul { 21 | left: -999em; 22 | top: 0; 23 | } 24 | 25 | li { 26 | &:hover > ul { 27 | left: 100%; 28 | } 29 | } 30 | 31 | :hover > a { 32 | } 33 | 34 | a:hover { 35 | } 36 | } 37 | 38 | a { 39 | width: 200px; 40 | } 41 | li:hover > ul { 42 | left: auto; 43 | } 44 | } 45 | li { 46 | float: left; 47 | position: relative; 48 | 49 | &:hover > a { 50 | } 51 | } 52 | a { 53 | display: block; 54 | text-decoration: none; 55 | } 56 | 57 | .current_page_item a, 58 | .current-menu-item a { 59 | } 60 | } 61 | 62 | /* Small menu */ 63 | .menu-toggle { 64 | display: none; 65 | } 66 | 67 | @media screen and (max-width: 600px) { 68 | .menu-toggle, 69 | .main-navigation.toggled .nav-menu { 70 | display: block; 71 | } 72 | 73 | .main-navigation ul { 74 | display: none; 75 | } 76 | } 77 | 78 | .site-main .comment-navigation, 79 | .site-main .paging-navigation, 80 | .site-main .post-navigation { 81 | margin: 0 0 1.5em; 82 | overflow: hidden; 83 | } 84 | 85 | .comment-navigation .nav-previous, 86 | .paging-navigation .nav-previous, 87 | .post-navigation .nav-previous { 88 | float: left; 89 | width: 50%; 90 | } 91 | 92 | .comment-navigation .nav-next, 93 | .paging-navigation .nav-next, 94 | .post-navigation .nav-next { 95 | float: right; 96 | text-align: right; 97 | width: 50%; 98 | } -------------------------------------------------------------------------------- /sass/navigation/_navigation.scss: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------- 2 | 5.1 Links 3 | --------------------------------------------------------------*/ 4 | @import "links"; 5 | 6 | /*-------------------------------------------------------------- 7 | 5.2 Menus 8 | --------------------------------------------------------------*/ 9 | @import "menus"; -------------------------------------------------------------------------------- /sass/site/_site.scss: -------------------------------------------------------------------------------- 1 | // @import "layout/content-sidebar"; 2 | // @import "layout/sidebar-content"; 3 | /*-------------------------------------------------------------- 4 | 10.1 Posts and pages 5 | --------------------------------------------------------------*/ 6 | @import "primary/posts-and-pages"; 7 | 8 | /*-------------------------------------------------------------- 9 | 10.2 Asides 10 | --------------------------------------------------------------*/ 11 | @import "primary/asides"; 12 | 13 | /*-------------------------------------------------------------- 14 | 10.3 Comments 15 | --------------------------------------------------------------*/ 16 | @import "primary/comments"; -------------------------------------------------------------------------------- /sass/site/primary/_asides.scss: -------------------------------------------------------------------------------- 1 | .blog .format-aside .entry-title, 2 | .archive .format-aside .entry-title { 3 | display: none; 4 | } -------------------------------------------------------------------------------- /sass/site/primary/_comments.scss: -------------------------------------------------------------------------------- 1 | .comment-content a { 2 | word-wrap: break-word; 3 | } 4 | .bypostauthor { 5 | display: block; 6 | } 7 | -------------------------------------------------------------------------------- /sass/site/primary/_posts-and-pages.scss: -------------------------------------------------------------------------------- 1 | .sticky { 2 | display: block; 3 | } 4 | 5 | .hentry { 6 | margin: 0 0 1.5em; 7 | } 8 | 9 | .byline, 10 | .updated { 11 | display: none; 12 | } 13 | 14 | .single .byline, 15 | .group-blog .byline { 16 | display: inline; 17 | } 18 | 19 | .page-content, 20 | .entry-content, 21 | .entry-summary { 22 | margin: 1.5em 0 0; 23 | } 24 | 25 | .page-links { 26 | clear: both; 27 | margin: 0 0 1.5em; 28 | } -------------------------------------------------------------------------------- /sass/site/secondary/_widgets.scss: -------------------------------------------------------------------------------- 1 | .widget { 2 | margin: 0 0 1.5em; 3 | 4 | /* Make sure select elements fit in widgets */ 5 | select { 6 | max-width: 100%; 7 | } 8 | } 9 | 10 | /* Search widget */ 11 | .widget_s_backboneearch .search-submit { 12 | display: none; 13 | } -------------------------------------------------------------------------------- /sass/style.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: _s_backbone 3 | Theme URI: http://underscores.me/ 4 | Author: Automattic 5 | Author URI: http://automattic.com/ 6 | Description: Hi. I'm a starter theme called _s_backbone, or underscores, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for. 7 | Version: 1.0-wpcom 8 | License: GNU General Public License v2 or later 9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 | Text Domain: _s_backbone 11 | Tags: 12 | 13 | This theme, like WordPress, is licensed under the GPL. 14 | Use it to make something cool, have fun, and share what you've learned with others. 15 | 16 | _s_backbone is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc. 17 | 18 | Resetting and rebuilding styles have been helped along thanks to the fine work of 19 | Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html 20 | along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/ 21 | and Blueprint http://www.blueprintcss.org/ 22 | */ 23 | 24 | /*-------------------------------------------------------------- 25 | >>> TABLE OF CONTENTS: 26 | ---------------------------------------------------------------- 27 | 1.0 - Reset 28 | 2.0 - Typography 29 | 3.0 - Elements 30 | 4.0 - Forms 31 | 5.0 - Navigation 32 | 5.1 - Links 33 | 5.2 - Menus 34 | 6.0 - Accessibility 35 | 7.0 - Alignments 36 | 8.0 - Clearings 37 | 9.0 - Widgets 38 | 10.0 - Content 39 | 10.1 - Posts and pages 40 | 10.2 - Asides 41 | 10.3 - Comments 42 | 11.0 - Infinite scroll 43 | 12.0 - Media 44 | 12.1 - Captions 45 | 12.2 - Galleries 46 | --------------------------------------------------------------*/ 47 | @import "variables-site/variables-site"; 48 | @import "mixins/mixins-master"; 49 | 50 | /*-------------------------------------------------------------- 51 | 1.0 - Reset 52 | --------------------------------------------------------------*/ 53 | @import "reset"; 54 | 55 | /*-------------------------------------------------------------- 56 | 2.0 Typography 57 | --------------------------------------------------------------*/ 58 | @import "typography/typography"; 59 | 60 | /*-------------------------------------------------------------- 61 | 3.0 Elements 62 | --------------------------------------------------------------*/ 63 | @import "elements/elements"; 64 | 65 | /*-------------------------------------------------------------- 66 | 4.0 Forms 67 | --------------------------------------------------------------*/ 68 | @import "forms/forms"; 69 | 70 | /*-------------------------------------------------------------- 71 | 5.0 Navigation 72 | --------------------------------------------------------------*/ 73 | @import "navigation/navigation"; 74 | 75 | /*-------------------------------------------------------------- 76 | 6.0 Accessibility 77 | --------------------------------------------------------------*/ 78 | @import "modules/accessibility"; 79 | 80 | /*-------------------------------------------------------------- 81 | 7.0 Alignments 82 | --------------------------------------------------------------*/ 83 | @import "modules/alignments"; 84 | 85 | /*-------------------------------------------------------------- 86 | 8.0 Clearings 87 | --------------------------------------------------------------*/ 88 | @import "modules/clearings"; 89 | 90 | /*-------------------------------------------------------------- 91 | 9.0 Widgets 92 | --------------------------------------------------------------*/ 93 | @import "site/secondary/widgets"; 94 | 95 | /*-------------------------------------------------------------- 96 | 10.0 Content 97 | --------------------------------------------------------------*/ 98 | @import "site/site"; 99 | 100 | /*-------------------------------------------------------------- 101 | 11.0 Infinite scroll 102 | --------------------------------------------------------------*/ 103 | @import "modules/infinite-scroll"; 104 | 105 | /*-------------------------------------------------------------- 106 | 12.0 Media 107 | --------------------------------------------------------------*/ 108 | @import "media/media"; 109 | -------------------------------------------------------------------------------- /sass/typography/_copy.scss: -------------------------------------------------------------------------------- 1 | p { 2 | margin-bottom: 1.5em; 3 | } 4 | 5 | b, strong { 6 | font-weight: bold; 7 | } 8 | 9 | dfn, cite, em, i { 10 | font-style: italic; 11 | } 12 | 13 | blockquote { 14 | margin: 0 1.5em; 15 | } 16 | 17 | address { 18 | margin: 0 0 1.5em; 19 | } 20 | 21 | pre { 22 | background: $color__background-pre; 23 | font-family: $font__pre; 24 | @include font-size(1.5); 25 | line-height: $font__line-height-pre; 26 | margin-bottom: 1.6em; 27 | max-width: 100%; 28 | overflow: auto; 29 | padding: 1.6em; 30 | } 31 | 32 | code, kbd, tt, var { 33 | @include font-size(1.5); 34 | font-family: $font__code; 35 | } 36 | 37 | abbr, acronym { 38 | border-bottom: 1px dotted $color__border-abbr; 39 | cursor: help; 40 | } 41 | 42 | mark, ins { 43 | background: $color__background-ins; 44 | text-decoration: none; 45 | } 46 | 47 | sup, 48 | sub { 49 | font-size: 75%; 50 | height: 0; 51 | line-height: 0; 52 | position: relative; 53 | vertical-align: baseline; 54 | } 55 | 56 | sup { 57 | bottom: 1ex; 58 | } 59 | 60 | sub { 61 | top: .5ex; 62 | } 63 | 64 | small { 65 | font-size: 75%; 66 | } 67 | 68 | big { 69 | font-size: 125%; 70 | } -------------------------------------------------------------------------------- /sass/typography/_headers.scss: -------------------------------------------------------------------------------- 1 | h1, h2, h3, h4, h5, h6 { 2 | clear: both; 3 | } -------------------------------------------------------------------------------- /sass/typography/_typography.scss: -------------------------------------------------------------------------------- 1 | body, 2 | button, 3 | input, 4 | select, 5 | textarea { 6 | color: $color__text-main; 7 | font-family: $font__main; 8 | @include font-size(1.6); 9 | line-height: $font__line-height-body; 10 | } 11 | 12 | @import "headers"; 13 | 14 | @import "copy"; -------------------------------------------------------------------------------- /sass/variables-site/_colors.scss: -------------------------------------------------------------------------------- 1 | $color__background-body: #fff; 2 | $color__background-screen: #f1f1f1; 3 | $color__background-hr: #ccc; 4 | $color__background-button: #e6e6e6; 5 | $color__background-pre: #eee; 6 | $color__background-ins: #fff9c0; 7 | 8 | $color__text-screen: #21759b; 9 | $color__text-input: #666; 10 | $color__text-input-focus: #111; 11 | $color__link: royalblue; 12 | $color__link-visited: purple; 13 | $color__link-hover: midnightblue; 14 | $color__text-main: #404040; 15 | 16 | $color__border-button: #ccc #ccc #bbb; 17 | $color__border-button-hover: #ccc #bbb #aaa; 18 | $color__border-button-focus: #aaa #bbb #bbb; 19 | $color__border-input: #666; 20 | $color__border-abbr: #666; -------------------------------------------------------------------------------- /sass/variables-site/_structure.scss: -------------------------------------------------------------------------------- 1 | $size__site-main: 100%; 2 | $size__site-sidebar: 25%; -------------------------------------------------------------------------------- /sass/variables-site/_typography.scss: -------------------------------------------------------------------------------- 1 | $font__main: sans-serif; 2 | $font__code: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 3 | $font__pre: "Courier 10 Pitch", Courier, monospace; 4 | $font__line-height-body: 1.5; 5 | $font__line-height-pre: 1.6; -------------------------------------------------------------------------------- /sass/variables-site/_variables-site.scss: -------------------------------------------------------------------------------- 1 | @import "colors"; 2 | @import "typography"; 3 | @import "structure"; -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tlovett1/_s_backbone/c755e5b134a6add0470e4c2b98ce887dbc04fb16/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |
13 |
14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: _s_backbone 3 | Theme URI: http://taylorlovett.com 4 | Author: Taylor Lovett 5 | Author URI: http://taylorlovett.com 6 | Description: Hi. I'm a starter theme called _s_backbone. My cousin is _s or underscores. 7 | Version: 1.0 8 | License: GNU General Public License v2 or later 9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 | Text Domain: _s_backbone 11 | */ 12 | 13 | /*-------------------------------------------------------------- 14 | >>> TABLE OF CONTENTS: 15 | ---------------------------------------------------------------- 16 | 1.0 - Reset 17 | 2.0 - Typography 18 | 3.0 - Elements 19 | 4.0 - Forms 20 | 5.0 - Navigation 21 | 5.1 - Links 22 | 5.2 - Menus 23 | 6.0 - Accessibility 24 | 7.0 - Alignments 25 | 8.0 - Clearings 26 | 9.0 - Widgets 27 | 10.0 - Content 28 | 10.1 - Posts and pages 29 | 10.2 - Asides 30 | 10.3 - Comments 31 | 11.0 - Infinite scroll 32 | 12.0 - Media 33 | 12.1 - Captions 34 | 12.2 - Galleries 35 | --------------------------------------------------------------*/ 36 | 37 | /*-------------------------------------------------------------- 38 | 1.0 - Reset 39 | --------------------------------------------------------------*/ 40 | html, body, div, span, applet, object, iframe, 41 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 42 | a, abbr, acronym, address, big, cite, code, 43 | del, dfn, em, font, ins, kbd, q, s, samp, 44 | small, strike, strong, sub, sup, tt, var, 45 | dl, dt, dd, ol, ul, li, 46 | fieldset, form, label, legend, 47 | table, caption, tbody, tfoot, thead, tr, th, td { 48 | border: 0; 49 | font-family: inherit; 50 | font-size: 100%; 51 | font-style: inherit; 52 | font-weight: inherit; 53 | margin: 0; 54 | outline: 0; 55 | padding: 0; 56 | vertical-align: baseline; 57 | } 58 | 59 | html { 60 | font-size: 62.5%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */ 61 | overflow-y: scroll; /* Keeps page centered in all browsers regardless of content height */ 62 | -webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */ 63 | -ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */ 64 | } 65 | 66 | *, 67 | *:before, 68 | *:after { /* apply a natural box layout model to all elements; see http://www.paulirish.com/2012/box-sizing-border-box-ftw/ */ 69 | -webkit-box-sizing: border-box; /* Not needed for modern webkit but still used by Blackberry Browser 7.0; see http://caniuse.com/#search=box-sizing */ 70 | -moz-box-sizing: border-box; /* Still needed for Firefox 28; see http://caniuse.com/#search=box-sizing */ 71 | box-sizing: border-box; 72 | } 73 | 74 | body { 75 | background: #fff; /* Fallback for when there is no custom background color defined. */ 76 | } 77 | 78 | article, 79 | aside, 80 | details, 81 | figcaption, 82 | figure, 83 | footer, 84 | header, 85 | main, 86 | nav, 87 | section { 88 | display: block; 89 | } 90 | 91 | ol, 92 | ul { 93 | list-style: none; 94 | } 95 | 96 | table { /* tables still need 'cellspacing="0"' in the markup */ 97 | border-collapse: separate; 98 | border-spacing: 0; 99 | } 100 | 101 | caption, 102 | th, 103 | td { 104 | font-weight: normal; 105 | text-align: left; 106 | } 107 | blockquote:before, 108 | blockquote:after, 109 | q:before, 110 | q:after { 111 | content: ""; 112 | } 113 | 114 | blockquote, 115 | q { 116 | quotes: "" ""; 117 | } 118 | 119 | a:focus { 120 | outline: thin dotted; 121 | } 122 | 123 | a:hover, 124 | a:active { 125 | outline: 0; 126 | } 127 | 128 | a img { 129 | border: 0; 130 | } 131 | 132 | /*-------------------------------------------------------------- 133 | 2.0 Typography 134 | --------------------------------------------------------------*/ 135 | body, 136 | button, 137 | input, 138 | select, 139 | textarea { 140 | color: #404040; 141 | font-family: sans-serif; 142 | font-size: 16px; 143 | font-size: 1.6rem; 144 | line-height: 1.5; 145 | } 146 | 147 | h1, 148 | h2, 149 | h3, 150 | h4, 151 | h5, 152 | h6 { 153 | clear: both; 154 | } 155 | 156 | p { 157 | margin-bottom: 1.5em; 158 | } 159 | 160 | b, 161 | strong { 162 | font-weight: bold; 163 | } 164 | 165 | dfn, 166 | cite, 167 | em, 168 | i { 169 | font-style: italic; 170 | } 171 | 172 | blockquote { 173 | margin: 0 1.5em; 174 | } 175 | 176 | address { 177 | margin: 0 0 1.5em; 178 | } 179 | 180 | pre { 181 | background: #eee; 182 | font-family: "Courier 10 Pitch", Courier, monospace; 183 | font-size: 15px; 184 | font-size: 1.5rem; 185 | line-height: 1.6; 186 | margin-bottom: 1.6em; 187 | max-width: 100%; 188 | overflow: auto; 189 | padding: 1.6em; 190 | } 191 | 192 | code, 193 | kbd, 194 | tt, 195 | var { 196 | font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 197 | } 198 | 199 | abbr, 200 | acronym { 201 | border-bottom: 1px dotted #666; 202 | cursor: help; 203 | } 204 | 205 | mark, 206 | ins { 207 | background: #fff9c0; 208 | text-decoration: none; 209 | } 210 | 211 | sup, 212 | sub { 213 | font-size: 75%; 214 | height: 0; 215 | line-height: 0; 216 | position: relative; 217 | vertical-align: baseline; 218 | } 219 | 220 | sup { 221 | bottom: 1ex; 222 | } 223 | 224 | sub { 225 | top: .5ex; 226 | } 227 | 228 | small { 229 | font-size: 75%; 230 | } 231 | 232 | big { 233 | font-size: 125%; 234 | } 235 | 236 | /*-------------------------------------------------------------- 237 | 3.0 Elements 238 | --------------------------------------------------------------*/ 239 | hr { 240 | background-color: #ccc; 241 | border: 0; 242 | height: 1px; 243 | margin-bottom: 1.5em; 244 | } 245 | 246 | ul, 247 | ol { 248 | margin: 0 0 1.5em 3em; 249 | } 250 | 251 | ul { 252 | list-style: disc; 253 | } 254 | 255 | ol { 256 | list-style: decimal; 257 | } 258 | 259 | li > ul, 260 | li > ol { 261 | margin-bottom: 0; 262 | margin-left: 1.5em; 263 | } 264 | 265 | dt { 266 | font-weight: bold; 267 | } 268 | 269 | dd { 270 | margin: 0 1.5em 1.5em; 271 | } 272 | 273 | img { 274 | height: auto; /* Make sure images are scaled correctly. */ 275 | max-width: 100%; /* Adhere to container width. */ 276 | } 277 | 278 | figure { 279 | margin: 0; 280 | } 281 | 282 | table { 283 | margin: 0 0 1.5em; 284 | width: 100%; 285 | } 286 | 287 | th { 288 | font-weight: bold; 289 | } 290 | 291 | /*-------------------------------------------------------------- 292 | 4.0 Forms 293 | --------------------------------------------------------------*/ 294 | button, 295 | input, 296 | select, 297 | textarea { 298 | font-size: 100%; /* Corrects font size not being inherited in all browsers */ 299 | margin: 0; /* Addresses margins set differently in IE6/7, F3/4, S5, Chrome */ 300 | vertical-align: baseline; /* Improves appearance and consistency in all browsers */ 301 | } 302 | 303 | button, 304 | input[type="button"], 305 | input[type="reset"], 306 | input[type="submit"] { 307 | border: 1px solid; 308 | border-color: #ccc #ccc #bbb; 309 | border-radius: 3px; 310 | background: #e6e6e6; 311 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05); 312 | color: rgba(0, 0, 0, .8); 313 | cursor: pointer; /* Improves usability and consistency of cursor style between image-type 'input' and others */ 314 | -webkit-appearance: button; /* Corrects inability to style clickable 'input' types in iOS */ 315 | font-size: 12px; 316 | font-size: 1.2rem; 317 | line-height: 1; 318 | padding: .6em 1em .4em; 319 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); 320 | } 321 | 322 | button:hover, 323 | input[type="button"]:hover, 324 | input[type="reset"]:hover, 325 | input[type="submit"]:hover { 326 | border-color: #ccc #bbb #aaa; 327 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02); 328 | } 329 | 330 | button:focus, 331 | input[type="button"]:focus, 332 | input[type="reset"]:focus, 333 | input[type="submit"]:focus, 334 | button:active, 335 | input[type="button"]:active, 336 | input[type="reset"]:active, 337 | input[type="submit"]:active { 338 | border-color: #aaa #bbb #bbb; 339 | box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15); 340 | } 341 | 342 | input[type="checkbox"], 343 | input[type="radio"] { 344 | padding: 0; /* Addresses excess padding in IE8/9 */ 345 | } 346 | 347 | input[type="search"] { 348 | -webkit-appearance: textfield; /* Addresses appearance set to searchfield in S5, Chrome */ 349 | -webkit-box-sizing: content-box; /* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */ 350 | -moz-box-sizing: content-box; 351 | box-sizing: content-box; 352 | } 353 | 354 | input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ 355 | -webkit-appearance: none; 356 | } 357 | 358 | button::-moz-focus-inner, 359 | input::-moz-focus-inner { /* Corrects inner padding and border displayed oddly in FF3/4 www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */ 360 | border: 0; 361 | padding: 0; 362 | } 363 | 364 | input[type="text"], 365 | input[type="email"], 366 | input[type="url"], 367 | input[type="password"], 368 | input[type="search"], 369 | textarea { 370 | color: #666; 371 | border: 1px solid #ccc; 372 | border-radius: 3px; 373 | } 374 | 375 | input[type="text"]:focus, 376 | input[type="email"]:focus, 377 | input[type="url"]:focus, 378 | input[type="password"]:focus, 379 | input[type="search"]:focus, 380 | textarea:focus { 381 | color: #111; 382 | } 383 | 384 | input[type="text"], 385 | input[type="email"], 386 | input[type="url"], 387 | input[type="password"], 388 | input[type="search"] { 389 | padding: 3px; 390 | } 391 | 392 | textarea { 393 | overflow: auto; /* Removes default vertical scrollbar in IE6/7/8/9 */ 394 | padding-left: 3px; 395 | vertical-align: top; /* Improves readability and alignment in all browsers */ 396 | width: 100%; 397 | } 398 | 399 | /*-------------------------------------------------------------- 400 | 5.0 Navigation 401 | --------------------------------------------------------------*/ 402 | /*-------------------------------------------------------------- 403 | 5.1 Links 404 | --------------------------------------------------------------*/ 405 | a { 406 | color: royalblue; 407 | } 408 | 409 | a:visited { 410 | color: purple; 411 | } 412 | 413 | a:hover, 414 | a:focus, 415 | a:active { 416 | color: midnightblue; 417 | } 418 | 419 | /*-------------------------------------------------------------- 420 | 5.2 Menus 421 | --------------------------------------------------------------*/ 422 | .main-navigation { 423 | clear: both; 424 | display: block; 425 | float: left; 426 | width: 100%; 427 | } 428 | 429 | .main-navigation ul { 430 | list-style: none; 431 | margin: 0; 432 | padding-left: 0; 433 | } 434 | 435 | .main-navigation li { 436 | float: left; 437 | position: relative; 438 | } 439 | 440 | .main-navigation a { 441 | display: block; 442 | text-decoration: none; 443 | } 444 | 445 | .main-navigation ul ul { 446 | box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); 447 | float: left; 448 | position: absolute; 449 | top: 1.5em; 450 | left: -999em; 451 | z-index: 99999; 452 | } 453 | 454 | .main-navigation ul ul ul { 455 | left: -999em; 456 | top: 0; 457 | } 458 | 459 | .main-navigation ul ul a { 460 | width: 200px; 461 | } 462 | 463 | .main-navigation ul ul li { 464 | 465 | } 466 | 467 | .main-navigation li:hover > a { 468 | } 469 | 470 | .main-navigation ul ul :hover > a { 471 | } 472 | 473 | .main-navigation ul ul a:hover { 474 | } 475 | 476 | .main-navigation ul li:hover > ul { 477 | left: auto; 478 | } 479 | 480 | .main-navigation ul ul li:hover > ul { 481 | left: 100%; 482 | } 483 | 484 | .main-navigation .current_page_item a, 485 | .main-navigation .current-menu-item a { 486 | } 487 | 488 | /* Small menu */ 489 | .menu-toggle { 490 | display: none; 491 | } 492 | 493 | @media screen and (max-width: 600px) { 494 | .menu-toggle, 495 | .main-navigation.toggled .nav-menu { 496 | display: block; 497 | } 498 | 499 | .main-navigation ul { 500 | display: none; 501 | } 502 | } 503 | 504 | .site-main .comment-navigation, 505 | .site-main .paging-navigation, 506 | .site-main .post-navigation { 507 | margin: 0 0 1.5em; 508 | overflow: hidden; 509 | } 510 | 511 | .comment-navigation .nav-previous, 512 | .paging-navigation .nav-previous, 513 | .post-navigation .nav-previous { 514 | float: left; 515 | width: 50%; 516 | } 517 | 518 | .comment-navigation .nav-next, 519 | .paging-navigation .nav-next, 520 | .post-navigation .nav-next { 521 | float: right; 522 | text-align: right; 523 | width: 50%; 524 | } 525 | 526 | /*-------------------------------------------------------------- 527 | 6.0 Accessibility 528 | --------------------------------------------------------------*/ 529 | /* Text meant only for screen readers */ 530 | .screen-reader-text { 531 | clip: rect(1px, 1px, 1px, 1px); 532 | position: absolute !important; 533 | height: 1px; 534 | width: 1px; 535 | overflow: hidden; 536 | } 537 | 538 | .screen-reader-text:hover, 539 | .screen-reader-text:active, 540 | .screen-reader-text:focus { 541 | background-color: #f1f1f1; 542 | border-radius: 3px; 543 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 544 | clip: auto !important; 545 | color: #21759b; 546 | display: block; 547 | font-size: 14px; 548 | font-weight: bold; 549 | height: auto; 550 | left: 5px; 551 | line-height: normal; 552 | padding: 15px 23px 14px; 553 | text-decoration: none; 554 | top: 5px; 555 | width: auto; 556 | z-index: 100000; /* Above WP toolbar */ 557 | } 558 | 559 | /*-------------------------------------------------------------- 560 | 7.0 Alignments 561 | --------------------------------------------------------------*/ 562 | .alignleft { 563 | display: inline; 564 | float: left; 565 | margin-right: 1.5em; 566 | } 567 | 568 | .alignright { 569 | display: inline; 570 | float: right; 571 | margin-left: 1.5em; 572 | } 573 | 574 | .aligncenter { 575 | clear: both; 576 | display: block; 577 | margin: 0 auto; 578 | } 579 | 580 | /*-------------------------------------------------------------- 581 | 8.0 Clearings 582 | --------------------------------------------------------------*/ 583 | .clear:before, 584 | .clear:after, 585 | .entry-content:before, 586 | .entry-content:after, 587 | .comment-content:before, 588 | .comment-content:after, 589 | .site-header:before, 590 | .site-header:after, 591 | .site-content:before, 592 | .site-content:after, 593 | .site-footer:before, 594 | .site-footer:after { 595 | content: ''; 596 | display: table; 597 | } 598 | 599 | .clear:after, 600 | .entry-content:after, 601 | .comment-content:after, 602 | .site-header:after, 603 | .site-content:after, 604 | .site-footer:after { 605 | clear: both; 606 | } 607 | 608 | /*-------------------------------------------------------------- 609 | 9.0 Widgets 610 | --------------------------------------------------------------*/ 611 | .widget { 612 | margin: 0 0 1.5em; 613 | } 614 | 615 | /* Make sure select elements fit in widgets */ 616 | .widget select { 617 | max-width: 100%; 618 | } 619 | 620 | /* Search widget */ 621 | .widget_search .search-submit { 622 | display: none; 623 | } 624 | 625 | /*-------------------------------------------------------------- 626 | 10.0 Content 627 | --------------------------------------------------------------*/ 628 | /*-------------------------------------------------------------- 629 | 10.1 Posts and pages 630 | --------------------------------------------------------------*/ 631 | .sticky { 632 | display: block; 633 | } 634 | 635 | .hentry { 636 | margin: 0 0 1.5em; 637 | } 638 | 639 | .single .byline, 640 | .group-blog .byline { 641 | display: inline; 642 | } 643 | 644 | .page-content, 645 | .entry-content, 646 | .entry-summary { 647 | margin: 1.5em 0 0; 648 | } 649 | 650 | .page-links { 651 | clear: both; 652 | margin: 0 0 1.5em; 653 | } 654 | 655 | /*-------------------------------------------------------------- 656 | 10.2 Asides 657 | --------------------------------------------------------------*/ 658 | .blog .format-aside .entry-title, 659 | .archive .format-aside .entry-title { 660 | display: none; 661 | } 662 | 663 | /*-------------------------------------------------------------- 664 | 10.3 Comments 665 | --------------------------------------------------------------*/ 666 | .comment-content a { 667 | word-wrap: break-word; 668 | } 669 | 670 | .bypostauthor { 671 | display: block; 672 | } 673 | 674 | /*-------------------------------------------------------------- 675 | 11.0 Infinite scroll 676 | --------------------------------------------------------------*/ 677 | /* Globally hidden elements when Infinite Scroll is supported and in use. */ 678 | .infinite-scroll .paging-navigation, /* Older / Newer Posts Navigation (always hidden) */ 679 | .infinite-scroll.neverending .site-footer { /* Theme Footer (when set to scrolling) */ 680 | display: none; 681 | } 682 | 683 | /* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before */ 684 | .infinity-end.neverending .site-footer { 685 | display: block; 686 | } 687 | 688 | /*-------------------------------------------------------------- 689 | 12.0 Media 690 | --------------------------------------------------------------*/ 691 | .page-content img.wp-smiley, 692 | .entry-content img.wp-smiley, 693 | .comment-content img.wp-smiley { 694 | border: none; 695 | margin-bottom: 0; 696 | margin-top: 0; 697 | padding: 0; 698 | } 699 | 700 | /* Make sure embeds and iframes fit their containers */ 701 | embed, 702 | iframe, 703 | object { 704 | max-width: 100%; 705 | } 706 | 707 | /*-------------------------------------------------------------- 708 | 12.1 Captions 709 | --------------------------------------------------------------*/ 710 | .wp-caption { 711 | margin-bottom: 1.5em; 712 | max-width: 100%; 713 | } 714 | 715 | .wp-caption img[class*="wp-image-"] { 716 | display: block; 717 | margin: 0 auto; 718 | } 719 | 720 | .wp-caption-text { 721 | text-align: center; 722 | } 723 | 724 | .wp-caption .wp-caption-text { 725 | margin: 0.8075em 0; 726 | } 727 | 728 | /*-------------------------------------------------------------- 729 | 12.2 Galleries 730 | --------------------------------------------------------------*/ 731 | .gallery { 732 | margin-bottom: 1.5em; 733 | } 734 | 735 | .gallery-item { 736 | display: inline-block; 737 | text-align: center; 738 | vertical-align: top; 739 | width: 100%; 740 | } 741 | 742 | .gallery-columns-2 .gallery-item { 743 | max-width: 50%; 744 | } 745 | 746 | .gallery-columns-3 .gallery-item { 747 | max-width: 33.33%; 748 | } 749 | 750 | .gallery-columns-4 .gallery-item { 751 | max-width: 25%; 752 | } 753 | 754 | .gallery-columns-5 .gallery-item { 755 | max-width: 20%; 756 | } 757 | 758 | .gallery-columns-6 .gallery-item { 759 | max-width: 16.66%; 760 | } 761 | 762 | .gallery-columns-7 .gallery-item { 763 | max-width: 14.28%; 764 | } 765 | 766 | .gallery-columns-8 .gallery-item { 767 | max-width: 12.5%; 768 | } 769 | 770 | .gallery-columns-9 .gallery-item { 771 | max-width: 11.11%; 772 | } 773 | 774 | .gallery-caption { 775 | display: block; 776 | } 777 | -------------------------------------------------------------------------------- /underscore-templates.php: -------------------------------------------------------------------------------- 1 | 55 | 56 | 63 | --------------------------------------------------------------------------------