This commit is contained in:
Thuan Bui
2017-10-05 10:05:14 +07:00
commit c5865ef889
58 changed files with 39514 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# http://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
[{.*rc,*.json,*.yml}]
indent_style = space
indent_size = 2
[*.txt]
end_of_line = crlf
[*.md]
trim_trailing_whitespace = false
+3
View File
@@ -0,0 +1,3 @@
# Ignore node_modules.
node_modules/
.idea/
+33
View File
@@ -0,0 +1,33 @@
# Business Pro Theme Changelog
## [1.0.0] - 2017-09-18
* Packaged for release
* Refactored hero section
* Added icon widget
## [0.2.0] - 2017-09-07
* Update coding standards
* Update and restructure helper functions
* Update and simplify hero functions
* Update coding standards
* Fix front page video toggle being added to other widget areas
* Fix front page avoid hijacking Genesis flow
* Fix some CSS bugs found by users
## [0.1.2] - 2017-02-28
* Fix pagination on masonry pages
* Fix masonry template condition check
* Fix smooth scrolling on product pages
* Fix WooCommerce if shop set to display categories
* Fix escaped HTML tag output in category subtitles
## [0.1.1] - 2017-08-26
* Fix sub pixel line in Before Footer
* Fix recommended logo size
* Fix front-page-2 paragraph margin
* Fix show/hide widget toggle
* Fix simple social icons error
* Fix WooCommerce check
## [0.1.0] - 2017-08-16
* Initial release
+177
View File
@@ -0,0 +1,177 @@
# Business Pro Theme
A robust and flexible WordPress theme for businesses of any kind. Demo - [https://demo.seothemes.com/business-pro](https://demo.seothemes.com/business-pro)
## Features
- Custom Colors
Business Pro provides custom color settings with transparency/opacity options giving you even more control over your theme's colors
- Hero Image or Video
Upload your own video or a YouTube URL for the background. Each page can also have it's own hero image by simply setting a featured image
- Widget Columns
Create your own front page layouts with easy to use widget column classes
- Beyond Optimized
Extensive schema microdata implementation to ensure search engines understand your content and business
- Lightbox Gallery
Show of your work with the built in responsive lightbox gallery shortcode
- WooCommerce
Fully integrated with the world's most popular WordPress eCommerce plugin WooCommerce
- Masonry Grid
Business Pro includes a masonry portfolio and blog that looks great and works at all screen sizes
- Testimonials
Display your best customer reviews with the easy to use, search engine optimized Genesis Testimonial plugin
- Google Fonts
This theme uses minimal, super fast loading and great looking Google Fonts for the fastest performance
- Fully Responsive
Needless to say that this theme looks great and works at any screen size on any device
- Fixed Header
Enable a fixed header easily by adding one line of code to your theme
- Templates & Layouts
Custom page templates and layouts provide plenty of options for displaying your content
## Recommendations
* PHP > 7.0
* WordPress > 4.8.1
* Genesis Framework > 2.4
* Node.js > 6.9
* Gulp.js > 3.9
## Installation
1. Upload and install Genesis
2. Upload, install and activate Business Pro
3. Install and activate recommended plugins
4. *Important* Delete unwanted existing posts, pages, comments & widgets
5. Import sample.xml from Tools > Import
6. Import widgets.wie from Tools > Widget Importer & Exporter
## Customization
1. Go to Appearance > Customize > Site Identity to upload a logo
2. Go to Appearamce > Customize > Header Media to upload hero image or video
3. Go to Appearance > Customize > Menus to create menus
4. Go to Appearance > Customize > Static Front Page and configure to your liking
5. Go to Appearance > Customize > Site Layout and configure to your liking
6. Go to Genesis > Theme Settings to enable Breadcrumbs on pages
## Widget Areas
* Header right
* Primary sidebar
* Before footer
* Front page
* Footer
## Structure
```shell
theme/
├── assets/
│ ├── images/
│ ├── scripts/
│ └── styles/
├── includes/
│ ├── customize.php
│ ├── defaults.php
│ ├── helpers.php
│ ├── hero.php
│ └── plugins.php
├── languages/
│ └── business-pro.pot
├── templates/
│ ├── page-builder.php
│ ├── page-landing.php
│ ├── page-masonry.php
│ └── page-service.php
├── .editorconfig
├── .gitignore
├── archive-portfolio.php
├── CHANGELOG.md
├── front-page.php
├── functions.php
├── gulpfile.js
├── package.json
├── README.md
├── sample.xml
├── screenshot.png
├── style.css
└── widgets.wie
```
## Development
Business Pro uses [Gulp](http://gulpjs.com/) as a build tool and [npm](https://www.npmjs.com/) to manage front-end packages.
### Install dependencies
From the command line on your host machine, navigate to the theme directory then run `npm install`:
```shell
# @ themes/your-theme-name/
$ npm install
```
You now have all the necessary dependencies to run the build process.
### Build commands
* `gulp styles` — Compile, autoprefix and minify Sass files.
* `gulp scripts` — Minify javascript files.
* `gulp images` — Compress and optimize images.
* `gulp watch` — Compile assets when file changes are made, start BrowserSync
* `gulp` — Default task - runs all of the above tasks.
#### Additional commands
* `gulp i18n` — Scan the theme and create `languages.pot` POT file.
* `gulp zip` — Package theme into zip file for distribution, ignoring `node_modules`.
### Using BrowserSync
To use BrowserSync you need to update the proxy URL in `gulpfile.js` to reflect your local development hostname. If you are using a self-signed SSL certificate on your localhost, keep the BrowserSync settings the same, just change the URL. If not using an SSL, remove the default settings and use the commented-out settings from line 313 - 315.
If your local development URL is `my-site.dev`, update the file to read:
```javascript
...
proxy: 'my-site.dev',
...
```
## Support
Please visit https://seothemes.com/support/ for theme support.
+95
View File
@@ -0,0 +1,95 @@
<?php
/**
* Portfolio Archive.
*
* This template overrides the default archive template to clean
* up the output.
*
* @package Business Pro
* @link https://seothemes.com/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// Force full width content layout.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
// Remove the breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
// Remove standard loop (optional).
remove_action( 'genesis_loop', 'genesis_do_loop' );
// Add our custom loop.
add_action( 'genesis_loop', 'business_filterable_portfolio' );
// Enqueue scripts.
wp_enqueue_script( 'isotope', get_stylesheet_directory_uri() . '/assets/scripts/min/isotope.pkgd.min.js', array( 'jquery' ), CHILD_THEME_VERSION, false );
wp_enqueue_script( 'isotope-init', get_stylesheet_directory_uri() . '/assets/scripts/min/isotope-init.min.js', array( 'isotope' ), CHILD_THEME_VERSION, false );
/**
* Output filterable portfolio items.
*
* @since 1.0.0
*
* @return void
*/
function business_filterable_portfolio() {
global $post;
$terms = get_terms( 'portfolio-type' );
?>
<div class="portfolio">
<?php if ( $terms ) { ?>
<div id="portfolio-cats" class="filter clearfix">
<div class="wrap">
<a href="#" class="active" data-filter="*"><?php esc_html_e( 'All', 'business-pro' ); ?></a>
<?php foreach ( $terms as $term ) : ?>
<a href='#' data-filter='.<?php echo esc_attr( $term->slug ); ?>'><?php echo esc_html( $term->name ); ?></a>
<?php endforeach; ?>
</div>
</div>
<?php } ?>
<?php if ( have_posts() ) { ?>
<div class="portfolio-sizer"></div>
<div class="portfolio-content">
<?php
while ( have_posts() ) :
the_post();
$terms = get_the_terms( get_the_ID(), 'portfolio-type' );
// Display portfolio items.
if ( has_post_thumbnail( $post->ID ) ) {
?>
<article class="portfolio-item <?php if ( $terms ) { foreach ( $terms as $term ) { echo ' ' . esc_attr( $term->slug ); } } ?>">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php
echo genesis_get_image( array(
'size' => 'portfolio',
'itemprop' => 'image',
) );
printf( '<p class="entry-title" itemprop="name"><span>%s</span></p>', get_the_title() );
?>
</a>
</article>
<?php
}
endwhile;
?>
</div>
<?php } ?>
</div>
<?php
}
// Run genesis.
genesis();
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 544 51" style="enable-background:new 0 0 544 51;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M41.2,12.9c0,5.4-3.3,9.6-8.7,11.1C39,25.2,43,30.1,43,36.7c0,8.6-7.3,14-19,14H0V0.3h23.2
C34.3,0.3,41.2,5.1,41.2,12.9z M29.5,15c0-3.5-2.6-5.5-6.9-5.4H11.4v11h11.2C26.9,20.6,29.5,18.5,29.5,15z M31.3,35.3
c0-3.7-3.3-5.9-8.6-5.8H11.4v12h11.2C27.9,41.4,31.3,39.2,31.3,35.3z"/>
<path class="st0" d="M73.2,41.3c6.8,0,11.2-4.4,11.2-11.7V0.3h11.4v29.3c0,13.3-8.7,21.6-22.6,21.6c-14,0-22.9-8.3-22.9-21.6V0.3
h11.4v29.3C61.7,36.9,66.5,41.3,73.2,41.3z"/>
<path class="st0" d="M123.5,9.5c-3.8,0-6.4,1.4-6.4,4.1c0,9.3,26.9,4.1,26.8,22.2c0,9.9-8.6,15.2-19.7,15.2c-8.3,0-16.6-3.2-22.2-8
l4.5-9.3c5.2,4.6,12.5,7.6,17.9,7.6c4.7,0,7.5-1.7,7.5-4.8c0-9.5-26.9-4-26.9-21.8c0-9.1,7.8-14.9,19.5-14.9
c7.1,0,14.1,2.2,19.2,5.5l-4.4,9.4C133.8,11.5,127.5,9.5,123.5,9.5z"/>
<path class="st0" d="M163.2,0.3v50.4h-11.4V0.3H163.2z"/>
<path class="st0" d="M184.8,0.3l24.5,32.4V0.3H220v50.4h-10.4l-24.4-32.3v32.3h-10.9V0.3H184.8z"/>
<path class="st0" d="M269.5,0.3v9.4h-27v10.9h24.3v9.4h-24.3v11.2h27.8v9.4h-39.2V0.3H269.5z"/>
<path class="st0" d="M296.7,9.5c-3.8,0-6.4,1.4-6.4,4.1c0,9.3,26.9,4.1,26.8,22.2c0,9.9-8.6,15.2-19.7,15.2c-8.3,0-16.6-3.2-22.2-8
l4.5-9.3c5.2,4.6,12.5,7.6,17.9,7.6c4.7,0,7.5-1.7,7.5-4.8c0-9.5-26.9-4-26.9-21.8c0-9.1,7.8-14.9,19.5-14.9
c7.1,0,14.1,2.2,19.2,5.5l-4.4,9.4C307.1,11.5,300.7,9.5,296.7,9.5z"/>
<path class="st0" d="M342.6,9.5c-3.8,0-6.4,1.4-6.4,4.1c0,9.3,26.9,4.1,26.8,22.2c0,9.9-8.6,15.2-19.7,15.2c-8.3,0-16.6-3.2-22.2-8
l4.5-9.3c5.2,4.6,12.5,7.6,17.9,7.6c4.7,0,7.5-1.7,7.5-4.8c0-9.5-26.9-4-26.9-21.8c0-9.1,7.8-14.9,19.5-14.9
c7.1,0,14.1,2.2,19.2,5.5l-4.4,9.4C352.9,11.5,346.6,9.5,342.6,9.5z"/>
<path class="st0" d="M434.1,17.8c0,11.7-7.3,18.5-20.2,18.5h-10v14.4h-11.4V0.3h21.4C426.7,0.3,434.1,6.6,434.1,17.8z M423.3,18.2
c0-5.6-3.6-8.4-9.9-8.4h-9.4v17.1h9.4C419.7,26.8,423.3,23.9,423.3,18.2z"/>
<path class="st0" d="M472.3,50.7l-8-14.4h-1.1h-10.5v14.4h-11.4V0.3h21.9c13.2,0,20.7,6.3,20.7,17.5c0,7.8-3.3,13.4-9.4,16.3
l10.7,16.6H472.3z M452.7,26.8h10.5c6.3,0,9.9-2.9,9.9-8.6c0-5.6-3.6-8.4-9.9-8.4h-10.5V26.8z"/>
<path class="st0" d="M544,25.5c0,14.5-11.7,25.7-27.1,25.7s-27.1-11.1-27.1-25.7c0-14.7,11.7-25.6,27.1-25.6S544,10.9,544,25.5z
M501.5,25.5c0,8.9,7.1,15.8,15.6,15.8c8.4,0,15.3-6.9,15.3-15.8c0-8.9-6.8-15.6-15.3-15.6C508.6,9.9,501.5,16.6,501.5,25.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+79
View File
@@ -0,0 +1,79 @@
(function (document, $, undefined) {
/**
* Add shrink class to header on scroll.
*/
$(window).scroll(function () {
var scroll = $(window).scrollTop();
var height = $('.hero-section').outerHeight();
var header = $('.site-header').outerHeight();
if (scroll >= header) {
$(".site-header").addClass("shrink");
} else {
$(".site-header").removeClass("shrink");
}
});
/**
* Show/hide video lightbox.
*/
$('.front-page-4 .wp-video').append('<button class="hide-video">×</button>');
$('.front-page-4 .wp-video').prepend('<div class="before"></div>');
$('.show-video').on('click', function () {
$('.widget_media_video').toggleClass('visible');
});
$('.hide-video, .before').on('click', function () {
$('.front-page-4 .widget_media_video').toggleClass('visible');
});
// Append icon for enews footer widget.
$('.footer-widgets .enews form').append('<i class="fa fa-send-o"></i>');
// Add back to top button.
$('.site-footer > .wrap').append('<a href="#top" class="back-to-top"></a>');
// Add id to top of page for scrolling target.
$('html').attr('id', 'top');
/**
* Smooth scrolling.
*/
// Select all links with hashes
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
// Remove WooCommerce tabs
.not('[href*="#tab-"]')
.click(function (event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &&
location.hostname == this.hostname
) {
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top
}, 1000, function () {
// Callback after animation
// Must change focus!
var $target = $(target);
$target.focus();
if ($target.is(":focus")) { // Checking if the target was focused
return false;
} else {
$target.attr('tabindex', '-1'); // Adding tabindex for elements not focusable
$target.focus(); // Set focus again
};
});
}
}
});
})(document, jQuery);
+267
View File
@@ -0,0 +1,267 @@
/**
* Alpha Color Picker JS
*
* This file includes several helper functions and the core control JS.
*/
/**
* Override the stock color.js toString() method to add support for
* outputting RGBa or Hex.
*/
Color.prototype.toString = function( flag ) {
// If our no-alpha flag has been passed in, output RGBa value with 100% opacity.
// This is used to set the background color on the opacity slider during color changes.
if ( 'no-alpha' == flag ) {
return this.toCSS( 'rgba', '1' ).replace( /\s+/g, '' );
}
// If we have a proper opacity value, output RGBa.
if ( 1 > this._alpha ) {
return this.toCSS( 'rgba', this._alpha ).replace( /\s+/g, '' );
}
// Proceed with stock color.js hex output.
var hex = parseInt( this._color, 10 ).toString( 16 );
if ( this.error ) { return ''; }
if ( hex.length < 6 ) {
for ( var i = 6 - hex.length - 1; i >= 0; i-- ) {
hex = '0' + hex;
}
}
return '#' + hex;
};
/**
* Given an RGBa, RGB, or hex color value, return the alpha channel value.
*/
function acp_get_alpha_value_from_color( value ) {
var alphaVal;
// Remove all spaces from the passed in value to help our RGBa regex.
value = value.replace( / /g, '' );
if ( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ ) ) {
alphaVal = parseFloat( value.match( /rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/ )[1] ).toFixed(2) * 100;
alphaVal = parseInt( alphaVal );
} else {
alphaVal = 100;
}
return alphaVal;
}
/**
* Force update the alpha value of the color picker object and maybe the alpha slider.
*/
function acp_update_alpha_value_on_color_control( alpha, $control, $alphaSlider, update_slider ) {
var iris, colorPicker, color;
iris = $control.data( 'a8cIris' );
colorPicker = $control.data( 'wpWpColorPicker' );
// Set the alpha value on the Iris object.
iris._color._alpha = alpha;
// Store the new color value.
color = iris._color.toString();
// Set the value of the input.
$control.val( color );
// Update the background color of the color picker.
colorPicker.toggler.css({
'background-color': color
});
// Maybe update the alpha slider itself.
if ( update_slider ) {
acp_update_alpha_value_on_alpha_slider( alpha, $alphaSlider );
}
// Update the color value of the color picker object.
$control.wpColorPicker( 'color', color );
}
/**
* Update the slider handle position and label.
*/
function acp_update_alpha_value_on_alpha_slider( alpha, $alphaSlider ) {
$alphaSlider.slider( 'value', alpha );
$alphaSlider.find( '.ui-slider-handle' ).text( alpha.toString() );
}
/**
* Initialization trigger.
*/
jQuery( document ).ready( function( $ ) {
// Loop over each control and transform it into our color picker.
$( '.alpha-color-control' ).each( function() {
// Scope the vars.
var $control, startingColor, paletteInput, showOpacity, defaultColor, palette,
colorPickerOptions, $container, $alphaSlider, alphaVal, sliderOptions;
// Store the control instance.
$control = $( this );
// Get a clean starting value for the option.
startingColor = $control.val().replace( /\s+/g, '' );
// Get some data off the control.
paletteInput = $control.attr( 'data-palette' );
showOpacity = $control.attr( 'data-show-opacity' );
defaultColor = $control.attr( 'data-default-color' );
// Process the palette.
if ( paletteInput.indexOf( '|' ) !== -1 ) {
palette = paletteInput.split( '|' );
} else if ( 'false' == paletteInput ) {
palette = false;
} else {
palette = true;
}
// Set up the options that we'll pass to wpColorPicker().
colorPickerOptions = {
change: function( event, ui ) {
var key, value, alpha, $transparency;
key = $control.attr( 'data-customize-setting-link' );
value = $control.wpColorPicker( 'color' );
// Set the opacity value on the slider handle when the default color button is clicked.
if ( defaultColor == value ) {
alpha = acp_get_alpha_value_from_color( value );
$alphaSlider.find( '.ui-slider-handle' ).text( alpha );
}
// Send ajax request to wp.customize to trigger the Save action.
wp.customize( key, function( obj ) {
obj.set( value );
});
$transparency = $container.find( '.transparency' );
// Always show the background color of the opacity slider at 100% opacity.
$transparency.css( 'background-color', ui.color.toString( 'no-alpha' ) );
},
palettes: palette // Use the passed in palette.
};
// Create the colorpicker.
$control.wpColorPicker( colorPickerOptions );
$container = $control.parents( '.wp-picker-container:first' );
// Insert our opacity slider.
$( '<div class="alpha-color-picker-container">' +
'<div class="min-click-zone click-zone"></div>' +
'<div class="max-click-zone click-zone"></div>' +
'<div class="alpha-slider"></div>' +
'<div class="transparency"></div>' +
'</div>' ).appendTo( $container.find( '.wp-picker-holder' ) );
$alphaSlider = $container.find( '.alpha-slider' );
// If starting value is in format RGBa, grab the alpha channel.
alphaVal = acp_get_alpha_value_from_color( startingColor );
// Set up jQuery UI slider() options.
sliderOptions = {
create: function( event, ui ) {
var value = $( this ).slider( 'value' );
// Set up initial values.
$( this ).find( '.ui-slider-handle' ).text( value );
$( this ).siblings( '.transparency ').css( 'background-color', startingColor );
},
value: alphaVal,
range: 'max',
step: 1,
min: 0,
max: 100,
animate: 300
};
// Initialize jQuery UI slider with our options.
$alphaSlider.slider( sliderOptions );
// Maybe show the opacity on the handle.
if ( 'true' == showOpacity ) {
$alphaSlider.find( '.ui-slider-handle' ).addClass( 'show-opacity' );
}
// Bind event handlers for the click zones.
$container.find( '.min-click-zone' ).on( 'click', function() {
acp_update_alpha_value_on_color_control( 0, $control, $alphaSlider, true );
});
$container.find( '.max-click-zone' ).on( 'click', function() {
acp_update_alpha_value_on_color_control( 100, $control, $alphaSlider, true );
});
// Bind event handler for clicking on a palette color.
$container.find( '.iris-palette' ).on( 'click', function() {
var color, alpha;
color = $( this ).css( 'background-color' );
alpha = acp_get_alpha_value_from_color( color );
acp_update_alpha_value_on_alpha_slider( alpha, $alphaSlider );
// Sometimes Iris doesn't set a perfect background-color on the palette,
// for example rgba(20, 80, 100, 0.3) becomes rgba(20, 80, 100, 0.298039).
// To compensante for this we round the opacity value on RGBa colors here
// and save it a second time to the color picker object.
if ( alpha != 100 ) {
color = color.replace( /[^,]+(?=\))/, ( alpha / 100 ).toFixed( 2 ) );
}
$control.wpColorPicker( 'color', color );
});
// Bind event handler for clicking on the 'Clear' button.
$container.find( '.button.wp-picker-clear' ).on( 'click', function() {
var key = $control.attr( 'data-customize-setting-link' );
// The #fff color is delibrate here. This sets the color picker to white instead of the
// defult black, which puts the color picker in a better place to visually represent empty.
$control.wpColorPicker( 'color', '#ffffff' );
// Set the actual option value to empty string.
wp.customize( key, function( obj ) {
obj.set( '' );
});
acp_update_alpha_value_on_alpha_slider( 100, $alphaSlider );
});
// Bind event handler for clicking on the 'Default' button.
$container.find( '.button.wp-picker-default' ).on( 'click', function() {
var alpha = acp_get_alpha_value_from_color( defaultColor );
acp_update_alpha_value_on_alpha_slider( alpha, $alphaSlider );
});
// Bind event handler for typing or pasting into the input.
$control.on( 'input', function() {
var value = $( this ).val();
var alpha = acp_get_alpha_value_from_color( value );
acp_update_alpha_value_on_alpha_slider( alpha, $alphaSlider );
});
// Update all the things when the slider is interacted with.
$alphaSlider.slider().on( 'slide', function( event, ui ) {
var alpha = parseFloat( ui.value ) / 100.0;
acp_update_alpha_value_on_color_control( alpha, $control, $alphaSlider, false );
// Change value shown on slider handle.
$( this ).find( '.ui-slider-handle' ).text( ui.value );
});
});
});
+43
View File
@@ -0,0 +1,43 @@
jQuery(function($){
$(window).load(function() {
// Main function.
function portfolioIsotope() {
var $container = $('.portfolio-content');
$container.isotope({
itemSelector: '.portfolio-item',
masonry: {
itemSelector: ".portfolio-item",
columnWidth: ".portfolio-item",
gutter: 20
}
});
} portfolioIsotope();
// Filter.
$('.filter a').click(function(){
var selector = $(this).attr('data-filter');
$('.portfolio-content').isotope({ filter: selector });
$(this).parent().find('a').removeClass('active');
$(this).addClass('active');
return false;
});
// Resize.
var isIE8 = $.browser.msie && +$.browser.version === 8;
if (isIE8) {
document.body.onresize = function () {
portfolioIsotope();
};
} else {
$(window).resize(function () {
portfolioIsotope();
});
}
// Orientation change.
window.addEventListener("orientationchange", function() {
portfolioIsotope();
});
});
});
File diff suppressed because it is too large Load Diff
+419
View File
@@ -0,0 +1,419 @@
/**
* This script adds the accessibility-ready responsive menus Genesis Framework child themes.
*
* @author StudioPress
* @link https://github.com/copyblogger/responsive-menus
* @version 1.1.3
* @license GPL-2.0+
*/
( function ( document, $, undefined ) {
'use strict';
$('body').removeClass('no-js');
var genesisMenuParams = typeof genesis_responsive_menu === 'undefined' ? '' : genesis_responsive_menu,
genesisMenusUnchecked = genesisMenuParams.menuClasses,
genesisMenus = {},
menusToCombine = [];
/**
* Validate the menus passed by the theme with what's being loaded on the page,
* and pass the new and accurate information to our new data.
* @param {genesisMenusUnchecked} Raw data from the localized script in the theme.
* @return {array} genesisMenus array gets populated with updated data.
* @return {array} menusToCombine array gets populated with relevant data.
*/
$.each( genesisMenusUnchecked, function( group ) {
// Mirror our group object to populate.
genesisMenus[group] = [];
// Loop through each instance of the specified menu on the page.
$.each( this, function( key, value ) {
var menuString = value,
$menu = $(value);
// If there is more than one instance, append the index and update array.
if ( $menu.length > 1 ) {
$.each( $menu, function( key, value ) {
var newString = menuString + '-' + key;
$(this).addClass( newString.replace('.','') );
genesisMenus[group].push( newString );
if ( 'combine' === group ) {
menusToCombine.push( newString );
}
});
} else if ( $menu.length == 1 ) {
genesisMenus[group].push( menuString );
if ( 'combine' === group ) {
menusToCombine.push( menuString );
}
}
});
});
// Make sure there is something to use for the 'others' array.
if ( typeof genesisMenus.others == 'undefined' ) {
genesisMenus.others = [];
}
// If there's only one menu on the page for combining, push it to the 'others' array and nullify our 'combine' variable.
if ( menusToCombine.length == 1 ) {
genesisMenus.others.push( menusToCombine[0] );
genesisMenus.combine = null;
menusToCombine = null;
}
var genesisMenu = {},
mainMenuButtonClass = 'menu-toggle',
subMenuButtonClass = 'sub-menu-toggle',
responsiveMenuClass = 'genesis-responsive-menu';
// Initialize.
genesisMenu.init = function() {
// Exit early if there are no menus to do anything.
if ( $( _getAllMenusArray() ).length == 0 ) {
return;
}
var menuIconClass = typeof genesisMenuParams.menuIconClass !== 'undefined' ? genesisMenuParams.menuIconClass : 'dashicons-before dashicons-menu',
subMenuIconClass = typeof genesisMenuParams.subMenuIconClass !== 'undefined' ? genesisMenuParams.subMenuIconClass : 'dashicons-before dashicons-arrow-down-alt2',
toggleButtons = {
menu : $( '<button />', {
'class' : mainMenuButtonClass,
'aria-expanded' : false,
'aria-pressed' : false,
'role' : 'button',
'text' : 'Menu'
} )
.append( $( '<span />' ) ),
submenu : $( '<button />', {
'class' : subMenuButtonClass,
'aria-expanded' : false,
'aria-pressed' : false,
'text' : ''
} )
.append( $( '<span />', {
'class' : 'screen-reader-text',
'text' : genesisMenuParams.subMenu
} ) )
};
// Add the responsive menu class to the active menus.
_addResponsiveMenuClass();
// Add the main nav button to the primary menu, or exit the plugin.
_addMenuButtons( toggleButtons );
// Setup additional classes.
$( '.' + mainMenuButtonClass ).addClass( menuIconClass );
$( '.' + subMenuButtonClass ).addClass( subMenuIconClass );
$( '.' + mainMenuButtonClass ).on( 'click.genesisMenu-mainbutton', _mainmenuToggle ).each( _addClassID );
$( '.' + subMenuButtonClass ).on( 'click.genesisMenu-subbutton', _submenuToggle );
$( window ).on( 'resize.genesisMenu', _doResize ).triggerHandler( 'resize.genesisMenu' );
};
/**
* Add menu toggle button to appropriate menus.
* @param {toggleButtons} Object of menu buttons to use for toggles.
*/
function _addMenuButtons( toggleButtons ) {
// Apply sub menu toggle to each sub-menu found in the menuList.
$( _getMenuSelectorString( genesisMenus ) ).find( '.sub-menu' ).before( toggleButtons.submenu );
if ( menusToCombine !== null ) {
var menusToToggle = genesisMenus.others.concat( menusToCombine[0] );
// Only add menu button the primary menu and navs NOT in the combine variable.
$( _getMenuSelectorString( menusToToggle ) ).before( toggleButtons.menu );
} else {
// Apply the main menu toggle to all menus in the list.
$( _getMenuSelectorString( genesisMenus.others ) ).before( toggleButtons.menu );
}
}
/**
* Add the responsive menu class.
*/
function _addResponsiveMenuClass() {
$( _getMenuSelectorString( genesisMenus ) ).addClass( responsiveMenuClass );
}
/**
* Execute our responsive menu functions on window resizing.
*/
function _doResize() {
var buttons = $( 'button[id^="genesis-mobile-"]' ).attr( 'id' );
if ( typeof buttons === 'undefined' ) {
return;
}
_maybeClose( buttons );
_superfishToggle( buttons );
_changeSkipLink( buttons );
_combineMenus( buttons );
}
/**
* Add the nav- class of the related navigation menu as
* an ID to associated button (helps target specific buttons outside of context).
*/
function _addClassID() {
var $this = $( this ),
nav = $this.next( 'nav' ),
id = 'class';
$this.attr( 'id', 'genesis-mobile-' + $( nav ).attr( id ).match( /nav-\w*\b/ ) );
}
/**
* Combine our menus if the mobile menu is visible.
* @params buttons
*/
function _combineMenus( buttons ){
// Exit early if there are no menus to combine.
if ( menusToCombine == null ) {
return;
}
// Split up the menus to combine based on order of appearance in the array.
var primaryMenu = menusToCombine[0],
combinedMenus = $( menusToCombine ).filter( function(index) { if ( index > 0 ) { return index; } });
// If the responsive menu is active, append items in 'combinedMenus' object to the 'primaryMenu' object.
if ( 'none' !== _getDisplayValue( buttons ) ) {
$.each( combinedMenus, function( key, value ) {
$(value).find( '.menu > li' ).addClass( 'moved-item-' + value.replace( '.','' ) ).appendTo( primaryMenu + ' ul.genesis-nav-menu' );
});
$( _getMenuSelectorString( combinedMenus ) ).hide();
} else {
$( _getMenuSelectorString( combinedMenus ) ).show();
$.each( combinedMenus, function( key, value ) {
$( '.moved-item-' + value.replace( '.','' ) ).appendTo( value + ' ul.genesis-nav-menu' ).removeClass( 'moved-item-' + value.replace( '.','' ) );
});
}
}
/**
* Action to happen when the main menu button is clicked.
*/
function _mainmenuToggle() {
var $this = $( this );
_toggleAria( $this, 'aria-pressed' );
_toggleAria( $this, 'aria-expanded' );
$this.toggleClass( 'activated' );
$this.next( 'nav' ).fadeToggle( 'fast' );
}
/**
* Action for submenu toggles.
*/
function _submenuToggle() {
var $this = $( this ),
others = $this.closest( '.menu-item' ).siblings();
_toggleAria( $this, 'aria-pressed' );
_toggleAria( $this, 'aria-expanded' );
$this.toggleClass( 'activated' );
$this.next( '.sub-menu' ).slideToggle( 'fast' );
others.find( '.' + subMenuButtonClass ).removeClass( 'activated' ).attr( 'aria-pressed', 'false' );
others.find( '.sub-menu' ).slideUp( 'fast' );
}
/**
* Activate/deactivate superfish.
* @params buttons
*/
function _superfishToggle( buttons ) {
var _superfish = $( '.' + responsiveMenuClass + ' .js-superfish' ),
$args = 'destroy';
if ( typeof _superfish.superfish !== 'function' ) {
return;
}
if ( 'none' === _getDisplayValue( buttons ) ) {
$args = {
'delay': 0,
'animation': {'opacity': 'show'},
'dropShadows': false,
'speed': 0,
'disableHI': true
};
}
_superfish.superfish( $args );
}
/**
* Modify skip link to match mobile buttons.
* @param buttons
*/
function _changeSkipLink( buttons ) {
// Start with an empty array.
var menuToggleList = _getAllMenusArray();
// Exit out if there are no menu items to update.
if ( ! $( menuToggleList ).length > 0 ) {
return;
}
$.each( menuToggleList, function ( key, value ) {
var newValue = value.replace( '.', '' ),
startLink = 'genesis-' + newValue,
endLink = 'genesis-mobile-' + newValue;
if ( 'none' == _getDisplayValue( buttons ) ) {
startLink = 'genesis-mobile-' + newValue;
endLink = 'genesis-' + newValue;
}
var $item = $( '.genesis-skip-link a[href="#' + startLink + '"]' );
if ( menusToCombine !== null && value !== menusToCombine[0] ) {
$item.toggleClass( 'skip-link-hidden' );
}
if ( $item.length > 0 ) {
var link = $item.attr( 'href' );
link = link.replace( startLink, endLink );
$item.attr( 'href', link );
} else {
return;
}
});
}
/**
* Close all the menu toggles if buttons are hidden.
* @param buttons
*/
function _maybeClose( buttons ) {
if ( 'none' !== _getDisplayValue( buttons ) ) {
return true;
}
$( '.' + mainMenuButtonClass + ', .' + responsiveMenuClass + ' .sub-menu-toggle' )
.removeClass( 'activated' )
.attr( 'aria-expanded', false )
.attr( 'aria-pressed', false );
$( '.' + responsiveMenuClass + ', .' + responsiveMenuClass + ' .sub-menu' )
.attr( 'style', '' );
}
/**
* Generic function to get the display value of an element.
* @param {id} $id ID to check
* @return {string} CSS value of display property
*/
function _getDisplayValue( $id ) {
var element = document.getElementById( $id ),
style = window.getComputedStyle( element );
return style.getPropertyValue( 'display' );
}
/**
* Toggle aria attributes.
* @param {button} $this passed through
* @param {aria-xx} attribute aria attribute to toggle
* @return {bool} from _ariaReturn
*/
function _toggleAria( $this, attribute ) {
$this.attr( attribute, function( index, value ) {
return 'false' === value;
});
}
/**
* Helper function to return a comma separated string of menu selectors.
* @param {itemArray} Array of menu items to loop through.
* @param {ignoreSecondary} boolean of whether to ignore the 'secondary' menu item.
* @return {string} Comma-separated string.
*/
function _getMenuSelectorString( itemArray ) {
var itemString = $.map( itemArray, function( value, key ) {
return value;
});
return itemString.join( ',' );
}
/**
* Helper function to return a group array of all the menus in
* both the 'others' and 'combine' arrays.
* @return {array} Array of all menu items as class selectors.
*/
function _getAllMenusArray() {
// Start with an empty array.
var menuList = [];
// If there are menus in the 'menusToCombine' array, add them to 'menuList'.
if ( menusToCombine !== null ) {
$.each( menusToCombine, function( key, value ) {
menuList.push( value.valueOf() );
});
}
// Add menus in the 'others' array to 'menuList'.
$.each( genesisMenus.others, function( key, value ) {
menuList.push( value.valueOf() );
});
if ( menuList.length > 0 ) {
return menuList;
} else {
return null;
}
}
$(document).ready(function () {
if ( _getAllMenusArray() !== null ) {
genesisMenu.init();
}
});
})( document, jQuery );
+1
View File
@@ -0,0 +1 @@
!function(e,o,t){o(window).scroll(function(){var e=o(window).scrollTop();o(".hero-section").outerHeight();e>=o(".site-header").outerHeight()?o(".site-header").addClass("shrink"):o(".site-header").removeClass("shrink")}),o(".front-page-4 .wp-video").append('<button class="hide-video">×</button>'),o(".front-page-4 .wp-video").prepend('<div class="before"></div>'),o(".show-video").on("click",function(){o(".widget_media_video").toggleClass("visible")}),o(".hide-video, .before").on("click",function(){o(".front-page-4 .widget_media_video").toggleClass("visible")}),o(".footer-widgets .enews form").append('<i class="fa fa-send-o"></i>'),o(".site-footer > .wrap").append('<a href="#top" class="back-to-top"></a>'),o("html").attr("id","top"),o('a[href*="#"]').not('[href="#"]').not('[href="#0"]').not('[href*="#tab-"]').click(function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=o(this.hash);(t=t.length?t:o("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),o("html, body").animate({scrollTop:t.offset().top},1e3,function(){var e=o(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}})}(document,jQuery);
+1
View File
@@ -0,0 +1 @@
function acp_get_alpha_value_from_color(a){var o;return(a=a.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(o=100*parseFloat(a.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),o=parseInt(o)):o=100,o}function acp_update_alpha_value_on_color_control(a,o,l,e){var t,r,i;t=o.data("a8cIris"),r=o.data("wpWpColorPicker"),t._color._alpha=a,i=t._color.toString(),o.val(i),r.toggler.css({"background-color":i}),e&&acp_update_alpha_value_on_alpha_slider(a,l),o.wpColorPicker("color",i)}function acp_update_alpha_value_on_alpha_slider(a,o){o.slider("value",a),o.find(".ui-slider-handle").text(a.toString())}Color.prototype.toString=function(a){if("no-alpha"==a)return this.toCSS("rgba","1").replace(/\s+/g,"");if(1>this._alpha)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var o=parseInt(this._color,10).toString(16);if(this.error)return"";if(o.length<6)for(var l=6-o.length-1;l>=0;l--)o="0"+o;return"#"+o},jQuery(document).ready(function(a){a(".alpha-color-control").each(function(){var o,l,e,t,r,i,c,n,p;o=a(this),l=o.val().replace(/\s+/g,""),e=o.attr("data-palette"),t=o.attr("data-show-opacity"),r=o.attr("data-default-color"),i={change:function(a,l){var e,t,i;e=o.attr("data-customize-setting-link"),t=o.wpColorPicker("color"),r==t&&(i=acp_get_alpha_value_from_color(t),n.find(".ui-slider-handle").text(i)),wp.customize(e,function(a){a.set(t)}),c.find(".transparency").css("background-color",l.color.toString("no-alpha"))},palettes:-1!==e.indexOf("|")?e.split("|"):"false"!=e},o.wpColorPicker(i),c=o.parents(".wp-picker-container:first"),a('<div class="alpha-color-picker-container"><div class="min-click-zone click-zone"></div><div class="max-click-zone click-zone"></div><div class="alpha-slider"></div><div class="transparency"></div></div>').appendTo(c.find(".wp-picker-holder")),n=c.find(".alpha-slider"),p={create:function(o,e){var t=a(this).slider("value");a(this).find(".ui-slider-handle").text(t),a(this).siblings(".transparency ").css("background-color",l)},value:acp_get_alpha_value_from_color(l),range:"max",step:1,min:0,max:100,animate:300},n.slider(p),"true"==t&&n.find(".ui-slider-handle").addClass("show-opacity"),c.find(".min-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(0,o,n,!0)}),c.find(".max-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(100,o,n,!0)}),c.find(".iris-palette").on("click",function(){var l,e;acp_update_alpha_value_on_alpha_slider(e=acp_get_alpha_value_from_color(l=a(this).css("background-color")),n),100!=e&&(l=l.replace(/[^,]+(?=\))/,(e/100).toFixed(2))),o.wpColorPicker("color",l)}),c.find(".button.wp-picker-clear").on("click",function(){var a=o.attr("data-customize-setting-link");o.wpColorPicker("color","#ffffff"),wp.customize(a,function(a){a.set("")}),acp_update_alpha_value_on_alpha_slider(100,n)}),c.find(".button.wp-picker-default").on("click",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(r),n)}),o.on("input",function(){acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(a(this).val()),n)}),n.slider().on("slide",function(l,e){acp_update_alpha_value_on_color_control(parseFloat(e.value)/100,o,n,!1),a(this).find(".ui-slider-handle").text(e.value)})})});
+1
View File
@@ -0,0 +1 @@
jQuery(function(t){t(window).load(function(){function o(){t(".portfolio-content").isotope({itemSelector:".portfolio-item",masonry:{itemSelector:".portfolio-item",columnWidth:".portfolio-item",gutter:20}})}o(),t(".filter a").click(function(){var o=t(this).attr("data-filter");return t(".portfolio-content").isotope({filter:o}),t(this).parent().find("a").removeClass("active"),t(this).addClass("active"),!1}),t.browser.msie&&8==+t.browser.version?document.body.onresize=function(){o()}:t(window).resize(function(){o()}),window.addEventListener("orientationchange",function(){o()})})});
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
!function(e,n,s){"use strict";function a(e){if(n(m(C)).find(".sub-menu").before(e.submenu),null!==y){var s=C.others.concat(y[0]);n(m(s)).before(e.menu)}else n(m(C.others)).before(e.menu)}function t(){n(m(C)).addClass(k)}function i(){var e=n('button[id^="genesis-mobile-"]').attr("id");void 0!==e&&(f(e),d(e),c(e),u(e))}function o(){var e=n(this),s=e.next("nav");e.attr("id","genesis-mobile-"+n(s).attr("class").match(/nav-\w*\b/))}function u(e){if(null!=y){var s=y[0],a=n(y).filter(function(e){if(e>0)return e});"none"!==p(e)?(n.each(a,function(e,a){n(a).find(".menu > li").addClass("moved-item-"+a.replace(".","")).appendTo(s+" ul.genesis-nav-menu")}),n(m(a)).hide()):(n(m(a)).show(),n.each(a,function(e,s){n(".moved-item-"+s.replace(".","")).appendTo(s+" ul.genesis-nav-menu").removeClass("moved-item-"+s.replace(".",""))}))}}function r(){var e=n(this);h(e,"aria-pressed"),h(e,"aria-expanded"),e.toggleClass("activated"),e.next("nav").fadeToggle("fast")}function l(){var e=n(this),s=e.closest(".menu-item").siblings();h(e,"aria-pressed"),h(e,"aria-expanded"),e.toggleClass("activated"),e.next(".sub-menu").slideToggle("fast"),s.find("."+M).removeClass("activated").attr("aria-pressed","false"),s.find(".sub-menu").slideUp("fast")}function d(e){var s=n("."+k+" .js-superfish"),a="destroy";"function"==typeof s.superfish&&("none"===p(e)&&(a={delay:0,animation:{opacity:"show"},dropShadows:!1,speed:0,disableHI:!0}),s.superfish(a))}function c(e){var s=g();!n(s).length>0||n.each(s,function(s,a){var t=a.replace(".",""),i="genesis-"+t,o="genesis-mobile-"+t;"none"==p(e)&&(i="genesis-mobile-"+t,o="genesis-"+t);var u=n('.genesis-skip-link a[href="#'+i+'"]');if(null!==y&&a!==y[0]&&u.toggleClass("skip-link-hidden"),u.length>0){var r=u.attr("href");r=r.replace(i,o),u.attr("href",r)}})}function f(e){if("none"!==p(e))return!0;n("."+w+", ."+k+" .sub-menu-toggle").removeClass("activated").attr("aria-expanded",!1).attr("aria-pressed",!1),n("."+k+", ."+k+" .sub-menu").attr("style","")}function p(n){var s=e.getElementById(n);return window.getComputedStyle(s).getPropertyValue("display")}function h(e,n){e.attr(n,function(e,n){return"false"===n})}function m(e){return n.map(e,function(e,n){return e}).join(",")}function g(){var e=[];return null!==y&&n.each(y,function(n,s){e.push(s.valueOf())}),n.each(C.others,function(n,s){e.push(s.valueOf())}),e.length>0?e:null}n("body").removeClass("no-js");var v="undefined"==typeof genesis_responsive_menu?"":genesis_responsive_menu,b=v.menuClasses,C={},y=[];n.each(b,function(e){C[e]=[],n.each(this,function(s,a){var t=a,i=n(a);i.length>1?n.each(i,function(s,a){var i=t+"-"+s;n(this).addClass(i.replace(".","")),C[e].push(i),"combine"===e&&y.push(i)}):1==i.length&&(C[e].push(t),"combine"===e&&y.push(t))})}),void 0===C.others&&(C.others=[]),1==y.length&&(C.others.push(y[0]),C.combine=null,y=null);var x={},w="menu-toggle",M="sub-menu-toggle",k="genesis-responsive-menu";x.init=function(){if(0!=n(g()).length){var e=void 0!==v.menuIconClass?v.menuIconClass:"dashicons-before dashicons-menu",s=void 0!==v.subMenuIconClass?v.subMenuIconClass:"dashicons-before dashicons-arrow-down-alt2",u={menu:n("<button />",{class:w,"aria-expanded":!1,"aria-pressed":!1,role:"button",text:"Menu"}).append(n("<span />")),submenu:n("<button />",{class:M,"aria-expanded":!1,"aria-pressed":!1,text:""}).append(n("<span />",{class:"screen-reader-text",text:v.subMenu}))};t(),a(u),n("."+w).addClass(e),n("."+M).addClass(s),n("."+w).on("click.genesisMenu-mainbutton",r).each(o),n("."+M).on("click.genesisMenu-subbutton",l),n(window).on("resize.genesisMenu",i).triggerHandler("resize.genesisMenu")}},n(e).ready(function(){null!==g()&&x.init()})}(document,jQuery);
+158
View File
@@ -0,0 +1,158 @@
/* ## Avatars
--------------------------------------------- */
.avatar {
border-radius: 50%;
margin-right: 2rem;
float: left;
.alignright & {
margin-left: 2rem;
}
}
/* ## Genesis
--------------------------------------------- */
.breadcrumb {
padding: 0;
font-size: 1.4rem;
width: 100%;
margin-bottom: 3rem;
a {
text-decoration: underline;
}
}
.after-entry,
.author-box {
margin-bottom: 5%;
@include breakpoint(sm) {
margin-bottom: 4rem;
}
}
.author-box {
margin-top: 5%;
@include breakpoint(sm) {
margin-top: 4rem;
}
p:last-of-type {
margin-bottom: 0;
}
}
/* ## Search Form
--------------------------------------------- */
.search-form {
display: block;
width: 100%;
position: relative;
@include clearfix;
&:after {
content: "\f2eb";
display: block;
position: absolute;
font-family: 'Fontawesome';
right: 1.2rem;
top: 1.2rem;
font-size: 2rem;
pointer-events: none;
}
input[type="search"] {
width: 100%;
}
input[type="submit"] {
display: none;
}
.entry-content & {
margin-bottom: 1em;
}
}
/* ## WordPress
--------------------------------------------- */
a {
&.aligncenter img {
display: block;
margin: 0 auto;
}
&.alignnone {
display: inline-block;
}
}
.alignleft {
float: left;
text-align: left;
}
.alignright {
float: right;
text-align: right;
}
a {
&.alignleft,
&.alignnone,
&.alignright {
max-width: 100%;
}
}
img.centered,
.aligncenter {
display: block;
margin: 0 auto 1em;
}
img.alignnone,
.alignnone {
margin-bottom: 1em;
}
a.alignleft,
img.alignleft,
.wp-caption.alignleft {
margin: 0 1em 1em 0;
}
a.alignright,
img.alignright,
.wp-caption.alignright {
margin: 0 0 1em 1em;
}
.wp-caption-text {
font-size: 1.4rem;
margin: 0;
text-align: center;
}
.entry-content {
p.wp-caption-text {
margin-bottom: 0;
}
.wp-audio-shortcode,
.wp-playlist,
.wp-video {
margin: 0 0 1em;
}
}
.sticky,
.bypostauthor {
background-color: transparent;
}
.post-edit-link {
display: block;
@include clearfix;
.page-template-page-builder & {
display: none;
}
}
+257
View File
@@ -0,0 +1,257 @@
/* ## Entries
--------------------------------------------- */
.entry {
background-color: $white;
.single & {
background-color: transparent;
}
}
.entry-title {
a {
text-decoration: none;
}
}
.entry-content {
@include clearfix;
p {
color: $gray;
.blog &,
.archive & {
display: flex;
flex-wrap: wrap;
}
}
ol,
ul {
margin-bottom: 1em;
margin-left: 4rem;
}
ol>li {
list-style-type: decimal;
}
ul>li {
list-style-type: disc;
}
ol ol,
ul ul {
margin-bottom: 0;
}
li li {
list-style-type: circle;
}
code {
background-color: $light;
display: block;
padding: 1rem 2rem;
border: $site-border;
margin-top: 1em;
border-radius: $site-radius;
}
>*:last-child {
margin-bottom: 0;
}
}
.entry-image-link {
display: block;
margin-bottom: 1em;
img {
display: block;
}
}
.featured-image {
display: block;
margin: 0 0 3rem;
.single & {
@include breakpoint(sm) {
margin: 0 0 4rem;
}
}
}
.entry-footer {
.single & {
padding: 3rem 0 0;
}
}
/* ## Entry Meta
--------------------------------------------- */
p.entry-meta {
font-size: 1.2rem;
font-family: $font-heading;
font-weight: $bolder;
text-transform: uppercase;
.entry-header & {
margin-bottom: 1em;
}
}
.entry-categories,
.entry-tags {
display: block;
}
/* ## Pagination
--------------------------------------------- */
.pagination {
margin: 5vw 0 10vw;
width: 100%;
display: flex;
justify-content: center;
@include clearfix;
@include breakpoint(md) {
margin: 4rem 0 0;
order: 3;
.content-sidebar &,
.sidebar-content & {
width: calc(75% - 4rem);
}
}
}
.adjacent-entry-pagination {
margin: 0;
padding: 4rem 0;
background-color: $light;
font-family: $font-heading;
font-size: 1.4rem;
text-transform: uppercase;
font-weight: $bolder;
@include breakpoint(md) {
margin: 0;
}
a {
color: $gray;
text-decoration: none;
}
}
.archive-pagination {
ul {
display: flex;
}
li {
margin: 0 0.25em 0 0;
}
a {
background-color: $white;
color: $dark;
font-size: 1.6rem;
padding: 0.75rem 1rem;
border-radius: $site-radius;
text-decoration: none;
display: block;
@include transition;
}
a:hover,
.active a {
background-color: $accent;
color: $white;
box-shadow: 0 1rem 1rem -0.5rem rgba($dark,0.15);
}
}
/* ## Comments
--------------------------------------------- */
.comment-respond,
.entry-comments,
.entry-pings {
background-color: #fff;
font-size: 1.6rem;
margin-top: 4rem;
}
.comment-respond {
.form-submit {
margin-bottom: 0;
}
}
.comment-list {
li {
padding: 4rem 0 0 5vw;
}
.depth-1 {
padding-left: 0;
}
.comment-respond {
padding: 0 0 0 1em;
}
>.comment-respond {
padding: 0;
}
}
.comment-header {
margin-bottom: 5vw;
@include breakpoint(sm) {
margin-bottom: 2em;
}
p {
margin-bottom: 0;
}
}
.comment-edit-link {
padding-left: calc(4.8rem + 1em);
.entry-pings & {
padding: 0;
clear: both;
display: block;
}
}
.comment-reply-link {
display: block;
margin-bottom: 1em;
}
.comment-meta {
padding-left: calc(4.8rem + 1em);
word-break: break-all;
.entry-pings & {
padding: 0 0 1em;
}
}
.comment-content {
clear: both;
ul>li {
list-style-type: disc;
}
p {
margin-bottom: 0.618em;
}
}
.comment-respond {
input[type="email"],
input[type="text"],
input[type="url"] {
@include breakpoint(xl) {
width: 50%;
}
label {
display: block;
margin-right: 1rem;
}
}
}
.entry-pings .reply {
display: none;
}
.pingback:last-of-type p {
margin-bottom: 0;
}
+354
View File
@@ -0,0 +1,354 @@
/* ## Typography
--------------------------------------------- */
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
::selection {
background-color: $dark;
color: $white;
}
html {
font-size: 62.5%; // 10px browser default.
max-width: 100vw;
overflow-x: hidden;
background-color: $dark;
}
body {
background-color: $light;
color: $dark;
font-family: $font-body;
font-size: 1.8rem;
font-weight: $normal;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
margin: 0;
max-width: 100vw;
overflow-x: hidden;
@include breakpoint(sm) {
font-size: 2rem;
}
}
body>div {
font-size: 1.8rem;
@include breakpoint(sm) {
font-size: 2rem;
}
}
p {
margin: 0 0 1.382em;
padding: 0;
}
a {
color: $dark;
word-wrap: break-word;
@include transition;
&:hover {
color: $gray;
}
}
ol,
ul {
margin: 0;
padding: 0;
}
li {
list-style-type: none;
}
hr {
border: 0;
border-collapse: collapse;
border-bottom: $site-border;
clear: both;
padding: 1em 0 0;
margin: 0 0 2em;
}
b,
strong {
font-weight: $bolder;
}
blockquote,
cite,
em,
i {
font-style: italic;
}
blockquote {
margin: 1em 0;
padding: 0 1em;
}
/* ## Headings
--------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: $font-heading;
font-weight: $bolder;
line-height: 1.2;
margin: 0 0 0.382em;
}
h1 {
font-size: 1.8em;
@include breakpoint(sm) {
font-size: 2.2em;
}
}
h2 {
font-size: 1.4em;
@include breakpoint(sm) {
font-size: 1.5em;
}
}
h3 {
font-size: 1.3em;
@include breakpoint(sm) {
font-size: 1.4em;
}
}
h4 {
font-size: 1.2em;
@include breakpoint(sm) {
font-size: 1.3em;
}
}
h5 {
font-size: 1.1em;
@include breakpoint(sm) {
font-size: 1.2em;
}
}
h6 {
font-size: 1.05em;
@include breakpoint(sm) {
font-size: 1.1em;
}
}
/* ## Forms
--------------------------------------------- */
input,
select,
textarea {
background-color: $white;
border: $site-border;
border-radius: $site-radius;
padding: 0.5em 1em;
width: 100%;
line-height: 2;
font-size: 1.8rem;
&:focus {
outline: none;
border-color: $gray;
}
}
:focus {
outline: $site-border;
}
input[type="checkbox"],
input[type="image"],
input[type="radio"] {
width: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
::-moz-placeholder {
color: $gray;
opacity: 1;
}
::-webkit-input-placeholder {
color: $gray;
}
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
background-color: $dark;
border: 0;
border-radius: $site-radius;
color: $white;
cursor: pointer;
font-family: $font-heading;
font-size: 1.6rem;
font-weight: $bold;
padding: 1em 2em;
text-decoration: none;
$white-space: nowrap;
display: inline-block;
width: auto;
height: auto;
line-height: 1;
box-shadow: inset 0 0 0 9rem rgba($white, 0), 0 0 0 -1rem rgba($dark, 0);
@include transition;
&:hover {
color: $white;
box-shadow: inset 0 0 0 9rem rgba($white, 0.1), 0 1.25rem 1rem -0.5rem rgba($dark, 0.25);
@include transition;
}
&.accent {
background-color: $accent;
}
&.small {
font-size: 1.2rem;
}
&:disabled,
&:disabled:hover {
background-color: $light;
border-width: 0;
color: darken($light, 50%);
cursor: not-allowed;
}
+button,
+.button {
margin-top: 1em;
clear: both;
@include breakpoint(xs) {
margin-top: 0;
clear: none;
}
}
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button {
display: none;
}
fieldset {
margin-bottom: 1em;
}
/* ## Objects
--------------------------------------------- */
embed,
iframe,
img,
object,
video,
.wp-caption,
.wp-video-shortcode {
max-width: 100%;
display: block;
}
img {
height: auto;
}
figure {
margin: 0;
}
video {
object-fit: cover;
}
.wp-video-shortcode {
width: auto !important;
}
/* ## Tables
--------------------------------------------- */
table {
background-color: $white;
border: $site-border;
border-collapse: collapse;
border-spacing: 0;
line-height: 1;
margin-bottom: 4rem;
width: 100%;
}
tbody {
border-bottom: $site-border;
}
td,
th {
text-align: left;
padding: 0.618em;
border-top: $site-border;
border-right: $site-border;
}
/* ## Accessibility
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut,
.wp-custom-logo .site-title,
.wp-custom-logo .site-description {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 0.1rem;
width: 0.1rem;
border: 0;
overflow: hidden;
}
.screen-reader-text:focus,
.screen-reader-shortcut:focus {
clip: auto !important;
height: auto;
width: auto;
display: block;
padding: 1rem 2rem;
z-index: 100000;
text-decoration: none;
box-shadow: 0 0 0.2rem 0.2rem rgba($dark, 0.1);
}
.more-link {
position: relative;
font-style: normal;
}
.genesis-skip-link {
margin: 0;
li {
height: 0;
width: 0;
list-style: none;
}
}
+271
View File
@@ -0,0 +1,271 @@
/* ## Site Footer
--------------------------------------------- */
.site-footer {
background-color: $dark;
color: $medium;
position: relative;
>.wrap {
padding: 0 5vw 5vw;
position: relative;
@include breakpoint(sm) {
padding: 0 0 6rem;
}
>p {
margin-bottom: 0;
font-size: 1.6rem;
max-width: calc(100% - 4rem);
}
}
a {
color: $medium;
text-decoration: none;
&:hover {
color: $border;
}
}
.back-to-top {
position: absolute;
right: 5vw;
bottom: 2rem;
background-color: rgba($white,0.1);
border-radius: $site-radius;
width: 3rem;
height: 3rem;
text-align: center;
@include breakpoint(sm) {
bottom: 5.8rem;
right: 0;
}
&:hover {
background-color: rgba($white,0.2);
}
&:before,
&:after {
content: '';
display: block;
height: 2px;
width: 8px;
background-color: $medium;
position: absolute;
top: 1.3rem;
left: 0.9rem;
transform: rotate(-45deg);
}
&:after {
transform: rotate(45deg);
left: 1.3rem;
}
}
}
/* ## Footer Widgets
--------------------------------------------- */
.footer-widgets {
padding: 6rem 0;
z-index: 0;
font-size: 1.7rem;
@include breakpoint(md) {
padding: 10rem 0;
}
.wrap {
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
}
}
.widget-area {
margin: 0 auto 4rem;
@include breakpoint(sm) {
flex: 1;
margin-left: 2.564102564102564%;
&:first-of-type {
margin-left: 0;
}
}
&:last-of-type {
margin-bottom: 0;
}
.widget {
width: 100%;
display: block;
margin: 0 auto 2em;
&:last-of-type {
margin-bottom: 0;
}
}
}
.widget-title {
text-transform: uppercase;
font-size: 1.6rem;
margin-bottom: 1.5em;
color: $border;
}
.menu-item {
width: 50%;
line-height: 1.618;
padding: 0;
margin: 0 0 1em;
font-family: $font-body;
font-weight: $normal;
text-transform: capitalize;
a {
font-size: 1.6rem;
float: left;
text-align: left;
padding: 0;
margin: 0;
}
}
.menu-item a:hover,
.menu-item.current-menu-item > a {
color: $border;
}
.sub-menu {
display: none !important;
}
.enews {
::-moz-placeholder {
color: rgba($white, 0.5);
opacity: 1;
}
::-webkit-input-placeholder {
color: rgba($white, 0.5);
}
form {
position: relative;
}
input {
background: transparent;
color: $white;
border-color: $gray;
padding: 0.4rem 1.4rem;
font-size: 1.6rem;
@include transition;
&:focus {
border-color: $medium;
}
}
input[type="submit"] {
background-color: transparent;
position: absolute;
right: 0;
bottom: 0;
padding: .5em 0;
width: 5rem;
line-height: 2;
font-size: 100%;
z-index: 1;
color: transparent;
box-shadow: none;
&:hover {
+ .fa-send-o {
color: $white;
}
}
}
.fa-send-o {
position: absolute;
right: 0;
bottom: 0;
padding: .5em 0.75em;
line-height: 1;
font-size: 2rem;
margin-bottom: 0.5em;
z-index: 0;
@include transition;
}
}
p {
@include breakpoint(sm) {
max-width: 90%;
}
}
}
/* ## Before Footer
--------------------------------------------- */
.before-footer {
padding: 6rem 0;
color: $white;
@include overlay;
@include breakpoint(sm) {
padding: 8rem 0;
}
&:before {
width: 100vw;
height: 101%;
left: -50%;
right: -50%;
top: 1%;
margin: auto;
}
.widget {
margin-bottom: 5vw;
position: relative;
z-index: 1;
@include breakpoint(sm) {
margin-bottom: 0;
}
}
.widget_media_image:first-of-type {
display: block;
position: absolute;
width: 100vw;
height: 100%;
top: 0;
bottom: 0;
left: -50%;
right: -50%;
margin: auto;
z-index: 0;
.widget-wrap {
position: absolute;
height: 100%;
width: 100%;
}
img {
width: 100% !important;
height: 100% !important;
object-fit: cover;
object-position: center;
}
}
.wrap {
z-index: 1;
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
@include flexfix;
}
}
.widget-title {
text-transform: uppercase;
font-size: 3rem;
}
p {
margin-bottom: 0;
color: $light;
}
button,
.button,
input[type="submit"] {
margin: 0;
color: $white;
&:hover {
color: $white;
}
&.alignright {
float: left;
@include breakpoint(sm) {
float: right;
}
}
}
}
+190
View File
@@ -0,0 +1,190 @@
/* ## Site Header
--------------------------------------------- */
.site-header {
background-color: $white;
/*position: absolute;*/
width: 100%;
z-index: 100;
@include transition;
&.fixed {
position: fixed;
&.shrink {
background-color: $dark;
}
}
.page-template-page-builder & {
position: relative;
/*background-color: $dark;*/
&.fixed {
position: fixed;
}
}
>.wrap {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
@include breakpoint(md) {
padding: 0;
flex-wrap: nowrap;
position: relative;
}
}
> .wrap {
padding: 0 20px;
display: flex!important;
flex-wrap: nowrap;
align-items: center;
max-width: 100%;
}
}
/* ## Title Area
--------------------------------------------- */
.title-area {
margin: 0 auto 0 0;
position: relative;
height: 100%;
display: block;
flex: 1;
padding: 2rem 0;
max-width: 15rem;
@include breakpoint(md) {
padding: 2.618rem 0;
}
.wp-custom-logo & {
padding: 1rem 0;
@include breakpoint(lg) {
padding: 0;
}
}
}
.site-title {
font-size: 1.7rem;
font-family: $font-heading;
font-weight: $bold;
line-height: 1;
margin-bottom: 0;
text-transform: uppercase;
white-space: nowrap;
a {
color: $white;
text-decoration: none;
}
}
.site-description {
font-size: 1.2rem;
margin-bottom: 0;
line-height: 1;
color: $white;
@include breakpoint(md) {
text-align: left;
line-height: 1.382;
}
}
.custom-logo {
height: 5rem;
}
/* ## Header Right Widget Area
--------------------------------------------- */
.header-widget-area {
margin-right: 10vw;
@include breakpoint(md) {
order: 3;
margin-left: 1em;
margin-right: 0;
}
.simple-social-icons ul li {
a,
a:hover,
a:focus {
background-color: transparent !important;
}
}
}
/* ## Custom Header
--------------------------------------------- */
.wp-custom-header {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
height: 100%;
width: 100%;
object-fit: cover;
object-position: center;
overflow: hidden;
.woocommerce & img,
img,
video,
iframe {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center center;
}
iframe {
top: -20%;
left: -20%;
right: -20%;
bottom: -20%;
margin: auto;
height: 140%;
width: 140%;
max-width: 140%;
max-height: none;
min-width: 100%;
min-height: 56.25vw; // 16:9 aspect ratio.
position: absolute;
}
}
.wp-custom-header-video-button {
display: none;
}
/* ## Page Header
--------------------------------------------- */
.page-header {
color: $white;
padding: 12rem 0 6rem;
text-align: center;
background-size: cover;
background-position: center;
position: relative;
@include overlay;
@include breakpoint(sm) {
padding: 25rem 0 12.5rem;
}
.wrap {
position: relative;
z-index: 1;
}
h1 {
max-width: map-get($breakpoints,sm);
margin: 0 auto 0.382em;
text-transform: uppercase;
}
p {
max-width: map-get($breakpoints,sm);
margin: 0 auto;
}
}
+469
View File
@@ -0,0 +1,469 @@
/* ## Front Page
--------------------------------------------- */
.home {
.site-inner {
padding: 0;
}
}
.front-page-1,
.front-page-2,
.front-page-3,
.front-page-4,
.front-page-5,
.front-page-6 {
background-color: $white;
padding: 8rem 0;
@include breakpoint(md) {
padding: 12rem 0;
}
.widget-title {
text-transform: uppercase;
}
}
/* ### Front Page 1 */
.front-page-1 {
background-color: transparent;
background-size: cover !important;
background-position: center !important;
padding: 18rem 0 12rem;
position: relative;
color: $white;
overflow: hidden;
text-align: center;
@include clearfix;
@include breakpoint(md) {
padding: 24rem 0 16rem;
}
@include breakpoint(xl) {
padding: 30rem 0 22rem;
}
.wrap {
position: relative;
z-index: 2;
}
.widget {
@include breakpoint(sm) {
max-width: map-get($breakpoints, sm);
margin: auto !important;
}
.widget-wrap {
p {
color: $border;
margin-bottom: 1.618em;
}
}
}
h1 {
@include breakpoint(xs) {
font-size: 2.2em;
}
@include breakpoint(sm) {
font-size: 2.7em;
}
@include breakpoint(xl) {
font-size: 3em;
}
}
}
/* ### Front Page 2 */
.front-page-2 {
text-align: center;
.fa-coffee {
margin-left: -1.5rem; // Lineawesome fix.
}
.widget-title {
font-size: 2rem;
margin: 1rem auto;
}
p {
color: $gray;
display: block;
@include breakpoint(sm) {
padding: 0 1em;
font-size: 1.8rem;
}
&:last-of-type {
@include breakpoint(sm) {
margin-bottom: 0;
}
}
}
}
/* ### Front Page 3 */
.front-page-3 {
background-color: $light;
.wrap {
flex-wrap: wrap;
}
.widget {
@include breakpoint(md) {
margin-left: 0;
margin-right: $margin-left;
&:last-of-type {
margin-right: 0;
}
}
}
.widget_custom_html:first-of-type {
text-align: center;
margin-left: auto;
margin-right: auto;
hr {
display: block;
margin: 0 auto 4rem;
padding: 0;
height: 0.3rem;
width: 10rem;
border: 0;
background-color: $accent;
}
p {
color: $gray;
}
}
p {
color: $gray;
}
.entry {
max-width: 40rem;
padding: 0;
margin-left: auto;
margin-right: auto;
transform: translateY(0rem);
box-shadow: 0 0 2rem -1rem rgba($dark, 0);
@include transition;
&:hover {
transform: translateY(-0.5rem);
box-shadow: 0 2rem 1rem -1rem rgba($dark, 0.1);
}
>a {
display: block;
margin: 0;
@include overlay;
&:before {
opacity: 0.1;
}
}
p {
display: flex;
flex-wrap: wrap;
}
}
.entry-title {
padding: 3rem 3rem 0;
text-transform: uppercase;
font-size: 1.8rem;
}
.entry-content {
padding: 0 3rem 3rem;
font-size: 1.8rem;
color: $gray;
}
img {
min-width: 100%;
}
.more-link {
clear: both;
display: inline-block;
padding: 0.5em 1.5em;
font-size: 1.4rem;
font-family: $font-heading;
font-weight: $bolder;
margin-top: 1em;
width: auto;
background-color: $dark;
border-radius: $site-radius;
color: $white;
text-decoration: none;
box-shadow: inset 0 0 0 9rem rgba($white, 0);
@include transition;
&:hover {
box-shadow: inset 0 0 0 9rem rgba($white, 0.1);
}
}
}
/* ### Front Page 4 */
.front-page-4 {
background-color: $dark;
position: relative;
overflow: hidden;
color: $white;
text-align: center;
padding: 10rem 0;
@include overlay;
@include breakpoint(md) {
padding: 20rem 0;
}
.wrap {
@include breakpoint(sm) {
display: block;
}
}
.widget {
max-width: 64rem;
margin: 0 auto;
@include breakpoint(md) {
margin: 0 auto;
}
}
.widget-wrap {
height: 100%;
width: 100%;
display: flex;
align-items: center;
position: relative;
z-index: 1;
} // Only apply to first image widget.
.widget_media_image:first-of-type {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 0;
margin: 0;
@include breakpoint(sm) {
max-width: 100%;
}
img {
object-fit: cover;
object-position: center;
width: 100% !important;
height: 100% !important;
}
}
.widget.widget_media_video {
@include center;
height: 100%;
position: fixed;
z-index: 998;
margin: auto;
max-width: 100%;
opacity: 0;
pointer-events: none;
visibility: hidden;
@include transition;
&.visible {
opacity: 1;
pointer-events: all;
visibility: visible;
}
}
.wp-video {
padding: 5%;
position: relative;
@include breakpoint(sm) {
padding: 10%;
}
}
iframe {
display: block;
height: 100% !important;
width: 100% !important;
box-shadow: 0 3rem 3rem -2rem rgba($dark, 0.5);
}
.show-video {
height: 3em;
width: 3em;
border-radius: 3em;
border: 3px solid $white;
margin: 0 auto 1em;
padding: 0;
color: $white;
background-color: transparent;
font-size: 2.4rem;
@include transition;
&:hover {
transform: scale(1.1);
}
}
.hide-video {
position: absolute;
z-index: 999;
top: -5%;
right: 0;
background: transparent;
padding: 1rem;
box-shadow: none;
font-size: 2em;
height: 1em;
width: 1em;
line-height: 0;
text-align: center;
border-radius: 9rem;
@include breakpoint(sm) {
top: 5%;
right: 5%;
}
}
.before {
position: fixed;
background-color: $overlay;
@include center;
}
}
/* ### Front Page 5 */
.front-page-5 {
.widget_custom_html:first-of-type {
text-align: center;
margin-left: auto;
margin-right: auto;
hr {
display: block;
margin: 0 auto 4rem;
padding: 0;
height: 0.3rem;
width: 10rem;
border: 0;
background-color: $accent;
}
p {
color: $gray;
}
}
.widget_custom_html:nth-of-type(2) {
margin-left: 0;
flex: auto;
}
.display-posts-listing {
display: flex;
flex-wrap: wrap;
margin-bottom: -$margin-left;
}
.listing-item {
position: relative;
padding: 0;
margin-bottom: $margin-left;
transform: translateY(0rem);
box-shadow: 0 0rem 2rem -1rem rgba($dark, 0);
@include transition;
@include overlay;
@media (max-width: map-get($breakpoints, sm)) {
margin: 0 0 $margin-left $margin-left;
width: $one-half;
&:nth-of-type(2n + 1) {
margin-left: 0;
}
}
@media (max-width: map-get($breakpoints, xs)) {
width: 100%;
margin: 0 0 5%;
}
&:before {
opacity: 0.1;
@include transition;
}
&:hover {
transform: translateY(-0.5rem);
box-shadow: 0 2rem 1.5rem -1rem rgba($dark, 0.3);
&:before,
.title {
opacity: 1;
}
}
&:last-of-type {
margin-bottom: $margin-left !important;
}
}
.image {
display: block;
height: 100%;
}
.title {
font-family: $font-heading;
font-weight: $bolder;
text-transform: uppercase;
position: absolute;
text-align: center;
display: block;
height: 1em;
line-height: 1em;
text-decoration: none;
z-index: 1;
color: $white;
opacity: 0;
@include transition;
@include center;
}
}
/* ### Front Page 6 */
.front-page-6 {
background-color: $light;
.wrap {
@include breakpoint(md) {
display: block;
}
}
img {
width: 5rem;
margin-bottom: 1rem;
}
.lslide,
.clone {
padding: 1.5rem;
.wrap {
background-color: $white;
padding: 3rem;
box-shadow: 0 0 0 -1rem rgba($dark, 0);
@include clearfix;
@include transition;
&:hover {
box-shadow: 0 2.25rem 1rem -1.5rem rgba($dark, 0.1);
}
}
}
blockquote {
border: 0;
margin: 0 0 1.5rem;
padding: 0;
}
.gts-rating+blockquote {
margin-top: 0.5rem;
}
blockquote+img {
margin-bottom: 0;
float: left;
}
h5 {
font-size: 1.4rem;
float: left;
margin: 0 0.5rem 0 0;
line-height: 1;
color: $dark;
}
img+h5 {
margin: 1.4rem 0.5rem 0 1rem;
+.gts-company {
margin-top: 1.4rem;
}
}
.gts-company {
float: left;
font-size: 1.4rem;
line-height: 1;
font-style: italic;
}
.lSSlideOuter {
margin: -1.5rem;
}
}
+278
View File
@@ -0,0 +1,278 @@
/* ## Inner Pages
--------------------------------------------- */
/* ### Portfolio */
.portfolio {
.filter {
font-family: $font-heading;
font-size: small;
font-weight: $bolder;
text-transform: uppercase;
text-align: center;
display: block;
margin-bottom: 4rem;
.wrap {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
a {
text-decoration: none;
margin: 0.5em;
padding: 0.5em;
display: block;
&.active {
color: $accent;
}
}
}
}
.portfolio-item {
width: 100%;
margin-bottom: 2rem;
transform: translateY(0rem);
box-shadow: 0 0rem 2rem -1rem rgba($dark,0);
@include overlay;
@include breakpoint(xs) {
width: calc(50% - 1rem);
}
@include breakpoint(md) {
width: calc(33.333333333% - 1.333333333rem);
}
&:before {
opacity: 0.1;
@include transition;
}
&:hover {
transform: translateY(-0.5rem);
box-shadow: 0 2rem 2rem -1rem rgba($dark,0.3);
transition: box-shadow $site-transition, transform $site-transition;
&:before,
.entry-title {
opacity: 1;
}
}
a {
display: block;
position: relative;
}
.entry-title {
text-align: center;
position: absolute;
font-family: $font-heading;
text-transform: uppercase;
font-weight: $bolder;
font-size: 1.6rem;
color: $white;
height: 1em;
line-height: 1;
z-index: 2;
opacity: 0;
@include transition;
@include center;
}
}
.portfolio-sizer {
width: $margin-left;
}
/* ### Masonry */
.masonry {
.site-inner {
background-color: $light;
}
&.content-sidebar,
&.sidebar-content {
.entry {
@include breakpoint(md) {
width: calc(50% - 1.5rem);
}
}
}
.entry {
width: 100%;
padding: 3rem;
margin-bottom: 3rem;
transform: translateY(0rem);
box-shadow: 0 0 2rem -1rem rgba($dark,0);
background-color: $white;
@include transition;
@include breakpoint(xs) {
width: calc(50% - 1.5rem);
}
@include breakpoint(md) {
width: calc(33.33333333% - 2rem);
}
&:hover {
transform: translateY(-0.5rem);
box-shadow: 0 2rem 1rem -1rem rgba($dark,0.1);
}
}
.entry-title {
font-size: 1.6rem;
text-transform: uppercase;
}
.entry-content {
font-size: 1.8rem;
color: $gray;
}
.entry-footer {
margin-top: 1rem;
p {
margin: 0;
}
}
.featured-image {
display: block;
margin: -3rem -3rem 3rem;
.single & {
@include breakpoint(sm) {
margin: -6rem -6rem 6rem;
}
}
}
}
/* ### Column Examples */
.columns {
div {
background-color: $light;
margin-bottom: $margin-left;
text-align: center;
text-transform: uppercase;
font-size: 1.4rem;
font-family: $font-heading;
font-weight: $bolder;
padding: 2em 0;
color: $gray;
box-shadow: 0 0 1rem -1rem rgba($dark,0);
transform: translateY(0);
@include transition;
&:hover {
transform: translateY(-0.5rem);
box-shadow: 0 2rem 1rem -1rem rgba($dark,0.1);
}
}
}
/* ### Icon Examples */
.icons {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
span {
display: flex;
align-items: center;
width: 100%;
font-size: 1.6rem;
margin-bottom: 2rem;
color: $gray;
@include breakpoint(xs) {
width: 50%;
}
@include breakpoint(md) {
width: 33.33333333333%;
}
@include breakpoint(xl) {
width: 25%;
}
}
i {
font-size: 3rem;
margin-right: 0.3em;
color: $dark;
}
br {
display: none;
}
}
/* ### Pricing Table */
.pricing {
.site-inner {
background-color: $light;
}
.entry {
background-color: transparent;
}
}
.pricing-table {
text-align: center;
justify-content: space-between;
align-items: center;
padding-bottom: 100px;
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
padding-bottom: 60px;
}
>div {
background-color: $white;
padding: 40px 20px 50px;
transition: all .3s ease;
box-shadow: 0 0 0 rgba($dark,0);
margin-bottom: 25px;
@include breakpoint(sm) {
margin: 0;
}
&:hover {
transform: translateY(-1rem);
z-index: 2;
box-shadow: 0 2rem 2rem -0.5rem rgba($dark,0.1);
}
}
.featured {
z-index: 1;
position: relative;
transform: scale(1.05);
&:hover {
transform: translateY(-1rem) scale(1.05);
}
button,
.button {
background-color: $accent;
}
}
strong {
font-weight: $bolder;
color: $gray;
font-size: 2rem;
}
span {
font-style: italic;
font-size: 1.3rem;
}
small {
position: absolute;
margin-top: 10px;
margin-left: -10px;
}
big {
font-size: 3rem;
color: $gray;
font-weight: $bolder;
}
p {
margin: 0;
}
ul {
margin: 10px 0 20px;
li {
margin: 0;
list-style-position: inside;
list-style-type: none;
}
}
}
+188
View File
@@ -0,0 +1,188 @@
/* ## Site Containers
--------------------------------------------- */
.site-inner {
background-color: $white;
}
.wrap {
margin: 0 auto;
padding-left: 5%;
padding-right: 5%;
@include breakpoint(sm) {
width: 90%;
max-width: map-get($breakpoints, xl);
padding: 0;
}
.wrap {
max-width: 100%;
width: auto;
padding: 0;
}
}
.content-sidebar-wrap {
max-width: map-get($breakpoints, xl);
margin: 0 auto;
clear: both;
padding: 10vw 5vw;
word-wrap: break-word;
display: flex;
flex-wrap: wrap;
flex-direction: column;
@include breakpoint(sm) {
width: 90%;
max-width: map-get($breakpoints, xl);
padding: 6rem 0;
}
@include breakpoint(md) {
padding: 8rem 0;
flex-direction: row;
justify-content: space-between;
@include flexfix;
.sidebar-content & {
flex-direction: row-reverse;
}
}
.page-builder & {
padding: 0;
border-top: $site-border;
border-bottom: $site-border;
}
}
/* ## Content Widths and Positions
--------------------------------------------- */
@include breakpoint(md) {
.content {
width: map-get($breakpoints,sm);
margin-left: auto;
margin-right: auto;
}
.sidebar-primary {
width: 25%;
}
.sidebar-content,
.content-sidebar {
.content {
width: calc(75% - 4rem);
margin-left: 0;
margin-right: 0;
}
}
.full-width-content {
.content {
width: 100%;
}
}
}
/* ## Column Classes (including fifths)
--------------------------------------------- */
@include breakpoint(sm) {
.one-half,
.one-third,
.one-fourth,
.one-fifth,
.one-sixth,
.two-thirds,
.two-fourths,
.two-fifths,
.two-sixths,
.three-fourths,
.three-fifths,
.three-sixths,
.four-fifths, // Commish'.
.four-sixths,
.five-sixths {
float: left;
margin-left: $margin-left;
}
.one-half,
.three-sixths,
.two-fourths {
width: $one-half;
}
.one-third,
.two-sixths,
.gallery-columns-3 .gallery-item {
width: $one-third;
}
.four-sixths,
.two-thirds {
width: $two-thirds;
}
.one-fourth,
.gallery-columns-4 .gallery-item {
width: $one-fourth;
}
.three-fourths {
width: $three-fourths;
}
.one-fifth,
.gallery-columns-5 .gallery-item {
width: $one-fifth;
}
.two-fifths {
width: $two-fifths;
}
.three-fifths {
width: $three-fifths;
}
.four-fifths {
width: $four-fifths;
}
.one-sixth,
.gallery-columns-6 .gallery-item {
width: $one-sixth;
}
.five-sixths {
width: $five-sixths;
}
.first {
clear: both;
margin-left: 0;
}
}
/* ## Gallery
--------------------------------------------- */
.gallery,
.gallery-row {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.gallery {
a {
display: block;
min-height: 100%;
}
img {
height: auto;
width: 100%;
display: block;
}
}
.gallery-caption {
display: block;
}
.gallery-item {
width: 100%;
margin: 0 0 5vw;
text-align: center;
display: block;
@include breakpoint(xs) {
width: $one-half;
margin-bottom: $margin-left;
}
}
+337
View File
@@ -0,0 +1,337 @@
/* ## Menus
--------------------------------------------- */
.menu {
width: 100%;
font-family: $font-heading;
font-weight: $bolder;
font-size: 1.8rem;
line-height: 1;
text-align: center;
text-transform: uppercase;
display: flex;
flex-wrap: wrap;
@include clearfix;
@include breakpoint(md) {
text-align: left;
font-size: 1.2rem;
}
}
.menu-item {
display: block;
padding: 0.5em 0;
width: 100%;
position: relative;
@include breakpoint(md) {
display: inline-block;
padding: 0;
width: auto;
}
&.right {
margin-left: auto;
}
&:hover,
&:focus,
&.sfHover {
outline: none;
>.sub-menu {
@include breakpoint(md) {
opacity: 1 !important;
margin-top: -1em;
pointer-events: all;
}
}
.sub-menu & {
.sub-menu {
margin-top: -1em;
}
}
}
a {
width: auto;
text-decoration: none;
display: inline-block;
padding: 0.5em 0;
color: $border;
@include breakpoint(md) {
padding: 1.6em 1em;
width: 100%;
}
@include breakpoint(lg) {
padding: 3em 1.25em;
}
&:focus {
outline: none;
}
span {
position: relative;
}
}
a:hover,
a:focus,
&.current-menu-item>a {
color: $white;
span {
&:after {
width: 100%;
}
}
.sub-menu & {
color: $gray;
}
}
}
/* ## Sub Menus
--------------------------------------------- */
.sub-menu {
display: none;
font-size: 1.4rem;
padding: 1em 0;
@include clearfix;
@include breakpoint(md) {
position: absolute;
width: 18rem;
z-index: 99;
border-radius: $site-radius;
background-color: $white;
padding: 0.618em 0.5em;
margin: 0;
font-size: 1.2rem;
display: block !important;
opacity: 0 !important;
transition: all .25s ease-in-out;
pointer-events: none;
box-shadow: 0 0.5rem 1.5rem rgba($dark,0.05);
&:before {
content: '';
display: block;
position: absolute;
top: -1rem;
left: 3rem;
border: 0.5rem solid transparent;
border-bottom-color: $white;
}
}
li {
width: 100%;
&:first-of-type {
margin-top: 0.5em; // Slide toggle fix.
@include breakpoint(md) {
margin-top: 0;
}
a {
padding-left: 1em;
}
}
}
a {
padding-left: 1em;
@include breakpoint(md) {
padding: 1em;
position: relative;
word-wrap: break-word;
color: $dark;
}
@include breakpoint(lg) {
padding: 1em;
}
}
.sub-menu {
padding-left: 1em;
@include breakpoint(md) {
margin: 0 0 0 18.2rem;
padding-left: 0.5em;
left: 0;
top: 0;
}
&:before {
@include breakpoint(md) {
position: absolute;
top: 2em;
left: -1rem;
border: 0.5rem solid transparent;
border-right-color: $white;
}
}
}
}
/* ## Specific Menus
--------------------------------------------- */
.nav-primary {
width: 100vw;
margin: auto;
padding: 5vw;
background-color: rgba($dark,0.98);
border-top: $site-border;
border-bottom: $site-border;
position: fixed;
overflow: auto;
overflow-x: visible;
-webkit-overflow-scrolling: touch;
left: 5vw;
top: -1rem;
left: -1rem;
right: -1rem;
bottom: -1rem;
display: none;
@include breakpoint(md) {
background-color: transparent;
border: none;
position: relative;
top: auto;
left: auto;
right: auto;
bottom: auto;
width: auto;
display: block;
margin: 0;
padding: 0;
overflow: initial;
-webkit-overflow-scrolling: initial;
}
&.visible {
display: block;
}
.no-js & {
width: 100%;
position: relative;
display: block;
@include breakpoint(md) {
display: block;
width: auto;
}
.wrap {
padding: 0 5%;
}
.menu-item {
display: inline-block;
width: auto;
margin: 0 0.5em;
}
}
.wrap {
height: 100%;
}
.menu {
min-height: 100%;
padding: 0 0 1em;
flex-direction: column;
justify-content: center;
@include breakpoint(md) {
padding: 0;
flex-direction: row;
justify-content: flex-end;
padding: 0;
}
}
}
/* ## Menu Toggles
--------------------------------------------- */
.menu-toggle {
padding: 2.7rem 0;
cursor: pointer;
background-color: transparent;
display: block;
position: absolute;
right: 5vw;
top: 0;
line-height: 1;
color: transparent;
letter-spacing: -0.5em;
z-index: 999;
@include breakpoint(md) {
display: none;
}
&:hover,
&:focus {
background: none;
outline: none;
box-shadow: none;
color: transparent;
}
&.activated {
position: fixed;
}
span {
display: block;
float: right;
position: relative;
height: 0.2rem;
background: $white;
transition: background 0s 0.2s;
width: 2.5rem;
margin-left: 0.236em;
margin-top: 0.7rem;
border-radius: $site-radius;
&::before,
&::after {
position: absolute;
display: block;
left: 0;
width: 100%;
height: 0.2rem;
background-color: $white;
border-radius: $site-radius;
content: " ";
}
&::before {
top: -0.7rem;
transition: top 0.2s 0.2s, transform 0.2s 0s;
}
&::after {
bottom: -0.7rem;
transition: bottom 0.2s 0.2s, transform 0.2s 0s;
}
}
&.activated span {
background: none;
&::before {
top: 0;
transform: rotate(45deg);
transition: top 0.2s 0s, transform 0.2s 0.2s;
}
&::after {
bottom: 0;
transform: rotate(-45deg);
transition: bottom 0.2s 0s, transform 0.2s 0.2s;
}
}
}
.sub-menu-toggle {
position: absolute;
background-color: transparent;
padding: 0.75em;
margin: 0 -1em 0 1em;
@include breakpoint(md) {
display: none;
}
&:hover,
&:focus {
background: none;
}
&:before {
content: "";
display: block;
margin: 0.2rem 0 -0.2rem;
border: 0.4rem solid transparent;
border-top-color: $light;
}
&.activated {
&:before {
transform: rotate(180deg);
margin: -0.2rem 0 0.2rem;
}
}
}
+158
View File
@@ -0,0 +1,158 @@
/* ## Simple Social Icons
--------------------------------------------- */
.simple-social-icons {
overflow: hidden;
svg {
&[class^="social-"],
&[class*=" social-"] {
display: inline-block;
width: 1em;
height: 1em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
}
ul {
margin: -0.5em -0.5em 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
li {
background: none;
border: none;
list-style-type: none;
margin: 0.5em 0.5em 0 0;
padding: 0;
a {
border: none;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
display: inline-block;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 1em;
line-height: 1em;
text-align: center;
text-decoration: none;
text-transform: none;
width: 1em;
}
}
&.aligncenter {
justify-content: center;
}
&.alignleft {
justify-content: flex-start;
}
&.alignright {
justify-content: flex-end;
}
}
}
/* ## Genesis Testimonial Slider
--------------------------------------------- */
div.lSSlideOuter {
.lSPager.lSpg>li {
margin: 1em 0 0;
line-height: 0.16rem;
a {
opacity: 0.382;
background-color: $dark;
overflow: visible;
}
&.active a,
&:hover a {
opacity: 0.618;
background-color: $dark;
transform: scale(1.2);
}
}
ul.testimonials-list {
color: $gray;
display: block;
font-size: 1.6rem;
li {
text-align: left;
}
}
}
/* ## Genesis eNews Extended
--------------------------------------------- */
.enews {
input {
margin-bottom: 0.5em;
}
}
/* ## Business Profile
--------------------------------------------- */
.bp-contact-card {
.hero-section & {
text-align: center;
display: flex;
flex-wrap: wrap;
justify-content: center;
>div {
margin: 2em 1em 0;
width: 100%;
text-align: center;
@include breakpoint(sm) {
width: auto;
}
}
a {
color: $border;
text-decoration: none;
}
}
.bp-directions,
.bp-phone,
.bp-contact,
.bp-booking,
.bp-opening-hours-brief,
.bp-opening-hours .bp-title {
text-align: left;
&:before {
font-family: 'Fontawesome';
width: 1em;
line-height: 0.9;
}
}
.bp-opening-hours .bp-title {
margin-bottom: 1rem;
}
.bp-directions {
&:before {
content: "\f27d";
}
}
.bp-phone {
&:before {
content: "\f2b3";
}
}
.bp-contact {
&:before {
content: "\f1c6";
}
}
.bp-opening-hours-brief,
.bp-opening-hours .bp-title {
&:before {
content: "\f18f";
}
}
}
+120
View File
@@ -0,0 +1,120 @@
/* # Print Styles
--------------------------------------------- */
@media print {
*,
*:before,
*:after {
background: transparent !important;
box-shadow: none !important;
color: $dark !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="javascript:"]:after,
a[href^="#"]:after,
.site-title>a:after {
content: "";
}
thead {
display: table-header-group;
}
img,
tr {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 2cm 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
blockquote,
pre {
border: $site-border;
page-break-inside: avoid;
}
.content,
.content-sidebar {
width: 100%;
}
button,
input,
select,
textarea,
.breadcrumb,
.comment-edit-link,
.comment-form,
.comment-list .reply a,
.comment-reply-title,
.edit-link,
.entry-comments-link,
.entry-footer,
.genesis-box,
.header-widget-area,
.hidden-print,
.home-top,
.nav-primary,
.nav-secondary,
.post-edit-link,
.sidebar {
display: none !important;
}
.title-area {
text-align: center;
width: 100%;
}
.site-title>a {
margin: 0;
text-decoration: none;
text-indent: 0;
}
.site-inner {
padding-top: 0;
position: relative;
top: -10rem;
}
.author-box {
margin-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
orphans: 3;
page-break-after: avoid;
page-break-inside: avoid;
widows: 3;
}
img {
page-break-after: avoid;
page-break-inside: avoid;
}
blockquote,
pre,
table {
page-break-inside: avoid;
}
dl,
ol,
ul {
page-break-before: avoid;
}
}
+578
View File
@@ -0,0 +1,578 @@
/* normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
line-height: 1.15;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 4rem;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box;
/* 1 */
height: 0;
/* 1 */
overflow: visible;
/* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent;
/* 1 */
-webkit-text-decoration-skip: objects;
/* 2 */
}
/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none;
/* 1 */
text-decoration: underline;
/* 2 */
text-decoration: underline dotted;
/* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace;
/* 1 */
font-size: 1em;
/* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: $font-body;
/* 1 */
font-size: 100%;
/* 1 */
line-height: 1.15;
/* 1 */
margin: 0;
/* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"],
/* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
/* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 0.1rem dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box;
/* 1 */
color: inherit;
/* 2 */
display: table;
/* 1 */
max-width: 100%;
/* 1 */
padding: 0;
/* 3 */
white-space: normal;
/* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -0.2rem;
/* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details,
/* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
/* ## Box Sizing
--------------------------------------------- */
html,
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
/* ## Float Clearing
--------------------------------------------- */
.author-box,
.clearfix,
.entry,
.entry-content,
.footer-widgets,
.nav-primary,
.nav-secondary,
.pagination,
.site-container,
.site-footer,
.site-header,
.site-inner,
.sidebar .widget,
.wrap {
@include clearfix;
}
+74
View File
@@ -0,0 +1,74 @@
/* ## Widgets
--------------------------------------------- */
.sidebar-primary {
order: 3;
@include breakpoint(md) {
order: 2;
}
}
.widget {
margin-bottom: 10vw;
word-wrap: break-word;
@include breakpoint(md) {
margin-bottom: 0;
}
&:last-of-type {
margin-bottom: 0;
}
.sidebar & {
margin-bottom: 5vw;
font-size: 1.6rem;
@include breakpoint(sm) {
margin-bottom: 4rem;
}
p {
&:last-of-type {
margin-bottom: 0;
}
}
}
ul>li:last-of-type:not(.gfield) {
margin-bottom: 0;
}
ul>li {
margin-bottom: 0.5em;
padding-bottom: 0.5em;
}
ul>li:last-of-type {
padding-bottom: 0;
}
ol>li {
list-style-position: inside;
list-style-type: decimal;
padding-left: 1em;
text-indent: -1em;
}
li li {
border: 0;
margin: 0 0 0 1em;
padding: 0;
}
}
.widgettitle,
.widget-title {
font-family: $font-heading;
font-size: 2.4rem;
.sidebar & {
font-size: 1.6rem;
margin-bottom: 1em;
text-transform: uppercase;
}
}
.widget_calendar {
table {
width: 100%;
}
td,
th {
text-align: center;
}
}
+143
View File
@@ -0,0 +1,143 @@
/* # Variables
-----------------------------------------------------------------------*/
/**
* ### Breakpoints
*
* Based on the most common 16:9 screen resolutions.
* @link https://pacoup.com/2011/06/12/list-of-true-169-resolutions/
*/
$breakpoints: (
xs: 512px,
sm: 768px,
md: 896px,
lg: 1152px,
xl: 1280px
);
/* ### Colors */
$accent: #fb2056;
$black: #000000;
$dark: #141e28;
$gray: #556677;
$medium: #a4a8ac;
$border: #f0f1f2;
$light: #f6f7f8;
$white: #ffffff;
$overlay: rgba(20,30,40,0.82);
/* ### Typography */
$font-heading: 'Montserrat', Helvetica, Arial, sans-serif;
$font-body: 'Hind', Helvetica, Arial, sans-serif;
$normal: 400;
$bolder: 600;
$bold: 700;
/* ### Other */
$site-radius: 0.4rem;
$site-border: 0.2rem solid $border;
$site-transition: 0.75s cubic-bezier(0, 1, 0.5, 1);
/* ### Column widths */
$margin-left: 2.564102564102564%;
$one-half : 48.717948717948715%;
$one-third: 31.623931623931625%;
$one-fourth: 23.076923076923077%;
$one-fifth: 17.9487179487179488%;
$one-sixth: 14.52991452991453%;
$two-thirds: 65.81196581196582%;
$two-fifths: 38.4615384615384616%;
$three-fourths: 74.35897435897436%;
$three-fifths: 58.9743589743589744%;
$four-fifths: 79.4871794871794872%;
$five-sixths: 82.90598290598291%;
/* # Mixins
-----------------------------------------------------------------------*/
/* ### Media Queries */
@mixin breakpoint( $breakpoint ) {
@if map-has-key( $breakpoints, $breakpoint ) {
@media ( min-width: #{ map-get( $breakpoints, $breakpoint ) } ) {
@content;
}
} @else if type_of( $breakpoint ) == number and unit( $breakpoint ) == px or unit( $breakpoint ) == em or unit( $breakpoint ) == rem {
@media (min-width: $breakpoint ) {
@content;
}
} @else {
@warn "No value could be retrieved from `#{$breakpoint}`. "
+ "Please make sure it is defined in `$breakpoints` map, or it is a valid number with supported unit of px, em or rem.";
}
}
/* ### Clearfix */
@mixin clearfix {
clear: both;
&:before,
&:after {
clear: both;
display: block;
content: '';
}
}
/* ### Flexfix */
@mixin flexfix {
&:before,
&:after {
position: absolute;
}
}
/* ### Transitions */
@mixin transition {
-webkit-transition: all $site-transition;
-moz-transition: all $site-transition;
-o-transition: all $site-transition;
transition: all $site-transition;
}
/* ### Overlay */
@mixin overlay {
position: relative;
&:before {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: $overlay;
z-index: 1;
pointer-events: none;
}
}
/* ### Overlay */
@mixin center {
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
+1
View File
@@ -0,0 +1 @@
.no-widget-areas-rendered-notice p:nth-of-type(1){display:none !important}.no-widget-areas-rendered-notice p:nth-of-type(2){margin-top:0 !important}.customize-control-alpha-color .wp-picker-container .iris-picker{border-bottom:none}.customize-control-alpha-color .wp-picker-container{max-width:257px}.customize-control-alpha-color .wp-picker-open+.wp-picker-input-wrap{width:100%}.customize-control-alpha-color .wp-picker-input-wrap input[type=text].wp-color-picker.alpha-color-control{float:left;width:195px}.customize-control-alpha-color .wp-picker-input-wrap .button{margin-left:0;float:right}.wp-picker-container .wp-picker-open~.wp-picker-holder .alpha-color-picker-container{display:block}.alpha-color-picker-container{border:1px solid #dfdfdf;border-top:none;display:none;background:#FFF;padding:0 11px 10px;position:relative}.alpha-color-picker-container .ui-widget-content,.alpha-color-picker-container .ui-widget-header,.alpha-color-picker-wrap .ui-state-focus{background:0 0;border:none}.alpha-color-picker-wrap a.iris-square-value:focus{-webkit-box-shadow:none;box-shadow:none}.alpha-color-picker-container .ui-slider{position:relative;z-index:1;height:24px;text-align:center;margin:0 auto;width:88%;width:calc(100% - 28px)}.alpha-color-picker-container .ui-slider-handle,.alpha-color-picker-container .ui-widget-content .ui-state-default{color:#777;background-color:#FFF;text-shadow:0 1px 0 #FFF;text-decoration:none;position:absolute;z-index:2;box-shadow:0 1px 2px rgba(0, 0, 0, .2);border:1px solid #aaa;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin-top:-2px;top:0;height:26px;width:26px;cursor:ew-resize;font-size:0;padding:0;line-height:27px;margin-left:-14px}.alpha-color-picker-container .ui-slider-handle.show-opacity{font-size:12px}.alpha-color-picker-container .click-zone{width:14px;height:24px;display:block;position:absolute;left:10px}.alpha-color-picker-container .max-click-zone{right:10px;left:auto}.alpha-color-picker-container .transparency{height:24px;width:100%;background-color:#FFF;background-image:url('../../images/transparency-grid.png');box-shadow:0 0 5px rgba(0, 0, 0, .4) inset;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:0;margin-top:-24px}@media only screen and (max-width:782px){.customize-control-alpha-color .wp-picker-input-wrap input[type=text].wp-color-picker.alpha-color-control{width:184px}}@media only screen and (max-width:640px){.customize-control-alpha-color .wp-picker-input-wrap input[type=text].wp-color-picker.alpha-color-control{width:172px;height:33px}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+90
View File
@@ -0,0 +1,90 @@
/*!
* Theme Name: Business Pro
* Theme URI: http://www.seothemes.com/themes/business-pro/
* Description: A clean and modern WordPress theme for businesses.
* Author: Seo Themes
* Author URI: http://www.seothemes.com/
* Version: 1.0.0
* Text Domain: business-pro
* Tags: one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-logo, custom-background, custom-colors, custom-header, custom-menu, featured-images, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready.
* Template: genesis
* Template Version: 2.5.2
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* GitHub Theme URI: https://github.com/seothemes/starter
*/
/* # Table of Contents
- Utilities
- Variables
- Mixins
- Functions
- Reset
- Baseline Normalize
- Box Sizing
- Float Clearing
- Defaults
- Typography
- Headings
- Forms
- Objects
- Tables
- Accessibility
- Layout
- Site Containers
- Content Width
- Column Classes
- Gallery
- Common
- Avatars
- Genesis
- Search Form
- Titles
- WordPress
- Header
- Before Header
- Site Header
- Title Area
- Widget Area
- Hero Section
- Menus
- Menus
- Sub Menus
- Specific Menus
- Menu Toggles
- Content
- Entries
- Entry Meta
- Pagination
- Comments
- Sidebars
- Widgets
- Sidebars
- Footer
- Site Footer
- Footer Widgets
- Plugins
- Simple Social Icons
- Gravity Forms
- Home
- Front Page
- Custom Header
- Print
- Print Styles
*/
@import 'utilities';
@import 'reset';
@import 'defaults';
@import 'layout';
@import 'common';
@import 'header';
@import 'menus';
@import 'content';
@import 'sidebars';
@import 'footer';
@import 'plugins';
@import 'home';
@import 'inner';
@import 'print';
+964
View File
@@ -0,0 +1,964 @@
@import 'utilities';
/* ### WooCommerce Globals */
.woocommerce {
.entry.product {
padding: 0;
}
abbr.required,
ins {
text-decoration: none;
}
.products .star-rating {
padding: 10px;
clear: both;
}
p.stars {
a,
a:hover {
outline: 0;
}
}
td,
th {
border: none;
}
span.onsale {
position: absolute;
background-color: $dark;
border-radius: $site-radius;
text-transform: uppercase;
font-weight: $normal;
font-size: 1.4rem;
letter-spacing: 0.05em;
height: 2em;
width: 4em;
min-height: 2em;
min-width: 4em;
line-height: 1.7;
left: -0.382em;
right: auto;
top: 2em;
&:after {
content: " ";
display: block;
position: absolute;
border: 0.382em solid transparent;
border-left-color: black(0.146);
transform: rotate(-45deg);
left: 0.1em;
top: calc(2em - 0.38em);
border-radius: $site-radius;
}
}
.woocommerce-LoopProduct-link {
display: block;
}
}
.site-header .fa-shopping-cart {
position: relative;
display: block;
float: right;
padding: 0 0 0 1rem;
color: $dark;
font-size: 2rem;
@include breakpoint(sm) {
margin-right: 2em;
}
&:hover {
opacity: 1;
.cart-count {
transform: scale(1.2);
}
}
}
.cart-count {
font-family: $font-body;
font-size: 1.2rem;
font-weight: $normal;
background-color: $accent;
color: $white;
height: 14px;
width: 14px;
display: block;
text-align: center;
position: absolute;
right: -0.6rem;
top: -0.6rem;
line-height: 14px;
border-radius: 99px;
border: 1px solid white(1);
transition: transform 0.316s ease;
}
.cart-total {
position: absolute;
text-indent: -9999px;
visibility: hidden;
}
/* ### WooCommerce Shop Page */
.woocommerce {
.content .entry {
border-bottom: 0;
}
.woocommerce-ordering {
width: auto;
float: left;
clear: both;
@include breakpoint(xs) {
float: right;
clear: none;
}
select {
height: auto;
}
}
.product {
.add_to_cart_button {
&:after {
display: inline-block;
margin-left: 1em;
}
&.loading {
&:after {
top: 0 !important;
right: 0;
position: relative;
}
}
}
}
a.added_to_cart {
font-weight: $bolder;
font-size: 1.4rem;
padding-top: 1rem;
padding-left: 1rem;
}
a.button.loading,
button.button.loading,
input.button.loading,
#respond input#submit.loading {
&::after {
top: 1em;
}
}
&.full-width-content,
&.columns-4 {
ul.products li.product {
@include breakpoint(sm) {
width: 23.076923076923077%;
}
}
}
ul.products {
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
}
&:before,
&:after {
@include breakpoint(sm) {
display: none;
}
}
li.product {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
box-shadow: none;
text-align: center;
background-color: $white;
@include breakpoint(sm) {
width: 31.623931623931625%;
margin-left: 2.564102564102564%;
margin-right: 0;
}
&:before,
&:after {
display: none;
}
&.first {
clear: both;
margin-left: 0;
}
a {
overflow: hidden;
}
img {
margin-bottom: 0 !important;
@include transition;
}
h2,
.price .from,
.woocommerce-loop-product__title {
background-color: $white;
font-size: 1.8rem;
position: relative;
margin-top: 1rem;
}
.price {
display: block;
clear: both;
float: none;
background-color: $white;
color: $dark;
margin-bottom: 0;
del,
ins {
display: inline;
margin-right: 0.5em;
}
}
span.onsale {
top: 2em;
&:after {
border-left-color: transparent;
border-right-color: black(0.146);
transform: rotate(45deg);
right: 0.15em;
left: auto;
}
}
.star-rating {
margin: 0 auto 0.5em;
position: absolute;
bottom: -2em;
left: 0;
right: 0;
display: none;
}
.woocommerce-LoopProduct-link {
display: block;
align-self: flex-start;
@include transition;
}
.button {
text-align: center;
align-self: flex-end;
padding: 0.8em 1.6em;
margin-top: 1rem;
}
}
}
.woocommerce-pagination {
.page-numbers {
border: none;
font-family: $font-heading;
font-size: 1.5rem;
li {
display: inline;
border: none;
}
a,
li span {
cursor: pointer;
display: inline-block;
padding: 0.7rem;
text-decoration: none;
border-radius: $site-radius;
margin: 0 0.1em;
width: 3rem;
height: 3rem;
}
li a {
margin-bottom: 4px;
@include breakpoint(sm) {
margin-bottom: 0;
}
}
a:hover,
.active a {
background-color: $accent;
color: $white;
}
}
}
}
/* ### WooCommerce Product */
.woocommerce {
div.product {
position: relative;
.star-rating {
float: left;
}
p.price,
span.price {
font-family: $font-heading;
font-size: 2rem;
color: $accent;
line-height: 1.5;
float: left;
}
form.cart {
clear: both;
padding: 1em 0 0;
.variations {
table-layout: fixed;
}
}
}
.woocommerce-variation-price {
margin-bottom: 20px;
}
.woocommerce-product-details__short-description {
@include clearfix;
}
}
/* ### WooCommerce Product Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
padding-left: 5px;
&::before {
border: 1px solid $border;
}
li {
border: $site-border;
}
li {
background-color: $light;
border-radius: $site-radius;
padding: 0;
&::after,
&::before {
display: none;
}
a {
color: $dark;
padding: 0.5em 1em;
font-weight: $normal;
font-size: 1.6rem;
letter-spacing: 0.05em;
&:hover {
color: $accent;
}
}
}
}
/* Two Sidebar Layouts */
.content-sidebar-sidebar,
.sidebar-content-sidebar,
.sidebar-sidebar-content {
&.woocommerce div.product .woocommerce-tabs ul.tabs {
padding: 0;
li {
display: block;
margin: 0;
background-color: $white;
border-bottom: 0;
&:last-child {
border-bottom: $site-border;
}
&.active {
border-bottom-color: $light;
a::after {
content: "\f147";
float: right;
font-family: "dashicons";
}
}
a {
display: block;
}
}
}
}
/* ### WooCommerce Checkout & Payment */
.woocommerce-cart,
.woocommerce-checkout,
#add_payment_method {
table.cart {
td.actions .coupon input[type="text"] {
width: auto;
height: auto;
line-height: 2;
max-width: 50%;
border-color: $border;
}
img {
vertical-align: middle;
}
input {
vertical-align: top;
}
}
form.checkout {
.col2-set {
@include breakpoint(md) {
width: 48.717948717948715%;
float: left;
}
.col-1,
.col-2 {
width: 100%;
}
}
#order_review_heading {
margin-top: 1em;
@include breakpoint(md) {
margin-top: 0;
margin-bottom: 1em;
}
}
#order_review_heading,
.woocommerce-checkout-review-order {
@include breakpoint(md) {
width: 48.717948717948715%;
float: right;
margin-left: 2.564102564102564%;
}
}
.woocommerce-additional-fields {
h3 {
display: none;
}
}
}
.terms {
display: flex;
padding: 0 !important;
label {
position: relative;
float: none;
min-width: 100%;
display: block !important;
}
span {
font-size: 1.6rem;
line-height: 1;
width: 100%;
}
.required {
position: absolute;
left: auto;
right: 0;
top: 1rem;
float: right;
width: auto;
}
}
#payment {
background-color: $white;
border-radius: $site-radius;
border: $site-border;
padding: 0;
div.form-row {
margin-bottom: 0;
&.place-order {
background-color: $light;
.button {
display: block;
width: 100%;
padding: 1em;
}
}
}
ul.payment_methods {
border-color: $border;
padding: 3rem;
li {
list-style-type: none;
}
}
div.payment_box {
background-color: $light;
border: $site-border;
border-radius: $site-radius;
&::before {
display: none;
}
}
}
}
/* ### WooCommerce Cart Page */
.woocommerce table.shop_table {
border: $site-border;
font-size: 1.8rem;
&,
td {
border-width: 2px;
border-color: $border;
border-radius: $site-radius;
line-height: 1.75;
word-break: normal;
}
td {
border-radius: 0;
}
.order-number {
min-width: 75px;
}
td.actions {
padding-top: 15px;
}
tfoot {
th,
td {
border-width: 2px;
border-color: $border;
}
}
}
.woocommerce-cart {
table.cart {
line-height: 1.75;
td {
font-size: 1.8rem;
padding: 10px 12px;
}
.product-thumbnail {
min-width: 56px;
}
th.product-name {
min-width: 140px;
}
th.product-price,
th.product-quantity,
th.product-subtotal {
min-width: 110px;
}
}
td.product-name dl.variation dd {
margin-left: 20px;
}
.cart-collaterals {
padding-top: 1em;
.cart_totals tr {
th,
td {
border-color: $border;
border-width: 2px;
}
}
}
}
.woocommerce-checkout-review-order-table th.product-total {
min-width: 110px;
}
/* ### WooCommerce Forms */
.woocommerce {
a.button,
button.button,
input.button,
input[type="submit"],
#respond input#submit {
background: $accent;
border: 0;
border-radius: $site-radius;
color: $white;
cursor: pointer;
font-weight: $bold;
font-size: 1.6rem;
padding: 1em 2em;
text-decoration: none;
white-space: nowrap;
display: inline-block;
width: auto;
height: auto;
line-height: 1;
box-shadow: inset 0 0 0 9rem rgba($white, 0), 0 0 0 -1rem rgba($dark, 0);
@include transition;
&:hover {
@include transition;
box-shadow: inset 0 0 0 9rem rgba($white, 0.1), 0 1.25rem 1rem -0.5rem rgba($dark, 0.146);
color: $white;
background-color: $accent;
}
&.disabled,
&:disabled,
&:disabled[disabled] {
background-color: $light;
padding: 1em 2em;
}
&.alt {
font-size: 1.6rem;
background-color: $accent;
&:hover {
background-color: $accent;
}
}
}
#reviews .comment {
.meta {
display: block;
clear: both;
text-transform: capitalize;
}
}
.quantity .qty {
line-height: 1.9;
margin-right: 5px;
padding: 0.6rem;
width: 70px;
}
.coupon {
line-height: 1;
.input-text {
height: 48px;
}
input.button {
padding: 1em 0;
@include breakpoint(xs) {
padding: 1em;
}
}
}
form {
.form-row input.input-text,
.form-row textarea {
line-height: 1.5;
padding: 10px;
}
&.checkout_coupon,
&.login,
&.register,
.form-row .select2-container,
.form-row.woocommerce-validated input.input-text,
.form-row.woocommerce-validated select,
.form-row.woocommerce-validated .select2-container {
border-color: $border;
border-radius: $site-radius;
&:focus {
border-color: $gray;
}
}
}
&.widget.widget_price_filter,
.widget.widget_price_filter {
.price_slider_amount .button {
font-size: 1.6rem;
}
}
.select2-selection {
height: 5rem;
border-width: 2px;
border-color: $border;
.select2-selection__arrow {
height: 4.5rem;
right: 0.5rem;
}
}
.select2-selection__rendered {
padding: 0.5em;
height: 2em;
}
}
.woocommerce form .form-row-first,
.woocommerce form .form-row-last,
.woocommerce-page form .form-row-first,
.woocommerce-page form .form-row-last {
width: 49%;
}
/* ### WooCommerce Account Page */
.woocommerce-account {
.woocommerce-Address-title h3 {
font-size: 2.6rem;
}
.woocommerce-Address {
margin-bottom: 20px;
}
table.order_details th.product-total {
min-width: 110px;
}
.woocommerce-MyAccount-navigation {
background-color: $white;
@include breakpoint(sm) {
float: left;
margin-right: 5%;
width: 20%;
}
}
.woocommerce-MyAccount-content {
@include breakpoint(sm) {
width: 75%;
float: right;
}
}
}
.woocommerce-MyAccount-navigation {
border: $site-border;
border-radius: $site-radius;
padding: 0;
margin-bottom: 40px;
ul {
margin-bottom: 0;
margin-left: 0;
li {
list-style-type: none;
font-weight: $bolder;
&:first-of-type {
a {
border-top: none !important;
}
}
&.is-active>a {
background-color: $light;
padding: 0.618em 1.382em;
}
a {
padding: 0.5em 1.382em;
display: block;
border-top: $site-border;
text-decoration: none;
font-size: 1.4rem;
font-family: $font-heading;
text-transform: uppercase;
}
}
}
}
.content-sidebar.woocommerce-account,
.sidebar-content.woocommerce-account {
.woocommerce-MyAccount-navigation {
text-align: center;
margin-right: 0;
width: 100%;
ul {
text-align: center;
}
li {
display: inline-block;
margin: 0 10px;
}
}
.woocommerce-MyAccount-content {
width: 100%;
}
}
/* ### WooCommerce Breadcrumb */
.woocommerce .woocommerce-breadcrumb {
font-size: 1.8rem;
margin-bottom: 40px;
color: $accent;
a {
color: $accent;
text-decoration: none;
&:hover {
color: $accent;
}
}
}
/* ### WooCommerce Reviews */
.woocommerce {
#reviews #comments ol.commentlist li {
background: transparent;
border: 0;
margin: 2rem 0 3rem;
padding: 0;
position: relative;
img.avatar {
background: transparent;
border: 0;
margin: 0 16px 24px 0;
padding: 0;
position: relative;
}
.comment-text {
border-color: transparent;
border-radius: $site-radius;
padding: 0;
}
}
.comment-reply-title {
font-family: $font-heading;
font-size: 2rem;
padding: 0 0 1em;
display: block;
@include clearfix;
}
.entry-content #reviews ol>li {
list-style-type: none;
}
}
/* ### WooCommerce Misc */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
font-size: 1.8rem;
background-color: $light;
border-top-color: seagreen;
&::before {
color: seagreen;
}
.woocommerce-MyAccount-content & {
padding: 1em 1em 1em 3em;
overflow: auto;
.button {
float: right;
display: block;
}
}
a {
font-weight: $bolder;
}
}
.woocommerce {
.woocommerce-error {
border-top-color: tomato;
margin-left: 0;
&::before {
color: tomato;
}
}
.woocommerce-info {
border-top-color: dodgerblue;
&::before {
color: dodgerblue;
}
}
}
div.woocommerce-info.wc-memberships-restriction-message.wc-memberships-restricted-content-message {
width: 48%;
}
/* ### Woo Search */
.woocommerce-product-search {
overflow: hidden;
width: 100%;
input[type="submit"] {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
padding: 0;
position: absolute;
width: 1px;
}
}
/* ### Woo Shopping Cart */
.woocommerce .widget_shopping_cart,
.woocommerce.widget_shopping_cart {
ul.cart_list li {
padding-top: 15px;
}
.cart_list li a.remove {
top: 15px;
color: tomato !important;
&:hover {
color: $white !important;
background-color: tomato;
}
}
.total {
border-top: $site-border;
}
.buttons a {
margin-bottom: 5px;
}
.cart_list li.empty {
padding-left: 0;
}
}
/* ### Woo Product Lists */
.woocommerce ul.cart_list li img,
.woocommerce ul.product_list_widget li img {
width: 60px;
}
.sidebar ul.product_list_widget li {
line-height: 1.4;
margin-bottom: 15px;
padding: 15px 0 0;
&:last-child {
margin-bottom: 0;
padding-bottom: 15px;
}
}
/* ### Woo Filter */
.woocommerce {
&.widget_price_filter .price_slider_wrapper .ui-widget-content {
background-color: $light;
}
&.widget_price_filter .ui-slider {
.ui-slider-range {
background-color: black(0.1);
}
.ui-slider-handle {
background-color: $accent;
}
}
.widget_layered_nav ul li.chosen a,
.widget_layered_nav_filters ul li a,
.widget_rating_filter ul li.chosen a {
&::before {
color: $accent;
}
}
.widget_price_filter .ui-slider .ui-slider-handle,
&.widget_price_filter .ui-slider .ui-slider-handle {
top: -.28em;
}
.widget_price_filter .price_slider_amount .button,
&.widget_price_filter .price_slider_amount .button {
font-size: 1.6rem;
}
}
/* ### Woo Active Filters */
.woocommerce.widget_layered_nav_filters ul li {
margin: 0 20px 20px 0;
}
/* ### Woo Recent Reviews */
.woocommerce.widget_recent_reviews .reviewer {
font-size: 1.2rem;
letter-spacing: 1px;
}
+116
View File
@@ -0,0 +1,116 @@
<?php
/**
* Business Pro.
*
* This file adds the front page to the Business Pro Theme.
*
* @package Business Pro
* @author SeoThemes
* @license GPL-2.0+
* @link https://seothemes.com/themes/business-pro/
*/
// Force full-width-content layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Remove default page header.
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
remove_action( 'genesis_after_header', 'business_page_header_close', 28 );
//add_action( 'genesis_before_content_sidebar_wrap', 'business_front_page' );
/**
* Front page widgets.
*
* @return void
*/
function business_front_page() {
// If any widget areas are active, do custom front page.
if ( is_active_sidebar( 'front-page-1' ) || is_active_sidebar( 'front-page-2' ) || is_active_sidebar( 'front-page-3' ) || is_active_sidebar( 'front-page-4' ) || is_active_sidebar( 'front-page-5' ) || is_active_sidebar( 'front-page-6' ) ) {
// Remove site-inner wrap.
add_filter( 'genesis_structural_wrap-site-inner', '__return_empty_string' );
// Get custom header markup.
ob_start();
the_custom_header_markup();
$custom_header = ob_get_clean();
// Display Front Page 1 widget area.
genesis_widget_area( 'front-page-1', array(
'before' => '<div class="front-page-1 page-header" role="banner">' . $custom_header . '<div class="wrap">',
'after' => '</div></div>',
) );
// Display Front Page 2 widget area.
genesis_widget_area( 'front-page-2', array(
'before' => '<div class="front-page-2 widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
// Display Front Page 3 widget area.
genesis_widget_area( 'front-page-3', array(
'before' => '<div class="front-page-3 widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
// Display Front Page 4 widget area.
genesis_widget_area( 'front-page-4', array(
'before' => '<div class="front-page-4 widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
// Display Front Page 5 widget area.
genesis_widget_area( 'front-page-5', array(
'before' => '<div class="front-page-5 widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
// Display Front Page 6 widget area.
genesis_widget_area( 'front-page-6', array(
'before' => '<div class="front-page-6 widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
// Remove main section if page has no content.
if ( is_empty_content( get_post()->post_content ) ) {
add_filter( 'genesis_markup_content-sidebar-wrap', '__return_null' );
add_filter( 'genesis_markup_content', '__return_null' );
remove_action( 'genesis_loop', 'genesis_do_loop' );
}
}
}
add_filter( 'genesis_attr_site-inner', 'sk_attributes_site_inner' );
/**
* Add attributes for site-inner element.
*
* @since 2.0.0
*
* @param array $attributes Existing attributes.
*
* @return array Amended attributes.
*/
function sk_attributes_site_inner( $attributes ) {
$attributes['role'] = 'main';
$attributes['itemprop'] = 'mainContentOfPage';
return $attributes;
}
// Remove div.site-inner's div.wrap
add_filter( 'genesis_structural_wrap-site-inner', '__return_empty_string' );
// Display header
get_header();
// Display Content
the_post(); // sets the 'in the loop' property to true.
the_content();
// Display Footer
get_footer();
// Run Genesis.
//genesis();
+335
View File
@@ -0,0 +1,335 @@
<?php
/**
* Business Pro Theme.
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// Child theme (do not remove).
include_once( get_template_directory() . '/lib/init.php' );
// Define theme constants.
define( 'CHILD_THEME_NAME', 'Business Pro' );
define( 'CHILD_THEME_URL', 'https://seothemes.com/themes/business-pro' );
define( 'CHILD_THEME_VERSION', '1.0.0' );
// Set Localization (do not remove).
load_child_theme_textdomain( 'business-pro', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'business-pro' ) );
// Remove unused sidebars and layouts.
unregister_sidebar( 'sidebar-alt' );
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
// Reposition the primary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_nav' );
//add_action( 'genesis_header', 'genesis_do_nav' );
// Reposition footer widgets.
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
add_action( 'genesis_footer', 'genesis_footer_widget_areas', 6 );
// Genesis style trump.
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', 99 );
// Remove default page header.
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' );
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' );
remove_action( 'genesis_before_loop', 'genesis_do_blog_template_heading' );
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
remove_action( 'genesis_before_loop', 'genesis_do_author_title_description', 15 );
remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' );
remove_action( 'genesis_before_loop', 'genesis_do_search_title' );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
// Add custom page header.
add_action( 'genesis_after_header', 'genesis_do_posts_page_heading', 24 );
add_action( 'genesis_after_header', 'genesis_do_date_archive_title', 24 );
add_action( 'genesis_after_header', 'genesis_do_blog_template_heading', 24 );
add_action( 'genesis_after_header', 'genesis_do_taxonomy_title_description', 24 );
add_action( 'genesis_after_header', 'genesis_do_author_title_description', 24 );
add_action( 'genesis_after_header', 'genesis_do_cpt_archive_title_description', 24 );
// Remove search results and shop page titles.
add_filter( 'woocommerce_show_page_title', '__return_null' );
add_filter( 'genesis_search_title_output', '__return_false' );
// Enable shortcodes in HTML widgets.
add_filter( 'widget_text', 'do_shortcode' );
// Set portfolio image size to override plugin.
add_image_size( 'portfolio', 620, 380, true );
// Enable support for page excerpts.
add_post_type_support( 'page', 'excerpt' );
// Add support for structural wraps.
add_theme_support( 'genesis-structural-wraps', array(
'header',
'menu-primary',
'menu-secondary',
'footer-widgets',
'footer',
) );
// Enable Accessibility support.
add_theme_support( 'genesis-accessibility', array(
'404-page',
'drop-down-menu',
'headings',
'rems',
'search-form',
'skip-links',
) );
// Enable custom navigation menus.
add_theme_support( 'genesis-menus' , array(
'primary' => __( 'Header Menu', 'business-pro' ),
) );
// Enable support for footer widgets.
add_theme_support( 'genesis-footer-widgets', 4 );
// Enable viewport meta tag for mobile browsers.
add_theme_support( 'genesis-responsive-viewport' );
// Enable HTML5 markup structure.
add_theme_support( 'html5', array(
'caption',
'comment-form',
'comment-list',
'gallery',
'search-form',
) );
// Enable support for post formats.
add_theme_support( 'post-formats', array(
'aside',
'audio',
'chat',
'gallery',
'image',
'link',
'quote',
'status',
'video',
) );
// Enable support for post thumbnails.
add_theme_support( 'post-thumbnails' );
// Enable automatic output of WordPress title tags.
add_theme_support( 'title-tag' );
// Enable support for WooCommerce.
add_theme_support( 'woocommerce' );
// Enable selective refresh and Customizer edit icons.
add_theme_support( 'customize-selective-refresh-widgets' );
// Enable theme support for custom background image.
add_theme_support( 'custom-background', array(
'default-color' => 'f4f5f6',
) );
// Enable logo option in Customizer > Site Identity.
add_theme_support( 'custom-logo', array(
'height' => 100,
'width' => 300,
'flex-height' => true,
'flex-width' => true,
'header-text' => array( '.site-title', '.site-description' ),
) );
// Display custom logo.
add_action( 'genesis_site_title', 'the_custom_logo', 1 );
// Enable support for custom header image or video.
add_theme_support( 'custom-header', array(
'header-selector' => 'false',
'default_image' => get_stylesheet_directory_uri() . '/assets/images/hero.jpg',
'header-text' => true,
'default-text-color' => 'ffffff',
'width' => 1920,
'height' => 1080,
'flex-height' => true,
'flex-width' => true,
'uploads' => true,
'video' => true,
) );
// Register default header (just in case).
register_default_headers( array(
'child' => array(
'url' => '%2$s/assets/images/hero.jpg',
'thumbnail_url' => '%2$s/assets/images/hero.jpg',
'description' => __( 'Hero Image', 'business-pro' ),
),
) );
// Register custom layout.
genesis_register_layout( 'centered-content', array(
'label' => __( 'Centered Content', 'business-pro' ),
'img' => get_stylesheet_directory_uri() . '/assets/images/layout.gif',
) );
// Register front page widget areas.
genesis_register_sidebar( array(
'id' => 'front-page-1',
'name' => __( 'Front Page 1', 'business-pro' ),
'description' => __( 'This is the Front Page 1 widget area.', 'business-pro' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-2',
'name' => __( 'Front Page 2', 'business-pro' ),
'description' => __( 'This is the Front Page 2 widget area.', 'business-pro' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-3',
'name' => __( 'Front Page 3', 'business-pro' ),
'description' => __( 'This is the Front Page 3 widget area.', 'business-pro' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-4',
'name' => __( 'Front Page 4', 'business-pro' ),
'description' => __( 'This is the Front Page 4 widget area.', 'business-pro' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-5',
'name' => __( 'Front Page 5', 'business-pro' ),
'description' => __( 'This is the Front Page 5 widget area.', 'business-pro' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-6',
'name' => __( 'Front Page 6', 'business-pro' ),
'description' => __( 'This is the Front Page 6 widget area.', 'business-pro' ),
) );
// Register before footer widget area.
genesis_register_sidebar( array(
'id' => 'before-footer',
'name' => __( 'Before Footer', 'business-pro' ),
'description' => __( 'This is the before footer widget area.', 'business-pro' ),
) );
add_action( 'genesis_footer', 'business_before_footer_widget_area', 5 );
/**
* Display before-footer widget area.
*
* @since 1.0.0
*
* @return void
*/
function business_before_footer_widget_area() {
genesis_widget_area( 'before-footer', array(
'before' => '<div class="before-footer"><div class="wrap">',
'after' => '</div></div>',
) );
}
add_action( 'wp_enqueue_scripts', 'business_scripts_styles', 99 );
/**
* Enqueue theme scripts and styles.
*
* @since 1.0.0
*
* @return void
*/
function business_scripts_styles() {
// Remove Simple Social Icons CSS (included with theme).
wp_dequeue_style( 'simple-social-icons-font' );
// Enqueue Google fonts.
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Montserrat:600|Hind:400', array(), CHILD_THEME_VERSION );
// Enqueue Line Awesome icon font.
wp_enqueue_style( 'line-awesome', '//maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome-font-awesome.min.css', array(), CHILD_THEME_VERSION );
// Enqueue WooCommerce styles conditionally.
if ( class_exists( 'WooCommerce' ) && ( is_woocommerce() || is_front_page() || is_shop() || is_product_category() || is_product_tag() || is_product() || is_cart() || is_checkout() || is_account_page() ) ) {
wp_enqueue_style( 'business-woocommerce', get_stylesheet_directory_uri() . '/assets/styles/min/woocommerce.min.css', array(), CHILD_THEME_VERSION );
}
// Enqueue theme scripts.
wp_enqueue_script( 'business-pro', get_stylesheet_directory_uri() . '/assets/scripts/min/business-pro.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
// Enqueue responsive menu script.
wp_enqueue_script( 'business-menu', get_stylesheet_directory_uri() . '/assets/scripts/min/menus.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
// Localize responsive menus script.
wp_localize_script( 'business-menu', 'genesis_responsive_menu', array(
'mainMenu' => __( 'Menu', 'business-pro' ),
'subMenu' => __( 'Menu', 'business-pro' ),
'menuIconClass' => null,
'subMenuIconClass' => null,
'menuClasses' => array(
'combine' => array(
'.nav-primary',
),
),
) );
}
// Load theme helper functions.
include_once( get_stylesheet_directory() . '/includes/helpers.php' );
// Load Customizer settings and output.
include_once( get_stylesheet_directory() . '/includes/customize.php' );
// Load default settings for the theme.
include_once( get_stylesheet_directory() . '/includes/defaults.php' );
// Load theme's recommended plugins.
include_once( get_stylesheet_directory() . '/includes/plugins.php' );
//* Remove the default header
remove_action( 'genesis_header', 'genesis_do_header' );
//* Add Site Title in custom header
add_action( 'genesis_header', 'ycb_do_header' );
function ycb_do_header() {
if( function_exists( 'ubermenu' ) ) {
ubermenu( 'main' , array( 'menu' => 16 ) );
}
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div id="title-area">',
'context' => 'title-area',
) );
do_action( 'genesis_site_title' );
do_action( 'genesis_site_description' );
echo '</div>';
genesis_markup( array(
'html5' => '<aside %s>',
'xhtml' => '<div class="widget-area header-widget-area">',
'context' => 'header-widget-area',
) );
do_action( 'genesis_header_right' );
add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
dynamic_sidebar( 'header-right' );
remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' );
remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' );
genesis_markup( array(
'html5' => '</aside>',
'xhtml' => '</div>',
) );
}
+382
View File
@@ -0,0 +1,382 @@
//process.env.DISABLE_NOTIFIER = true; // Disable all notifications.
/**
* Business Pro.
*
* This file adds gulp tasks to the Business Pro theme.
*
* @author Seo themes
*/
// Require our dependencies.
var autoprefixer = require( 'autoprefixer' ),
browsersync = require( 'browser-sync' ),
mqpacker = require( 'css-mqpacker' ),
fs = require( 'fs' ),
gulp = require( 'gulp' ),
beautify = require( 'gulp-cssbeautify' ),
cache = require( 'gulp-cached' ),
cleancss = require( 'gulp-clean-css' ),
cssnano = require( 'gulp-cssnano' ),
filter = require( 'gulp-filter' ),
imagemin = require( 'gulp-imagemin' ),
notify = require( 'gulp-notify' ),
pixrem = require( 'gulp-pixrem' ),
plumber = require( 'gulp-plumber' ),
postcss = require( 'gulp-postcss' ),
rename = require( 'gulp-rename' ),
replace = require( 'gulp-replace' ),
s3 = require( 'gulp-s3-publish' ),
sass = require( 'gulp-sass' ),
sort = require( 'gulp-sort' ),
sourcemaps = require( 'gulp-sourcemaps' ),
uglify = require( 'gulp-uglify' ),
wpPot = require( 'gulp-wp-pot' ),
zip = require( 'gulp-zip' );
// Set assets paths.
var paths = {
concat: [ 'assets/scripts/menus.js', 'assets/scripts/superfish.js' ],
images: [ 'assets/images/*', '!assets/images/*.svg' ],
php: [ './*.php', './**/*.php', './**/**/*.php' ],
scripts: [ 'assets/scripts/*.js', '!assets/scripts/min/' ],
styles: [ 'assets/styles/*.scss', '!assets/styles/min/' ]
};
// CSS formatting.
var format = {
breaks: {
afterAtRule: true,
afterBlockBegins: true,
afterBlockEnds: true,
afterComment: true,
afterProperty: true,
afterRuleBegins: true,
afterRuleEnds: true,
beforeBlockEnds: true,
betweenSelectors: true
},
indentBy: 1,
indentWith: 'tab',
spaces: {
aroundSelectorRelation: true,
beforeBlockBegins: true,
beforeValue: true
},
wrapAt: false
}
/**
* Autoprefixed browser support.
*
* https://github.com/ai/browserslist
*/
const AUTOPREFIXER_BROWSERS = [
'last 2 versions',
'> 0.25%',
'ie >= 8',
'ie_mob >= 9',
'ff >= 28',
'chrome >= 40',
'safari >= 6',
'opera >= 22',
'ios >= 6',
'android >= 4',
'bb >= 9'
];
/**
* Compile Sass.
*
* https://www.npmjs.com/package/gulp-sass
*/
gulp.task( 'styles', function () {
/**
* Process WooCommerce styles.
*/
gulp.src( 'assets/styles/woocommerce.scss' )
// Notify on error
.pipe( plumber( { errorHandler: notify.onError( "Error: <%= error.message %>" ) } ) )
// Process sass
.pipe( sass( {
outputStyle: 'expanded'
} ) )
// Pixel fallbacks for rem units.
.pipe( pixrem() )
// Parse with PostCSS plugins.
.pipe( postcss( [
autoprefixer( {
browsers: AUTOPREFIXER_BROWSERS
} ),
mqpacker( {
sort: true
} ),
] ) )
// Combine similar rules.
.pipe ( cleancss( {
level: {
2: {
all: true
}
}
} ) )
// Minify and optimize style.css again.
.pipe( cssnano( {
safe: false,
discardComments: {
removeAll: true,
},
} ) )
// Add .min suffix.
.pipe( rename( { suffix: '.min' } ) )
// Output non minified css to theme directory.
.pipe( gulp.dest( 'assets/styles/min/' ) )
/**
* Process main stylesheet.
*/
gulp.src( 'assets/styles/style.scss' )
// Notify on error
.pipe( plumber( { errorHandler: notify.onError( "Error: <%= error.message %>" ) } ) )
// Source maps init
.pipe( sourcemaps.init() )
// Process sass
.pipe( sass( {
outputStyle: 'expanded'
} ) )
// Pixel fallbacks for rem units.
.pipe( pixrem() )
// Parse with PostCSS plugins.
.pipe( postcss( [
autoprefixer( {
browsers: AUTOPREFIXER_BROWSERS
} ),
mqpacker( {
sort: true
} ),
] ) )
// Format non-minified stylesheet.
.pipe ( cleancss( {
format: format
} ) )
// Output non minified css to theme directory.
.pipe( gulp.dest( './' ) )
// Inject changes via browsersync.
.pipe( browsersync.reload( { stream: true } ) )
// Process sass again.
.pipe( sass( {
outputStyle: 'compressed'
} ) )
// Combine similar rules.
.pipe ( cleancss( {
level: {
2: {
all: true
}
}
} ) )
// Minify and optimize style.css again.
.pipe( cssnano( {
safe: false,
discardComments: {
removeAll: true,
},
} ) )
// Add .min suffix.
.pipe( rename( { suffix: '.min' } ) )
// Write source map.
.pipe( sourcemaps.write( './' ) )
// Output the compiled sass to this directory.
.pipe( gulp.dest( 'assets/styles/min' ) )
// Filtering stream to only css files.
.pipe( filter( '**/*.css' ) )
// Notify on successful compile (uncomment for notifications).
.pipe( notify( "Compiled: <%= file.relative %>" ) );
} );
/**
* Minify javascript files.
*
* https://www.npmjs.com/package/gulp-uglify
*/
gulp.task( 'scripts', function () {
gulp.src( paths.scripts )
// Notify on error.
.pipe( plumber( { errorHandler: notify.onError( "Error: <%= error.message %>" ) } ) )
// Cache files to avoid processing files that haven't changed.
.pipe( cache( 'scripts' ) )
// Add .min suffix.
.pipe( rename( { suffix: '.min' } ) )
// Minify.
.pipe( uglify() )
// Output the processed js to this directory.
.pipe( gulp.dest( 'assets/scripts/min' ) )
// Inject changes via browsersync.
.pipe( browsersync.reload( { stream: true } ) )
// Notify on successful compile.
.pipe( notify( "Minified: <%= file.relative %>" ) );
} );
/**
* Optimize images.
*
* https://www.npmjs.com/package/gulp-imagemin
*/
gulp.task( 'images', function () {
return gulp.src( paths.images )
// Notify on error.
.pipe( plumber( {errorHandler: notify.onError( "Error: <%= error.message %>" ) } ) )
// Cache files to avoid processing files that haven't changed.
.pipe( cache( 'images' ) )
// Optimize images.
.pipe( imagemin( {
progressive: true
} ) )
// Output the optimized images to this directory.
.pipe( gulp.dest( 'assets/images' ) )
// Inject changes via browsersync.
.pipe( browsersync.reload( { stream: true } ) )
// Notify on successful compile.
.pipe( notify( "Optimized: <%= file.relative %>" ) );
} );
/**
* Scan the theme and create a POT file.
*
* https://www.npmjs.com/package/gulp-wp-pot
*/
gulp.task( 'i18n', function() {
return gulp.src( paths.php )
.pipe( plumber( { errorHandler: notify.onError( "Error: <%= error.message %>" ) } ) )
.pipe( sort() )
.pipe( wpPot( {
domain: 'business-pro',
destFile:'business-pro.pot',
package: 'Business Pro',
bugReport: 'https://seothemes.com/support',
lastTranslator: 'Lee Anthony <help@seothemes.com>',
team: 'Seo Themes <help@seothemes.com>'
} ) )
.pipe( gulp.dest( './languages/' ) );
} );
/**
* Package theme.
*
* https://www.npmjs.com/package/gulp-zip
*/
gulp.task( 'zip', function() {
gulp.src( [ './**/*', '!./node_modules/', '!./node_modules/**', '!./aws.json' ] )
.pipe( zip( __dirname.split( "/" ).pop() + '.zip' ) )
.pipe( gulp.dest( '../' ) );
} );
/**
* Publish packaged theme to S3.
*
* https://www.npmjs.com/package/gulp-s3
*/
gulp.task( 'publish', function() {
gulp.src( '../business-pro.zip' )
.pipe( s3( aws ) );
} );
/**
* Process tasks and reload browsers on file changes.
*
* https://www.npmjs.com/package/browser-sync
*/
gulp.task( 'watch', function() {
/** HTTPS.
browsersync( {
proxy: 'https://business.dev',
port: 8000,
notify: false,
open: false,
https: {
"key": "/Users/seothemes/.valet/Certificates/business.dev.key",
"cert": "/Users/seothemes/.valet/Certificates/business.dev.crt"
}
} );
*/
/**
* Non-HTTPS browsersync.
*
* Use this instead if you are not using a self signed
* certificate on your local development environment.
*
* browsersync( {
* proxy: 'business.dev'
* } );
*/
// Run tasks when files change.
gulp.watch( paths.styles, [ 'styles' ] );
gulp.watch( paths.scripts, [ 'scripts' ] );
gulp.watch( paths.images, [ 'images' ] );
gulp.watch( paths.php ).on( 'change', browsersync.reload );
} );
/**
* Create default task.
*/
gulp.task( 'default', [ 'watch' ], function() {
gulp.start( 'styles', 'scripts', 'images' );
} );
+297
View File
@@ -0,0 +1,297 @@
<?php
/**
* This file adds customizer settings to the Business Pro theme.
*
* @package Genesis Startup
* @link https://seothemes.com/themes/genesis-startup
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Add theme customizer colors here.
$business_colors = array(
'primary' => '#fb2056',
'secondary' => 'rgba(20,30,40,0.7)',
);
add_action( 'customize_register', 'business_customize_register' );
/**
* Sets up the theme customizer sections, controls, and settings.
*
* @since 1.0.0
*
* @param object $wp_customize Global customizer object.
* @return void
*/
function business_customize_register( $wp_customize ) {
// Globals.
global $wp_customize, $business_colors;
/**
* RGBA Color Picker Customizer Control
*
* This control adds a second slider for opacity to the stock
* WordPress color picker, and it includes logic to seamlessly
* convert between RGBa and Hex color values as opacity is
* added to or removed from a color.
*/
class RGBA_Customize_Control extends WP_Customize_Control {
/**
* Official control name.
*
* @var string $type Control name.
*/
public $type = 'alpha-color';
/**
* Add support for palettes to be passed in.
*
* Supported palette values are true, false,
* or an array of RGBa and Hex colors.
*
* @var array $palette Color palettes.
*/
public $palette;
/**
* Add support for showing the opacity value on the slider handle.
*
* @var bool $show_opacity Show opacity.
*/
public $show_opacity;
/**
* Enqueue scripts and styles.
*
* Ideally these would get registered and given proper paths
* before this control object gets initialized, then we could
* simply enqueue them here, but for completeness as a stand
* alone class we'll register and enqueue them here.
*/
public function enqueue() {
wp_enqueue_script(
'rgba-color-picker',
get_stylesheet_directory_uri() . '/assets/scripts/min/customize.min.js',
array( 'jquery', 'wp-color-picker' ),
'1.0.0',
true
);
wp_enqueue_style(
'rgba-color-picker',
get_stylesheet_directory_uri() . '/assets/styles/min/customize.min.css',
array( 'wp-color-picker' ),
'1.0.0'
);
}
/**
* Render the control.
*/
public function render_content() {
// Process the palette.
if ( is_array( $this->palette ) ) {
$palette = implode( '|', $this->palette );
} else {
// Default to true.
$palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true';
}
// Support passing show_opacity as string or boolean. Default to true.
$show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true';
// Begin the output. ?>
<label>
<?php
if ( isset( $this->label ) && '' !== $this->label ) {
echo '<span class="customize-control-title">' . esc_html( $this->label ) . '</span>';
}
if ( isset( $this->description ) && '' !== $this->description ) {
echo '<span class="description customize-control-description">' . esc_html( $this->description ) . '</span>';
}
?>
<input class="alpha-color-control" type="text" data-show-opacity="<?php echo esc_html( $show_opacity ); ?>" data-palette="<?php echo esc_attr( $palette ); ?>" data-default-color="<?php echo esc_attr( $this->settings['default']->default ); ?>" <?php $this->link(); ?> />
</label>
<?php
}
}
/**
* Custom colors.
*
* Loop through the global variable array of colors and
* register a customizer setting and control for each.
* To add additional color settings, do not modify this
* function, instead add your color name and hex value to
* the $business_colors` array at the start of this file.
*/
foreach ( $business_colors as $id => $rgba ) {
// Format ID and label.
$setting = "business_{$id}_color";
$label = ucwords( str_replace( '_', ' ', $id ) ) . __( ' Color', 'business-pro' );
// Add color setting.
$wp_customize->add_setting(
$setting,
array(
'default' => $rgba,
'sanitize_callback' => 'sanitize_rgba_color',
)
);
// Add color control.
$wp_customize->add_control(
new RGBA_Customize_Control(
$wp_customize,
$setting,
array(
'section' => 'colors',
'label' => $label,
'settings' => $setting,
'show_opacity' => true,
'palette' => array(
'#000000',
'#ffffff',
'#dd3333',
'#dd9933',
'#eeee22',
'#81d742',
'#1e73be',
'#8224e3',
),
)
)
);
}
}
add_action( 'wp_enqueue_scripts', 'business_customizer_output', 100 );
/**
* Output customizer styles.
*
* Checks the settings for the colors defined in the settings.
* If any of these value are set the appropriate CSS is output.
*
* @since 1.0.0
*
* @var array $business_colors Global theme colors.
* @return void
*/
function business_customizer_output() {
// Set in customizer-settings.php.
global $business_colors;
/**
* Loop though each color in the global array of theme colors
* and create a new variable for each. This is just a shorthand
* way of creating multiple variables that we can reuse. The
* benefit of using a foreach loop over creating each variable
* manually is that we can just declare the colors once in the
* `$business_colors` array, and they can be used in multiple ways.
*/
foreach ( $business_colors as $id => $hex ) {
${"$id"} = get_theme_mod( "business_{$id}_color", $hex );
}
// Ensure $css var is empty.
$css = '';
/**
* Build the CSS.
*
* We need to concatenate each one of our colors to the $css
* variable, but first check if the color has been changed by
* the user from the theme customizer. If the theme mod is not
* equal to the default color then the string is appended to $css.
*/
$css .= ( $business_colors['primary'] !== $primary ) ? sprintf( '
button.accent,
.button.accent,
button.accent:hover,
.button.accent:hover,
button.accent:focus,
.button.accent:focus,
.archive-pagination a:hover,
.archive-pagination a:focus,
.archive-pagination .active a,
.woocommerce a.button:hover,
.woocommerce a.button:focus,
.woocommerce a.button,
.woocommerce a.button.alt:hover,
.woocommerce a.button.alt:focus,
.woocommerce a.button.alt,
.woocommerce button.button:hover,
.woocommerce button.button:focus,
.woocommerce button.button,
.woocommerce button.button.alt:hover,
.woocommerce button.button.alt:focus,
.woocommerce button.button.alt,
.woocommerce input.button:hover,
.woocommerce input.button:focus,
.woocommerce input.button,
.woocommerce input.button.alt:hover,
.woocommerce input.button.alt:focus,
.woocommerce input.button.alt,
.woocommerce input[type="submit"]:hover,
.woocommerce input[type="submit"]:focus,
.woocommerce input[type="submit"],
.woocommerce #respond input#submit:hover,
.woocommerce #respond input#submit:focus,
.woocommerce #respond input#submit,
.woocommerce #respond input#submit.alt:hover,
.woocommerce #respond input#submit.alt:focus,
.woocommerce #respond input#submit.alt,
.woocommerce input.button[type=submit]:focus,
.woocommerce input.button[type=submit],
.woocommerce input.button[type=submit]:hover,
.woocommerce.widget_price_filter .ui-slidui-slider-handle,
.woocommerce.widget_price_filter .ui-slidui-slider-range,
.pricing-table .featured .button,
.pricing-table .featured button,
.archive-pagination a:hover,
.archive-pagination .active a,
.front-page-3 .widget_custom_html:first-of-type hr,
.front-page-5 .widget_custom_html:first-of-type hr {
background-color: %1$s;
}
.front-page-2 .fa {
color: %1$s;
}
', $primary ) : '';
$css .= ( $business_colors['secondary'] !== $secondary ) ? sprintf( '
.page-header:before,
.front-page-4:before,
.before-footer:before {
background-color: %1$s;
}
', $secondary ) : '';
// Style handle is the name of the theme.
$handle = defined( 'CHILD_THEME_NAME' ) && CHILD_THEME_NAME ? sanitize_title_with_dashes( CHILD_THEME_NAME ) : 'child-theme';
// Output CSS if not empty.
if ( ! empty( $css ) ) {
// Add the inline styles, also minify CSS first.
wp_add_inline_style( $handle, business_minify_css( $css ) );
}
}
+211
View File
@@ -0,0 +1,211 @@
<?php
/**
* This file registers the required plugins for the Business Pro theme.
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'genesis_theme_settings_defaults', 'business_theme_defaults' );
/**
* Update Theme Settings upon reset.
*
* @since 1.0.0
*
* @param array $defaults Default theme settings.
* @return array Custom theme settings.
*/
function business_theme_defaults( $defaults ) {
$defaults['blog_cat_num'] = 6;
$defaults['content_archive'] = 'excerpt';
$defaults['content_archive_limit'] = 300;
$defaults['content_archive_thumbnail'] = 1;
$defaults['image_alignment'] = 'alignnone';
$defaults['posts_nav'] = 'numeric';
$defaults['image_size'] = 'large';
$defaults['site_layout'] = 'centered-content';
return $defaults;
}
add_action( 'after_switch_theme', 'business_theme_setting_defaults' );
/**
* Update Theme Settings upon activation.
*
* @since 1.0.0
*
* @return void
*/
function business_theme_setting_defaults() {
if ( function_exists( 'genesis_update_settings' ) ) {
genesis_update_settings( array(
'blog_cat_num' => 6,
'content_archive' => 'excerpt',
'content_archive_limit' => 300,
'content_archive_thumbnail' => 1,
'image_alignment' => 'alignnone',
'image_size' => 'large',
'posts_nav' => 'numeric',
'site_layout' => 'centered-content',
) );
}
update_option( 'posts_per_page', 8 );
}
add_filter( 'simple_social_default_styles', 'business_social_default_styles' );
/**
* Theme Simple Social Icon defaults.
*
* @since 1.0.0
*
* @param array $defaults Default Simple Social Icons settings.
* @return array Custom settings.
*/
function business_social_default_styles( $defaults ) {
$args = array(
'alignment' => 'alignleft',
'background_color' => '#141e28',
'background_color_hover' => '#141e28',
'border_radius' => 36,
'border_color' => '#ffffff',
'border_color_hover' => '#ffffff',
'border_width' => 0,
'icon_color' => '#ffffff',
'icon_color_hover' => '#fb2056',
'size' => 36,
'new_window' => 1,
'facebook' => '#',
'gplus' => '#',
'twitter' => '#',
);
$args = wp_parse_args( $args, $defaults );
return $args;
}
add_action( 'after_switch_theme', 'business_excerpt_metabox' );
/**
* Display excerpt metabox by default.
*
* Business Pro adds support for excerpts on pages to be used as
* subtitles on the front end of the site. The excerpt metabox
* is hidden by default on the page edit screen which can cause
* some confusion for users when they want to edit or remove the
* excerpt. To make it easier, we want to show the excerpt metabox
* by default and that's what this function is for. It only runs
* after switching theme so the current user's screen options are
* updated, allowing them to hide the metabox if not used.
*
* @since 1.0.0
*
* @return void
*/
function business_excerpt_metabox() {
// Get current user ID.
$user_id = get_current_user_id();
// Create array of post types to include.
$post_types = array(
'page',
'post',
'portfolio',
);
// Loop through each post type and update user meta.
foreach ( $post_types as $post_type ) {
// Create variables.
$meta_key = 'metaboxhidden_' . $post_type;
$prev_value = get_user_meta( $user_id, $meta_key, true );
// Check if value is an array.
if ( ! is_array( $prev_value ) ) {
$prev_value = array(
'genesis_inpost_seo_box',
'postcustom',
'postexcerpt',
'commentstatusdiv',
'commentsdiv',
'slugdiv',
'authordiv',
'genesis_inpost_scripts_box',
);
}
// Empty array to prevent errors.
$meta_value = array();
// Remove excerpt from array.
$meta_value = array_diff( $prev_value, array( 'postexcerpt' ) );
// Update user meta with new value.
update_user_meta( $user_id, $meta_key, $meta_value, $prev_value );
}
}
add_filter( 'icon_widget_default_font', 'business_icon_widget_default_font' );
/**
* Set the default icon widget font.
*
* @return string
*/
function business_icon_widget_default_font() {
return 'line-awesome';
}
add_filter( 'icon_widget_default_color', 'business_icon_widget_default_color' );
/**
* Set the default icon widget font.
*
* @return string
*/
function business_icon_widget_default_color() {
return '#fb2056';
}
add_filter( 'icon_widget_default_size', 'business_icon_widget_default_size' );
/**
* Set the default icon widget font.
*
* @return string
*/
function business_icon_widget_default_size() {
return '3x';
}
add_filter( 'icon_widget_default_align', 'business_icon_widget_default_align' );
/**
* Set the default icon widget font.
*
* @return string
*/
function business_icon_widget_default_align() {
return 'center';
}
+585
View File
@@ -0,0 +1,585 @@
<?php
/**
* Business Pro.
*
* This file contains theme-specific functions for the Business Pro theme.
*
* @package Business Pro
* @link https://seothemes.com/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_action( 'gts', 'business_wrap_open', 3 );
/**
* Custom opening wrapper div.
*
* @since 1.0.0
*
* @return void
*/
function business_wrap_open() {
echo '<div class="wrap">';
}
add_action( 'gts', 'business_wrap_close', 13 );
/**
* Custom closing wrapper div.
*
* @since 1.0.0
*
* @return void
*/
function business_wrap_close() {
echo '</div>';
}
add_filter( 'genesis_attr_site-header', 'business_fixed_header' );
/**
* Enable fixed header if theme supports it.
*
* @since 1.0.0
*
* @param array $attr Site header attr.
* @return array
*/
function business_fixed_header( $attr ) {
if ( current_theme_supports( 'fixed-header' ) ) {
$attr['class'] .= ' fixed';
}
return $attr;
}
add_filter( 'theme_page_templates', 'business_remove_templates' );
/**
* Remove Page Templates.
*
* The Genesis Blog & Archive templates are not needed and can
* create problems for users so it's safe to remove them. If
* you need to use these templates, simply remove this function.
*
* @since 1.0.0
*
* @param array $page_templates All page templates.
* @return array Modified templates.
*/
function business_remove_templates( $page_templates ) {
unset( $page_templates['page_archive.php'] );
unset( $page_templates['page_blog.php'] );
return $page_templates;
}
add_action( 'genesis_admin_before_metaboxes', 'business_remove_metaboxes' );
/**
* Remove blog metabox.
*
* Also remove the Genesis blog settings metabox from the
* Genesis admin settings screen as it is no longer required
* if the Blog page template has been removed.
*
* @since 1.0.0
*
* @param string $hook The metabox hook.
* @return void
*/
function business_remove_metaboxes( $hook ) {
remove_meta_box( 'genesis-theme-settings-blogpage', $hook, 'main' );
}
add_filter( 'template_include', 'business_blog_template', 99 );
/**
* Custom blog template path.
*
* The following function adds a custom template path for the home
* and archive template. This short circuits the WordPress template
* hierarchy and allows us to reuse the masonry template.
*
* @since 1.0.0
*
* @param string $template The template path.
* @return string
*/
function business_blog_template( $template ) {
if ( is_home() || is_search() || is_archive() && ! is_post_type_archive() && ! is_tax() ) {
return get_stylesheet_directory() . '/templates/page-masonry.php';
}
return $template;
}
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
add_action( 'genesis_entry_header', 'business_featured_image', 1 );
/**
* Display featured image before post content.
*
* Custom featured image function to do some checks before
* outputting the featured image. It will return early if we're not
* on a post, page or portfolio item or if the post doesn't have a
* featured image set or if the featured image option set in
* Genesis > Theme Settings is not checked.
*
* @since 1.0.0
*
* @return array Featured image size.
*/
function business_featured_image() {
if ( class_exists( 'WooCommerce' ) && is_shop() || ! is_home() && ! is_archive() || is_post_type_archive() ) {
return;
}
if ( ! has_post_thumbnail() ) {
return;
}
$genesis_settings = get_option( 'genesis-settings' );
if ( 1 !== $genesis_settings['content_archive_thumbnail'] ) {
return;
}
$link = is_singular() ? wp_get_attachment_url( get_post_thumbnail_id() ) : get_permalink();
echo '<a href="' . esc_url( $link ) . '" class="featured-image">' . genesis_get_image() . '</a>';
}
add_filter( 'excerpt_more', 'business_read_more' );
add_filter( 'the_content_more_link', 'business_read_more' );
add_filter( 'get_the_content_more_link', 'business_read_more' );
/**
* Accessible read more link.
*
* The below code modifies the default read more link when
* using the WordPress More Tag to break a post on your site.
* Instead of seeing 'Read more', screen readers will instead
* see 'Read more about (entry title)'.
*
* @since 1.0.0
*
* @return string
*/
function business_read_more() {
return sprintf( '&hellip; <a href="%s" class="more-link">%s</a>',
get_the_permalink(),
genesis_a11y_more_link( __( 'Read more', 'business-pro' ) )
);
}
add_action( 'genesis_after_content_sidebar_wrap', 'business_prev_next_post_nav_cpt', 99 );
/**
* Enable prev/next links in portfolio.
*
* @since 1.0.0
*
* @return void
*/
function business_prev_next_post_nav_cpt() {
if ( ! is_singular( 'portfolio' ) && ! is_singular( 'product' ) ) {
return;
}
genesis_markup( array(
'html5' => '<div %s><div class="wrap">',
'xhtml' => '<div class="navigation">',
'context' => 'adjacent-entry-pagination',
) );
echo '<div class="pagination-previous alignleft">';
previous_post_link();
echo '</div>';
echo '<div class="pagination-next alignright">';
next_post_link();
echo '</div>';
echo '</div></div>';
}
add_action( 'wp_head', 'business_simple_social_icons_css' );
/**
* Simple Social Icons fix.
*
* This is a workaround to allow multiple instances of Simple
* Social Icons to be displayed on a single page. Currently,
* the plugin only outputs a single style which is applied to
* every widget instance. This function outputs different CSS
* for every widget instance based on the ID.
*
* @since 1.0.0
*
* @link http://genesisdeveloper.me/simple-social-icons-color-style-saver-scripts/
*/
function business_simple_social_icons_css() {
// Check if plugin is active.
if ( ! class_exists( 'Simple_Social_Icons_Widget' ) ) {
return;
}
$object = new Simple_Social_Icons_Widget();
// Get widget settings.
$all_instances = $object->get_settings();
// Loop through each instance.
foreach ( $all_instances as $key => $options ) {
$instance = wp_parse_args( $all_instances[ $key ] );
$font_size = round( (int) $instance['size'] / 2 );
$icon_padding = round( (int) $font_size / 2 );
// Build the CSS.
$css = '#' .
$object->id_base . '-' . $key . ' ul li a,
#' . $object->id_base . '-' . $key . ' ul li a:hover {
background-color: ' . $instance['background_color'] . ';
border-radius: ' . $instance['border_radius'] . 'px;
color: ' . $instance['icon_color'] . ';
border: ' . $instance['border_width'] . 'px ' . $instance['border_color'] . ' solid;
font-size: ' . $font_size . 'px;
padding: ' . $icon_padding . 'px;
}
#' . $object->id_base . '-' . $key . ' ul li a:hover {
background-color: ' . $instance['background_color_hover'] . ';
border-color: ' . $instance['border_color_hover'] . ';
color: ' . $instance['icon_color_hover'] . ';
}';
// Minify and output inline CSS (Safe WPCS).
echo '<style type="text/css" media="screen">' . business_minify_css( $css ) . '</style>';
}
}
add_action( 'wp_head', 'business_remove_widget_action', 1 );
/**
* Remove Simple Social Icons inline CSS.
*
* Since we are adding our own inline styles with the function
* above, we also need to remove the default inline styles output
* by the plugin.
*
* @since 1.0.0
*
* @return void
*/
function business_remove_widget_action() {
// Check if plugin is active.
if ( ! class_exists( 'Simple_Social_Icons_Widget' ) ) {
return;
}
global $wp_widget_factory;
remove_action( 'wp_head', array( $wp_widget_factory->widgets['Simple_Social_Icons_Widget'], 'css' ) );
}
add_action( 'genesis_before', 'business_remove_sidebars' );
/**
* Force full-width-layout for custom layout.
*
* @since 1.0.0
*
* @return void
*/
function business_remove_sidebars() {
$site_layout = genesis_site_layout();
if ( 'centered-content' !== $site_layout ) {
return;
}
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
}
add_filter( 'display_posts_shortcode_post_class', 'business_dps_column_classes', 10, 4 );
/**
* Column Classes
*
* Columns Extension for Display Posts Shortcode plugin makes it
* easy for users to display posts in columns using
* [display-posts columns="2"]
*
* @since 1.0.0
*
* @author Bill Erickson <bill@billerickson.net>
* @link http://www.billerickson.net/shortcode-to-display-posts/
* @param array $classes Current CSS classes.
* @param object $post The post object.
* @param object $listing The WP Query object for the listing.
* @param array $atts Original shortcode attributes.
* @return array $classes Modified CSS classes.
*/
function business_dps_column_classes( $classes, $post, $listing, $atts ) {
if ( ! isset( $atts['columns'] ) ) {
return $classes;
}
$columns = intval( $atts['columns'] );
if ( $columns < 2 || $columns > 6 ) {
return $classes;
}
$column_classes = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' );
$classes[] = $column_classes[ $columns ];
if ( 0 == $listing->current_post % $columns ) {
$classes[] = 'first';
}
return $classes;
}
/**
* Check if post content is empty.
*
* This function takes the string you pass into it, strips out all HTML
* tags, then removes any non-breaking space entities, and then trims
* all whitespace. If theres nothing but that stuff, then it becomes
* an empty string. If theres any “real” content, the string wont be
* empty. Then it just compares whatever it has left against an actual
* empty string, and returns the boolean result.
*
* @since 1.0.0
*
* @link http://blog.room34.com/archives/5360
* @param string $str String to check.
* @return string
*/
function is_empty_content( $str ) {
return trim( str_replace( '&nbsp;', '', strip_tags( $str ) ) ) == '';
}
/**
* Sanitize RGBA values.
*
* If string does not start with 'rgba', then treat as hex then
* sanitize the hex color and finally convert hex to rgba.
*
* @since 1.0.0
*
* @param string $color The rgba color to sanitize.
* @return string $color Sanitized value.
*/
function sanitize_rgba_color( $color ) {
// Return invisible if empty.
if ( empty( $color ) || is_array( $color ) ) {
return 'rgba(0,0,0,0)';
}
// Return sanitized hex if not rgba value.
if ( false === strpos( $color, 'rgba' ) ) {
return sanitize_hex_color( $color );
}
// Finally, sanitize and return rgba.
$color = str_replace( ' ', '', $color );
sscanf( $color, 'rgba(%d,%d,%d,%f)', $red, $green, $blue, $alpha );
return 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $alpha . ')';
}
/**
* Minify CSS helper function.
*
* A handy CSS minification script by Gary Jones that we'll use to
* minify the CSS output by the customizer. This is called near the
* end of the /includes/customizer-output.php file.
*
* @since 1.0.0
*
* @author Gary Jones
* @link https://github.com/GaryJones/Simple-PHP-CSS-Minification
* @param string $css The CSS to minify.
* @return string Minified CSS.
*/
function business_minify_css( $css ) {
// Normalize whitespace.
$css = preg_replace( '/\s+/', ' ', $css );
// Remove spaces before and after comment.
$css = preg_replace( '/(\s+)(\/\*(.*?)\*\/)(\s+)/', '$2', $css );
// Remove comment blocks, everything between /* and */, unless preserved with /*! ... */ or /** ... */.
$css = preg_replace( '~/\*(?![\!|\*])(.*?)\*/~', '', $css );
// Remove ; before }.
$css = preg_replace( '/;(?=\s*})/', '', $css );
// Remove space after , : ; { } */ >.
$css = preg_replace( '/(,|:|;|\{|}|\*\/|>) /', '$1', $css );
// Remove space before , ; { } ( ) >.
$css = preg_replace( '/ (,|;|\{|}|\(|\)|>)/', '$1', $css );
// Strips leading 0 on decimal values (converts 0.5px into .5px).
$css = preg_replace( '/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );
// Strips units if value is 0 (converts 0px to 0).
$css = preg_replace( '/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );
// Converts all zeros value into short-hand.
$css = preg_replace( '/0 0 0 0/', '0', $css );
// Shorten 6-character hex color codes to 3-character where possible.
$css = preg_replace( '/#([a-f0-9])\\1([a-f0-9])\\2([a-f0-9])\\3/i', '#\1\2\3', $css );
return trim( $css );
}
/**
* Custom header image callback.
*
* Loads custom header or featured image depending on what is set.
* If a featured image is set it will override the header image.
*
* @since 2.0.0
*
* @return void
*/
function business_custom_header() {
$id = '';
// Get the current page ID.
if ( class_exists( 'WooCommerce' ) && is_shop() ) {
$id = get_option( 'woocommerce_shop_page_id' );
} elseif ( is_home() ) {
$id = get_option( 'page_for_posts' );
} elseif ( is_singular() ) {
$id = get_the_id();
}
$url = get_the_post_thumbnail_url( $id );
if ( ! $url ) {
$url = get_header_image();
}
return sprintf( 'style="background-image: url(%s)"', esc_url( $url ) );
}
add_action( 'genesis_after_header', 'business_page_header_open', 20 );
/**
* Page header opening markup.
*
* @since 1.0.0
*
* @return void
*/
function business_page_header_open() {
echo '<section class="page-header" role="banner" ' . business_custom_header() . '><div class="wrap">';
}
add_action( 'genesis_after_header', 'business_page_header_close', 28 );
/**
* Page header closing markup.
*
* @since 1.0.0
*
* @return void
*/
function business_page_header_close() {
echo '</div></section>';
}
add_action( 'genesis_after_header', 'business_page_header_title', 24 );
/**
* Display title in page header.
*
* @since 1.0.0
*
* @return void
*/
function business_page_header_title() {
// Add post titles back inside posts loop.
if ( is_home() || is_archive() || is_category() || is_tag() || is_tax() || is_search() || is_page_template( 'page_blog.php' ) ) {
add_action( 'genesis_entry_header', 'genesis_do_post_title', 2 );
}
if ( class_exists( 'WooCommerce' ) && is_shop() ) {
printf( '<h1 itemprop="headline">%s</h1>', get_the_title( get_option( 'woocommerce_shop_page_id' ) ) );
} elseif ( 'posts' === get_option( 'show_on_front' ) && is_home() ) {
printf( '<h1 itemprop="headline">%s</h1>', esc_html( apply_filters( 'business_latest_posts_title', __( 'Latest Posts', 'business-pro' ) ) ) );
} elseif ( is_404() ) {
printf( '<h1 itemprop="headline">%s</h1>', esc_html( apply_filters( 'genesis_404_entry_title', __( 'Not found, error 404', 'business-pro' ) ) ) );
} elseif ( is_search() ) {
printf( '<h1 itemprop="headline">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search Results for:', 'business-pro' ) ), get_search_query() );
} elseif ( is_single() || is_singular() ) {
the_title( apply_filters( 'business_hero_title_markup', '<h1 itemprop="headline">' ), '</h1>', true );
if ( has_excerpt() ) {
printf( '<p itemprop="description">%s</p>', esc_html( strip_tags( get_the_excerpt() ) ) );
}
}
}
+3892
View File
File diff suppressed because it is too large Load Diff
+482
View File
@@ -0,0 +1,482 @@
# Copyright (C) 2017 Business Pro
# This file is distributed under the same license as the Business Pro package.
msgid ""
msgstr ""
"Project-Id-Version: Business Pro\n"
"Report-Msgid-Bugs-To: https://seothemes.com/support\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
"Last-Translator: Lee Anthony <help@seothemes.com>\n"
"Language-Team: Seo Themes <help@seothemes.com>\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: archive-portfolio.php:48
msgid "All"
msgstr ""
#: functions.php:71
msgid "Header Menu"
msgstr ""
#: functions.php:151
msgid "Hero Image"
msgstr ""
#: functions.php:157
msgid "Centered Content"
msgstr ""
#: functions.php:164
msgid "Front Page 1"
msgstr ""
#: functions.php:165
msgid "This is the Front Page 1 widget area."
msgstr ""
#: functions.php:169
msgid "Front Page 2"
msgstr ""
#: functions.php:170
msgid "This is the Front Page 2 widget area."
msgstr ""
#: functions.php:174
msgid "Front Page 3"
msgstr ""
#: functions.php:175
msgid "This is the Front Page 3 widget area."
msgstr ""
#: functions.php:179
msgid "Front Page 4"
msgstr ""
#: functions.php:180
msgid "This is the Front Page 4 widget area."
msgstr ""
#: functions.php:184
msgid "Front Page 5"
msgstr ""
#: functions.php:185
msgid "This is the Front Page 5 widget area."
msgstr ""
#: functions.php:189
msgid "Front Page 6"
msgstr ""
#: functions.php:190
msgid "This is the Front Page 6 widget area."
msgstr ""
#: functions.php:196
msgid "Before Footer"
msgstr ""
#: functions.php:197
msgid "This is the before footer widget area."
msgstr ""
#: functions.php:247, functions.php:248
msgid "Menu"
msgstr ""
#: includes/customize.php:143
msgid " Color"
msgstr ""
#: includes/header.php:97
msgid "Latest Posts"
msgstr ""
#: includes/header.php:101
msgid "Not found, error 404"
msgstr ""
#: includes/header.php:105
msgid "Search Results for:"
msgstr ""
#: includes/helpers.php:187
msgid "Read more"
msgstr ""
#: includes/plugins.php:449
msgid "Install Required Plugins"
msgstr ""
#: includes/plugins.php:450
msgid "Install Plugins"
msgstr ""
#: includes/plugins.php:452
msgid "Installing Plugin: %s"
msgstr ""
#: includes/plugins.php:454
msgid "Updating Plugin: %s"
msgstr ""
#: includes/plugins.php:455
msgid "Something went wrong with the plugin API."
msgstr ""
#: includes/plugins.php:456
msgid "/*translators:1:pluginnames.*/This theme requires the following plugin: %1$s."
msgid_plural "This theme requires the following plugins: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:462
msgid "/*translators:1:pluginnames.*/This theme recommends the following plugin: %1$s."
msgid_plural "This theme recommends the following plugins: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:468
msgid "/*translators:1:pluginnames.*/The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s."
msgid_plural "The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:474
msgid "/*translators:1:pluginnames.*/There is an update available for: %1$s."
msgid_plural "There are updates available for the following plugins: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:480
msgid "/*translators:1:pluginnames.*/The following required plugin is currently inactive: %1$s."
msgid_plural "The following required plugins are currently inactive: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:486
msgid "/*translators:1:pluginnames.*/The following recommended plugin is currently inactive: %1$s."
msgid_plural "The following recommended plugins are currently inactive: %1$s."
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:492
msgid "Begin installing plugin"
msgid_plural "Begin installing plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:497
msgid "Begin updating plugin"
msgid_plural "Begin updating plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:502
msgid "Begin activating plugin"
msgid_plural "Begin activating plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:507
msgid "Return to Required Plugins Installer"
msgstr ""
#: includes/plugins.php:508, includes/plugins.php:949, includes/plugins.php:2655, includes/plugins.php:3702
msgid "Return to the Dashboard"
msgstr ""
#: includes/plugins.php:509, includes/plugins.php:3281
msgid "Plugin activated successfully."
msgstr ""
#: includes/plugins.php:510, includes/plugins.php:3074
msgid "The following plugin was activated successfully:"
msgid_plural "The following plugins were activated successfully:"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:512
msgid "No action taken. Plugin %1$s was already active."
msgstr ""
#: includes/plugins.php:514
msgid "Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin."
msgstr ""
#: includes/plugins.php:516
msgid "All plugins installed and activated successfully. %1$s"
msgstr ""
#: includes/plugins.php:517
msgid "Dismiss this notice"
msgstr ""
#: includes/plugins.php:518
msgid "There are one or more required or recommended plugins to install, update or activate."
msgstr ""
#: includes/plugins.php:519
msgid "Please contact the administrator of this site for help."
msgstr ""
#: includes/plugins.php:644
msgid "This plugin needs to be updated to be compatible with your theme."
msgstr ""
#: includes/plugins.php:645
msgid "Update Required"
msgstr ""
#: includes/plugins.php:1056
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
msgstr ""
#: includes/plugins.php:1056, includes/plugins.php:1059
msgid "Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines."
msgstr ""
#: includes/plugins.php:1059
msgid "The remote plugin package consists of more than one file, but the files are not packaged in a folder."
msgstr ""
#: includes/plugins.php:1243, includes/plugins.php:3070
msgctxt "plugin A *and* plugin B"
msgid "and"
msgstr ""
#: includes/plugins.php:2104
msgid "TGMPA v%s"
msgstr ""
#: includes/plugins.php:2395
msgid "Required"
msgstr ""
#: includes/plugins.php:2398
msgid "Recommended"
msgstr ""
#: includes/plugins.php:2414
msgid "WordPress Repository"
msgstr ""
#: includes/plugins.php:2417
msgid "External Source"
msgstr ""
#: includes/plugins.php:2420
msgid "Pre-Packaged"
msgstr ""
#: includes/plugins.php:2437
msgid "Not Installed"
msgstr ""
#: includes/plugins.php:2441
msgid "Installed But Not Activated"
msgstr ""
#: includes/plugins.php:2443
msgid "Active"
msgstr ""
#: includes/plugins.php:2449
msgid "Required Update not Available"
msgstr ""
#: includes/plugins.php:2452
msgid "Requires Update"
msgstr ""
#: includes/plugins.php:2455
msgid "Update recommended"
msgstr ""
#: includes/plugins.php:2464
msgctxt "Install/Update Status"
msgid "%1$s, %2$s"
msgstr ""
#: includes/plugins.php:2510
msgctxt "plugins"
msgid "All <span class=\"count\">(%s)</span>"
msgid_plural "All <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2514
msgid "To Install <span class=\"count\">(%s)</span>"
msgid_plural "To Install <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2518
msgid "Update Available <span class=\"count\">(%s)</span>"
msgid_plural "Update Available <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2522
msgid "To Activate <span class=\"count\">(%s)</span>"
msgid_plural "To Activate <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2604
msgctxt "as in: \"version nr unknown\""
msgid "unknown"
msgstr ""
#: includes/plugins.php:2612
msgid "Installed version:"
msgstr ""
#: includes/plugins.php:2620
msgid "Minimum required version:"
msgstr ""
#: includes/plugins.php:2632
msgid "Available version:"
msgstr ""
#: includes/plugins.php:2655
msgid "No plugins to install, update or activate."
msgstr ""
#: includes/plugins.php:2669
msgid "Plugin"
msgstr ""
#: includes/plugins.php:2670
msgid "Source"
msgstr ""
#: includes/plugins.php:2671
msgid "Type"
msgstr ""
#: includes/plugins.php:2675
msgid "Version"
msgstr ""
#: includes/plugins.php:2676
msgid "Status"
msgstr ""
#: includes/plugins.php:2725
msgid "Install %2$s"
msgstr ""
#: includes/plugins.php:2730
msgid "Update %2$s"
msgstr ""
#: includes/plugins.php:2736
msgid "Activate %2$s"
msgstr ""
#: includes/plugins.php:2806
msgid "Upgrade message from the plugin author:"
msgstr ""
#: includes/plugins.php:2839
msgid "Install"
msgstr ""
#: includes/plugins.php:2845
msgid "Update"
msgstr ""
#: includes/plugins.php:2848
msgid "Activate"
msgstr ""
#: includes/plugins.php:2879
msgid "No plugins were selected to be installed. No action taken."
msgstr ""
#: includes/plugins.php:2881
msgid "No plugins were selected to be updated. No action taken."
msgstr ""
#: includes/plugins.php:2922
msgid "No plugins are available to be installed at this time."
msgstr ""
#: includes/plugins.php:2924
msgid "No plugins are available to be updated at this time."
msgstr ""
#: includes/plugins.php:3030
msgid "No plugins were selected to be activated. No action taken."
msgstr ""
#: includes/plugins.php:3056
msgid "No plugins are available to be activated at this time."
msgstr ""
#: includes/plugins.php:3280
msgid "Plugin activation failed."
msgstr ""
#: includes/plugins.php:3620
msgid "Updating Plugin %1$s (%2$d/%3$d)"
msgstr ""
#: includes/plugins.php:3623
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
msgstr ""
#: includes/plugins.php:3625
msgid "The installation of %1$s failed."
msgstr ""
#: includes/plugins.php:3629
msgid "The installation and activation process is starting. This process may take a while on some hosts, so please be patient."
msgstr ""
#: includes/plugins.php:3631
msgid "%1$s installed and activated successfully."
msgstr ""
#: includes/plugins.php:3631, includes/plugins.php:3639
msgid "Show Details"
msgstr ""
#: includes/plugins.php:3631, includes/plugins.php:3639
msgid "Hide Details"
msgstr ""
#: includes/plugins.php:3632
msgid "All installations and activations have been completed."
msgstr ""
#: includes/plugins.php:3634
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
msgstr ""
#: includes/plugins.php:3637
msgid "The installation process is starting. This process may take a while on some hosts, so please be patient."
msgstr ""
#: includes/plugins.php:3639
msgid "%1$s installed successfully."
msgstr ""
#: includes/plugins.php:3640
msgid "All installations have been completed."
msgstr ""
#: includes/plugins.php:3642
msgid "Installing Plugin %1$s (%2$d/%3$d)"
msgstr ""
+7659
View File
File diff suppressed because it is too large Load Diff
+51
View File
@@ -0,0 +1,51 @@
{
"name": "business-pro",
"version": "0.1.2",
"description": "The Business Pro theme for the Genesis Framework.",
"main": "gulpfile.js",
"dependencies": {
"autoprefixer": "^6.3.1",
"browser-sync": "*",
"css-mqpacker": "*",
"fs": "0.0.1-security",
"gulp": "^3.9.1",
"gulp-autoprefixer": "*",
"gulp-cached": "*",
"gulp-clean-css": "^3.4.1",
"gulp-concat": "^2.6.1",
"gulp-cssbeautify": "^0.1.3",
"gulp-cssnano": "^2.1.0",
"gulp-filter": "*",
"gulp-imagemin": "*",
"gulp-notify": "*",
"gulp-pixrem": "^1.0.0",
"gulp-plumber": "^1.1.0",
"gulp-postcss": "^6.3.0",
"gulp-rename": "*",
"gulp-replace": "^0.5.4",
"gulp-s3-publish": "^2.0.0",
"gulp-sass": "*",
"gulp-sort": "^1.1.1",
"gulp-sourcemaps": "*",
"gulp-uglify": "*",
"gulp-wp-pot": "^1.1.1",
"gulp-zip": "*"
},
"devDependencies": {},
"scripts": {
"test": "echo \"No test specified\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/seothemes/business-pro"
},
"keywords": [
"theme"
],
"author": "SeoThemes",
"license": "GPL-2.0",
"bugs": {
"url": "https://github.com/seothemes/business-pro/issues"
},
"homepage": "https://github.com/seothemes/business-pro"
}
+12481
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

+3386
View File
File diff suppressed because it is too large Load Diff
+60
View File
@@ -0,0 +1,60 @@
<?php
/**
* Template Name: Page Builder
*
* This file adds the page builder template to the Business Pro
* theme. It removes everything between the site header and footer
* leaving a blank template perfect for page builder plugins.
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Remove default page header.
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
remove_action( 'genesis_after_header', 'business_page_header_close', 28 );
// Remove before footer widget area.
remove_action( 'genesis_footer', 'business_before_footer_widget_area', 5 );
/**
* Add attributes for site-inner element, since we're removing 'content'.
*
* @param array $attributes Existing attributes.
* @return array Amended attributes.
*/
function be_site_inner_attr( $attributes ) {
// Add the attributes from .entry, since this replaces the main entry
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
return $attributes;
}
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
// Get site-header.
get_header();
//Custom loop, remove all hooks except entry content.
if ( have_posts() ) :
the_post();
do_action( 'genesis_entry_content' );
endif; // End loop.
// Get site-footer.
get_footer();
+77
View File
@@ -0,0 +1,77 @@
<?php
/**
* Business Pro.
*
* This file adds the landing page template to the Business Pro Theme.
*
* Template Name: Landing Page
*
* @package Business Pro
* @author SeoThemes
* @license GPL-2.0+
* @link https://seothemes.com/themes/business-pro
*/
add_filter( 'body_class', 'business_add_body_class' );
/**
* Add landing page body class to the head.
*
* @since 1.0.0
*
* @param array $classes Array of body classes.
* @return array $classes Array of body classes.
*/
function business_add_body_class( $classes ) {
$classes[] = 'landing-page';
return $classes;
}
remove_action( 'genesis_before_header', 'genesis_skip_links', 5 );
add_action( 'wp_enqueue_scripts', 'business_dequeue_skip_links' );
/**
* Dequeue Skip Links Script.
*
* @since 1.0.0
*
* @return void
*/
function business_dequeue_skip_links() {
wp_dequeue_script( 'skip-links' );
}
// Remove site header elements.
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
// Remove default page header.
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
remove_action( 'genesis_after_header', 'business_page_header_close', 28 );
// Add title back (removed in /includes/header.php).
add_action( 'genesis_entry_header', 'genesis_do_post_title' );
// Remove navigation.
remove_theme_support( 'genesis-menus' );
// Remove breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
// Remove footer widgets.
remove_action( 'genesis_footer', 'genesis_footer_widget_areas', 6 );
remove_action( 'genesis_footer', 'business_before_footer_widget_area', 5 );
// Remove site footer elements.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'business_footer_menu', 7 );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
// Run the Genesis loop.
genesis();
+103
View File
@@ -0,0 +1,103 @@
<?php
/**
* This file adds the blog masonry template to the Business Pro theme.
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
add_filter( 'body_class', 'business_masonry_body_class', 99 );
/**
* Add blog-masonry body class.
*
* @since 1.0.0
*
* @param array $classes Default body classes.
* @return array $classes Default body classes.
*/
function business_masonry_body_class( $classes ) {
$classes[] = 'masonry';
return $classes;
}
add_action( 'wp_enqueue_scripts', 'business_masonry_scripts' );
/**
* Enqueue masonry script.
*
* Uses the masonry script from wp-includes/js/masonry.min.js
*
* @since 1.0.0
*
* @return void
*/
function business_masonry_scripts() {
// Enqueue script.
wp_enqueue_script( 'masonry', '', array( 'js' ), CHILD_THEME_VERSION, true );
// Add inline script.
wp_add_inline_script( 'masonry',
'jQuery( window ).on( "load resize scroll", function() {
jQuery(".content").masonry({
itemSelector: ".entry",
columnWidth: ".entry",
gutter: 30,
});
});'
);
}
add_filter( 'genesis_post_meta', 'business_entry_meta_footer' );
/**
* Customize Entry Meta Filed Under and Tagged Under.
*
* @since 1.0.0
*
* @return string $post_meta Post meta string.
*/
function business_entry_meta_footer() {
$post_meta = get_avatar( get_the_author_meta( 'email' ), 25 );
$post_meta .= '&nbsp; [post_author_posts_link]';
$post_meta = '[post_categories]';
return $post_meta;
}
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_filter( 'genesis_post_info', 'business_post_info_filter' );
add_action( 'genesis_entry_header', 'genesis_post_info', 2 );
/**
* Customize the post info function.
*
* @since 1.0.0
*
* @param string $post_info The default post info string.
* @return string $post_info Post info string.
*/
function business_post_info_filter( $post_info ) {
$post_info = '<i class="fa fa-calendar"></i> [post_date]';
return $post_info;
}
// Reposition the breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_content', 'genesis_do_breadcrumbs' );
// Move pagination outside of masonry.
remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );
add_action( 'genesis_after_content', 'genesis_posts_nav' );
// Run Genesis.
genesis();
+62
View File
@@ -0,0 +1,62 @@
<?php
/**
* Template Name: Service Page
*
* This file adds the service page template to the Business Pro
* theme, it adds some basic schema.org micro data to the site
* inner div and H1 heading.
*
* @package Business Pro
* @link https://seothemes.com/themes/business-pro
* @author Seo Themes
* @copyright Copyright © 2017 Seo Themes
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'genesis_attr_site-inner', 'business_service_site_inner' );
/**
* Filter the site-inner div.
*
* Adds schema.org microdata to the site-inner div to declare
* the contents as a service.
*
* @since 1.0.0
*
* @param array $attr Array of site-inner values.
* @return array
*/
function business_service_site_inner( $attr ) {
$attr['itemscope'] = 'itemscope';
$attr['itemtype'] = 'https://schema.org/Service';
return $attr;
}
add_filter( 'business_hero_title_markup', 'business_service_title' );
/**
* Filter the page title.
*
* Adds the correct schema.org markup for service type heading.
* The type of service being offered, e.g. veterans' benefits,
* emergency relief, etc.
*
* @since 1.0.0
*
* @link http://schema.org/serviceType
* @return string
*/
function business_service_title() {
return '<h1 itemprop="serviceType">';
}
// Run Genesis.
genesis();
+1
View File
File diff suppressed because one or more lines are too long