initial thing
This commit is contained in:
commit
da25a72a19
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* text=auto
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
node_modules/
|
||||||
|
temp/
|
21
.jshintrc
Normal file
21
.jshintrc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"node": true,
|
||||||
|
"esnext": true,
|
||||||
|
"bitwise": true,
|
||||||
|
"camelcase": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"immed": true,
|
||||||
|
"indent": 4,
|
||||||
|
"latedef": true,
|
||||||
|
"newcap": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "single",
|
||||||
|
"regexp": true,
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
"strict": true,
|
||||||
|
"trailing": true,
|
||||||
|
"smarttabs": true,
|
||||||
|
"white": true
|
||||||
|
}
|
8
.travis.yml
Normal file
8
.travis.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- '0.8'
|
||||||
|
- '0.10'
|
||||||
|
before_install:
|
||||||
|
- currentfolder=${PWD##*/}
|
||||||
|
- if [ "$currentfolder" != 'generator-johnpress' ]; then cd .. && eval "mv $currentfolder generator-johnpress" && cd generator-johnpress; fi
|
||||||
|
|
20
LICENSE
Normal file
20
LICENSE
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Copyright 2013 John Bintz
|
||||||
|
|
||||||
|
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.
|
47
README.md
Normal file
47
README.md
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# generator-johnpress [![Build Status](https://secure.travis-ci.org/johnbintz/generator-johnpress.png?branch=master)](https://travis-ci.org/johnbintz/generator-johnpress)
|
||||||
|
|
||||||
|
A generator for [Yeoman](http://yeoman.io).
|
||||||
|
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
### What is Yeoman?
|
||||||
|
|
||||||
|
Trick question. It's not a thing. It's this guy:
|
||||||
|
|
||||||
|
![](http://i.imgur.com/JHaAlBJ.png)
|
||||||
|
|
||||||
|
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
|
||||||
|
|
||||||
|
Not every new computer comes with a Yeoman pre-installed. He lives in the [npm](https://npmjs.org) package repository. You only have to ask for him once, then he packs up and moves into your hard drive. *Make sure you clean up, he likes new and shiny things.*
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install -g yo
|
||||||
|
```
|
||||||
|
|
||||||
|
### Yeoman Generators
|
||||||
|
|
||||||
|
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
|
||||||
|
|
||||||
|
To install generator-johnpress from npm, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm install -g generator-johnpress
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, initiate the generator:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ yo johnpress
|
||||||
|
```
|
||||||
|
|
||||||
|
### Getting To Know Yeoman
|
||||||
|
|
||||||
|
Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.
|
||||||
|
|
||||||
|
If you'd like to get to know Yeoman better and meet some of his friends, [Grunt](http://gruntjs.com) and [Bower](http://bower.io), check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
|
54
app/index.coffee
Normal file
54
app/index.coffee
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
'use strict';
|
||||||
|
path = require('path')
|
||||||
|
util = require('util')
|
||||||
|
yeoman = require('yeoman-generator')
|
||||||
|
|
||||||
|
class JohnpressGenerator extends yeoman.generators.Base
|
||||||
|
constructor: (args, options, config) ->
|
||||||
|
super(args, options, config)
|
||||||
|
|
||||||
|
@on 'end', ->
|
||||||
|
@installDependencies {
|
||||||
|
skipInstall: options['skip-install'],
|
||||||
|
callback: =>
|
||||||
|
process.chdir @themeName
|
||||||
|
@spawnCommand('bundle', [ 'install' ])
|
||||||
|
@spawnCommand('npm', [ 'install' ])
|
||||||
|
@spawnCommand('bower', [ 'install' ])
|
||||||
|
}
|
||||||
|
|
||||||
|
@pkg = JSON.parse(@readFileAsString(path.join(__dirname, '../package.json')))
|
||||||
|
|
||||||
|
askFor: ->
|
||||||
|
cb = @async()
|
||||||
|
|
||||||
|
# have Yeoman greet the user.
|
||||||
|
console.log(@yeoman);
|
||||||
|
|
||||||
|
prompts = [
|
||||||
|
{
|
||||||
|
name: 'themeName',
|
||||||
|
message: 'What is the name of your theme?'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
@prompt prompts, (props) =>
|
||||||
|
@themeName = props.themeName
|
||||||
|
|
||||||
|
cb()
|
||||||
|
|
||||||
|
app: ->
|
||||||
|
@mkdir @themeName
|
||||||
|
@directory 'theme/naked-wordpress-master', @themeName
|
||||||
|
@directory 'sass', "#{@themeName}/sass"
|
||||||
|
|
||||||
|
@template('_package.json', "#{@themeName}/package.json");
|
||||||
|
@template('_bower.json', "#{@themeName}/bower.json");
|
||||||
|
@template('_Gemfile', "#{@themeName}/Gemfile");
|
||||||
|
@template('_Gruntfile.coffee', "#{@themeName}/Gruntfile.coffee");
|
||||||
|
|
||||||
|
projectfiles: ->
|
||||||
|
@copy('editorconfig', "#{@themeName}/.editorconfig");
|
||||||
|
@copy('jshintrc', "#{@themeName}/.jshintrc");
|
||||||
|
|
||||||
|
module.exports = JohnpressGenerator
|
2
app/index.js
Normal file
2
app/index.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require('coffee-script');
|
||||||
|
module.exports = require('./index.coffee');
|
3
app/templates/_Gemfile
Normal file
3
app/templates/_Gemfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
gem 'compass'
|
23
app/templates/_Gruntfile.coffee
Normal file
23
app/templates/_Gruntfile.coffee
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
module.exports = (grunt) ->
|
||||||
|
require('matchdep').filter('grunt-*').forEach(grunt.loadNpmTasks)
|
||||||
|
|
||||||
|
grunt.initConfig {
|
||||||
|
compass:
|
||||||
|
dev:
|
||||||
|
options:
|
||||||
|
sassDir: 'sass'
|
||||||
|
cssDir: 'css'
|
||||||
|
importPath: [ 'bower_components/sass-bootstrap/lib' ]
|
||||||
|
copy:
|
||||||
|
css:
|
||||||
|
files: [
|
||||||
|
{ src: 'css/style.css', dest: 'style.css' }
|
||||||
|
]
|
||||||
|
watch:
|
||||||
|
sass:
|
||||||
|
files: [ 'sass/**/*.scss' ]
|
||||||
|
tasks: [ 'css' ]
|
||||||
|
}
|
||||||
|
|
||||||
|
grunt.registerTask 'css', [ 'compass', 'copy:css' ]
|
||||||
|
grunt.registerTask 'default', [ 'watch' ]
|
8
app/templates/_bower.json
Normal file
8
app/templates/_bower.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "<%= themeName %>",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"sass-bootstrap": "~3.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
13
app/templates/_package.json
Normal file
13
app/templates/_package.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "<%= themeName %>",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"grunt": "~0.4.1",
|
||||||
|
"grunt-contrib-compass": "~0.6.0",
|
||||||
|
"grunt-contrib-copy": "~0.4.1",
|
||||||
|
"grunt-concurrent": "~0.4.1",
|
||||||
|
"grunt-contrib-watch": "~0.5.3",
|
||||||
|
"matchdep": "~0.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
13
app/templates/editorconfig
Normal file
13
app/templates/editorconfig
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
21
app/templates/jshintrc
Normal file
21
app/templates/jshintrc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"node": true,
|
||||||
|
"esnext": true,
|
||||||
|
"bitwise": true,
|
||||||
|
"camelcase": true,
|
||||||
|
"curly": true,
|
||||||
|
"eqeqeq": true,
|
||||||
|
"immed": true,
|
||||||
|
"indent": 4,
|
||||||
|
"latedef": true,
|
||||||
|
"newcap": true,
|
||||||
|
"noarg": true,
|
||||||
|
"quotmark": "single",
|
||||||
|
"regexp": true,
|
||||||
|
"undef": true,
|
||||||
|
"unused": true,
|
||||||
|
"strict": true,
|
||||||
|
"trailing": true,
|
||||||
|
"smarttabs": true,
|
||||||
|
"white": true
|
||||||
|
}
|
2
app/templates/sass/style.scss
Normal file
2
app/templates/sass/style.scss
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@import bootstrap;
|
||||||
|
|
2
app/templates/theme/naked-wordpress-master/README.md
Normal file
2
app/templates/theme/naked-wordpress-master/README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
naked-wordpress
|
||||||
|
===============
|
28
app/templates/theme/naked-wordpress-master/footer.php
Normal file
28
app/templates/theme/naked-wordpress-master/footer.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* This template will be called by all other template files to finish
|
||||||
|
/* rendering the page and display the footer area/content
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div><!-- / end page container, begun in the header -->
|
||||||
|
|
||||||
|
<footer class="site-footer" role="contentinfo">
|
||||||
|
<div class="site-info container">
|
||||||
|
|
||||||
|
<p>Birthed <a href="http://bckmn.com/naked-wordpress" rel="theme">Naked</a>
|
||||||
|
on <a href="http://wordpress.org" rel="generator">Wordpress</a>
|
||||||
|
by <a href="http://bckmn.com" rel="designer">Joshua Beckman</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div><!-- .site-info -->
|
||||||
|
</footer><!-- #colophon .site-footer -->
|
||||||
|
|
||||||
|
<?php wp_footer();
|
||||||
|
// This fxn allows plugins to insert themselves/scripts/css/files (right here) into the footer of your website.
|
||||||
|
// Removing this fxn call will disable all kinds of plugins.
|
||||||
|
// Move it if you like, but keep it around.
|
||||||
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
60
app/templates/theme/naked-wordpress-master/functions.php
Executable file
60
app/templates/theme/naked-wordpress-master/functions.php
Executable file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* This file will be referenced every time a template/page loads on your Wordpress site
|
||||||
|
/* This is the place to define custom fxns and specialty code
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
// Define the version so we can easily replace it throughout the theme
|
||||||
|
define( 'NAKED_VERSION', 1.0 );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* Add Rss feed support to Head section
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
add_theme_support( 'automatic-feed-links' );
|
||||||
|
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* Register main menu for Wordpress use
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
register_nav_menus(
|
||||||
|
array(
|
||||||
|
'primary' => __( 'Primary Menu', 'naked' ), // Register the Primary menu
|
||||||
|
// Copy and paste the line above right here if you want to make another menu,
|
||||||
|
// just change the 'primary' to another name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* Activate sidebar for Wordpress use
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
function naked_register_sidebars() {
|
||||||
|
register_sidebar(array( // Start a series of sidebars to register
|
||||||
|
'id' => 'sidebar', // Make an ID
|
||||||
|
'name' => 'Sidebar', // Name it
|
||||||
|
'description' => 'Take it on the side...', // Dumb description for the admin side
|
||||||
|
'before_widget' => '<div>', // What to display before each widget
|
||||||
|
'after_widget' => '</div>', // What to display following each widget
|
||||||
|
'before_title' => '<h3 class="side-title">', // What to display before each widget's title
|
||||||
|
'after_title' => '</h3>', // What to display following each widget's title
|
||||||
|
'empty_title'=> '', // What to display in the case of no title defined for a widget
|
||||||
|
// Copy and paste the lines above right here if you want to make another sidebar,
|
||||||
|
// just change the values of id and name to another word/name
|
||||||
|
));
|
||||||
|
}
|
||||||
|
// adding sidebars to Wordpress (these are created in functions.php)
|
||||||
|
add_action( 'widgets_init', 'naked_register_sidebars' );
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* Enqueue Styles and Scripts
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function naked_scripts() {
|
||||||
|
|
||||||
|
// get the theme directory style.css and link to it in the header
|
||||||
|
wp_enqueue_style( 'naked-style', get_template_directory_uri() . '/style.css', '10000', 'all' );
|
||||||
|
|
||||||
|
// add theme scripts
|
||||||
|
wp_enqueue_script( 'naked', get_template_directory_uri() . '/theme.min.js', array(), NAKED_VERSION, true );
|
||||||
|
|
||||||
|
}
|
||||||
|
add_action( 'wp_enqueue_scripts', 'naked_scripts' ); // Register this fxn and allow Wordpress to call it automatcally in the header
|
69
app/templates/theme/naked-wordpress-master/header.php
Normal file
69
app/templates/theme/naked-wordpress-master/header.php
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* This template will be called by all other template files to begin
|
||||||
|
/* rendering the page and display the header/nav
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>
|
||||||
|
<?php bloginfo('name'); // show the blog name, from settings ?> |
|
||||||
|
<?php is_front_page() ? bloginfo('description') : wp_title(''); // if we're on the home page, show the description, from the site's settings - otherwise, show the title of the post or page ?>
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
||||||
|
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
||||||
|
<?php // We are loading our theme directory style.css by queuing scripts in our functions.php file,
|
||||||
|
// so if you want to load other stylesheets,
|
||||||
|
// I would load them with an @import call in your style.css
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<?php wp_head();
|
||||||
|
// This fxn allows plugins, and Wordpress itself, to insert themselves/scripts/css/files
|
||||||
|
// (right here) into the head of your website.
|
||||||
|
// Removing this fxn call will disable all kinds of plugins and Wordpress default insertions.
|
||||||
|
// Move it if you like, but I would keep it around.
|
||||||
|
?>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body
|
||||||
|
<?php body_class();
|
||||||
|
// This will display a class specific to whatever is being loaded by Wordpress
|
||||||
|
// i.e. on a home page, it will return [class="home"]
|
||||||
|
// on a single post, it will return [class="single postid-{ID}"]
|
||||||
|
// and the list goes on. Look it up if you want more.
|
||||||
|
?>
|
||||||
|
>
|
||||||
|
|
||||||
|
<header id="masthead" class="site-header" role="banner">
|
||||||
|
<div class="container center">
|
||||||
|
|
||||||
|
<nav role="navigation" class="site-navigation main-navigation">
|
||||||
|
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); // Display the user-defined menu in Appearance > Menus ?>
|
||||||
|
</nav><!-- .site-navigation .main-navigation -->
|
||||||
|
</div>
|
||||||
|
<div class="center">
|
||||||
|
|
||||||
|
<div id="brand">
|
||||||
|
<h1 class="site-title">
|
||||||
|
<a href="<?php echo esc_url( home_url( '/' ) ); // Link to the home page ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); // Title it with the blog name ?>" rel="home"><?php bloginfo( 'name' ); // Display the blog name ?></a>
|
||||||
|
</h1>
|
||||||
|
<h4 class="site-description">
|
||||||
|
<?php bloginfo( 'description' ); // Display the blog description, found in General Settings ?>
|
||||||
|
</h4>
|
||||||
|
</div><!-- /brand -->
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div><!--/container -->
|
||||||
|
|
||||||
|
</header><!-- #masthead .site-header -->
|
||||||
|
|
||||||
|
<div class="main-fluid"><!-- start the page containter -->
|
75
app/templates/theme/naked-wordpress-master/index.php
Executable file
75
app/templates/theme/naked-wordpress-master/index.php
Executable file
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying the home/index page.
|
||||||
|
* This template will also be called in any case where the Wordpress engine
|
||||||
|
* doesn't know which template to use (e.g. 404 error)
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); // This fxn gets the header.php file and renders it ?>
|
||||||
|
<div id="primary" class="row-fluid">
|
||||||
|
<div id="content" role="main" class="span8 offset2">
|
||||||
|
|
||||||
|
<?php if ( have_posts() ) :
|
||||||
|
// Do we have any posts in the databse that match our query?
|
||||||
|
// In the case of the home page, this will call for the most recent posts
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php while ( have_posts() ) : the_post();
|
||||||
|
// If we have some posts to show, start a loop that will display each one the same way
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article class="post">
|
||||||
|
|
||||||
|
<h1 class="title">
|
||||||
|
<a href="<?php the_permalink(); // Get the link to this post ?>" title="<?php the_title(); ?>">
|
||||||
|
<?php the_title(); // Show the title of the posts as a link ?>
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
<div class="post-meta">
|
||||||
|
<?php the_time('m/d/Y'); // Display the time published ?> |
|
||||||
|
<?php if( comments_open() ) : // If we have comments open on this post, display a link and count of them ?>
|
||||||
|
<span class="comments-link">
|
||||||
|
<?php comments_popup_link( __( 'Comment', 'break' ), __( '1 Comment', 'break' ), __( '% Comments', 'break' ) );
|
||||||
|
// Display the comment count with the applicable pluralization
|
||||||
|
?>
|
||||||
|
</span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div><!--/post-meta -->
|
||||||
|
|
||||||
|
<div class="the-content">
|
||||||
|
<?php the_content( 'Continue...' );
|
||||||
|
// This call the main content of the post, the stuff in the main text box while composing.
|
||||||
|
// This will wrap everything in p tags and show a link as 'Continue...' where/if the
|
||||||
|
// author inserted a <!-- more --> link in the post body
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php wp_link_pages(); // This will display pagination links, if applicable to the post ?>
|
||||||
|
</div><!-- the-content -->
|
||||||
|
|
||||||
|
<div class="meta clearfix">
|
||||||
|
<div class="category"><?php echo get_the_category_list(); // Display the categories this post belongs to, as links ?></div>
|
||||||
|
<div class="tags"><?php echo get_the_tag_list( '| ', ' ' ); // Display the tags this post has, as links separated by spaces and pipes ?></div>
|
||||||
|
</div><!-- Meta -->
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endwhile; // OK, let's stop the posts loop once we've exhausted our query/number of posts ?>
|
||||||
|
|
||||||
|
<!-- pagintation -->
|
||||||
|
<div id="pagination" class="clearfix">
|
||||||
|
<div class="past-page"><?php previous_posts_link( 'newer' ); // Display a link to newer posts, if there are any, with the text 'newer' ?></div>
|
||||||
|
<div class="next-page"><?php next_posts_link( 'older' ); // Display a link to older posts, if there are any, with the text 'older' ?></div>
|
||||||
|
</div><!-- pagination -->
|
||||||
|
|
||||||
|
|
||||||
|
<?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
|
||||||
|
|
||||||
|
<article class="post error">
|
||||||
|
<h1 class="404">Nothing has been posted like that yet</h1>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endif; // OK, I think that takes care of both scenarios (having posts or not having any posts) ?>
|
||||||
|
</div><!-- #content .site-content -->
|
||||||
|
</div><!-- #primary .content-area -->
|
||||||
|
<?php get_footer(); // This fxn gets the footer.php file and renders it ?>
|
53
app/templates/theme/naked-wordpress-master/page-home.php
Normal file
53
app/templates/theme/naked-wordpress-master/page-home.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Sidebar/Home Page
|
||||||
|
*
|
||||||
|
* This page template has a sidebar built into it,
|
||||||
|
* and can be used as a home page, in which case the title will not show up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
get_header(); // This fxn gets the header.php file and renders it ?>
|
||||||
|
<div id="primary" class="row-fluid">
|
||||||
|
<div id="content" role="main" class="span8">
|
||||||
|
<?php if ( have_posts() ) :
|
||||||
|
// Do we have any posts/pages in the databse that match our query?
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php while ( have_posts() ) : the_post();
|
||||||
|
// If we have a page to show, start a loop that will display it
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article class="post">
|
||||||
|
|
||||||
|
<?php if (!is_front_page()) : // Only if this page is NOT being used as a home page, display the title ?>
|
||||||
|
<h1 class='title'>
|
||||||
|
<?php the_title(); // Display the page title ?>
|
||||||
|
</h1>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="the-content">
|
||||||
|
<?php the_content();
|
||||||
|
// This call the main content of the page, the stuff in the main text box while composing.
|
||||||
|
// This will wrap everything in paragraph tags
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php wp_link_pages(); // This will display pagination links, if applicable to the page ?>
|
||||||
|
</div><!-- the-content -->
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endwhile; // OK, let's stop the page loop once we've displayed it ?>
|
||||||
|
|
||||||
|
<?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
|
||||||
|
|
||||||
|
<article class="post error">
|
||||||
|
<h1 class="404">Nothing has been posted like that yet</h1>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endif; // OK, I think that takes care of both scenarios (having a page or not having a page to show) ?>
|
||||||
|
</div><!-- #content .site-content -->
|
||||||
|
<div id="sidebar" role="sidebar" class="span4">
|
||||||
|
<?php get_sidebar(); // This will display whatever we have written in the sidebar.php file, according to admin widget settings ?>
|
||||||
|
</div><!-- #sidebar -->
|
||||||
|
</div><!-- #primary .content-area -->
|
||||||
|
<?php get_footer(); // This fxn gets the footer.php file and renders it ?>
|
46
app/templates/theme/naked-wordpress-master/page.php
Normal file
46
app/templates/theme/naked-wordpress-master/page.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying any single page.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); // This fxn gets the header.php file and renders it ?>
|
||||||
|
<div id="primary" class="row-fluid">
|
||||||
|
<div id="content" role="main" class="span8 offset2">
|
||||||
|
|
||||||
|
<?php if ( have_posts() ) :
|
||||||
|
// Do we have any posts/pages in the databse that match our query?
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php while ( have_posts() ) : the_post();
|
||||||
|
// If we have a page to show, start a loop that will display it
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article class="post">
|
||||||
|
|
||||||
|
<h1 class="title"><?php the_title(); // Display the title of the page ?></h1>
|
||||||
|
|
||||||
|
<div class="the-content">
|
||||||
|
<?php the_content();
|
||||||
|
// This call the main content of the page, the stuff in the main text box while composing.
|
||||||
|
// This will wrap everything in p tags
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php wp_link_pages(); // This will display pagination links, if applicable to the page ?>
|
||||||
|
</div><!-- the-content -->
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endwhile; // OK, let's stop the page loop once we've displayed it ?>
|
||||||
|
|
||||||
|
<?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
|
||||||
|
|
||||||
|
<article class="post error">
|
||||||
|
<h1 class="404">Nothing posted yet</h1>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endif; // OK, I think that takes care of both scenarios (having a page or not having a page to show) ?>
|
||||||
|
|
||||||
|
</div><!-- #content .site-content -->
|
||||||
|
</div><!-- #primary .content-area -->
|
||||||
|
<?php get_footer(); // This fxn gets the footer.php file and renders it ?>
|
BIN
app/templates/theme/naked-wordpress-master/screenshot.png
Normal file
BIN
app/templates/theme/naked-wordpress-master/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
26
app/templates/theme/naked-wordpress-master/sidebar.php
Normal file
26
app/templates/theme/naked-wordpress-master/sidebar.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This is the sidebar!
|
||||||
|
*
|
||||||
|
* This file will render the sidebar, as defined by the user in the admin area
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<?php if ( ! dynamic_sidebar( 'sidebar' ) ) : // If the user hasn't defined any specific widgets in the admin yet, display a couple dummy widgets, as written below ?>
|
||||||
|
<aside id="archives" class="widget">
|
||||||
|
<h3 class="side-title"><?php _e( 'Archives', 'naked' ); // Wordpress archives widget ?></h3>
|
||||||
|
<ul>
|
||||||
|
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<aside id="meta" class="widget">
|
||||||
|
<h3 class="side-title"><?php _e( 'Meta', 'naked' ); // Wordpress meta widget ?></h3>
|
||||||
|
<ul>
|
||||||
|
<?php wp_register(); ?>
|
||||||
|
<li><?php wp_loginout(); ?></li>
|
||||||
|
<?php wp_meta(); ?>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<?php endif; // end sidebar widget area ?>
|
63
app/templates/theme/naked-wordpress-master/single.php
Normal file
63
app/templates/theme/naked-wordpress-master/single.php
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying any single post.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); // This fxn gets the header.php file and renders it ?>
|
||||||
|
<div id="primary" class="row-fluid">
|
||||||
|
<div id="content" role="main" class="span8 offset2">
|
||||||
|
|
||||||
|
<?php if ( have_posts() ) :
|
||||||
|
// Do we have any posts in the databse that match our query?
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php while ( have_posts() ) : the_post();
|
||||||
|
// If we have a post to show, start a loop that will display it
|
||||||
|
?>
|
||||||
|
|
||||||
|
<article class="post">
|
||||||
|
|
||||||
|
<h1 class="title"><?php the_title(); // Display the title of the post ?></h1>
|
||||||
|
<div class="post-meta">
|
||||||
|
<?php the_time('m.d.Y'); // Display the time it was published ?>
|
||||||
|
<?php // the author(); Uncomment this and it will display the post author ?>
|
||||||
|
|
||||||
|
</div><!--/post-meta -->
|
||||||
|
|
||||||
|
<div class="the-content">
|
||||||
|
<?php the_content();
|
||||||
|
// This call the main content of the post, the stuff in the main text box while composing.
|
||||||
|
// This will wrap everything in p tags
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php wp_link_pages(); // This will display pagination links, if applicable to the post ?>
|
||||||
|
</div><!-- the-content -->
|
||||||
|
|
||||||
|
<div class="meta clearfix">
|
||||||
|
<div class="category"><?php echo get_the_category_list(); // Display the categories this post belongs to, as links ?></div>
|
||||||
|
<div class="tags"><?php echo get_the_tag_list( '| ', ' ' ); // Display the tags this post has, as links separated by spaces and pipes ?></div>
|
||||||
|
</div><!-- Meta -->
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endwhile; // OK, let's stop the post loop once we've displayed it ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the default comment template provided by Wordpress
|
||||||
|
if ( comments_open() || '0' != get_comments_number() )
|
||||||
|
comments_template( '', true );
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
|
||||||
|
|
||||||
|
<article class="post error">
|
||||||
|
<h1 class="404">Nothing has been posted like that yet</h1>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php endif; // OK, I think that takes care of both scenarios (having a post or not having a post to show) ?>
|
||||||
|
|
||||||
|
</div><!-- #content .site-content -->
|
||||||
|
</div><!-- #primary .content-area -->
|
||||||
|
<?php get_footer(); // This fxn gets the footer.php file and renders it ?>
|
41
package.json
Normal file
41
package.json
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"name": "generator-johnpress",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "A generator for Yeoman",
|
||||||
|
"keywords": [
|
||||||
|
"yeoman-generator"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/johnbintz/generator-johnpress",
|
||||||
|
"bugs": "https://github.com/johnbintz/generator-johnpress/issues",
|
||||||
|
"author": {
|
||||||
|
"name": "John Bintz",
|
||||||
|
"email": "",
|
||||||
|
"url": "https://github.com/johnbintz"
|
||||||
|
},
|
||||||
|
"main": "app/index.js",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/johnbintz/generator-johnpress.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "mocha"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"yeoman-generator": "~0.13.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"mocha": "~1.12.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"yo": ">=1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.0",
|
||||||
|
"npm": ">=1.2.10"
|
||||||
|
},
|
||||||
|
"licenses": [
|
||||||
|
{
|
||||||
|
"type": "MIT"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
38
test/test-creation.js
Normal file
38
test/test-creation.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*global describe, beforeEach, it*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var path = require('path');
|
||||||
|
var helpers = require('yeoman-generator').test;
|
||||||
|
|
||||||
|
|
||||||
|
describe('johnpress generator', function () {
|
||||||
|
beforeEach(function (done) {
|
||||||
|
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
|
||||||
|
if (err) {
|
||||||
|
return done(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.app = helpers.createGenerator('johnpress:app', [
|
||||||
|
'../../app'
|
||||||
|
]);
|
||||||
|
done();
|
||||||
|
}.bind(this));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('creates expected files', function (done) {
|
||||||
|
var expected = [
|
||||||
|
// add files you expect to exist here.
|
||||||
|
'.jshintrc',
|
||||||
|
'.editorconfig'
|
||||||
|
];
|
||||||
|
|
||||||
|
helpers.mockPrompt(this.app, {
|
||||||
|
'someOption': true
|
||||||
|
});
|
||||||
|
this.app.options['skip-install'] = true;
|
||||||
|
this.app.run({}, function () {
|
||||||
|
helpers.assertFiles(expected);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
11
test/test-load.js
Normal file
11
test/test-load.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*global describe, beforeEach, it*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var assert = require('assert');
|
||||||
|
|
||||||
|
describe('johnpress generator', function () {
|
||||||
|
it('can be imported without blowing up', function () {
|
||||||
|
var app = require('../app');
|
||||||
|
assert(app !== undefined);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user