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
@@ -1,12 +1,33 @@
|
|
1
1
|
<?php get_header(); ?>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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"><?php printf( __( 'Search Results for: %s', '<%= theme_id %>' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
9
|
+
</header>
|
10
|
+
|
11
|
+
<?php while ( have_posts() ) : the_post(); ?>
|
12
|
+
|
13
|
+
<?php get_template_part( 'content', 'search' ); ?>
|
14
|
+
|
15
|
+
<?php endwhile; ?>
|
16
|
+
|
17
|
+
<?php <%= theme_id %>_paging_nav(); ?>
|
18
|
+
|
19
|
+
<?php else : ?>
|
20
|
+
|
21
|
+
<?php get_template_part( 'content', 'none' ); ?>
|
22
|
+
|
23
|
+
<?php endif; ?>
|
9
24
|
</div>
|
10
|
-
|
11
|
-
|
12
|
-
|
25
|
+
|
26
|
+
<div class="site-sidebar widget-area">
|
27
|
+
|
28
|
+
<?php get_sidebar(); ?>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<?php get_footer(); ?>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<?php get_header(); ?>
|
2
|
+
|
3
|
+
<div class="content-wrap">
|
4
|
+
<div class="content content-area">
|
5
|
+
<?php while ( have_posts() ) : the_post(); ?>
|
6
|
+
|
7
|
+
<?php get_template_part( 'content', 'single' ); ?>
|
8
|
+
|
9
|
+
<?php
|
10
|
+
if ( comments_open() || '0' != get_comments_number() ) :
|
11
|
+
comments_template();
|
12
|
+
endif;
|
13
|
+
?>
|
14
|
+
|
15
|
+
<?php endwhile; ?>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="site-sidebar widget-area">
|
19
|
+
|
20
|
+
<?php get_sidebar(); ?>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
|
26
|
+
<?php get_footer(); ?>
|
data/lib/marv/generator.rb
CHANGED
@@ -59,6 +59,15 @@ module Marv
|
|
59
59
|
self
|
60
60
|
end
|
61
61
|
|
62
|
+
def copy_images
|
63
|
+
source = File.expand_path(File.join(self.layout_path, 'images'))
|
64
|
+
target = File.expand_path(File.join(@project.assets_path, 'images'))
|
65
|
+
|
66
|
+
render_directory(source, target)
|
67
|
+
|
68
|
+
self
|
69
|
+
end
|
70
|
+
|
62
71
|
def copy_templates
|
63
72
|
source = File.expand_path(File.join(self.layout_path, 'templates'))
|
64
73
|
target = File.expand_path(File.join(@project.source_path, 'templates'))
|
@@ -75,6 +84,15 @@ module Marv
|
|
75
84
|
write_template(source, target)
|
76
85
|
end
|
77
86
|
|
87
|
+
def copy_includes
|
88
|
+
source = File.expand_path(File.join(self.layout_path, 'includes'))
|
89
|
+
target = File.expand_path(File.join(@project.source_path, 'includes'))
|
90
|
+
|
91
|
+
render_directory(source, target)
|
92
|
+
|
93
|
+
self
|
94
|
+
end
|
95
|
+
|
78
96
|
def layout_path
|
79
97
|
@layout_path ||= File.join(Marv::ROOT, 'layouts', @layout)
|
80
98
|
end
|
@@ -84,8 +102,10 @@ module Marv
|
|
84
102
|
create_structure
|
85
103
|
copy_stylesheets
|
86
104
|
copy_javascript
|
105
|
+
copy_images
|
87
106
|
copy_templates
|
88
107
|
copy_functions
|
108
|
+
copy_includes
|
89
109
|
return self
|
90
110
|
end
|
91
111
|
|
data/marv.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "marv"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Hardpixel"]
|
@@ -33,24 +33,32 @@ Gem::Specification.new do |s|
|
|
33
33
|
"features/support/env.rb",
|
34
34
|
"layouts/config/config.tt",
|
35
35
|
"layouts/default/functions/functions.php.erb",
|
36
|
+
"layouts/default/images/screenshot.png",
|
37
|
+
"layouts/default/includes/filters-admin.php.erb",
|
38
|
+
"layouts/default/includes/filters.php.erb",
|
39
|
+
"layouts/default/includes/helpers.php.erb",
|
40
|
+
"layouts/default/javascripts/admin.coffee",
|
36
41
|
"layouts/default/javascripts/admin.js",
|
42
|
+
"layouts/default/javascripts/theme.coffee",
|
37
43
|
"layouts/default/javascripts/theme.js",
|
38
44
|
"layouts/default/stylesheets/_header.scss.erb",
|
39
|
-
"layouts/default/stylesheets/_reset.scss",
|
40
|
-
"layouts/default/stylesheets/_typography.scss",
|
41
45
|
"layouts/default/stylesheets/style.css.scss.erb",
|
42
46
|
"layouts/default/templates/404.php.erb",
|
43
47
|
"layouts/default/templates/archive.php.erb",
|
44
|
-
"layouts/default/templates/
|
45
|
-
"layouts/default/templates/comments.php",
|
48
|
+
"layouts/default/templates/author.php.erb",
|
46
49
|
"layouts/default/templates/footer.php",
|
47
|
-
"layouts/default/templates/header.php
|
50
|
+
"layouts/default/templates/header.php",
|
48
51
|
"layouts/default/templates/index.php",
|
49
52
|
"layouts/default/templates/page.php",
|
50
|
-
"layouts/default/templates/partials/
|
53
|
+
"layouts/default/templates/partials/comments.php.erb",
|
54
|
+
"layouts/default/templates/partials/content-none.php.erb",
|
55
|
+
"layouts/default/templates/partials/content-page.php",
|
56
|
+
"layouts/default/templates/partials/content-single.php",
|
57
|
+
"layouts/default/templates/partials/content.php.erb",
|
58
|
+
"layouts/default/templates/partials/searchform.php.erb",
|
59
|
+
"layouts/default/templates/partials/sidebar.php",
|
51
60
|
"layouts/default/templates/search.php.erb",
|
52
|
-
"layouts/default/templates/
|
53
|
-
"layouts/default/templates/single.php.erb",
|
61
|
+
"layouts/default/templates/single.php",
|
54
62
|
"lib/guard/marv/assets.rb",
|
55
63
|
"lib/guard/marv/config.rb",
|
56
64
|
"lib/guard/marv/functions.rb",
|
@@ -65,6 +73,7 @@ Gem::Specification.new do |s|
|
|
65
73
|
"lib/marv/guard.rb",
|
66
74
|
"lib/marv/project.rb",
|
67
75
|
"lib/marv/version.rb",
|
76
|
+
"marv-0.2.1.gem",
|
68
77
|
"marv.gemspec",
|
69
78
|
"spec/lib/marv/config_spec.rb",
|
70
79
|
"spec/lib/marv/project_spec.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -340,24 +340,32 @@ files:
|
|
340
340
|
- features/support/env.rb
|
341
341
|
- layouts/config/config.tt
|
342
342
|
- layouts/default/functions/functions.php.erb
|
343
|
+
- layouts/default/images/screenshot.png
|
344
|
+
- layouts/default/includes/filters-admin.php.erb
|
345
|
+
- layouts/default/includes/filters.php.erb
|
346
|
+
- layouts/default/includes/helpers.php.erb
|
347
|
+
- layouts/default/javascripts/admin.coffee
|
343
348
|
- layouts/default/javascripts/admin.js
|
349
|
+
- layouts/default/javascripts/theme.coffee
|
344
350
|
- layouts/default/javascripts/theme.js
|
345
351
|
- layouts/default/stylesheets/_header.scss.erb
|
346
|
-
- layouts/default/stylesheets/_reset.scss
|
347
|
-
- layouts/default/stylesheets/_typography.scss
|
348
352
|
- layouts/default/stylesheets/style.css.scss.erb
|
349
353
|
- layouts/default/templates/404.php.erb
|
350
354
|
- layouts/default/templates/archive.php.erb
|
351
|
-
- layouts/default/templates/
|
352
|
-
- layouts/default/templates/comments.php
|
355
|
+
- layouts/default/templates/author.php.erb
|
353
356
|
- layouts/default/templates/footer.php
|
354
|
-
- layouts/default/templates/header.php
|
357
|
+
- layouts/default/templates/header.php
|
355
358
|
- layouts/default/templates/index.php
|
356
359
|
- layouts/default/templates/page.php
|
357
|
-
- layouts/default/templates/partials/
|
360
|
+
- layouts/default/templates/partials/comments.php.erb
|
361
|
+
- layouts/default/templates/partials/content-none.php.erb
|
362
|
+
- layouts/default/templates/partials/content-page.php
|
363
|
+
- layouts/default/templates/partials/content-single.php
|
364
|
+
- layouts/default/templates/partials/content.php.erb
|
365
|
+
- layouts/default/templates/partials/searchform.php.erb
|
366
|
+
- layouts/default/templates/partials/sidebar.php
|
358
367
|
- layouts/default/templates/search.php.erb
|
359
|
-
- layouts/default/templates/
|
360
|
-
- layouts/default/templates/single.php.erb
|
368
|
+
- layouts/default/templates/single.php
|
361
369
|
- lib/guard/marv/assets.rb
|
362
370
|
- lib/guard/marv/config.rb
|
363
371
|
- lib/guard/marv/functions.rb
|
@@ -372,6 +380,7 @@ files:
|
|
372
380
|
- lib/marv/guard.rb
|
373
381
|
- lib/marv/project.rb
|
374
382
|
- lib/marv/version.rb
|
383
|
+
- marv-0.2.1.gem
|
375
384
|
- marv.gemspec
|
376
385
|
- spec/lib/marv/config_spec.rb
|
377
386
|
- spec/lib/marv/project_spec.rb
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/* _reset.scss
|
2
|
-
* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
|
3
|
-
|
4
|
-
@import "blueprint/reset";
|
5
|
-
@include blueprint-global-reset;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
/* _typography.scss
|
2
|
-
* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
|
3
|
-
|
4
|
-
@import "blueprint/typography";
|
5
|
-
@include blueprint-typography;
|
@@ -1,32 +0,0 @@
|
|
1
|
-
<?php get_header(); ?>
|
2
|
-
<?php the_post(); ?>
|
3
|
-
<h1 class="page-title"><?php the_title(); ?></h1>
|
4
|
-
<div>
|
5
|
-
<a href="<?php echo wp_get_attachment_url( $post->ID ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment">
|
6
|
-
<?php
|
7
|
-
if ( wp_attachment_is_image ( $post->ID ) ) {
|
8
|
-
$img_src = wp_get_attachment_image_src( $post->ID, 'large' );
|
9
|
-
$alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
|
10
|
-
?>
|
11
|
-
<img src="<?php echo esc_url( $img_src[0] ); ?>" alt="<?php esc_attr_e( $alt_text ); ?>">
|
12
|
-
<?php
|
13
|
-
} else {
|
14
|
-
echo basename( $post->guid );
|
15
|
-
}
|
16
|
-
?>
|
17
|
-
</a>
|
18
|
-
<?php if ( $post->post_content ) : ?>
|
19
|
-
<div class="description">
|
20
|
-
<?php the_content(); ?>
|
21
|
-
</div>
|
22
|
-
<?php endif; ?>
|
23
|
-
<div class="pagination clear">
|
24
|
-
<div class="alignleft"><?php previous_image_link( 0, __( '← Previous image', '<%= theme_id %>' ) ); ?></div>
|
25
|
-
<div class="alignright"><?php next_image_link( 0, __( 'Next image →', '<%= theme_id %>' ) ); ?></div>
|
26
|
-
</div>
|
27
|
-
<div>
|
28
|
-
<a href="<?php echo get_permalink( $post->post_parent ); ?>"><?php _e( 'Return to gallery', '<%= theme_id %>' ); ?></a>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<?php get_sidebar(); ?>
|
32
|
-
<?php get_footer(); ?>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html <?php language_attributes( 'html' ) ?>>
|
3
|
-
<head>
|
4
|
-
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
5
|
-
<title><?php wp_title(); ?></title>
|
6
|
-
|
7
|
-
<!-- WordPress -->
|
8
|
-
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
|
9
|
-
<?php wp_head(); ?>
|
10
|
-
</head>
|
11
|
-
<body <?php body_class(); ?>>
|
12
|
-
<div id="container">
|
13
|
-
<div id="header" class="clear">
|
14
|
-
<div id="title">
|
15
|
-
<?php if ( is_front_page() ) echo( '<h1>' ); ?>
|
16
|
-
<a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
|
17
|
-
<?php if ( is_front_page() ) echo( '</h1>' ); ?>
|
18
|
-
</div>
|
19
|
-
<?php
|
20
|
-
wp_nav_menu(
|
21
|
-
array(
|
22
|
-
'theme_location' => 'nav-1',
|
23
|
-
'container_id' => 'navigation',
|
24
|
-
'container_class' => 'clear',
|
25
|
-
'menu_class' => 'nav',
|
26
|
-
'depth' => '2'
|
27
|
-
)
|
28
|
-
);
|
29
|
-
?>
|
30
|
-
</div><!--end header-->
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<?php if ( have_posts() ) : ?>
|
2
|
-
<?php while ( have_posts() ) : the_post(); ?>
|
3
|
-
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
4
|
-
<div class="post-header">
|
5
|
-
<h2 class="post-title">
|
6
|
-
<a href="<?php the_permalink(); ?>" rel="bookmark">
|
7
|
-
<?php the_title(); ?>
|
8
|
-
</a>
|
9
|
-
</h2>
|
10
|
-
<p><?php the_time( __( 'F jS, Y', '<%= theme_id %>' ) ); ?></p>
|
11
|
-
<p><?php the_author(); ?></p>
|
12
|
-
<?php if ( has_post_thumbnail() ) { ?>
|
13
|
-
<a href="<?php the_permalink(); ?>">
|
14
|
-
<?php the_post_thumbnail(); ?>
|
15
|
-
</a>
|
16
|
-
<?php } ?>
|
17
|
-
</div><!--end post-header-->
|
18
|
-
<div class="entry">
|
19
|
-
<?php the_content( __( 'Read more', '<%= theme_id %>' )); ?>
|
20
|
-
<?php edit_post_link( __( 'Edit this', '<%= theme_id %>' ), '<p>', '</p>' ); ?>
|
21
|
-
</div><!--end entry-->
|
22
|
-
<div class="post-footer">
|
23
|
-
<p><?php comments_popup_link( __( 'Leave a comment', '<%= theme_id %>' ), __( '1 Comment', '<%= theme_id %>' ), __( '% Comments', '<%= theme_id %>' ) ); ?></p>
|
24
|
-
</div><!--end post-footer-->
|
25
|
-
</div><!--end post-->
|
26
|
-
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
|
27
|
-
<div class="pagination index">
|
28
|
-
<div class="alignleft">
|
29
|
-
<?php previous_posts_link( __( '← Newer entries', '<%= theme_id %>' )); ?>
|
30
|
-
</div>
|
31
|
-
<div class="alignright">
|
32
|
-
<?php next_posts_link( __( 'Older entries →', '<%= theme_id %>' )); ?>
|
33
|
-
</div>
|
34
|
-
</div><!--end pagination-->
|
35
|
-
<?php else : ?>
|
36
|
-
<?php endif; ?>
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<?php get_header(); ?>
|
2
|
-
<?php if ( have_posts() ) : ?>
|
3
|
-
<?php while ( have_posts() ) : the_post(); ?>
|
4
|
-
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
5
|
-
<h1><?php the_title(); ?></h1>
|
6
|
-
<div>
|
7
|
-
<?php printf( __( 'by %s on', '<%= theme_id %>' ), get_the_author() ); ?> <?php the_date(); ?>
|
8
|
-
</div>
|
9
|
-
<div class="entry">
|
10
|
-
<?php if ( has_post_thumbnail() ) {
|
11
|
-
the_post_thumbnail();
|
12
|
-
} ?>
|
13
|
-
<?php the_content(); ?>
|
14
|
-
<?php edit_post_link( __( 'Edit this', '<%= theme_id %>' ), '<p>', '</p>' ); ?>
|
15
|
-
<?php wp_link_pages(); ?>
|
16
|
-
</div><!--end entry-->
|
17
|
-
<div class="post-footer clear">
|
18
|
-
<div class="tags">
|
19
|
-
<?php the_tags( __( 'Tags: ', '<%= theme_id %>' ), ', ', '' ); ?>
|
20
|
-
</div>
|
21
|
-
<div class="cats">
|
22
|
-
<?php printf( __( 'From: %s', '<%= theme_id %>' ), get_the_category_list( ', ' ) ); ?>
|
23
|
-
</div>
|
24
|
-
</div><!--end post footer-->
|
25
|
-
</div><!--end post-->
|
26
|
-
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
|
27
|
-
<?php comments_template( '', true ); ?>
|
28
|
-
<?php endif; ?>
|
29
|
-
<?php get_sidebar(); ?>
|
30
|
-
<?php get_footer(); ?>
|