Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ascottmccauley committed Apr 7, 2015
0 parents commit ae7791e
Show file tree
Hide file tree
Showing 38 changed files with 2,069 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
11 changes: 11 additions & 0 deletions .editorconfig
@@ -0,0 +1,11 @@
# editorconfig.org

root = true

[*]
indent_style = tab
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
21 changes: 21 additions & 0 deletions .gitignore
@@ -0,0 +1,21 @@
#OS files
.DS_Store
._*
Thumbs.db
.cache
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache

#project files
npm-debug.log
node_modules/
bower_components/
assets/
12 changes: 12 additions & 0 deletions 404.php
@@ -0,0 +1,12 @@
<?php
/**
* Basic template for bad links and missing content
* Empty search results will still use search.php
*
* @package groundup
*/
?>
<?php get_header(); ?>
<h4><?php _e( 'It seems as though something or someone got lost.' ); ?></h4>
<h5><?php _e( 'Sorry about the inconvenience.' ); ?></h5>
<?php get_footer(); ?>
35 changes: 35 additions & 0 deletions 503.php
@@ -0,0 +1,35 @@
<?php
/*
Template Name: 503
*/
?>
<?php
/**
* Basic template for bad links and missing content
* Empty search results will still use search.php
*
* @package groundup
*/
?>
<?php get_header(); ?>
<main id="main" role="main">
<?php // Search for a page with any of the following slugs and output its content
$page_array = array( 'maintenance', 'construction', 'under-construction', '503' );
foreach ( $page_array as $page_name ) {
$page = get_page_by_path( 'maintenance' );
if ( $page ) {
$content = apply_filters( 'the_content', $page->post_content );
if ( $content != '' ) {
continue;
}
}
if ( $content != '' ) {
echo $content;
} else {
echo '<h1>' . __( 'Under Construction' ) . '</h1><h4>' . __( 'Please check back soon' ) . '</h4>';
}
} ?>
</main>
<?php get_footer(); ?>
<?php die; // stop loading all other templates

57 changes: 57 additions & 0 deletions README.md
@@ -0,0 +1,57 @@
groundup
=

##Theme Features:
* Extremely lightweight and fast framework (unstyled)
* File versioning for better caching
* Separate stylesheets for inlining critical CSS on the first pageload
* Load jQuery (when needed) from Google's CDN with a local fallback
* Adds mod_deflate to .htaccess
* Decluttered Admin
* Prevents WordPress from storing duplicate media.
* Renames additional media sizes according to the sizename (`file-thumbnail.jpg` instead of `file-320x640.jpg`)
* Automatic sitemap.xml and robots.txt creation

###Setup:
* Install node.js
* Clone the git repo into your themes folder - `git clone git://github.com/ascottmccauley/groundup.git`
* Update the node_modules - `npm update`
* Add Bower components - `bower update`
* Run Gulp to compile assets - `gulp`

###Building
#####sourcefiles
* `/src/` - Location for all of the precompiled assets. Gulp will work it's magic and put them in `/assets/`
* `/src/css` - All stylesheets from the css folder will be compiled and minified to `/assets/css`.
* - Bower dependencies must be imported directly into the stylesheet.
* - Child themes are not setup to enqueue the parent css (because of the url rewrite to `/assets/`), The parent SCSS files contain `$include-parent-classes: true !default;` to allow child themes to import the parent styles with `@import "../../../groundup/src/scss/main"`.
* `/src/js` - Gulp concatenates, and minifies js from Bower dependencies and the js folder along with a minified copy of jquery to `/assets/js`
* `/src/fonts` - all fonts from Bower dependencies and the fonts folder are copied to `/assets/fonts/`
* `src/img` - all images from Bower dependencies and the img folder are compressed and copied to `/assets/img`

#####functions
* `/includes/` - All of the ~~fun stuff~~ *functions*
* `/includes/helpers` - Helper functions used throughout the theme
* `/includes/setup` - Initial activation and theme setup options
* `/includes/cleanup` - Cleans up some out of the box WordPress behavior
* `/includes/admin` - Functions specific to the backend or admin_bar
* `/includes/scripts.php` - Loading all the assets [scripts, styles, and cookies]

#####templates
* `/templates` - Templates (surprised‽)
* `/templates/excerpt.php` - can be extended include the post_format or post_type
* `/templates/single.php` - can be extended include the post_format or post_type
* `/templates/meta.php` - time, tags, categories, comment count, image count, and exif info for a post
* `/templates/comment.php` - Output for a single comment

###Conditions:
Feel free to use this, but be aware that I am not responsible for maintaining it and probably will not be available to answer any questions related to it.

MIT Open Source License
=======================

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 changes: 25 additions & 0 deletions bower.json
@@ -0,0 +1,25 @@
{
"name": "groundup",
"version": "0.0.1",
"ignore": [
".jshintrc",
"**/*.txt",
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1.3"
},
"authors": [
"ascottmccauley <scott@ascottmccauley.com>"
],
"description": "A Performance and Security Oriented WordPress Theme",
"keywords": [
"WordPress"
],
"license": "MIT",
"private": true,
}
51 changes: 51 additions & 0 deletions comments.php
@@ -0,0 +1,51 @@
<?php
/**
* @package groundup
*/
?>
<?php if( comments_open() || have_comments() ) { ?>
<aside id="discussion">
<?php // Comment Form
comment_form();

if ( have_comments() ) {
// Password Protected
if ( post_password_required() ) { ?>
<p><?php _e( 'This area is password protected. Enter the password to view comments.', 'groundup' ); ?></p>
<?php } ?>
<section id="comments">
<header>
<h4><?php comments_number(
__( 'No Comments', 'groundup' ),
__( 'One Comment', 'groundup' ),
__( '% Comments', 'groundup' )
); ?></h4>
</header>
<ol class="comment-list">
<?php wp_list_comments( array( 'callback' => 'groundup_comment' ) ); ?>
</ol>
<?php // Comment Pagination
if ( get_comment_pages_count() > 1 ) { ?>
<nav id="comments-nav" class="pager">
<ul class="pager">
<?php if (get_previous_comments_link() ) { ?>
<li class="previous"><?php previous_comments_link( __( '&larr; Older comments', 'groundup' ) ); ?></li>
<?php } else { ?>
<li class="previous disabled"><a><?php _e( '&larr; Older comments', 'groundup' ); ?></a></li>
<?php } ?>
<?php if ( get_next_comments_link() ) { ?>
<li class="next"><?php next_comments_link( __( 'Newer comments &rarr;', 'groundup' ) ); ?></li>
<?php } else { ?>
<li class="next disabled"><a><?php _e( 'Newer comments &rarr;', 'groundup' ); ?></a></li>
<?php } ?>
</ul>
</nav>
<?php }
// Comments are closed
if ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) { ?>
<p><?php _e('Comments are closed.', 'fin'); ?></p>
<?php } ?>
</section>
<?php } ?>
</aside>
<?php } ?>
19 changes: 19 additions & 0 deletions footer.php
@@ -0,0 +1,19 @@
<?php
/**
* @package groundup
*/
?>
<?php
// html is opened in header.php
// body is opened in header.php
?>
<footer>
<div class="copyrights">
<a href="<?php echo esc_url(get_permalink(get_page_by_title( 'Copyrights'))); ?>">&copy; <?php echo date('Y'); ?> <?php bloginfo('name'); ?></a>
</div>
</footer>

<?php wp_footer(); ?>

</body>
</html>
22 changes: 22 additions & 0 deletions functions.php
@@ -0,0 +1,22 @@
<?php
/**
* @package groundup
*/
?>
<?php

$includes = array(
'includes/helpers.php', // Helper functions used throughout the theme
'includes/setup.php', // Initial activation and theme setup options
'includes/cleanup.php', // Cleans up some out of the box WordPress behavior
'includes/admin.php', // Functions specific to the backend or admin_bar
'includes/scripts.php', // Functions that load all of the scripts, styles and cookies
);

foreach ( $includes as $file ) {
if( !$filepath = locate_template( $file ) ) {
trigger_error( sprintf( __( 'Error locating %s for inclusion', 'groundup' ), $file ), E_USER_ERROR );
}
require_once $filepath;
}

0 comments on commit ae7791e

Please sign in to comment.