marv 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/layouts/config/config.tt +3 -2
- data/layouts/default/functions/functions.php.erb +137 -19
- data/layouts/default/images/screenshot.png +0 -0
- data/layouts/default/includes/filters-admin.php.erb +62 -0
- data/layouts/default/includes/filters.php.erb +118 -0
- data/layouts/default/includes/helpers.php.erb +132 -0
- data/layouts/default/javascripts/admin.coffee +0 -0
- data/layouts/default/javascripts/admin.js +1 -1
- data/layouts/default/javascripts/theme.coffee +0 -0
- data/layouts/default/javascripts/theme.js +1 -1
- data/layouts/default/stylesheets/_header.scss.erb +6 -6
- data/layouts/default/stylesheets/style.css.scss.erb +1 -29
- data/layouts/default/templates/404.php.erb +23 -8
- data/layouts/default/templates/archive.php.erb +37 -9
- data/layouts/default/templates/author.php.erb +36 -0
- data/layouts/default/templates/footer.php +17 -6
- data/layouts/default/templates/header.php +44 -0
- data/layouts/default/templates/index.php +19 -2
- data/layouts/default/templates/page.php +17 -12
- data/layouts/default/templates/partials/comments.php.erb +50 -0
- data/layouts/default/templates/partials/content-none.php.erb +19 -0
- data/layouts/default/templates/partials/content-page.php +9 -0
- data/layouts/default/templates/partials/content-single.php +9 -0
- data/layouts/default/templates/partials/content.php.erb +16 -0
- data/layouts/default/templates/partials/searchform.php.erb +5 -0
- data/layouts/default/templates/partials/sidebar.php +7 -0
- data/layouts/default/templates/search.php.erb +31 -10
- data/layouts/default/templates/single.php +26 -0
- data/lib/marv/generator.rb +20 -0
- data/marv.gemspec +18 -9
- metadata +18 -9
- data/layouts/default/stylesheets/_reset.scss +0 -5
- data/layouts/default/stylesheets/_typography.scss +0 -5
- data/layouts/default/templates/attachment.php.erb +0 -32
- data/layouts/default/templates/comments.php +0 -2
- data/layouts/default/templates/header.php.erb +0 -30
- data/layouts/default/templates/partials/loop.php.erb +0 -36
- data/layouts/default/templates/sidebar.php +0 -9
- data/layouts/default/templates/single.php.erb +0 -30
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
//=require 'admin'
|
File without changes
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
//=require 'theme'
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
* Theme Name: <%= config[:name] %>
|
1
|
+
/*!
|
2
|
+
* Theme Name: <%= config[:name].capitalize %>
|
3
3
|
* Theme URI: <%= config[:uri] %>
|
4
4
|
* Author: <%= config[:author] %>
|
5
5
|
* Author URI: <%= config[:author_uri] %>
|
6
|
-
* Description: <%= config[:description]
|
7
|
-
* Version: <%= config[:version_number]
|
6
|
+
* Description: <%= if config[:description] then config[:description] else 'Wordpress theme made with Marv.' end %>
|
7
|
+
* Version: <%= if config[:version_number] then config[:version_number] else '0.1' end %>
|
8
8
|
<% if config[:template] -%>
|
9
9
|
* Template: <%= config[:template] %>
|
10
10
|
<% end -%>
|
11
|
-
* License: <%= config[:license_name]
|
12
|
-
* License URI: <%= config[:license_uri]
|
11
|
+
* License: <%= if config[:license_name] then config[:license_name] else 'GPLv3' end %>
|
12
|
+
* License URI: <%= if config[:license_uri] then config[:license_uri] else 'http://www.gnu.org/copyleft/gpl.html' end %>
|
13
13
|
* Tags: <%= config[:tags].join(", ") if config[:tags] %>
|
14
14
|
<%- unless config[:comments].nil? || config[:comments].empty? -%>
|
15
15
|
*
|
@@ -1,32 +1,4 @@
|
|
1
1
|
// WordPress theme header
|
2
2
|
@import "header";
|
3
3
|
|
4
|
-
// This is your master stylesheet
|
5
|
-
|
6
|
-
// Use SASS to include CSS partials
|
7
|
-
@import "reset";
|
8
|
-
@import "typography";
|
9
|
-
@import "blueprint/grid";
|
10
|
-
|
11
|
-
// Add some basic styling
|
12
|
-
.clear {
|
13
|
-
clear: both;
|
14
|
-
}
|
15
|
-
|
16
|
-
#container {
|
17
|
-
@include container;
|
18
|
-
@include prepend(1);
|
19
|
-
border-left: 1px solid;
|
20
|
-
border-right: 1px solid;
|
21
|
-
}
|
22
|
-
|
23
|
-
#content {
|
24
|
-
@include column(15);
|
25
|
-
@include border(#555, 2px);
|
26
|
-
}
|
27
|
-
|
28
|
-
#sidebar {
|
29
|
-
@include column(7);
|
30
|
-
@include prepend(1);
|
31
|
-
@include last;
|
32
|
-
}
|
4
|
+
// This is your master stylesheet
|
@@ -1,10 +1,25 @@
|
|
1
1
|
<?php get_header(); ?>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
|
6
|
+
<header class="page-header">
|
7
|
+
<h1 class="page-title"><?php _e( "Oops! That page can't be found.", '<%= theme_id %>' ); ?></h1>
|
8
|
+
</header>
|
9
|
+
|
10
|
+
<div class="page-content">
|
11
|
+
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', '<%= theme_id %>' ); ?></p>
|
12
|
+
|
13
|
+
<?php get_search_form(); ?>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="site-sidebar widget-area">
|
19
|
+
|
20
|
+
<?php get_sidebar(); ?>
|
21
|
+
|
22
|
+
</div>
|
8
23
|
</div>
|
9
|
-
|
10
|
-
<?php get_footer(); ?>
|
24
|
+
|
25
|
+
<?php get_footer(); ?>
|
@@ -1,11 +1,39 @@
|
|
1
1
|
<?php get_header(); ?>
|
2
|
-
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
<?php if ( have_posts() ) : ?>
|
6
|
+
|
7
|
+
<header class="page-header">
|
8
|
+
<h1 class="page-title">
|
9
|
+
<?php
|
10
|
+
if ( is_day() ) :
|
11
|
+
printf( __( 'Day: %s', '<%= theme_id %>' ), get_the_date() );
|
12
|
+
elseif ( is_month() ) :
|
13
|
+
printf( __( 'Month: %s', '<%= theme_id %>' ), get_the_date( 'F Y' ) );
|
14
|
+
elseif ( is_year() ) :
|
15
|
+
printf( __( 'Year: %s', '<%= theme_id %>' ), get_the_date( 'Y' ) );
|
16
|
+
else :
|
17
|
+
_e( 'Archives', '<%= theme_id %>' );
|
18
|
+
endif;
|
19
|
+
?>
|
20
|
+
</h1>
|
21
|
+
</header>
|
22
|
+
|
23
|
+
<?php while ( have_posts() ) : the_post(); ?>
|
24
|
+
|
25
|
+
<?php get_template_part( 'content', get_post_format() ); ?>
|
26
|
+
|
27
|
+
<?php endwhile; ?>
|
28
|
+
|
29
|
+
<?php <%= theme_id %>_paging_nav(); ?>
|
30
|
+
|
31
|
+
<?php else : ?>
|
32
|
+
|
33
|
+
<?php get_template_part( 'content', 'none' ); ?>
|
34
|
+
|
35
|
+
<?php endif; ?>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
11
39
|
<?php get_footer(); ?>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<?php get_header(); ?>
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
<?php if ( have_posts() ) : ?>
|
6
|
+
|
7
|
+
<header class="page-header">
|
8
|
+
<h1 class="page-title">
|
9
|
+
<?php
|
10
|
+
the_post();
|
11
|
+
printf( __( 'All posts by %s', '<%= theme_id %>' ), sprintf(
|
12
|
+
'<span class="vcard"><a class="url fn n" href="%1$s" rel="me">%2$s</a></span>',
|
13
|
+
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
14
|
+
get_the_author()
|
15
|
+
) );
|
16
|
+
?>
|
17
|
+
</h1>
|
18
|
+
</header>
|
19
|
+
|
20
|
+
<?php rewind_posts(); ?>
|
21
|
+
|
22
|
+
<?php while ( have_posts() ) : the_post(); ?>
|
23
|
+
|
24
|
+
<?php get_template_part( 'content', get_post_format() ); ?>
|
25
|
+
|
26
|
+
<?php endwhile; ?>
|
27
|
+
|
28
|
+
<?php else : ?>
|
29
|
+
|
30
|
+
<?php get_template_part( 'content', 'none' ); ?>
|
31
|
+
|
32
|
+
<?php endif; ?>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<?php get_footer(); ?>
|
@@ -1,9 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
</div
|
1
|
+
</div>
|
2
|
+
<!-- /site-content -->
|
3
|
+
|
4
|
+
<div class="push"></div>
|
5
|
+
|
6
|
+
</div>
|
7
|
+
<!-- /site -->
|
8
|
+
|
9
|
+
<footer class="site-footer">
|
10
|
+
<div class="footer-content">
|
11
|
+
|
12
|
+
© Copyright
|
13
|
+
|
14
|
+
</div>
|
15
|
+
</footer>
|
16
|
+
|
7
17
|
<?php wp_footer(); ?>
|
18
|
+
|
8
19
|
</body>
|
9
20
|
</html>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html <?php language_attributes(); ?>>
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
8
|
+
|
9
|
+
<link rel="profile" href="http://gmpg.org/xfn/11" />
|
10
|
+
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
11
|
+
|
12
|
+
<title><?php wp_title( '|', true, 'right' ); ?></title>
|
13
|
+
|
14
|
+
<?php wp_head(); ?>
|
15
|
+
</head>
|
16
|
+
|
17
|
+
<body <?php body_class(); ?>>
|
18
|
+
|
19
|
+
<!-- .site -->
|
20
|
+
<div class="site">
|
21
|
+
|
22
|
+
<header class="site-header">
|
23
|
+
<nav class="navbar site-navigation">
|
24
|
+
<div class="navbar-header">
|
25
|
+
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="navbar-brand logo"><?php bloginfo( 'name' ); ?></a>
|
26
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#site-navigation">
|
27
|
+
<span class="sr-only">Toggle navigation</span>
|
28
|
+
<span class="icon-bar"></span>
|
29
|
+
<span class="icon-bar"></span>
|
30
|
+
<span class="icon-bar"></span>
|
31
|
+
</button>
|
32
|
+
</div>
|
33
|
+
<?php wp_nav_menu( array(
|
34
|
+
'theme_location' => 'primary-menu',
|
35
|
+
'container_class' => 'collapse navbar-collapse',
|
36
|
+
'container_id' => 'site-navigation',
|
37
|
+
'items_wrap' => '<ul id="%1$s" class="%2$s nav navbar-nav">%3$s</ul>',
|
38
|
+
'depth' => 0
|
39
|
+
) ); ?>
|
40
|
+
</nav>
|
41
|
+
</header>
|
42
|
+
|
43
|
+
<!-- .site-content -->
|
44
|
+
<div class="site-content">
|
@@ -1,4 +1,21 @@
|
|
1
1
|
<?php get_header(); ?>
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
|
6
|
+
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
7
|
+
|
8
|
+
<?php get_template_part( 'content', get_post_format() ); ?>
|
9
|
+
|
10
|
+
<?php endwhile; endif; ?>
|
11
|
+
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="site-sidebar widget-area">
|
15
|
+
|
16
|
+
<?php get_sidebar(); ?>
|
17
|
+
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
4
21
|
<?php get_footer(); ?>
|
@@ -1,14 +1,19 @@
|
|
1
1
|
<?php get_header(); ?>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<?php the_content(); ?>
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
6
|
+
|
7
|
+
<?php get_template_part( 'content', 'page' ); ?>
|
8
|
+
|
9
|
+
<?php endwhile; endif; ?>
|
11
10
|
</div>
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
|
12
|
+
<div class="site-sidebar widget-area">
|
13
|
+
|
14
|
+
<?php get_sidebar(); ?>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<?php get_footer(); ?>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?php
|
2
|
+
if ( post_password_required() ) {
|
3
|
+
return;
|
4
|
+
}
|
5
|
+
?>
|
6
|
+
|
7
|
+
<div id="comments" class="comments">
|
8
|
+
<?php if ( have_comments() ) : ?>
|
9
|
+
|
10
|
+
<h2 class="comments-title">
|
11
|
+
<?php
|
12
|
+
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), '<%= theme_id %>' ),
|
13
|
+
number_format_i18n( get_comments_number() ), get_the_title() );
|
14
|
+
?>
|
15
|
+
</h2>
|
16
|
+
|
17
|
+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
|
18
|
+
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
|
19
|
+
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '<%= theme_id %>' ); ?></h1>
|
20
|
+
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '<%= theme_id %>' ) ); ?></div>
|
21
|
+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '<%= theme_id %>' ) ); ?></div>
|
22
|
+
</nav>
|
23
|
+
<?php endif; ?>
|
24
|
+
|
25
|
+
<ol class="comment-list">
|
26
|
+
<?php
|
27
|
+
wp_list_comments( array(
|
28
|
+
'style' => 'ol',
|
29
|
+
'short_ping' => true,
|
30
|
+
'avatar_size'=> 34,
|
31
|
+
) );
|
32
|
+
?>
|
33
|
+
</ol>
|
34
|
+
|
35
|
+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
|
36
|
+
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
|
37
|
+
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', '<%= theme_id %>' ); ?></h1>
|
38
|
+
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '<%= theme_id %>' ) ); ?></div>
|
39
|
+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '<%= theme_id %>' ) ); ?></div>
|
40
|
+
</nav>
|
41
|
+
<?php endif; ?>
|
42
|
+
|
43
|
+
<?php if ( ! comments_open() ) : ?>
|
44
|
+
<p class="no-comments"><?php _e( 'Comments are closed.', '<%= theme_id %>' ); ?></p>
|
45
|
+
<?php endif; ?>
|
46
|
+
|
47
|
+
<?php endif; ?>
|
48
|
+
|
49
|
+
<?php comment_form(); ?>
|
50
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div class="no-results not-found">
|
2
|
+
<header class="page-header">
|
3
|
+
<h1 class="page-title"><?php _e( 'Nothing Found', '<%= theme_id %>' ); ?></h1>
|
4
|
+
</header>
|
5
|
+
|
6
|
+
<div class="page-content">
|
7
|
+
<?php if( is_search() ) : ?>
|
8
|
+
|
9
|
+
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', '<%= theme_id %>' ); ?></p>
|
10
|
+
<?php get_search_form(); ?>
|
11
|
+
|
12
|
+
<?php else : ?>
|
13
|
+
|
14
|
+
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', '<%= theme_id %>' ); ?></p>
|
15
|
+
<?php get_search_form(); ?>
|
16
|
+
|
17
|
+
<?php endif; ?>
|
18
|
+
</div>
|
19
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
2
|
+
<header class="entry-header">
|
3
|
+
<h2 class="entry-title"><?php the_title(); ?></h2>
|
4
|
+
</header>
|
5
|
+
|
6
|
+
<?php if ( is_search() ) : ?>
|
7
|
+
<div class="entry-summary">
|
8
|
+
<?php the_excerpt(); ?>
|
9
|
+
<a href="<?php the_permalink(); ?>"><?php _e('Read more', '<%= theme_id %>') ?></a>
|
10
|
+
</div>
|
11
|
+
<?php else : ?>
|
12
|
+
<div class="entry-content">
|
13
|
+
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', '<%= theme_id %>' ) ); ?>
|
14
|
+
</div>
|
15
|
+
<?php endif; ?>
|
16
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
2
|
+
<label for="s" class="assistive-text"><?php _e( 'Search', '<%= theme_id %>' ); ?></label>
|
3
|
+
<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search', '<%= theme_id %>' ); ?>" />
|
4
|
+
<button type="submit" class="submit" name="submit" id="searchsubmit"><?php _e( 'Search', '<%= theme_id %>' ); ?></button>
|
5
|
+
</form>
|