Skip to content

Commit a22baa2

Browse files
committed
First Version
1 parent 2fedf84 commit a22baa2

36 files changed

+2464
-0
lines changed

404.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* @package WordPress
4+
* @subpackage HTML5_Boilerplate
5+
*/
6+
7+
get_header(); ?>
8+
9+
<div id="main" role="main">
10+
11+
<details>
12+
<summary><h1>Not found</h1></summary>
13+
<p><span frown>:(</span></p>
14+
</details>
15+
16+
</div>
17+
18+
<?php get_sidebar(); ?>
19+
20+
<?php get_footer(); ?>

README

Whitespace-only changes.

README (HTML5 Boilerplate).markdown

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
### HTML5 Boilerplate
2+
3+
## CHANGELOG:
4+
5+
v0.9 -August 10th, 2010 - Initial release
6+
7+
## LICENSE:
8+
9+
The Unlicense (aka: public domain) http://unlicense.org
10+
11+
## INSTALLATION:
12+
13+
This is a set of files that a front-end developer can use to get started on a website, with following included:
14+
15+
1. Cross-browser compatible (IE6, yeah we got that.)
16+
2. HTML5 ready. Use the new tags with certainty.
17+
3. Optimal caching and compression rules for grade-A performance
18+
4. Best practice site configuration defaults
19+
5. Think there's too much? The HTML5 Boilerplate is delete-key friendly. :)
20+
6. Mobile browser optimizations
21+
7. Progressive enhancement graceful degredation ........ yeah yeah we got that
22+
8. IE specific classes for maximum cross-browser control
23+
9. Want to write unit tests but lazy? A full, hooked up test suite is waiting for you.
24+
10. Javascript profiling.. in IE6 and IE7? Sure, no problem.
25+
11. Console.log nerfing so you won't break anyone by mistake.
26+
12. Never go wrong with your doctype or markup!
27+
13. An optimal print stylesheet, performance optimized
28+
14. iOS, Android, Opera Mobile-adaptable markup and CSS skeleton.
29+
15. IE6 pngfix baked in.
30+
16. jQuery, waiting for you
31+
32+
33+
There will be two releases: a documented release, which is exactly what you see here, and a production release, with most of the descriptive comments stripped out.
34+

README.markdown

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
HTML5 Boilerplate Wordpress Template
2+
====================================
3+
4+
This is template based on the [HTML5 Boilerplate](http://html5boilerplate.com/) by Paul Irish and Divya Manian, and Bruce Lawson's [Designing a Blog with HTML5](http://html5doctor.com/designing-a-blog-with-html5/)
5+
6+
Instead of using only DIVs for content layout, it uses new HTML5 tags, including [header](http://html5doctor.com/the-header-element/),
7+
[footer](http://www.w3schools.com/html5/tag_footer.asp),
8+
[nav](http://www.w3schools.com/html5/tag_nav.asp),
9+
[article](http://www.w3schools.com/html5/tag_article.asp),
10+
and [section](http://html5doctor.com/the-section-element/).
11+
12+
It's a very bare layout, including only the base styles that come with the boilerplate, so layout is up to you.
13+
14+
Getting Started
15+
---------------
16+
1. Add the html-boilerplate-forl-wordpress folder to your wp-content/themes folder.
17+
2. Activate the theme. WP-Admin > Appearance > Themes
18+
2. Add the items in the "root" folder to the root of your website (read the Root Files section below).
19+
3. Style away, knowing that you're building on a super solid base with HTML5 awesomeness.
20+
21+
Root Files
22+
----------
23+
### 404 Pages
24+
If you use permanlinks (WP-Admin > Settings > Permalinks), then WordPress handles any 404s with the 404.php included in the theme. If you don't use permalinks, then you need to add the 404.html file from the "root" folder to the root of your site.
25+
26+
### .htaccess
27+
In the root folder you'll fin _htaccess.txt. Add the contents of this file to the .htaccess already at the root of your site, after the existing content. htaccess files are sometimes hidden because they begin with a period (.), so if you don't see one at the root of your site you may need an FTP browser to view/edit it. Read _htaccess.txt for more info on what it does.
28+
29+
### favicon.ico
30+
The favicon is the icon shown to the left of the URL at the top of your browser window. An example is provided. Better to use that one than none at all.
31+
32+
### apple-touch-icon.png
33+
On iPhones and iPads you can book mark a web page and have it show up on the home screen as an icon. The apple-touch-icon.png becomes this icon if used. Rounded corners and glossy finish are added by the device.
34+
35+
### crossdomain.xml
36+
If you don't know what this is, you probably don't need it.
37+
www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html
38+
39+
### robots.txt
40+
Tells all search engines that they can read and index all pages.

archive.php

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?php
2+
/**
3+
* @package WordPress
4+
* @subpackage HTML5_Boilerplate
5+
*/
6+
7+
get_header(); ?>
8+
9+
<div id="main" role="main">
10+
11+
<?php if (have_posts()) : ?>
12+
13+
<section>
14+
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
15+
<?php /* If this is a category archive */ if (is_category()) { ?>
16+
<h2 class="pagetitle">Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
17+
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
18+
<h2 class="pagetitle">Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</h2>
19+
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
20+
<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
21+
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
22+
<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
23+
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
24+
<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
25+
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
26+
<h2 class="pagetitle">Author Archive</h2>
27+
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
28+
<h2 class="pagetitle">Blog Archives</h2>
29+
<?php } ?>
30+
31+
<nav>
32+
<div><?php next_posts_link('&laquo; Older Entries') ?></div>
33+
<div><?php previous_posts_link('Newer Entries &raquo;') ?></div>
34+
</nav>
35+
36+
<?php while (have_posts()) : the_post(); ?>
37+
<article <?php post_class() ?>>
38+
<header>
39+
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
40+
<time datetime="<?php the_time('Y-m-d')?>"><?php the_time('l, F jS, Y') ?></time>
41+
</header>
42+
<?php the_content() ?>
43+
<footer>
44+
<?php the_tags('Tags: ', ', ', '<br />'); ?>
45+
Posted in <?php the_category(', ') ?>
46+
| <?php edit_post_link('Edit', '', ' | '); ?>
47+
<?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
48+
</footer>
49+
</article>
50+
<?php endwhile; ?>
51+
52+
<nav>
53+
<div><?php next_posts_link('&laquo; Older Entries') ?></div>
54+
<div><?php previous_posts_link('Newer Entries &raquo;') ?></div>
55+
</nav>
56+
</section>
57+
58+
<?php else :
59+
60+
if ( is_category() ) { // If this is a category archive
61+
printf("<h2>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));
62+
} else if ( is_date() ) { // If this is a date archive
63+
echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
64+
} else if ( is_author() ) { // If this is a category archive
65+
$userdata = get_userdatabylogin(get_query_var('author_name'));
66+
printf("<h2>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
67+
} else {
68+
echo("<h2>No posts found.</h2>");
69+
}
70+
get_search_form();
71+
72+
endif;
73+
?>
74+
75+
</div>
76+
77+
<?php get_sidebar(); ?>
78+
79+
<?php get_footer(); ?>

archives.php

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* @package WordPress
4+
* @subpackage HTML5_Boilerplate
5+
*/
6+
/*
7+
Template Name: Archives
8+
*/
9+
?>
10+
11+
<?php get_header(); ?>
12+
13+
<div id="main">
14+
15+
<?php get_search_form(); ?>
16+
17+
<section>
18+
<h2>Archives by Month:</h2>
19+
<ul>
20+
<?php wp_get_archives('type=monthly'); ?>
21+
</ul>
22+
</section>
23+
24+
<section>
25+
<h2>Archives by Subject:</h2>
26+
<ul>
27+
<?php wp_list_categories(); ?>
28+
</ul>
29+
</section>
30+
31+
</div>
32+
33+
<?php get_sidebar(); ?>
34+
35+
<?php get_footer(); ?>

comments.php

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
/**
3+
* @package WordPress
4+
* @subpackage HTML5_Boilerplate
5+
*/
6+
7+
// Do not delete these lines
8+
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
9+
die ('Please do not load this page directly. Thanks!');
10+
11+
if ( post_password_required() ) { ?>
12+
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
13+
<?php
14+
return;
15+
}
16+
?>
17+
18+
<!-- You can start editing here. -->
19+
20+
<?php if ( have_comments() ) : ?>
21+
<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
22+
23+
<nav>
24+
<div><?php previous_comments_link() ?></div>
25+
<div><?php next_comments_link() ?></div>
26+
</nav>
27+
28+
<ol class="commentlist">
29+
<?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
30+
</ol>
31+
32+
<nav>
33+
<div><?php previous_comments_link() ?></div>
34+
<div><?php next_comments_link() ?></div>
35+
</nav>
36+
<?php else : // this is displayed if there are no comments so far ?>
37+
38+
<?php if ( comments_open() ) : ?>
39+
<!-- If comments are open, but there are no comments. -->
40+
41+
<?php else : // comments are closed ?>
42+
<!-- If comments are closed. -->
43+
<p class="nocomments">Comments are closed.</p>
44+
45+
<?php endif; ?>
46+
<?php endif; ?>
47+
48+
49+
<?php if ( comments_open() ) : ?>
50+
51+
<section id="respond">
52+
53+
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
54+
55+
<div class="cancel-comment-reply">
56+
<small><?php cancel_comment_reply_link(); ?></small>
57+
</div>
58+
59+
<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
60+
<p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p>
61+
<?php else : ?>
62+
63+
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
64+
65+
<?php if ( is_user_logged_in() ) : ?>
66+
67+
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
68+
69+
<?php else : ?>
70+
71+
<p>
72+
<label for="author">Name <?php if ($req) echo "(required)"; ?></label>
73+
<input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
74+
</p>
75+
76+
<p>
77+
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label>
78+
<input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
79+
</p>
80+
81+
<p>
82+
<label for="url">Website</label>
83+
<input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
84+
</p>
85+
86+
<?php endif; ?>
87+
88+
<p id="allowed_tags"><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></p>
89+
90+
<p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4"></textarea></p>
91+
92+
<p>
93+
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
94+
<?php comment_id_fields(); ?>
95+
</p>
96+
<?php do_action('comment_form', $post->ID); ?>
97+
98+
</form>
99+
100+
<?php endif; // If registration required and not logged in ?>
101+
</section>
102+
103+
<?php endif; // if you delete this the sky will fall on your head ?>

css/handheld.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
* {
3+
float: none; /* Screens are not big enough to account for floats */
4+
font-size: 80%; /* Slightly reducing font size to reduce need to scroll */
5+
background: #fff; /* As much contrast as possible */
6+
color: #000;
7+
}

0 commit comments

Comments
 (0)