Skip to content

Commit bc136f2

Browse files
Merge pull request #1 from chipmunk-theme/new-environment
New environment
2 parents 6cd4bfb + c0f2ed3 commit bc136f2

File tree

1,387 files changed

+227236
-181350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,387 files changed

+227236
-181350
lines changed

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# OS or Editor folders
22
.DS_Store
3+
.DS_Store.*
34
._*
45
Desktop.ini
56
Thumbs.db
@@ -15,7 +16,5 @@ nbproject
1516
*.sublime-workspace
1617

1718
# Project specific
18-
node_modules
19-
npm-debug.log
20-
src/**/iconfont.*
21-
src/**/_icons.*
19+
.env
20+
composer.lock

404.php

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,18 @@
88

99
get_header(); ?>
1010

11-
<div class="section">
12-
<div class="container">
13-
<div class="error-404 row">
14-
<div class="column column--lg-6 text--center">
15-
<h3 class="error-404__title heading heading--h3"><?php esc_html_e( '404! The page you are looking for couldn\'t be found.', 'chipmunk' ); ?></h3>
16-
<a href="<?php echo esc_url( home_url( '/', 'relative' ) ); ?>" class="button button--primary"><?php esc_html_e( 'Bring me to the frontpage', 'chipmunk' ); ?></a>
17-
</div>
18-
19-
<div class="column column--lg-6">
20-
<div class="error-404__image">
21-
<img src="<?php echo get_template_directory_uri(); ?>/static/dist/images/pic-404.svg" alt="" />
22-
</div>
23-
</div>
11+
<div class="l-section l-section--double">
12+
<div class="l-container">
13+
<div class="c-lead c-lead--center">
14+
<h1 class="c-lead__title c-heading c-heading--h1"><?php esc_html_e( 'Page not found!', 'chipmunk' ); ?></h1>
15+
<p class="c-lead__content c-content c-content--type"><?php esc_html_e( 'Sorry, we couldn\'t find what you\'re looking for.', 'chipmunk' ); ?></p>
16+
<a href="<?php echo esc_url( home_url( '/', 'relative' ) ); ?>" class="c-lead__cta c-button c-button--primary">
17+
<?php esc_html_e( 'Bring me to the frontpage', 'chipmunk' ); ?>
18+
</a>
2419
</div>
25-
<!-- /.error-404 -->
2620
</div>
2721
</div>
28-
<!-- /.section -->
2922

30-
<?php chipmunk_get_template_part( 'sections/toolbox' ); ?>
23+
<?php Chipmunk\Helpers::get_template_part( 'sections/toolbox' ); ?>
3124

3225
<?php get_footer(); ?>

archive-resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
get_header(); ?>
1010

11-
<?php chipmunk_get_template_part( array( 'sections/loop', 'resource' ) ); ?>
11+
<?php Chipmunk\Helpers::get_template_part( array( 'sections/loop', 'resource' ) ); ?>
1212

1313
<?php get_footer(); ?>

author.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
get_header(); ?>
1010

11-
<?php chipmunk_get_template_part( 'sections/author' ); ?>
12-
<?php chipmunk_get_template_part( array( 'sections/loop', 'resource' ) ); ?>
11+
<?php Chipmunk\Helpers::get_template_part( 'sections/author' ); ?>
12+
<?php Chipmunk\Helpers::get_template_part( array( 'sections/loop', 'resource' ) ); ?>
1313

1414
<?php get_footer(); ?>

comments.php

Lines changed: 68 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -23,72 +23,81 @@
2323
?>
2424

2525
<?php if ( post_type_supports( get_post_type(), 'comments' ) ) : ?>
26-
<?php
27-
/**
28-
* List comments acording to custom_comment function specified
29-
* in commentstemplate.php file
30-
*/
31-
?>
32-
<?php if ( have_comments() ) : ?>
33-
<h3 class="heading heading--h4"><?php esc_html( printf( _n( '%s Comment', '%s Comments', get_comments_number(), 'chipmunk' ), number_format_i18n( get_comments_number() ) ) ); ?></h3>
34-
35-
<ul>
36-
<?php
37-
/**
38-
* List comments acording to custom_comment function specified
39-
* in commentstemplate.php file
40-
*/
41-
wp_list_comments( array(
42-
'avatar_size' => 40,
43-
'type' => 'comment',
44-
'callback' => 'chipmunk_comment'
45-
) );
46-
?>
47-
</ul>
48-
26+
<div class="l-wrapper">
4927
<?php
50-
/*
51-
* Displays a paginated navigation to next/previous set of comments
28+
/**
29+
* List comments acording to custom_comment function specified
30+
* in commentstemplate.php file
5231
*/
53-
chipmunk_get_template_part( 'sections/comment-pagination' );
5432
?>
55-
<?php endif; ?>
33+
<?php if ( have_comments() ) : ?>
34+
<div class="l-component">
35+
<h3 class="c-heading c-heading--h4"><?php esc_html( printf( _n( '%s Comment', '%s Comments', get_comments_number(), 'chipmunk' ), number_format_i18n( get_comments_number() ) ) ); ?></h3>
36+
</div>
5637

57-
<?php if ( comments_open() ) : ?>
58-
<?php
59-
/*
60-
* Alter default values of form field
61-
* Name, Author and URL are edited in functions.php via
62-
* comment_form_default_fields filter hook
63-
*/
64-
$commenter = wp_get_current_commenter();
65-
$req = get_option( 'require_name_email' ) ? " required" : '';
38+
<div class="l-component l-component--md">
39+
<ul class="c-comment__list">
40+
<?php
41+
/**
42+
* List comments acording to custom_comment function specified
43+
* in commentstemplate.php file
44+
*/
45+
wp_list_comments( array(
46+
'avatar_size' => 40,
47+
'type' => 'comment',
48+
'callback' => array( Chipmunk\Helpers::class, 'comment_template' ),
49+
) );
50+
?>
51+
</ul>
52+
</div>
53+
54+
<?php
55+
/*
56+
* Displays a paginated navigation to next/previous set of comments
57+
*/
58+
Chipmunk\Helpers::get_template_part( 'sections/comment-pagination' );
59+
?>
60+
<?php endif; ?>
6661

67-
$fields = array(
68-
'author' => '<div class="form__field">' .
69-
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
70-
'" size="30" placeholder="' . esc_attr__( 'Name', 'chipmunk' ) . ( ! empty( $req ) ? ' *' : '' ) . '" class="form__input"' . $req . ' /></div>',
62+
<?php if ( comments_open() ) : ?>
63+
<div class="l-component l-component--md">
64+
<?php
65+
/*
66+
* Alter default values of c-form field
67+
* Name, Author and URL are edited in functions.php via
68+
* comment_form_default_fields filter hook
69+
*/
70+
$commenter = wp_get_current_commenter();
71+
$req = get_option( 'require_name_email' ) ? " required" : '';
7172

72-
'email' => '<div class="form__field">' .
73-
'<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) .
74-
'" size="30" placeholder="' . esc_attr__( 'Email', 'chipmunk' ) . ( ! empty( $req ) ? ' *' : '' ) . '" class="form__input"' . $req . ' /></div>',
73+
$fields = array(
74+
'author' => '<div class="c-form__field">' .
75+
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
76+
'" size="30" placeholder="' . esc_attr__( 'Name', 'chipmunk' ) . ( ! empty( $req ) ? '*' : '' ) . '" class="c-form__input"' . $req . ' /></div>',
7577

76-
'url' => '',
77-
);
78+
'email' => '<div class="c-form__field">' .
79+
'<input id="email" name="email" type="email" value="' . esc_attr( $commenter['comment_author_email'] ) .
80+
'" size="30" placeholder="' . esc_attr__( 'Email', 'chipmunk' ) . ( ! empty( $req ) ? '*' : '' ) . '" class="c-form__input"' . $req . ' /></div>',
7881

79-
comment_form( array(
80-
'class_form' => 'form',
81-
'class_submit' => 'button button--primary-outline',
82-
'comment_notes_before' => '',
83-
'comment_notes_after' => '',
84-
'title_reply_before' => '<h3 class="heading heading--h4">',
85-
'title_reply_after' => '</h3>',
86-
'submit_field' => '%1$s %2$s',
87-
'submit_button' => '<div class="form__field form__field--wide form__field--cta"><button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button></div>',
88-
'fields' => apply_filters( 'comment_form_fields', $fields ),
89-
'comment_field' => '<div class="form__field form__field--wide"><textarea id="comment" name="comment" cols="45" rows="1" placeholder="' . esc_attr__( 'Comment', 'chipmunk' ) . ( ! empty( $req ) ? ' *' : '' ) . '" class="form__input"' . $req . ' data-dynamic-rows></textarea></div>',
90-
) );
82+
'url' => '',
83+
);
9184

92-
?>
93-
<?php endif; ?>
85+
comment_form( array(
86+
'class_form' => 'l-component c-form',
87+
'class_submit' => 'c-button c-button--primary-outline',
88+
'comment_notes_before' => '',
89+
'comment_notes_after' => '',
90+
'title_reply_before' => '<h3 class="l-component c-heading c-heading--h4">',
91+
'title_reply_after' => '</h3>',
92+
'submit_field' => '%1$s %2$s',
93+
'submit_button' => '<div class="c-form__field c-form__field--wide c-form__field--cta"><button name="%1$s" type="submit" id="%2$s" class="%3$s">%4$s</button></div>',
94+
'fields' => apply_filters( 'comment_form_fields', $fields ),
95+
'comment_field' => '<div class="c-form__field c-form__field--wide"><textarea id="comment" name="comment" cols="45" rows="1" placeholder="' . esc_attr__( 'Comment', 'chipmunk' ) . ( ! empty( $req ) ? '*' : '' ) . '" class="c-form__input"' . $req . ' data-dynamic-rows></textarea></div>',
96+
'must_log_in' => '<div class="l-component"><p class="l-header__copy">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink() ) ) ) . '</p></div>',
97+
) );
98+
99+
?>
100+
</div>
101+
<?php endif; ?>
102+
</div>
94103
<?php endif;

composer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "chipmunk-theme/chipmunk-theme",
3+
"homepage": "https://chipmunktheme.com/",
4+
"authors": [
5+
{
6+
"name": "Made by Less",
7+
"email": "[email protected]"
8+
}
9+
],
10+
"autoload": {
11+
"psr-4": {
12+
"Chipmunk\\": "includes/"
13+
},
14+
"files": [
15+
"vendor/richtabor/merlin-wp/class-merlin.php"
16+
]
17+
},
18+
"repositories": [
19+
{
20+
"type": "composer",
21+
"url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/library/"
22+
}
23+
],
24+
"require": {
25+
"advanced-custom-fields/advanced-custom-fields-pro": "^5.12",
26+
"richtabor/merlin-wp": "dev-master"
27+
},
28+
"config": {
29+
"allow-plugins": {
30+
"composer/installers": true,
31+
"pivvenit/acf-pro-installer": true
32+
}
33+
}
34+
}
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)