diff --git a/archive.php b/archive.php index 7c11d57..1145aae 100755 --- a/archive.php +++ b/archive.php @@ -20,19 +20,19 @@ $context['title'] = 'Archive'; if ( is_day() ) { - $context['title'] = 'Archive: '.get_the_date( 'D M Y' ); + $context['title'] = 'Archive: '.get_the_date( 'D M Y' ); } else if ( is_month() ) { - $context['title'] = 'Archive: '.get_the_date( 'M Y' ); + $context['title'] = 'Archive: '.get_the_date( 'M Y' ); } else if ( is_year() ) { - $context['title'] = 'Archive: '.get_the_date( 'Y' ); + $context['title'] = 'Archive: '.get_the_date( 'Y' ); } else if ( is_tag() ) { - $context['title'] = single_tag_title( '', false ); + $context['title'] = single_tag_title( '', false ); } else if ( is_category() ) { - $context['title'] = single_cat_title( '', false ); - array_unshift( $templates, 'archive-' . get_query_var( 'cat' ) . '.twig' ); + $context['title'] = single_cat_title( '', false ); + array_unshift( $templates, 'archive-' . get_query_var( 'cat' ) . '.twig' ); } else if ( is_post_type_archive() ) { - $context['title'] = post_type_archive_title( '', false ); - array_unshift( $templates, 'archive-' . get_post_type() . '.twig' ); + $context['title'] = post_type_archive_title( '', false ); + array_unshift( $templates, 'archive-' . get_post_type() . '.twig' ); } $context['posts'] = Timber::get_posts(); diff --git a/author.php b/author.php index bd78705..b7d694d 100755 --- a/author.php +++ b/author.php @@ -13,8 +13,8 @@ $context = Timber::get_context(); $context['posts'] = Timber::get_posts(); if ( isset( $wp_query->query_vars['author'] ) ) { - $author = new TimberUser( $wp_query->query_vars['author'] ); - $context['author'] = $author; - $context['title'] = 'Author Archives: ' . $author->name(); + $author = new TimberUser( $wp_query->query_vars['author'] ); + $context['author'] = $author; + $context['title'] = 'Author Archives: ' . $author->name(); } Timber::render( array( 'author.twig', 'archive.twig' ), $context ); diff --git a/footer.php b/footer.php index 3f15120..df3b37e 100644 --- a/footer.php +++ b/footer.php @@ -9,7 +9,7 @@ $timberContext = $GLOBALS['timberContext']; if ( ! isset( $timberContext ) ) { - throw new \Exception( 'Timber context not set in footer.' ); + throw new \Exception( 'Timber context not set in footer.' ); } $timberContext['content'] = ob_get_contents(); ob_end_clean(); diff --git a/functions.php b/functions.php index b4b7c1c..f296d03 100644 --- a/functions.php +++ b/functions.php @@ -1,92 +1,97 @@

Timber not activated. Make sure you activate the plugin in ' . esc_url( admin_url( 'plugins.php' ) ) . '

'; - } ); - return; + add_action( 'admin_notices', function() { + echo '

Timber not activated. Make sure you activate the plugin in ' . esc_url( admin_url( 'plugins.php' ) ) . '

'; + } ); + return; } Timber::$dirname = array('templates', 'views'); class StarterSite extends TimberSite { - function __construct() { - add_theme_support( 'post-formats' ); - add_theme_support( 'post-thumbnails' ); - add_theme_support( 'menus' ); - add_filter( 'timber_context', array( $this, 'add_to_context' ) ); - add_filter( 'comment_form_default_fields', array( $this, 'bootstrap3_comment_form_fields' ) ); - add_filter( 'comment_form_defaults', array( $this, 'bootstrap3_comment_form' ) ); - add_filter( 'get_twig', array( $this, 'add_to_twig' ) ); - add_action( 'init', array( $this, 'register_post_types' ) ); - add_action( 'init', array( $this, 'register_taxonomies' ) ); - add_action( 'init', array( $this, 'register_my_menu' ) ); - parent::__construct(); - } - - function register_my_menu() { - register_nav_menu('main-menu', __( 'Main Menu' )); - } - - function bootstrap3_comment_form_fields( $fields ) { - $commenter = wp_get_current_commenter(); - - $req = get_option( 'require_name_email' ); - $aria_req = ( $req ? " aria-required='true'" : '' ); - $html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0; - - $fields = array( - 'author' => '
' . ' ' . - '
', - 'email' => '
' . - '
', - 'url' => '
' . - '
' - ); - - return $fields; - } - - function bootstrap3_comment_form( $args ) { - $args['comment_field'] = '
- - -
'; - $args['class_submit'] = 'btn btn-default'; // since WP 4.1 - - return $args; - } - - function register_post_types() { - //this is where you can register custom post types - } - - function register_taxonomies() { - //this is where you can register custom taxonomies - } - - function add_to_context( $context ) { - $context['menu'] = new TimberMenu('main-menu'); - $context['site'] = $this; - - $context['posts'] = Timber::get_posts(); - $context['pagination'] = Timber::get_pagination(); - $context['categories'] = Timber::get_terms('category'); - return $context; - } - - function myfoo( $text ) { - $text .= ' bar!'; - return $text; - } - - function add_to_twig( $twig ) { - /* this is where you can add your own fuctions to twig */ - $twig->addExtension( new Twig_Extension_StringLoader() ); - $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo'))); - return $twig; - } + function __construct() { + add_theme_support( 'post-formats' ); + add_theme_support( 'post-thumbnails' ); + add_theme_support( 'menus' ); + add_filter( 'timber_context', array( $this, 'add_to_context' ) ); + add_filter( 'comment_form_default_fields', array( $this, 'bootstrap3_comment_form_fields' ) ); + add_filter( 'comment_form_defaults', array( $this, 'bootstrap3_comment_form' ) ); + add_filter( 'get_twig', array( $this, 'add_to_twig' ) ); + add_action( 'init', array( $this, 'register_post_types' ) ); + add_action( 'init', array( $this, 'register_taxonomies' ) ); + add_action( 'init', array( $this, 'register_my_menu' ) ); + parent::__construct(); + } + + function register_my_menu() { + register_nav_menu('main-menu', __( 'Main Menu' )); + } + + function bootstrap3_comment_form_fields( $fields ) { + $commenter = wp_get_current_commenter(); + + $req = get_option( 'require_name_email' ); + $aria_req = ( $req ? " aria-required='true'" : '' ); + $html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0; + + $fields = array( + 'author' => '
+ + +
', + 'email' => '
+ + +
', + 'url' => '
+ + +
' + ); + + return $fields; + } + + function bootstrap3_comment_form( $args ) { + $args['comment_field'] = '
+ + +
'; + $args['class_submit'] = 'btn btn-default'; // since WP 4.1 + return $args; + } + + function register_post_types() { + //this is where you can register custom post types + } + + function register_taxonomies() { + //this is where you can register custom taxonomies + } + + function add_to_context( $context ) { + $context['menu'] = new TimberMenu('main-menu'); + $context['site'] = $this; + + $context['posts'] = Timber::get_posts(); + $context['pagination'] = Timber::get_pagination(); + $context['categories'] = Timber::get_terms('category'); + return $context; + } + + function myfoo( $text ) { + $text .= ' bar!'; + return $text; + } + + function add_to_twig( $twig ) { + /* this is where you can add your own fuctions to twig */ + $twig->addExtension( new Twig_Extension_StringLoader() ); + $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo'))); + return $twig; + } } diff --git a/header.php b/header.php index fcfc3c6..117062d 100644 --- a/header.php +++ b/header.php @@ -3,7 +3,7 @@ * Third party plugins that hijack the theme will call wp_head() to get the header template. * We use this to start our output buffer and render into the view/page-plugin.twig template in footer.php * - * If you're not using a plugin that requries this behavior (ones that do include Events Calendar Pro and + * If you're not using a plugin that requries this behavior (ones that do include Events Calendar Pro and * WooCommerce) you can delete this file and footer.php */ diff --git a/index.php b/index.php index 7c2e1fa..5fee4b6 100755 --- a/index.php +++ b/index.php @@ -14,8 +14,8 @@ */ if ( ! class_exists( 'Timber' ) ) { - echo 'Timber not activated. Make sure you activate the plugin in /wp-admin/plugins.php'; - return; + echo 'Timber not activated. Make sure you activate the plugin in /wp-admin/plugins.php'; + return; } $context = Timber::get_context(); @@ -23,6 +23,6 @@ $templates = array( 'index.twig' ); if ( is_home() ) { - array_unshift( $templates, 'home.twig' ); + array_unshift( $templates, 'home.twig' ); } Timber::render( $templates, $context ); diff --git a/mkzip.sh b/mkzip.sh index 68e66ca..c92c196 100755 --- a/mkzip.sh +++ b/mkzip.sh @@ -1,10 +1,8 @@ #!/bin/bash -rm -f cd-theme.zip -rm -rf cd-theme/ -DIRS_TO_COPY=`ls | tr "\n" " "` +rm -f cd-theme.zip cd-theme/ mkdir cd-theme -cp -r $DIRS_TO_COPY cd-theme/ +cp -r ./* cd-theme/ rm -rf cd-theme/.git/ zip -r cd-theme.zip cd-theme/ rm -rf cd-theme/ diff --git a/page-about.php b/page-about.php index 6a1b66b..13a0c8e 100644 --- a/page-about.php +++ b/page-about.php @@ -1,6 +1,5 @@ ", $post->content); -$context['community'] = [ ['name'=>'Michael Madden', 'dojo'=>'Galway and Athenry', - 'region'=>'Ireland','joined'=>'27/02/14'], - - ['name'=>'Francis Reed', 'dojo'=>'Dun Laoighre', - 'region'=>'Ireland','joined'=>'27/02/14'], - - ['name'=>'Shara Karasic', 'dojo'=>'LA', - 'region'=>'USA West Coast','joined'=>'27/02/14'], - - ['name'=>'Greg Bulmash', 'dojo'=>'Seattle', - 'region'=>'USA Pacific Northwest','joined'=>'27/02/14'], - - ['name'=>'David Welch', 'dojo'=>'Iowa City', - 'region'=>'USA Central','joined'=>'27/02/14'], - - ['name'=>'Craig Steele', 'dojo'=>'Glasgow', - 'region'=>'Scotland','joined'=>'27/02/14'], - - ['name'=>'Rob curran', 'dojo'=>'Wilmslow', - 'region'=>'UK','joined'=>'27/02/14'], - - ['name'=>'Paul Browne', 'dojo'=>'Leiden', - 'region'=>'The Netherlands','joined'=>'27/02/14'], - - ['name'=>'Patrick Bosteels', 'dojo'=>'Istanbul', - 'region'=>'Turkey','joined'=>'27/02/14'], - - ['name'=>'Radu Ticio', 'dojo'=>'Timisoara', - 'region'=>'Romania','joined'=>'27/02/14'], - - ['name'=>'Carmelo Presicce', 'dojo'=>'Bologna', - 'region'=>'Italy','joined'=>'27/02/14'], - - ['name'=>'John Harrington', 'dojo'=>'CMX', - 'region'=>'Ireland','joined'=>'29/04/14'], - - ['name'=>'Yohei Yasukawa', 'dojo'=>'Tokyo', - 'region'=>'Japan','joined'=>'22/09/14'], - - ['name'=>'David Campy', 'dojo'=>'South Africa', - 'region'=>'South Africa','joined'=>'22/09/15'], - - ['name'=>'Frank and Joe Westgard', 'dojo'=>'Washington DC', - 'region'=>'USA','joined'=>'22/09/14'], - - ['name'=>'Martine Temples and/or Bettina Stylerts', 'dojo'=>'CoderDojo Belgium', - 'region'=>'Belgium','joined'=>'22/09/14'] - ]; +$context['community'] = [ + [ + 'name'=>'Michael Madden', + 'dojo'=>'Galway and Athenry', + 'region'=>'Ireland','joined'=>'27/02/14' + ], [ + 'name'=>'Francis Reed', + 'dojo'=>'Dun Laoighre', + 'region'=>'Ireland', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Shara Karasic', + 'dojo'=>'LA', + 'region'=>'USA West Coast', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Greg Bulmash', + 'dojo'=>'Seattle', + 'region'=>'USA Pacific Northwest', + 'joined'=>'27/02/14' + ], [ + 'name'=>'David Welch', + 'dojo'=>'Iowa City', + 'region'=>'USA Central', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Craig Steele', + 'dojo'=>'Glasgow', + 'region'=>'Scotland', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Rob curran', + 'dojo'=>'Wilmslow', + 'region'=>'UK', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Paul Browne', + 'dojo'=>'Leiden', + 'region'=>'The Netherlands', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Patrick Bosteels', + 'dojo'=>'Istanbul', + 'region'=>'Turkey', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Radu Ticio', + 'dojo'=>'Timisoara', + 'region'=>'Romania', + 'joined'=>'27/02/14' + ], [ + 'name'=>'Carmelo Presicce', + 'dojo'=>'Bologna', + 'region'=>'Italy', + 'joined'=>'27/02/14' + ], [ + 'name'=>'John Harrington', + 'dojo'=>'CMX', + 'region'=>'Ireland', + 'joined'=>'29/04/14' + ], [ + 'name'=>'Yohei Yasukawa', + 'dojo'=>'Tokyo', + 'region'=>'Japan', + 'joined'=>'22/09/14' + ], [ + 'name'=>'David Campy', + 'dojo'=>'South Africa', + 'region'=>'South Africa', + 'joined'=>'22/09/15' + ], [ + 'name'=>'Frank and Joe Westgard', + 'dojo'=>'Washington DC', + 'region'=>'USA', + 'joined'=>'22/09/14' + ], [ + 'name'=>'Martine Temples and/or Bettina Stylerts', + 'dojo'=>'CoderDojo Belgium', + 'region'=>'Belgium', + 'joined'=>'22/09/14' + ] +]; Timber::render('page-community-committee.twig', $context); diff --git a/page-news.php b/page-news.php index f5ed3a1..08691cb 100644 --- a/page-news.php +++ b/page-news.php @@ -2,12 +2,12 @@ global $paged; if (!isset($paged) || !$paged){ - $paged = 1; + $paged = 1; } $context = Timber::get_context(); $args = array( - 'posts_per_page' => 10, - 'paged' => $paged + 'posts_per_page' => 10, + 'paged' => $paged ); query_posts($args); diff --git a/page-resources.php b/page-resources.php index 8375f3f..db57a2f 100644 --- a/page-resources.php +++ b/page-resources.php @@ -1,6 +1,5 @@ ", $post->content); -Timber::render('page-supporters.twig', $context); \ No newline at end of file +Timber::render('page-supporters.twig', $context); diff --git a/page-what-we-do.php b/page-what-we-do.php index f1d048d..c79d20d 100644 --- a/page-what-we-do.php +++ b/page-what-we-do.php @@ -5,14 +5,23 @@ $context['post'] = $post; $context['broken_content'] = explode("", $post->content); -$context['howtoImages'] = [ ['src'=>'../wp-content/themes/cd-theme/static/img/users/ninja.jpg', 'alt'=>'Alt desc 2', - 'name'=>'How Do I Attend?', 'link'=>'http://www.coderdojo.com/attend-a-dojo/'], - - ['src'=>'../wp-content/themes/cd-theme/static/img/users/volunteer.jpg', 'alt'=>'Alt desc 2', - 'link'=>'http://www.coderdojo.com/volunteer','name'=>'How Do I Volunteer?'], - - ['src'=>'../wp-content/themes/cd-theme/static/img/users/champion.jpg', 'alt'=>'Alt desc 2', - 'link'=>'http://www.coderdojo.com/start-a-dojo/','name'=>'How Do I Start A Dojo?'] - ]; +$context['howtoImages'] = [ + [ + 'src'=>'../wp-content/themes/cd-theme/static/img/users/ninja.jpg', + 'alt'=>'Alt desc 2', + 'name'=>'How Do I Attend?', + 'link'=>'http://www.coderdojo.com/attend-a-dojo/' + ], [ + 'src'=>'../wp-content/themes/cd-theme/static/img/users/volunteer.jpg', + 'alt'=>'Alt desc 2', + 'link'=>'http://www.coderdojo.com/volunteer', + 'name'=>'How Do I Volunteer?' + ], [ + 'src'=>'../wp-content/themes/cd-theme/static/img/users/champion.jpg', + 'alt'=>'Alt desc 2', + 'link'=>'http://www.coderdojo.com/start-a-dojo/', + 'name'=>'How Do I Start A Dojo?' + ] +]; Timber::render('page-what-we-do.twig', $context); diff --git a/single.php b/single.php index 0673cad..397e2a8 100755 --- a/single.php +++ b/single.php @@ -13,7 +13,7 @@ $context['post'] = new TimberPost(); if ( post_password_required( $post->ID ) ) { - Timber::render( 'single-password.twig', $context ); + Timber::render( 'single-password.twig', $context ); } else { - Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context ); + Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context ); } diff --git a/static/js/nav.js b/static/js/nav.js index 75d77ae..cbed40d 100644 --- a/static/js/nav.js +++ b/static/js/nav.js @@ -1,3 +1,3 @@ $(document).ready(function () { - $(".current-menu-item").addClass("active"); + $('.current-menu-item').addClass('active'); }); diff --git a/templates/404.twig b/templates/404.twig index 029033a..cf7836d 100644 --- a/templates/404.twig +++ b/templates/404.twig @@ -2,14 +2,14 @@ {% block content %}
-
-

Oops! This is not the page you are looking for.

-

Maybe you'd like to check out some of the following fun sections of our site:

- +
+

Oops! This is not the page you are looking for.

+

Maybe you'd like to check out some of the following fun sections of our site:

+
{% endblock %} diff --git a/templates/author.twig b/templates/author.twig index 12b779b..636cbd4 100644 --- a/templates/author.twig +++ b/templates/author.twig @@ -1,7 +1,7 @@ {% extends "base.twig" %} {% block content %} - {% for post in posts %} - {% include ["tease-"~post.post_type~".twig", "tease.twig"] %} - {% endfor %} -{% endblock %} \ No newline at end of file + {% for post in posts %} + {% include ["tease-"~post.post_type~".twig", "tease.twig"] %} + {% endfor %} +{% endblock %} diff --git a/templates/bio-heads-2.twig b/templates/bio-heads-2.twig index 908f1ba..ae88b86 100644 --- a/templates/bio-heads-2.twig +++ b/templates/bio-heads-2.twig @@ -1,15 +1,15 @@
-
diff --git a/templates/comment.twig b/templates/comment.twig index 11ce183..27b3d04 100644 --- a/templates/comment.twig +++ b/templates/comment.twig @@ -1,4 +1,4 @@
-
{{comment.author.name}} says
-
{{comment.comment_content|wpautop}}
-
\ No newline at end of file +
{{comment.author.name}} says
+
{{comment.comment_content|wpautop}}
+
diff --git a/templates/grid-plus-text.twig b/templates/grid-plus-text.twig index 78d962d..e0d86a3 100644 --- a/templates/grid-plus-text.twig +++ b/templates/grid-plus-text.twig @@ -1,22 +1,20 @@ {% block content %} - {% if purpose == 'howto' %} -
-
- {% for item in howtoImages %} - diff --git a/templates/single-password.twig b/templates/single-password.twig index bf4203f..3a9bf48 100644 --- a/templates/single-password.twig +++ b/templates/single-password.twig @@ -1,9 +1,9 @@ {% extends "base.twig" %} {% block content %} -
- - - -
+
+ + + +
{% endblock %} diff --git a/templates/tease-post.twig b/templates/tease-post.twig index a47dc43..48ade21 100644 --- a/templates/tease-post.twig +++ b/templates/tease-post.twig @@ -1,9 +1,9 @@ {% extends "tease.twig" %} {% block content %} -

{{post.title}}

-

{{post.get_preview(25)}}

- {% if post.thumbnail.src %} - - {% endif %} -{% endblock %} \ No newline at end of file +

{{post.title}}

+

{{post.get_preview(25)}}

+ {% if post.thumbnail.src %} + + {% endif %} +{% endblock %} diff --git a/templates/tease.twig b/templates/tease.twig index 8f350e7..7ce1d8a 100644 --- a/templates/tease.twig +++ b/templates/tease.twig @@ -1,9 +1,9 @@
- {% block content %} -

{{post.title}}

-

{{post.get_preview}}

- {% if post.get_thumbnail %} - - {% endif %} - {% endblock %} + {% block content %} +

{{post.title}}

+

{{post.get_preview}}

+ {% if post.get_thumbnail %} + + {% endif %} + {% endblock %}
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 22b3dd8..46c2b58 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,7 +1,7 @@ assertEquals('StarterSite', get_class($context['site'])); - $this->assertTrue(current_theme_supports('post-thumbnails')); - $this->assertEquals('bar', $context['foo']); - } - - function testLoading() { - $str = Timber::compile('tease.twig'); - $this->assertStringStartsWith('
', $str); - $this->assertStringEndsWith('
', $str); - } - - static function _setupStarterTheme(){ - $dest = WP_CONTENT_DIR.'/themes/starter-theme/'; - $src = __DIR__.'/../../starter-theme/'; - if (is_dir($src)) { - self::_copyDirectory($src, $dest); - switch_theme('starter-theme'); - } else { - echo 'no its not'; - } - } - - static function _copyDirectory($src, $dst){ - $dir = opendir($src); - @mkdir($dst); - while(false !== ( $file = readdir($dir)) ) { - if (( $file != '.' ) && ( $file != '..' )) { - if ( is_dir($src . '/' . $file) ) { - self::_copyDirectory($src . '/' . $file,$dst . '/' . $file); - } - else { - copy($src . '/' . $file,$dst . '/' . $file); - } - } - } - closedir($dir); - } - - } +class TestTimberStarterTheme extends WP_UnitTestCase { + + function setUp() { + self::_setupStarterTheme(); + require_once(get_template_directory().'/functions.php'); + } + + function tearDown() { + switch_theme('twentythirteen'); + } + + function testFunctionsPHP() { + $context = Timber::get_context(); + $this->assertEquals('StarterSite', get_class($context['site'])); + $this->assertTrue(current_theme_supports('post-thumbnails')); + $this->assertEquals('bar', $context['foo']); + } + + function testLoading() { + $str = Timber::compile('tease.twig'); + $this->assertStringStartsWith('
', $str); + $this->assertStringEndsWith('
', $str); + } + + static function _setupStarterTheme(){ + $dest = WP_CONTENT_DIR.'/themes/starter-theme/'; + $src = __DIR__.'/../../starter-theme/'; + if (is_dir($src)) { + self::_copyDirectory($src, $dest); + switch_theme('starter-theme'); + } else { + echo 'no its not'; + } + } + + static function _copyDirectory($src, $dst){ + $dir = opendir($src); + @mkdir($dst); + while(false !== ( $file = readdir($dir)) ) { + if (( $file != '.' ) && ( $file != '..' )) { + if ( is_dir($src . '/' . $file) ) { + self::_copyDirectory($src . '/' . $file,$dst . '/' . $file); + } + else { + copy($src . '/' . $file,$dst . '/' . $file); + } + } + } + closedir($dir); + } +} diff --git a/views/page-about.twig b/views/page-about.twig index 8e798a2..fa9f714 100644 --- a/views/page-about.twig +++ b/views/page-about.twig @@ -6,7 +6,7 @@

{{post.title}}

- {{post.content}} + {{post.content}}
diff --git a/views/page-attend-a-dojo.twig b/views/page-attend-a-dojo.twig index 8837e61..d94c1a6 100644 --- a/views/page-attend-a-dojo.twig +++ b/views/page-attend-a-dojo.twig @@ -11,7 +11,7 @@ {% include 'cta.twig' with {'buttontext': 'Find A Dojo', 'target': 'https://zen.coderdojo.com/' } %}
- {{broken_content[1]}} + {{broken_content[1]}} {% include 'map.twig' with {'purpose': 'find' } %} diff --git a/views/page-badges.twig b/views/page-badges.twig index 1c7b9b1..d71ab23 100644 --- a/views/page-badges.twig +++ b/views/page-badges.twig @@ -2,102 +2,102 @@ {% block content %} -
-
-
-
- {{broken_content[0]}} -
-
-
-
- {% include 'grid5.twig' with { - 'gridtitle': 'Lanaguages', - 'grid': [ - { - 'body': 'HTML and CSS Sushi Beginner Badge', - 'src': site.theme.link ~ '/static/img/badges/html-beginner.png', - 'description': 'HTML and CSS Sushi Beginner' - }, - { - 'body': 'HTML and CSS Sushi Intermediate Bage', - 'src': site.theme.link ~ '/static/img/badges/html-intermediate.png', - 'description': 'HTML and CSS Sushi Intermediate' - }, - { - 'body': 'HTML and CSS Sushi Advanced Badge', - 'src': site.theme.link ~ '/static/img/badges/html-advanced.png', - 'description': 'HTML and CSS Sushi Advanced' - }, - { - 'body': 'JavaScript Sushi Beginner Badge', - 'src': site.theme.link ~ '/static/img/badges/javascript-beginner.png', - 'description': 'JavaScript Sushi Beginner' - }, - { - 'body': 'JavaScript Sushi Intermediate Badge', - 'src': site.theme.link ~ '/static/img/badges/javascript-intermediate.png', - 'description': 'JavaScript Sushi Intermediate' - }, - { - 'body': 'JavaScript Sushi Advanced Badge', - 'src': site.theme.link ~ '/static/img/badges/javascript-advanced.png', - 'description': 'JavaScript Sushi Advanced' - } - ] - } %} - {% include 'grid5.twig' with { - 'gridtitle': 'Volunteering', - 'grid': [ - { - 'body': 'Champion Badge', - 'src': site.theme.link ~ '/static/img/badges/champion.png', - 'description': 'Champion Badge' - }, - { - 'body': 'Mentor Badge', - 'src': site.theme.link ~ '/static/img/badges/mentor.png', - 'description': 'Mentor Badge' - } - ] - } %} - {% include 'grid5.twig' with { - 'gridtitle': 'Attendance', - 'grid': [ - { - 'body': 'My First Dojo Badge', - 'src': site.theme.link ~ '/static/img/badges/first-dojo.png', - 'description': 'My 1st Dojo' - }, - { - 'body': 'My Fifth Dojo Badge', - 'src': site.theme.link ~ '/static/img/badges/fifth-dojo.png', - 'description': 'My 5th Dojo' - }, - { - 'body': 'My Tenth Dojo Badge', - 'src': site.theme.link ~ '/static/img/badges/tenth-dojo.png', - 'description': 'My 10th Dojo' - }, - { - 'body': 'My Twenty Fifth Dojo Badge', - 'src': site.theme.link ~ '/static/img/badges/twenty-fifth-dojo.png', - 'description': 'My 25th Dojo' - }, - { - 'body': 'Coolest Projects 2016 Badge', - 'src': site.theme.link ~ '/static/img/badges/coolest-projects-2016.png', - 'description': 'Coolest Projects 2016' - }, - { - 'body': 'Kilkenny Scratch Competition Badge', - 'src': site.theme.link ~ '/static/img/badges/kilkenny-scratch.png', - 'description': 'Kilkenny Scratch Competition' - } - ] - } %} +
+
+
+
+ {{broken_content[0]}} +
+
+
+
+ {% include 'grid5.twig' with { + 'gridtitle': 'Lanaguages', + 'grid': [ + { + 'body': 'HTML and CSS Sushi Beginner Badge', + 'src': site.theme.link ~ '/static/img/badges/html-beginner.png', + 'description': 'HTML and CSS Sushi Beginner' + }, + { + 'body': 'HTML and CSS Sushi Intermediate Bage', + 'src': site.theme.link ~ '/static/img/badges/html-intermediate.png', + 'description': 'HTML and CSS Sushi Intermediate' + }, + { + 'body': 'HTML and CSS Sushi Advanced Badge', + 'src': site.theme.link ~ '/static/img/badges/html-advanced.png', + 'description': 'HTML and CSS Sushi Advanced' + }, + { + 'body': 'JavaScript Sushi Beginner Badge', + 'src': site.theme.link ~ '/static/img/badges/javascript-beginner.png', + 'description': 'JavaScript Sushi Beginner' + }, + { + 'body': 'JavaScript Sushi Intermediate Badge', + 'src': site.theme.link ~ '/static/img/badges/javascript-intermediate.png', + 'description': 'JavaScript Sushi Intermediate' + }, + { + 'body': 'JavaScript Sushi Advanced Badge', + 'src': site.theme.link ~ '/static/img/badges/javascript-advanced.png', + 'description': 'JavaScript Sushi Advanced' + } + ] + } %} + {% include 'grid5.twig' with { + 'gridtitle': 'Volunteering', + 'grid': [ + { + 'body': 'Champion Badge', + 'src': site.theme.link ~ '/static/img/badges/champion.png', + 'description': 'Champion Badge' + }, + { + 'body': 'Mentor Badge', + 'src': site.theme.link ~ '/static/img/badges/mentor.png', + 'description': 'Mentor Badge' + } + ] + } %} + {% include 'grid5.twig' with { + 'gridtitle': 'Attendance', + 'grid': [ + { + 'body': 'My First Dojo Badge', + 'src': site.theme.link ~ '/static/img/badges/first-dojo.png', + 'description': 'My 1st Dojo' + }, + { + 'body': 'My Fifth Dojo Badge', + 'src': site.theme.link ~ '/static/img/badges/fifth-dojo.png', + 'description': 'My 5th Dojo' + }, + { + 'body': 'My Tenth Dojo Badge', + 'src': site.theme.link ~ '/static/img/badges/tenth-dojo.png', + 'description': 'My 10th Dojo' + }, + { + 'body': 'My Twenty Fifth Dojo Badge', + 'src': site.theme.link ~ '/static/img/badges/twenty-fifth-dojo.png', + 'description': 'My 25th Dojo' + }, + { + 'body': 'Coolest Projects 2016 Badge', + 'src': site.theme.link ~ '/static/img/badges/coolest-projects-2016.png', + 'description': 'Coolest Projects 2016' + }, + { + 'body': 'Kilkenny Scratch Competition Badge', + 'src': site.theme.link ~ '/static/img/badges/kilkenny-scratch.png', + 'description': 'Kilkenny Scratch Competition' + } + ] + } %} -
- {{broken_content[1]}} -
+
+ {{broken_content[1]}} +
{% endblock %} diff --git a/views/page-community-committee.twig b/views/page-community-committee.twig index 04a7f8d..ecd5bf9 100644 --- a/views/page-community-committee.twig +++ b/views/page-community-committee.twig @@ -1,28 +1,28 @@ {% extends "base.twig" %} {% block content %} -
+
-
-
-
- {{broken_content[0]}} -
+
+
+
+ {{broken_content[0]}} +
+
+
+
+ {{broken_content[1]}} +
-
- {{broken_content[1]}} +
+ {{broken_content[2]}} + {% include 'table.twig' %}
-
-
-
- {{broken_content[2]}} - {% include 'table.twig' %} -
-
-
-
-
-
-
+
+
+
+ + +
{% endblock %} diff --git a/views/page-contact.twig b/views/page-contact.twig index 38e4ccf..5303e80 100644 --- a/views/page-contact.twig +++ b/views/page-contact.twig @@ -1,19 +1,19 @@ {% extends "base.twig" %} {% block content %} -
-
-
-
-
- {{broken_content[0]}} -
-
-
-
- {{broken_content[1]}} -
-
-
-
-
+
+
+
+
+
+ {{broken_content[0]}} +
+
+
+
+ {{broken_content[1]}} +
+
+
+
+
{% endblock %} diff --git a/views/page-donate.twig b/views/page-donate.twig index c337326..e924453 100644 --- a/views/page-donate.twig +++ b/views/page-donate.twig @@ -3,36 +3,36 @@ {% block content %} -
+
-
-
-
- {{broken_content[0]}} -
-
- -
-
- -
-
- -
-
- -
-
- {% include 'input-field.twig' with {'id': 'donate', 'placeholder': 'Pick your own amount', type: 'number', 'labelfor': 'donate', 'class': 'input-donate-custom', 'max': '100000', 'min': '1', 'name': 'donation-amount' } %} - {% include 'cta.twig' with {'buttontext': 'Donate', 'class': 'donateButtonCustom btn', 'dataName': 'CoderDojo Foundation', 'dataDescription': 'Donation' } %} - {{broken_content[1]}} - {% include 'cta.twig' with {'buttontext': 'Give Now', 'target': 'http://www.globalgiving.org/projects/coderdojo-start-a-dojo-support/' } %} - {{broken_content[2]}} - {{broken_content[3]}} - {% include 'cta.twig' with {'buttontext': 'Reporting and Governance', 'target': 'http://www.coderdojo.com/reporting-governance/' } %} -
+
+
+
+ {{broken_content[0]}} +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ {% include 'input-field.twig' with {'id': 'donate', 'placeholder': 'Pick your own amount', type: 'number', 'labelfor': 'donate', 'class': 'input-donate-custom', 'max': '100000', 'min': '1', 'name': 'donation-amount' } %} + {% include 'cta.twig' with {'buttontext': 'Donate', 'class': 'donateButtonCustom btn', 'dataName': 'CoderDojo Foundation', 'dataDescription': 'Donation' } %} + {{broken_content[1]}} + {% include 'cta.twig' with {'buttontext': 'Give Now', 'target': 'http://www.globalgiving.org/projects/coderdojo-start-a-dojo-support/' } %} + {{broken_content[2]}} + {{broken_content[3]}} + {% include 'cta.twig' with {'buttontext': 'Reporting and Governance', 'target': 'http://www.coderdojo.com/reporting-governance/' } %} +
-
-
-
+ + +
{% endblock %} diff --git a/views/page-foundation.twig b/views/page-foundation.twig index fe4a71d..e60ce2a 100644 --- a/views/page-foundation.twig +++ b/views/page-foundation.twig @@ -1,47 +1,47 @@ {% extends "base.twig" %} {% block content %} -
- +
+
-
-
-
- {{broken_content[0]}} -
+
+
+
+ {{broken_content[0]}} +
+
+
+
+ {{broken_content[1]}} +
-
- {{broken_content[1]}} +
+
+
+ {{broken_content[2]}} +
+
+ {{broken_content[3]}} +
+
+
+
+ {{broken_content[4]}} +
+
+ {{broken_content[5]}} +
+
-
-
-
-
-
- {{broken_content[2]}} -
-
- {{broken_content[3]}} -
-
-
-
- {{broken_content[4]}} -
-
- {{broken_content[5]}} -
-
-
-
-
-
- {{broken_content[6]}} - -
-
-
-
-
+
+
+
+ {{broken_content[6]}} + +
+
+ + + {% endblock %} diff --git a/views/page-movement.twig b/views/page-movement.twig index b56c9dd..1e5de93 100644 --- a/views/page-movement.twig +++ b/views/page-movement.twig @@ -1,28 +1,28 @@ {% extends "base.twig" %} {% block content %} -
- +
+
-
-
-
- {{broken_content[0]}} -
+
+
+
+ {{broken_content[0]}} +
-
- {{broken_content[1]}} +
+ {{broken_content[1]}} +
+
+
+
+ {{broken_content[2]}} +
-
-
-
- {{broken_content[2]}} - -
-
-
-
-
+
+ + + {% endblock %} diff --git a/views/page-news.twig b/views/page-news.twig index f9a1b45..748e4ff 100644 --- a/views/page-news.twig +++ b/views/page-news.twig @@ -2,49 +2,49 @@ {% block content %}
- -

All News

-
- {% include "article-list.twig" with {"wordCount": 50} %} -
-
    - {% if pagination.prev %} -
  • - Previous -
  • - {% endif %} - {% for page in pagination.pages %} -
  • - {% if page.link %} -
  • {{page.title}}
  • - {% else %} -
  • {{page.title}}
  • - {% endif %} - - {% endfor %} - {% if pagination.next %} -
  • - Next -
  • - {% endif %} -
-
-
-
- - -
+ +

All News

+
+ {% include "article-list.twig" with {"wordCount": 50} %} +
+
    + {% if pagination.prev %} +
  • + Previous +
  • + {% endif %} + {% for page in pagination.pages %} +
  • + {% if page.link %} +
  • {{page.title}}
  • + {% else %} +
  • {{page.title}}
  • + {% endif %} + + {% endfor %} + {% if pagination.next %} +
  • + Next +
  • + {% endif %} +
+
+
+
+ + +
{% endblock %} diff --git a/views/page-newsletter.twig b/views/page-newsletter.twig index 715528d..b3c766c 100644 --- a/views/page-newsletter.twig +++ b/views/page-newsletter.twig @@ -5,44 +5,44 @@
-

Subscribe to our mailing list

+

Subscribe to our mailing list

* indicates required
-
- - + +
- - + +
- - + + - +
- - + + @@ -291,7 +291,7 @@ - +
Is this a dojo email address? @@ -299,10 +299,10 @@
  • -
    - - -
    +
    + + +
    diff --git a/views/page-regional-bodies.twig b/views/page-regional-bodies.twig index d29d78d..6e05e03 100644 --- a/views/page-regional-bodies.twig +++ b/views/page-regional-bodies.twig @@ -1,21 +1,21 @@ {% extends "base.twig" %} {% block content %} -
    -
    -
    -
    -
    - {% include 'map.twig' with {'purpose': 'regional' } %} - {{broken_content[0]}} -
    -
    -
    -
    - {{broken_content[1]}} -
    -
    -
    -
    +
    +
    +
    +
    +
    + {% include 'map.twig' with {'purpose': 'regional' } %} + {{broken_content[0]}} +
    +
    +
    +
    + {{broken_content[1]}} +
    +
    +
    +
    {% endblock %} diff --git a/views/page-register.twig b/views/page-register.twig index a3b0e11..6a27145 100644 --- a/views/page-register.twig +++ b/views/page-register.twig @@ -1,11 +1,11 @@ {% extends "base.twig" %} {% block content %} -
    +
    -
    -
    -
    +
    +
    +

    Sign in OR register

    @@ -19,9 +19,9 @@
    -
    +
    -
    -
    -
    + + +
    {% endblock %} diff --git a/views/page-reporting-governance.twig b/views/page-reporting-governance.twig index 5a37c74..8a4b1ad 100644 --- a/views/page-reporting-governance.twig +++ b/views/page-reporting-governance.twig @@ -1,27 +1,27 @@ {% extends "base.twig" %} {% block content %} -
    - +
    +
    -
    -
    -
    - {{broken_content[0]}} -
    +
    +
    +
    + {{broken_content[0]}} +
    +
    +
    +
    + {{broken_content[1]}} +
    -
    - {{broken_content[1]}} +
    + {{broken_content[2]}} + {{broken_content[3]}}
    -
    -
    -
    - {{broken_content[2]}} - {{broken_content[3]}} -
    -
    -
    -
    -
    +
    + + +
    {% endblock %} diff --git a/views/page-resources.twig b/views/page-resources.twig index aa1ae98..1cfcacf 100644 --- a/views/page-resources.twig +++ b/views/page-resources.twig @@ -1,21 +1,21 @@ {% extends "base.twig" %} {% block content %} -
    +
    -
    - {{broken_content[0]}} -
    - {% include "resources-grid.twig"%} -
    -
    - {% include 'cta.twig' with {'buttontext': 'View All Resources', 'target': 'https://kata.coderdojo.com' } %} - {{broken_content[1]}} -
    -
    - {% include 'cta.twig' with {'buttontext': 'Share your work!', 'target': 'http://kata.coderdojo.com/wiki/Become_a_Kata_Editor' } %} -
    -
    -
    +
    + {{broken_content[0]}} +
    + {% include "resources-grid.twig"%} +
    +
    + {% include 'cta.twig' with {'buttontext': 'View All Resources', 'target': 'https://kata.coderdojo.com' } %} + {{broken_content[1]}} +
    +
    + {% include 'cta.twig' with {'buttontext': 'Share your work!', 'target': 'http://kata.coderdojo.com/wiki/Become_a_Kata_Editor' } %} +
    + +
    {% endblock %} diff --git a/views/page-user-details.twig b/views/page-user-details.twig index 5c37748..515842a 100644 --- a/views/page-user-details.twig +++ b/views/page-user-details.twig @@ -1,19 +1,19 @@ {% extends "base.twig" %} {% block content %} -
    +
    -
    -
    -
    +
    +
    +
    - {{broken_content[0]}} - {% include 'form.twig' with {'purpose': 'registration'} %} -
    -
    + {{broken_content[0]}} + {% include 'form.twig' with {'purpose': 'registration'} %} +
    +
    -
    -
    -
    + + +
    {% endblock %}