Permalink
Browse files

Initial wordpress theme import

  • Loading branch information...
jsiarto committed Apr 27, 2012
1 parent 01c50db commit b7af37b83e11165a7ef01f8e905ad3288b19f935
View
@@ -0,0 +1 @@
+.DS_Store
View
20 README
@@ -0,0 +1,20 @@
+# Whitespace Readme
+
+Hey! Thanks for purchasing this theme and supporting clean, Flash-free design. In this file you will find instructions for getting things setup, links to tutorials and an overview of what you can do with the theme and what kind of support you can expect from us. So, without further adieu...
+
+## License
+This theme is licensed under the GNU General Public License (http://www.gnu.org/copyleft/gpl.html). You can read the full text of the license in the "license.txt" file that's included with the theme. Only the WordPress theme is licensed under the GPL. All other files (including Photoshop actions and other images) are licensed and copyrighted under Whitespace. You may not sell or redistribute these files in any way.
+
+## Support
+Our templates, designs and layouts/actions are sold "as is", with no guarantee that they will function exactly as you wish or with all 3rd party components and plugins. Further, we offer no support via email or otherwise for installation, customization, administration of WordPress itself.
+
+## Requirements
+1. Wordpress 3.2 and above
+2. Minimum requirements for a WordPress installation: http://wordpress.org/about/requirements/
+
+## Installation
+1. You should have received a single download called "whitespace-intelligentsia-bundle" with to folders inside: "homepage layouts" (layouts and Photoshop actions) and "whitespace-intelligentsia" (the actual WordPress theme).
+2. New to WordPress? Start here: http://codex.wordpress.org/New_To_WordPress_-_Where_to_Start
+3. Make sure you follow the official WordPress installation guide to get the base software installed: http://codex.wordpress.org/Installing_WordPress
+4. Drop the "whitespace-intelligentsia" folder into /wp-content/themes within your WordPress installation. The theme should now be available when your browse to your Themes menu in the WordPress dashboard.
+5. Activate the theme and your site should be ready to go.
View
@@ -0,0 +1,14 @@
+<?php
+/**
+ * 404 Error Page Template
+ *
+ * This page will display is a visitor tries to request a post or page that doesn't exist.
+ */
+?>
+<?php get_header(); ?>
+ <div id="content" class="page">
+ <h2>404</h2>
+ <p>We can&rsquo;t seem to find the page you&rsquo;re looking for.</p>
+ </div>
+</div>
+<?php get_footer(); ?>
View
@@ -0,0 +1,3 @@
+.appearance_page_custom-header #headimg {
+ min-height: 1px !important;
+}
View
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Blog Archive Template
+ *
+ */
+?>
+<?php get_header(); ?>
+ <div id="content">
+ <h2>Blog</h2>
+ <?php if (have_posts()) : ?>
+ <?php while (have_posts()) : the_post(); ?>
+ <div class="post" id="post-<?php the_ID(); ?>">
+ <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> <span class="date"><?php the_time('M j') ?></spam></h3>
+ <div class="entry">
+ <?php the_content('Read the rest of this entry &raquo;'); ?>
+ </div>
+ <p class="postmeta"><strong>Posted in</strong> <?php the_category(', '); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
+ </div>
+ <?php endwhile; ?>
+ <?php if ( $wp_query->max_num_pages > 1 ) : ?>
+ <p><?php next_posts_link('&larr; Older posts'); ?> <?php previous_posts_link(' | Newer posts &rarr;'); ?></p>
+ <?php endif; ?>
+ <?php else : ?>
+ <h2>Not Found</h2>
+ <p>Sorry, but you are looking for something that isn't here.</p>
+ <?php endif; ?>
+ </div>
+</div>
+<?php get_footer(); ?>
View
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Template for posting and displaying comments
+ *
+ */
+?>
+<div id="comments">
+ <?php if ( have_comments() ) : ?>
+ <h3><?php comments_number( 'No responses', 'One response', '% responses' ); ?></h3>
+ <ol class="commentlist">
+ <?php wp_list_comments(); ?>
+ </ol>
+ <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
+ <span class="nav-previous"><?php previous_comments_link('&larr; Older Comments'); ?></span> <span class="nav-next"><?php next_comments_link('Newer Comments &rarr;'); ?></div>
+ <?php endif; ?>
+ <?php elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
+ <p>Comments are closed.</p>
+ <?php endif; ?>
+ <?php comment_form(); ?>
+</div>
View
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Footer Template
+ *
+ * Footer and copyright information along with gallery slider JavaScript calls.
+ */
+?>
+ <footer>
+ <div class="wrap">
+ <h3><?php bloginfo( 'name' ); ?></h3>
+ <?php $options = get_option('ws_intelligentsia_theme_options'); ?>
+ <?php if (!$options['copyright'] == '') { ?><p><?php echo esc_html($options['copyright']); ?></p><?php } ?>
+ <p>Powered by <a href="http://usewhitespace.com">Whitespace Intelligentsia</a></p>
+ </div>
+ </footer>
+ <?php if (is_front_page() || is_page_template('portfolio.php') || is_page_template('portfolio-alt.php')) { ?>
+ <script type="text/javascript">
+ /* <![CDATA[ */
+ $(window).load(function() {
+ $('#nivo-slider').nivoSlider({
+ effect: 'fade',
+ animSpeed: 400,
+ controlNav: false,
+ pauseTime: 10000
+ });
+ });
+ /* ]]> */
+ </script>
+ <?php } ?>
+ <?php wp_footer(); ?>
+</body>
+</html>
View
@@ -0,0 +1,174 @@
+<?php
+/**
+ * Whitespace Intelligentsia functions
+ *
+ * Sets up the theme and provides helper functions for various features
+ *
+ */
+
+/**
+ * Tell WordPress to run ws_intelligentsia_setup() when the 'after_setup_theme' hook is run.
+ */
+add_action( 'after_setup_theme', 'ws_intelligentsia_setup' );
+
+if ( ! function_exists( 'ws_intelligentsia_setup' ) ):
+/**
+ * Sets up theme defaults and registers support for WordPress features.
+ */
+function ws_intelligentsia_setup() {
+
+ if ( ! isset( $content_width ) ) $content_width = 852;
+
+ define( 'HEADER_TEXTCOLOR', '' );
+ define( 'HEADER_IMAGE', '%s/images/logo-placeholder.png' );
+ define( 'HEADER_IMAGE_WIDTH', 210 );
+ define( 'HEADER_IMAGE_HEIGHT', 100 );
+ define( 'NO_HEADER_TEXT', true );
+
+ add_theme_support('automatic-feed-links');
+ add_custom_image_header("", 'ws_intelligentsia_custom_admin_style');
+ register_nav_menu( 'main_navigation', 'Main Navigation' );
+
+}
+endif;
+
+/**
+ * Actions and filters for the theme options and custom CSS
+ */
+add_action('init', 'ws_intelligentsia_js');
+add_action('admin_init', 'ws_intelligentsia_custom_admin_style');
+add_action( 'admin_init', 'ws_intelligentsia_theme_options_init' );
+add_action( 'admin_menu', 'ws_intelligentsia_theme_options_add_page' );
+add_action('template_redirect', 'ws_intelligentsia_css_display');
+add_filter('query_vars', 'ws_intelligentsia_var');
+
+
+/**
+ * Register the homepage dynamic "sidebar"
+ */
+register_sidebar( array(
+ 'name' => 'Homepage Third',
+ 'id' => 'homepage-third',
+ 'before_widget' => '<aside>',
+ 'after_widget' => "</aside>",
+ 'before_title' => '<h2>',
+ 'after_title' => '</h2>',
+) );
+
+
+/**
+ * Use Google CDN JQuery 1.4.3 instead of the default 1.6.x
+ */
+function ws_intelligentsia_js() {
+ if (!is_admin()) {
+ wp_deregister_script( 'jquery' );
+ wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');
+ wp_register_script('nivo_slider',
+ get_template_directory_uri() . '/scripts/jquery.nivo.slider.pack.js',
+ array('jquery'),
+ '1.4.3' );
+ }
+}
+
+/**
+ * Register custom admin styles
+ */
+function ws_intelligentsia_custom_admin_style() {
+ wp_register_style('admin_style', get_template_directory_uri().'/admin.css');
+ wp_enqueue_style('admin_style');
+}
+
+/**
+ * Register theme options
+ */
+function ws_intelligentsia_theme_options_init() {
+ register_setting( 'ws_intelligentsia_options', 'ws_intelligentsia_theme_options', 'ws_intelligentsia_theme_options_validate' );
+}
+
+/**
+ * Create a new admin options page to control custom theme options
+ */
+function ws_intelligentsia_theme_options_add_page() {
+ add_theme_page( __( 'Theme Options' ), __( 'Theme Options' ), 'edit_theme_options', 'ws_intelligentsia_theme_options', 'ws_intelligentsia_theme_options_do_page' );
+}
+
+/**
+ * Create the admin options page
+ */
+function ws_intelligentsia_theme_options_do_page() {
+
+ if ( ! isset( $_REQUEST['settings-updated'] ) ) {
+ $_REQUEST['settings-updated'] = false;
+ } ?>
+ <div class="wrap">
+ <?php screen_icon(); echo "<h2>" . get_current_theme() . __( ' Theme Options' ) . "</h2>"; ?>
+
+ <?php if ( false !== $_REQUEST['settings-updated'] ) : ?>
+ <div class="updated fade"><p><strong>Theme settings saved!</strong></p></div>
+ <?php endif; ?>
+
+ <form method="post" action="options.php">
+ <h3>Style Options</h3>
+ <?php settings_fields( 'ws_intelligentsia_options' ); ?>
+ <?php $options = get_option( 'ws_intelligentsia_theme_options' ); ?>
+ <p><label class="description" for="ws_intelligentsia_theme_options[accent_color]">Accent Color</label><br /><input id="ws_intelligentsia_theme_options[accent_color]" type="text" name="ws_intelligentsia_theme_options[accent_color]" value="<?php esc_attr_e( $options['accent_color'] ); ?>" /></p>
+ <p><label class="description" for="ws_intelligentsia_theme_options[link_color]">Link Color</label><br /><input id="ws_intelligentsia_theme_options[link_color]" type="text" name="ws_intelligentsia_theme_options[link_color]" value="<?php esc_attr_e( $options['link_color'] ); ?>" /></p>
+ <h3>Site Options</h3>
+ <p><label class="description" for="ws_intelligentsia_theme_options[copyright]">Copyright</label><br /><input id="ws_intelligentsia_theme_options[copyright]" type="text" name="ws_intelligentsia_theme_options[copyright]" value="<?php esc_attr_e( $options['copyright'] ); ?>" size="100" /></p>
+ <h3>Social Links</h3>
+ <p><label class="description" for="ws_intelligentsia_theme_options[facebook]">Facebook URL</label><br /><input id="ws_intelligentsia_theme_options[facebook]" type="text" name="ws_intelligentsia_theme_options[facebook]" value="<?php esc_attr_e( $options['facebook'] ); ?>" size="50" /></p>
+ <p><label class="description" for="ws_intelligentsia_theme_options[twitter]">Twitter URL</label><br /><input id="ws_intelligentsia_theme_options[twitter]" type="text" name="ws_intelligentsia_theme_options[twitter]" value="<?php esc_attr_e( $options['twitter'] ); ?>" size="50" /></p>
+ <p><label class="description" for="ws_intelligentsia_theme_options[flickr]">Flickr URL</label><br /><input id="ws_intelligentsia_theme_options[flickr]" type="text" name="ws_intelligentsia_theme_options[flickr]" value="<?php esc_attr_e( $options['flickr'] ); ?>" size="50" /></p>
+ <p><label class="description" for="ws_intelligentsia_theme_options[formspring]">Formspring URL</label><br /><input id="ws_intelligentsia_theme_options[formspring]" type="text" name="ws_intelligentsia_theme_options[formspring]" value="<?php esc_attr_e( $options['formspring'] ); ?>" size="50" /></p>
+ <p><label class="description" for="ws_intelligentsia_theme_options[pin]">Pinterest URL</label><br /><input id="ws_intelligentsia_theme_options[pin]" type="text" name="ws_intelligentsia_theme_options[pin]" value="<?php esc_attr_e( $options['pin'] ); ?>" size="50" /></p>
+ <p class="submit"><input type="submit" class="button-primary" value="Save Options" /></p>
+ </form>
+ </div>
+ <?php
+}
+
+/**
+ * Sanitize and validate input (safety first!)
+ */
+function ws_intelligentsia_theme_options_validate( $input ) {
+ $input['accent_color'] = wp_filter_nohtml_kses( $input['accent_color'] );
+ $input['link_color'] = wp_filter_nohtml_kses( $input['link_color'] );
+ $input['copyright'] = wp_filter_nohtml_kses( $input['copyright'] );
+ $input['facebook'] = esc_url_raw( $input['facebook'] );
+ $input['twitter'] = esc_url_raw( $input['twitter'] );
+ $input['flickr'] = esc_url_raw( $input['flickr'] );
+ $input['formspring'] = esc_url_raw( $input['formspring'] );
+ $input['pin'] = esc_url_raw( $input['pin'] );
+ return $input;
+}
+
+/**
+ * Custom variable for user-controlled CSS
+ */
+function ws_intelligentsia_var($public_query_vars) {
+ $public_query_vars[] = 'ws_intelligentsia_custom_var';
+ return $public_query_vars;
+}
+
+/**
+ * Use custom CSS
+ */
+function ws_intelligentsia_css_display() {
+ $css = get_query_var('ws_intelligentsia_custom_var');
+ if ($css == 'css') {
+ include_once (TEMPLATEPATH . '/style-options.php');
+ exit; //This stops WP from loading any further
+ }
+}
+
+/**
+ * Retrieve a category ID based on the name
+ */
+function get_category_id($cat_name) {
+ $term = get_term_by('name', $cat_name, 'category');
+ if ($term) {
+ return $term->term_id;
+ } else {
+ return 0;
+ }
+}
View
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Header Template
+ *
+ * Displays the proper HTML5 bits along with the masthead and navigation.
+ */
+?>
+<!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
+ <meta charset="<?php bloginfo( 'charset' ); ?>" />
+ <title><?php wp_title( '|', true, 'right' ); ?> <?php bloginfo( 'name' ); ?></title>
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
+ <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/stylesheets/screen.css" media="screen" />
+ <link rel="stylesheet" href="<?php echo home_url(); ?>/?ws_intelligentsia_custom_var=css" type="text/css" media="screen" />
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
+ <!--[if lt IE 9]>
+ <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
+ <?php if ( is_front_page() || is_page_template('portfolio.php') || is_page_template('portfolio-alt.php') ) wp_enqueue_script( 'nivo_slider' ); ?>
+ <?php wp_head(); ?>
+</head>
+<body <?php body_class(); ?>>
+ <div class="wrap">
+ <header id="masthead">
+ <h1><a title="<?php bloginfo( 'name' ); ?>" href="/"><?php bloginfo( 'name' ); ?></a></h1>
+ <nav>
+ <?php wp_nav_menu(array('container' => '')); ?>
+ </nav>
+ <?php $options = get_option('ws_intelligentsia_theme_options'); ?>
+ <ul class="social">
+ <?php if (!$options['twitter'] == '') { ?><li><a class="twitter" title="Twitter" href="<?php echo esc_url($options['twitter']); ?>">Twitter</a></li><?php } ?>
+ <?php if (!$options['facebook'] == '') { ?><li><a class="facebook" title="Facebook" href="<?php echo esc_url($options['facebook']); ?>">Facebook</a></li><?php } ?>
+ <?php if (!$options['flickr'] == '') { ?><li><a class="flickr" title="Flickr" href="<?php echo esc_url($options['flickr']); ?>">Flickr</a></li><?php } ?>
+ <?php if (!$options['formspring'] == '') { ?><li><a class="formspring" title="Formspring" href="<?php echo esc_url($options['formspring']); ?>">Formspring</a></li><?php } ?>
+ <?php if (!$options['pin'] == '') { ?><li><a class="pin" title="Pinterest" href="<?php echo esc_url($options['pin']); ?>">Pinterest</a></li><?php } ?>
+ <li><a class="rss" title="" href="<?php bloginfo('rss2_url'); ?>">RSS Feed</a></li>
+ </ul>
+ </header>
View
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Template Name: Static homepage
+ *
+ * If the blog is in a sub-directory (/blog), this page will act as the site index.
+ */
+?>
+<?php get_header(); ?>
+ <section id="showcase">
+ <div id="nivo-slider">
+ <?php
+ $homepage_gallery_images =& get_children( 'post_type=attachment&post_mime_type=image&order=ASC' );
+ foreach ( (array) $homepage_gallery_images as $attachment_id => $attachment ) {
+ if (preg_match("/\bhomepage\b/i", $attachment->post_excerpt)) {
+ echo "<img alt=\"\" src=\"" . wp_get_attachment_url($attachment_id) . "\" />";
+ }
+ }
+ ?>
+ </div>
+ </section>
+ <section id="content">
+ <?php while ( have_posts() ) : the_post(); ?>
+ <?php the_content(); ?>
+ <?php endwhile; ?>
+ </section>
+ <section id="sidebar" class="featured">
+ <?php if ( ! dynamic_sidebar( 'homepage-third' ) ) : ?>
+ <?php if (get_category_id("featured")) { ?>
+ <?php $myposts = get_posts('numberposts=4&category=' . get_category_id("featured") . '') ?>
+ <h2>Featured</h2>
+ <ul>
+ <?php foreach( $myposts as $post ) : setup_postdata($post); ?>
+ <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
+ <?php endforeach; ?>
+ </ul>
+ <?php } ?>
+ <?php endif; ?>
+ </section>
+</div>
+<?php get_footer(); ?>
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit b7af37b

Please sign in to comment.