Skip to content

Commit

Permalink
Merge pull request #1 from samikeijonen/master
Browse files Browse the repository at this point in the history
Pull changes from master
  • Loading branch information
jukra authored Jun 28, 2017
2 parents 5a829f0 + 214aa40 commit 4d46639
Show file tree
Hide file tree
Showing 31 changed files with 1,183 additions and 263 deletions.
32 changes: 17 additions & 15 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,19 @@ var phpFiles = ['./*.php', './**/*.php', '!build/*.php'];
var project = 'checathlon'; // Project name.
var build = './build/checathlon/';
var buildInclude = [
'**',
'!node_modules/**/',
'!assets/sass/**/*',
'!build/**/',
'!.git/**',
'!Gulpfile.js',
'!package.json',
'!.gitignore',
'!.gitmodules',
'!.tx/**',
'!**/*~',
'**',
'!node_modules/**/',
'!assets/sass/**/*',
'!build/**/',
'!.git/**',
'!Gulpfile.js',
'!package.js',
'!package.json',
'!.gitignore',
'!.gitmodules',
'!.tx/**',
'!**/*~',
'!.DS_Store',
];
/*
Expand Down Expand Up @@ -139,12 +141,12 @@ gulp.task('sass-styles', function() {
* Prefix style.css rules.
*/
gulp.task('prefix:styles', function() {

gulp.src(styleFile)
.pipe(prefix('last 3 version')) // Adds browser prefixes (eg. -webkit, -moz, etc.)
.pipe(gulp.dest(cssDest))
.pipe(browserSync.stream());

});

/**
Expand Down Expand Up @@ -227,7 +229,7 @@ gulp.task('clean:build', function() {
.pipe(gulp.dest(build))
.pipe(notify({ message: 'Copy from buildFiles complete', onLast: true }));
});

/**
* Delete unneccessary folders from build.
*/
Expand Down Expand Up @@ -258,4 +260,4 @@ gulp.task('i18n', ['wp-pot']);
gulp.task('scripts', ['uglify']);
gulp.task('styles', ['prefix:styles', 'cssnano']);
gulp.task('build', ['build-folder', 'clean:unneccessary']);
gulp.task('default', ['i18n', 'styles', 'scripts', 'build']);
gulp.task('default', ['i18n', 'styles', 'scripts', 'build']);
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,45 @@ The following resources are included within the theme package.

* [Genericons](http://genericons.com/) by Automattic - Licensed under the [GPL, version 2 or later](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
* [Fontawesome](http://fontawesome.io/) by Dave Gandy - Licensed under the [MIT License](http://opensource.org/licenses/MIT).

Note that icons (only some of the icons) are turned into SVG images using tool called [Icomoon](https://icomoon.io/app/).
* Note that icons (only some of the icons) are turned into SVG images using tool called [Icomoon](https://icomoon.io/app/).
* [Header image](https://unsplash.com/collections/388152/office?photo=a2NRu2Wxa2o) in the screenshot.png by Luke Chesser - Licensed under the [CCO license](https://creativecommons.org/publicdomain/zero/1.0/). Other images shown in screenshot.png are generated by me. See the license below.

All other resources and theme elements are licensed under the [GNU GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html), version 2 or later.

© 2016 [Sami Keijonen](https://foxland.fi/).
© 2016-2017 [Sami Keijonen](https://foxland.fi/).

## Changelog

### Version 1.2.0 - April 29, 2017

* Add better support for [Subtitles plugin](https://wordpress.org/plugins/subtitles/).
* Add Polylang support for titles and textareas in the Customizer.
* Add no featured image page template.
* Add tablet and file text icons.
* Add `wide` class styles for images that span larger than the content.
* Add `flex-height` for logo.
* Add `checathlon_inside_header` and `checathlon_after_footer_title` action hooks.

### Version 1.1.4 - April 14, 2017

* Fix landmark role in footer section: Site title and description is also inside landmark role now.
* Main color `#ff1654` is switched to `#df003b`, which meets the color contrast guidelines for accessibility.

### Version 1.1.3 - March 23, 2017

* Fix social menu alignment to center when there is no footer widgets.
* Use esc_attr_e() in aria-label attribute in menus.
* Update screenshot.png.
* Add license for screenshot images.

* Show supported SVG icons in the admin page Appearance >> Checathlon.

### Version 1.1.2 - March 5, 2017

* Show supported SVG icons in the admin page Appearance >> Checathlon.
* Do not show Checathlon Plus link in the Customizer if the plugin is already active.
* Add Finnish translation.

### Version 1.1.1 - February 5, 2017

* Add support for Toot Testimonial plugin.
Expand Down
6 changes: 6 additions & 0 deletions assets/images/svg-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 22 additions & 7 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ function checathlon_setup() {

// Add support for logo.
add_theme_support( 'custom-logo', apply_filters( 'checathlon_custom_logo_arguments', array(
'height' => 60,
'width' => 60,
'flex-width' => true,
'height' => 60,
'width' => 60,
'flex-width' => true,
'flex-height' => true,
) ) );

/*
Expand Down Expand Up @@ -156,14 +157,18 @@ function checathlon_setup() {
),
) );

// Add support for Subtitles plugin.
add_post_type_support( 'testimonial', 'subtitles' );
add_post_type_support( 'jetpack-testimonial', 'subtitles' );

/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style( array( 'assets/css/editor-style.css', checathlon_fonts_url() ) );

}
add_action( 'after_setup_theme', 'checathlon_setup' );
add_action( 'after_setup_theme', 'checathlon_setup', 5 );

/**
* Set the content width in pixels, based on the theme's design and stylesheet.
Expand Down Expand Up @@ -309,7 +314,7 @@ function checathlon_javascript_detection() {
function checathlon_fonts_url() {

$fonts_url = '';
$fonts = apply_filters( 'checathlon_google_fonts', array() );
$fonts = array();
$subsets = 'latin,latin-ext';

/* translators: If there are characters in your language that are not supported by Source Sans Pro, translate this to 'off'. Do not translate into your own language. */
Expand All @@ -322,6 +327,9 @@ function checathlon_fonts_url() {
$fonts[] = 'Lora:400,700,400i,700i';
}

// Filter Google fonts array.
$fonts = apply_filters( 'checathlon_google_fonts', $fonts );

if ( $fonts ) {
$fonts_url = add_query_arg( array(
'family' => urlencode( implode( '|', $fonts ) ),
Expand Down Expand Up @@ -441,11 +449,18 @@ function checathlon_scripts() {
require get_template_directory() . '/inc/functions-edd.php';

/**
* Load pro link in the Customizer.
* Load pro link in the Customizer if Checathlon Plus plugin is not activated.
*/
if ( ! class_exists( 'Checathlon_Plus' ) ) {
require get_template_directory() . '/inc/customizer/pro/class-customize.php';
}

require get_template_directory() . '/inc/customizer/pro/class-customize.php';
/**
* Load admin theme page.
*/
require get_template_directory() . '/inc/admin.php';

/**
* Load Polylang related functions.
*/
require get_template_directory() . '/inc/functions-polylang.php';
1 change: 1 addition & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
?>

</div><!-- .wrapper -->
<?php do_action( 'checathlon_inside_header' ); ?>
</header><!-- .site-header -->
</div><!-- .site-header-wrap -->

Expand Down
83 changes: 75 additions & 8 deletions inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

// Hook into the admin menu.
add_action( 'admin_menu', 'checathlon_admin_menu' );

/**
* Adds a custom themes sub-page.
*
Expand All @@ -28,6 +25,7 @@ function checathlon_admin_menu() {
add_action( "admin_head-{$page}", 'checathlon_welcome_page_css' );
}
}
add_action( 'admin_menu', 'checathlon_admin_menu' );

/**
* Outputs some custom CSS to the welcome screen.
Expand All @@ -39,8 +37,37 @@ function checathlon_admin_menu() {
function checathlon_welcome_page_css() { ?>

<style type="text/css" media="screen">
.appearance_page_checathlon .three-col { clear: both; }
.appearance_page_checathlon .col .dashicons { margin-top: 7px; margin-right: 4px; }
.appearance_page_checathlon .three-col {
clear: both;
}
.appearance_page_checathlon .col .dashicons {
margin-top: 7px; margin-right: 4px;
}
.icons-wrapper {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin: -0.75em;
}

.icons-wrapper > * {
-ms-flex: 1 0 8em;
flex: 1 0 8em;
margin: 0.75em;
}
.url-wrap {
display: block;
}
.icon {
display: inline-block;
fill: currentColor;
position: relative; /* Align more nicely with capital letters */
top: -0.0625em;
vertical-align: middle;
width: 2em;
height: 2em;
}
</style>
<?php }

Expand Down Expand Up @@ -75,7 +102,7 @@ function checathlon_welcome_page() {

<div class="col">

<h3><i class="dashicons dashicons-sos"></i><?php esc_html_e( 'More Features', 'checathlon' ); ?></h3>
<h3><i class="dashicons dashicons-sos" aria-hidden="true"></i><?php esc_html_e( 'More Features', 'checathlon' ); ?></h3>

<p>
<?php esc_html_e( 'Checathlon Plus is Plugin that gives power and more features to Checathlon Theme.', 'checathlon' ); ?>
Expand All @@ -89,7 +116,7 @@ function checathlon_welcome_page() {

<div class="col">

<h3><i class="dashicons dashicons-admin-appearance"></i><?php esc_html_e( 'Help &amp; Documentation', 'checathlon' ); ?></h3>
<h3><i class="dashicons dashicons-admin-appearance" aria-hidden="true"></i><?php esc_html_e( 'Help &amp; Documentation', 'checathlon' ); ?></h3>

<p>
<?php esc_html_e( 'With Checathlon Plus you also get priority support. See also documentation.', 'checathlon' ); ?>
Expand All @@ -103,7 +130,7 @@ function checathlon_welcome_page() {

<div class="col">

<h3><i class="dashicons dashicons-admin-plugins"></i><?php esc_html_e( 'Supported Plugins', 'checathlon' ); ?></h3>
<h3><i class="dashicons dashicons-admin-plugins" aria-hidden="true"></i><?php esc_html_e( 'Supported Plugins', 'checathlon' ); ?></h3>

<p>
<?php esc_html_e( 'Do you need extra functionality? Checathlon has built-in support for the following plugins.', 'checathlon' ); ?>
Expand All @@ -119,6 +146,46 @@ function checathlon_welcome_page() {

</div><!-- .three-col -->

<div class="two-col">

<div class="col">
<h3><?php esc_html_e( 'Supported Social Links Menu Icons', 'checathlon' ); ?></h3>
<?php
// Get social icons.
$social_icons = checathlon_social_links_icons();

// Loop them.
echo '<div class="icons-wrapper">';
foreach ( $social_icons as $url => $icon ) {
echo '<div class="icon-wrapper">';
echo '<span class="icon-wrap">' . checathlon_get_svg( array( 'icon' => $icon ) ) . '</span>';
echo '<span class="url-wrap">' . $url . '</span>';
echo '</div>';
}
echo '</div>';
?>
</div><!-- .col -->

<div class="col">
<h3><?php esc_html_e( 'Other Icons', 'checathlon' ); ?></h3>
<?php
// Get other icons.
$other_icons = checathlon_get_svg_icons();

// Loop them.
echo '<div class="icons-wrapper">';
foreach ( $other_icons as $name => $icon ) {
echo '<div class="icon-wrapper">';
echo '<span class="icon-wrap">' . checathlon_get_svg( array( 'icon' => $icon ) ) . '</span>';
echo '<span class="url-wrap">' . $name . '</span>';
echo '</div>';
}
echo '</div>';
?>
</div><!-- .col -->

</div><!-- .two-col -->

</div><!-- .wrap -->

<?php
Expand Down
Loading

0 comments on commit 4d46639

Please sign in to comment.