├── .gitignore ├── 404.php ├── LICENSE ├── README.md ├── archive.php ├── assets ├── Ubuntu-R.ttf ├── jquery-1.8.2.min.js └── semantic-ui │ ├── css │ ├── semantic.css │ └── semantic.min.css │ ├── fonts │ ├── basic.icons.eot │ ├── basic.icons.svg │ ├── basic.icons.ttf │ ├── basic.icons.woff │ ├── icons.eot │ ├── icons.otf │ ├── icons.svg │ ├── icons.ttf │ └── icons.woff │ ├── images │ ├── loader-large-inverted.gif │ ├── loader-large.gif │ ├── loader-medium-inverted.gif │ ├── loader-medium.gif │ ├── loader-mini-inverted.gif │ ├── loader-mini.gif │ ├── loader-small-inverted.gif │ └── loader-small.gif │ └── javascript │ ├── semantic.js │ └── semantic.min.js ├── comments.php ├── content-page.php ├── content-single.php ├── content.php ├── footer.php ├── functions.php ├── header.php ├── image.php ├── inc ├── custom-header.php ├── customizer.php ├── extras.php ├── jetpack.php └── template-tags.php ├── index.php ├── js ├── customizer.js ├── keyboard-image-navigation.js ├── navigation.js └── skip-link-focus-fix.js ├── languages ├── default.mo ├── default.po ├── default.qm ├── readme.txt ├── semantic-ui-wp-theme.pot ├── zh_CN.mo ├── zh_CN.po └── zh_CN.pot ├── layouts ├── content-sidebar.css └── sidebar-content.css ├── no-results.php ├── page.php ├── rtl.css ├── screenshot.png ├── search.php ├── searchform.php ├── sidebar.php ├── single.php ├── style.css ├── style_origin.css ├── underscores.md ├── yarpp-template-example.php ├── yarpp-template-list.php ├── yarpp-template-multilingual.php ├── yarpp-template-photoblog.php ├── yarpp-template-random.php └── yarpp-template-thumbnail.php /.gitignore: -------------------------------------------------------------------------------- 1 | .htaccess 2 | wp-config.php 3 | wp-content/uploads/ 4 | wp-content/blogs.dir/ 5 | wp-content/upgrade/ 6 | wp-content/backup-db/ 7 | wp-content/advanced-cache.php 8 | wp-content/wp-cache-config.php 9 | sitemap.xml 10 | *.log 11 | wp-content/cache/ 12 | wp-content/backups/ 13 | sitemap.xml.gz 14 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 |
14 | 17 | 18 |
19 |

20 | 21 |
22 |
23 | 24 |
25 |
26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 |
34 |

35 | 46 |
47 | 48 | 49 | ' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'semantic-ui-wp-theme' ), convert_smilies( ':)' ) ) . '

'; 52 | the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=$archive_content" ); 53 | ?> 54 | 55 | 56 |
57 | 58 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Song Liu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # semantic-ui-wp-theme 2 | 3 | A wordpress theme based on [underscores](http://underscores.me/) and [semantic-ui](http://semantic-ui.com). 4 | 5 | This theme was inpiresd by [firmasite](https://wordpress.org/themes/firmasite) 6 | 7 | ## Feature 8 | 9 | * Responsive design 10 | * Article's attached bar include categories, tags, comments count etc. 11 | * Icons, not images. 12 | * Optimized font display effect both for English and Chinese, especially for Mac. 13 | * Search form 14 | * Comments component 15 | 16 | ## Browser Support (as semantic-ui) 17 | 18 | * Last 2 versions FF, Chrome, IE(aka 10+) 19 | * Safari 6 20 | * IE 9+ (Browser prefix only) 21 | * Andriod 4 22 | * Blackberry 10 23 | 24 | ## Contributing 25 | 26 | [Pull Requests](https://github.com/leopku/semantic-ui-wp-theme/pulls) are very welcome! 27 | 28 | 1. fork this project 29 | 2. make your changes 30 | 3. commit your changes 31 | 4. send a 'pr' 32 | 33 | ## Screenshot 34 | 35 | ![image](https://raw.github.com/leopku/semantic-ui-wp-theme/master/screenshot.png) 36 | 37 | ## License 38 | 39 | [MIT](http://opensource.org/licenses/MIT) -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 | 16 | 17 | 76 | 77 | 78 | 79 | 80 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 |
99 |
100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /assets/Ubuntu-R.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/Ubuntu-R.ttf -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/basic.icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/basic.icons.eot -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/basic.icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20100429 at Thu Sep 20 22:09:47 2012 6 | By root 7 | Copyright (C) 2012 by original authors @ fontello.com 8 | 9 | 10 | 11 | 24 | 26 | 28 | 30 | 32 | 35 | 37 | 41 | 44 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 68 | 71 | 74 | 76 | 80 | 86 | 89 | 91 | 101 | 103 | 105 | 108 | 110 | 112 | 115 | 118 | 121 | 123 | 125 | 127 | 129 | 131 | 133 | 135 | 137 | 140 | 142 | 146 | 149 | 153 | 158 | 161 | 163 | 165 | 169 | 172 | 174 | 178 | 181 | 184 | 191 | 193 | 196 | 199 | 203 | 206 | 209 | 213 | 217 | 219 | 221 | 223 | 225 | 228 | 231 | 234 | 237 | 240 | 243 | 245 | 247 | 250 | 253 | 255 | 258 | 262 | 264 | 266 | 268 | 270 | 273 | 275 | 278 | 283 | 289 | 292 | 295 | 299 | 301 | 304 | 307 | 311 | 315 | 317 | 322 | 325 | 329 | 334 | 341 | 344 | 347 | 351 | 354 | 358 | 362 | 367 | 372 | 377 | 380 | 385 | 388 | 392 | 398 | 401 | 403 | 409 | 411 | 413 | 418 | 422 | 425 | 428 | 431 | 434 | 436 | 440 | 443 | 446 | 449 | 450 | 451 | -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/basic.icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/basic.icons.ttf -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/basic.icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/basic.icons.woff -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/icons.eot -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/icons.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/icons.otf -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/icons.ttf -------------------------------------------------------------------------------- /assets/semantic-ui/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/fonts/icons.woff -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-large-inverted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-large-inverted.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-large.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-large.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-medium-inverted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-medium-inverted.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-medium.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-medium.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-mini-inverted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-mini-inverted.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-mini.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-mini.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-small-inverted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-small-inverted.gif -------------------------------------------------------------------------------- /assets/semantic-ui/images/loader-small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/assets/semantic-ui/images/loader-small.gif -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | 21 | 22 |
23 | 24 |
25 | 26 |
27 | 28 |
29 | 30 | 31 | 32 | 33 | 39 | 40 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 41 | 46 | 47 | 48 | 49 |
50 | 'semantic_ui_wp_theme_comment' ) ); 58 | ?> 59 |
60 | 61 | 62 | 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 63 | 68 | 69 | 70 | 71 | 72 | 76 |

77 | 78 | 79 | 80 | 81 |
82 |
-------------------------------------------------------------------------------- /content-page.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |
> 10 |
11 |

12 |
13 | 14 |
15 | 16 | '', 20 | ) ); 21 | ?> 22 |
23 | ', '' ); ?> 24 |
25 | -------------------------------------------------------------------------------- /content-single.php: -------------------------------------------------------------------------------- 1 | 6 | 7 |
> 8 |
9 |

10 | 11 | 14 |
15 | 16 |
17 | 18 | '', 22 | ) ); 23 | ?> 24 | 25 | 26 |
27 | permalink.', 'semantic-ui-wp-theme' ); 38 | } else { 39 | $meta_text = __( 'Bookmark the permalink.', 'semantic-ui-wp-theme' ); 40 | } 41 | 42 | } else { 43 | // But this blog has loads of categories so we should probably display them here 44 | if ( '' != $tag_list ) { 45 | #$meta_text = '' . __( ' %1$s and tagged %2$s. Bookmark the permalink.', 'semantic-ui-wp-theme' ); 46 | $meta_text = __( ' %1$s %2$s permalink.', 'semantic-ui-wp-theme' ); 47 | } else { 48 | $meta_text = __( ' %1$s | permalink', 'semantic-ui-wp-theme' ); 49 | } 50 | 51 | } // end check for categories on this blog 52 | 53 | printf( 54 | $meta_text, 55 | $category_list, 56 | $tag_list, 57 | get_permalink() 58 | ); 59 | ?> 60 | 61 | ', '' ); ?> 62 |
63 |
64 |
65 | -------------------------------------------------------------------------------- /content.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | 8 | 9 |
10 |

11 | 12 | 13 | 16 | 17 |
18 | 19 | 20 | 21 | 22 |
23 | 24 |
25 | 26 |
27 | →', 'semantic-ui-wp-theme' ) ); ?> 28 | '', 32 | ) ); 33 | ?> 34 |
35 | 36 | 37 |
38 | 39 | ' . get_my_category_list( __( ' ', 'semantic-ui-wp-theme' ) ); 43 | if ( $categories_list && semantic_ui_wp_theme_categorized_blog() ) : 44 | ?> 45 | 46 | 47 | 48 | 49 | 50 | | %2$s', 51 | esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), 52 | esc_html( get_the_author() ) 53 | ); ?> | 54 | 55 | 56 | | 57 | 58 | 59 | ' . get_my_tag_list( '', __( '', 'semantic-ui-wp-theme' ) ); ?> 62 | 63 | | 64 | 65 | 66 | 67 |
68 | 69 | 70 |
71 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 27 | 28 | 29 |
 
30 | 31 | 32 | 33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | __( 'Primary Menu', 'semantic-ui-wp-theme' ), 49 | ) ); 50 | 51 | /** 52 | * Enable support for Post Formats 53 | */ 54 | add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); 55 | 56 | /** 57 | * Setup the WordPress core custom background feature. 58 | */ 59 | add_theme_support( 'custom-background', apply_filters( 'semantic_ui_wp_theme_custom_background_args', array( 60 | 'default-color' => 'ffffff', 61 | 'default-image' => '', 62 | ) ) ); 63 | } 64 | endif; // semantic_ui_wp_theme_setup 65 | add_action( 'after_setup_theme', 'semantic_ui_wp_theme_setup' ); 66 | 67 | /** 68 | * Register widgetized area and update sidebar with default widgets 69 | */ 70 | function semantic_ui_wp_theme_widgets_init() { 71 | register_sidebar( array( 72 | 'name' => __( 'Sidebar', 'semantic-ui-wp-theme' ), 73 | 'id' => 'sidebar-1', 74 | 'before_widget' => '
', 75 | 'after_widget' => '
', 76 | 'before_title' => '

', 77 | 'after_title' => '

', 78 | ) ); 79 | } 80 | add_action( 'widgets_init', 'semantic_ui_wp_theme_widgets_init' ); 81 | 82 | /** 83 | * Enqueue scripts and styles 84 | */ 85 | function semantic_ui_wp_theme_scripts() { 86 | #wp_enqueue_style( 'bootstrap', 'http://cdn.staticfile.org/twitter-bootstrap/2.3.2/css/bootstrap.css' ); 87 | #wp_enqueue_style( 'bootstrap-responsive', 'http://cdn.staticfile.org/twitter-bootstrap/2.3.2/css/bootstrap-responsive.css' ); 88 | wp_enqueue_style( 'semantic-ui', get_template_directory_uri() . '/assets/semantic-ui/css/semantic.min.css' ); 89 | wp_enqueue_style( 'semantic-ui-wp-theme-style', get_stylesheet_uri() ); 90 | 91 | wp_enqueue_script( 'jQuery', get_template_directory_uri(). '/assets/jquery-1.8.2.min.js' ); 92 | wp_enqueue_script( 'semantic-ui-wp-theme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); 93 | 94 | wp_enqueue_script( 'semantic-ui-wp-theme-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); 95 | 96 | if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 97 | wp_enqueue_script( 'comment-reply' ); 98 | } 99 | 100 | if ( is_singular() && wp_attachment_is_image() ) { 101 | wp_enqueue_script( 'semantic-ui-wp-theme-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); 102 | } 103 | 104 | wp_enqueue_script( 'semantic-ui', get_template_directory_uri() . '/assets/semantic-ui/javascript/semantic.min.js'); 105 | } 106 | add_action( 'wp_enqueue_scripts', 'semantic_ui_wp_theme_scripts' ); 107 | 108 | /** 109 | * Implement the Custom Header feature. 110 | */ 111 | //require get_template_directory() . '/inc/custom-header.php'; 112 | 113 | /** 114 | * Custom template tags for this theme. 115 | */ 116 | require get_template_directory() . '/inc/template-tags.php'; 117 | 118 | /** 119 | * Custom functions that act independently of the theme templates. 120 | */ 121 | require get_template_directory() . '/inc/extras.php'; 122 | 123 | /** 124 | * Customizer additions. 125 | */ 126 | require get_template_directory() . '/inc/customizer.php'; 127 | 128 | /** 129 | * Load Jetpack compatibility file. 130 | */ 131 | require get_template_directory() . '/inc/jetpack.php'; 132 | 133 | /** 134 | * original function get_the_category_list was in 'wp-include/category-template.php' 135 | */ 136 | function get_my_category_list( $separator = '', $parents='', $post_id = false ) { 137 | global $wp_rewrite; 138 | if ( ! is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) ) 139 | return apply_filters( 'the_category', '', $separator, $parents ); 140 | 141 | $categories = get_the_category( $post_id ); 142 | if ( empty( $categories ) ) 143 | return apply_filters( 'the_category', __( 'Uncategorized' ), $separator, $parents ); 144 | 145 | $rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; 146 | 147 | $thelist = ''; 148 | if ( '' == $separator ) { 149 | $thelist .= ''; 170 | } else { 171 | $i = 0; 172 | foreach ( $categories as $category ) { 173 | if ( 0 < $i ) 174 | $thelist .= $separator; 175 | switch ( strtolower( $parents ) ) { 176 | case 'multiple': 177 | if ( $category->parent ) 178 | $thelist .= get_category_parents( $category->parent, true, $separator ); 179 | $thelist .= 'name ) ) . '" ' . $rel . 'class="ui orange tiny label" >' . $category->name.''; 180 | break; 181 | case 'single': 182 | $thelist .= 'name ) ) . '" ' . $rel . 'class="ui orange tiny label" >'; 183 | if ( $category->parent ) 184 | $thelist .= get_category_parents( $category->parent, false, $separator ); 185 | $thelist .= "$category->name"; 186 | break; 187 | case '': 188 | default: 189 | $thelist .= 'name ) ) . '" ' . $rel . 'class="ui orange tiny label" >' . $category->name.''; 190 | } 191 | ++$i; 192 | } 193 | } 194 | return apply_filters( 'the_category', $thelist, $separator, $parents ); 195 | } 196 | 197 | /** 198 | * original function get_the_term_list was in 'wp-include/category-template.php' 199 | */ 200 | function get_my_term_list( $id, $taxonomy, $before = '', $sep = '', $after = '' ) { 201 | $terms = get_the_terms( $id, $taxonomy ); 202 | 203 | if ( is_wp_error( $terms ) ) 204 | return $terms; 205 | 206 | if ( empty( $terms ) ) 207 | return false; 208 | 209 | foreach ( $terms as $term ) { 210 | $link = get_term_link( $term, $taxonomy ); 211 | if ( is_wp_error( $link ) ) 212 | return $link; 213 | $term_links[] = ''; 214 | } 215 | 216 | $term_links = apply_filters( "term_links-$taxonomy", $term_links ); 217 | 218 | return $before . join( $sep, $term_links ) . $after; 219 | } 220 | 221 | /** 222 | * original function get_the_tag_list was in 'wp-include/category-template.php' 223 | */ 224 | function get_my_tag_list( $before = '', $sep = '', $after = '', $id = 0 ) { 225 | return apply_filters( 'the_tags', get_my_term_list( $id, 'post_tag', $before, $sep, $after ), $before, $sep, $after, $id ); 226 | } 227 | 228 | /** 229 | * original function comment_form was in 'wp-include/comment-template.php' 230 | */ 231 | function my_comment_form( $args = array(), $post_id = null ) { 232 | if ( null === $post_id ) 233 | $post_id = get_the_ID(); 234 | else 235 | $id = $post_id; 236 | 237 | $commenter = wp_get_current_commenter(); 238 | $user = wp_get_current_user(); 239 | $user_identity = $user->exists() ? $user->display_name : ''; 240 | 241 | $args = wp_parse_args( $args ); 242 | if ( ! isset( $args['format'] ) ) 243 | $args['format'] = current_theme_supports( 'html5', 'comment-form' ) ? 'html5' : 'xhtml'; 244 | 245 | $req = get_option( 'require_name_email' ); 246 | $aria_req = ( $req ? " aria-required='true'" : '' ); 247 | $html5 = 'html5' === $args['format']; 248 | $fields = array( 249 | 'author' => '

' . ' ' . 250 | '

', 251 | 'email' => '

' . 252 | '

', 253 | 'url' => '

' . 254 | '

', 255 | ); 256 | 257 | $required_text = sprintf( ' ' . __('Required fields are marked %s'), '*' ); 258 | 259 | /** 260 | * Filter the default comment form fields. 261 | * 262 | * @since 3.0.0 263 | * 264 | * @param array $fields The default comment fields. 265 | */ 266 | $fields = apply_filters( 'comment_form_default_fields', $fields ); 267 | $defaults = array( 268 | 'fields' => $fields, 269 | 'comment_field' => '

', 270 | 'must_log_in' => '

' . sprintf( __( 'You must be logged in to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', 271 | 'logged_in_as' => '

' . sprintf( __( 'Logged in as %2$s. Log out?' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '

', 272 | 'comment_notes_before' => '

' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '

', 273 | #'comment_notes_after' => '

' . sprintf( __( 'You may use these HTML tags and attributes: %s' ), ' ' . allowed_tags() . '' ) . '

', 274 | 'comment_notes_after' => '

' . sprintf( __( 'You may use Markdown language and realtime preview can see above.' ) ), 275 | 'id_form' => 'commentform', 276 | 'id_submit' => 'submit', 277 | 'title_reply' => __( 'Leave a Reply' ), 278 | 'title_reply_to' => __( 'Leave a Reply to %s' ), 279 | 'cancel_reply_link' => __( 'Cancel reply' ), 280 | 'label_submit' => __( 'Post Comment' ), 281 | 'format' => 'xhtml', 282 | ); 283 | 284 | /** 285 | * Filter the comment form default arguments. 286 | * 287 | * Use 'comment_form_default_fields' to filter the comment fields. 288 | * 289 | * @since 3.0.0 290 | * 291 | * @param array $defaults The default comment form arguments. 292 | */ 293 | $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) ); 294 | 295 | ?> 296 | 297 | 305 |

306 |

307 | 308 | 309 | 317 | 318 |
> 319 | tag. 322 | * 323 | * @since 3.0.0 324 | */ 325 | do_action( 'comment_form_top' ); 326 | ?> 327 | 328 | 340 | 351 | 352 | 353 | $field ) { 361 | /** 362 | * Filter a comment form field for display. 363 | * 364 | * The dynamic portion of the filter hook, $name, refers to the name 365 | * of the comment form field. Such as 'author', 'email', or 'url'. 366 | * 367 | * @since 3.0.0 368 | * 369 | * @param string $field The HTML-formatted output of the comment form field. 370 | */ 371 | echo apply_filters( "comment_form_field_{$name}", $field ) . "\n"; 372 | } 373 | /** 374 | * Fires after the comment fields in the comment form. 375 | * 376 | * @since 3.0.0 377 | */ 378 | do_action( 'comment_form_after_fields' ); 379 | ?> 380 | 381 | 391 | 392 |

393 | 394 | 395 |

396 | tag. 399 | * 400 | * @since 1.5.2 401 | * 402 | * @param int $post_id The post ID. 403 | */ 404 | do_action( 'comment_form', $post_id ); 405 | ?> 406 |
407 | 408 |
409 | section and everything up till
6 | * 7 | * @package semantic-ui-wp-theme 8 | */ 9 | ?> 10 | > 11 | 12 | 13 | 14 | <?php wp_title( '|', true, 'right' ); ?> 15 | 16 | 17 | 18 | 19 | 20 | 21 | > 22 |
23 | 24 |
 
25 |
26 | 37 | 38 |
39 | -------------------------------------------------------------------------------- /image.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 | 14 | 15 |
> 16 |
17 | ', '' ); ?> 18 | 19 | 35 | 36 | 40 |
41 | 42 |
43 |
44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 |
52 | 53 |
54 | 55 | '', 60 | ) ); 61 | ?> 62 |
63 | 64 | ', '' ); ?> 65 |
66 | 67 | 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | -------------------------------------------------------------------------------- /inc/custom-header.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | * 15 | * @package semantic-ui-wp-theme 16 | */ 17 | 18 | /** 19 | * Setup the WordPress core custom header feature. 20 | * 21 | * @uses semantic_ui_wp_theme_header_style() 22 | * @uses semantic_ui_wp_theme_admin_header_style() 23 | * @uses semantic_ui_wp_theme_admin_header_image() 24 | * 25 | * @package semantic-ui-wp-theme 26 | */ 27 | function semantic_ui_wp_theme_custom_header_setup() { 28 | add_theme_support( 'custom-header', apply_filters( 'semantic_ui_wp_theme_custom_header_args', array( 29 | 'default-image' => '', 30 | 'default-text-color' => '000', 31 | 'width' => 1000, 32 | 'height' => 250, 33 | 'flex-height' => true, 34 | 'wp-head-callback' => 'semantic_ui_wp_theme_header_style', 35 | 'admin-head-callback' => 'semantic_ui_wp_theme_admin_header_style', 36 | 'admin-preview-callback' => 'semantic_ui_wp_theme_admin_header_image', 37 | ) ) ); 38 | } 39 | add_action( 'after_setup_theme', 'semantic_ui_wp_theme_custom_header_setup' ); 40 | 41 | if ( ! function_exists( 'semantic_ui_wp_theme_header_style' ) ) : 42 | /** 43 | * Styles the header image and text displayed on the blog 44 | * 45 | * @see semantic_ui_wp_theme_custom_header_setup(). 46 | */ 47 | function semantic_ui_wp_theme_header_style() { 48 | $header_text_color = get_header_textcolor(); 49 | 50 | // If no custom options for text are set, let's bail 51 | // get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value 52 | if ( HEADER_TEXTCOLOR == $header_text_color ) 53 | return; 54 | 55 | // If we get this far, we have custom styles. Let's do this. 56 | ?> 57 | 77 | Header admin panel. 84 | * 85 | * @see semantic_ui_wp_theme_custom_header_setup(). 86 | */ 87 | function semantic_ui_wp_theme_admin_header_style() { 88 | ?> 89 | 105 | Header admin panel. 112 | * 113 | * @see semantic_ui_wp_theme_custom_header_setup(). 114 | */ 115 | function semantic_ui_wp_theme_admin_header_image() { 116 | $style = sprintf( ' style="color:#%s;"', get_header_textcolor() ); 117 | ?> 118 |
119 |

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

120 |
>
121 | 122 | 123 | 124 |
125 | 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', 'semantic_ui_wp_theme_customize_register' ); 19 | 20 | /** 21 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 22 | */ 23 | function semantic_ui_wp_theme_customize_preview_js() { 24 | wp_enqueue_script( 'semantic_ui_wp_theme_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); 25 | } 26 | add_action( 'customize_preview_init', 'semantic_ui_wp_theme_customize_preview_js' ); 27 | -------------------------------------------------------------------------------- /inc/extras.php: -------------------------------------------------------------------------------- 1 | post_parent ) && $image->post_parent != $id ) 41 | $url .= '#main'; 42 | 43 | return $url; 44 | } 45 | add_filter( 'attachment_link', 'semantic_ui_wp_theme_enhanced_image_navigation', 10, 2 ); 46 | 47 | /** 48 | * Filters wp_title to print a neat tag based on what is being viewed. 49 | */ 50 | function semantic_ui_wp_theme_wp_title( $title, $sep ) { 51 | global $page, $paged; 52 | 53 | if ( is_feed() ) 54 | return $title; 55 | 56 | // Add the blog name 57 | $title .= get_bloginfo( 'name' ); 58 | 59 | // Add the blog description for the home/front page. 60 | $site_description = get_bloginfo( 'description', 'display' ); 61 | if ( $site_description && ( is_home() || is_front_page() ) ) 62 | $title .= " $sep $site_description"; 63 | 64 | // Add a page number if necessary: 65 | if ( $paged >= 2 || $page >= 2 ) 66 | $title .= " $sep " . sprintf( __( 'Page %s', 'semantic-ui-wp-theme' ), max( $paged, $page ) ); 67 | 68 | return $title; 69 | } 70 | add_filter( 'wp_title', 'semantic_ui_wp_theme_wp_title', 10, 2 ); -------------------------------------------------------------------------------- /inc/jetpack.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Jetpack Compatibility File 4 | * See: http://jetpack.me/ 5 | * 6 | * @package semantic-ui-wp-theme 7 | */ 8 | 9 | /** 10 | * Add theme support for Infinite Scroll. 11 | * See: http://jetpack.me/support/infinite-scroll/ 12 | */ 13 | function semantic_ui_wp_theme_jetpack_setup() { 14 | add_theme_support( 'infinite-scroll', array( 15 | 'container' => 'main', 16 | 'footer' => 'page', 17 | ) ); 18 | } 19 | add_action( 'after_setup_theme', 'semantic_ui_wp_theme_jetpack_setup' ); 20 | -------------------------------------------------------------------------------- /inc/template-tags.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * Custom template tags for this theme. 4 | * 5 | * Eventually, some of the functionality here could be replaced by core features 6 | * 7 | * @package semantic-ui-wp-theme 8 | */ 9 | 10 | if ( ! function_exists( 'semantic_ui_wp_theme_content_nav' ) ) : 11 | /** 12 | * Display navigation to next/previous pages when applicable 13 | */ 14 | function semantic_ui_wp_theme_content_nav( $nav_id ) { 15 | global $wp_query, $post; 16 | 17 | // Don't print empty markup on single pages if there's nowhere to navigate. 18 | if ( is_single() ) { 19 | $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); 20 | $next = get_adjacent_post( false, '', false ); 21 | 22 | if ( ! $next && ! $previous ) 23 | return; 24 | } 25 | 26 | // Don't print empty markup in archives if there's only one page. 27 | if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) 28 | return; 29 | 30 | $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; 31 | 32 | ?> 33 | <nav role="navigation" id="<?php echo esc_attr( $nav_id ); ?>" class="<?php echo $nav_class; ?>"> 34 | <!-- <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'semantic-ui-wp-theme' ); ?></h1> --> 35 | 36 | <?php if ( is_single() ) : // navigation links for single posts ?> 37 | <br> 38 | <?php previous_post_link( '<div class="nav-previous ui menu compact floated left orange inverted small"><div class="item">%link</div></div>', '<i class="icon left arrow"></i>' . _x( '', 'Previous post link', 'semantic-ui-wp-theme' ) . '</span> %title' ); ?> 39 | <?php next_post_link( '<div class="nav-next ui menu compact floated right orange inverted small"><div class="item">%link</div></div>', '%title <i class="icon right arrow"></i>' . _x( '', 'Next post link', 'semantic-ui-wp-theme' ) . '</span>' ); ?> 40 | <br><br> 41 | <?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?> 42 | 43 | <?php if ( get_next_posts_link() ) : ?> 44 | <div class="ui compact menu floated left orange inverted small"> 45 | <div class="nav-previous ui item"><?php next_posts_link( __( '<i class="left basic icon"></i> Older posts', 'semantic-ui-wp-theme' ) ); ?></div> 46 | </div> 47 | <?php endif; ?> 48 | 49 | <?php if ( get_previous_posts_link() ) : ?> 50 | <div class="ui compact menu floated right orange inverted"> 51 | <div class="nav-next ui item"><?php previous_posts_link( __( 'Newer posts <i class="right basic icon"></i>', 'semantic-ui-wp-theme' ) ); ?></div> 52 | </div> 53 | <?php endif; ?> 54 | 55 | <?php endif; ?> 56 | 57 | </nav><!-- #<?php echo esc_html( $nav_id ); ?> --> 58 | <?php 59 | } 60 | endif; // semantic_ui_wp_theme_content_nav 61 | 62 | if ( ! function_exists( 'semantic_ui_wp_theme_comment' ) ) : 63 | /** 64 | * Template for comments and pingbacks. 65 | * 66 | * Used as a callback by wp_list_comments() for displaying the comments. 67 | */ 68 | function semantic_ui_wp_theme_comment( $comment, $args, $depth ) { 69 | $GLOBALS['comment'] = $comment; 70 | 71 | if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?> 72 | 73 | <div id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>> 74 | <div class="comment-body"> 75 | <?php _e( 'Pingback:', 'semantic-ui-wp-theme' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'semantic-ui-wp-theme' ), '<span class="edit-link">', '</span>' ); ?> 76 | </div> 77 | 78 | <?php else : ?> 79 | 80 | <!-- <li id="comment-<?#php comment_ID(); ?>" <?#php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>> --> 81 | <div id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? 'comments' : 'comment' ); ?>> 82 | <div class="avatar"> 83 | <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?> 84 | </div> 85 | <div class="content"> 86 | <?#php printf( __( '%s <span class="says">says:</span>', 'semantic-ui-wp-theme' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?> 87 | <?php printf(get_comment_author_link()); ?> 88 | <div class="metadata"> 89 | <span class="date"> 90 | <?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'semantic-ui-wp-theme' ), get_comment_date(), get_comment_time() ); ?> 91 | 92 | </span> 93 | </div> 94 | <div class="text"> 95 | <?php comment_text(); ?> 96 | </div> 97 | </div> 98 | <?php 99 | endif; 100 | } 101 | endif; // ends check for semantic_ui_wp_theme_comment() 102 | 103 | if ( ! function_exists( 'semantic_ui_wp_theme_the_attached_image' ) ) : 104 | /** 105 | * Prints the attached image with a link to the next attached image. 106 | */ 107 | function semantic_ui_wp_theme_the_attached_image() { 108 | $post = get_post(); 109 | $attachment_size = apply_filters( 'semantic_ui_wp_theme_attachment_size', array( 1200, 1200 ) ); 110 | $next_attachment_url = wp_get_attachment_url(); 111 | 112 | /** 113 | * Grab the IDs of all the image attachments in a gallery so we can get the 114 | * URL of the next adjacent image in a gallery, or the first image (if 115 | * we're looking at the last image in a gallery), or, in a gallery of one, 116 | * just the link to that image file. 117 | */ 118 | $attachment_ids = get_posts( array( 119 | 'post_parent' => $post->post_parent, 120 | 'fields' => 'ids', 121 | 'numberposts' => -1, 122 | 'post_status' => 'inherit', 123 | 'post_type' => 'attachment', 124 | 'post_mime_type' => 'image', 125 | 'order' => 'ASC', 126 | 'orderby' => 'menu_order ID' 127 | ) ); 128 | 129 | // If there is more than 1 attachment in a gallery... 130 | if ( count( $attachment_ids ) > 1 ) { 131 | foreach ( $attachment_ids as $attachment_id ) { 132 | if ( $attachment_id == $post->ID ) { 133 | $next_id = current( $attachment_ids ); 134 | break; 135 | } 136 | } 137 | 138 | // get the URL of the next image attachment... 139 | if ( $next_id ) 140 | $next_attachment_url = get_attachment_link( $next_id ); 141 | 142 | // or get the URL of the first image attachment. 143 | else 144 | $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); 145 | } 146 | 147 | printf( '<a href="%1$s" rel="attachment">%2$s</a>', 148 | esc_url( $next_attachment_url ), 149 | wp_get_attachment_image( $post->ID, $attachment_size ) 150 | ); 151 | } 152 | endif; 153 | 154 | if ( ! function_exists( 'semantic_ui_wp_theme_posted_on' ) ) : 155 | /** 156 | * Prints HTML with meta information for the current post-date/time and author. 157 | */ 158 | function semantic_ui_wp_theme_posted_on() { 159 | $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>'; 160 | // if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) 161 | // $time_string .= '<time class="updated" datetime="%3$s">%4$s</time>'; 162 | 163 | // $time_string = sprintf( $time_string, 164 | // esc_attr( get_the_date( 'c' ) ), 165 | // esc_html( get_the_date() ), 166 | // esc_attr( get_the_modified_date( 'c' ) ), 167 | // esc_html( get_the_modified_date() ) 168 | // ); 169 | 170 | $time_string = sprintf( $time_string, 171 | esc_attr( get_the_date( 'c' ) ), 172 | esc_html( get_the_date() ) 173 | ); 174 | 175 | printf( __( '<i class="icon calendar"></i>%1$s', 'semantic-ui-wp-theme' ), $time_string); 176 | 177 | // printf( __( '<span class="posted-on">Posted on %1$s</span><span class="byline"> by %2$s</span>', 'semantic-ui-wp-theme' ), 178 | // sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>', 179 | // esc_url( get_permalink() ), 180 | // $time_string 181 | // ), 182 | // sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>', 183 | // esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), 184 | // esc_html( get_the_author() ) 185 | // ) 186 | // ); 187 | } 188 | endif; 189 | 190 | /** 191 | * Returns true if a blog has more than 1 category 192 | */ 193 | function semantic_ui_wp_theme_categorized_blog() { 194 | if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { 195 | // Create an array of all the categories that are attached to posts 196 | $all_the_cool_cats = get_categories( array( 197 | 'hide_empty' => 1, 198 | ) ); 199 | 200 | // Count the number of categories that are attached to the posts 201 | $all_the_cool_cats = count( $all_the_cool_cats ); 202 | 203 | set_transient( 'all_the_cool_cats', $all_the_cool_cats ); 204 | } 205 | 206 | if ( '1' != $all_the_cool_cats ) { 207 | // This blog has more than 1 category so semantic_ui_wp_theme_categorized_blog should return true 208 | return true; 209 | } else { 210 | // This blog has only 1 category so semantic_ui_wp_theme_categorized_blog should return false 211 | return false; 212 | } 213 | } 214 | 215 | /** 216 | * Flush out the transients used in semantic_ui_wp_theme_categorized_blog 217 | */ 218 | function semantic_ui_wp_theme_category_transient_flusher() { 219 | // Like, beat it. Dig? 220 | delete_transient( 'all_the_cool_cats' ); 221 | } 222 | add_action( 'edit_category', 'semantic_ui_wp_theme_category_transient_flusher' ); 223 | add_action( 'save_post', 'semantic_ui_wp_theme_category_transient_flusher' ); 224 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The main template file. 4 | * 5 | * This is the most generic template file in a WordPress theme 6 | * and one of the two required files for a theme (the other being style.css). 7 | * It is used to display a page when nothing more specific matches a query. 8 | * E.g., it puts together the home page when no home.php file exists. 9 | * Learn more: http://codex.wordpress.org/Template_Hierarchy 10 | * 11 | * @package semantic-ui-wp-theme 12 | */ 13 | 14 | get_header(); ?> 15 | 16 | <!-- <div class="column"></div> --> 17 | <div id="primary" class="ui eleven wide column"> 18 | <main id="main" class="site-main" role="main"> 19 | 20 | <?php if ( have_posts() ) : ?> 21 | 22 | <?php /* Start the Loop */ ?> 23 | <?php while ( have_posts() ) : the_post(); ?> 24 | 25 | <?php 26 | /* Include the Post-Format-specific template for the content. 27 | * If you want to override this in a child theme, then include a file 28 | * called content-___.php (where ___ is the Post Format name) and that will be used instead. 29 | */ 30 | get_template_part( 'content', get_post_format() ); 31 | ?> 32 | 33 | <?php endwhile; ?> 34 | 35 | <?php semantic_ui_wp_theme_content_nav( 'nav-below' ); ?> 36 | 37 | <?php else : ?> 38 | 39 | <?php get_template_part( 'no-results', 'index' ); ?> 40 | 41 | <?php endif; ?> 42 | 43 | </main><!-- #main --> 44 | </div><!-- #primary --> 45 | 46 | <?php get_sidebar(); ?> 47 | <?php get_footer(); ?> -------------------------------------------------------------------------------- /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/keyboard-image-navigation.js: -------------------------------------------------------------------------------- 1 | jQuery( document ).ready( function( $ ) { 2 | $( document ).keydown( function( e ) { 3 | var url = false; 4 | if ( e.which === 37 ) { // Left arrow key code 5 | url = $( '.nav-previous a' ).attr( 'href' ); 6 | } 7 | else if ( e.which === 39 ) { // Right arrow key code 8 | url = $( '.entry-attachment a' ).attr( 'href' ); 9 | } 10 | if ( url && ( ! $( 'textarea, input' ).is( ':focus' ) ) ) { 11 | window.location = url; 12 | } 13 | } ); 14 | } ); 15 | -------------------------------------------------------------------------------- /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( 'h1' )[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 ) && 'undefined' !== typeof( document.getElementById ) ) { 7 | var eventMethod = ( window.addEventListener ) ? 'addEventListener' : 'attachEvent'; 8 | window[ eventMethod ]( 'hashchange', function() { 9 | var element = document.getElementById( location.hash.substring( 1 ) ); 10 | 11 | if ( element ) { 12 | if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) 13 | element.tabIndex = -1; 14 | 15 | element.focus(); 16 | } 17 | }, false ); 18 | } 19 | })(); 20 | -------------------------------------------------------------------------------- /languages/default.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/languages/default.mo -------------------------------------------------------------------------------- /languages/default.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Automattic 2 | # This file is distributed under the GNU General Public License v2 or later. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: _s 1.3-wpcom\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n" 7 | "POT-Creation-Date: 2013-09-25 22:06:45+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-11-10 13:48+0800\n" 12 | "Last-Translator: \n" 13 | "Language-Team: \n" 14 | "X-Generator: Poedit 1.5.7\n" 15 | 16 | #: 404.php:15 17 | msgid "Oops! That page can’t be found." 18 | msgstr "" 19 | 20 | #: 404.php:19 21 | msgid "" 22 | "It looks like nothing was found at this location. Maybe try one of the links " 23 | "below or a search?" 24 | msgstr "" 25 | 26 | #: 404.php:27 27 | msgid "Most Used Categories" 28 | msgstr "" 29 | 30 | #. translators: %1$s: smiley 31 | #: 404.php:44 32 | msgid "Try looking in the monthly archives. %1$s" 33 | msgstr "" 34 | 35 | #: archive.php:31 36 | msgid "Author: %s" 37 | msgstr "" 38 | 39 | #: archive.php:39 40 | msgid "Day: %s" 41 | msgstr "" 42 | 43 | #: archive.php:42 44 | msgid "Month: %s" 45 | msgstr "" 46 | 47 | #: archive.php:45 48 | msgid "Year: %s" 49 | msgstr "" 50 | 51 | #: archive.php:48 52 | msgid "Asides" 53 | msgstr "" 54 | 55 | #: archive.php:51 56 | msgid "Images" 57 | msgstr "" 58 | 59 | #: archive.php:54 60 | msgid "Videos" 61 | msgstr "" 62 | 63 | #: archive.php:57 64 | msgid "Quotes" 65 | msgstr "" 66 | 67 | #: archive.php:60 68 | msgid "Links" 69 | msgstr "" 70 | 71 | #: archive.php:63 sidebar.php:17 72 | msgid "Archives" 73 | msgstr "" 74 | 75 | #: comments.php:29 76 | msgctxt "comments title" 77 | msgid "One thought on “%2$s”" 78 | msgid_plural "%1$s thoughts on “%2$s”" 79 | msgstr[0] "" 80 | msgstr[1] "" 81 | 82 | #: comments.php:36 comments.php:56 83 | msgid "Comment navigation" 84 | msgstr "" 85 | 86 | #: comments.php:37 comments.php:57 87 | msgid "← Older Comments" 88 | msgstr "" 89 | 90 | #: comments.php:38 comments.php:58 91 | msgid "Newer Comments →" 92 | msgstr "" 93 | 94 | #: comments.php:68 95 | msgid "Comments are closed." 96 | msgstr "" 97 | 98 | #: content-page.php:18 content-single.php:20 content.php:27 image.php:58 99 | msgid "Pages:" 100 | msgstr "" 101 | 102 | #: content-page.php:23 content-single.php:60 content.php:61 image.php:32 103 | #: image.php:64 inc/template-tags.php:71 inc/template-tags.php:90 104 | msgid "Edit" 105 | msgstr "" 106 | 107 | #. translators: used between list items, there is a space after the comma 108 | #: content-single.php:29 content-single.php:32 content.php:38 content.php:48 109 | msgid ", " 110 | msgstr "" 111 | 112 | #: content-single.php:37 113 | msgid "" 114 | "This entry was tagged %2$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 115 | "\">permalink</a>." 116 | msgstr "" 117 | 118 | #: content-single.php:39 119 | msgid "Bookmark the <a href=\"%3$s\" rel=\"bookmark\">permalink</a>." 120 | msgstr "" 121 | 122 | #: content-single.php:45 123 | msgid "" 124 | "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" " 125 | "rel=\"bookmark\">permalink</a>." 126 | msgstr "" 127 | 128 | #: content-single.php:47 129 | msgid "" 130 | "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 131 | "\">permalink</a>." 132 | msgstr "" 133 | 134 | #: content.php:24 135 | msgid "Continue reading <span class=\"meta-nav\">→</span>" 136 | msgstr "" 137 | 138 | #: content.php:42 139 | msgid "Posted in %1$s" 140 | msgstr "" 141 | 142 | #: content.php:52 143 | msgid "Tagged %1$s" 144 | msgstr "" 145 | 146 | #: content.php:58 147 | msgid "Leave a comment" 148 | msgstr "" 149 | 150 | #: content.php:58 151 | msgid "1 Comment" 152 | msgstr "" 153 | 154 | #: content.php:58 155 | msgid "% Comments" 156 | msgstr "" 157 | 158 | #: footer.php:16 159 | msgid "Proudly powered by %s" 160 | msgstr "" 161 | 162 | #: footer.php:18 163 | msgid "Theme: %1$s by %2$s." 164 | msgstr "" 165 | 166 | #: functions.php:48 167 | msgid "Primary Menu" 168 | msgstr "" 169 | 170 | #: functions.php:72 171 | msgid "Sidebar" 172 | msgstr "" 173 | 174 | #: header.php:31 175 | msgid "Menu" 176 | msgstr "" 177 | 178 | #: header.php:32 179 | msgid "Skip to content" 180 | msgstr "" 181 | 182 | #: image.php:22 183 | msgid "" 184 | "Published <span class=\"entry-date\"><time class=\"entry-date\" datetime=" 185 | "\"%1$s\">%2$s</time></span> at <a href=\"%3$s\">%4$s × %5$s</a> in <a " 186 | "href=\"%6$s\" rel=\"gallery\">%7$s</a>" 187 | msgstr "" 188 | 189 | #: image.php:37 190 | msgid "<span class=\"meta-nav\">←</span> Previous" 191 | msgstr "" 192 | 193 | #: image.php:38 194 | msgid "Next <span class=\"meta-nav\">→</span>" 195 | msgstr "" 196 | 197 | #: inc/extras.php:66 198 | msgid "Page %s" 199 | msgstr "" 200 | 201 | #: inc/template-tags.php:34 202 | msgid "Post navigation" 203 | msgstr "" 204 | 205 | #: inc/template-tags.php:38 206 | msgctxt "Previous post link" 207 | msgid "←" 208 | msgstr "" 209 | 210 | #: inc/template-tags.php:39 211 | msgctxt "Next post link" 212 | msgid "→" 213 | msgstr "" 214 | 215 | #: inc/template-tags.php:44 216 | msgid "<span class=\"meta-nav\">←</span> Older posts" 217 | msgstr "" 218 | 219 | #: inc/template-tags.php:48 220 | msgid "Newer posts <span class=\"meta-nav\">→</span>" 221 | msgstr "" 222 | 223 | #: inc/template-tags.php:71 224 | msgid "Pingback:" 225 | msgstr "" 226 | 227 | #: inc/template-tags.php:81 228 | msgid "%s <span class=\"says\">says:</span>" 229 | msgstr "" 230 | 231 | #: inc/template-tags.php:87 232 | msgctxt "1: date, 2: time" 233 | msgid "%1$s at %2$s" 234 | msgstr "" 235 | 236 | #: inc/template-tags.php:94 237 | msgid "Your comment is awaiting moderation." 238 | msgstr "" 239 | 240 | #: inc/template-tags.php:185 241 | msgid "" 242 | "<span class=\"posted-on\">Posted on %1$s</span><span class=\"byline\"> by " 243 | "%2$s</span>" 244 | msgstr "" 245 | 246 | #: no-results.php:13 247 | msgid "Nothing Found" 248 | msgstr "" 249 | 250 | #: no-results.php:19 251 | msgid "" 252 | "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>." 253 | msgstr "" 254 | 255 | #: no-results.php:23 256 | msgid "" 257 | "Sorry, but nothing matched your search terms. Please try again with some " 258 | "different keywords." 259 | msgstr "" 260 | 261 | #: no-results.php:28 262 | msgid "" 263 | "It seems we can’t find what you’re looking for. Perhaps " 264 | "searching can help." 265 | msgstr "" 266 | 267 | #: search.php:16 268 | msgid "Search Results for: %s" 269 | msgstr "" 270 | 271 | #: searchform.php:10 272 | msgctxt "label" 273 | msgid "Search for:" 274 | msgstr "" 275 | 276 | #: searchform.php:11 277 | msgctxt "placeholder" 278 | msgid "Search …" 279 | msgstr "" 280 | 281 | #: searchform.php:13 282 | msgctxt "submit button" 283 | msgid "Search" 284 | msgstr "" 285 | 286 | #: sidebar.php:24 287 | msgid "Meta" 288 | msgstr "" 289 | 290 | #. Theme Name of the plugin/theme 291 | msgid "_s" 292 | msgstr "" 293 | 294 | #. Theme URI of the plugin/theme 295 | msgid "http://underscores.me" 296 | msgstr "" 297 | 298 | #. Description of the plugin/theme 299 | msgid "" 300 | "Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if " 301 | "you like. I'm a theme meant for hacking so don't use me as a <em>Parent " 302 | "Theme</em>. Instead try turning me into the next, most awesome, WordPress " 303 | "theme out there. That's what I'm here for." 304 | msgstr "" 305 | 306 | #. Author of the plugin/theme 307 | msgid "Automattic" 308 | msgstr "" 309 | 310 | #. Author URI of the plugin/theme 311 | msgid "http://automattic.com/" 312 | msgstr "" 313 | -------------------------------------------------------------------------------- /languages/default.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/languages/default.qm -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /languages/semantic-ui-wp-theme.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Automattic 2 | # This file is distributed under the GNU General Public License v2 or later. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: _s 1.3-wpcom\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n" 7 | "POT-Creation-Date: 2013-09-25 22:06:45+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 | "Language-Team: LANGUAGE <LL@li.org>\n" 14 | 15 | #: 404.php:15 16 | msgid "Oops! That page can’t be found." 17 | msgstr "" 18 | 19 | #: 404.php:19 20 | msgid "" 21 | "It looks like nothing was found at this location. Maybe try one of the links " 22 | "below or a search?" 23 | msgstr "" 24 | 25 | #: 404.php:27 26 | msgid "Most Used Categories" 27 | msgstr "" 28 | 29 | #. translators: %1$s: smiley 30 | #: 404.php:44 31 | msgid "Try looking in the monthly archives. %1$s" 32 | msgstr "" 33 | 34 | #: archive.php:31 35 | msgid "Author: %s" 36 | msgstr "" 37 | 38 | #: archive.php:39 39 | msgid "Day: %s" 40 | msgstr "" 41 | 42 | #: archive.php:42 43 | msgid "Month: %s" 44 | msgstr "" 45 | 46 | #: archive.php:45 47 | msgid "Year: %s" 48 | msgstr "" 49 | 50 | #: archive.php:48 51 | msgid "Asides" 52 | msgstr "" 53 | 54 | #: archive.php:51 55 | msgid "Images" 56 | msgstr "" 57 | 58 | #: archive.php:54 59 | msgid "Videos" 60 | msgstr "" 61 | 62 | #: archive.php:57 63 | msgid "Quotes" 64 | msgstr "" 65 | 66 | #: archive.php:60 67 | msgid "Links" 68 | msgstr "" 69 | 70 | #: archive.php:63 sidebar.php:17 71 | msgid "Archives" 72 | msgstr "" 73 | 74 | #: comments.php:29 75 | msgctxt "comments title" 76 | msgid "One thought on “%2$s”" 77 | msgid_plural "%1$s thoughts on “%2$s”" 78 | msgstr[0] "" 79 | msgstr[1] "" 80 | 81 | #: comments.php:36 comments.php:56 82 | msgid "Comment navigation" 83 | msgstr "" 84 | 85 | #: comments.php:37 comments.php:57 86 | msgid "← Older Comments" 87 | msgstr "" 88 | 89 | #: comments.php:38 comments.php:58 90 | msgid "Newer Comments →" 91 | msgstr "" 92 | 93 | #: comments.php:68 94 | msgid "Comments are closed." 95 | msgstr "" 96 | 97 | #: content-page.php:18 content-single.php:20 content.php:27 image.php:58 98 | msgid "Pages:" 99 | msgstr "" 100 | 101 | #: content-page.php:23 content-single.php:60 content.php:61 image.php:32 102 | #: image.php:64 inc/template-tags.php:71 inc/template-tags.php:90 103 | msgid "Edit" 104 | msgstr "" 105 | 106 | #. translators: used between list items, there is a space after the comma 107 | #: content-single.php:29 content-single.php:32 content.php:38 content.php:48 108 | msgid ", " 109 | msgstr "" 110 | 111 | #: content-single.php:37 112 | msgid "" 113 | "This entry was tagged %2$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 114 | "\">permalink</a>." 115 | msgstr "" 116 | 117 | #: content-single.php:39 118 | msgid "Bookmark the <a href=\"%3$s\" rel=\"bookmark\">permalink</a>." 119 | msgstr "" 120 | 121 | #: content-single.php:45 122 | msgid "" 123 | "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" " 124 | "rel=\"bookmark\">permalink</a>." 125 | msgstr "" 126 | 127 | #: content-single.php:47 128 | msgid "" 129 | "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 130 | "\">permalink</a>." 131 | msgstr "" 132 | 133 | #: content.php:24 134 | msgid "Continue reading <span class=\"meta-nav\">→</span>" 135 | msgstr "" 136 | 137 | #: content.php:42 138 | msgid "Posted in %1$s" 139 | msgstr "" 140 | 141 | #: content.php:52 142 | msgid "Tagged %1$s" 143 | msgstr "" 144 | 145 | #: content.php:58 146 | msgid "Leave a comment" 147 | msgstr "" 148 | 149 | #: content.php:58 150 | msgid "1 Comment" 151 | msgstr "" 152 | 153 | #: content.php:58 154 | msgid "% Comments" 155 | msgstr "" 156 | 157 | #: footer.php:16 158 | msgid "Proudly powered by %s" 159 | msgstr "" 160 | 161 | #: footer.php:18 162 | msgid "Theme: %1$s by %2$s." 163 | msgstr "" 164 | 165 | #: functions.php:48 166 | msgid "Primary Menu" 167 | msgstr "" 168 | 169 | #: functions.php:72 170 | msgid "Sidebar" 171 | msgstr "" 172 | 173 | #: header.php:31 174 | msgid "Menu" 175 | msgstr "" 176 | 177 | #: header.php:32 178 | msgid "Skip to content" 179 | msgstr "" 180 | 181 | #: image.php:22 182 | msgid "" 183 | "Published <span class=\"entry-date\"><time class=\"entry-date\" datetime=" 184 | "\"%1$s\">%2$s</time></span> at <a href=\"%3$s\">%4$s × %5$s</a> in <a " 185 | "href=\"%6$s\" rel=\"gallery\">%7$s</a>" 186 | msgstr "" 187 | 188 | #: image.php:37 189 | msgid "<span class=\"meta-nav\">←</span> Previous" 190 | msgstr "" 191 | 192 | #: image.php:38 193 | msgid "Next <span class=\"meta-nav\">→</span>" 194 | msgstr "" 195 | 196 | #: inc/extras.php:66 197 | msgid "Page %s" 198 | msgstr "" 199 | 200 | #: inc/template-tags.php:34 201 | msgid "Post navigation" 202 | msgstr "" 203 | 204 | #: inc/template-tags.php:38 205 | msgctxt "Previous post link" 206 | msgid "←" 207 | msgstr "" 208 | 209 | #: inc/template-tags.php:39 210 | msgctxt "Next post link" 211 | msgid "→" 212 | msgstr "" 213 | 214 | #: inc/template-tags.php:44 215 | msgid "<span class=\"meta-nav\">←</span> Older posts" 216 | msgstr "" 217 | 218 | #: inc/template-tags.php:48 219 | msgid "Newer posts <span class=\"meta-nav\">→</span>" 220 | msgstr "" 221 | 222 | #: inc/template-tags.php:71 223 | msgid "Pingback:" 224 | msgstr "" 225 | 226 | #: inc/template-tags.php:81 227 | msgid "%s <span class=\"says\">says:</span>" 228 | msgstr "" 229 | 230 | #: inc/template-tags.php:87 231 | msgctxt "1: date, 2: time" 232 | msgid "%1$s at %2$s" 233 | msgstr "" 234 | 235 | #: inc/template-tags.php:94 236 | msgid "Your comment is awaiting moderation." 237 | msgstr "" 238 | 239 | #: inc/template-tags.php:185 240 | msgid "" 241 | "<span class=\"posted-on\">Posted on %1$s</span><span class=\"byline\"> by " 242 | "%2$s</span>" 243 | msgstr "" 244 | 245 | #: no-results.php:13 246 | msgid "Nothing Found" 247 | msgstr "" 248 | 249 | #: no-results.php:19 250 | msgid "" 251 | "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>." 252 | msgstr "" 253 | 254 | #: no-results.php:23 255 | msgid "" 256 | "Sorry, but nothing matched your search terms. Please try again with some " 257 | "different keywords." 258 | msgstr "" 259 | 260 | #: no-results.php:28 261 | msgid "" 262 | "It seems we can’t find what you’re looking for. Perhaps " 263 | "searching can help." 264 | msgstr "" 265 | 266 | #: search.php:16 267 | msgid "Search Results for: %s" 268 | msgstr "" 269 | 270 | #: searchform.php:10 271 | msgctxt "label" 272 | msgid "Search for:" 273 | msgstr "" 274 | 275 | #: searchform.php:11 276 | msgctxt "placeholder" 277 | msgid "Search …" 278 | msgstr "" 279 | 280 | #: searchform.php:13 281 | msgctxt "submit button" 282 | msgid "Search" 283 | msgstr "" 284 | 285 | #: sidebar.php:24 286 | msgid "Meta" 287 | msgstr "" 288 | 289 | #. Theme Name of the plugin/theme 290 | msgid "_s" 291 | msgstr "" 292 | 293 | #. Theme URI of the plugin/theme 294 | msgid "http://underscores.me" 295 | msgstr "" 296 | 297 | #. Description of the plugin/theme 298 | msgid "" 299 | "Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if " 300 | "you like. I'm a theme meant for hacking so don't use me as a <em>Parent " 301 | "Theme</em>. Instead try turning me into the next, most awesome, WordPress " 302 | "theme out there. That's what I'm here for." 303 | msgstr "" 304 | 305 | #. Author of the plugin/theme 306 | msgid "Automattic" 307 | msgstr "" 308 | 309 | #. Author URI of the plugin/theme 310 | msgid "http://automattic.com/" 311 | msgstr "" 312 | -------------------------------------------------------------------------------- /languages/zh_CN.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/languages/zh_CN.mo -------------------------------------------------------------------------------- /languages/zh_CN.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Automattic 2 | # This file is distributed under the GNU General Public License v2 or later. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: semantic-ui-wp-theme\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n" 7 | "POT-Creation-Date: 2013-09-25 22:06:45+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-11-10 14:15+0800\n" 12 | "Last-Translator: \n" 13 | "Language-Team: http://www.himysql.com\n" 14 | "X-Generator: Poedit 1.5.7\n" 15 | "Language: Chinese Simplified\n" 16 | "X-Poedit-SourceCharset: UTF-8\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 | #. translators: %1$s: smiley 33 | #: 404.php:44 34 | msgid "Try looking in the monthly archives. %1$s" 35 | msgstr "按月归档里找找。%1$s" 36 | 37 | #: archive.php:31 38 | msgid "Author: %s" 39 | msgstr "作者:%s" 40 | 41 | #: archive.php:39 42 | msgid "Day: %s" 43 | msgstr "日:%s" 44 | 45 | #: archive.php:42 46 | msgid "Month: %s" 47 | msgstr "月:%s" 48 | 49 | #: archive.php:45 50 | msgid "Year: %s" 51 | msgstr "年:%s" 52 | 53 | #: archive.php:48 54 | msgid "Asides" 55 | msgstr "里" 56 | 57 | #: archive.php:51 58 | msgid "Images" 59 | msgstr "图像" 60 | 61 | #: archive.php:54 62 | msgid "Videos" 63 | msgstr "视频" 64 | 65 | #: archive.php:57 66 | msgid "Quotes" 67 | msgstr "引用" 68 | 69 | #: archive.php:60 70 | msgid "Links" 71 | msgstr "链接" 72 | 73 | #: archive.php:63 sidebar.php:17 74 | msgid "Archives" 75 | msgstr "归档" 76 | 77 | #: comments.php:29 78 | msgctxt "comments title" 79 | msgid "One thought on “%2$s”" 80 | msgid_plural "%1$s thoughts on “%2$s”" 81 | msgstr[0] "" 82 | msgstr[1] "" 83 | 84 | #: comments.php:36 comments.php:56 85 | msgid "Comment navigation" 86 | msgstr "注释导航" 87 | 88 | #: comments.php:37 comments.php:57 89 | msgid "← Older Comments" 90 | msgstr "← 更早的评论" 91 | 92 | #: comments.php:38 comments.php:58 93 | msgid "Newer Comments →" 94 | msgstr "更新的评论 →" 95 | 96 | #: comments.php:68 97 | msgid "Comments are closed." 98 | msgstr "博主操蛋地把评论给关了。" 99 | 100 | #: content-page.php:18 content-single.php:20 content.php:27 image.php:58 101 | msgid "Pages:" 102 | msgstr "页面:" 103 | 104 | #: content-page.php:23 content-single.php:60 content.php:61 image.php:32 105 | #: image.php:64 inc/template-tags.php:71 inc/template-tags.php:90 106 | msgid "Edit" 107 | msgstr "编辑" 108 | 109 | #. translators: used between list items, there is a space after the comma 110 | #: content-single.php:29 content-single.php:32 content.php:38 content.php:48 111 | msgid ", " 112 | msgstr "" 113 | 114 | #: content-single.php:37 115 | msgid "" 116 | "This entry was tagged %2$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 117 | "\">permalink</a>." 118 | msgstr "" 119 | 120 | #: content-single.php:39 121 | msgid "Bookmark the <a href=\"%3$s\" rel=\"bookmark\">permalink</a>." 122 | msgstr "" 123 | 124 | #: content-single.php:45 125 | msgid "" 126 | "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" " 127 | "rel=\"bookmark\">permalink</a>." 128 | msgstr "" 129 | 130 | #: content-single.php:47 131 | msgid "" 132 | "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 133 | "\">permalink</a>." 134 | msgstr "" 135 | 136 | #: content.php:24 137 | msgid "Continue reading <span class=\"meta-nav\">→</span>" 138 | msgstr "" 139 | 140 | #: content.php:42 141 | msgid "Posted in %1$s" 142 | msgstr "发表在 %1$s" 143 | 144 | #: content.php:52 145 | msgid "Tagged %1$s" 146 | msgstr "标签 %1$s" 147 | 148 | #: content.php:58 149 | msgid "Leave a comment" 150 | msgstr "留言" 151 | 152 | #: content.php:58 153 | msgid "1 Comment" 154 | msgstr "1条评论" 155 | 156 | #: content.php:58 157 | msgid "% Comments" 158 | msgstr "% 条评论" 159 | 160 | #: footer.php:16 161 | msgid "Proudly powered by %s" 162 | msgstr "愉快地使用了" 163 | 164 | #: footer.php:18 165 | msgid "Theme: %1$s by %2$s." 166 | msgstr "感谢使用 %2$s 制作的皮肤: %1$s " 167 | 168 | #: functions.php:48 169 | msgid "Primary Menu" 170 | msgstr "主菜单" 171 | 172 | #: functions.php:72 173 | msgid "Sidebar" 174 | msgstr "侧边" 175 | 176 | #: header.php:31 177 | msgid "Menu" 178 | msgstr "菜单" 179 | 180 | #: header.php:32 181 | msgid "Skip to content" 182 | msgstr "跳到正文" 183 | 184 | #: image.php:22 185 | msgid "" 186 | "Published <span class=\"entry-date\"><time class=\"entry-date\" datetime=" 187 | "\"%1$s\">%2$s</time></span> at <a href=\"%3$s\">%4$s × %5$s</a> in <a " 188 | "href=\"%6$s\" rel=\"gallery\">%7$s</a>" 189 | msgstr "" 190 | 191 | #: image.php:37 192 | msgid "<span class=\"meta-nav\">←</span> Previous" 193 | msgstr "" 194 | 195 | #: image.php:38 196 | msgid "Next <span class=\"meta-nav\">→</span>" 197 | msgstr "" 198 | 199 | #: inc/extras.php:66 200 | msgid "Page %s" 201 | msgstr "" 202 | 203 | #: inc/template-tags.php:34 204 | msgid "Post navigation" 205 | msgstr "" 206 | 207 | #: inc/template-tags.php:38 208 | msgctxt "Previous post link" 209 | msgid "←" 210 | msgstr "" 211 | 212 | #: inc/template-tags.php:39 213 | msgctxt "Next post link" 214 | msgid "→" 215 | msgstr "" 216 | 217 | #: inc/template-tags.php:44 218 | msgid "<span class=\"meta-nav\">←</span> Older posts" 219 | msgstr "" 220 | 221 | #: inc/template-tags.php:48 222 | msgid "Newer posts <span class=\"meta-nav\">→</span>" 223 | msgstr "" 224 | 225 | #: inc/template-tags.php:71 226 | msgid "Pingback:" 227 | msgstr "" 228 | 229 | #: inc/template-tags.php:81 230 | msgid "%s <span class=\"says\">says:</span>" 231 | msgstr "" 232 | 233 | #: inc/template-tags.php:87 234 | msgctxt "1: date, 2: time" 235 | msgid "%1$s at %2$s" 236 | msgstr "" 237 | 238 | #: inc/template-tags.php:94 239 | msgid "Your comment is awaiting moderation." 240 | msgstr "" 241 | 242 | #: inc/template-tags.php:185 243 | msgid "" 244 | "<span class=\"posted-on\">Posted on %1$s</span><span class=\"byline\"> by " 245 | "%2$s</span>" 246 | msgstr "" 247 | 248 | #: no-results.php:13 249 | msgid "Nothing Found" 250 | msgstr "" 251 | 252 | #: no-results.php:19 253 | msgid "" 254 | "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>." 255 | msgstr "" 256 | 257 | #: no-results.php:23 258 | msgid "" 259 | "Sorry, but nothing matched your search terms. Please try again with some " 260 | "different keywords." 261 | msgstr "" 262 | 263 | #: no-results.php:28 264 | msgid "" 265 | "It seems we can’t find what you’re looking for. Perhaps " 266 | "searching can help." 267 | msgstr "" 268 | 269 | #: search.php:16 270 | msgid "Search Results for: %s" 271 | msgstr "搜索: %s" 272 | 273 | #: searchform.php:10 274 | msgctxt "label" 275 | msgid "Search for:" 276 | msgstr "搜索:" 277 | 278 | #: searchform.php:11 279 | msgctxt "placeholder" 280 | msgid "Search …" 281 | msgstr "搜索 …" 282 | 283 | #: searchform.php:13 284 | msgctxt "submit button" 285 | msgid "Search" 286 | msgstr "搜索" 287 | 288 | #: sidebar.php:24 289 | msgid "Meta" 290 | msgstr "" 291 | 292 | #. Theme Name of the plugin/theme 293 | msgid "_s" 294 | msgstr "" 295 | 296 | #. Theme URI of the plugin/theme 297 | msgid "http://underscores.me" 298 | msgstr "http://weibo.com/leopku" 299 | 300 | #. Description of the plugin/theme 301 | msgid "" 302 | "Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if " 303 | "you like. I'm a theme meant for hacking so don't use me as a <em>Parent " 304 | "Theme</em>. Instead try turning me into the next, most awesome, WordPress " 305 | "theme out there. That's what I'm here for." 306 | msgstr "" 307 | "本皮肤愉快地使用了神奇的<a href=\"http://semantic-ui.com\">Semantic-ui</a>框" 308 | "架。" 309 | 310 | #. Author of the plugin/theme 311 | msgid "Automattic" 312 | msgstr "HiMySQL" 313 | 314 | #. Author URI of the plugin/theme 315 | msgid "http://automattic.com/" 316 | msgstr "http://www.himysql.com" 317 | -------------------------------------------------------------------------------- /languages/zh_CN.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Automattic 2 | # This file is distributed under the GNU General Public License v2 or later. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: _s 1.3-wpcom\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n" 7 | "POT-Creation-Date: 2013-09-25 22:06:45+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 | "Language-Team: LANGUAGE <LL@li.org>\n" 14 | 15 | #: 404.php:15 16 | msgid "Oops! That page can’t be found." 17 | msgstr "" 18 | 19 | #: 404.php:19 20 | msgid "" 21 | "It looks like nothing was found at this location. Maybe try one of the links " 22 | "below or a search?" 23 | msgstr "" 24 | 25 | #: 404.php:27 26 | msgid "Most Used Categories" 27 | msgstr "" 28 | 29 | #. translators: %1$s: smiley 30 | #: 404.php:44 31 | msgid "Try looking in the monthly archives. %1$s" 32 | msgstr "" 33 | 34 | #: archive.php:31 35 | msgid "Author: %s" 36 | msgstr "" 37 | 38 | #: archive.php:39 39 | msgid "Day: %s" 40 | msgstr "" 41 | 42 | #: archive.php:42 43 | msgid "Month: %s" 44 | msgstr "" 45 | 46 | #: archive.php:45 47 | msgid "Year: %s" 48 | msgstr "" 49 | 50 | #: archive.php:48 51 | msgid "Asides" 52 | msgstr "" 53 | 54 | #: archive.php:51 55 | msgid "Images" 56 | msgstr "" 57 | 58 | #: archive.php:54 59 | msgid "Videos" 60 | msgstr "" 61 | 62 | #: archive.php:57 63 | msgid "Quotes" 64 | msgstr "" 65 | 66 | #: archive.php:60 67 | msgid "Links" 68 | msgstr "" 69 | 70 | #: archive.php:63 sidebar.php:17 71 | msgid "Archives" 72 | msgstr "" 73 | 74 | #: comments.php:29 75 | msgctxt "comments title" 76 | msgid "One thought on “%2$s”" 77 | msgid_plural "%1$s thoughts on “%2$s”" 78 | msgstr[0] "" 79 | msgstr[1] "" 80 | 81 | #: comments.php:36 comments.php:56 82 | msgid "Comment navigation" 83 | msgstr "" 84 | 85 | #: comments.php:37 comments.php:57 86 | msgid "← Older Comments" 87 | msgstr "" 88 | 89 | #: comments.php:38 comments.php:58 90 | msgid "Newer Comments →" 91 | msgstr "" 92 | 93 | #: comments.php:68 94 | msgid "Comments are closed." 95 | msgstr "" 96 | 97 | #: content-page.php:18 content-single.php:20 content.php:27 image.php:58 98 | msgid "Pages:" 99 | msgstr "" 100 | 101 | #: content-page.php:23 content-single.php:60 content.php:61 image.php:32 102 | #: image.php:64 inc/template-tags.php:71 inc/template-tags.php:90 103 | msgid "Edit" 104 | msgstr "" 105 | 106 | #. translators: used between list items, there is a space after the comma 107 | #: content-single.php:29 content-single.php:32 content.php:38 content.php:48 108 | msgid ", " 109 | msgstr "" 110 | 111 | #: content-single.php:37 112 | msgid "" 113 | "This entry was tagged %2$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 114 | "\">permalink</a>." 115 | msgstr "" 116 | 117 | #: content-single.php:39 118 | msgid "Bookmark the <a href=\"%3$s\" rel=\"bookmark\">permalink</a>." 119 | msgstr "" 120 | 121 | #: content-single.php:45 122 | msgid "" 123 | "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" " 124 | "rel=\"bookmark\">permalink</a>." 125 | msgstr "" 126 | 127 | #: content-single.php:47 128 | msgid "" 129 | "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark" 130 | "\">permalink</a>." 131 | msgstr "" 132 | 133 | #: content.php:24 134 | msgid "Continue reading <span class=\"meta-nav\">→</span>" 135 | msgstr "" 136 | 137 | #: content.php:42 138 | msgid "Posted in %1$s" 139 | msgstr "" 140 | 141 | #: content.php:52 142 | msgid "Tagged %1$s" 143 | msgstr "" 144 | 145 | #: content.php:58 146 | msgid "Leave a comment" 147 | msgstr "留言" 148 | 149 | #: content.php:58 150 | msgid "1 Comment" 151 | msgstr "" 152 | 153 | #: content.php:58 154 | msgid "% Comments" 155 | msgstr "" 156 | 157 | #: footer.php:16 158 | msgid "Proudly powered by %s" 159 | msgstr "" 160 | 161 | #: footer.php:18 162 | msgid "Theme: %1$s by %2$s." 163 | msgstr "" 164 | 165 | #: functions.php:48 166 | msgid "Primary Menu" 167 | msgstr "" 168 | 169 | #: functions.php:72 170 | msgid "Sidebar" 171 | msgstr "" 172 | 173 | #: header.php:31 174 | msgid "Menu" 175 | msgstr "" 176 | 177 | #: header.php:32 178 | msgid "Skip to content" 179 | msgstr "" 180 | 181 | #: image.php:22 182 | msgid "" 183 | "Published <span class=\"entry-date\"><time class=\"entry-date\" datetime=" 184 | "\"%1$s\">%2$s</time></span> at <a href=\"%3$s\">%4$s × %5$s</a> in <a " 185 | "href=\"%6$s\" rel=\"gallery\">%7$s</a>" 186 | msgstr "" 187 | 188 | #: image.php:37 189 | msgid "<span class=\"meta-nav\">←</span> Previous" 190 | msgstr "" 191 | 192 | #: image.php:38 193 | msgid "Next <span class=\"meta-nav\">→</span>" 194 | msgstr "" 195 | 196 | #: inc/extras.php:66 197 | msgid "Page %s" 198 | msgstr "" 199 | 200 | #: inc/template-tags.php:34 201 | msgid "Post navigation" 202 | msgstr "" 203 | 204 | #: inc/template-tags.php:38 205 | msgctxt "Previous post link" 206 | msgid "←" 207 | msgstr "" 208 | 209 | #: inc/template-tags.php:39 210 | msgctxt "Next post link" 211 | msgid "→" 212 | msgstr "" 213 | 214 | #: inc/template-tags.php:44 215 | msgid "<span class=\"meta-nav\">←</span> Older posts" 216 | msgstr "" 217 | 218 | #: inc/template-tags.php:48 219 | msgid "Newer posts <span class=\"meta-nav\">→</span>" 220 | msgstr "" 221 | 222 | #: inc/template-tags.php:71 223 | msgid "Pingback:" 224 | msgstr "" 225 | 226 | #: inc/template-tags.php:81 227 | msgid "%s <span class=\"says\">says:</span>" 228 | msgstr "" 229 | 230 | #: inc/template-tags.php:87 231 | msgctxt "1: date, 2: time" 232 | msgid "%1$s at %2$s" 233 | msgstr "" 234 | 235 | #: inc/template-tags.php:94 236 | msgid "Your comment is awaiting moderation." 237 | msgstr "" 238 | 239 | #: inc/template-tags.php:185 240 | msgid "" 241 | "<span class=\"posted-on\">Posted on %1$s</span><span class=\"byline\"> by " 242 | "%2$s</span>" 243 | msgstr "" 244 | 245 | #: no-results.php:13 246 | msgid "Nothing Found" 247 | msgstr "" 248 | 249 | #: no-results.php:19 250 | msgid "" 251 | "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>." 252 | msgstr "" 253 | 254 | #: no-results.php:23 255 | msgid "" 256 | "Sorry, but nothing matched your search terms. Please try again with some " 257 | "different keywords." 258 | msgstr "" 259 | 260 | #: no-results.php:28 261 | msgid "" 262 | "It seems we can’t find what you’re looking for. Perhaps " 263 | "searching can help." 264 | msgstr "" 265 | 266 | #: search.php:16 267 | msgid "Search Results for: %s" 268 | msgstr "" 269 | 270 | #: searchform.php:10 271 | msgctxt "label" 272 | msgid "Search for:" 273 | msgstr "" 274 | 275 | #: searchform.php:11 276 | msgctxt "placeholder" 277 | msgid "Search …" 278 | msgstr "" 279 | 280 | #: searchform.php:13 281 | msgctxt "submit button" 282 | msgid "Search" 283 | msgstr "" 284 | 285 | #: sidebar.php:24 286 | msgid "Meta" 287 | msgstr "" 288 | 289 | #. Theme Name of the plugin/theme 290 | msgid "_s" 291 | msgstr "" 292 | 293 | #. Theme URI of the plugin/theme 294 | msgid "http://underscores.me" 295 | msgstr "" 296 | 297 | #. Description of the plugin/theme 298 | msgid "" 299 | "Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if " 300 | "you like. I'm a theme meant for hacking so don't use me as a <em>Parent " 301 | "Theme</em>. Instead try turning me into the next, most awesome, WordPress " 302 | "theme out there. That's what I'm here for." 303 | msgstr "" 304 | 305 | #. Author of the plugin/theme 306 | msgid "Automattic" 307 | msgstr "" 308 | 309 | #. Author URI of the plugin/theme 310 | msgid "http://automattic.com/" 311 | msgstr "" 312 | -------------------------------------------------------------------------------- /layouts/content-sidebar.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: semantic-ui-wp-theme 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: semantic-ui-wp-theme 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 | } -------------------------------------------------------------------------------- /no-results.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template part for displaying a message that posts cannot be found. 4 | * 5 | * Learn more: http://codex.wordpress.org/Template_Hierarchy 6 | * 7 | * @package semantic-ui-wp-theme 8 | */ 9 | ?> 10 | 11 | <section class="no-results not-found"> 12 | <header class="page-header"> 13 | <h1 class="page-title"><?php _e( 'Nothing Found', 'semantic-ui-wp-theme' ); ?></h1> 14 | </header><!-- .page-header --> 15 | 16 | <div class="page-content"> 17 | <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 18 | 19 | <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'semantic-ui-wp-theme' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p> 20 | 21 | <?php elseif ( is_search() ) : ?> 22 | 23 | <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'semantic-ui-wp-theme' ); ?></p> 24 | <?php get_search_form(); ?> 25 | 26 | <?php else : ?> 27 | 28 | <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'semantic-ui-wp-theme' ); ?></p> 29 | <?php get_search_form(); ?> 30 | 31 | <?php endif; ?> 32 | </div><!-- .page-content --> 33 | </section><!-- .no-results --> 34 | -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying all pages. 4 | * 5 | * This is the template that displays all pages by default. 6 | * Please note that this is the WordPress construct of pages 7 | * and that other 'pages' on your WordPress site will use a 8 | * different template. 9 | * 10 | * @package semantic-ui-wp-theme 11 | */ 12 | 13 | get_header(); ?> 14 | 15 | <div id="primary" class="ui twelve column"> 16 | <main id="main" class="site-main" role="main"> 17 | 18 | <?php while ( have_posts() ) : the_post(); ?> 19 | 20 | <?php get_template_part( 'content', 'page' ); ?> 21 | 22 | <?php 23 | // If comments are open or we have at least one comment, load up the comment template 24 | if ( comments_open() || '0' != get_comments_number() ) 25 | comments_template(); 26 | ?> 27 | 28 | <?php endwhile; // end of the loop. ?> 29 | 30 | </main><!-- #main --> 31 | </div><!-- #primary --> 32 | 33 | <?php get_sidebar(); ?> 34 | <?php get_footer(); ?> 35 | -------------------------------------------------------------------------------- /rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: semantic-ui-wp-theme 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_Support 9 | 10 | */ 11 | 12 | /* 13 | body { 14 | direction: rtl; 15 | unicode-bidi: embed; 16 | } 17 | */ -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leopku/semantic-ui-wp-theme/82fd48bb9351ffcf2b1af6588150b82900b6fd4f/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying Search Results pages. 4 | * 5 | * @package semantic-ui-wp-theme 6 | */ 7 | 8 | get_header(); ?> 9 | 10 | <section id="primary" class="content-area"> 11 | <main id="main" class="site-main" role="main"> 12 | 13 | <?php if ( have_posts() ) : ?> 14 | 15 | <header class="page-header"> 16 | <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'semantic-ui-wp-theme' ), '<span>' . get_search_query() . '</span>' ); ?></h1> 17 | </header><!-- .page-header --> 18 | 19 | <?php /* Start the Loop */ ?> 20 | <?php while ( have_posts() ) : the_post(); ?> 21 | 22 | <?php get_template_part( 'content', 'search' ); ?> 23 | 24 | <?php endwhile; ?> 25 | 26 | <?php semantic_ui_wp_theme_content_nav( 'nav-below' ); ?> 27 | 28 | <?php else : ?> 29 | 30 | <?php get_template_part( 'no-results', 'search' ); ?> 31 | 32 | <?php endif; ?> 33 | 34 | </main><!-- #main --> 35 | </section><!-- #primary --> 36 | 37 | <?php get_sidebar(); ?> 38 | <?php get_footer(); ?> -------------------------------------------------------------------------------- /searchform.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The template for displaying search forms in semantic-ui-wp-theme 4 | * 5 | * @package semantic-ui-wp-theme 6 | */ 7 | ?> 8 | <form role="search" method="get" class="ui form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 9 | <div class="ui mini action input"> 10 | <input type="text" placeholder="<?php echo __('Search') . '...' ?>"> 11 | <div class="ui button"><?php echo __('Search') ?></div> 12 | </div> 13 | </form> 14 | -------------------------------------------------------------------------------- /sidebar.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The Sidebar containing the main widget areas. 4 | * 5 | * @package semantic-ui-wp-theme 6 | */ 7 | ?> 8 | <div id="secondary" class="ui five wide column computer only" role="complementary"> 9 | <?php do_action( 'before_sidebar' ); ?> 10 | <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?> 11 | 12 | <aside id="search" class="widget widget_search"> 13 | <?php get_search_form(); ?> 14 | </aside> 15 | 16 | <div class="ui segment"> 17 | <aside id="archives" class="widget"> 18 | <h1 class="widget-title"><?php _e( 'Archives', 'semantic-ui-wp-theme' ); ?></h1> 19 | <ul aria> 20 | <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> 21 | </ul> 22 | </aside> 23 | 24 | <aside id="meta" class="widget"> 25 | <h1 class="widget-title"><?php _e( 'Meta', 'semantic-ui-wp-theme' ); ?></h1> 26 | <!-- <ul> --> 27 | <div class="item"><i class="right triangle icon"></i><?php wp_register(); ?></div> 28 | <li><?php wp_loginout(); ?></li> 29 | <?php wp_meta(); ?> 30 | <!-- </ul> --> 31 | </aside> 32 | </div> 33 | 34 | <?php endif; // end sidebar widget area ?> 35 | </div><!-- #secondary --> 36 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /** 3 | * The Template for displaying all single posts. 4 | * 5 | * @package semantic-ui-wp-theme 6 | */ 7 | 8 | get_header(); ?> 9 | 10 | <div id="primary" class="ui eleven wide column"> 11 | <main id="main" class="site-main" role="main"> 12 | 13 | <?php while ( have_posts() ) : the_post(); ?> 14 | 15 | <?php get_template_part( 'content', 'single' ); ?> 16 | 17 | <?php semantic_ui_wp_theme_content_nav( 'nav-below' ); ?> 18 | 19 | <?php 20 | // If comments are open or we have at least one comment, load up the comment template 21 | if ( comments_open() || '0' != get_comments_number() ) 22 | comments_template(); 23 | ?> 24 | 25 | <?php endwhile; // end of the loop. ?> 26 | 27 | </main><!-- #main --> 28 | </div><!-- #primary --> 29 | 30 | <?php get_sidebar(); ?> 31 | <?php get_footer(); ?> -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: semantic-ui-wp-theme 3 | Theme URI: http://www.himysql.com/ 4 | Author: leopku 5 | Author URI: https://github.com/leopku 6 | Description: 简洁大方自适应的网页设计。基于 <a href="http://www.semantic-ui.com">Semantic UI</a> 框架开发 7 | Version: 1.0.1 8 | License: GNU General Public License 9 | License URI: license.txt 10 | Text Domain: semantic-ui-wp-theme 11 | Domain Path: /languages/ 12 | Tags: 13 | 14 | This theme, like WordPress, is licensed under the GPL. 15 | Use it to make something cool, have fun, and share what you've learned with others. 16 | 17 | semantic-ui-wp-theme is based on Underscores http://underscores.me/ and Semantic-UI http://semantic-ui.com. 18 | 19 | */ 20 | 21 | /*@import url(http://fonts.googleapis.com/css?family=Ubuntu);*/ 22 | @font-face { 23 | font-family: 'Ubuntu'; 24 | src: url('assets/Ubuntu-R.ttf'); 25 | } 26 | 27 | body { 28 | /* font-family: "Ubuntu",Tahoma,"Helvetica Neue",Helvetica,Arial,sans-serif; */ 29 | font-family: "Ubuntu","Hiragino Sans GB","Hiragino Sans GB W3", "Microsoft Yahei"; 30 | /*font-family: "Ubuntu","Hiragino Sans GB","Hiragino Sans GB W3";*/ 31 | /*font-family: "Open Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif !important;*/ 32 | /*font-family: Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;*/ 33 | font-size: 13px !important; 34 | -webkit-font-smoothing:antialiased; 35 | } 36 | 37 | a { 38 | /*color: #dd4814;*/ 39 | /*color: #FF851B;*/ 40 | color: #F05940; 41 | text-decoration: none; 42 | } 43 | 44 | a:hover { 45 | /*color: #97310e;*/ 46 | /*color: #85144B;*/ 47 | color: #FF851B; 48 | } 49 | 50 | #main.site-main > .ui.segment, 51 | .post > .ui.segment { 52 | padding-bottom: 32px !important; 53 | } 54 | 55 | #colophon > .ui.grid > .ui.row > .ui.column { 56 | font-size: 0.5rem !important; 57 | } 58 | 59 | .ui.tiny.labels .label, 60 | .ui.tiny.label { 61 | font-size: 0.6875rem; 62 | padding: 0.2em 0.4em; 63 | } 64 | 65 | .ui.orange.header { 66 | color: #F05940 !important; 67 | } 68 | 69 | .ui.orange.dividing.header { 70 | border-bottom: 3px solid #F05940; 71 | } 72 | 73 | i.orange.icon { 74 | color: #F05940 !important; 75 | } 76 | 77 | i.inverted.orange.icon { 78 | background-color: #F05940 !important; 79 | color: #FFFFFF !important; 80 | } 81 | /* 82 | .attached .label { 83 | font-size: 0.1rem !important; 84 | } 85 | 86 | .attached.label .label { 87 | height: 27px; 88 | } 89 | 90 | .ui.orange.labels .label, 91 | .ui.orange.label { 92 | background-color: #F05940 !!important; 93 | border-color: #F05940 !important; 94 | color: #FFFFFF !important; 95 | } 96 | .ui.labels .teal.label:before, 97 | .ui.teal.labels .label:before, 98 | .ui.teal.label:before { 99 | background-color: #00B5AD !important; 100 | } 101 | */ 102 | /* Hover */ 103 | /*a.ui.teal.labels .label:hover, 104 | .ui.teal.labels a.label:hover, 105 | a.ui.teal.label:hover { 106 | background-color: #009A93 !important; 107 | border-color: #009A93 !important; 108 | color: #FFFFFF !important; 109 | } 110 | .ui.labels a.teal.label:hover:before, 111 | .ui.teal.labels a.label:hover:before, 112 | a.ui.teal.label:hover:before { 113 | background-color: #009A93 !important; 114 | }*/ 115 | /* Corner */ 116 | /*.ui.teal.corner.label, 117 | .ui.teal.corner.label:hover { 118 | background-color: transparent !important; 119 | }*/ 120 | 121 | code, 122 | pre { 123 | padding: 0 3px 2px; 124 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 125 | font-size: 12px; 126 | color: #333333; 127 | -webkit-border-radius: 3px; 128 | -moz-border-radius: 3px; 129 | border-radius: 3px; 130 | } 131 | 132 | code { 133 | padding: 2px 4px; 134 | color: #d14; 135 | white-space: nowrap; 136 | background-color: #f7f7f9; 137 | border: 1px solid #e1e1e8; 138 | } 139 | 140 | pre { 141 | display: block; 142 | padding: 9.5px; 143 | margin: 0 0 10px; 144 | font-size: 13px; 145 | line-height: 20px; 146 | word-break: break-all; 147 | word-wrap: break-word; 148 | white-space: pre; 149 | white-space: pre-wrap; 150 | background-color: #f5f5f5; 151 | border: 1px solid #ccc; 152 | border: 1px solid rgba(0, 0, 0, 0.15); 153 | -webkit-border-radius: 4px; 154 | -moz-border-radius: 4px; 155 | border-radius: 4px; 156 | } 157 | 158 | pre.prettyprint { 159 | margin-bottom: 20px; 160 | } 161 | 162 | pre code { 163 | padding: 0; 164 | color: inherit; 165 | white-space: pre; 166 | white-space: pre-wrap; 167 | background-color: transparent; 168 | border: 0; 169 | } 170 | 171 | table { 172 | display: table; 173 | max-width: 100%; 174 | background-color: transparent; 175 | border-collapse: collapse; 176 | border-spacing: 0; 177 | } 178 | 179 | #secondary .ui.list ul { 180 | padding-left: 0; 181 | list-style: none; 182 | } -------------------------------------------------------------------------------- /style_origin.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: semantic-ui-wp-theme 3 | Theme URI: http://underscores.me/ 4 | Author: Underscores.me 5 | Author URI: http://underscores.me/ 6 | Description: Description 7 | Version: 1.0 8 | License: GNU General Public License 9 | License URI: license.txt 10 | Text Domain: semantic-ui-wp-theme 11 | Domain Path: /languages/ 12 | Tags: 13 | 14 | This theme, like WordPress, is licensed under the GPL. 15 | Use it to make something cool, have fun, and share what you've learned with others. 16 | 17 | semantic-ui-wp-theme is based on Underscores http://underscores.me/, (C) 2012-2013 Automattic, Inc. 18 | 19 | Resetting and rebuilding styles have been helped along thanks to the fine work of 20 | Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html 21 | along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/ 22 | and Blueprint http://www.blueprintcss.org/ 23 | */ 24 | 25 | 26 | /* =Reset 27 | -------------------------------------------------------------- */ 28 | 29 | html, body, div, span, applet, object, iframe, 30 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 31 | a, abbr, acronym, address, big, cite, code, 32 | del, dfn, em, font, ins, kbd, q, s, samp, 33 | small, strike, strong, sub, sup, tt, var, 34 | dl, dt, dd, ol, ul, li, 35 | fieldset, form, label, legend, 36 | table, caption, tbody, tfoot, thead, tr, th, td { 37 | border: 0; 38 | font-family: inherit; 39 | font-size: 100%; 40 | font-style: inherit; 41 | font-weight: inherit; 42 | margin: 0; 43 | outline: 0; 44 | padding: 0; 45 | vertical-align: baseline; 46 | } 47 | html { 48 | 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 */ 49 | overflow-y: scroll; /* Keeps page centred in all browsers regardless of content height */ 50 | -webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */ 51 | -ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */ 52 | } 53 | body { 54 | background: #fff; 55 | } 56 | article, 57 | aside, 58 | details, 59 | figcaption, 60 | figure, 61 | footer, 62 | header, 63 | main, 64 | nav, 65 | section { 66 | display: block; 67 | } 68 | ol, ul { 69 | list-style: none; 70 | } 71 | table { /* tables still need 'cellspacing="0"' in the markup */ 72 | border-collapse: separate; 73 | border-spacing: 0; 74 | } 75 | caption, th, td { 76 | font-weight: normal; 77 | text-align: left; 78 | } 79 | blockquote:before, blockquote:after, 80 | q:before, q:after { 81 | content: ""; 82 | } 83 | blockquote, q { 84 | quotes: "" ""; 85 | } 86 | a:focus { 87 | outline: thin dotted; 88 | } 89 | a:hover, 90 | a:active { /* Improves readability when focused and also mouse hovered in all browsers people.opera.com/patrickl/experiments/keyboard/test */ 91 | outline: 0; 92 | } 93 | a img { 94 | border: 0; 95 | } 96 | 97 | 98 | /* =Global 99 | ----------------------------------------------- */ 100 | 101 | body, 102 | button, 103 | input, 104 | select, 105 | textarea { 106 | color: #404040; 107 | font-family: sans-serif; 108 | font-size: 16px; 109 | font-size: 1.6rem; 110 | line-height: 1.5; 111 | } 112 | 113 | /* Headings */ 114 | h1, h2, h3, h4, h5, h6 { 115 | clear: both; 116 | } 117 | hr { 118 | background-color: #ccc; 119 | border: 0; 120 | height: 1px; 121 | margin-bottom: 1.5em; 122 | } 123 | 124 | /* Text elements */ 125 | p { 126 | margin-bottom: 1.5em; 127 | } 128 | ul, ol { 129 | margin: 0 0 1.5em 3em; 130 | } 131 | ul { 132 | list-style: disc; 133 | } 134 | ol { 135 | list-style: decimal; 136 | } 137 | li > ul, 138 | li > ol { 139 | margin-bottom: 0; 140 | margin-left: 1.5em; 141 | } 142 | dt { 143 | font-weight: bold; 144 | } 145 | dd { 146 | margin: 0 1.5em 1.5em; 147 | } 148 | b, strong { 149 | font-weight: bold; 150 | } 151 | dfn, cite, em, i { 152 | font-style: italic; 153 | } 154 | blockquote { 155 | margin: 0 1.5em; 156 | } 157 | address { 158 | margin: 0 0 1.5em; 159 | } 160 | pre { 161 | background: #eee; 162 | font-family: "Courier 10 Pitch", Courier, monospace; 163 | font-size: 15px; 164 | font-size: 1.5rem; 165 | line-height: 1.6; 166 | margin-bottom: 1.6em; 167 | max-width: 100%; 168 | overflow: auto; 169 | padding: 1.6em; 170 | } 171 | code, kbd, tt, var { 172 | font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; 173 | } 174 | abbr, acronym { 175 | border-bottom: 1px dotted #666; 176 | cursor: help; 177 | } 178 | mark, ins { 179 | background: #fff9c0; 180 | text-decoration: none; 181 | } 182 | sup, 183 | sub { 184 | font-size: 75%; 185 | height: 0; 186 | line-height: 0; 187 | position: relative; 188 | vertical-align: baseline; 189 | } 190 | sup { 191 | bottom: 1ex; 192 | } 193 | sub { 194 | top: .5ex; 195 | } 196 | small { 197 | font-size: 75%; 198 | } 199 | big { 200 | font-size: 125%; 201 | } 202 | figure { 203 | margin: 0; 204 | } 205 | table { 206 | margin: 0 0 1.5em; 207 | width: 100%; 208 | } 209 | th { 210 | font-weight: bold; 211 | } 212 | img { 213 | height: auto; /* Make sure images are scaled correctly. */ 214 | max-width: 100%; /* Adhere to container width. */ 215 | } 216 | button, 217 | input, 218 | select, 219 | textarea { 220 | font-size: 100%; /* Corrects font size not being inherited in all browsers */ 221 | margin: 0; /* Addresses margins set differently in IE6/7, F3/4, S5, Chrome */ 222 | vertical-align: baseline; /* Improves appearance and consistency in all browsers */ 223 | *vertical-align: middle; /* Improves appearance and consistency in all browsers */ 224 | } 225 | button, 226 | input { 227 | line-height: normal; /* Addresses FF3/4 setting line-height using !important in the UA stylesheet */ 228 | } 229 | button, 230 | html input[type="button"], 231 | input[type="reset"], 232 | input[type="submit"] { 233 | border: 1px solid #ccc; 234 | border-color: #ccc #ccc #bbb #ccc; 235 | border-radius: 3px; 236 | background: #e6e6e6; 237 | 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); 238 | color: rgba(0, 0, 0, .8); 239 | cursor: pointer; /* Improves usability and consistency of cursor style between image-type 'input' and others */ 240 | -webkit-appearance: button; /* Corrects inability to style clickable 'input' types in iOS */ 241 | font-size: 12px; 242 | font-size: 1.2rem; 243 | line-height: 1; 244 | padding: .6em 1em .4em; 245 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); 246 | } 247 | button:hover, 248 | html input[type="button"]:hover, 249 | input[type="reset"]:hover, 250 | input[type="submit"]:hover { 251 | border-color: #ccc #bbb #aaa #bbb; 252 | 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); 253 | } 254 | button:focus, 255 | html input[type="button"]:focus, 256 | input[type="reset"]:focus, 257 | input[type="submit"]:focus, 258 | button:active, 259 | html input[type="button"]:active, 260 | input[type="reset"]:active, 261 | input[type="submit"]:active { 262 | border-color: #aaa #bbb #bbb #bbb; 263 | box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15); 264 | } 265 | input[type="checkbox"], 266 | input[type="radio"] { 267 | box-sizing: border-box; /* Addresses box sizing set to content-box in IE8/9 */ 268 | padding: 0; /* Addresses excess padding in IE8/9 */ 269 | } 270 | input[type="search"] { 271 | -webkit-appearance: textfield; /* Addresses appearance set to searchfield in S5, Chrome */ 272 | -webkit-box-sizing: content-box; /* Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof) */ 273 | -moz-box-sizing: content-box; 274 | box-sizing: content-box; 275 | } 276 | input[type="search"]::-webkit-search-decoration { /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ 277 | -webkit-appearance: none; 278 | } 279 | button::-moz-focus-inner, 280 | 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/ */ 281 | border: 0; 282 | padding: 0; 283 | } 284 | input[type="text"], 285 | input[type="email"], 286 | input[type="url"], 287 | input[type="password"], 288 | input[type="search"], 289 | textarea { 290 | color: #666; 291 | border: 1px solid #ccc; 292 | border-radius: 3px; 293 | } 294 | input[type="text"]:focus, 295 | input[type="email"]:focus, 296 | input[type="url"]:focus, 297 | input[type="password"]:focus, 298 | input[type="search"]:focus, 299 | textarea:focus { 300 | color: #111; 301 | } 302 | input[type="text"], 303 | input[type="email"], 304 | input[type="url"], 305 | input[type="password"], 306 | input[type="search"] { 307 | padding: 3px; 308 | } 309 | textarea { 310 | overflow: auto; /* Removes default vertical scrollbar in IE6/7/8/9 */ 311 | padding-left: 3px; 312 | vertical-align: top; /* Improves readability and alignment in all browsers */ 313 | width: 98%; 314 | } 315 | 316 | /* Links */ 317 | a { 318 | color: royalblue; 319 | } 320 | a:visited { 321 | color: purple; 322 | } 323 | a:hover, 324 | a:focus, 325 | a:active { 326 | color: midnightblue; 327 | } 328 | 329 | /* Alignment */ 330 | .alignleft { 331 | display: inline; 332 | float: left; 333 | margin-right: 1.5em; 334 | } 335 | .alignright { 336 | display: inline; 337 | float: right; 338 | margin-left: 1.5em; 339 | } 340 | .aligncenter { 341 | clear: both; 342 | display: block; 343 | margin: 0 auto; 344 | } 345 | 346 | /* Text meant only for screen readers */ 347 | .screen-reader-text { 348 | clip: rect(1px, 1px, 1px, 1px); 349 | position: absolute !important; 350 | } 351 | 352 | .screen-reader-text:hover, 353 | .screen-reader-text:active, 354 | .screen-reader-text:focus { 355 | background-color: #f1f1f1; 356 | border-radius: 3px; 357 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 358 | clip: auto !important; 359 | color: #21759b; 360 | display: block; 361 | font-size: 14px; 362 | font-weight: bold; 363 | height: auto; 364 | left: 5px; 365 | line-height: normal; 366 | padding: 15px 23px 14px; 367 | text-decoration: none; 368 | top: 5px; 369 | width: auto; 370 | z-index: 100000; /* Above WP toolbar */ 371 | } 372 | 373 | /* Clearing */ 374 | .clear:before, 375 | .clear:after, 376 | .entry-content:before, 377 | .entry-content:after, 378 | .comment-content:before, 379 | .comment-content:after, 380 | .site-header:before, 381 | .site-header:after, 382 | .site-content:before, 383 | .site-content:after, 384 | .site-footer:before, 385 | .site-footer:after { 386 | content: ''; 387 | display: table; 388 | } 389 | 390 | .clear:after, 391 | .entry-content:after, 392 | .comment-content:after, 393 | .site-header:after, 394 | .site-content:after, 395 | .site-footer:after { 396 | clear: both; 397 | } 398 | 399 | 400 | /* =Menu 401 | ----------------------------------------------- */ 402 | 403 | .main-navigation { 404 | clear: both; 405 | display: block; 406 | float: left; 407 | width: 100%; 408 | } 409 | .main-navigation ul { 410 | list-style: none; 411 | margin: 0; 412 | padding-left: 0; 413 | } 414 | .main-navigation li { 415 | float: left; 416 | position: relative; 417 | } 418 | .main-navigation a { 419 | display: block; 420 | text-decoration: none; 421 | } 422 | .main-navigation ul ul { 423 | box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); 424 | display: none; 425 | float: left; 426 | left: 0; 427 | position: absolute; 428 | top: 1.5em; 429 | z-index: 99999; 430 | } 431 | .main-navigation ul ul ul { 432 | left: 100%; 433 | top: 0; 434 | } 435 | .main-navigation ul ul a { 436 | width: 200px; 437 | } 438 | .main-navigation ul ul li { 439 | } 440 | .main-navigation li:hover > a { 441 | } 442 | .main-navigation ul ul :hover > a { 443 | } 444 | .main-navigation ul ul a:hover { 445 | } 446 | .main-navigation ul li:hover > ul { 447 | display: block; 448 | } 449 | .main-navigation li.current_page_item a, 450 | .main-navigation li.current-menu-item a { 451 | } 452 | 453 | /* Small menu */ 454 | .menu-toggle { 455 | cursor: pointer; 456 | display: none; 457 | } 458 | 459 | @media screen and (max-width: 600px) { 460 | .menu-toggle, 461 | .main-navigation.toggled .nav-menu { 462 | display: block; 463 | } 464 | 465 | .main-navigation ul { 466 | display: none; 467 | } 468 | } 469 | 470 | 471 | /* =Content 472 | ----------------------------------------------- */ 473 | 474 | .sticky { 475 | } 476 | .hentry { 477 | margin: 0 0 1.5em; 478 | } 479 | .byline, 480 | .updated { 481 | display: none; 482 | } 483 | .single .byline, 484 | .group-blog .byline { 485 | display: inline; 486 | } 487 | .page-content, 488 | .entry-content, 489 | .entry-summary { 490 | margin: 1.5em 0 0; 491 | } 492 | .page-links { 493 | clear: both; 494 | margin: 0 0 1.5em; 495 | } 496 | 497 | 498 | /* =Asides 499 | ----------------------------------------------- */ 500 | 501 | .blog .format-aside .entry-title, 502 | .archive .format-aside .entry-title { 503 | display: none; 504 | } 505 | 506 | 507 | /* =Media 508 | ----------------------------------------------- */ 509 | 510 | .page-content img.wp-smiley, 511 | .entry-content img.wp-smiley, 512 | .comment-content img.wp-smiley { 513 | border: none; 514 | margin-bottom: 0; 515 | margin-top: 0; 516 | padding: 0; 517 | } 518 | .wp-caption { 519 | border: 1px solid #ccc; 520 | margin-bottom: 1.5em; 521 | max-width: 100%; 522 | } 523 | .wp-caption img[class*="wp-image-"] { 524 | display: block; 525 | margin: 1.2% auto 0; 526 | max-width: 98%; 527 | } 528 | .wp-caption-text { 529 | text-align: center; 530 | } 531 | .wp-caption .wp-caption-text { 532 | margin: 0.8075em 0; 533 | } 534 | .site-main .gallery { 535 | margin-bottom: 1.5em; 536 | } 537 | .gallery-caption { 538 | } 539 | .site-main .gallery a img { 540 | border: none; 541 | height: auto; 542 | max-width: 90%; 543 | } 544 | .site-main .gallery dd { 545 | margin: 0; 546 | } 547 | .site-main .gallery-columns-4 .gallery-item { 548 | } 549 | .site-main .gallery-columns-4 .gallery-item img { 550 | } 551 | 552 | /* Make sure embeds and iframes fit their containers */ 553 | embed, 554 | iframe, 555 | object { 556 | max-width: 100%; 557 | } 558 | 559 | 560 | /* =Navigation 561 | ----------------------------------------------- */ 562 | 563 | .site-main [class*="navigation"] { 564 | margin: 0 0 1.5em; 565 | overflow: hidden; 566 | } 567 | [class*="navigation"] .nav-previous { 568 | float: left; 569 | width: 50%; 570 | } 571 | [class*="navigation"] .nav-next { 572 | float: right; 573 | text-align: right; 574 | width: 50%; 575 | } 576 | 577 | 578 | /* =Comments 579 | ----------------------------------------------- */ 580 | 581 | .comment-content a { 582 | word-wrap: break-word; 583 | } 584 | .bypostauthor { 585 | } 586 | 587 | 588 | /* =Widgets 589 | ----------------------------------------------- */ 590 | 591 | .widget { 592 | margin: 0 0 1.5em; 593 | } 594 | 595 | /* Make sure select elements fit in widgets */ 596 | .widget select { 597 | max-width: 100%; 598 | } 599 | 600 | /* Search widget */ 601 | .widget_search .search-submit { 602 | display: none; 603 | } 604 | 605 | 606 | /* =Infinite Scroll 607 | ----------------------------------------------- */ 608 | 609 | /* Globally hidden elements when Infinite Scroll is supported and in use. */ 610 | .infinite-scroll .paging-navigation, /* Older / Newer Posts Navigation (always hidden) */ 611 | .infinite-scroll.neverending .site-footer { /* Theme Footer (when set to scrolling) */ 612 | display: none; 613 | } 614 | 615 | /* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before */ 616 | .infinity-end.neverending .site-footer { 617 | display: block; 618 | } 619 | -------------------------------------------------------------------------------- /underscores.md: -------------------------------------------------------------------------------- 1 | _s 2 | === 3 | 4 | Hi. I'm a starter theme called `_s`, 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. 5 | 6 | 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: 7 | 8 | * A just right amount of lean, well-commented, modern, HTML5 templates. 9 | * A helpful 404 template. 10 | * 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 the comments of `inc/custom-header.php` to your `header.php` template. 11 | * Custom template tags in `inc/template-tags.php` that keep your templates clean and neat and prevent code duplication. 12 | * Some small tweaks in `inc/extras.php` that can improve your theming experience. 13 | * Keyboard navigation for image attachment templates. The script can be found in `js/keyboard-image-navigation.js`. It's enqueued in `functions.php`. 14 | * 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`. 15 | * 2 sample CSS layouts in `layouts` for a sidebar on either side of your content. 16 | * Smartly organized starter CSS in `style.css` that will help you to quickly get your design off the ground. 17 | * Licensed under GPLv2 or later. :) Use it to make something cool. 18 | 19 | Getting Started 20 | --------------- 21 | 22 | If you want to keep it simple, head over to http://underscores.me and generate your `_s` based theme from there. You just input the name of the theme you want to create, click the "Generate" button, and you get your ready-to-awesomize starter theme. 23 | 24 | If you want to set things up manually, download `_s` from github. The first thing you want to do is copy the `_s` directory and change the name to something else - Like, say, `megatherium` - 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'` (inside single quotations) to capture the text domain. 27 | 2. Search for `_s_` to capture all the function names. 28 | 3. Search for <code> _s</code> (with a space before it) to capture DocBlocks. 29 | 4. Search for `_s-` to capture prefixed handles. 30 | 5. Search for `Text Domain: _s` in style.css. 31 | 32 | OR 33 | 34 | * Search for: `'_s'` and replace with: `'megatherium'` 35 | * Search for: `_s_` and replace with: `megatherium_` 36 | * Search for: <code> _s</code> and replace with: <code> Megatherium</code> 37 | * Search for: `_s-` and replace with: `megatherium-` 38 | * Search for: `Text Domain: _s` and replace with: `Text Domain: megatherium` in style.css. 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 | -------------------------------------------------------------------------------- /yarpp-template-example.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: Simple 4 | Author: mitcho (Michael Yoshitaka Erlewine) 5 | Description: A simple example YARPP template. 6 | */ 7 | ?><h3>Related Posts</h3> 8 | <?php if (have_posts()):?> 9 | <ol> 10 | <?php while (have_posts()) : the_post(); ?> 11 | <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><!-- (<?php the_score(); ?>)--></li> 12 | <?php endwhile; ?> 13 | </ol> 14 | <?php else: ?> 15 | <p>No related posts.</p> 16 | <?php endif; ?> 17 | -------------------------------------------------------------------------------- /yarpp-template-list.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: List 4 | Description: This template returns the related posts as a comma-separated list. 5 | Author: mitcho (Michael Yoshitaka Erlewine) 6 | */ 7 | ?><h3>Related Posts</h3> 8 | 9 | <?php if (have_posts()): 10 | $postsArray = array(); 11 | while (have_posts()) : the_post(); 12 | $postsArray[] = '<a href="'.get_permalink().'" rel="bookmark">'.get_the_title().'</a><!-- ('.get_the_score().')-->'; 13 | endwhile; 14 | 15 | echo implode(', '."\n",$postsArray); // print out a list of the related items, separated by commas 16 | 17 | else:?> 18 | 19 | <p>No related posts.</p> 20 | <?php endif; ?> 21 | -------------------------------------------------------------------------------- /yarpp-template-multilingual.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: Multilingual 4 | Description: An example template for use with the WPML and Polylang plugins 5 | Author: mitcho (Michael Yoshitaka Erlewine) 6 | */ 7 | 8 | if (function_exists("icl_register_string")) { 9 | icl_register_string("Yet Another Related Posts Plugin", "related posts header", "Related Posts"); 10 | icl_register_string("Yet Another Related Posts Plugin", "no related posts message", "No related posts."); 11 | } 12 | 13 | ?><h3><?php echo (function_exists("icl_t") ? icl_t("Yet Another Related Posts Plugin", "related posts header", "Related Posts") : "Related Posts") ?></h3> 14 | <?php if (have_posts()):?> 15 | <ol> 16 | <?php while (have_posts()) : the_post(); ?> 17 | <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> 18 | <?php endwhile; ?> 19 | </ol> 20 | <?php else: ?> 21 | <p><?php echo (function_exists("icl_t") ? icl_t("Yet Another Related Posts Plugin", "no related posts message", "No related posts.") : "No related posts.") ?></p> 22 | <?php endif; ?> 23 | -------------------------------------------------------------------------------- /yarpp-template-photoblog.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: Yet Another Photoblog 4 | Description: Requires the Yet Another Photoblog plugin 5 | Author: mitcho (Michael Yoshitaka Erlewine) 6 | */ ?> 7 | <h3>Related Photos</h3> 8 | <?php if (have_posts()):?> 9 | <ol> 10 | <?php while (have_posts()) : the_post(); ?> 11 | <?php if (function_exists('yapb_is_photoblog_post')): if (yapb_is_photoblog_post()):?> 12 | <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php yapb_get_thumbnail(); ?></a></li> 13 | <?php endif; endif; ?> 14 | <?php endwhile; ?> 15 | </ol> 16 | 17 | <?php else: ?> 18 | <p>No related photos.</p> 19 | <?php endif; ?> 20 | -------------------------------------------------------------------------------- /yarpp-template-random.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: Random 4 | Description: This template gives you a random other post in case there are no related posts 5 | Author: mitcho (Michael Yoshitaka Erlewine) 6 | */ ?> 7 | <h3>Related Posts</h3> 8 | <?php if (have_posts()):?> 9 | <ol> 10 | <?php while (have_posts()) : the_post(); ?> 11 | <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><!-- (<?php the_score(); ?>)--></li> 12 | <?php endwhile; ?> 13 | </ol> 14 | 15 | <?php else: 16 | query_posts("orderby=rand&order=asc&limit=1"); 17 | the_post();?> 18 | <p>No related posts were found, so here's a consolation prize: <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>.</p> 19 | <?php endif; ?> 20 | -------------------------------------------------------------------------------- /yarpp-template-thumbnail.php: -------------------------------------------------------------------------------- 1 | <?php 2 | /* 3 | YARPP Template: Thumbnails 4 | Description: Requires a theme which supports post thumbnails 5 | Author: mitcho (Michael Yoshitaka Erlewine) 6 | */ ?> 7 | <h3>Related Photos</h3> 8 | <?php if (have_posts()):?> 9 | <ol> 10 | <?php while (have_posts()) : the_post(); ?> 11 | <?php if (has_post_thumbnail()):?> 12 | <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?></a></li> 13 | <?php endif; ?> 14 | <?php endwhile; ?> 15 | </ol> 16 | 17 | <?php else: ?> 18 | <p>No related photos.</p> 19 | <?php endif; ?> 20 | --------------------------------------------------------------------------------