Permalink
Browse files

Version 1.0. using external plugin now for functions. only work from …

…theme folder. remove some template files, to follow DRY.
  • Loading branch information...
1 parent 8510c68 commit 1bdfc1a1df3e247b985b902cb0e733145943a083 @chrisvanpatten chrisvanpatten committed Apr 11, 2012
Showing with 113 additions and 700 deletions.
  1. +2 −1 .gitignore
  2. +0 −46 .maintenance
  3. +1 −1 LICENSE.md
  4. +8 −1 README.md
  5. 0 {wp-content/themes/themename → }/comments.php
  6. +2 −2 {wp-content/themes/themename → }/config.rb
  7. +1 −1 {wp-content/themes/themename → }/footer.php
  8. 0 wp-content/themes/themename/css/editor-style.css → frontpage.php
  9. +32 −0 functions.php
  10. +5 −6 {wp-content/themes/themename → }/head.php
  11. +3 −0 header.php
  12. +0 −6 humans.txt
  13. BIN {wp-content/themes/themename → }/img/opengraph.png
  14. +11 −1 {wp-content/themes/themename → }/index.php
  15. 0 {wp-content/themes/themename → }/js/script.js
  16. 0 {wp-content/themes/themename → }/loop-page.php
  17. +3 −3 {wp-content/themes/themename → }/loop-post.php
  18. +0 −6 robots.txt
  19. +2 −2 {wp-content/themes/themename → }/sass/editor-style.scss
  20. +34 −0 sass/global.scss
  21. 0 wp-content/themes/themename/css/global.css → sass/includes/_definitions.scss
  22. 0 {wp-content/themes/themename → }/sass/includes/_fonts.scss
  23. 0 {wp-content/themes/themename → }/sass/includes/_media-queries.scss
  24. 0 {wp-content/themes/themename → }/sass/includes/rach5/_definitions.scss
  25. 0 {wp-content/themes/themename → }/sass/includes/rach5/_fixes.scss
  26. +9 −0 style.css
  27. +0 −100 wp-content/maintenance.php
  28. +0 −15 wp-content/themes/themename/front-page.php
  29. +0 −40 wp-content/themes/themename/functions.php
  30. +0 −5 wp-content/themes/themename/header.php
  31. +0 −48 wp-content/themes/themename/inc/rach5-admin.php
  32. +0 −142 wp-content/themes/themename/inc/rach5-clean.php
  33. +0 −95 wp-content/themes/themename/inc/rach5-functions.php
  34. +0 −57 wp-content/themes/themename/inc/rach5-htaccess.php
  35. +0 −47 wp-content/themes/themename/inc/rach5-html5.php
  36. +0 −17 wp-content/themes/themename/page.php
  37. +0 −32 wp-content/themes/themename/sass/global.scss
  38. +0 −17 wp-content/themes/themename/single.php
  39. +0 −9 wp-content/themes/themename/style.css
View
@@ -1 +1,2 @@
-.DS_Store
+.DS_Store
+.sass-cache
View
@@ -1,46 +0,0 @@
-<?php
-/*
-
- // What will your query string be?
- $name = 'open';
-
- // Is the user logged in or do they have the appropriate cookie?
- function is_user_logged_in() {
- $loggedin = false;
- foreach ( (array) $_COOKIE as $cookie => $value ) {
- if ( stristr($cookie, 'wordpress_logged_in_') || stristr($cookie, 'vpm_wordpress_') ) {
- $loggedin = true;
- }
- }
- return $loggedin;
- }
-
- // What page are we on?
- function curPageURL() {
- $pageURL = 'http';
- if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
- $pageURL .= "://";
- if ($_SERVER["SERVER_PORT"] != "80") {
- $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
- } else {
- $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
- }
- return $pageURL;
- }
-
- // Does this page have a URL query variable set?
- function url_get_param($name) {
- parse_str(parse_url(curPageURL(), PHP_URL_QUERY), $vars);
- return isset($vars[$name]) ? $vars[$name] : null;
- }
-
- // If none of these conditions are true, we're in maintenance!
- // If the query variable is set, set a cookie to expire in 30 minutes.
- if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() && ! url_get_param($name) ) {
- $upgrading = time();
- } elseif ( url_get_param('open') ) {
- setcookie("vpm_wordpress_hide_maintenance", "vanpattenmedia.com", time()+1800);
- }
-
-*/
-?>
View
@@ -1,5 +1,5 @@
### License
-**Copyright (C) 2011, Chris Van Patten.**
+**Copyright (C) 2011-2012, Chris Van Patten.**
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
View
@@ -5,7 +5,14 @@
Rach5 provides a set of "sensible defaults" that make it faster to jump into developing a custom WordPress website, and get right out of your way as quickly as possible by not imposing any (well, almost any) style decisions. Rach5 uses HTML5, Ruby and Compass, and a mix of WordPress native and custom functions that make theme development fast and fun.
-For up-to-date documentation, visit the Rach5 website at <a href="http://labs.vanpattenmedia.com/projects/rach5/">Van Patten Media Labs</a> or the <a href="https://github.com/vanpattenmedia/rach5/wiki">Github Wiki</a> for the project.
+### 1.0
+Rach5 has finally hit 1.0! What does that mean for you?
+
+* All the functions have been removed. They will now be maintained in a separate project: `rach5-plugin`.
+* The project has been condensed to only include the theme directory to simplify management via version control. The plugin will be built to handle maintenance and offer humans.txt/robots.txt defaults.
+* In the interest of maintainability and simplicity, I have removed several template files and condensed them down to loop templates that are called from conditionals in `index.php`. This logic is not typical for WordPress, but is a major part of bringing <a href="https://en.wikipedia.org/wiki/DRY">DRY</a> to Rach5.
+
+For up-to-date documentation, visit the Rach5 website at <a href="http://www.vanpattenmedia.com/projects/rach5/">Van Patten Media Labs</a> or the <a href="https://github.com/vanpattenmedia/rach5/wiki">Github Wiki</a> for the project.
### Getting started
It's easy to <a href="https://github.com/vanpattenmedia/rach5/wiki/Getting-Started">get started with Rach5</a>! The full details are available at the wiki.
File renamed without changes.
@@ -25,8 +25,8 @@
# relative_assets = true
# Connection Details
-sftp_host = 'website.tld'
-sftp_user = 'username'
+sftp_host = ''
+sftp_user = ''
# Upload
on_stylesheet_saved do |filename|
@@ -1,6 +1,6 @@
<footer>
<div id="legal">
- <?php copyright('2011'); ?> <?php bloginfo('name'); ?>
+ <?php copyright('2011'); ?> <?php bloginfo('name'); ?>
</div>
</footer>
File renamed without changes.
View
@@ -0,0 +1,32 @@
+<?php
+
+if ( !function_exists('rach5_info') ) {
+ function no_rach5() {
+ echo '<div class="error">';
+ echo '<p>', sprintf(__('You need to <a href="%s">install the Rach5 plugin</a>.', 'rach5'), admin_url('plugin-install.php?tab=upload') ), '</p>';
+ echo '</div>';
+ }
+ add_action('admin_notices', 'no_rach5');
+}
+
+/*
+ *
+ * Website.tld custom functions
+ *
+ */
+
+function rach5_setup() {
+ // Editor style
+ add_theme_support('editor_style');
+ add_editor_style('css/editor-style.css?' . time());
+
+ // add_theme_support('post-thumbnails');
+
+ // update_option('upload_path', 'assets');
+}
+add_action('after_setup_theme', 'rach5_setup');
+
+// Content width
+if ( !isset( $content_width ) ) {
+ $content_width = 500;
+}
@@ -9,7 +9,7 @@
// Global Stylesheet
stylesheet_link_tag('/global.css', true, 0, true);
-
+
// Formalize
stylesheet_link_tag('http://cdn.vanpattenmedia.com/js/libs/formalize/1.2/css/formalize.css', false, 1, false); ?>
@@ -22,11 +22,11 @@
<![endif]-->
<?php /* JavaScript */
- ?><script type="text/javascript" src="http://cdn.vanpattenmedia.com/js/libs/labjs/2.0.3/LAB.min.js"></script>
+ ?><script type="text/javascript" src="//cdn.vanpattenmedia.com/js/libs/labjs/2.0.3/LAB.min.js"></script>
<script type="text/javascript">
$LAB
- .script('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js').wait()
- .script('http://cdn.vanpattenmedia.com/js/libs/formalize/1.2/js/jquery.formalize.min.js').wait()
+ .script('//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js').wait()
+ .script('//cdn.vanpattenmedia.com/js/libs/formalize/1.2/js/jquery.formalize.min.js').wait()
.script('<?php bloginfo('template_directory'); ?>/js/script.js').wait();
</script>
@@ -40,8 +40,7 @@
<script type="text/javascript">
var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-575101-19']);
- _gaq.push(['_setDomainName', 'vanpattenmedia.com']);
+ _gaq.push(['_setAccount', 'UA-XXXXXX-XX']);
_gaq.push(['_trackPageview']);
(function() {
View
@@ -0,0 +1,3 @@
+ <header>
+ <h1><a id="logo" href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a></h1>
+ </header>
View
@@ -1,6 +0,0 @@
-/* TEAM */
-Designer: Chris Van Patten
-Contact: chris [at] vanpattenmedia.com
-Twitter: @chrisvanpatten
-Twitter: @vanpattenmedia
-From: Upstate New York
File renamed without changes
@@ -9,7 +9,17 @@
<?php get_header(); ?>
<section id="content">
- <?php get_template_part('loop', 'post'); ?>
+ <?php
+
+ if ( is_front_page() ) {
+ get_template_part('frontpage');
+ } elseif ( is_page() ) {
+ get_template_part('loop', 'page');
+ } else {
+ get_template_part('loop', 'post');
+ }
+
+ ?>
</section>
<?php get_footer(); ?>
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<header>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<p>Posted at <time class="updated" datetime="<?php the_modified_time('c'); ?>" pubdate><?php the_time(); ?> on <?php the_time(get_option('date_format')); ?></time></p>
@@ -10,8 +10,8 @@
</div>
</article><?php endwhile; ?>
- <section class="posts-nav">
- <?php if (is_single()) {
+ <section class="posts-nav clearfix">
+ <?php if (!is_single()) {
echo '<div class="prev-posts">'; next_posts_link( '&laquo; Older Posts' ); echo '</div>';
echo '<div class="next-posts">'; previous_posts_link( 'Newer Posts &raquo;' ); echo '</div>';
} else {
View
@@ -1,6 +0,0 @@
-# Sensible defaults
-
-User-agent: *
-Disallow: /wp-admin
-Disallow: /wp-includes
-Disallow: /xmlrpc.php
@@ -1,5 +1,5 @@
// Fonts
-@import "includes/fonts";
+// @import "includes/fonts";
// Rach5 imports
@import "includes/rach5/definitions";
@@ -11,4 +11,4 @@
@import "compass/typography";
// Your imports
-// @import "includes/definitions";
+@import "includes/definitions";
View
@@ -0,0 +1,34 @@
+// Fonts
+// @import "includes/fonts";
+
+// Rach5 imports
+@import "includes/rach5/definitions";
+@import "includes/rach5/fixes";
+
+// Compass imports
+@import "rgbapng";
+@import "compass/css3";
+@import "compass/typography";
+
+// Your imports
+@import "includes/definitions";
+
+/*
+ *
+ * HERE BE DRAGONS...
+ *
+ */
+
+body {
+
+}
+
+
+/*
+ *
+ * Media Queries should always be loaded *last*
+ * for the good of the cascade.
+ *
+ */
+
+@import "includes/media-queries";
View
@@ -0,0 +1,9 @@
+/*
+Theme Name:
+Theme URI:
+Description:
+Author:
+Author URI:
+Version:
+Tags: custom rach5
+*/
View
@@ -1,100 +0,0 @@
-<?php
-$protocol = $_SERVER["SERVER_PROTOCOL"];
-if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
- $protocol = 'HTTP/1.0';
-header( "$protocol 503 Service Unavailable", true, 503 );
-header( 'Content-Type: text/html; charset=utf-8' );
-
-// Redefining the bloginfo function, for forward compatibility
-function bloginfo($name) {
- // Name your site
- echo 'Website Name';
-}
-?>
-<!DOCTYPE HTML>
-<html lang="en-US">
- <head>
- <meta charset="UTF-8">
- <title><?php bloginfo('name'); ?> Coming Soon</title>
- <link rel="stylesheet" type="text/css" href="http://cdn.vanpattenmedia.com/css/style.css" media="all" />
- <link rel="stylesheet" href="http://cdn.vanpattenmedia.com/js/libs/formalize/css/formalize.css" />
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-XXXXXX-XX']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
- </head>
- <body>
- <div id="wrap">
- <div id="top">
- <h1><?php bloginfo('name'); ?></h1>
- <h2>Coming soon...</h2>
- </div>
- <!-- <form name="waiting_list" id="waiting_list" method="post" action="<?php bloginfo('template_directory'); ?>/action.php">
- <label for="email">Get an email when this website launches...</label>
- <div id="form">
- <input type="text" id="email" name="email" placeholder="email@address.com" />
- <input type="submit" value="Submit" id="submit" />
- </div>
- <div id="done">Thanks! We'll email you when the site is live.</div>
- </form> -->
- <h4 id="by"><a href="http://www.vanpattenmedia.com/">website by <span>Van Patten Media</span></a></h4>
- </div>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
-
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" type="text/javascript"></script>
-
- <script src="http://cdn.vanpattenmedia.com/js/libs/formalize/js/jquery.formalize.min.js"></script>
- <script src="http://cdn.vanpattenmedia.com/js/libs/jquery.placeholder.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#submit').click(function () {
- var email = $('#email');
- var emailReg = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
-
- if (email.val() == '') {
- $('label').html("Oops, you forgot to enter your email address.").css('color','red');
- $('form').effect('shake', {times: 4, distance: 7}, 50);
- return false;
- } else if (!emailReg.test(email.val())) {
- $('label').html("That doesn't look like a real email address.").css('color','red');
- $('form').effect('shake', {times: 4, distance: 7}, 50);
- return false;
- }
-
- var data = 'email=' + email.val();
-
- $('#email').attr('disabled','true');
- $('#submit').attr('disabled','true');
- $('.loading').show();
-
- $.ajax({
- url: "action.php",
- type: "GET",
- data: data,
- cache: false,
- success: function (html) {
- if (html==1) {
- $('#email').attr('disabled','true');
- $('#submit').attr('disabled','true');
- $('label').html('');
- $('#done').fadeIn('slow');
- } else alert('Sorry, unexpected error. Please try again later.');
- }
- });
- return false;
- });
- });
- </script>
- </body>
-</html>
-<?php die(); ?>
Oops, something went wrong.

0 comments on commit 1bdfc1a

Please sign in to comment.