Initial commit

This commit is contained in:
2018-09-13 20:49:49 +07:00
commit 32875f828d
82 changed files with 44319 additions and 0 deletions
Executable
+25
View File
@@ -0,0 +1,25 @@
{
"always-semicolon": true,
"block-indent": "\t",
"color-case": "lower",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "single",
"remove-empty-rulesets": true,
"rule-delimiter": "\n\n",
"space-after-colon": " ",
"space-after-combinator": " ",
"space-after-opening-brace": "\n",
"space-after-selector-delimiter": "\n",
"space-before-closing-brace": "\n",
"space-before-colon": "",
"space-before-combinator": " ",
"space-before-opening-brace": " ",
"space-before-selector-delimiter": "",
"space-between-declarations": "\n",
"strip-spaces": true,
"unitless-zero": true,
"vendor-prefix-align": true
}
Executable
+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
Executable
+8
View File
@@ -0,0 +1,8 @@
# Ignore OS generated files
.DS_Store
# Ignore node_modules.
node_modules/
# Ignore composer.
vendor/
Executable
+23
View File
@@ -0,0 +1,23 @@
{
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": true,
"eol": "\n",
"end_with_newline": true,
"indent_level": 0,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": true,
"space_in_empty_paren": false,
"jslint_happy": true,
"space_after_anon_function": true,
"brace_style": "collapse",
"unindent_chained_methods": true,
"break_chained_methods": false,
"keep_array_indentation": true,
"unescape_strings": false,
"wrap_line_length": 0,
"e4x": false,
"comma_first": false,
"operator_position": "before-newline"
}
+6
View File
@@ -0,0 +1,6 @@
# Ignore vendor directories.
node_modules/*
vendor/*
# Ignore minified styles.
*.min.css
+318
View File
@@ -0,0 +1,318 @@
'use strict';
module.exports = {
extends: ['stylelint-config-wordpress/scss', 'prettier-stylelint/index.js'],
plugins: 'stylelint-order',
rules: {
'max-line-length': 255,
'declaration-block-no-duplicate-properties': [
true,
{
ignore: ['consecutive-duplicates-with-different-values']
}
],
'order/order': [
'at-variables',
'dollar-variables',
'custom-properties',
'declarations'
],
'order/properties-order': [
'display',
'visibility',
'float',
'clear',
'overflow',
'overflow-x',
'overflow-y',
'-ms-overflow-x',
'-ms-overflow-y',
'clip',
'zoom',
'flex-direction',
'flex-order',
'flex-pack',
'flex-align',
'position',
'z-index',
'top',
'right',
'bottom',
'left',
'-webkit-box-sizing',
'-moz-box-sizing',
'box-sizing',
'width',
'min-width',
'max-width',
'height',
'min-height',
'max-height',
'margin',
'margin-top',
'margin-right',
'margin-bottom',
'margin-left',
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
'border',
'border-width',
'border-style',
'border-color',
'border-top',
'border-top-width',
'border-top-style',
'border-top-color',
'border-right',
'border-right-width',
'border-right-style',
'border-right-color',
'border-bottom',
'border-bottom-width',
'border-bottom-style',
'border-bottom-color',
'border-left',
'border-left-width',
'border-left-style',
'border-left-color',
'-webkit-border-radius',
'-moz-border-radius',
'border-radius',
'-webkit-border-top-left-radius',
'-moz-border-radius-topleft',
'border-top-left-radius',
'-webkit-border-top-right-radius',
'-moz-border-radius-topright',
'border-top-right-radius',
'-webkit-border-bottom-right-radius',
'-moz-border-radius-bottomright',
'border-bottom-right-radius',
'-webkit-border-bottom-left-radius',
'-moz-border-radius-bottomleft',
'border-bottom-left-radius',
'-webkit-border-image',
'-moz-border-image',
'-o-border-image',
'border-image',
'-webkit-border-image-source',
'-moz-border-image-source',
'-o-border-image-source',
'border-image-source',
'-webkit-border-image-slice',
'-moz-border-image-slice',
'-o-border-image-slice',
'border-image-slice',
'-webkit-border-image-width',
'-moz-border-image-width',
'-o-border-image-width',
'border-image-width',
'-webkit-border-image-outset',
'-moz-border-image-outset',
'-o-border-image-outset',
'border-image-outset',
'-webkit-border-image-repeat',
'-moz-border-image-repeat',
'-o-border-image-repeat',
'border-image-repeat',
'table-layout',
'empty-cells',
'caption-side',
'border-spacing',
'border-collapse',
'outline',
'outline-width',
'outline-style',
'outline-color',
'outline-offset',
'opacity',
'filter:progid:DXImageTransform.Microsoft.Alpha(Opacity',
"-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
'-ms-interpolation-mode',
'color',
'background',
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader',
'background-color',
'background-image',
'background-repeat',
'background-attachment',
'background-position',
'background-position-x',
'-ms-background-position-x',
'background-position-y',
'-ms-background-position-y',
'-webkit-background-clip',
'-moz-background-clip',
'background-clip',
'background-origin',
'-webkit-background-size',
'-moz-background-size',
'-o-background-size',
'background-size',
'box-decoration-break',
'-webkit-box-shadow',
'-moz-box-shadow',
'box-shadow',
'filter:progid:DXImageTransform.Microsoft.gradient',
"-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
'text-shadow',
'font',
'font-family',
'src',
'font-size',
'font-weight',
'font-style',
'font-variant',
'font-size-adjust',
'font-stretch',
'font-effect',
'font-emphasize',
'font-emphasize-position',
'font-emphasize-style',
'-webkit-font-smoothing',
'-moz-osx-font-smoothing',
'font-smooth',
'line-height',
'text-align',
'-webkit-text-align-last',
'-moz-text-align-last',
'-ms-text-align-last',
'text-align-last',
'vertical-align',
'white-space',
'text-decoration',
'text-emphasis',
'text-emphasis-color',
'text-emphasis-style',
'text-emphasis-position',
'text-indent',
'-ms-text-justify',
'text-justify',
'letter-spacing',
'word-spacing',
'-ms-writing-mode',
'text-outline',
'text-transform',
'text-wrap',
'text-overflow',
'-ms-text-overflow',
'text-overflow-ellipsis',
'text-overflow-mode',
'-ms-word-wrap',
'word-wrap',
'word-break',
'-ms-word-break',
'-moz-tab-size',
'-o-tab-size',
'tab-size',
'-webkit-hyphens',
'-moz-hyphens',
'hyphens',
'list-style',
'list-style-position',
'list-style-type',
'list-style-image',
'content',
'quotes',
'counter-reset',
'counter-increment',
'resize',
'cursor',
'-webkit-user-select',
'-moz-user-select',
'-ms-user-select',
'user-select',
'nav-index',
'nav-up',
'nav-right',
'nav-down',
'nav-left',
'-webkit-transition',
'-moz-transition',
'-ms-transition',
'-o-transition',
'transition',
'-webkit-transition-delay',
'-moz-transition-delay',
'-ms-transition-delay',
'-o-transition-delay',
'transition-delay',
'-webkit-transition-timing-function',
'-moz-transition-timing-function',
'-ms-transition-timing-function',
'-o-transition-timing-function',
'transition-timing-function',
'-webkit-transition-duration',
'-moz-transition-duration',
'-ms-transition-duration',
'-o-transition-duration',
'transition-duration',
'-webkit-transition-property',
'-moz-transition-property',
'-ms-transition-property',
'-o-transition-property',
'transition-property',
'-webkit-transform',
'-moz-transform',
'-ms-transform',
'-o-transform',
'transform',
'-webkit-transform-origin',
'-moz-transform-origin',
'-ms-transform-origin',
'-o-transform-origin',
'transform-origin',
'-webkit-animation',
'-moz-animation',
'-ms-animation',
'-o-animation',
'animation',
'-webkit-animation-name',
'-moz-animation-name',
'-ms-animation-name',
'-o-animation-name',
'animation-name',
'-webkit-animation-duration',
'-moz-animation-duration',
'-ms-animation-duration',
'-o-animation-duration',
'animation-duration',
'-webkit-animation-play-state',
'-moz-animation-play-state',
'-ms-animation-play-state',
'-o-animation-play-state',
'animation-play-state',
'-webkit-animation-timing-function',
'-moz-animation-timing-function',
'-ms-animation-timing-function',
'-o-animation-timing-function',
'animation-timing-function',
'-webkit-animation-delay',
'-moz-animation-delay',
'-ms-animation-delay',
'-o-animation-delay',
'animation-delay',
'-webkit-animation-iteration-count',
'-moz-animation-iteration-count',
'-ms-animation-iteration-count',
'-o-animation-iteration-count',
'animation-iteration-count',
'-webkit-animation-direction',
'-moz-animation-direction',
'-ms-animation-direction',
'-o-animation-direction',
'animation-direction',
'-webkit-backface-visibility',
'-moz-backface-visibility',
'backface-visibility',
'text-rendering',
'pointer-events'
]
}
};
Executable
+63
View File
@@ -0,0 +1,63 @@
# Corporate Pro Theme Changelog
## [1.0.1] - 2018-06-23
* Add support for non-slider hero
* Add alt-text to category and tag icons
* Add stylelint
* Fix color contrast of links
* Fix button text color in footer
* Fix CSS conflict with Slick Slider and Elementor plugin
* Fix front page widget area descriptions
* Fix view cart link alignment
## [1.0.0] - 2018-04-18
* Add support for Genesis Title Toggle plugin
* Add option to disable search form in primary nav
* Add missing hidden files
* Add support for search and 404 pages excerpt and featured images
* Add custom class for front page 4 image
* Add some spacing between footer widgets
* Add page layouts for search & 404. Also clean up hero markup
* Update sample content
* Update docblock @since tags
* Update readme
* Update customizer color settings
* Fix SSI inline styles undefined index when inactive
* Fix footer widget .button color
* Fix squished articles in sidebar on archives.
* Fix all PHPCS warnings in colors.php
* Fix translation warnings and rename theme.php to general.php
* Fix front page 3 icon widget alignment
* Standards: minor fixes
* Comment formatting
* Switch to genesis widget column classes plugin
* Rename page header to hero section same as studiopress themes
* Fix woocommerce products per row styling
* Simplify blog template styling
* Styling adjustments
* Adjust hero section padding
* Correct logo size css output
* Accessibility improvements - contrast and skip links
* Standards: minor fixes
* Increase screenshot size to 1200 x 900
* Only add hero section itemref on singular entries
* Improve contrast of links in footer to match sidebar
* Refactor constants
* Replace functions with constants for performance
* Remove transparent header setting
* Remove 404 page
* Remove `.` from style.css tags
## [0.1.2] - 2018-01-20
* Added fallback in case SEO Slider is not active
## [0.1.1] - 2017-12-21
* Added theme settings JSON file
* Updated demo content and theme screenshot
* Fixed before header on boxed template
* Fixed front-page-2 minimum slider width
* Fixed sticky header class not being applied
* Removed entry border when no search results
## [0.1.0] - 2017-12-20
* Initial beta release
Executable
+77
View File
@@ -0,0 +1,77 @@
/**
* Gulp task config file.
*
* @package SEOThemes\GenesisStarter
*/
'use strict';
var gulp = require( 'gulp' ),
toolkit = require( 'gulp-wp-toolkit' ),
pkg = require( './package.json' );
toolkit.extendConfig(
{
theme: {
name: pkg.theme.name,
themeuri: pkg.theme.uri,
description: pkg.description,
author: pkg.author,
authoruri: pkg.theme.authoruri,
version: pkg.version,
license: pkg.license,
licenseuri: pkg.theme.licenseuri,
tags: pkg.theme.tags,
textdomain: pkg.theme.textdomain,
domainpath: pkg.theme.domainpath,
template: pkg.theme.template,
notes: pkg.theme.notes
},
src: {
php: ['**/*.php', '!vendor/**'],
images: 'assets/images/**/*',
scss: 'assets/styles/*.scss',
css: ['**/*.css', '!node_modules/**', '!develop/vendor/**'],
js: ['assets/scripts/*.js', '!node_modules/**'],
json: ['**/*.json', '!node_modules/**'],
i18n: 'lib/languages/'
},
css: {
basefontsize: 10, // Used by postcss-pxtorem.
remmediaquery: false,
scss: {
'style': {
src: 'assets/styles/style.scss',
dest: './',
outputStyle: 'expanded'
},
'woocommerce': {
src: 'assets/styles/woocommerce.scss',
dest: './',
outputStyle: 'expanded'
}
}
},
js: {
'theme': [
'assets/scripts/theme.js',
],
},
dest: {
i18npo: './lib/languages/',
i18nmo: './lib/languages/',
images: './assets/images/',
js: './assets/scripts/min/'
},
server: {
proxy: 'https://yeuchaybo.test',
port: '8000',
https: {
'key': '/Users/thuanbui/.valet/Certificates/yeuchaybo.test.key',
'cert': '/Users/thuanbui/.valet/Certificates/yeuchaybo.test.crt'
}
}
}
);
toolkit.extendTasks( gulp );
Executable
+264
View File
@@ -0,0 +1,264 @@
The GNU General Public License, Version 2, June 1991 (GPLv2)
============================================================
> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
--------
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to most
of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you can
do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a
fee, you must give the recipients all the rights that you have. You must make
sure that they, too, receive or can get the source code. And you must show them
these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer
you this license which gives you legal permission to copy, distribute and/or
modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced by
others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish
to avoid the danger that redistributors of a free program will individually
obtain patent licenses, in effect making the program proprietary. To prevent
this, we have made it clear that any patent must be licensed for everyone's free
use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
Terms And Conditions For Copying, Distribution And Modification
---------------------------------------------------------------
**0.** This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of
this General Public License. The "Program", below, refers to any such program or
work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included without
limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by
this License; they are outside its scope. The act of running the Program is not
restricted, and the output from the Program is covered only if its contents
constitute a work based on the Program (independent of having been made by
running the Program). Whether that is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's source code
as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License
and to the absence of any warranty; and give any other recipients of the Program
a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at
your option offer warranty protection in exchange for a fee.
**2.** You may modify your copy or copies of the Program or any portion of it,
thus forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you also
meet all of these conditions:
* **a)** You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
* **b)** You must cause any work that you distribute or publish, that in whole
or in part contains or is derived from the Program or any part thereof, to
be licensed as a whole at no charge to all third parties under the terms of
this License.
* **c)** If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License, and
its terms, do not apply to those sections when you distribute them as separate
works. But when you distribute the same sections as part of a whole which is a
work based on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the entire whole,
and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on the
Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
**3.** You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1 and 2
above provided that you also do one of the following:
* **a)** Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above on
a medium customarily used for software interchange; or,
* **b)** Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
* **c)** Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only for
noncommercial distribution and only if you received the program in object
code or executable form with such an offer, in accord with Subsection b
above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all the
source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation
of the executable. However, as a special exception, the source code distributed
need not include anything that is normally distributed (in either source or
binary form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component itself
accompanies the executable.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source code
from the same place counts as distribution of the source code, even though third
parties are not compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so
long as such parties remain in full compliance.
**5.** You are not required to accept this License, since you have not signed
it. However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you do
not accept this License. Therefore, by modifying or distributing the Program (or
any work based on the Program), you indicate your acceptance of this License to
do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these terms and
conditions. You may not impose any further restrictions on the recipients'
exercise of the rights granted herein. You are not responsible for enforcing
compliance by third parties to this License.
**7.** If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), conditions
are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the
conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution of
the Program by all those who receive copies directly or indirectly through you,
then the only way you could satisfy both it and this License would be to refrain
entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and the
section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or
other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software
distribution system, which is implemented by public license practices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original copyright
holder who places the Program under this License may add an explicit
geographical distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus excluded. In such
case, this License incorporates the limitation as if written in the body of this
License.
**9.** The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program specifies
a version number of this License which applies to it and "any later version",
you have the option of following the terms and conditions either of that version
or of any later version published by the Free Software Foundation. If the
Program does not specify a version number of this License, you may choose any
version ever published by the Free Software Foundation.
**10.** If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this.
Our decision will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing and reuse of
software generally.
No Warranty
-----------
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Executable
+259
View File
@@ -0,0 +1,259 @@
# Yeu Chay Bo Theme
A feature packed, clean and professional Genesis child theme with built in support for Gutenberg, AMP and more.. Demo - [https://demo.seothemes.com/corporate-pro](https://demo.seothemes.com/corporate-pro)
## Features
#### Gutenberg Support
Built in support for the new WordPress editor which allows you to utilize all of the latest features.
#### AMP Ready
Easily setup Accelerated Mobile Pages to make your website lightning fast on mobile devices.
#### One Click Demo Import
Setup your theme just like how you see it in the demo in less than 5 minutes
#### Custom Colors
Yeu Chay Bo provides custom color settings with transparency options giving you even more control over your theme's colors
#### SEO Slider
We built an entirely new plugin for this theme because all the other slider plugins weren't SEO friendly enough
#### WooCommerce
Fully integrated with the world's most popular WordPress eCommerce plugin WooCommerce
#### Genesis Simple FAQ
Easily add frequently asked questions with the Genesis Simple FAQs plugin
#### Transparent Header
Change the look of the site-header from the Customizer. Choose from either transparent or default
#### Sticky Header
Enable a sticky header that stays in the viewport on scroll from the Customizer
#### Accessibility
Accessibility friendly content that can be navigated with ease using the keyboard
#### Templates & Layouts
Custom page templates and layouts provide plenty of options for displaying your content
#### Portfolio
Showcase your projects in style using the Display Posts Shortcode
## Recommendations
* PHP > 7.0
* WordPress > 4.8
* Genesis Framework > 2.4
* Node.js > 6.9
* Gulp.js > 3.9
## Installation
1. Upload and install Genesis
2. Upload, install and activate Yeu Chay Bo
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
## Renaming
The following instructions require the use of a text editor with search and replace functionality. You will need to perform a search and replace on all files in the theme folder. If using NPM, the theme should be renamed before running `npm install`. You do not want to edit any files in the `node_modules` directory.
1. Search and replace `corporate-pro` with your theme text domain.
2. Search and replace `corporate_` with your theme function prefix.
3. Search and replace `Yeu Chay Bo` with your theme name.
You can also use the Gulp [rename](#additional-commands) task included with the theme.
## 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
* After Entry
* Before Header
* Before Footer
* Front page (default 9)
* Footer (default 4)
## Structure
```shell
theme/
├── assets/
│ ├── fonts/
│ ├── images/
│ ├── scripts/
│ │ ├── min/
│ │ │ ├── customize.min.js
│ │ │ ├── menus.min.js
│ │ │ └── theme.min.js
│ │ ├── customize.js
│ │ ├── menus.js
│ │ └── theme.js
│ └── styles/
│ │ │ ├── customize.min.css
│ │ │ ├── style.min.css
│ │ │ ├── style.min.css.map
│ │ │ └── woocommerce.min.css
│ │ ├── _common.scss
│ │ ├── _content.scss
│ │ ├── _defaults.scss
│ │ ├── _footer.scss
│ │ ├── _header.scss
│ │ ├── _home.scss
│ │ ├── _layout.scss
│ │ ├── _menus.scss
│ │ ├── _plugins.scss
│ │ ├── _print.scss
│ │ ├── _reset.scss
│ │ ├── _sidebars.scss
│ │ ├── _utilities.scss
│ │ ├── style.scss
│ │ └── woocommerce.scss
├── includes/
│ ├── colors.php
│ ├── customize.php
│ ├── defaults.php
│ ├── general.php
│ ├── helpers.php
│ ├── hero.php
│ ├── plugins.php
│ ├── rgba.php
│ └── widgets.php
├── languages/
│ └── corporate-pro.pot
├── templates/
│ ├── page-boxed.php
│ ├── page-builder.php
│ ├── page-contact.php
│ └── page-landing.php
├── .csscomb.json
├── .editorconfig
├── .gitignore
├── .jsbeautifyrc
├── 404.php
├── CHANGELOG.md
├── customizer.dat
├── front-page.php
├── functions.php
├── gulpfile.js
├── LICENSE.md
├── map.json
├── package-lock.json
├── package.json
├── README.md
├── sample.xml
├── screenshot.png
├── settings.json
├── style.css
└── widgets.wie
```
## Development
Yeu Chay Bo 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 translate` — Scan the theme and create `corporate-pro.pot` POT file.
* `gulp zip` — Package theme into zip file for distribution, ignoring `node_modules`.
* `gulp bump` - Bumps version number in all files. See options in example below.
- `--major` version when you make incompatible API changes
- `--minor` version when you add functionality in a backwards-compatible manner
- `--patch` version when you make backwards-compatible bug fixes
- `--to` allows you to define a custom version number, e.g. `gulp bump --to 0.1.0`
* `gulp rename` - Rename theme Title, Text Domain and Function Prefix.
- `--to` name for your theme e.g: `gulp rename --to your-theme-name`
### Using Browsersync
To use Browsersync you need to update the proxy URL in `gulpfile.js` to reflect your local development hostname.
If your local development URL is `my-site.dev`, update the file to read:
```javascript
...
proxy: 'my-site.dev',
...
```
By default, BrowserSync is configured to use an SSL certificate for local development. If using a Non-HTTPS local site, remove the HTTPS BrowserSync configuration and uncomment the HTTP settings.
## Support
Please visit https://seothemes.com/support/ for theme support.
## Customizations
Please visit https://seothemes.com/custom-development/ for theme customizations.
## Authors
- **Lee Anthony** - [SEO Themes](https://seothemes.com/)
See also the list of [contributors](https://github.com/seothemes/corporate-pro/graphs/contributors) who participated in this project.
## License
This project is licensed under the GNU General Public License - see the LICENSE.md file for details.
## Acknowledgments
A shout out to anyone who's code was used:
- Gary Jones
- Tim Jensen
- Craig Watson
- Bill Erickson
- Sridhar Katakam
- Chinmoy Paul
- Nathan Rice
- Calvin Koepke
- Jen Baumann
- Brian Gardner
- Robin Cornett
View File
+9
View File
@@ -0,0 +1,9 @@
<?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 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#30353F;stroke-width:36;stroke-linecap:round;stroke-linejoin:round;}
</style>
<polyline class="st0" points="285.75,371.5 114.25,200 285.75,28.5 "/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

+9
View File
@@ -0,0 +1,9 @@
<?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 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#FFFFFF;stroke-width:36;stroke-linecap:round;stroke-linejoin:round;}
</style>
<polyline class="st0" points="285.75,371.5 114.25,200 285.75,28.5 "/>
</svg>

After

Width:  |  Height:  |  Size: 560 B

+14
View File
@@ -0,0 +1,14 @@
<?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 120 120" style="enable-background:new 0 0 120 120;" xml:space="preserve">
<style type="text/css">
.st0{fill:#6C7E92;}
</style>
<g>
<path class="st0" d="M16.46,94.43V91.3V28.8v-3.12h3.12h28.12h1.17l1.17,0.78l5.27,5.47h36.13h3.12v3.13v15.62h4.69h3.91
l-0.78,3.91l-7.81,37.5L94,94.43h-2.54H19.58H16.46z M23.49,88.18h65.43l6.45-31.25h-3.91h-3.12h-25.2l-5.27,5.47l-1.17,0.78h-1.17
H29.74L23.49,88.18z M22.71,65.91l1.56-6.64l0.78-2.34h2.34h26.76l5.27-5.47l1.17-0.78h1.17h26.56v-12.5H53.96h-1.17l-1.17-0.78
l-5.27-5.47H22.71V65.91z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 837 B

+12
View File
@@ -0,0 +1,12 @@
<?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 1006 1010" style="enable-background:new 0 0 1006 1010;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M602.58,504l362.04-362.04c26.95-26.95,26.95-70.63,0-97.58v0c-26.95-26.95-70.63-26.95-97.58,0L505,406.42
L142.96,44.38c-26.95-26.95-70.63-26.95-97.58,0v0c-26.95,26.95-26.95,70.63,0,97.58L407.42,504L45.38,866.04
c-26.95,26.95-26.95,70.63,0,97.58v0c26.95,26.95,70.63,26.95,97.58,0L505,601.58l362.04,362.04c26.95,26.95,70.63,26.95,97.58,0v0
c26.95-26.95,26.95-70.63,0-97.58L602.58,504z"/>
</svg>

After

Width:  |  Height:  |  Size: 835 B

+12
View File
@@ -0,0 +1,12 @@
<?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 1006 1010" style="enable-background:new 0 0 1006 1010;" xml:space="preserve">
<style type="text/css">
.st0{fill:#30353F;}
</style>
<path class="st0" d="M602.58,504l362.04-362.04c26.95-26.95,26.95-70.63,0-97.58v0c-26.95-26.95-70.63-26.95-97.58,0L505,406.42
L142.96,44.38c-26.95-26.95-70.63-26.95-97.58,0v0c-26.95,26.95-26.95,70.63,0,97.58L407.42,504L45.38,866.04
c-26.95,26.95-26.95,70.63,0,97.58v0c26.95,26.95,70.63,26.95,97.58,0L505,601.58l362.04,362.04c26.95,26.95,70.63,26.95,97.58,0v0
c26.95-26.95,26.95-70.63,0-97.58L602.58,504z"/>
</svg>

After

Width:  |  Height:  |  Size: 835 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+12
View File
@@ -0,0 +1,12 @@
<?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 80 78" style="enable-background:new 0 0 80 78;" xml:space="preserve">
<style type="text/css">
.st0{fill:#30353F;}
</style>
<path class="st0" d="M75.24,6L64.96,67.71c-0.12,0.76-0.6,1.41-1.29,1.81c-0.36,0.2-0.8,0.32-1.25,0.32c-0.32,0-0.64-0.08-0.96-0.2
l-18.2-7.43l-9.72,11.85c-0.48,0.6-1.21,0.92-1.97,0.92c-0.28,0-0.6-0.04-0.88-0.16c-1-0.36-1.69-1.33-1.69-2.41V58.39l34.71-42.55
L20.76,53L4.89,46.49c-0.92-0.36-1.53-1.21-1.61-2.21c-0.04-0.96,0.44-1.89,1.29-2.37L71.43,3.34c0.4-0.24,0.84-0.36,1.29-0.36
c0.52,0,1.04,0.16,1.45,0.44C75,4.03,75.4,4.99,75.24,6z"/>
</svg>

After

Width:  |  Height:  |  Size: 857 B

+12
View File
@@ -0,0 +1,12 @@
<?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 1006 1010" style="enable-background:new 0 0 1006 1010;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="M978.26,879.68L740.01,641.43c109.84-156.08,94.98-373.13-44.59-512.7c-156.21-156.21-409.48-156.21-565.69,0
c-156.21,156.21-156.21,409.48,0,565.69c139.57,139.57,356.62,154.43,512.7,44.59l238.25,238.25c26.83,26.83,70.75,26.83,97.58,0
l0,0C1005.1,950.43,1005.1,906.52,978.26,879.68z M200.45,623.71c-117.16-117.16-117.16-307.11,0-424.26
c117.16-117.16,307.11-117.16,424.26,0s117.16,307.11,0,424.26v0c0,0,0,0,0,0C507.55,740.87,317.6,740.87,200.45,623.71z"/>
</svg>

After

Width:  |  Height:  |  Size: 902 B

+12
View File
@@ -0,0 +1,12 @@
<?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 1006 1010" style="enable-background:new 0 0 1006 1010;" xml:space="preserve">
<style type="text/css">
.st0{fill:#30353F;}
</style>
<path class="st0" d="M978.26,879.68L740.01,641.43c109.84-156.08,94.98-373.13-44.59-512.7c-156.21-156.21-409.48-156.21-565.69,0
c-156.21,156.21-156.21,409.48,0,565.69c139.57,139.57,356.62,154.43,512.7,44.59l238.25,238.25c26.83,26.83,70.75,26.83,97.58,0
l0,0C1005.1,950.43,1005.1,906.52,978.26,879.68z M200.45,623.71c-117.16-117.16-117.16-307.11,0-424.26
c117.16-117.16,307.11-117.16,424.26,0s117.16,307.11,0,424.26v0c0,0,0,0,0,0C507.55,740.87,317.6,740.87,200.45,623.71z"/>
</svg>

After

Width:  |  Height:  |  Size: 902 B

+15
View File
@@ -0,0 +1,15 @@
<?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 120 120" style="enable-background:new 0 0 120 120;" xml:space="preserve">
<style type="text/css">
.st0{fill:#6C7E92;}
</style>
<g>
<path class="st0" d="M52.52,20.82h1.17h28.12h3.12v3.12v28.13v1.17l-0.78,1.17L49.78,88.79l-2.34,1.95l-2.34-1.95L16.97,60.66
l-1.95-2.34l1.95-2.34L51.35,21.6L52.52,20.82z M55.06,27.07L23.81,58.32l23.63,23.63L78.69,50.7V27.07H55.06z M88.07,30.19h6.25
h3.12v3.13v30.08v1.17l-0.78,0.98L63.65,98.16l-2.15,1.95l-2.34-1.95l-5.86-6.25l4.3-4.3l3.91,3.91l29.69-29.69V36.44h-3.12V30.19z
M67.07,34.2c0.59-0.59,1.33-0.88,2.25-0.88c0.91,0,1.66,0.29,2.25,0.88s0.88,1.34,0.88,2.25c0,0.91-0.29,1.66-0.88,2.25
s-1.34,0.88-2.25,0.88c-0.91,0-1.66-0.29-2.25-0.88s-0.88-1.33-0.88-2.25C66.19,35.53,66.48,34.78,67.07,34.2z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+300
View File
@@ -0,0 +1,300 @@
/**
* 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 );
});
});
});
/**
* Sortable widget areas.
*/
jQuery( document ).ready( function($) {
/* Make it sortable. */
$( 'ul.my-multicheck-sortable-list' ).sortable({
handle: '.dashicons-menu',
axis: 'y',
update: function( e, ui ){
$('.my-multicheck-sortable-list input').trigger( 'change' );
}
});
/* On changing the value. */
$( "ul.my-multicheck-sortable-list li input" ).on( 'change', function(){
/* Get the value, and convert to string. */
this_checkboxes_values = $( this ).parents( 'ul.my-multicheck-sortable-list' ).find( 'li input' ).map( function(){
var active = '0';
if( $(this).prop("checked") ){
var active = '1';
}
return this.name + ':' + active;
}).get().join( ',' );
/* Add the value to hidden input. */
$( this ).parents( 'ul.my-multicheck-sortable-list' ).find( 'input[type="hidden"]' ).val( this_checkboxes_values ).trigger( 'change' );
});
});
+414
View File
@@ -0,0 +1,414 @@
/**
* 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';
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
} )
.append( genesisMenuParams.mainMenu )
.append( $( '<span />' ) ),
submenu : $( '<button />', {
'class' : subMenuButtonClass,
'aria-expanded' : false,
'aria-pressed' : false
} )
.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' ).slideToggle( 'fast' );
$this.next( 'nav' ).toggleClass( 'activated' );
}
/**
* 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': 100,
'animation': {'opacity': 'show', 'height': 'show'},
'dropShadows': false,
'speed': 'fast'
};
}
_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 acp_get_alpha_value_from_color(a){var t;return(a=a.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(t=100*parseFloat(a.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),t=parseInt(t)):t=100,t}function acp_update_alpha_value_on_color_control(a,t,e,l){var o,i,r;o=t.data("a8cIris"),i=t.data("wpWpColorPicker"),o._color._alpha=a,r=o._color.toString(),t.val(r),i.toggler.css({"background-color":r}),l&&acp_update_alpha_value_on_alpha_slider(a,e),t.wpColorPicker("color",r)}function acp_update_alpha_value_on_alpha_slider(a,t){t.slider("value",a),t.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 t=parseInt(this._color,10).toString(16);if(this.error)return"";if(t.length<6)for(var e=6-t.length-1;e>=0;e--)t="0"+t;return"#"+t},jQuery(document).ready(function(a){a(".alpha-color-control").each(function(){var t,e,l,o,i,r,c,n,p;t=a(this),e=t.val().replace(/\s+/g,""),l=t.attr("data-palette"),o=t.attr("data-show-opacity"),i=t.attr("data-default-color"),r={change:function(a,e){var l,o,r;l=t.attr("data-customize-setting-link"),o=t.wpColorPicker("color"),i==o&&(r=acp_get_alpha_value_from_color(o),n.find(".ui-slider-handle").text(r)),wp.customize(l,function(a){a.set(o)}),c.find(".transparency").css("background-color",e.color.toString("no-alpha"))},palettes:-1!==l.indexOf("|")?l.split("|"):"false"!=l},t.wpColorPicker(r),c=t.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(t,l){var o=a(this).slider("value");a(this).find(".ui-slider-handle").text(o),a(this).siblings(".transparency ").css("background-color",e)},value:acp_get_alpha_value_from_color(e),range:"max",step:1,min:0,max:100,animate:300},n.slider(p),"true"==o&&n.find(".ui-slider-handle").addClass("show-opacity"),c.find(".min-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(0,t,n,!0)}),c.find(".max-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(100,t,n,!0)}),c.find(".iris-palette").on("click",function(){var e,l;acp_update_alpha_value_on_alpha_slider(l=acp_get_alpha_value_from_color(e=a(this).css("background-color")),n),100!=l&&(e=e.replace(/[^,]+(?=\))/,(l/100).toFixed(2))),t.wpColorPicker("color",e)}),c.find(".button.wp-picker-clear").on("click",function(){var a=t.attr("data-customize-setting-link");t.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(i),n)}),t.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(e,l){acp_update_alpha_value_on_color_control(parseFloat(l.value)/100,t,n,!1),a(this).find(".ui-slider-handle").text(l.value)})})}),jQuery(document).ready(function(a){a("ul.my-multicheck-sortable-list").sortable({handle:".dashicons-menu",axis:"y",update:function(t,e){a(".my-multicheck-sortable-list input").trigger("change")}}),a("ul.my-multicheck-sortable-list li input").on("change",function(){this_checkboxes_values=a(this).parents("ul.my-multicheck-sortable-list").find("li input").map(function(){t="0";if(a(this).prop("checked"))var t="1";return this.name+":"+t}).get().join(","),a(this).parents("ul.my-multicheck-sortable-list").find('input[type="hidden"]').val(this_checkboxes_values).trigger("change")})});
+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),c(e),d(e),o(e))}function u(){var e=n(this),s=e.next("nav");e.attr("id","genesis-mobile-"+n(s).attr("class").match(/nav-\w*\b/))}function o(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").toggleClass("activated")}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 c(e){var s=n("."+k+" .js-superfish"),a="destroy";"function"==typeof s.superfish&&("none"===p(e)&&(a={delay:100,animation:{opacity:"show",height:"show"},dropShadows:!1,speed:"fast"}),s.superfish(a))}function d(e){var s=g();!n(s).length>0||n.each(s,function(s,a){var t=a.replace(".",""),i="genesis-"+t,u="genesis-mobile-"+t;"none"==p(e)&&(i="genesis-mobile-"+t,u="genesis-"+t);var o=n('.genesis-skip-link a[href="#'+i+'"]');if(null!==y&&a!==y[0]&&o.toggleClass("skip-link-hidden"),o.length>0){var r=o.attr("href");r=r.replace(i,u),o.attr("href",r)}})}function f(e){if("none"!==p(e))return!0;n("."+x+", ."+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}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 w={},x="menu-toggle",M="sub-menu-toggle",k="genesis-responsive-menu";w.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",o={menu:n("<button />",{class:x,"aria-expanded":!1,"aria-pressed":!1}).append(v.mainMenu).append(n("<span />")),submenu:n("<button />",{class:M,"aria-expanded":!1,"aria-pressed":!1}).append(n("<span />",{class:"screen-reader-text",text:v.subMenu}))};t(),a(o),n("."+x).addClass(e),n("."+M).addClass(s),n("."+x).on("click.genesisMenu-mainbutton",r).each(u),n("."+M).on("click.genesisMenu-subbutton",l),n(window).on("resize.genesisMenu",i).triggerHandler("resize.genesisMenu")}},n(e).ready(function(){null!==g()&&w.init()})}(document,jQuery);
+1
View File
@@ -0,0 +1 @@
!function(n,e,s){function o(n,e){return typeof n===e}var a=[],t=[],i={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,e){var s=this;setTimeout(function(){e(s[n])},0)},addTest:function(n,e,s){t.push({name:n,fn:e,options:s})},addAsyncTest:function(n){t.push({name:null,fn:n})}},l=function(){};l.prototype=i,l=new l;var f=e.documentElement,r="svg"===f.nodeName.toLowerCase();(function(){var n,e,s,i,f,r,c;for(var u in t)if(t.hasOwnProperty(u)){if(n=[],(e=t[u]).name&&(n.push(e.name.toLowerCase()),e.options&&e.options.aliases&&e.options.aliases.length))for(s=0;s<e.options.aliases.length;s++)n.push(e.options.aliases[s].toLowerCase());for(i=o(e.fn,"function")?e.fn():e.fn,f=0;f<n.length;f++)r=n[f],1===(c=r.split(".")).length?l[c[0]]=i:(!l[c[0]]||l[c[0]]instanceof Boolean||(l[c[0]]=new Boolean(l[c[0]])),l[c[0]][c[1]]=i),a.push((i?"":"no-")+c.join("-"))}})(),function(n){var e=f.className,s=l._config.classPrefix||"";if(r&&(e=e.baseVal),l._config.enableJSClass){var o=new RegExp("(^|\\s)"+s+"no-js(\\s|$)");e=e.replace(o,"$1"+s+"js$2")}l._config.enableClasses&&(e+=" "+s+n.join(" "+s),r?f.className.baseVal=e:f.className=e)}(a),delete i.addTest,delete i.addAsyncTest;for(var c=0;c<l._q.length;c++)l._q[c]();n.Modernizr=l}(window,document),jQuery(document).ready(function(n){Modernizr.objectfit||n(".slick-slide").each(function(){var e=n(this),s=e.find("img").prop("src");s&&e.css("backgroundImage","url("+s+")").addClass("no-object-fit")})});
+1
View File
File diff suppressed because one or more lines are too long
+158
View File
@@ -0,0 +1,158 @@
/**
* Add any custom theme JavaScript to this file.
*/
( function ( document, $ ) {
/**
* Add shrink class to header on scroll.
*/
$( window ).scroll( function () {
var scroll = $( window ).scrollTop();
var height = $( '.hero-section' ).outerHeight();
var header = $( '.before-header' ).outerHeight();
var siteheader = $( '.site-header' ).outerHeight();
if ( scroll >= 1 ) {
$( '.site-header' ).addClass( 'shrink' );
$('.bumper').removeClass('hidden');
} else {
$( '.site-header' ).removeClass( 'shrink' );
$('.bumper').addClass('hidden');
}
} );
$(".site-header").after('<div class="bumper hidden"></div>');
/*
* Search form toggle.
*/
$( '.site-header .search-form' ).append( '<a href="javascript:document.getElementsByName(\"s\").focus()" class="search-toggle"></a>' );
$( '.site-header .search-toggle' ).on( 'click', function () {
$( this ).toggleClass( 'active' );
$( '.nav-primary .menu-item' ).fadeToggle();
$( '.site-header .search-form input[type="search"]' ).fadeToggle();
} );
/*
* Send icon button enews footer.
*/
$( '.site-footer .enews form' ).append( '<span class="send-icon"></span>' );
/*
* Move before header into nav on mobile.
*/
$( window ).on( "resize", function () {
if ( $( window ).width() < 896 ) {
$( '.before-header' ).appendTo( '.nav-primary .menu' );
} else {
$( '.before-header' ).prependTo( '.site-header' );
$( '.nav-primary .menu .before-header' ).remove();
}
} ).resize();
/*
* Object fit fallback
*/
jQuery( document ).ready( function ( $ ) {
if ( !Modernizr.objectfit ) {
$( '.front-page-9' ).each( function () {
var $container = $( this ),
imgUrl = $container.find( 'img' ).prop( 'src' );
if ( imgUrl ) {
$container.css( 'backgroundImage', 'url(' + imgUrl + ')' ).addClass( 'no-object-fit' );
}
$container.find( 'img' ).css( 'display', 'none' );
} );
}
} );
/*
* Logo slider.
*/
jQuery( document ).ready( function ( $ ) {
$( '.front-page-2 .gallery' ).slick( {
dots: false,
infinite: true,
speed: 1000,
arrows: false,
autoplay: true,
autoplaySpeed: 5000,
fade: false,
slidesToShow: 2,
slidesToScroll: 1,
mobileFirst: true,
responsive: [ {
breakpoint: 384,
settings: {
slidesToShow: 3,
}
}, {
breakpoint: 768,
settings: {
slidesToShow: 4,
}
}, {
breakpoint: 896,
settings: {
slidesToShow: 5,
}
}, {
breakpoint: 1152,
settings: {
slidesToShow: 6,
}
} ]
} )
} );
/**
* 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();
// Checking if the target was focused
if ( $target.is( ":focus" ) ) {
return false;
} else {
// Adding tabindex for elements not focusable
$target.attr( 'tabindex', '-1' );
// Set focus again
$target.focus();
};
} );
}
}
} );
} )( document, jQuery );
+1
View File
@@ -0,0 +1 @@
!function(e,o){o(window).scroll(function(){var e=o(window).scrollTop();o(".hero-section").outerHeight(),o(".before-header").outerHeight(),o(".site-header").outerHeight();1<=e?(o(".site-header").addClass("shrink"),o(".bumper").removeClass("hidden")):(o(".site-header").removeClass("shrink"),o(".bumper").addClass("hidden"))}),o(".site-header").after('<div class="bumper hidden"></div>'),o(".site-header .search-form").append('<a href="javascript:document.getElementsByName("s").focus()" class="search-toggle"></a>'),o(".site-header .search-toggle").on("click",function(){o(this).toggleClass("active"),o(".nav-primary .menu-item").fadeToggle(),o('.site-header .search-form input[type="search"]').fadeToggle()}),o(".site-footer .enews form").append('<span class="send-icon"></span>'),o(window).on("resize",function(){o(window).width()<896?o(".before-header").appendTo(".nav-primary .menu"):(o(".before-header").prependTo(".site-header"),o(".nav-primary .menu .before-header").remove())}).resize(),jQuery(e).ready(function(o){Modernizr.objectfit||o(".front-page-9").each(function(){var e=o(this),s=e.find("img").prop("src");s&&e.css("backgroundImage","url("+s+")").addClass("no-object-fit"),e.find("img").css("display","none")})}),jQuery(e).ready(function(e){e(".front-page-2 .gallery").slick({dots:!1,infinite:!0,speed:1e3,arrows:!1,autoplay:!0,autoplaySpeed:5e3,fade:!1,slidesToShow:2,slidesToScroll:1,mobileFirst:!0,responsive:[{breakpoint:384,settings:{slidesToShow:3}},{breakpoint:768,settings:{slidesToShow:4}},{breakpoint:896,settings:{slidesToShow:5}},{breakpoint:1152,settings:{slidesToShow:6}}]})}),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 s=o(this.hash);(s=s.length?s:o("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),o("html, body").animate({scrollTop:s.offset().top},1e3,function(){var e=o(s);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}})}(document,jQuery);
+80
View File
@@ -0,0 +1,80 @@
/*! modernizr 3.5.0 (Custom Build) | MIT *
* https://modernizr.com/download/?-setclasses !*/
! function (n, e, s) {
function o(n, e) {
return typeof n === e
}
function a() {
var n, e, s, a, i, l, r;
for (var c in f)
if (f.hasOwnProperty(c)) {
if (n = [], e = f[c], e.name && (n.push(e.name.toLowerCase()), e.options && e.options.aliases && e.options.aliases.length))
for (s = 0; s < e.options.aliases.length; s++) n.push(e.options.aliases[s].toLowerCase());
for (a = o(e.fn, "function") ? e.fn() : e.fn, i = 0; i < n.length; i++) l = n[i], r = l.split("."), 1 === r.length ? Modernizr[r[0]] = a : (!Modernizr[r[0]] || Modernizr[r[0]] instanceof Boolean || (Modernizr[r[0]] = new Boolean(Modernizr[r[0]])), Modernizr[r[0]][r[1]] = a), t.push((a ? "" : "no-") + r.join("-"))
}
}
function i(n) {
var e = r.className,
s = Modernizr._config.classPrefix || "";
if (c && (e = e.baseVal), Modernizr._config.enableJSClass) {
var o = new RegExp("(^|\\s)" + s + "no-js(\\s|$)");
e = e.replace(o, "$1" + s + "js$2")
}
Modernizr._config.enableClasses && (e += " " + s + n.join(" " + s), c ? r.className.baseVal = e : r.className = e)
}
var t = [],
f = [],
l = {
_version: "3.5.0",
_config: {
classPrefix: "",
enableClasses: !0,
enableJSClass: !0,
usePrefixes: !0
},
_q: [],
on: function (n, e) {
var s = this;
setTimeout(function () {
e(s[n])
}, 0)
},
addTest: function (n, e, s) {
f.push({
name: n,
fn: e,
options: s
})
},
addAsyncTest: function (n) {
f.push({
name: null,
fn: n
})
}
},
Modernizr = function () {};
Modernizr.prototype = l, Modernizr = new Modernizr;
var r = e.documentElement,
c = "svg" === r.nodeName.toLowerCase();
a(), i(t), delete l.addTest, delete l.addAsyncTest;
for (var u = 0; u < Modernizr._q.length; u++) Modernizr._q[u]();
n.Modernizr = Modernizr
}(window, document);
/* Object fit fallback */
jQuery(document).ready(function ($) {
if ( ! Modernizr.objectfit ) {
$('.slick-slide').each(function () {
var $container = $(this),
imgUrl = $container.find('img').prop('src');
if (imgUrl) {
$container
.css('backgroundImage', 'url(' + imgUrl + ')').addClass('no-object-fit');
}
});
}
});
+3011
View File
File diff suppressed because it is too large Load Diff
+158
View File
@@ -0,0 +1,158 @@
/**
* Add any custom theme JavaScript to this file.
*/
( function ( document, $ ) {
/**
* Add shrink class to header on scroll.
*/
$( window ).scroll( function () {
var scroll = $( window ).scrollTop();
var height = $( '.hero-section' ).outerHeight();
var header = $( '.before-header' ).outerHeight();
var siteheader = $( '.site-header' ).outerHeight();
if ( scroll >= 1 ) {
$( '.site-header' ).addClass( 'shrink' );
$('.bumper').removeClass('hidden');
} else {
$( '.site-header' ).removeClass( 'shrink' );
$('.bumper').addClass('hidden');
}
} );
$(".site-header").after('<div class="bumper hidden"></div>');
/*
* Search form toggle.
*/
$( '.site-header .search-form' ).append( '<a href="javascript:document.getElementsByName(\"s\").focus()" class="search-toggle"></a>' );
$( '.site-header .search-toggle' ).on( 'click', function () {
$( this ).toggleClass( 'active' );
$( '.nav-primary .menu-item' ).fadeToggle();
$( '.site-header .search-form input[type="search"]' ).fadeToggle();
} );
/*
* Send icon button enews footer.
*/
$( '.site-footer .enews form' ).append( '<span class="send-icon"></span>' );
/*
* Move before header into nav on mobile.
*/
$( window ).on( "resize", function () {
if ( $( window ).width() < 896 ) {
$( '.before-header' ).appendTo( '.nav-primary .menu' );
} else {
$( '.before-header' ).prependTo( '.site-header' );
$( '.nav-primary .menu .before-header' ).remove();
}
} ).resize();
/*
* Object fit fallback
*/
jQuery( document ).ready( function ( $ ) {
if ( !Modernizr.objectfit ) {
$( '.front-page-9' ).each( function () {
var $container = $( this ),
imgUrl = $container.find( 'img' ).prop( 'src' );
if ( imgUrl ) {
$container.css( 'backgroundImage', 'url(' + imgUrl + ')' ).addClass( 'no-object-fit' );
}
$container.find( 'img' ).css( 'display', 'none' );
} );
}
} );
/*
* Logo slider.
*/
jQuery( document ).ready( function ( $ ) {
$( '.front-page-2 .gallery' ).slick( {
dots: false,
infinite: true,
speed: 1000,
arrows: false,
autoplay: true,
autoplaySpeed: 5000,
fade: false,
slidesToShow: 2,
slidesToScroll: 1,
mobileFirst: true,
responsive: [ {
breakpoint: 384,
settings: {
slidesToShow: 3,
}
}, {
breakpoint: 768,
settings: {
slidesToShow: 4,
}
}, {
breakpoint: 896,
settings: {
slidesToShow: 5,
}
}, {
breakpoint: 1152,
settings: {
slidesToShow: 6,
}
} ]
} )
} );
/**
* 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();
// Checking if the target was focused
if ( $target.is( ":focus" ) ) {
return false;
} else {
// Adding tabindex for elements not focusable
$target.attr( 'tabindex', '-1' );
// Set focus again
$target.focus();
};
} );
}
}
} );
} )( document, jQuery );
+467
View File
@@ -0,0 +1,467 @@
/* ## Avatars
--------------------------------------------- */
.avatar {
float: left;
margin-right: 2rem;
border-radius: 50%;
.alignright & {
margin-left: 2rem;
}
}
/* ## Genesis
--------------------------------------------- */
.breadcrumb {
width: 100%;
padding: 1rem 0 0;
color: $gray;
font-size: 1.4rem;
text-align: center;
a {
color: $white;
text-decoration: none;
&:hover,
&:focus {
text-decoration: underline;
}
}
}
.after-entry {
width: 100%;
margin: 2rem auto;
padding: 6vw;
border: $site-border;
border-radius: $site-radius;
background-color: $light;
text-align: center;
@include breakpoint(md) {
width: calc(100% + 12rem);
max-width: calc(100% + 12rem);
margin: 0 -6rem;
padding: 6rem;
}
.enews {
form {
display: flex;
margin: 1em 0 0;
flex-wrap: wrap;
justify-content: center;
}
input {
width: 100%;
margin-bottom: 1em;
background-color: $white;
@include breakpoint(xs) {
max-width: $two-fifths;
margin-left: $margin;
&:first-of-type {
margin-left: 0;
}
}
}
}
}
.author-box {
width: 100%;
max-width: map_get($breakpoints, sm);
padding: 6vw 0;
@include breakpoint(sm) {
padding: 6rem 0;
}
.author & {
max-width: 100%;
margin-bottom: 4rem;
padding: 4rem;
border: $site-border;
border-radius: $site-radius;
background-color: $white;
}
p {
color: $body;
&:last-of-type {
margin-bottom: 0;
}
}
}
.author-box-title {
margin-bottom: 0;
font-size: 2rem;
}
/* ## Search Form
--------------------------------------------- */
.search-form {
display: flex;
position: relative;
width: 100%;
align-items: center;
justify-content: flex-start;
@include clearfix;
.search-toggle {
display: none;
width: 2.5rem;
height: 2.5rem;
background-image: center / 1.75rem no-repeat url(assets/images/search.svg);
cursor: pointer;
@include breakpoint(md) {
display: block;
}
.shrink & {
background-image: url(assets/images/search.svg);
}
&.active {
background-image: url(assets/images/close.svg);
background-size: 1.4rem;
.shrink & {
background-image: url(assets/images/close.svg);
}
}
}
input[type="search"] {
width: 30rem;
margin-right: 1em;
background-color: rgba($white, 0.2);
.site-header & {
display: block;
max-width: 79vw;
background-color: $light;
@include breakpoint(md) {
display: none;
position: absolute;
top: 0;
right: 2em;
bottom: 0;
margin: auto 1em auto 0;
}
}
.site-header.shrink & {
border: $site-border;
color: $dark;
}
.entry-content & {
background-color: $light;
}
}
input[type="submit"] {
display: none;
}
.entry & {
margin-bottom: 4rem;
}
}
/* ## 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 {
margin: 0;
font-size: 1.4rem;
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,
.comment-edit-link {
display: none;
}
/* ## Gutenberg
--------------------------------------------- */
.alignwide {
position: relative;
left: 50%;
width: 100vw;
max-width: map_get($breakpoints, md);
transform: translate(-50%);
img {
display: inline-block;
margin: 1.618em auto;
}
}
.alignfull {
position: relative;
left: 50%;
width: 100vw;
max-width: none;
margin-left: -50vw;
.content-sidebar &,
.sidebar-content & {
max-width: calc(100% + 12rem);
}
img {
display: inline-block;
width: 100%;
margin: 1.618em auto;
}
}
.wp-block-image {
figcaption {
margin: 0 auto 2em;
}
}
.wp-block-button {
display: block;
width: 100%;
background: transparent;
text-align: center;
@include clearfix;
a {
display: inline-block;
&:hover,
&:focus {
color: $white;
}
}
}
.wp-block-pullquote {
> p {
font-family: $font-family;
font-weight: $normal;
}
cite {
font-style: normal;
}
}
.wp-block-gallery {
.blocks-gallery-image {
margin-right: 0;
}
}
.blocks-gallery-image {
display: block;
width: 100%;
margin: 0 0 6vw;
text-align: center;
@include breakpoint(xs) {
width: $one-half;
margin-bottom: $margin;
&:nth-of-type(odd) {
clear: both;
margin-left: 0;
}
}
@include breakpoint(sm) {
margin-bottom: $margin;
margin-left: $margin;
&:nth-of-type(odd) {
margin-left: $margin;
}
.wp-block-gallery.columns-2 & {
width: $one-half;
margin-left: $margin;
&:nth-of-type(odd) {
margin-left: 0;
}
}
.wp-block-gallery.columns-3 & {
width: $one-third;
&:nth-of-type(odd) {
margin-left: $margin;
}
&:nth-of-type(3n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-4 & {
width: $one-fourth;
&:nth-of-type(3n + 1) {
margin-left: $margin;
}
&:nth-of-type(4n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-5 & {
width: $one-fifth;
&:nth-of-type(4n + 1) {
margin-left: $margin;
}
&:nth-of-type(5n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-6 & {
width: $one-sixth;
&:nth-of-type(5n + 1) {
margin-left: $margin;
}
&:nth-of-type(6n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-7 & {
width: $one-seventh;
&:nth-of-type(6n + 1) {
margin-left: $margin;
}
&:nth-of-type(7n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-8 & {
width: $one-eighth;
&:nth-of-type(7n + 1) {
margin-left: $margin;
}
&:nth-of-type(8n + 1) {
margin-left: 0;
}
}
.wp-block-gallery.columns-9 & {
width: $one-ninth;
&:nth-of-type(8n + 1) {
margin-left: $margin;
}
&:nth-of-type(9n + 1) {
margin-left: 0;
}
}
}
}
+515
View File
@@ -0,0 +1,515 @@
/* ## Entries
--------------------------------------------- */
.content {
.entry {
position: relative;
margin-bottom: 6vw;
border: $site-border;
background-color: $white;
&:last-of-type {
margin-bottom: 0;
}
.page &,
.single &,
.error404 & {
width: 100%;
border: 0;
}
.home &,
.blog &,
.archive &,
.search-results & {
width: 100%;
margin-bottom: 6vw;
padding: 3rem;
border: $site-border;
border-radius: $site-radius;
@include transition;
@include breakpoint(xs) {
width: $one-half;
margin-bottom: 2.5rem;
margin-left: $margin;
&:nth-of-type(odd) {
margin-left: 0;
}
}
@include breakpoint(md) {
width: $one-third;
margin-bottom: 2.5rem;
&:nth-of-type(odd) {
margin-left: $margin;
}
&:nth-of-type(3n + 1) {
margin-left: 0;
}
}
&:hover,
&:focus {
box-shadow: 0 2rem 6rem rgba($gray, 0.2);
}
}
.search-no-results & {
border: 0;
}
}
}
/* ## Entry Content
--------------------------------------------- */
.entry-content {
p {
color: $body;
a:not(.button) {
color: $body;
box-shadow: inset 0 -1.5px 0 $accent;
text-decoration: none;
@include transition;
&:hover,
&:focus {
color: $accent;
}
}
}
h2,
h3,
h4,
h5,
h6 {
padding-top: 0.618em;
}
ol,
ul {
margin-bottom: 1.618em;
margin-left: 4rem;
color: $body;
line-height: 2;
.error404 & {
margin-bottom: 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 {
padding: 0.4rem 0.8rem;
border: $site-border;
background-color: $light;
font-size: 1.4rem;
line-height: 2;
}
pre {
display: block;
margin: 0 0 1.382em;
padding: 1rem 2rem;
border: $site-border;
border-radius: $site-radius;
background-color: $light;
font-size: 1.4rem;
code {
padding: 0;
border: none;
background-color: transparent;
}
}
input,
select,
textarea {
margin-bottom: 1em;
}
iframe,
video {
width: 100%;
}
blockquote {
display: block;
position: relative;
left: 50%;
width: map_get($breakpoints, md);
max-width: 100vw;
margin: 3em 0;
padding: 0 6rem 2em;
border: 0;
border-top: $site-border;
border-bottom: $site-border;
background-color: $white;
text-align: center;
transform: translate(-50%);
&:before {
display: block;
width: 1em;
margin: -0.25em auto;
color: rgba($dark, 0.2);
background-color: #fff;
font-family: $font-serif;
font-size: 8rem;
line-height: 1;
content: "";
}
}
}
.entry-image-link {
display: block;
margin-bottom: 1em;
@include clearfix;
.blog &,
.archive &,
.search-results & {
display: block;
width: calc(100% + 6rem + 0.2rem);
margin: -3.1rem -3.1rem 3rem;
border-radius: $site-radius $site-radius 0 0;
}
img {
display: block;
margin: 0;
border-radius: $site-radius $site-radius 0 0;
}
}
/* ## Entry Titles
--------------------------------------------- */
.entry-title {
a {
display: block;
color: $dark;
font-size: 2rem;
text-decoration: none;
@include transition;
&:hover {
color: $accent;
}
}
}
/* ## Entry Meta
--------------------------------------------- */
.entry-meta {
width: 100%;
font-size: small;
.entry-footer & {
margin-bottom: 0;
}
}
.entry-categories,
.entry-tags {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
margin-top: 0.2em;
img {
display: inline-flex;
opacity: 0.618;
}
a {
display: inline-flex;
margin-left: 0.2em;
font-weight: $bolder;
@include transition;
}
}
.entry-author-name {
text-transform: capitalize;
}
.archive-description {
width: 100vw;
margin-right: calc(50% - 50vw);
margin-left: calc(50% - 50vw);
padding: 15rem 0;
border-bottom: $site-border;
background-color: $gray;
h1 {
max-width: map-get($breakpoints, xs);
margin: 0 auto;
color: $white;
text-align: center;
}
}
/* ## Entry Footer
--------------------------------------------- */
.entry-footer {
margin-top: 5vw;
padding: 5vw 0;
border-top: $site-border;
border-bottom: $site-border;
@include breakpoint(sm) {
margin-top: 4rem;
padding: 4rem 0;
}
.blog &,
.archive &,
.search-results & {
margin: 0;
padding: 0;
border: 0;
}
.single-portfolio & {
display: none;
}
}
/* ## Pagination
--------------------------------------------- */
.pagination {
padding: 6vw 0;
@include clearfix;
@include breakpoint(md) {
padding: 5rem 0;
}
}
.adjacent-entry-pagination {
padding-bottom: 0;
}
.archive-pagination {
width: 100%;
ul {
display: flex;
justify-content: center;
}
li {
margin: 0 0.25em 0 0;
}
a {
display: block;
padding: 0.5rem 1rem;
border-radius: $site-radius;
color: $dark;
font-size: 1.6rem;
text-decoration: none;
@include transition;
&:hover,
&:focus {
color: $accent;
}
}
.active a {
@include gradient;
color: $white;
}
}
/* ## Comments
--------------------------------------------- */
.comment-respond,
.entry-comments,
.entry-pings {
width: 100%;
max-width: map_get($breakpoints, sm);
margin: 0 auto;
padding: 6vw 0;
border-radius: $site-radius;
font-size: 1.6rem;
@include breakpoint(sm) {
padding: 6rem 0;
}
}
.comment-respond {
.form-submit {
margin-bottom: 0;
}
label {
display: block;
width: 100%;
margin-bottom: 1em;
}
input,
textarea {
display: block;
width: 100%;
}
input[type="submit"] {
width: auto;
}
}
.comment-author {
span {
&:first-of-type {
font-weight: $bold;
text-transform: capitalize;
}
}
}
.comment-list {
li {
padding: 4rem 0 0 5vw;
}
.depth-1 {
padding-left: 0;
}
.comment-respond {
padding-left: 5vw;
}
> .comment-respond {
padding-left: 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 & {
display: block;
clear: both;
padding: 0;
}
}
.comment-meta {
padding-left: calc(4.8rem + 1em);
word-break: break-all;
.entry-pings & {
padding: 0 0 1em;
}
.comment-time {
a {
color: $gray;
font-size: small;
text-decoration: none;
}
}
}
.comment-content {
clear: both;
ul > li {
list-style-type: disc;
}
}
.comment-respond {
input[type="email"],
input[type="text"],
input[type="url"] {
@include breakpoint(xl) {
width: 50%;
}
label {
display: block;
margin-right: 1rem;
}
}
}
.comment-reply-title {
a {
font-size: 1.5rem;
}
}
.entry-pings .reply {
display: none;
}
.pingback:last-of-type p {
margin-bottom: 0;
}
+459
View File
@@ -0,0 +1,459 @@
/* ## 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,
.widget,
.wrap {
@include clearfix;
}
/* ## Typography
--------------------------------------------- */
* {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
::selection {
background-color: #cbeafb;
}
html {
overflow-x: hidden;
max-width: 100vw;
font-size: 62.5%; // 10px browser default.
}
body {
overflow-x: hidden;
max-width: 100vw;
margin: 0;
color: $dark;
background-color: $white;
font-family: $font-family;
font-size: 1.8rem;
font-weight: $normal;
line-height: 1.618; // Golden ratio.
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: grayscale;
-moz-osx-font-smoothing: grayscale;
@include breakpoint(sm) {
font-size: 1.8rem;
}
&.boxed-page {
background-color: $light;
}
}
body > div {
font-size: 1.8rem;
@include breakpoint(sm) {
font-size: 1.8rem;
}
}
p {
margin: 0 0 1.382em;
padding: 0;
}
a {
color: $body;
word-wrap: break-word;
&:hover,
&:focus {
color: $accent;
}
}
ol,
ul {
margin: 0;
padding: 0;
}
li {
list-style-type: none;
}
hr {
clear: both;
margin: 0 0 2em;
padding: 1em 0 0;
border: 0;
border-bottom: $site-border;
border-collapse: collapse;
}
b,
strong {
font-weight: $bolder;
}
blockquote,
cite,
em,
i {
font-style: italic;
}
blockquote {
margin: 0 0 1.382em;
padding: 0 1em;
border-left: 2px solid $accent;
p {
&:last-of-type {
margin-bottom: 0;
}
}
}
pre,
code,
kbd,
samp {
font-family: $font-mono;
}
/* ## Headings
--------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0 0 0.5em;
font-weight: $bold;
line-height: 1.236; // Golden ratio.
}
h1 {
font-size: 2.3em;
@include breakpoint(sm) {
font-size: 3em;
}
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.9em;
}
h4 {
font-size: 1.8em;
}
h5 {
font-size: 1.7em;
}
h6 {
font-size: 1.6em;
}
/* ## Forms
--------------------------------------------- */
:focus {
outline: $site-outline;
}
::-moz-placeholder {
opacity: 1;
color: $medium;
}
::-webkit-input-placeholder {
color: $medium;
}
input,
select,
textarea {
width: 100%;
height: 3em;
padding: 0 1.5em;
border: $site-border;
border-radius: 9rem;
color: $dark;
background-color: $lighter;
font-family: $font-family;
font-size: 1.6rem; // Prevent zoom on mobile.
font-weight: $bolder;
line-height: 3;
&:focus {
border-color: $accent;
outline: none;
}
}
textarea {
height: auto;
padding: 1.5em;
border-radius: 2.5rem;
line-height: 1.618;
}
input[type="checkbox"],
input[type="image"],
input[type="radio"] {
width: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button a {
display: inline-block;
width: auto;
height: 3em;
padding: 0 3.333333em;
border: 0;
border-radius: 9rem;
color: $white;
box-shadow: 0 0.25rem 2rem -0.5rem rgba($white, 0);
font-family: $font-family;
font-size: 1.6rem;
font-weight: $bold;
line-height: 3;
white-space: nowrap;
text-decoration: none;
cursor: pointer;
@include transition;
@include gradient;
&:hover,
&:focus {
color: $white;
box-shadow: 0 0.5rem 2rem -0.5rem rgba($accent, 0.3);
}
&.outline {
color: $accent;
background: transparent;
box-shadow: inset 0 0 0 2px $accent;
&:hover,
&:focus {
color: $white;
background-color: $accent;
box-shadow: none;
}
}
&.white {
color: $dark;
background: $white;
box-shadow: 0 0.25rem 2rem rgba($gray, 0.05);
&:hover,
&:focus {
color: $dark;
background: $white;
box-shadow: 0 1rem 2rem rgba($gray, 0.15);
}
&.outline {
color: $white;
background: transparent;
box-shadow: inset 0 0 0 2px $white;
&:hover,
&:focus {
color: $dark;
background: $white;
box-shadow: inset 0 0 0 0 $white;
}
}
}
&.small {
height: 2.36em;
padding: 0 2.36em;
font-size: 1.3rem;
line-height: 2.36;
}
&.large {
font-size: 1.9rem;
}
&:disabled {
border-width: 0;
color: $gray;
background: $border;
box-shadow: none;
cursor: not-allowed;
}
+ button,
+ .button {
clear: both;
margin-top: 1em;
@include breakpoint(xs) {
clear: none;
margin-top: 0;
}
}
}
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 {
display: block;
max-width: 100%;
}
img {
height: auto;
}
figure {
margin: 0;
}
video {
object-fit: cover;
}
.wp-video-shortcode {
@include breakpoint(sm) {
width: auto;
}
.no-js & {
width: 100%;
border: $site-border;
background-color: $light;
}
}
/* ## Tables
--------------------------------------------- */
table {
width: 100%;
margin-bottom: 4rem;
border: $site-border;
border-spacing: 0;
border-collapse: collapse;
background-color: $white;
line-height: 1;
}
tbody {
border-bottom: $site-border;
}
td,
th {
padding: 0.618em;
border-top: $site-border;
border-right: $site-border;
text-align: left;
}
/* ## Accessibility
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut,
.wp-custom-logo .site-title,
.wp-custom-logo .site-description {
@include screen-reader-text;
}
.screen-reader-text:focus,
.screen-reader-shortcut:focus {
display: block;
clip: auto !important;
z-index: 100000;
width: auto;
height: auto;
padding: 1rem 2rem;
box-shadow: 0 0 0.2rem 0.2rem rgba($dark, 0.1);
text-decoration: none;
}
.more-link {
position: relative;
font-style: normal;
}
.genesis-skip-link {
margin: 0;
li {
width: 0;
height: 0;
list-style: none;
}
}
+244
View File
@@ -0,0 +1,244 @@
/* ## Site Footer
--------------------------------------------- */
.site-footer {
position: relative;
width: 100%;
border-top: $site-border;
color: $body;
.widget-area {
@include breakpoint(sm) {
margin-bottom: 0;
}
}
a {
color: $darker;
&:hover,
&:focus {
color: $accent;
}
}
.button {
color: $white;
&:hover,
&:focus {
color: $white;
}
&.outline {
color: $accent;
&:hover,
&:focus {
color: $white;
}
}
&.white {
color: $dark;
&:hover,
&:focus {
color: $dark;
}
&.outline {
color: $white;
&:hover,
&:focus {
color: $dark;
}
}
}
&:disabled {
color: $gray;
}
}
}
/* ## Before Footer
--------------------------------------------- */
.before-footer {
padding: 5rem 0;
border-bottom: $site-border;
background-color: $light;
@include breakpoint(sm) {
padding: 7.5rem 0;
}
.blog &,
.archive &,
.search-results & {
background-color: $white;
}
.wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
@include flexfix;
}
.widget {
margin-bottom: 0;
&:last-of-type {
margin-bottom: 0;
}
}
h2, h3, h4, h5, h6 {
color: $dark;
}
p {
@include breakpoint(sm) {
margin: 0;
}
}
}
/* ## Footer Widgets
--------------------------------------------- */
.footer-widgets {
position: relative;
padding: 5rem 0 0;
font-size: 1.5rem;
@include breakpoint(sm) {
padding: 10rem 0 0;
}
.wrap {
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
}
}
.widget-title {
margin-bottom: 1em;
color: $dark;
font-size: 1.6rem;
}
.widget-area {
margin: 0 auto 4rem;
@include breakpoint(sm) {
width: $one-third;
margin-left: $margin;
&.footer-widgets-1 {
margin-left: 0;
}
}
&.footer-widgets-1 {
i {
display: inline-block;
float: left;
margin-top: 0.2em;
margin-right: 0.618em;
}
}
&.footer-widgets-2 {
display: flex;
@include breakpoint(sm) {
margin-bottom: 0;
}
.widget {
width: $one-half;
}
}
.widget {
display: block;
margin-bottom: 4rem;
&:last-of-type {
margin-bottom: 0;
}
&.widget_nav_menu {
margin-bottom: 0;
}
}
}
}
/* ## Footer Credits
--------------------------------------------- */
.footer-credits {
display: flex;
width: 100%;
margin: 0;
padding: 4rem 0;
border-top: $site-border;
font-size: 1.5rem;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
align-content: center;
@include breakpoint(sm) {
margin-top: 10rem;
}
.wrap {
@include breakpoint(sm) {
display: flex;
flex-wrap: wrap;
align-items: center;
}
}
.widget {
&:last-of-type {
@include breakpoint(sm) {
text-align: right;
}
}
}
.simple-social-icons {
margin-bottom: 1em;
margin-left: -1em;
@include breakpoint(sm) {
margin-bottom: 0;
}
}
.menu-item {
width: auto;
margin-left: 2em;
}
p {
margin-bottom: 0;
}
}
+434
View File
@@ -0,0 +1,434 @@
/* ## Site Header
--------------------------------------------- */
.site-header {
/*position: absolute;*/
z-index: 100;
width: 100%;
border-bottom: 1px solid rgba($gray, 0.3);
background-color: $white;
&.shrink {
position: fixed;
> .wrap {
@include breakpoint(md) {
height: 7rem;
}
}
}
@include transition;
.sticky-header & {
position: fixed;
&.shrink {
background-color: $white;
box-shadow: 0 0 4rem rgba($dark, 0.05);
> .wrap {
@include breakpoint(md) {
height: 7rem;
}
}
}
}
.no-js & {
position: relative;
}
.boxed-page & {
max-width: map-get($breakpoints, lg);
margin: 0 auto;
}
.contact-page & {
background-color: $white;
}
> .wrap {
display: flex;
position: relative;
height: 6rem;
transition: height 0.3s ease;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
@include breakpoint(md) {
height: 7rem;
padding: 0;
flex-wrap: nowrap;
}
.no-js & {
height: auto;
padding: 3rem 6vw;
@include breakpoint(md) {
padding: 0;
}
}
}
}
.bumper {
height: 61px;
@include breakpoint(md) {
height: 71px;
}
}
.hidden{
display: none;
}
/* ## Title Area
--------------------------------------------- */
.title-area {
display: block;
position: relative;
width: 15rem;
margin: 0 auto 0 0;
}
.site-title {
margin-bottom: 0;
font-size: 1.8rem;
font-weight: $bold;
line-height: 1;
a {
color: $dark;
text-decoration: none;
@include transition;
.shrink & {
color: $dark;
}
}
}
.site-description {
margin-bottom: 0;
opacity: 0.618;
font-size: 1.4rem;
line-height: 1;
@include screen-reader-text;
@include breakpoint(md) {
line-height: 1.382;
text-align: left;
}
}
.custom-logo {
display: block;
.shrink & {
display: block;
}
}
.secondary-logo {
display: none;
.shrink & {
display: none;
}
}
/* ## Before Header
--------------------------------------------- */
.before-header {
display: flex;
position: relative;
height: 4rem;
border-top: 1px solid rgba($gray, 0.3);
border-bottom: 1px solid rgba($gray, 0.3);
color: $darker;
background-color: $light;
font-size: 1.2rem;
flex-wrap: wrap;
align-items: center;
@include transition;
@include breakpoint(md) {
width: 100vw;
max-width: 100%;
}
.sticky-header .shrink & {
@include breakpoint(md) {
margin-top: -4rem;
}
}
.no-js & {
height: auto;
padding-top: 1rem;
padding-bottom: 1rem;
}
.menu & {
display: flex;
width: 100%;
height: auto;
margin: 3em 0 0;
padding: 3em 0 0;
border-bottom: none;
background-color: transparent;
@include clearfix;
.widget {
margin-bottom: 1em;
}
.simple-social-icons {
margin-left: -0.5em;
a {
margin: 0 0.5em 0 0;
}
}
}
.wrap {
display: flex;
width: 100%;
flex-wrap: wrap;
justify-content: space-between;
@include flexfix;
@include breakpoint(md) {
width: 88%;
max-width: map-get($breakpoints, lg);
padding: 0;
}
}
.widget {
display: flex;
margin-bottom: 0;
align-items: center;
&:last-of-type {
margin-bottom: 0;
}
}
.widget-wrap {
width: 100%;
}
p {
display: flex;
align-items: center;
@include breakpoint(xxs) {
display: inline-flex;
margin: 0 1em 0 0;
}
}
.fa {
margin-right: 0.5em;
}
.fa:before {
line-height: 1.618;
}
.simple-social-icons ul li a {
background-color: transparent !important;
}
}
/* ## Header Right
--------------------------------------------- */
.header-widget-area {
display: none;
margin: 0 1em 0 0;
@include breakpoint(md) {
display: block;
margin: 0 0 0 0.5em;
order: 5;
}
@include breakpoint(lg) {
margin: 0 0 0 2em;
}
.widget {
&:last-of-type {
margin-bottom: 0;
}
}
}
/* ## Hero Section
--------------------------------------------- */
.hero-section {
position: relative;
padding: 12rem 0 6rem;
border-bottom: $site-border;
background-color: $light;
background-position: center;
background-size: cover;
text-align: center;
@include overlay;
@include breakpoint(sm) {
padding: 16rem 0 16rem;
}
@include breakpoint(md) {
padding: 20rem 0 16rem;
}
@include breakpoint(xl) {
padding: 24rem 0 20rem;
}
.has-before-header & {
@include breakpoint(md) {
padding-top: 24rem;
}
@include breakpoint(xl) {
padding-top: 28rem;
}
}
.has-nav-secondary & {
@include breakpoint(md) {
padding-top: 26rem;
}
@include breakpoint(xl) {
padding-top: 30rem;
}
}
.has-before-header.has-nav-secondary & {
@include breakpoint(md) {
padding-top: 30rem;
}
@include breakpoint(xl) {
padding-top: 34rem;
}
}
.blog &,
.archive &,
.search-results & {
@include breakpoint(sm) {
padding-bottom: 10rem;
}
@include breakpoint(md) {
padding-bottom: 10rem;
}
@include breakpoint(xl) {
padding-bottom: 14rem;
}
}
.wrap {
position: relative;
z-index: 2;
@include breakpoint(sm) {
max-width: map-get($breakpoints, md);
}
}
h1 {
width: 100%;
margin: 0 auto;
color: $white;
text-align: center;
}
p {
width: 100%;
max-width: map_get($breakpoints, xs);
margin: 0.5em auto 0;
color: $white;
text-align: center;
}
}
/* ## Custom Header
--------------------------------------------- */
.wp-custom-header {
overflow: hidden;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
margin: auto;
pointer-events: none;
object-fit: cover;
object-position: center;
.woocommerce & img,
img,
video,
iframe {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center center;
}
iframe {
position: absolute;
top: -20%;
right: -20%;
bottom: -20%;
left: -20%;
width: 140%;
min-width: 100%;
max-width: 140%;
height: 140%;
min-height: 56.25vw; // 16:9 aspect ratio.
max-height: none;
margin: auto;
}
img {
display: none;
}
}
.wp-custom-header-video-button {
display: none;
}
+779
View File
@@ -0,0 +1,779 @@
/* ## Front Page
--------------------------------------------- */
.front-page-widget {
position: relative;
width: 100%;
padding: 6rem 0;
@include breakpoint(sm) {
padding: 10rem 0;
}
&:nth-of-type(even) {
border-top: $site-border;
border-bottom: $site-border;
background-color: $light;
}
.widget {
&:last-of-type {
margin-bottom: 0;
}
}
.textwidget {
width: 100%;
}
p,
li {
color: $body;
}
}
/* ## Front Page 1
--------------------------------------------- */
.front-page-1 {
.has-hero-slider & {
padding: 0;
background-color: $gray;
@include breakpoint(sm) {
padding: 0;
}
> .wrap {
width: 100%;
max-width: 100%;
padding: 0;
}
.slick-slider {
max-height: 100vh;
@include breakpoint(sm) {
max-height: 100vh;
}
}
.slick-slide {
min-height: 100%;
}
.slick-dots {
line-height: 0;
}
.slick-wrap {
max-width: 88vw;
padding-top: 4rem;
@include breakpoint(md) {
width: 88%;
max-width: map-get($breakpoints, lg);
padding-top: 10rem;
.has-before-header & {
padding-top: 14rem;
}
.has-nav-secondary & {
padding-top: 16rem;
}
.has-nav-secondary.has-before-header & {
padding-top: 20rem;
}
}
}
.slick-content {
max-width: map-get($breakpoints, sm);
}
.slick-arrow {
visibility: hidden;
overflow: hidden;
@include breakpoint(xs) {
visibility: visible;
}
@include breakpoint(sm) {
top: 50%;
}
}
h2 {
margin-bottom: 0.382em;
font-size: 2em;
@include breakpoint(xxs) {
font-size: 2.2em;
line-height: 1.236;
}
@include breakpoint(sm) {
font-size: 3em;
}
}
p {
max-width: map-get($breakpoints, xs);
line-height: 1.382;
@include breakpoint(xxs) {
line-height: 1.618;
}
}
}
&.hero-section {
padding: calc(15vw + 6rem) 0 15vw;
text-align: left;
@include breakpoint(sm) {
padding: 16rem 0;
}
.wrap {
margin: 0 auto;
padding-right: 6vw;
padding-left: 6vw;
@include breakpoint(sm) {
width: 88%;
max-width: 1152px;
padding-right: 0;
padding-left: 0;
}
}
h1 {
text-align: left;
}
p {
margin: 0.5em 0 1.5em;
color: $white;
text-align: left;
}
}
}
/* ## Front Page 2
--------------------------------------------- */
.front-page-2 {
@include breakpoint(sm) {
padding: 5rem 0;
}
@include breakpoint(lg) {
padding: 7.5rem 0;
}
.wrap {
padding: 0;
}
.widget-wrap {
@include breakpoint(sm) {
width: calc(100% + 10vw);
max-width: calc(100% + 10vw);
margin: 0 -5vw;
}
@include breakpoint(lg) {
width: calc(100% + 7.5rem);
max-width: calc(100% + 7.5rem);
margin: 0 -3.75rem;
}
}
.gallery {
img {
width: 100%;
height: auto;
min-height: 1rem;
margin: 2px;
//max-width: 16rem;
padding: 0 6vw;
@include breakpoint(sm) {
padding: 0 5vw;
.no-js & {
padding: 0 1rem;
}
}
@include breakpoint(lg) {
padding: 0 3.75rem;
}
}
}
.gallery-item {
margin: 0;
@include breakpoint(sm) {
margin: 0 !important;
}
.no-js & {
max-width: 50%;
@include breakpoint(sm) {
max-width: 100%;
}
}
}
.slick-list {
width: 100%;
}
.slick-track {
display: flex;
align-items: center;
justify-content: space-between;
min-width: 100%;
}
}
/* ## Front Page 3
--------------------------------------------- */
.front-page-3 {
.wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
@include flexfix;
}
.widget {
hr {
margin: 5rem 0;
@include breakpoint(sm) {
margin: 7.5rem 0;
}
}
}
.icon_widget {
align-self: flex-start;
.widget-title {
font-size: 1.9rem;
}
i {
display: inline-block;
}
}
.mejs-container {
min-width: 86vw !important;
max-width: 86vw;
border-radius: 6px;
background-color: $light;
@include breakpoint(sm) {
min-width: 100% !important;
max-width: 100%;
}
}
.mejs-mediaelement {
overflow: hidden;
padding: 0;
border-radius: 5px;
box-shadow: 0 2rem 6rem -2rem rgba($dark, 0.236);
@include breakpoint(sm) {
box-shadow: 0 3rem 9rem -3rem rgba($dark, 0.236);
}
}
.mejs-controls {
display: none;
}
.mejs-overlay-button {
display: flex;
width: 6rem;
height: 6rem;
border-radius: 9rem;
background-color: $white;
box-shadow: 0 2rem 3rem -1rem rgba($dark, 0.5);
align-items: center;
justify-content: center;
@include transition;
@include breakpoint(sm) {
width: 8rem;
height: 8rem;
}
&:hover,
&:focus {
transform: scale(1.05);
}
&:after {
display: block;
color: $dark;
line-height: 1;
content: "";
}
}
iframe {
transform: scale(1.01);
}
}
/* ## Front Page 4
--------------------------------------------- */
.front-page-4 {
.wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.widget {
&:first-of-type {
margin-bottom: 5rem;
}
}
.pull-left {
@include breakpoint(sm) {
position: relative;
right: 0;
width: 150%;
max-width: 150% !important;
margin-left: -50%;
}
}
}
/* ## Front Page 5
--------------------------------------------- */
.front-page-5 {
padding: 0;
border: none !important;
text-align: center;
@include breakpoint(sm) {
padding: 0;
}
.wrap {
width: 100%;
min-width: 100%;
padding: 0;
}
.widget-title {
margin: 0 0 5rem;
text-align: center;
}
.widget-subtitle {
margin: 10rem 0 1em;
text-align: center;
}
.display-posts-listing {
display: flex;
width: 100vw;
flex-wrap: wrap;
}
.listing-item {
overflow: hidden;
position: relative;
width: 100vw;
margin: 0;
padding: 0;
text-align: center;
@include breakpoint(xs) {
width: 50vw;
}
@include breakpoint(sm) {
width: 33.33333333333333vw;
}
}
.image {
display: block;
@include overlay;
&:before {
opacity: 0;
}
&:hover,
&:focus {
&:before {
opacity: 1;
}
+ .title {
top: 50%;
opacity: 1;
}
}
}
.title {
position: absolute;
z-index: 2;
top: 100%;
left: 50%;
opacity: 0;
color: $white;
font-size: 1em;
font-weight: $bold;
text-decoration: none;
transform: translate(-50%, -50%);
pointer-events: none;
@include transition;
}
img {
min-width: 100%;
@include transition;
}
}
/* ## Front Page 6
--------------------------------------------- */
.front-page-6 {
@include gradient;
border: none !important;
color: $white;
@include breakpoint(sm) {
padding: 10rem 0;
}
.wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
@include flexfix;
}
.widget {
@include breakpoint(sm) {
margin-bottom: 0;
}
&:last-of-type {
.button {
margin-bottom: 0;
}
}
}
p {
max-width: map-get($breakpoints, sm);
color: $white;
@include breakpoint(sm) {
margin-bottom: 0;
}
}
.alignright {
margin-left: 0;
}
}
/* ## Front Page 7
--------------------------------------------- */
.front-page-7 {
text-align: center;
.wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
padding: 0;
@include flexfix;
}
.widget {
width: 100%;
}
.pricing-table {
margin-right: 6vw;
margin-left: 6vw;
@include breakpoint(sm) {
margin-top: 5rem;
margin-right: 0;
margin-left: 0;
}
}
hr {
max-width: 88vw;
margin-right: auto;
margin-left: auto;
@include breakpoint(sm) {
max-width: 100%;
}
}
ul {
blockquote {
padding-right: calc(2em + 6vw);
padding-left: calc(2em + 6vw);
@include breakpoint(sm) {
padding-right: 2em;
padding-left: 2em;
}
}
}
}
/* ## Front Page 8
--------------------------------------------- */
.front-page-8 {
.wrap {
position: relative;
}
.widget-wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.widget-title {
width: 100%;
margin-bottom: 1.618em;
text-align: center;
}
.widget-subtitle {
width: 100%;
text-align: center;
}
.entry {
padding: 3rem;
border: $site-border;
border-radius: $site-radius;
@include transition;
@include breakpoint(sm) {
clear: none;
width: $one-third;
margin-top: 0;
margin-bottom: 0;
margin-left: $margin;
&:nth-of-type(3n + 1) {
margin-left: 0;
}
&:nth-of-type(1n + 4) {
margin-top: $margin;
}
}
&:hover,
&:focus {
box-shadow: 0 2rem 6rem rgba($gray, 0.2);
}
> a {
display: block;
width: calc(100% + 6rem);
max-width: calc(100% + 6rem);
margin: 0;
margin: -3rem -3rem 3rem;
border-radius: $site-radius $site-radius 0 0;
img {
border-radius: $site-radius $site-radius 0 0;
}
}
p {
&:last-of-type {
margin-bottom: 0;
}
}
}
.entry-title {
order: 2;
}
p.entry-meta {
order: 1;
font-size: small;
&:last-of-type {
margin-bottom: 1em;
}
}
}
/* ## Front Page 9
--------------------------------------------- */
.front-page-9 {
position: relative;
color: $white;
background-position: center;
background-size: cover;
text-align: center;
.wrap {
@include breakpoint(sm) {
padding: 5rem 0;
}
}
@include overlay;
.widget {
position: relative;
z-index: 2;
max-width: map_get($breakpoints, sm);
margin: 0 auto;
}
.widget-wrap {
height: 100%;
}
.widget_media_image {
position: absolute;
z-index: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
max-width: 100%;
padding: 0;
figure {
width: 100%;
min-width: 100%;
height: 100%;
margin: 0;
}
img {
width: 100%;
height: 100% !important;
object-fit: cover;
object-position: center;
}
figcaption {
@include screen-reader-text;
}
}
p {
color: $border;
}
form {
margin-top: 1.382em;
}
::-moz-placeholder {
opacity: 1;
color: $border;
}
::-webkit-input-placeholder {
color: $border;
}
input {
display: block;
margin: 0 auto 1em;
border: 0;
color: $white;
background-color: rgba($white, 0.25);
@include transition;
@include breakpoint(xs) {
display: inline-block;
width: auto;
margin: 0 0.2em 1em;
}
@include breakpoint(sm) {
margin-bottom: 0;
}
&[type="submit"] {
width: auto;
margin-bottom: 0;
}
&:hover,
&:focus {
background-color: rgba($white, 0.3);
}
}
}
+553
View File
@@ -0,0 +1,553 @@
/* ## Site Containers
--------------------------------------------- */
.site-container {
.boxed-page & {
max-width: map-get($breakpoints, lg);
margin: 0 auto;
background-color: $white;
box-shadow: 0 0 0 1px $border, 0 0 10rem rgba($gray, 0.1);
}
}
.content-sidebar-wrap,
.wrap {
margin: 0 auto;
padding-right: 6vw;
padding-left: 6vw;
@include breakpoint(sm) {
width: 88%;
max-width: map-get($breakpoints, lg);
padding-right: 0;
padding-left: 0;
}
.wrap {
width: auto;
max-width: 100%;
padding: 0;
}
}
.site-inner {
clear: both;
.blog &,
.archive &,
.search-results & {
background-color: $light;
}
.page-builder & {
border-top: $site-border;
border-bottom: $site-border;
}
.contact-page & {
padding-top: 6rem;
@include breakpoint(sm) {
padding-top: 10rem;
}
}
.contact-page.has-before-header & {
@include breakpoint(sm) {
padding-top: 14rem;
}
}
}
.content-sidebar-wrap {
position: relative;
z-index: 1;
max-width: map-get($breakpoints, lg);
@include breakpoint(md) {
display: flex;
padding: 0;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-start;
@include flexfix;
.sidebar-content & {
flex-direction: row-reverse;
}
}
}
/* ## Content Widths and Positions
--------------------------------------------- */
.content {
display: flex;
width: 100%;
min-height: 40rem;
padding: 4rem 0;
flex-wrap: wrap;
@include breakpoint(sm) {
padding: 6rem;
}
.home.page & {
width: 100%;
max-width: 100%;
margin: 0;
padding: 0;
@include breakpoint(sm) {
margin: 0;
}
}
.blog &,
.archive &,
.search-results & {
margin-top: 0;
padding: 4rem 0;
background-color: transparent;
@include breakpoint(sm) {
padding: 6rem 0;
}
&:before {
display: none;
}
}
.home.page & {
background-color: transparent;
}
.page &,
.single &,
.error404 & {
position: relative;
border-radius: 1px;
background-color: $white;
@include breakpoint(sm) {
margin: -6rem auto 0;
&:before {
display: block;
}
}
&:before {
display: none;
position: absolute;
top: 0;
right: 0;
left: 0;
height: 40rem;
box-shadow: 0 -5rem 10rem rgba(42, 49, 57, 0.05);
content: "";
pointer-events: none;
}
}
.single &,
.contact-page & {
@include breakpoint(md) {
width: map-get($breakpoints, sm);
}
}
.single-product & {
@include breakpoint(md) {
width: map-get($breakpoints, md);
}
}
.landing-page & {
@include breakpoint(sm) {
margin-top: 0;
&:before {
display: none;
}
}
}
}
.sidebar-primary {
padding-bottom: 5rem;
}
@include breakpoint(md) {
.content {
width: 100%;
}
.sidebar-primary {
width: 25%;
padding-top: 3rem;
}
.blog .sidebar-primary,
.archive .sidebar-primary {
padding-top: 6rem;
}
.sidebar-content,
.content-sidebar {
.content {
width: calc(75% - 5rem);
margin-right: 0;
margin-left: 0;
}
}
}
/* ## Column Classes (including fifths)
--------------------------------------------- */
.full-width {
display: block;
width: 100%;
@include clearfix;
}
@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,
.four-sixths,
.five-sixths {
float: left;
clear: none;
margin-left: $margin;
}
.one-half,
.three-sixths,
.two-fourths {
width: $one-half;
}
.one-third,
.two-sixths {
width: $one-third;
}
.four-sixths,
.two-thirds {
width: $two-thirds;
}
.one-fourth {
width: $one-fourth;
}
.three-fourths {
width: $three-fourths;
}
.one-fifth {
width: $one-fifth;
}
.two-fifths {
width: $two-fifths;
}
.three-fifths {
width: $three-fifths;
}
.four-fifths {
width: $four-fifths;
}
.one-sixth {
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,
img {
display: block;
}
.single & {
display: inline-flex;
position: relative;
left: 50%;
width: 100vw;
max-width: map_get($breakpoints, sm);
margin: 1.618em auto;
transform: translate(-50%);
@include breakpoint(md) {
max-width: map-get($breakpoints, md);
}
}
}
.gallery-caption {
display: block;
}
.gallery-item {
display: block;
width: 100%;
margin: 0 0 6vw;
text-align: center;
@include breakpoint(xs) {
width: $one-half;
margin-bottom: 2.5rem;
&:nth-of-type(odd) {
clear: both;
margin-left: 0;
}
}
@include breakpoint(sm) {
margin-bottom: 2.5rem;
margin-left: $margin;
&:nth-of-type(odd) {
margin-left: $margin;
}
.gallery-columns-2 & {
width: $one-half;
&:nth-of-type(odd) {
margin-left: 0;
}
}
.gallery-columns-3 & {
width: $one-third;
&:nth-of-type(odd) {
margin-left: $margin;
}
&:nth-of-type(3n + 1) {
margin-left: 0;
}
}
.gallery-columns-4 & {
width: $one-fourth;
&:nth-of-type(3n + 1) {
margin-left: $margin;
}
&:nth-of-type(4n + 1) {
margin-left: 0;
}
}
.gallery-columns-5 & {
width: $one-fifth;
&:nth-of-type(4n + 1) {
margin-left: $margin;
}
&:nth-of-type(5n + 1) {
margin-left: 0;
}
}
.gallery-columns-6 & {
width: $one-sixth;
&:nth-of-type(5n + 1) {
margin-left: $margin;
}
&:nth-of-type(6n + 1) {
margin-left: 0;
}
}
.gallery-columns-7 & {
width: $one-seventh;
&:nth-of-type(6n + 1) {
margin-left: $margin;
}
&:nth-of-type(7n + 1) {
margin-left: 0;
}
}
.gallery-columns-8 & {
width: $one-eighth;
&:nth-of-type(7n + 1) {
margin-left: $margin;
}
&:nth-of-type(8n + 1) {
margin-left: 0;
}
}
.gallery-columns-9 & {
width: $one-ninth;
&:nth-of-type(8n + 1) {
margin-left: $margin;
}
&:nth-of-type(9n + 1) {
margin-left: 0;
}
}
}
}
/* ## Pricing Tables
--------------------------------------------- */
.pricing-table {
display: flex;
margin: 0 auto;
border: $site-border;
border-radius: $site-radius;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
@include clearfix;
+ .pricing-table {
margin: 5rem auto;
@include breakpoint(sm) {
margin: 10rem 0;
}
}
+ hr {
margin: 5rem 0;
padding: 0;
@include breakpoint(sm) {
margin: 10rem 0;
}
}
div {
padding: 3rem;
border-radius: $site-radius;
text-align: center;
@media (max-width: map-get($breakpoints, sm)) {
width: 100%;
}
ul {
margin: 1em 0;
li {
margin: 0;
list-style-type: none;
}
}
}
.featured {
border: $site-border;
background-color: $white;
box-shadow: 0 2rem 5rem -1rem rgba($dark, 0.0618);
transform: scale(1.05);
}
h4 {
font-size: 2rem;
}
p {
position: relative;
max-width: map-get($breakpoints, sm);
margin: 0 auto;
padding: 0 5%;
}
strong {
display: block;
color: $accent;
font-size: 2.8em;
font-weight: $bold;
}
em {
display: block;
color: $body;
font-size: small;
}
button,
.button {
margin-bottom: 0.5em;
}
.one-fourth {
strong {
font-size: 2.4em;
}
button,
.button {
padding-right: 2em;
padding-left: 2em;
}
}
}
+549
View File
@@ -0,0 +1,549 @@
/* ## Menus
--------------------------------------------- */
.menu {
display: flex;
width: 100%;
font-size: 1.6rem;
font-weight: $bolder;
text-align: left;
flex-wrap: wrap;
align-items: center;
@include clearfix;
@include breakpoint(md) {
font-size: 1.4rem;
}
.right {
margin-left: auto;
}
.rss,
.date,
.search,
.twitter {
display: flex;
margin-top: 1em;
margin-left: 0;
align-items: center;
@include breakpoint(md) {
margin-top: 0;
margin-left: 0.618em;
}
@include breakpoint(xl) {
margin-left: 1.5em;
}
}
.rss {
margin-left: 0;
a {
margin-left: 1em;
}
}
}
.menu-item {
display: block;
position: relative;
width: 100%;
padding: 1rem 0;
order: -1;
@include breakpoint(md) {
display: flex;
width: auto;
height: 10rem;
padding: 0 0.618em;
align-items: center;
order: initial;
.shrink & {
height: 7rem;
}
&:first-of-type > a {
padding-left: 0;
}
&:last-of-type {
a {
padding-right: 0;
}
}
}
@include breakpoint(lg) {
padding: 0 1em;
}
&.button {
display: flex;
margin: 1em 0;
padding: 0;
background: transparent;
box-shadow: none;
font-size: 1.2rem;
align-items: center;
@include breakpoint(md) {
margin: 0 0 0 1em;
}
&:last-of-type {
a {
padding-right: 3em;
}
}
a {
@include gradient;
padding: 1em 3em;
border-radius: 9rem;
color: $white;
.shrink & {
color: $white;
}
}
a:hover,
a:focus,
&.current-menu-item > a {
color: $white;
box-shadow: inset 0 0 0 9rem rgba($black, 0.1);
}
}
a {
display: inline-block;
margin: 2px;
color: $dark;
text-decoration: none;
@include transition;
}
a:hover,
a:focus,
&.current-menu-item > a {
color: $accent;
}
span {
display: block;
}
}
/* ## Sub Menus
--------------------------------------------- */
.sub-menu {
display: none;
@include clearfix;
@include breakpoint(md) {
position: absolute;
z-index: 99;
top: 100%;
left: 0;
width: 20rem;
margin-left: -1em;
padding: 1em 0;
border: $site-border;
border-radius: $site-radius;
background-color: $light;
}
&:before {
display: none;
position: absolute;
z-index: 98;
top: -0.5rem;
left: 3rem;
width: 1rem;
height: 1rem;
border-top: $site-border;
border-left: $site-border;
opacity: 1;
background-color: $light;
content: "";
transition-delay: 0.3s;
transform: rotate(45deg);
@include breakpoint(md) {
display: block;
}
}
.menu-item {
width: 100%;
height: auto;
padding: 0.5em 0;
@include breakpoint(md) {
height: auto;
padding: 0.5em 1em;
}
&:first-of-type {
margin-top: 1em; // Slide toggle fix.
@include breakpoint(md) {
margin-top: 0;
}
}
}
a {
padding-left: 0.618em;
@include breakpoint(md) {
position: relative;
padding: 0;
color: $medium;
word-wrap: break-word;
}
}
.sub-menu {
padding-left: 1em;
@include breakpoint(md) {
top: -0.5em;
left: -0.1rem;
margin: -0.1rem 0 0 19.9rem;
padding-left: 0;
border: $site-border;
}
}
}
/* ## Specific Menus
--------------------------------------------- */
.nav-primary,
.nav-secondary {
overflow: auto;
position: absolute;
top: 0;
right: -40rem;
bottom: 0;
width: 93vw;
max-width: 40rem;
height: 100vh;
margin: 0;
padding: 0 4rem;
border-top: $site-border;
border-bottom: $site-border;
background-color: $white;
@include transition;
@include breakpoint(sm) {
right: calc(-40rem + -6vw);
}
@include breakpoint(md) {
display: block;
overflow: visible;
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
width: auto;
max-width: none;
height: auto;
margin: 0;
padding: 0;
border: none;
background-color: transparent;
box-shadow: none;
}
&.activated {
right: 0;
left: auto;
z-index: 1;
box-shadow: 0 0 4rem rgba($dark, 0.2);
@include breakpoint(sm) {
right: -6vw;
}
@include breakpoint(md) {
right: auto;
box-shadow: none;
}
}
.no-js & {
display: block;
position: relative;
right: auto;
width: 100%;
height: auto;
padding: 0;
border: 0;
@include breakpoint(md) {
display: block;
width: auto;
}
.wrap {
padding: 0;
}
.menu {
padding: 0;
}
.menu-item {
display: inline-flex;
width: auto;
padding-right: 1rem;
}
}
.menu {
position: relative;
padding: 5em 0 7.5em;
@include breakpoint(md) {
padding: 0;
}
}
}
.nav-primary {
.um-avatar {
/* position: absolute; */
/* top: 3px; */
max-width: 25px;
max-height: 25px;
display: inline-block;
margin: 0 5px 5px;
float: none;
vertical-align: middle;
}
}
.nav-secondary {
width: 100%;
@include breakpoint(md) {
width: 100%;
border-top: 1px solid rgba($gray, 0.3);
}
.menu-item {
@include breakpoint(md) {
height: 6rem;
.sticky-header .shrink & {
height: 5rem;
}
}
}
.menu {
> .menu-item {
@include breakpoint(md) {
&:first-of-type {
padding-left: 0;
}
}
}
}
.sub-menu {
.menu-item {
height: auto;
}
}
}
.site-footer {
.menu {
justify-content: center;
margin-bottom: 0;
font-size: 1.4rem;
}
.menu-item {
width: 100%;
height: auto;
margin: 0;
padding: 0;
&:last-of-type {
margin-bottom: 0;
a {
margin-bottom: 2px;
}
}
a {
margin-bottom: 1em;
padding: 0;
color: $body;
}
}
.menu-item a:hover,
.menu-item a:focus,
.menu-item.current-menu-item > a {
color: $accent;
}
}
/* ## Menu Toggle
--------------------------------------------- */
.menu-toggle {
display: block;
position: relative;
z-index: 2;
height: auto;
margin-right: -0.5em;
padding: 1em 0.5em;
color: $dark;
background: transparent;
box-shadow: none;
cursor: pointer;
@include breakpoint(md) {
display: none;
}
&:hover,
&:focus {
color: $dark;
background: none;
box-shadow: none;
}
&.activated,
.shrink & {
color: $dark;
span {
background: $dark;
&:before,
&:after {
background: $dark;
}
}
}
span {
display: block;
float: right;
position: relative;
width: 2rem;
height: 2px;
border-radius: $site-radius;
background: $dark;
&:before,
&:after {
display: block;
position: absolute;
left: 0;
width: 100%;
height: 2px;
border-radius: $site-radius;
background-color: $dark;
content: " ";
}
&:before {
top: -0.5rem;
transition: top 0.2s 0.2s, transform 0.2s 0s;
}
&:after {
bottom: -0.5rem;
transition: bottom 0.2s 0.2s, transform 0.2s 0s;
}
}
&.activated span {
background: none;
&:before {
top: 0;
transition: top 0.2s 0s, transform 0.2s 0.2s;
transform: rotate(45deg);
}
&:after {
bottom: 0;
transition: bottom 0.2s 0s, transform 0.2s 0.2s;
transform: rotate(-45deg);
}
}
}
/* ## Sub Menu Toggle
--------------------------------------------- */
.sub-menu-toggle {
position: absolute;
top: 0.1em;
right: 3em;
height: auto;
margin: 0 -1em;
padding: 1em;
background: none;
box-shadow: none;
@include breakpoint(md) {
display: none;
}
&:hover,
&:focus {
background: none;
box-shadow: none;
}
&:focus {
outline: $site-outline;
}
&:before {
display: block;
margin: 0.2rem 0 -0.2rem;
border: 0.4rem solid transparent;
border-top-color: $dark;
content: "";
}
&.activated {
&:before {
margin: -0.2rem 0 0.2rem;
transform: rotate(180deg);
}
}
}
+720
View File
@@ -0,0 +1,720 @@
/* ## Genesis eNews Extended
--------------------------------------------- */
.sidebar {
.enews {
input {
margin-bottom: 1em;
}
}
}
.site-footer {
.enews {
form {
position: relative;
margin-top: 0.618em;
}
input[type="text"],
input[type="email"] {
margin-top: 1rem;
}
input[type="submit"] {
position: absolute;
right: 0;
bottom: 0;
padding-right: 0;
color: transparent;
background: transparent;
box-shadow: none;
&:hover,
&:focus {
+ .send-icon {
opacity: 1;
}
}
}
.send-icon {
display: block;
position: absolute;
right: 2em;
bottom: 1em;
width: 1.8rem;
height: 1.8rem;
margin: 0;
opacity: 0.236;
background: center / contain no-repeat url(assets/images/paper-plane.svg);
pointer-events: none;
@include transition;
}
}
}
/* ## Genesis Portfolio Pro
--------------------------------------------- */
.archive.genesis-pro-portfolio {
.content {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.entry {
width: 100%;
margin: 0 0 6vw;
padding: 0;
border: 0;
@include overlay;
@include breakpoint(xs) {
width: $one-half;
margin-bottom: 2.5rem;
margin-left: $margin;
&:nth-of-type(odd) {
margin-left: 0;
}
}
&:before {
opacity: 0;
}
&:hover,
&:focus {
&:before {
opacity: 1;
}
.entry-header {
top: 0;
bottom: 0;
margin: 0;
opacity: 1;
}
}
}
.entry-header {
display: flex;
position: absolute;
z-index: 1;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin-top: 100%;
opacity: 0;
pointer-events: none;
align-items: center;
justify-content: center;
@include transition;
a {
color: $white;
}
}
}
/* ## Genesis Simple FAQs
--------------------------------------------- */
div.gs-faq {
padding: 0;
border-top: $site-border;
box-shadow: $site-shadow;
.gs-faq__question {
display: block;
position: relative;
z-index: 1;
height: auto;
margin: 0;
padding: 1.5em 3em 1.5em 1.5em;
border: $site-border;
border-top: 0;
border-radius: 0;
color: $dark;
background-color: $white;
box-shadow: none;
font-size: 1.8rem;
font-weight: $bolder;
line-height: 1;
&:hover,
&:focus {
color: $accent;
}
&:after {
position: absolute;
top: 1.5em;
right: 1em;
line-height: 1;
content: "+";
}
&.gs-faq--expanded {
&:after {
content: "-";
}
}
&:last-of-type {
margin-bottom: 0;
}
}
.gs-faq__answer {
margin: 0;
padding: 3rem;
border: $site-border;
border-top: 0;
background-color: $white;
}
}
/* ## Genesis Simple Share
--------------------------------------------- */
.share-after {
margin-top: 4rem;
}
/* ## Genesis Testimonial Slider
--------------------------------------------- */
.lSSlideWrapper {
max-width: calc(100% + 4em);
margin: 0 -2em;
}
.gts-rating {
margin: 1em auto -1em;
}
.lSSlideOuter {
width: 100%;
}
.lSSlideOuter .lSPager,
.lSSlideOuter .lightSlider {
height: auto !important;
}
ul.testimonials-list {
li {
&:before {
display: block;
margin: 0 0 -0.5em;
color: rgba($dark, 0.2);
font-family: $font-serif;
font-size: 8rem;
line-height: 1;
content: "";
}
}
blockquote {
padding: 0 2em 1em;
border: 0;
}
img {
width: 6rem;
margin: 2rem auto;
}
h5 {
color: $dark;
font-size: 1em;
}
}
.lSSlideOuter .lSPager.lSpg > li a {
opacity: 0.1;
background-color: $dark;
}
.lSSlideOuter .lSPager.lSpg > li.active a,
.lSSlideOuter .lSPager.lSpg > li:hover a {
opacity: 0.3;
background-color: $dark;
}
.gts-company {
display: block;
margin-bottom: 1em;
font-size: small;
}
/* ## Google Map
--------------------------------------------- */
.agm-canvas {
.contact-page & {
@media (max-width: map-get($breakpoints, sm)) {
height: 30rem !important;
}
&:before {
//content: "";
display: block;
position: absolute;
z-index: 1;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba($dark, 0.618);
}
}
}
/* ## Ninja Forms
--------------------------------------------- */
.nf-field {
.nf-field-element {
input,
select {
height: 3em;
}
}
}
/* ## SEO Slider
--------------------------------------------- */
.slick-slide {
.slick-initialized & {
display: flex;
}
.no-js &:first-of-type {
display: block;
width: 100%;
}
}
.slick-arrow {
box-shadow: none;
}
/* ## 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 {
display: flex;
margin: -0.5em -0.5em 0 0;
padding: 0;
flex-wrap: wrap;
justify-content: flex-start;
li {
margin: 0.5em 0.5em 0 0;
padding: 0;
border: none;
background: none;
list-style-type: none;
a {
display: inline-block;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
width: 1em;
height: 1em;
margin: 2px;
border: none;
font-weight: $normal;
font-style: normal;
font-variant: normal;
line-height: 1;
text-align: center;
text-decoration: none;
text-transform: none;
}
}
&.aligncenter {
justify-content: center;
}
&.alignleft {
justify-content: flex-start;
}
&.alignright {
justify-content: flex-end;
}
}
}
/* ## WooCommerce Menu Cart
--------------------------------------------- */
.wpmenucartli {
margin-top: 1em;
}
.wpmenucart-contents {
position: relative;
margin-top: 1em;
color: $dark;
font-size: 1.8rem;
text-decoration: none;
@include breakpoint(md) {
margin-left: 1em;
}
.cartcontents {
display: flex;
position: absolute;
top: -0.4rem;
right: -0.4rem;
width: 1.2rem;
height: 1.2rem;
border-radius: 1.2rem;
color: $white;
background-color: $accent;
box-shadow: 0 0 0 1px $white;
font-size: 0.7rem;
font-weight: $bold;
line-height: 1;
text-align: center;
align-items: center;
justify-content: center;
}
}
/* ## WP Featherlight
--------------------------------------------- */
.featherlight .featherlight-close-icon {
box-shadow: none;
}
/* ## Event Manager
--------------------------------------------- */
.single-event {
/*&.full-width-content .content {
max-width: 100%;
}*/
.event-map {
flex: 1 1 100%;
margin-top: 30px;
max-height: 100%!important;
height: 300px;
@include breakpoint(md) {
flex: 1 1 100%;
margin-top: 0;
}
}
.event-info-wrapper {
margin: 0 auto 40px;
display: flex;
flex-wrap: wrap;
@include breakpoint(md){
box-shadow: $box-shadow;
}
.event-info {
box-shadow: $box-shadow;
flex: 1 1 100%;
padding: 30px;
text-align: center;
margin-bottom: 20px;
p {
margin-bottom: 15px;
}
div {
margin-bottom: 15px;
text-align: left;
&:last-of-type {
margin-bottom: 0;
}
@include breakpoint(md){
display: flex;
flex-wrap: wrap;
}
dt {
@include breakpoint(md){
flex: 0 1 120px;
font-weight: 700;
}
}
dd {
@include breakpoint(md){
flex: 1 1 auto;
margin-left: 0;
}
}
}
@include breakpoint(md) {
box-shadow: none;
flex: 1 1 100%;
padding: 60px;
text-align: unset;
margin: 0 auto 0px;
max-width: 760px;
}
a ion-icon {
border-radius: 50%;
background: #8c8c8c;
font-size: 16px;
padding: 10px;
color: #FFF;
margin-right: 10px;
&:hover {
background: red;
}
}
}
.event-register {
text-align: center;
margin-top: 40px;
flex: 1 1 100%;
}
}
.event-meta {
margin-bottom: 20px;
color: $white;
> span {
padding: 0 10px;
}
.event-location:before {
font-family: ionicons;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
content: "\f455";
margin-right: 10px;
}
.event-start-date:before {
font-family: ionicons;
content: "\f3f3";
margin-right: 10px;
}
}
.event-hero {
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
.wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
flex-direction: column;
min-height: 80vh;
text-align: center;
justify-content: center;
color: #FFF;
.entry-title {
font-size: 5.2rem;
}
}
}
.event-button {
a + a {
margin-left: 10px;
}
.button.register {
background: $accent;
}
}
.event-related-wrapper {
display: flex;
flex-wrap: wrap;
margin-top: 40px;
@include breakpoint(md) {
margin: 40px -70px 30px;
}
.event-related-title {
flex: 0 0 100%;
}
.event-related-item {
flex: 1 1 calc((100% - 40px) / 2);
margin: 0 10px 40px;
position: relative;
@include breakpoint(md) {
flex: 0 1 calc((100% - 60px)/3);
img {
width: 100%;
}
}
.event-date {
position: absolute;
font-size: 12px;
top: 0;
padding: 5px 10px;
background: rgba(0,0,0, 0.5);
color: $white;
}
.event-title {
font-size: 16px;
margin-top: 10px;
a {
text-decoration: none;
}
}
}
}
}
.event-frontpage-wrapper {
display: flex;
flex-wrap: wrap;
margin-top: 40px;
.event-item {
flex: 1 1 calc((100% - 40px) / 2);
margin: 0 10px 40px;
position: relative;
@include breakpoint(md) {
flex: 0 1 calc((100% - 60px)/3);
img {
width: 100%;
}
}
.event-date {
position: absolute;
font-size: 12px;
top: 0;
padding: 5px 10px;
background: rgba(0,0,0, 0.5);
color: $white;
}
.event-title {
font-size: 20px;
margin-top: 10px;
a {
text-decoration: none;
}
}
}
}
/* ## Genesis Featured Post Combo
--------------------------------------------- */
.site-footer .gfpc-featured-posts {
.entry-title {
font-size: 1.8rem;
}
article {
margin-bottom: 20px;
}
}
.gfpc-featured-posts {
.entry-content {
clear: unset;
&:before {
clear: unset;
}
}
}
.home .gfpc-overlay-entry {
height: unset;
padding: unset;
position: unset;
@include breakpoint(md) {
padding: 15px 30px;
height: 100%;
position: absolute;
}
&.bottom {
width: 100%;
margin-top: 20px;
.entry-title a {
color: black;
font-size: 26px;
}
@include breakpoint(md){
background: rgba(255,255,255,1);
bottom: 20px!important;
width: 40%;
}
}
&.tint:before {
background: transparent!important;
}
}
/* ## WP-Discuz
--------------------------------------------- */
#comments {
width: 100%;
}
#wpcomm textarea,#wpcomm .wc-comment-header,#wpcomm .wc-comment-footer,#wpcomm .wc-comment .wc-comment-left{
font-family: $font-family;
}
#wc-comment-header { font-size: 28px;}
#wpcomm .wc-field-comment textarea {
padding: 10px;
height: 150px!important;
}
#wpcomm .wc-field-name input[type="text"],
#wpcomm .wc-field-email input[type="email"]{
padding: 10px;
height: auto;
}
#wpcomm .wc-comment-right .wc-comment-text,
#wpcomm .wc-comment-right .wc-comment-text *,
#wpcomm .wc_comm_form.wc_main_comm_form .wc-field-textarea .wpdiscuz-textarea-wrap textarea {
font-size: 1.6rem!important;
line-height: unset!important;
}
#wpcomm .wc-reply .wc-comment-right .wc-comment-text,
#wpcomm .wc-reply .wc-comment-right .wc-comment-text * {
font-size: 1.6rem;
}
+141
View File
@@ -0,0 +1,141 @@
/* # Media Queries
--------------------------------------------- */
@media print {
*,
*:before,
*:after {
color: $dark !important;
background: transparent !important;
box-shadow: none !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 {
width: 100%;
text-align: center;
}
.site-title > a {
margin: 0;
text-decoration: none;
text-indent: 0;
}
.site-inner {
position: relative;
top: -10rem;
padding-top: 0;
}
.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;
}
}
+168
View File
@@ -0,0 +1,168 @@
button, hr, input {
overflow: visible;
}
audio, canvas, progress, video {
display: inline-block;
}
progress, sub, sup {
vertical-align: baseline;
}
[type="checkbox"], [type="radio"], legend {
box-sizing: border-box;
padding: 0;
}
html {
line-height: 1.15;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article, aside, details, figcaption, figure, footer, header, main, menu, nav, section {
display: block;
}
h1 {
margin: 0.67em 0;
font-size: 2em;
}
figure {
margin: 1em 4rem;
}
hr {
box-sizing: content-box;
height: 0;
}
code, kbd, pre, samp {
font-family: monospace;
font-size: 1em;
}
a {
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
b, strong {
font-weight: bolder;
}
dfn {
font-style: italic;
}
mark {
color: #000;
background-color: #fdffb6;
}
small {
font-size: 80%;
}
sub, sup {
position: relative;
font-size: 75%;
line-height: 0;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
audio:not([controls]) {
display: none;
height: 0;
}
img {
border-style: none;
}
svg:not(:root) {
overflow: hidden;
}
button, input, optgroup, select, textarea {
margin: 0;
font-size: 100%;
line-height: 1.15;
}
button, select {
text-transform: none;
}
[type="reset"], [type="submit"], button, html [type="button"] {
-webkit-appearance: button;
}
[type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner, button::-moz-focus-inner {
padding: 0;
border-style: none;
}
[type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring, button:-moz-focusring {
outline: ButtonText dotted 0.1rem;
}
fieldset {
padding: 0.35em 0.75em 0.625em;
}
legend {
display: table;
max-width: 100%;
color: inherit;
white-space: normal;
}
textarea {
overflow: auto;
}
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -0.2rem;
}
[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
summary {
display: list-item;
}
[hidden], template {
display: none;
}
+84
View File
@@ -0,0 +1,84 @@
/* ## Sidebars
--------------------------------------------- */
.sidebar {
position: relative;
z-index: 1;
ol,
ul {
margin-left: 1em;
color: $body;
line-height: 2;
}
ol > li {
list-style-type: decimal;
}
ul > li {
list-style-type: disc;
}
li li {
list-style-type: circle;
}
a {
color: $darker;
&:hover,
&:focus {
color: $accent;
}
}
}
/* ## Widgets
--------------------------------------------- */
.widget {
.sidebar & {
padding: 3.5vw 0;
font-size: 1.5rem;
@include breakpoint(sm) {
padding: 3rem 0;
}
&:first-of-type {
padding-top: 0;
@include breakpoint(sm) {
padding-top: 3rem;
}
}
}
.blog .sidebar &,
.archive .sidebar & {
margin-bottom: 7vw;
padding: 3.5vw;
border: $site-border;
border-radius: $site-radius;
background-color: $white;
@include breakpoint(sm) {
margin-bottom: 3rem;
padding: 3rem;
}
}
}
.widget_calendar {
table {
width: 100%;
}
td,
th {
text-align: center;
}
}
+162
View File
@@ -0,0 +1,162 @@
// Breakpoints.
$breakpoints: (
xxs: 384px,
xs: 512px,
sm: 768px,
md: 896px,
lg: 1152px,
xl: 1280px
);
// Colors.
$black: #013;
$dark: #2a3139;
$darker: #3f454c;
$body: #4d5968;
$medium: #90959f;
$gray: #c6cace;
$border: #eceef1;
$light: #f6f8fa;
$lighter: #fbfcfd;
$white: #fff;
$green: #54d169;
$one: #00c6ff;
$two: #0072ff;
$blue: #1e90ff;
$red: #ff6347;
$accent: mix($one, $two);
$overlay: rgba($dark, 0.5);
// Typography.
$font-family: "Nunito Sans", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, helvetica, arial, sans-serif;
$font-serif: "Georgia", "Apple Garamond", "Baskerville", "Times New Roman", "Droid Serif", "Times", "Source Serif Pro", serif;
$font-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", monospace;
$normal: 400;
$bolder: 600;
$bold: 700;
// Misc.
$site-radius: 3px;
$site-border: 1px solid $border;
$site-outline: 2px solid $border;
$site-shadow: 0 2rem 5rem -0.618rem rgba($dark, 0.0618);
// Columns
$margin: 2.564102564102564%;
$one-half: 48.71794871794871%;
$one-third: 31.62393162393162%;
$one-fifth: 17.94871794871794%;
$one-fourth: 23.07692307692307%;
$one-sixth: 14.52991452991453%;
$one-seventh: 12.08791208791208%;
$one-eighth: 10.25641025641025%;
$one-ninth: 8.831908831908832%;
$two-thirds: 65.81196581196582%;
$two-fourths: 48.71794871794871%;
$two-fifths: 38.46153846153846%;
$two-sixths: 31.62393162393162%;
$three-fourths: 74.35897435897436%;
$three-fifths: 58.97435897435897%;
$three-sixths: 48.71794871794871%;
$four-fifths: 79.48717948717948%;
$four-sixths: 65.81196581196582%;
$five-sixths: 82.90598290598291%;
// 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 {
display: block;
clear: both;
content: "";
}
}
// Flexfix.
@mixin flexfix {
&:before,
&:after {
display: none;
}
}
// Screen reader text.
@mixin screen-reader-text {
overflow: hidden;
clip: rect(0, 0, 0, 0);
position: absolute !important;
width: 0.1rem;
height: 0.1rem;
border: 0;
background-color: $white;
}
// Transitions.
@mixin transition {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
// Gradients.
@mixin gradient {
background: $two;
background: -moz-linear-gradient(-45deg, $one 0%, $two 100%);
background: -webkit-linear-gradient(-45deg, $one 0%, $two 100%);
background: linear-gradient(135deg, $one 0%, $two 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr="$one", endcolorstr="$two", gradienttype=1);
}
// Overlays.
@mixin overlay {
&:before {
display: block !important;
position: absolute;
z-index: 1;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background: $overlay;
content: "";
pointer-events: none;
@include transition;
}
}
// Box Shadow.
$box-shadow-blur-radius: 20px;
$box-shadow-opacity: 0.075;
$box-shadow: 0 16px 65px rgba(0,0,0,.18);
+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}}
+83
View File
@@ -0,0 +1,83 @@
/* # Table of Contents
- Reset
- Normalize 7.0
- Defaults
- Box Sizing
- Float Clearing
- Typography
- Headings
- Forms
- Objects
- Tables
- Accessibility
- Layout
- Site Containers
- Content Width
- Column Classes
- Gallery
- Pricing Tables
- Common
- Avatars
- Genesis
- Search Form
- WordPress
- Gutenberg
- Header
- Site Header
- Title Area
- Before Header
- Header Right
- Hero Section
- Menus
- Menus
- Sub Menus
- Specific Menus
- Menu Toggle
- Sub Menu Toggle
- Content
- Entries
- Entry Content
- Entry Titles
- Entry Meta
- Entry Footer
- Pagination
- Comments
- Sidebars
- Sidebars
- Widgets
- Footer
- Site Footer
- Before Footer
- Footer Widgets
- Plugins
- Genesis eNews Extended
- Genesis Portfolio Pro
- Genesis Simple FAQ
- Genesis Simple Share
- Genesis Testimonial Slider
- Google Map
- Ninja Forms
- SEO Slider
- Simple Social Icons
- WP Featherlight
- WooCommerce Menu Cart
- Home
- Front Page Widgets
- 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 "print";
+1000
View File
File diff suppressed because it is too large Load Diff
Executable
+1
View File
File diff suppressed because one or more lines are too long
Executable
+352
View File
@@ -0,0 +1,352 @@
<?php
/**
* Yeu Chay Bo
*
* This file sets up the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
$child_theme = wp_get_theme();
// Define theme constants (do not remove).
define( 'CHILD_THEME_NAME', $child_theme->get( 'Name' ) );
define( 'CHILD_THEME_URL', $child_theme->get( 'ThemeURI' ) );
define( 'CHILD_THEME_VERSION', $child_theme->get( 'Version' ) );
define( 'CHILD_TEXT_DOMAIN', $child_theme->get( 'TextDomain' ) );
define( 'CHILD_THEME_DIR', get_stylesheet_directory() );
define( 'CHILD_THEME_URI', get_stylesheet_directory_uri() );
// Load Genesis Framework (do not remove).
require_once get_template_directory() . '/lib/init.php';
// Set Localization (do not remove).
load_child_theme_textdomain( CHILD_TEXT_DOMAIN, apply_filters( 'child_theme_textdomain', CHILD_THEME_DIR . '/languages', CHILD_TEXT_DOMAIN ) );
// Enable support for page excerpts.
add_post_type_support( 'page', 'excerpt' );
// Enable support for Gutenberg wide images.
add_theme_support( 'align-wide' );
// Enable support for WooCommerce.
add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
// Add portfolio image size.
//add_image_size( 'portfolio', 620, 380, true );
// Add slider image size (incase SEO slider not active).
add_image_size( 'slider', 1280, 720, true );
//* Add image sizes
add_image_size( 'homepage-large', 1200, 600, true );
add_image_size( 'homepage-medium', 640, 360, true );
add_image_size( 'homepage-small', 400, 225, true );
// Enable support for structural wraps.
add_theme_support( 'genesis-structural-wraps', array(
'header',
'menu-primary',
'menu-secondary',
'footer-widgets',
) );
// 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', 'yeuchaybo' ),
'secondary' => __( 'After Header Menu', 'yeuchaybo' ),
) );
// Enable viewport meta tag for mobile browsers.
add_theme_support( 'genesis-responsive-viewport' );
// Enable footer widgets.
add_theme_support( 'genesis-footer-widgets', 3 );
// Enable support for after entry widget.
add_theme_support( 'genesis-after-entry-widget-area' );
// 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 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' => '#fdfeff',
) );
// Sets the content width based on the theme's design and stylesheet.
if ( ! isset( $content_width ) ) {
$content_width = 1000; // Pixels.
}
// Enable logo option in Customizer > Site Identity.
add_theme_support( 'custom-logo', array(
'height' => 60,
'width' => 240,
'flex-height' => true,
'flex-width' => true,
'header-text' => array( '.site-title', '.site-description' ),
) );
// Display custom logo in site title area.
add_action( 'genesis_site_title', 'the_custom_logo', 0 );
// Enable support for custom header image or video.
add_theme_support( 'custom-header', array(
'header-selector' => '.hero-section',
'default-image' => CHILD_THEME_URI . '/assets/images/hero.jpg',
'header-text' => true,
'default-text-color' => '#2a3139',
'width' => 1280,
'height' => 720,
'flex-height' => true,
'flex-width' => true,
'uploads' => true,
'video' => true,
'wp-head-callback' => 'corporate_custom_header',
) );
// 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', 'yeuchaybo' ),
),
) );
// Remove secondary sidebar.
unregister_sidebar( 'sidebar-alt' );
// Remove unused site layouts.
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
// Change order of main stylesheet to override plugin styles.
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', 99 );
// Reposition primary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_after_title_area', 'genesis_do_nav' );
// Reposition the secondary navigation menu.
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_after_header_wrap', 'genesis_do_subnav' );
// Reposition the breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'corporate_hero_section', 'genesis_do_breadcrumbs', 30 );
// Reposition featured image.
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
remove_action( 'genesis_post_content', 'genesis_do_post_image' );
add_action( 'genesis_entry_header', 'genesis_do_post_image', 1 );
// Reposition footer widgets inside site footer.
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
add_action( 'genesis_footer', 'genesis_footer_widget_areas', 14 );
// Remove footer credits.
remove_action( 'genesis_footer', 'genesis_do_footer' );
// Remove Genesis Portfolio Pro default styles.
add_filter( 'genesis_portfolio_load_default_styles', '__return_false' );
// Remove one click demo branding.
add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' );
// Enable shortcodes in text widgets.
add_filter( 'widget_text', 'do_shortcode' );
add_action( 'wp_enqueue_scripts', 'corporate_scripts_styles', 90 );
/**
* Enqueue theme scripts and styles.
*
* @since 1.0.0
*
* @return void
*/
function corporate_scripts_styles() {
// Remove Simple Social Icons CSS (included with theme).
wp_dequeue_style( 'simple-social-icons-font' );
// Enqueue custom Google fonts.
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Nunito+Sans:400,600,700', array(), CHILD_THEME_VERSION );
// Conditionally load WooCommerce styles.
if ( corporate_is_woocommerce_page() ) {
wp_enqueue_style( CHILD_TEXT_DOMAIN . '-woocommerce', CHILD_THEME_URI . '/woocommerce.css', array(), CHILD_THEME_VERSION );
}
// Conditionally load slider scripts.
if ( ! class_exists( 'SEO_Slider_Widget' ) ) {
wp_enqueue_script( CHILD_TEXT_DOMAIN . '-modernizr', CHILD_THEME_URI . '/assets/scripts/min/modernizr.min.js', array( 'jquery' ), '3.5.0', true );
wp_enqueue_script( CHILD_TEXT_DOMAIN . '-slick', CHILD_THEME_URI . '/assets/scripts/min/slick.min.js', array( 'jquery' ), '1.8.1', true );
}
// Enqueue custom theme scripts.
wp_enqueue_script( CHILD_TEXT_DOMAIN . '-pro', CHILD_THEME_URI . '/assets/scripts/min/theme.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
// Enqueue responsive menu script.
wp_enqueue_script( CHILD_TEXT_DOMAIN . '-menus', CHILD_THEME_URI . '/assets/scripts/min/menus.min.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
// Disable superfish args.
wp_deregister_script( 'superfish-args' );
// Localize responsive menus script.
wp_localize_script( CHILD_TEXT_DOMAIN . '-menus', 'genesis_responsive_menu', array(
'mainMenu' => '',
'subMenu' => '',
'menuIconClass' => null,
'subMenuIconClass' => null,
'menuClasses' => array(
'combine' => array(
'.nav-primary',
'.nav-secondary',
),
),
) );
}
// Load helper functions.
require_once CHILD_THEME_DIR . '/includes/helpers.php';
// Load general functions.
require_once CHILD_THEME_DIR . '/includes/general.php';
// Load widget areas.
require_once CHILD_THEME_DIR . '/includes/widgets.php';
// Load hero section.
require_once CHILD_THEME_DIR . '/includes/hero.php';
// Load Customizer settings.
require_once CHILD_THEME_DIR . '/includes/customize.php';
// Load default settings.
require_once CHILD_THEME_DIR . '/includes/defaults.php';
// Load recommended plugins.
require_once CHILD_THEME_DIR . '/includes/plugins.php';
/**********************************
*
* Replace Header Site Title with Inline Logo
*
* @author AlphaBlossom / Tony Eppright, Neil Gee
* @link http://www.alphablossom.com/a-better-wordpress-genesis-responsive-logo-header/
* @link https://wpbeaches.com/adding-in-a-responsive-html-logoimage-header-via-the-customizer-for-genesis/
*
* @edited by Sridhar Katakam
* @link https://sridharkatakam.com/
*
************************************/
add_filter( 'genesis_seo_title', 'custom_header_inline_logo', 10, 3 );
function custom_header_inline_logo( $title, $inside, $wrap ) {
$logo = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="40" viewBox="0 0 303.5 62.5">
<style type="text/css">
</style>
<path class="ycblogo" d="M11.9 15.2l2.4 7.1c0.1 0.4 0.2 1.1 0.3 2.2 0.1 1.1 0.2 2.1 0.2 3.1 0.6-2.7 1.2-4.4 1.6-5.3l3.9-7.1h11.9L19.5 34.8l-1.6 15.2H7.1l1.5-15.2L0 15.2H11.9z"/>
<path class="ycblogo" d="M87 35.7c-0.1 1.3-0.3 2.4-0.4 3.2 -0.1 0.9-0.5 2.2-1 4 -0.5 1.8-2.2 3.6-4.9 5.3 -2.7 1.7-6 2.5-9.8 2.5 -4.1 0-7.3-0.9-9.6-2.8 -2.4-1.9-3.5-4.5-3.5-7.8l0.2-4.4L60.1 15.2h10.8l-2.1 19.8 -0.1 2.4c0 0.9 0.3 1.7 0.9 2.2 0.6 0.5 1.4 0.8 2.4 0.8 1.3 0 2.3-0.3 2.8-0.9 0.6-0.6 0.9-1.2 1.1-1.7 0.1-0.5 0.3-1.4 0.5-2.8l2-19.8h10.8L87 35.7z"/>
<path class="ycblogo" d="M126.7 27.1c-1.8-1.4-3.7-2-5.7-2 -2.4 0-4.5 0.8-6.1 2.5 -1.7 1.6-2.5 3.6-2.5 6 0 2.1 0.7 3.7 2 5 1.3 1.3 3 1.9 5.1 1.9 0.6 0 1.1 0 1.7-0.1 0.5-0.1 1.1-0.3 1.7-0.5 0.8-0.3 1.8-0.8 2.8-1.6l4.3 7.6c-1.1 0.9-2 1.6-2.6 2 -0.6 0.4-1.9 1-3.7 1.8 -1.8 0.8-4.1 1.2-6.9 1.2 -4.7 0-8.5-1.4-11.3-4.3 -2.8-2.9-4.2-6.8-4.2-11.6 0-5.6 1.9-10.4 5.7-14.3 3.8-4 8.4-5.9 13.8-5.9 2.6 0 4.7 0.3 6.3 1 1.5 0.7 2.7 1.3 3.4 1.8 0.7 0.5 1.6 1.2 2.6 2.2L126.7 27.1z"/>
<polygon class="ycblogo" points="135.6 15.2 146.3 15.2 145.1 26.8 153.7 26.8 155 15.2 165.7 15.2 162.1 50 151.3 50 152.7 36.6 144.1 36.6 142.7 50 131.9 50 "/>
<path class="ycblogo" d="M178.9 15.2h11.8l7.6 34.8H187.4l-1-5.4h-9.4l-2 5.4h-11L178.9 15.2zM179.8 37h5.6l-1.1-6.5c-0.1-0.9-0.2-1.8-0.2-2.7s-0.1-1.5-0.1-2c0-0.7 0.1-2.1 0.3-4.1 -0.1 0.9-0.3 2-0.5 3.2 -0.2 1.2-0.5 2.4-0.8 3.6l-0.6 2L179.8 37z"/>
<path class="ycblogo" d="M208.7 15.2l2.4 7.1c0.1 0.4 0.2 1.1 0.3 2.2 0.1 1.1 0.2 2.1 0.2 3.1 0.6-2.7 1.2-4.4 1.6-5.3l3.9-7.1h11.9l-12.8 19.6 -1.6 15.2H203.9l1.5-15.2 -8.6-19.6H208.7z"/>
<path class="ycblogo" d="M239.6 15.2h14.3c1.1 0 1.9 0 2.7 0 0.7 0 1.4 0.1 2 0.1 2 0.3 3.5 1.1 4.6 2.4 1.1 1.3 1.7 3 1.7 5 0 4.2-2 7-5.9 8.4 4.3 0.6 6.5 3.1 6.5 7.6 0 1.9-0.5 3.7-1.5 5.4s-2.4 3.1-4.3 4.1c-1.9 1-4.7 1.6-8.6 1.6h-15.2L239.6 15.2zM247.6 41.6h2.2c3 0 4.5-1 4.5-3.1 0-0.9-0.3-1.6-0.8-2 -0.6-0.4-1.6-0.6-3-0.6h-2.3L247.6 41.6zM249 27.7h2.1c0.9 0 1.7-0.2 2.2-0.6 0.6-0.4 0.8-0.9 0.8-1.6 0-1.3-0.9-1.9-2.7-1.9h-2.1L249 27.7z"/>
<path class="ycblogo" d="M33.8 15.2h21.5l-0.9 8.4H43.7l-0.5 4.6h9.5l-0.9 8.4H42.4l-0.6 5.2h11.1l-0.8 8.4H30.1L33.8 15.2zM46.2 0l9.2 6.4 -2.6 5 -7.5-2.7 -8.1 2.7 -1.5-5L46.2 0z"/>
<path class="ycblogo" d="M287.6 14.5c4.8 0 8.6 1.5 11.5 4.4 2.9 2.9 4.3 6.8 4.3 11.7 0 5.7-1.9 10.4-5.7 14.3 -3.8 3.9-8.5 5.8-14 5.8 -4.8 0-8.7-1.5-11.6-4.4 -2.9-2.9-4.3-6.9-4.3-11.8l0.1-1.9c0.5-5.3 2.6-9.6 6.3-13C278 16.2 282.5 14.5 287.6 14.5M289.1 0l9.2 6.4 -2.6 5 -7.5-2.7 -8.1 2.7 -1.5-5L289.1 0zM279.2 32.6l0 0.8c0 2 0.5 3.6 1.6 4.9 1.1 1.2 2.5 1.9 4.2 1.9 2 0 3.7-0.8 5.1-2.4s2.2-3.6 2.2-5.8c0-2-0.5-3.6-1.6-4.8 -1.1-1.2-2.5-1.9-4.2-1.9 -1.8 0-3.4 0.7-4.8 2.1C280.3 28.7 279.4 30.5 279.2 32.6M279.2 54c-1 1-1.5 2.2-1.5 3.7 0 1.3 0.5 2.4 1.4 3.4 0.9 0.9 2 1.4 3.2 1.4 1.5 0 2.7-0.5 3.8-1.4 1-1 1.5-2.2 1.5-3.6 0-1.4-0.5-2.5-1.4-3.5 -0.9-1-2-1.4-3.2-1.4C281.5 52.5 280.2 53 279.2 54"/>
<path class="ycblogo" d="M180.1 52.5c1.3 0 2.3 0.5 3.2 1.4 0.9 1 1.4 2.1 1.4 3.5 0 1.4-0.5 2.6-1.5 3.6 -1 1-2.3 1.5-3.8 1.5 -1.3 0-2.3-0.5-3.2-1.4 -0.9-0.9-1.4-2.1-1.4-3.4 0-1.4 0.5-2.7 1.5-3.7C177.4 53 178.7 52.5 180.1 52.5"/>
</svg>';
$inside = sprintf( '<a href="%s" titlle="' . esc_attr( get_bloginfo( 'name' ) ) . '">%s<span class="screen-reader-text">%s</span></a>', trailingslashit( home_url() ), $logo, get_bloginfo( 'name' ) );
// Determine which wrapping tags to use
$wrap = genesis_is_root_page() && 'title' === genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';
// A little fallback, in case an SEO plugin is active
$wrap = genesis_is_root_page() && ! genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : $wrap;
// And finally, $wrap in h1 if HTML5 & semantic headings enabled
$wrap = genesis_html5() && genesis_get_seo_option( 'semantic_headings' ) ? 'h1' : $wrap;
return sprintf( '<%1$s %2$s>%3$s</%1$s>', $wrap, genesis_attr( 'site-title' ), $inside );
}
add_filter( 'genesis_attr_site-description', 'abte_add_site_description_class' );
/**
* Add class for screen readers to site description.
*
* Unhook this if you'd like to show the site description.
*
* @since 1.0.0
*
* @param array $attributes Existing HTML attributes for site description element.
* @return string Amended HTML attributes for site description element.
*/
function abte_add_site_description_class( $attributes ) {
$attributes['class'] .= ' screen-reader-text';
return $attributes;
}
+666
View File
@@ -0,0 +1,666 @@
<?php
/**
* Yeu Chay Bo Theme
*
* This file adds the color library used in the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort..
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Yeu Chay Bo Color Class
*
* A color utility that helps manipulate HEX colors.
*
* @author Arlo Carreon <http://arlocarreon.com>
* @link http://mexitek.github.io/phpColors/
* @license http://arlo.mit-license.org/
*/
class Corporate_Color {
/**
* HEX color.
*
* @var string
*/
private $_hex;
/**
* HSL color.
*
* @var string
*/
private $_hsl;
/**
* RGBA color.
*
* @var string
*/
private $_rgb;
/**
* Auto darkens/lightens by 10% for sexily-subtle gradients.
* Set this to FALSE to adjust automatic shade to be between given color
* and black (for darken) or white (for lighten)
*/
const DEFAULT_ADJUST = 10;
/**
* Instantiates the class with a HEX value
*
* @param string $hex Hex color.
*
* @throws Exception Bad color format.
*
* @return void
*/
function __construct( $hex ) {
// Strip # sign is present.
$color = str_replace( '#', '', $hex );
// Make sure it's 6 digits.
if ( strlen( $color ) === 3 ) {
$color = $color[0] . $color[0] . $color[1] . $color[1] . $color[2] . $color[2];
} elseif ( strlen( $color ) !== 6 ) {
throw new Exception( 'HEX color needs to be 6 or 3 digits long' );
}
$this->_hsl = self::hex_to_hsl( $color );
$this->_hex = $color;
$this->_rgb = self::hex_to_rgb( $color );
}
/*
|--------------------------------------------------------------------------
| Public interface
|--------------------------------------------------------------------------
*/
/**
* Given a HEX string returns a HSL array equivalent.
*
* @param string $color Color to convert.
*
* @return array HSL associative array
*/
public static function hex_to_hsl( $color ) {
// Sanity check.
$color = self::_check_hex( $color );
// Convert HEX to DEC.
$r = hexdec( $color[0] . $color[1] );
$g = hexdec( $color[2] . $color[3] );
$b = hexdec( $color[4] . $color[5] );
$hsl = array();
$var_r = ( $r / 255 );
$var_g = ( $g / 255 );
$var_b = ( $b / 255 );
$var_min = min( $var_r, $var_g, $var_b );
$var_max = max( $var_r, $var_g, $var_b );
$del_max = $var_max - $var_min;
$l = ( $var_max + $var_min ) / 2;
if ( 0 === $del_max ) {
$h = 0;
$s = 0;
} else {
if ( $l < 0.5 ) {
$s = $del_max / ( $var_max + $var_min );
} else {
$s = $del_max / ( 2 - $var_max - $var_min );
}
$del_r = ( ( ( $var_max - $var_r ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
$del_g = ( ( ( $var_max - $var_g ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
$del_b = ( ( ( $var_max - $var_b ) / 6 ) + ( $del_max / 2 ) ) / $del_max;
if ( $var_r === $var_max ) {
$h = $del_b - $del_g;
} elseif ( $var_g === $var_max ) {
$h = ( 1 / 3 ) + $del_r - $del_b;
} elseif ( $var_b === $var_max ) {
$h = ( 2 / 3 ) + $del_g - $del_r;
}
if ( $h < 0 ) {
$h ++;
}
if ( $h > 1 ) {
$h --;
}
}
$hsl['H'] = ( $h * 360 );
$hsl['S'] = $s;
$hsl['L'] = $l;
return $hsl;
}
/**
* Given a HSL associative array returns the equivalent HEX string
*
* @param array $hsl HSL color to check.
*
* @throws Exception Bad HSL Array.
*
* @return string HEX string
*/
public static function hsl_to_hex( $hsl = array() ) {
// Make sure it's HSL.
if ( empty( $hsl ) || ! isset( $hsl['H'] ) || ! isset( $hsl['S'] ) || ! isset( $hsl['L'] ) ) {
throw new Exception( 'Param was not an HSL array' );
}
list( $h, $s, $l ) = array( $hsl['H'] / 360, $hsl['S'], $hsl['L'] );
if ( 0 === $s ) {
$r = $l * 255;
$g = $l * 255;
$b = $l * 255;
} else {
if ( $l < 0.5 ) {
$var_2 = $l * ( 1 + $s );
} else {
$var_2 = ( $l + $s ) - ( $s * $l );
}
$var_1 = 2 * $l - $var_2;
$r = round( 255 * self::_huetorgb( $var_1, $var_2, $h + ( 1 / 3 ) ) );
$g = round( 255 * self::_huetorgb( $var_1, $var_2, $h ) );
$b = round( 255 * self::_huetorgb( $var_1, $var_2, $h - ( 1 / 3 ) ) );
}
// Convert to hex.
$r = dechex( $r );
$g = dechex( $g );
$b = dechex( $b );
// Make sure we get 2 digits for decimals.
$r = ( strlen( '' . $r ) === 1 ) ? '0' . $r : $r;
$g = ( strlen( '' . $g ) === 1 ) ? '0' . $g : $g;
$b = ( strlen( '' . $b ) === 1 ) ? '0' . $b : $b;
return $r . $g . $b;
}
/**
* Given a HEX string returns a RGB array equivalent.
*
* @param string $color Hex color to check.
*
* @return array RGB associative array
*/
public static function hex_to_rgb( $color ) {
// Sanity check.
$color = self::_check_hex( $color );
// Convert HEX to DEC.
$r = hexdec( $color[0] . $color[1] );
$g = hexdec( $color[2] . $color[3] );
$b = hexdec( $color[4] . $color[5] );
$rgb['R'] = $r;
$rgb['G'] = $g;
$rgb['B'] = $b;
return $rgb;
}
/**
* Given an RGB associative array returns the equivalent HEX string
*
* @param array $rgb RGB color to check.
*
* @return string RGB string
* @throws Exception Bad RGB Array.
*/
public static function rgb_to_hex( $rgb = array() ) {
// Make sure it's RGB.
if ( empty( $rgb ) || ! isset( $rgb['R'] ) || ! isset( $rgb['G'] ) || ! isset( $rgb['B'] ) ) {
throw new Exception( 'Param was not an RGB array' );
}
/*
* Convert RGB to HEX.
* @link https://github.com/mexitek/phpColors/issues/25#issuecomment-88354815.
*/
$hex[0] = str_pad( dechex( $rgb['R'] ), 2, '0', STR_PAD_LEFT );
$hex[1] = str_pad( dechex( $rgb['G'] ), 2, '0', STR_PAD_LEFT );
$hex[2] = str_pad( dechex( $rgb['B'] ), 2, '0', STR_PAD_LEFT );
return implode( '', $hex );
}
/**
* Given a HEX value, returns a darker color. If no desired amount provided,
* then the color halfway between given HEX and black will be returned.
*
* @param int $amount Amount to darken.
*
* @return string Darker HEX value
*/
public function darken( $amount = self::DEFAULT_ADJUST ) {
// Darken.
$darker_hsl = $this->_darken( $this->_hsl, $amount );
// Return as HEX.
return self::hsl_to_hex( $darker_hsl );
}
/**
* Given a HEX value, returns a lighter color. If no desired amount provided, then the color halfway between
* given HEX and white will be returned.
*
* @param int $amount Amount to lighten.
*
* @return string Lighter HEX value
*/
public function lighten( $amount = self::DEFAULT_ADJUST ) {
// Lighten.
$lighter_hsl = $this->_lighten( $this->_hsl, $amount );
// Return as HEX.
return self::hsl_to_hex( $lighter_hsl );
}
/**
* Given a HEX value, returns a mixed color. If no desired amount
* provided, then the color mixed by this ratio.
*
* @param string $hex2 Secondary HEX value to mix with.
* @param int $amount = -100..0..+100.
*
* @return string mixed HEX value
*/
public function mix( $hex2, $amount = 0 ) {
$rgb2 = self::hex_to_rgb( $hex2 );
$mixed = $this->_mix( $this->_rgb, $rgb2, $amount );
// Return as HEX.
return self::rgb_to_hex( $mixed );
}
/**
* Creates an array with two shades that can be used to make a gradient.
*
* @param int $amount Optional percentage amount you want your contrast color.
*
* @return array An array with a 'light' and 'dark' index
*/
public function make_gradient( $amount = self::DEFAULT_ADJUST ) {
// Decide which color needs to be made.
if ( $this->is_light() ) {
$light_color = $this->_hex;
$dark_color = $this->darken( $amount );
} else {
$light_color = $this->lighten( $amount );
$dark_color = $this->_hex;
}
// Return our gradient array.
return array(
'light' => $light_color,
'dark' => $dark_color,
);
}
/**
* Returns whether or not given color is considered "light"
*
* @param string|Boolean $color Color to check.
* @param int $lighter_than Light amount.
*
* @return boolean
*/
public function is_light( $color = false, $lighter_than = 130 ) {
// Get our color.
$color = ( $color ) ? $color : $this->_hex;
// Calculate straight from rbg.
$r = hexdec( $color[0] . $color[1] );
$g = hexdec( $color[2] . $color[3] );
$b = hexdec( $color[4] . $color[5] );
return ( ( $r * 299 + $g * 587 + $b * 114 ) / 1000 > $lighter_than );
}
/**
* Returns whether or not a given color is considered "dark"
*
* @param string|Boolean $color Color to check.
* @param int $darker_than Darkness.
*
* @return boolean
*/
public function is_dark( $color = false, $darker_than = 130 ) {
// Get our color.
$color = ( $color ) ? $color : $this->_hex;
// Calculate straight from rbg.
$r = hexdec( $color[0] . $color[1] );
$g = hexdec( $color[2] . $color[3] );
$b = hexdec( $color[4] . $color[5] );
return ( ( $r * 299 + $g * 587 + $b * 114 ) / 1000 <= $darker_than );
}
/**
* Returns the complimentary color.
*
* @return string Complementary hex color
*/
public function complementary() {
// Get our HSL.
$hsl = $this->_hsl;
// Adjust Hue 180 degrees.
$hsl['H'] += ( $hsl['H'] > 180 ) ? - 180 : 180;
// Return the new value in HEX.
return self::hsl_to_hex( $hsl );
}
/**
* Returns your color's HSL array
*/
public function get_hsl() {
return $this->_hsl;
}
/**
* Returns your original color
*/
public function get_hex() {
return $this->_hex;
}
/**
* Returns your color's RGB array
*/
public function get_rgb() {
return $this->_rgb;
}
/**
* Returns the cross browser CSS3 gradient
*
* @param int $amount Optional: percentage amount to light/darken the gradient.
* @param boolean $vintage_browsers Optional: include vendor prefixes for browsers that almost died out already.
* @param string $suffix Optional: suffix for every lines.
* @param string $prefix Optional: prefix for every lines.
*
* @link http://caniuse.com/css-gradients Resource for the browser support
*
* @return string CSS3 gradient for chrome, safari, firefox, opera and IE10
*/
public function get_css_gradient( $amount = self::DEFAULT_ADJUST, $vintage_browsers = false, $suffix = '', $prefix = '' ) {
// Get the recommended gradient.
$g = $this->make_gradient( $amount );
$css = '';
// Fallback/image non-cover color.
$css .= "{$prefix}background-color: #" . $this->_hex . ";{$suffix}";
// IE Browsers.
$css .= "{$prefix}filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#" . $g['light'] . "', endColorstr='#" . $g['dark'] . "');{$suffix}";
// Safari 4+, Chrome 1-9.
if ( $vintage_browsers ) {
$css .= "{$prefix}background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#" . $g['light'] . '), to(#' . $g['dark'] . "));{$suffix}";
}
// Safari 5.1+, Mobile Safari, Chrome 10+.
$css .= "{$prefix}background-image: -webkit-linear-gradient(top, #" . $g['light'] . ', #' . $g['dark'] . ");{$suffix}";
// Firefox 3.6+.
if ( $vintage_browsers ) {
$css .= "{$prefix}background-image: -moz-linear-gradient(top, #" . $g['light'] . ', #' . $g['dark'] . ");{$suffix}";
}
// Opera 11.10+.
if ( $vintage_browsers ) {
$css .= "{$prefix}background-image: -o-linear-gradient(top, #" . $g['light'] . ', #' . $g['dark'] . ");{$suffix}";
}
// Unprefixed version (standards): FF 16+, IE10+, Chrome 26+, Safari 7+, Opera 12.1+.
$css .= "{$prefix}background-image: linear-gradient(to bottom, #" . $g['light'] . ', #' . $g['dark'] . ");{$suffix}";
// Return our CSS.
return $css;
}
/*
|--------------------------------------------------------------------------
| Private functions.
|--------------------------------------------------------------------------
*/
/**
* Darkens a given HSL array
*
* @param array $hsl HSL color to check.
* @param int $amount Amount to darken.
*
* @return array $hsl
*/
private function _darken( $hsl, $amount = self::DEFAULT_ADJUST ) {
// Check if we were provided a number.
if ( $amount ) {
$hsl['L'] = ( $hsl['L'] * 100 ) - $amount;
$hsl['L'] = ( $hsl['L'] < 0 ) ? 0 : $hsl['L'] / 100;
} else {
// We need to find out how much to darken.
$hsl['L'] = $hsl['L'] / 2;
}
return $hsl;
}
/**
* Lightens a given HSL array
*
* @param array $hsl HSL color to check.
* @param int $amount Amount to darken.
*
* @return array $hsl
*/
private function _lighten( $hsl, $amount = self::DEFAULT_ADJUST ) {
// Check if we were provided a number.
if ( $amount ) {
$hsl['L'] = ( $hsl['L'] * 100 ) + $amount;
$hsl['L'] = ( $hsl['L'] > 100 ) ? 1 : $hsl['L'] / 100;
} else {
// We need to find out how much to lighten.
$hsl['L'] += ( 1 - $hsl['L'] ) / 2;
}
return $hsl;
}
/**
* Mix 2 rgb colors and return an rgb color
*
* @param array $rgb1 First RGBA color.
* @param array $rgb2 Second RGBA color.
* @param int $amount ranged -100..0..+100.
*
* @link http://phpxref.pagelines.com/nav.html?includes/class.colors.php.source.html
*
* @return array $rgb
*/
private function _mix( $rgb1, $rgb2, $amount = 0 ) {
$r1 = ( $amount + 100 ) / 100;
$r2 = 2 - $r1;
$rmix = ( ( $rgb1['R'] * $r1 ) + ( $rgb2['R'] * $r2 ) ) / 2;
$gmix = ( ( $rgb1['G'] * $r1 ) + ( $rgb2['G'] * $r2 ) ) / 2;
$bmix = ( ( $rgb1['B'] * $r1 ) + ( $rgb2['B'] * $r2 ) ) / 2;
return array(
'R' => $rmix,
'G' => $gmix,
'B' => $bmix,
);
}
/**
* Given a Hue, returns corresponding RGB value
*
* @param int $v1 First value.
* @param int $v2 Second value.
* @param int $vh Third value.
*
* @return int
*/
private static function _huetorgb( $v1, $v2, $vh ) {
if ( $vh < 0 ) {
$vh++;
}
if ( $vh > 1 ) {
$vh--;
}
if ( ( 6 * $vh ) < 1 ) {
return ( $v1 + ( $v2 - $v1 ) * 6 * $vh );
}
if ( ( 2 * $vh ) < 1 ) {
return $v2;
}
if ( ( 3 * $vh ) < 2 ) {
return ( $v1 + ( $v2 - $v1 ) * ( ( 2 / 3 ) - $vh ) * 6 );
}
return $v1;
}
/**
* You need to check if you were given a good hex string
*
* @param string $hex Hex color.
*
* @throws Exception "Bad color format".
*
* @return string Color
*/
private static function _check_hex( $hex ) {
// Strip # sign is present.
$color = str_replace( '#', '', $hex );
// Make sure it's 6 digits.
if ( strlen( $color ) === 3 ) {
$color = $color[0] . $color[0] . $color[1] . $color[1] . $color[2] . $color[2];
} elseif ( strlen( $color ) !== 6 ) {
throw new Exception( 'HEX color needs to be 6 or 3 digits long' );
}
return $color;
}
/**
* Converts object into its string representation
*
* @return string Color
*/
public function __toString() {
return '#' . $this->get_hex();
}
}
+370
View File
@@ -0,0 +1,370 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds Customizer settings to the Yeu Chay Bo theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_action( 'customize_register', 'corporate_customize_register', 20 );
/**
* Sets up the theme Customizer sections, controls, and settings.
*
* @access public
*
* @param object $wp_customize Global Customizer object.
*
* @return void
*/
function corporate_customize_register( $wp_customize ) {
// Globals.
global $wp_customize;
// Load RGBA Customizer control.
include_once CHILD_THEME_DIR . '/includes/rgba.php';
// Remove default colors, using custom instead.
$wp_customize->remove_control( 'background_color' );
$wp_customize->remove_control( 'header_textcolor' );
// Add logo size setting.
$wp_customize->add_setting(
'corporate_logo_size',
array(
'capability' => 'edit_theme_options',
'default' => corporate_logo_size(),
'sanitize_callback' => 'corporate_sanitize_number',
)
);
// Add logo size control.
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'corporate_logo_size',
array(
'label' => __( 'Logo Size', 'yeuchaybo' ),
'description' => __( 'Set the logo size in pixels. Default is ', 'yeuchaybo' ) . corporate_logo_size(),
'settings' => 'corporate_logo_size',
'section' => 'title_tagline',
'type' => 'number',
'priority' => 8,
)
)
);
// Add header settings.
$wp_customize->add_setting( 'corporate_sticky_header' );
// Add header controls.
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'corporate_sticky_header',
array(
'label' => __( 'Enable sticky header', 'yeuchaybo' ),
'settings' => 'corporate_sticky_header',
'section' => 'genesis_layout',
'type' => 'checkbox',
)
)
);
// Add gradient one settings.
$wp_customize->add_setting(
'corporate_gradient_one_color',
array(
'default' => corporate_gradient_one_color(),
'sanitize_callback' => 'sanitize_hex_color',
)
);
// Add gradient one controls.
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'corporate_gradient_one_color',
array(
'label' => __( 'Gradient One Color', 'yeuchaybo' ),
'settings' => 'corporate_gradient_one_color',
'section' => 'colors',
)
)
);
// Add gradient two settings.
$wp_customize->add_setting(
'corporate_gradient_two_color',
array(
'default' => corporate_gradient_two_color(),
'sanitize_callback' => 'sanitize_hex_color',
)
);
// Add gradient two controls.
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'corporate_gradient_two_color',
array(
'label' => __( 'Gradient Two Color', 'yeuchaybo' ),
'settings' => 'corporate_gradient_two_color',
'section' => 'colors',
)
)
);
// Add color setting.
$wp_customize->add_setting(
'corporate_overlay_color',
array(
'default' => corporate_overlay_color(),
'sanitize_callback' => 'corporate_sanitize_rgba',
)
);
// Add color control.
$wp_customize->add_control(
new RGBA_Customize_Control(
$wp_customize,
'corporate_overlay_color',
array(
'section' => 'colors',
'label' => __( 'Overlay Color', 'yeuchaybo' ),
'settings' => 'corporate_overlay_color',
'show_opacity' => true,
'palette' => true,
)
)
);
}
add_action( 'wp_enqueue_scripts', 'corporate_customizer_output', 100 );
/**
* Output Customizer styles.
*
* Checks the settings for the colors defined in the Customizer.
* If any of these value are set the appropriate CSS is output.
*
* @var array $corporate_colors Global theme colors.
*/
function corporate_customizer_output() {
// Theme colors.
$gradient_one = get_theme_mod( 'corporate_gradient_one_color', corporate_gradient_one_color() );
$gradient_two = get_theme_mod( 'corporate_gradient_two_color', corporate_gradient_two_color() );
$overlay = get_theme_mod( 'corporate_overlay_color', corporate_overlay_color() );
// Other customizer settings.
$logo_size = get_theme_mod( 'corporate_logo_size', corporate_logo_size() );
// Load color class.
include_once CHILD_THEME_DIR . '/includes/colors.php';
// Initialize accent color.
$accent = new Corporate_Color( $gradient_one );
$mix = '#' . $accent->mix( $gradient_two );
$shadow = corporate_hex_to_rgba( $mix, 0.3 );
// Ensure $css var is empty.
$css = '';
// Logo size CSS.
$css .= ( corporate_logo_size() !== $logo_size ) ? sprintf( '
.wp-custom-logo .title-area {
width: %1$spx;
}
', $logo_size ) : '';
// Overlay color CSS.
$css .= ( corporate_overlay_color() !== $overlay ) ? "
.hero-section:before,
.front-page-5 .image:before,
.front-page-9:before,
.archive.genesis-pro-portfolio .entry:before {
background: {$overlay};
}
" : '';
// Gradient color CSS.
$css .= ( corporate_gradient_one_color() !== $gradient_one || corporate_gradient_two_color() !== $gradient_two ) ? "
.button,
button,
input[type='button'],
input[type='reset'],
input[type='submit'],
.front-page-6,
.archive-pagination .active a,
.wp-block-button a {
background: {$gradient_one};
background: -moz-linear-gradient(-45deg, {$gradient_one} 0%, {$gradient_two} 100%);
background: -webkit-linear-gradient(-45deg, {$gradient_one} 0%,{$gradient_two} 100%);
background: linear-gradient(135deg, {$gradient_one} 0%,{$gradient_two} 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='{$gradient_one}', endColorstr='{$gradient_two}',GradientType=1 );
}
.button:hover,
.button:focus,
button:hover,
button:focus,
input[type='button']:hover,
input[type='button']:focus,
input[type='reset']:hover,
input[type='reset']:focus,
input[type='submit']:hover,
input[type='submit']:focus,
.wp-block-button a:hover,
.wp-block-button a:focus {
box-shadow: 0 0.5rem 2rem -0.5rem rgba({$shadow});
}
.button.outline,
button.outline,
input[type='button'].outline,
input[type='reset'].outline,
input[type='submit'].outline {
color: {$mix};
background: transparent;
box-shadow: inset 0 0 0 2px {$mix};
}
.button.outline:hover,
.button.outline:focus,
button.outline:hover,
button.outline:focus,
input[type='button'].outline:hover,
input[type='button'].outline:focus,
input[type='reset'].outline:hover,
input[type='reset'].outline:focus,
input[type='submit'].outline:hover,
input[type='submit'].outline:focus {
background-color: {$mix};
background: {$gradient_one};
background: -moz-linear-gradient(-45deg, {$gradient_one} 0%, {$gradient_two} 100%);
background: -webkit-linear-gradient(-45deg, {$gradient_one} 0%,{$gradient_two} 100%);
background: linear-gradient(135deg, {$gradient_one} 0%,{$gradient_two} 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='{$gradient_one}', endColorstr='{$gradient_two}',GradientType=1 );
}
a,
.sidebar a:hover,
.sidebar a:focus,
.site-footer a:hover,
.site-footer a:focus,
.entry-title a:hover,
.entry-title a:focus,
.menu-item a:hover,
.menu-item a:focus,
.menu-item.current-menu-item > a,
.site-footer .menu-item a:hover,
.site-footer .menu-item a:focus,
.site-footer .menu-item.current-menu-item > a,
.entry-content p a:not(.button):hover,
.entry-content p a:not(.button):focus,
.pricing-table strong,
div.gs-faq .gs-faq__question:hover,
div.gs-faq .gs-faq__question:focus {
color: {$mix};
}
input:focus,
select:focus,
textarea:focus {
border-color: {$mix};
}
.entry-content p a:not(.button) {
box-shadow: inset 0 -1.5px 0 {$mix};
}
" : '';
// WooCommerce only styles.
if ( corporate_is_woocommerce_page() ) {
$css .= ( corporate_gradient_one_color() !== $gradient_one || corporate_gradient_two_color() !== $gradient_two ) ? "
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce a.button.alt,
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce input.button,
.woocommerce input.button.alt,
.woocommerce input.button[type=submit],
.woocommerce input.button[type=submit].alt {
background: {$gradient_one};
background: -moz-linear-gradient(-45deg, {$gradient_one} 0%, {$gradient_two} 100%);
background: -webkit-linear-gradient(-45deg, {$gradient_one} 0%,{$gradient_two} 100%);
background: linear-gradient(135deg, {$gradient_one} 0%,{$gradient_two} 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='{$gradient_one}', endColorstr='{$gradient_two}',GradientType=1 );
}
.woocommerce #respond input#submit:focus,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:focus,
.woocommerce a.button.alt:hover,
.woocommerce a.button:focus,
.woocommerce a.button:hover,
.woocommerce button.button.alt:focus,
.woocommerce button.button.alt:hover,
.woocommerce button.button:focus,
.woocommerce button.button:hover,
.woocommerce input.button.alt:focus,
.woocommerce input.button.alt:hover,
.woocommerce input.button:focus,
.woocommerce input.button:hover,
.woocommerce input.button[type=submit].alt:focus,
.woocommerce input.button[type=submit].alt:hover,
.woocommerce input.button[type=submit]:focus,
.woocommerce input.button[type=submit]:hover {
background: {$gradient_one};
background: -moz-linear-gradient(-45deg, {$gradient_one} 0%, {$gradient_two} 100%);
background: -webkit-linear-gradient(-45deg, {$gradient_one} 0%,{$gradient_two} 100%);
background: linear-gradient(135deg, {$gradient_one} 0%,{$gradient_two} 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='{$gradient_one}', endColorstr='{$gradient_two}',GradientType=1 );
box-shadow: 0 0.5rem 2rem -0.5rem rgba({$shadow});
}
.woocommerce div.product p.price,
.woocommerce div.product span.price,
div.gs-faq .gs-faq__question:hover,
div.gs-faq .gs-faq__question:focus {
color: {$mix};
}
" : '';
}
// 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, corporate_minify_css( $css ) );
}
}
+353
View File
@@ -0,0 +1,353 @@
<?php
/**
* Yeu Chay Bo
*
* This file registers the required plugins for the Yeu Chay Bo theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'icon_widget_default_font', 'corporate_icon_widget_default_font' );
/**
* Set the default icon widget font.
*
* @since 1.0.0
*
* @return string
*/
function corporate_icon_widget_default_font() {
return 'streamline';
}
add_filter( 'icon_widget_default_color', 'corporate_icon_widget_default_color' );
/**
* Set the default icon widget font.
*
* @since 1.0.0
*
* @return string
*/
function corporate_icon_widget_default_color() {
return corporate_gradient_two_color();
}
add_filter( 'icon_widget_default_size', 'corporate_icon_widget_default_size' );
/**
* Set the default icon widget font.
*
* @since 1.0.0
*
* @return string
*/
function corporate_icon_widget_default_size() {
return '2x';
}
add_filter( 'icon_widget_default_align', 'corporate_icon_widget_default_align' );
/**
* Set the default icon widget font.
*
* @since 1.0.0
*
* @return string
*/
function corporate_icon_widget_default_align() {
return 'left';
}
add_filter( 'seo_slider_default_overlay', 'corporate_default_slider_overlay' );
/**
* Set the default slider overlay color.
*
* @since 1.0.0
*
* @return string
*/
function corporate_default_slider_overlay() {
return corporate_overlay_color();
}
add_filter( 'genesis_theme_settings_defaults', 'corporate_theme_defaults' );
/**
* Update theme settings upon reset.
*
* @since 1.0.0
*
* @param array $defaults Default theme settings.
*
* @return array Custom theme settings.
*/
function corporate_theme_defaults( $defaults ) {
$defaults['blog_cat_num'] = 6;
$defaults['content_archive'] = 'excerpt';
$defaults['content_archive_limit'] = 150;
$defaults['content_archive_thumbnail'] = 1;
$defaults['image_alignment'] = 'alignnone';
$defaults['posts_nav'] = 'numeric';
$defaults['image_size'] = 'portfolio';
$defaults['site_layout'] = 'full-width-content';
return $defaults;
}
add_action( 'after_switch_theme', 'corporate_theme_setting_defaults' );
/**
* Update theme settings upon activation.
*
* @since 1.0.0
*
* @return void
*/
function corporate_theme_setting_defaults() {
if ( function_exists( 'genesis_update_settings' ) ) {
genesis_update_settings( array(
'blog_cat_num' => 6,
'content_archive' => 'excerpt',
'content_archive_limit' => 150,
'content_archive_thumbnail' => 1,
'image_alignment' => 'alignnone',
'image_size' => 'portfolio',
'posts_nav' => 'numeric',
'site_layout' => 'full-width-content',
) );
}
update_option( 'posts_per_page', 9 );
}
add_filter( 'simple_social_default_styles', 'corporate_social_default_styles' );
/**
* Set the Simple Social Icon defaults.
*
* @since 1.0.0
*
* @param array $defaults Default Simple Social Icons settings.
*
* @return array Custom settings.
*/
function corporate_social_default_styles( $defaults ) {
$args = array(
'alignment' => 'alignleft',
'background_color' => '#fdfeff',
'background_color_hover' => '#fdfeff',
'border_radius' => 0,
'border_color' => '#fdfeff',
'border_color_hover' => '#fdfeff',
'border_width' => 0,
'icon_color' => '#c6cace',
'icon_color_hover' => corporate_gradient_two_color(),
'size' => 40,
'new_window' => 1,
'facebook' => '#',
'gplus' => '#',
'instagram' => '#',
'dribbble' => '#',
'twitter' => '#',
'youtube' => '#',
);
$args = wp_parse_args( $args, $defaults );
return $args;
}
add_filter( 'gsw_settings_defaults', 'corporate_testimonial_defaults' );
/**
* Filter the default Genesis Testimonial Slider settings.
*
* @since 1.0.0
*
* @param array $defaults Default plugin settings.
*
* @return array
*/
function corporate_testimonial_defaults( $defaults ) {
$defaults = array(
'gts_autoplay' => 'yes',
'gts_column' => 'three',
'gts_controls' => 'yes',
'gts_loop' => 'yes',
'gts_effect' => 'slide',
'gts_pause' => 'yes',
'gts_speed' => '6000',
);
return $defaults;
}
add_filter( 'genesis_widget_column_classes', 'corporate_widget_columns' );
/**
* Add additional column class to plugin.
*
* @since 1.0.0
*
* @param array $column_classes Array of column classes.
*
* @return array Modified column classes.
*/
function corporate_widget_columns( $column_classes ) {
$column_classes[] = 'full-width';
return $column_classes;
}
add_action( 'after_switch_theme', 'corporate_excerpt_metabox' );
/**
* Display excerpt metabox by default.
*
* 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 life easier, we want to display the metabox
* by default and that's what this function does. It is only run
* after switching theme so the current user's screen options
* are updated which allows them to hide the metabox again.
*
* @since 1.0.0
*
* @return void
*/
function corporate_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( 'pt-ocdi/import_files', 'corporate_import_files' );
/**
* One click demo import settings.
*
* @since 1.0.0
*
* @return array
*/
function corporate_import_files() {
return array(
array(
'local_import_file' => CHILD_THEME_DIR . '/sample.xml',
'local_import_widget_file' => CHILD_THEME_DIR . '/widgets.wie',
'local_import_customizer_file' => CHILD_THEME_DIR . '/customizer.dat',
'import_file_name' => 'Demo Import',
'categories' => false,
'local_import_redux' => false,
'import_preview_image_url' => false,
'import_notice' => false,
),
);
}
add_filter( 'pt-ocdi/after_all_import_execution', 'corporate_after_demo_import', 999 );
/**
* Set default pages after demo import.
*
* Automatically creates and sets the Static Front Page and the Page for Posts
* upon theme activation, only if these pages don't already exist and only
* if the site does not already display a static page on the homepage.
*
* @since 1.0.0
*
* @return void
*/
function corporate_after_demo_import() {
// Assign menus to their locations.
$menu = get_term_by( 'name', 'Header Menu', 'nav_menu' );
set_theme_mod( 'nav_menu_locations', array(
'primary' => $menu->term_id,
) );
// Assign front page and posts page (blog page).
$home = get_page_by_title( 'Home' );
$news = get_page_by_title( 'News' );
update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', $home->ID );
update_option( 'page_for_posts', $news->ID );
// Set the WooCommerce shop page.
$shop = get_page_by_title( 'Shop' );
update_option( 'woocommerce_shop_page_id', $shop->ID );
// Trash "Hello World" post.
wp_delete_post( 1 );
}
+587
View File
@@ -0,0 +1,587 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds general theme functions to the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'body_class', 'corporate_body_classes' );
/**
* Add additional classes to the body element.
*
* Adds some extra classes to the body element which help with styling the
* same elements differently depending on which settings the user has
* chosen from either the Customizer, Widget Areas or Navigation.
*
* @since 1.0.0
*
* @param array $classes Body classes.
*
* @return array
*/
function corporate_body_classes( $classes ) {
if ( true === get_theme_mod( 'corporate_sticky_header', false ) ) {
$classes[] = 'sticky-header';
}
if ( is_active_sidebar( 'before-header' ) ) {
$classes[] = 'has-before-header';
}
if ( has_nav_menu( 'secondary' ) ) {
$classes[] = 'has-nav-secondary';
}
if ( is_page_template( 'page_blog.php' ) ) {
$classes[] = 'blog';
$classes = array_diff( $classes, [ 'page' ] );
}
if ( corporate_sidebar_has_widget( 'front-page-1', 'seo_slider' ) ) {
$classes[] = 'has-hero-slider';
}
$classes[] = 'no-js';
return $classes;
}
add_action( 'genesis_before', 'corporate_js_nojs_script', 1 );
/**
* Echo out the script that changes 'no-js' class to 'js'.
*
* Adds a script on the genesis_before hook which immediately changes the
* class to js if JavaScript is enabled. This is how WP does things on
* the back end, to allow different styles for the same elements
* depending if JavaScript is active or not.
*
* Outputting the script immediately also reduces a flash of incorrectly
* styled content, as the page does not load with no-js styles, then
* switch to js once everything has finished loading.
*
* @since 1.0.0
*
* @return void
*/
function corporate_js_nojs_script() {
?>
<script>
//<![CDATA[
(function(){
var c = document.body.classList;
c.remove( 'no-js' );
c.add( 'js' );
})();
//]]>
</script>
<?php
}
add_filter( 'genesis_attr_title-area', 'corporate_title_area_schema' );
/**
* Add schema microdata to title-area.
*
* By default, Genesis applies no schema microdata to the title area element.
* Since this is a business theme, the site title is usually the business
* name, so we want to mark up this section with the relevant schema.
*
* @since 1.0.0
*
* @param array $attr Array of attributes.
*
* @return array
*/
function corporate_title_area_schema( $attr ) {
$attr['itemscope'] = 'itemscope';
$attr['itemtype'] = 'http://schema.org/Organization';
return $attr;
}
add_filter( 'genesis_attr_site-title', 'corporate_site_title_schema' );
/**
* Correct site title schema.
*
* Genesis adds the headline itemprop to the site title by default. Since we
* already have a headline (page title) we can remove this and replace it
* with an itemprop of name which is inside of the Organization scope.
*
* @since 1.0.0
*
* @param array $attr Array of attributes.
*
* @return array
*/
function corporate_site_title_schema( $attr ) {
$attr['itemprop'] = 'name';
return $attr;
}
add_action( 'wp_head', 'corporate_remove_ssi_inline_styles', 1 );
/**
* Remove Simple Social Icons inline CSS.
*
* The default Simple Social Icons styles are no longer needed because we are
* generating custom CSS instead. Removing this means we don't need to use
* !important rules in the multiple instance workaround function below.
*
* @since 1.0.0
*
* @return void
*/
function corporate_remove_ssi_inline_styles() {
if ( class_exists( 'Simple_Social_Icons_Widget' ) ) {
global $wp_widget_factory;
remove_action( 'wp_head', array( $wp_widget_factory->widgets['Simple_Social_Icons_Widget'], 'css' ) );
}
}
add_action( 'wp_head', 'corporate_simple_social_icons_css' );
/**
* Simple Social Icons multiple instances workaround.
*
* By default, Simple Social Icons only allows you to create one style for your
* icons, even if you have multiple on the same page. This function allows us
* to have different styles for each widget that is output on the frontend.
*
* @since 1.0.0
*
* @return void
*/
function corporate_simple_social_icons_css() {
if ( ! class_exists( 'Simple_Social_Icons_Widget' ) ) {
return;
}
$obj = new Simple_Social_Icons_Widget();
// Get widget settings.
$all_instances = $obj->get_settings();
// Loop through instances.
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 );
// CSS to output.
$css = '#' . $obj->id_base . '-' . $key . ' ul li a,
#' . $obj->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;
}
#' . $obj->id_base . '-' . $key . ' ul li a:hover,
#' . $obj->id_base . '-' . $key . ' ul li a:focus {
background-color: ' . $instance['background_color_hover'] . ';
border-color: ' . $instance['border_color_hover'] . ';
color: ' . $instance['icon_color_hover'] . ';
}';
// Minify.
$css = corporate_minify_css( $css );
// Output.
printf( '<style type="text/css" media="screen">%s</style>', $css );
endforeach;
}
add_action( 'init', 'corporate_structural_wrap_hooks' );
/**
* Add hooks before and after Genesis structural wraps.
*
* This is a clever workaround that allows us to insert HTML between a container
* and its immediate descendant .wrap element. These hooks are used to display
* the Before Header widget area, the Secondary Nav and the Footer Widgets.
*
* @since 1.0.0
*
* @author Tim Jensen
* @link https://timjensen.us/add-hooks-before-genesis-structural-wraps
*
* @return void
*/
function corporate_structural_wrap_hooks() {
$wraps = get_theme_support( 'genesis-structural-wraps' );
foreach ( $wraps[0] as $context ) {
/**
* Inserts an action hook before the opening div and after the closing div
* for each of the structural wraps.
*
* @param string $output HTML for opening or closing the structural wrap.
* @param string $original Either 'open' or 'close'.
*
* @return string
*/
add_filter( "genesis_structural_wrap-{$context}", function ( $output, $original ) use ( $context ) {
$position = ( 'open' === $original ) ? 'before' : 'after';
ob_start();
do_action( "genesis_{$position}_{$context}_wrap" );
if ( 'open' === $original ) {
return ob_get_clean() . $output;
} else {
return $output . ob_get_clean();
}
}, 10, 2 );
}
}
add_filter( 'http_request_args', 'corporate_dont_update_theme', 5, 2 );
/**
* Prevent automatic theme updates.
*
* Because WordPress (the software) doesnt know whether a theme or plugin is
* listed in the WordPress.org repositories, it has to check them all, and
* let the repository sort it out. If there is a theme in the repo with
* the same name this prevents WP from prompting an automatic update.
*
* @since 1.0.0
*
* @link https://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/
* @param array $request Request arguments.
* @param string $url Request url.
*
* @return array request arguments
*/
function corporate_dont_update_theme( $request, $url ) {
// Not a theme update request. Bail immediately.
if ( 0 !== strpos( $url, 'http://api.wordpress.org/themes/update-check' ) ) {
return $request;
}
$themes = unserialize( $request['body']['themes'] );
unset( $themes[ get_option( 'template' ) ] );
unset( $themes[ get_option( 'stylesheet' ) ] );
$request['body']['themes'] = serialize( $themes );
return $request;
}
add_filter( 'agm_custom_styles', 'corporate_map_styles' );
/**
* Custom Google map style (Ultra Light).
*
* Adds a custom Google map style to the Google Map plugin used in the theme demo.
* The JSON file used in this function can be found in the top level directory
* of the theme. More information can be found by following the links below.
*
* @since 1.0.0
*
* @link https://github.com/ankurk91/wp-google-map/wiki/How-to-add-your-own-styles
* @link https://snazzymaps.com/style/85413/cartagena
* @param array $json Array of JSON data.
*
* @return array
*/
function corporate_map_styles( $json ) {
array_push( $json, array(
'id' => '123456789',
'name' => 'Ultra Light',
'style' => json_decode( file_get_contents( CHILD_THEME_DIR . '/map.json' ), true ),
) );
return $json;
}
add_filter( 'genesis_markup_title-area_close', 'corporate_after_title_area', 10, 2 );
/**
* Appends HTML to the closing markup for .title-area.
*
* Adding something between the title + description and widget area used to require
* re-building genesis_do_header(). However, since the title-area closing markup
* now goes through genesis_markup(), it means we now have some extra filters
* to play with. This function makes use of this and adds in an extra hook
* after the title-area used for displaying the primary navigation menu.
*
* @since 1.0.0
*
* @param string $close_html HTML tag being processed by the API.
* @param array $args Array with markup arguments.
*
* @return string
*/
function corporate_after_title_area( $close_html, $args ) {
if ( $close_html ) {
ob_start();
do_action( 'genesis_after_title_area' );
$close_html = $close_html . ob_get_clean();
}
return $close_html;
}
//add_filter( 'display_posts_shortcode_output', 'corporate_remove_listing_link', 20 );
/**
* Remove redundant link from listing item.
*
* By default, the Display Posts Shortcode outputs Adjacent links go to the same URL.
* When adjacent links go to the same location (such as a linked product image and
* an adjacent linked product name that go to the same product page) this results
* in additional navigation and repetition for keyboard and screen reader users.
* To meet 508 compliance and WCAG, we need to remove these redundant links.
*
* @since 1.0.0
*
* @link https://webaim.org/standards/wcag/checklist#sc2.4.4
* @param string $output Display posts output.
*
* @return string
*/
function corporate_remove_listing_link( $output ) {
$output = str_replace( '<a class="title"', '<h3 class="title"', $output );
$output = str_replace( '</a></li>', '</h3></li>', $output );
return $output;
}
add_action( 'genesis_entry_header', 'corporate_reposition_post_meta', 0 );
/**
* Reposition post info and remove excerpts on archives.
*
* Small customization to reposition the post info and remove the excerpt links
* on all archive pages including search results, blog page, categories etc.
*
* @since 1.0.0
*
* @return void
*/
function corporate_reposition_post_meta() {
if ( is_archive() || is_home() || is_search() || is_post_type_archive() ) {
// Reposition post meta.
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_header', 'genesis_post_info', 1 );
// Remove read more link on archives.
add_filter( 'get_the_content_more_link', '__return_empty_string' );
}
}
add_filter( 'genesis_post_info', 'corporate_post_info_date' );
/**
* Change the default post info on archives.
*
* Replaces the default post info (author, comments, edit link) with just the
* date of the post, which is then repositioned above the entry title with
* the corporate_reposition_post_meta() function above on archive pages.
*
* @since 1.0.0
*
* @param string $post_info The default post information.
*
* @return string
*/
function corporate_post_info_date( $post_info ) {
if ( is_archive() || is_home() || is_search() || is_post_type_archive() ) {
$post_info = '[post_date]';
}
return $post_info;
}
add_filter( 'genesis_post_meta', 'corporate_post_meta_filter' );
/**
* Customize the entry meta in the entry footer.
*
* This function filters the genesis post meta to display SVG icons before the
* post categories and post tags on archive pages including the search page,
* blog, category and tag pages. SVG images are included with the theme.
*
* @since 1.0.0
*
* @param string $post_meta Default post meta.
*
* @return string
*/
function corporate_post_meta_filter( $post_meta ) {
if ( is_archive() || is_home() || is_search() || ! is_post_type_archive() ) {
$cat_alt = apply_filters( 'corporate_cat_alt', __( 'Category icon', 'yeuchaybo' ) );
$tag_alt = apply_filters( 'corporate_tag_alt', __( 'Tag icon', 'yeuchaybo' ) );
$cat_img = '<img width=\'20\' height=\'20\' alt=\'' . $cat_alt . '\' src=\'' . CHILD_THEME_URI . '/assets/images/cats.svg\'>';
$tag_img = '<img width=\'20\' height=\'20\' alt=\'' . $tag_alt . '\' src=\'' . CHILD_THEME_URI . '/assets/images/tags.svg\'>';
$post_meta = '[post_categories before="' . $cat_img . '" sep=",&nbsp;"] [post_tags before="' . $tag_img . '" sep=",&nbsp;"]';
}
return $post_meta;
}
add_filter( 'genesis_attr_site-container', 'corporate_primary_nav_id' );
/**
* Add ID attribute to site-container.
*
* This adds an ID attribute to the site-container by filtering the element
* attributes so that the "Return to Top" link has something to link to.
*
* @since 1.0.0
*
* @param array $atts Navigation attributes.
*
* @return array
*/
function corporate_primary_nav_id( $atts ) {
$atts['id'] = 'top';
return $atts;
}
add_shortcode( 'footer_backtotop', 'corporate_footer_backtotop_shortcode' );
/**
* Produces the "Return to Top" link.
*
* Supported shortcode attributes are:
* - after (output after link, default is empty string),
* - before (output before link, default is empty string),
* - href (link url, default is fragment identifier '#wrap'),
* - nofollow (boolean for whether to include rel="nofollow", default is true),
* - text (Link text, default is 'Return to top of page').
*
* Output passes through `corporate_footer_backtotop_shortcode` filter before returning.
*
* @since 1.0.0
*
* @param array|string $atts Shortcode attributes. Empty string if no attributes.
*
* @return string Output for `footer_backtotop` shortcode.
*/
function corporate_footer_backtotop_shortcode( $atts ) {
$defaults = array(
'after' => '',
'before' => '',
'href' => '#top',
'nofollow' => true,
'text' => __( 'Return to top', 'genesis' ),
);
$atts = shortcode_atts( $defaults, $atts, 'footer_backtotop' );
$nofollow = $atts['nofollow'] ? 'rel="nofollow"' : '';
$output = sprintf( '%s<a href="%s" %s>%s</a>%s', $atts['before'], esc_url( $atts['href'] ), $nofollow, $atts['text'], $atts['after'] );
return apply_filters( 'corporate_footer_backtotop_shortcode', $output, $atts );
}
add_filter( 'genesis_site_layout', 'corporate_search_and_404_page_layouts' );
/**
* Gets a custom page layout for the search results page.
*
* @since 1.0.0
*
* @return string
*/
function corporate_search_and_404_page_layouts() {
if ( is_search() ) {
$page = get_page_by_path( 'search' );
$field = genesis_get_custom_field( '_genesis_layout', $page->ID );
$layout = $field ? $field : genesis_get_option( 'site_layout' );
return $layout;
}
if ( is_404() ) {
$page = get_page_by_path( 'error-404' );
$field = genesis_get_custom_field( '_genesis_layout', $page->ID );
$layout = $field ? $field : genesis_get_option( 'site_layout' );
return $layout;
}
}
+349
View File
@@ -0,0 +1,349 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds helper functions used in the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Returns the default logo size in pixels.
*
* @since 1.0.0
*
* @return string Hex value.
*/
function corporate_logo_size() {
return 150;
}
/**
* Returns the default gradient one color.
*
* @since 1.0.0
*
* @return string Hex value.
*/
function corporate_gradient_one_color() {
return '#00c6ff';
}
/**
* Returns the default gradient two color.
*
* @since 1.0.0
*
* @return string Hex value.
*/
function corporate_gradient_two_color() {
return '#0072ff';
}
/**
* Returns the default overlay color.
*
* @since 1.0.0
*
* @return string Hex value.
*/
function corporate_overlay_color() {
return 'rgba(42,49,57,0.5)';
}
/**
* Custom header image callback.
*
* Loads custom header or featured image depending on what is set on a per
* page basis. If a featured image is set for a page, it will override
* the default header image. It also gets the image for custom post
* types by looking for a page with the same slug as the CPT e.g
* the Portfolio CPT archive will pull the featured image from
* a page with the slug of 'portfolio', if the page exists.
*
* @since 1.0.0
*
* @return string
*/
function corporate_custom_header() {
$id = '';
// Get the current page ID.
if ( class_exists( 'WooCommerce' ) && is_shop() ) {
$id = wc_get_page_id( 'shop' );
} elseif ( is_post_type_archive() ) {
$id = get_page_by_path( get_query_var( 'post_type' ) );
} elseif ( is_front_page() ) {
$id = get_option( 'page_on_front' );
} elseif ( is_home() ) {
$id = get_option( 'page_for_posts' );
} elseif ( is_search() ) {
$id = get_page_by_path( 'search' );
} elseif ( is_404() ) {
$id = get_page_by_path( 'error-404' );
} elseif ( is_singular() ) {
$id = get_the_id();
}
$url = get_the_post_thumbnail_url( $id, 'slider' );
if ( ! $url ) {
$url = get_header_image();
}
return printf( '<style type="text/css">.hero-section{background-image: url(%s);}</style>' . "\n", esc_url( $url ) );
}
/**
* Sanitize number values.
*
* Ensure number is an absolute integer (whole number, zero or greater). If
* input is an absolute integer, return it. Otherwise, return default.
*
* @since 2.0.0
*
* @param string $number The rgba color to sanitize.
* @param string $setting Sanitized value.
*
* @return string
*/
function corporate_sanitize_number( $number, $setting ) {
$number = absint( $number );
return ( $number ? $number : $setting->default );
}
/**
* 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
*/
function corporate_sanitize_rgba( $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.
*
* @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
*/
function corporate_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 );
}
/**
* Helper function to check if we're on a WooCommerce page.
*
* This function is used to check whether or not to output the
* WooCommerce CSS in the corporate_scripts_styles function.
* Since it's a relatively large file, we don't want it to
* load on unnecessary pages where it's not required.
*
* @since 1.0.0
*
* @link https://docs.woocommerce.com/document/conditional-tags/.
*
* @return bool
*/
function corporate_is_woocommerce_page() {
if ( ! class_exists( 'WooCommerce' ) ) {
return false;
}
if ( is_woocommerce() || is_shop() || is_product_category() || is_product_tag() || is_product() || is_cart() || is_checkout() || is_account_page() ) {
return true;
} else {
return false;
}
}
/**
* Convert hex to rgba value.
*
* This function takes a hex code (e.g. #eeeeee) and returns array of RGBA values.
* Used in the corporate_customizer_output function to handle transparency.
*
* @since 1.0.0
*
* @param string $colour Hex color to convert.
* @param int $opacity Opacity amount.
*
* @return string
*/
function corporate_hex_to_rgba( $colour, $opacity ) {
if ( '#' === $colour[0] ) {
$colour = substr( $colour, 1 );
}
if ( strlen( $colour ) === 6 ) {
list( $r, $g, $b ) = array( $colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5] );
} elseif ( strlen( $colour ) === 3 ) {
list( $r, $g, $b ) = array( $colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2] );
} else {
return false;
}
$r = hexdec( $r );
$g = hexdec( $g );
$b = hexdec( $b );
$rgb = array(
'red' => $r,
'green' => $g,
'blue' => $b,
);
$rgba = implode( $rgb, ',' ) . ',' . $opacity;
return $rgba;
}
/**
* Check if Front Page 1 contains slider widget.
*
* @since 1.0.1
*
* @uses $sidebars_widgets
*
* @param string $sidebar Name of sidebar, e.g `primary`.
* @param string $widget Widget ID to check, e.g `custom_html`.
*
* @return bool
*/
function corporate_sidebar_has_widget( $sidebar, $widget ) {
global $sidebars_widgets;
if ( strpos( $sidebars_widgets[ $sidebar ][0], $widget ) !== false && is_active_sidebar( $sidebar ) ) {
return true;
} else {
return false;
}
}
+309
View File
@@ -0,0 +1,309 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the hero section to the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'genesis_attr_entry', 'corporate_entry_attr' );
/**
* Add itemref attribute to link entry-title.
*
* Since the entry-title is repositioned outside of the entry article, we need
* to add some additional microdata so that it is still picked up as a part
* of the entry. By adding the itemref attribute, we are telling search
* engines to check the hero-section element for additional elements.
*
* @since 1.0.0
*
* @link https://www.w3.org/TR/microdata/#dfn-itemref
* @param array $atts Entry attributes.
*
* @return array
*/
function corporate_entry_attr( $atts ) {
if ( is_singular() && did_action( 'genesis_before_entry' ) && ! did_action( 'genesis_after_entry' ) ) {
$atts['itemref'] = 'hero-section';
}
return $atts;
}
add_action( 'genesis_before', 'corporate_hero_section_setup' );
/**
* Set up hero section.
*
* Removes and repositions the title on all possible types of pages. Wrapped
* up into one function so it can easily be unhooked from genesis_before.
*
* @since 1.0.0
*
* @return void
*/
function corporate_hero_section_setup() {
// Remove default hero section.
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_archive_title_descriptions', 'genesis_do_archive_headings_open', 5, 3 );
remove_action( 'genesis_archive_title_descriptions', 'genesis_do_archive_headings_close', 15, 3 );
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 );
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
// Add custom hero section.
add_action( 'corporate_hero_section', 'genesis_do_posts_page_heading' );
add_action( 'corporate_hero_section', 'genesis_do_date_archive_title' );
add_action( 'corporate_hero_section', 'genesis_do_taxonomy_title_description' );
add_action( 'corporate_hero_section', 'genesis_do_author_title_description' );
add_action( 'corporate_hero_section', 'genesis_do_cpt_archive_title_description' );
// Remove search results and shop page titles.
add_filter( 'woocommerce_show_page_title', '__return_null' );
add_filter( 'genesis_search_title_output', '__return_false' );
}
add_action( 'genesis_before_content', 'corporate_remove_404_title' );
/**
* Remove default title of 404 pages.
*
* @since 1.0.0
*
* @return void
*/
function corporate_remove_404_title() {
if ( is_404() ) {
add_filter( 'genesis_markup_entry-title_open', '__return_false' );
add_filter( 'genesis_markup_entry-title_content', '__return_false' );
add_filter( 'genesis_markup_entry-title_close', '__return_false' );
}
}
add_action( 'be_title_toggle_remove', 'corporate_genesis_title_toggle' );
/**
* Integrate with Genesis Title Toggle plugin
*
* @since 1.0.0
*
* @author Bill Erickson
* @link https://www.billerickson.net/code/genesis-title-toggle-theme-integration
*
* @return void
*/
function corporate_genesis_title_toggle() {
remove_action( 'corporate_hero_section', 'corporate_page_title', 10 );
remove_action( 'corporate_hero_section', 'corporate_page_excerpt', 20 );
}
add_action( 'corporate_hero_section', 'corporate_page_title', 10 );
/**
* Display title in hero section.
*
* Works out the correct title to display in the hero section on a per page
* basis. Also adds the entry title back in to the entry inside the loop.
*
* @since 1.0.0
*
* @return void
*/
function corporate_page_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() ) {
genesis_markup( array(
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => get_the_title( wc_get_page_id( 'shop' ) ),
'context' => 'entry-title',
) );
} elseif ( 'posts' === get_option( 'show_on_front' ) && is_home() ) {
genesis_markup( array(
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => apply_filters( 'corporate_latest_posts_title', __( 'Latest Posts', 'yeuchaybo' ) ),
'context' => 'entry-title',
) );
} elseif ( is_404() ) {
genesis_markup( array(
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => apply_filters( 'genesis_404_entry_title', __( 'Not found, error 404', 'yeuchaybo' ) ),
'context' => 'entry-title',
) );
} elseif ( is_search() ) {
genesis_markup( array(
'open' => '<h1 %s>',
'close' => '</h1>',
'content' => apply_filters( 'genesis_search_title_text', __( 'Search results for: ', 'yeuchaybo' ) ) . get_search_query(),
'context' => 'entry-title',
) );
} elseif ( is_page_template( 'page_blog.php' ) ) {
do_action( 'genesis_archive_title_descriptions', get_the_title(), '', 'posts-page-description' );
} elseif ( is_single() || is_singular() ) {
genesis_do_post_title();
}
}
add_action( 'corporate_hero_section', 'corporate_page_excerpt', 20 );
/**
* Display page excerpt.
*
* Prints the correct excerpt on a per page basis. If on the WooCommerce shop
* page then the products result count is be displayed instead of the page
* excerpt. Also, if on a single product then no excerpt will be output.
*
* @since 1.0.0
*
* @return void
*/
function corporate_page_excerpt() {
if ( class_exists( 'WooCommerce' ) && is_shop() ) {
woocommerce_result_count();
} elseif ( is_home() ) {
$id = get_option( 'page_for_posts' );
if ( has_excerpt( $id ) ) {
printf( '<p itemprop="description">%s</p>', do_shortcode( get_the_excerpt( $id ) ) );
}
} elseif ( is_search() ) {
$id = get_page_by_path( 'search' );
if ( has_excerpt( $id ) ) {
printf( '<p itemprop="description">%s</p>', do_shortcode( get_the_excerpt( $id ) ) );
}
} elseif ( is_404() ) {
$id = get_page_by_path( 'error-404' );
if ( has_excerpt( $id ) ) {
printf( '<p itemprop="description">%s</p>', do_shortcode( get_the_excerpt( $id ) ) );
}
} elseif ( ( is_single() || is_singular() ) && ! is_singular( 'product' ) && has_excerpt() ) {
printf( '<p itemprop="description">%s</p>', do_shortcode( get_the_excerpt() ) );
}
}
add_filter( 'genesis_attr_hero-section', 'corporate_hero_section_attr' );
/**
* Callback for dynamic Genesis 'genesis_attr_$context' filter.
*
* Add custom attributes for the custom filter.
*
* @since 1.0.0
*
* @param array $attr The element attributes.
*
* @return array
*/
function corporate_hero_section_attr( $attr ) {
$attr['id'] = 'hero-section';
$attr['role'] = 'banner';
return $attr;
}
add_action( 'genesis_before_content_sidebar_wrap', 'corporate_hero_section' );
/**
* Display the hero section.
*
* Conditionally outputs the opening and closing hero section markup and runs
* corporate_hero_section which all of our header functions are hooked to.
*
* @since 1.0.0
*
* @return void
*/
function corporate_hero_section() {
// Output hero section markup.
genesis_markup( array(
'open' => '<section %s><div class="wrap">',
'context' => 'hero-section',
) );
/**
* Do hero section hook.
*
* @hooked corporate_page_title - 10
* @hooked corporate_page_excerpt - 20
* @hooked genesis_do_posts_page_heading
* @hooked genesis_do_date_archive_title
* @hooked genesis_do_blog_template_heading
* @hooked genesis_do_taxonomy_title_description
* @hooked genesis_do_author_title_description
* @hooked genesis_do_cpt_archive_title_description
*/
do_action( 'corporate_hero_section' );
// Output hero section markup.
genesis_markup( array(
'close' => '</div></section>',
'context' => 'hero-section',
) );
}
+3897
View File
File diff suppressed because it is too large Load Diff
+123
View File
@@ -0,0 +1,123 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the RGBA Customizer control to the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* RGBA Color Picker Customizer Control
*
* This control adds a secondary slider for opacity to the default 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',
CHILD_THEME_URI . '/assets/scripts/min/customize.min.js',
array( 'jquery', 'wp-color-picker' ),
'1.0.0',
true
);
wp_enqueue_style(
'rgba-color-picker',
CHILD_THEME_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.
if ( isset( $this->label ) && '' !== $this->label ) {
echo '<span class="customize-control-title">' . esc_html( $this->label ) . '</span>';
}
?>
<label>
<?php
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
}
}
+155
View File
@@ -0,0 +1,155 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds theme specific functions to the Yeu Chay Bo Theme.
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Register Before Header widget area.
genesis_register_sidebar( array(
'id' => 'before-header',
'name' => __( 'Before Header', 'yeuchaybo' ),
'description' => __( 'Before Header widget area.', 'yeuchaybo' ),
) );
// Register Before Footer widget area.
genesis_register_sidebar( array(
'id' => 'before-footer',
'name' => __( 'Before Footer', 'yeuchaybo' ),
'description' => __( 'Before Footer widget area.', 'yeuchaybo' ),
) );
// Register Footer Credits widget area.
genesis_register_sidebar( array(
'id' => 'footer-credits',
'name' => __( 'Footer Credits', 'yeuchaybo' ),
'description' => __( 'Footer Credits widget area.', 'yeuchaybo' ),
) );
// Register Front Page widget areas.
genesis_register_sidebar( array(
'id' => 'front-page-1',
'name' => __( 'Front Page 1', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a large hero image, video or slider on the home page.', 'yeuchaybo' ),
'before_title' => '<h1 itemprop="headline">',
'after_title' => '</h1>',
) );
genesis_register_sidebar( array(
'id' => 'front-page-2',
'name' => __( 'Front Page 2', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display brand logos on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-3',
'name' => __( 'Front Page 3', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a video section and grid of icons on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-4',
'name' => __( 'Front Page 4', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a large image on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-5',
'name' => __( 'Front Page 5', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display an image gallery on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-6',
'name' => __( 'Front Page 6', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a call to action banner on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-7',
'name' => __( 'Front Page 7', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a pricing table and testimonials on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-8',
'name' => __( 'Front Page 8', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display recent blog posts on the home page.', 'yeuchaybo' ),
) );
genesis_register_sidebar( array(
'id' => 'front-page-9',
'name' => __( 'Front Page 9', 'yeuchaybo' ),
'description' => __( 'This widget area can be used to display a newsletter sign up form on the home page.', 'yeuchaybo' ),
) );
add_action( 'genesis_before_header_wrap', 'corporate_before_header' );
/**
* Display Before Header widget area.
*
* This widget area is hooked to the before header wrap, inside of the
* site-header element and outside of the site-header wrap creating
* a full width section across the top of the screen while still
* keeping semantically valid inside of the site-header scope.
*
* @since 1.0.0
*
* @return void
*/
function corporate_before_header() {
genesis_widget_area( 'before-header', array(
'before' => '<div class="before-header widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
add_action( 'genesis_footer', 'corporate_before_footer' );
/**
* Display Before Footer widget area.
*
* This widget area is hooked to the before footer wrap, inside of the
* site-footer element and outside of the site-footer wrap creating
* a full-width section above the footer widgets, keeping it all
* semantically valid inside of the site-footer element scope.
*
* @since 1.0.0
*
* @return void
*/
function corporate_before_footer() {
genesis_widget_area( 'before-footer', array(
'before' => '<div class="before-footer widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
add_action( 'genesis_footer', 'corporate_footer_credits', 14 );
/**
* Display Footer Credits widget area.
*
* This widget area is hooked to the before footer wrap, inside of the
* site-footer element and outside of the site-footer wrap creating
* a full-width section above the footer widgets, keeping it all
* semantically valid inside of the site-footer element scope.
*
* @since 1.0.0
*
* @return void
*/
function corporate_footer_credits() {
genesis_widget_area( 'footer-credits', array(
'before' => '<div class="footer-credits widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
+530
View File
@@ -0,0 +1,530 @@
# Copyright (C) 2018 Corporate Pro
# This file is distributed under the same license as the Corporate Pro package.
msgid ""
msgstr ""
"Project-Id-Version: Corporate 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: 2018-MO-DA HO:MI+ZONE\n"
"Last-Translator: Lee Anthony <seothemeswp@gmail.com>\n"
"Language-Team: SEO Themes <seothemeswp@gmail.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"
#: functions.php:75
msgid "Header Menu"
msgstr ""
#: functions.php:76
msgid "After Header Menu"
msgstr ""
#: functions.php:156
msgid "Hero Image"
msgstr ""
#: includes/customize.php:59
msgid "Logo Size"
msgstr ""
#: includes/customize.php:60
msgid "Set the logo size in pixels. Default is "
msgstr ""
#: includes/customize.php:78
msgid "Enable sticky header"
msgstr ""
#: includes/customize.php:101
msgid "Gradient One Color"
msgstr ""
#: includes/customize.php:123
msgid "Gradient Two Color"
msgstr ""
#: includes/customize.php:146
msgid "Overlay Color"
msgstr ""
#: includes/hero.php:163
msgid "Latest Posts"
msgstr ""
#: includes/hero.php:172
msgid "Not found, error 404"
msgstr ""
#: includes/hero.php:181
msgid "Search results for: "
msgstr ""
#: includes/plugins.php:461
msgid "Install Required Plugins"
msgstr ""
#: includes/plugins.php:462
msgid "Install Plugins"
msgstr ""
#: includes/plugins.php:464
msgid "Installing Plugin: %s"
msgstr ""
#: includes/plugins.php:466
msgid "Updating Plugin: %s"
msgstr ""
#: includes/plugins.php:467
msgid "Something went wrong with the plugin API."
msgstr ""
#: includes/plugins.php:468
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:474
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:480
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:486
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:492
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:498
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:504
msgid "Begin installing plugin"
msgid_plural "Begin installing plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:509
msgid "Begin updating plugin"
msgid_plural "Begin updating plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:514
msgid "Begin activating plugin"
msgid_plural "Begin activating plugins"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:519
msgid "Return to Required Plugins Installer"
msgstr ""
#: includes/plugins.php:520, includes/plugins.php:961, includes/plugins.php:2667, includes/plugins.php:3714
msgid "Return to the Dashboard"
msgstr ""
#: includes/plugins.php:521, includes/plugins.php:3293
msgid "Plugin activated successfully."
msgstr ""
#: includes/plugins.php:522, includes/plugins.php:3086
msgid "The following plugin was activated successfully:"
msgid_plural "The following plugins were activated successfully:"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:524
msgid "No action taken. Plugin %1$s was already active."
msgstr ""
#: includes/plugins.php:526
msgid "Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin."
msgstr ""
#: includes/plugins.php:528
msgid "All plugins installed and activated successfully. %1$s"
msgstr ""
#: includes/plugins.php:529
msgid "Dismiss this notice"
msgstr ""
#: includes/plugins.php:530
msgid "There are one or more required or recommended plugins to install, update or activate."
msgstr ""
#: includes/plugins.php:531
msgid "Please contact the administrator of this site for help."
msgstr ""
#: includes/plugins.php:656
msgid "This plugin needs to be updated to be compatible with your theme."
msgstr ""
#: includes/plugins.php:657
msgid "Update Required"
msgstr ""
#: includes/plugins.php:1068
msgid "The remote plugin package does not contain a folder with the desired slug and renaming did not work."
msgstr ""
#: includes/plugins.php:1068, includes/plugins.php:1071
msgid "Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines."
msgstr ""
#: includes/plugins.php:1071
msgid "The remote plugin package consists of more than one file, but the files are not packaged in a folder."
msgstr ""
#: includes/plugins.php:1255, includes/plugins.php:3082
msgctxt "plugin A *and* plugin B"
msgid "and"
msgstr ""
#: includes/plugins.php:2116
msgid "TGMPA v%s"
msgstr ""
#: includes/plugins.php:2407
msgid "Required"
msgstr ""
#: includes/plugins.php:2410
msgid "Recommended"
msgstr ""
#: includes/plugins.php:2426
msgid "WordPress Repository"
msgstr ""
#: includes/plugins.php:2429
msgid "External Source"
msgstr ""
#: includes/plugins.php:2432
msgid "Pre-Packaged"
msgstr ""
#: includes/plugins.php:2449
msgid "Not Installed"
msgstr ""
#: includes/plugins.php:2453
msgid "Installed But Not Activated"
msgstr ""
#: includes/plugins.php:2455
msgid "Active"
msgstr ""
#: includes/plugins.php:2461
msgid "Required Update not Available"
msgstr ""
#: includes/plugins.php:2464
msgid "Requires Update"
msgstr ""
#: includes/plugins.php:2467
msgid "Update recommended"
msgstr ""
#: includes/plugins.php:2476
msgctxt "Install/Update Status"
msgid "%1$s, %2$s"
msgstr ""
#: includes/plugins.php:2522
msgctxt "plugins"
msgid "All <span class=\"count\">(%s)</span>"
msgid_plural "All <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2526
msgid "To Install <span class=\"count\">(%s)</span>"
msgid_plural "To Install <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2530
msgid "Update Available <span class=\"count\">(%s)</span>"
msgid_plural "Update Available <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2534
msgid "To Activate <span class=\"count\">(%s)</span>"
msgid_plural "To Activate <span class=\"count\">(%s)</span>"
msgstr[0] ""
msgstr[1] ""
#: includes/plugins.php:2616
msgctxt "as in: \"version nr unknown\""
msgid "unknown"
msgstr ""
#: includes/plugins.php:2624
msgid "Installed version:"
msgstr ""
#: includes/plugins.php:2632
msgid "Minimum required version:"
msgstr ""
#: includes/plugins.php:2644
msgid "Available version:"
msgstr ""
#: includes/plugins.php:2667
msgid "No plugins to install, update or activate."
msgstr ""
#: includes/plugins.php:2681
msgid "Plugin"
msgstr ""
#: includes/plugins.php:2682
msgid "Source"
msgstr ""
#: includes/plugins.php:2683
msgid "Type"
msgstr ""
#: includes/plugins.php:2687
msgid "Version"
msgstr ""
#: includes/plugins.php:2688
msgid "Status"
msgstr ""
#: includes/plugins.php:2737
msgid "Install %2$s"
msgstr ""
#: includes/plugins.php:2742
msgid "Update %2$s"
msgstr ""
#: includes/plugins.php:2748
msgid "Activate %2$s"
msgstr ""
#: includes/plugins.php:2818
msgid "Upgrade message from the plugin author:"
msgstr ""
#: includes/plugins.php:2851
msgid "Install"
msgstr ""
#: includes/plugins.php:2857
msgid "Update"
msgstr ""
#: includes/plugins.php:2860
msgid "Activate"
msgstr ""
#: includes/plugins.php:2891
msgid "No plugins were selected to be installed. No action taken."
msgstr ""
#: includes/plugins.php:2893
msgid "No plugins were selected to be updated. No action taken."
msgstr ""
#: includes/plugins.php:2934
msgid "No plugins are available to be installed at this time."
msgstr ""
#: includes/plugins.php:2936
msgid "No plugins are available to be updated at this time."
msgstr ""
#: includes/plugins.php:3042
msgid "No plugins were selected to be activated. No action taken."
msgstr ""
#: includes/plugins.php:3068
msgid "No plugins are available to be activated at this time."
msgstr ""
#: includes/plugins.php:3292
msgid "Plugin activation failed."
msgstr ""
#: includes/plugins.php:3632
msgid "Updating Plugin %1$s (%2$d/%3$d)"
msgstr ""
#: includes/plugins.php:3635
msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
msgstr ""
#: includes/plugins.php:3637
msgid "The installation of %1$s failed."
msgstr ""
#: includes/plugins.php:3641
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:3643
msgid "%s installed and activated successfully."
msgstr ""
#: includes/plugins.php:3643, includes/plugins.php:3651
msgid "Show Details"
msgstr ""
#: includes/plugins.php:3643, includes/plugins.php:3651
msgid "Hide Details"
msgstr ""
#: includes/plugins.php:3644
msgid "All installations and activations have been completed."
msgstr ""
#: includes/plugins.php:3646
msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
msgstr ""
#: includes/plugins.php:3649
msgid "The installation process is starting. This process may take a while on some hosts, so please be patient."
msgstr ""
#: includes/plugins.php:3651
msgid "%s installed successfully."
msgstr ""
#: includes/plugins.php:3652
msgid "All installations have been completed."
msgstr ""
#: includes/plugins.php:3654
msgid "Installing Plugin %1$s (%2$d/%3$d)"
msgstr ""
#: includes/widgets.php:24
msgid "Before Header"
msgstr ""
#: includes/widgets.php:25
msgid "Before Header widget area."
msgstr ""
#: includes/widgets.php:31
msgid "Before Footer"
msgstr ""
#: includes/widgets.php:32
msgid "Before Footer widget area."
msgstr ""
#: includes/widgets.php:38
msgid "Footer Credits"
msgstr ""
#: includes/widgets.php:39
msgid "Footer Credits widget area."
msgstr ""
#: includes/widgets.php:45
msgid "Front Page 1"
msgstr ""
#: includes/widgets.php:46
msgid "This widget area can be used to display a large hero image, video or slider on the home page."
msgstr ""
#: includes/widgets.php:52
msgid "Front Page 2"
msgstr ""
#: includes/widgets.php:53
msgid "This widget area can be used to display brand logos on the home page."
msgstr ""
#: includes/widgets.php:57
msgid "Front Page 3"
msgstr ""
#: includes/widgets.php:58
msgid "This widget area can be used to display a video section on the home page."
msgstr ""
#: includes/widgets.php:62
msgid "Front Page 4"
msgstr ""
#: includes/widgets.php:63
msgid "This widget area can be used to display a grid of icon boxes on the home page."
msgstr ""
#: includes/widgets.php:67
msgid "Front Page 5"
msgstr ""
#: includes/widgets.php:68
msgid "This widget area can be used to display a large image on the home page."
msgstr ""
#: includes/widgets.php:72
msgid "Front Page 6"
msgstr ""
#: includes/widgets.php:73
msgid "This widget area can be used to display an image gallery on the home page."
msgstr ""
#: includes/widgets.php:77
msgid "Front Page 7"
msgstr ""
#: includes/widgets.php:78
msgid "This widget area can be used to display a call to action banner on the home page."
msgstr ""
#: includes/widgets.php:82
msgid "Front Page 8"
msgstr ""
#: includes/widgets.php:83
msgid "This widget area can be used to display a pricing table and testimonials on the home page."
msgstr ""
#: includes/widgets.php:87
msgid "Front Page 9"
msgstr ""
#: includes/widgets.php:88
msgid "This widget area can be used to display recent blog posts on the home page."
msgstr ""
+30
View File
@@ -0,0 +1,30 @@
# Copyright (C) 2018 Yeu Chay Bo v6.0 6.0.1
# This file is distributed under the same license as the Yeu Chay Bo v6.0 6.0.1 package.
msgid ""
msgstr ""
"Project-Id-Version: Yeu Chay Bo v6.0 6.0.1\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: templates/page-boxed.php:7
msgid "Boxed Template"
msgstr ""
#: templates/page-builder.php:7
msgid "Page Builder"
msgstr ""
#: templates/page-contact.php:7
msgid "Contact Page"
msgstr ""
#: templates/page-landing.php:7
msgid "Landing Page"
msgstr ""
Executable
+116
View File
@@ -0,0 +1,116 @@
[{
"featureType": "water",
"elementType": "geometry",
"stylers": [{
"color": "#e9e9e9"
}, {
"lightness": 17
}]
}, {
"featureType": "landscape",
"elementType": "geometry",
"stylers": [{
"color": "#f5f5f5"
}, {
"lightness": 20
}]
}, {
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [{
"color": "#ffffff"
}, {
"lightness": 17
}]
}, {
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [{
"color": "#ffffff"
}, {
"lightness": 29
}, {
"weight": 0.2
}]
}, {
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [{
"color": "#ffffff"
}, {
"lightness": 18
}]
}, {
"featureType": "road.local",
"elementType": "geometry",
"stylers": [{
"color": "#ffffff"
}, {
"lightness": 16
}]
}, {
"featureType": "poi",
"elementType": "geometry",
"stylers": [{
"color": "#f5f5f5"
}, {
"lightness": 21
}]
}, {
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [{
"color": "#dedede"
}, {
"lightness": 21
}]
}, {
"elementType": "labels.text.stroke",
"stylers": [{
"visibility": "on"
}, {
"color": "#ffffff"
}, {
"lightness": 16
}]
}, {
"elementType": "labels.text.fill",
"stylers": [{
"saturation": 36
}, {
"color": "#333333"
}, {
"lightness": 40
}]
}, {
"elementType": "labels.icon",
"stylers": [{
"visibility": "off"
}]
}, {
"featureType": "transit",
"elementType": "geometry",
"stylers": [{
"color": "#f2f2f2"
}, {
"lightness": 19
}]
}, {
"featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [{
"color": "#fefefe"
}, {
"lightness": 20
}]
}, {
"featureType": "administrative",
"elementType": "geometry.stroke",
"stylers": [{
"color": "#fefefe"
}, {
"lightness": 17
}, {
"weight": 1.2
}]
}]
Executable
+38
View File
@@ -0,0 +1,38 @@
{
"name": "yeuchaybo",
"version": "6.0.1",
"description": "A config based Genesis child theme with Gulp and Sass.",
"repository": {
"type": "git",
"url": "https://github.com/seothemes/yeuchaybo.git"
},
"author": "Thuan Bui",
"license": "GPL-2.0-or-later",
"main": "Gulpfile.js",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-wp-toolkit": "^2.3.2",
"prettier": "^1.13.4",
"prettier-stylelint": "^0.4.2",
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-order": "^0.8.1"
},
"theme": {
"name": "Yeu Chay Bo v6.0",
"uri": "https://thuanbui.me/yeuchaybo/",
"authoruri": "https://thuanbui.me",
"licenseuri": "http://www.gnu.org/licenses/gpl-2.0.html",
"domainpath": "/languages",
"textdomain": "child-theme-library",
"template": "genesis",
"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"
},
"dependencies": {
"change-case": "^3.0.2",
"gulp-cached": "^1.1.1",
"gulp-clean-css": "^3.10.0",
"gulp-cssbeautify": "^1.0.0",
"gulp-cssnano": "^2.1.3",
"gulp-pixrem": "^1.0.0"
}
}
Executable
+9214
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Executable
+1
View File
@@ -0,0 +1 @@
{"genesis-settings":{"theme_version":"2.5.2","db_version":2503,"first_version":"2.0.2","update":1,"update_email_address":"","feed_uri":"","comments_feed_uri":"","site_layout":"full-width-content","breadcrumb_single":1,"comments_posts":1,"trackbacks_posts":1,"content_archive":"full","content_archive_limit":150,"content_archive_thumbnail":1,"image_size":"portfolio","image_alignment":"","posts_nav":"numeric","blog_cat":0,"blog_cat_exclude":"","blog_cat_num":6,"header_scripts":"","footer_scripts":"","breadcrumb_front_page":0,"breadcrumb_home":0,"breadcrumb_page":0,"breadcrumb_posts_page":0,"breadcrumb_archive":0,"breadcrumb_404":0,"breadcrumb_attachment":0,"comments_pages":0,"superfish":0,"redirect_feed":0,"redirect_comments_feed":0,"trackbacks_pages":0,"update_email":0,"blog_title":"","nav_extras":"","nav_extras_twitter_id":"","style_selection":"","nav_extras_twitter_text":""}}
Executable
+230
View File
@@ -0,0 +1,230 @@
#!/bin/bash
# Theme setup.
# Defaults
default_name="Corporate Pro"
default_id="corporate-pro"
default_author="SEO Themes"
default_author_url="https://seothemes.com"
default_package="SEOThemes\GenesisStarterTheme"
default_url="https://genesis-starter.test"
# Directories
basedir="$( cd "$( dirname "$0" )" && pwd )/."
assetsdir="$basedir/assets"
sassdir="$basedir/assets/styles"
basedir_all_files="$basedir/."
setup_script="$basedir/setup.sh"
# Text styles
bold=$(tput bold)
white=$(tput setaf 7)
pink=$(tput setaf 198)
green=$(tput setaf 2)
blue=$(tput setaf 4)
txtreset=$(tput sgr0)
echo "${bold}${blue}
__ __
________ ____ / /_/ /_ ___ ____ ___ ___ _____
/ ___/ _ \/ __ \/ __/ __ \/ _ \/ __ '__ \/ _ \/ ___/
(__ ) ___/ /_/ / /_/ / / / __/ / / / / / ___(__ )
/____/\___/\____/\__/_/ /_/\___/_/ /_/ /_/\___/____/
${txtreset}"
# echo "${bold}
# Genesis Starter Theme
# ${txtreset}"
echo "1) Set name for your theme. (Default: $default_name)"
read name
# use default if empty
if test -n "$name"; then
echo ""
else
name=$default_name
fi
echo "2) Set unique id for your theme. Use only a-z and _. (Default: $default_id)"
read id
# use default if empty
if test -n "$id"; then
echo ""
else
id=$default_id
fi
echo "3) Set the author name for your theme. Use only a-z and _. (Default: $default_author)"
read author
# use default if empty
if test -n "$author"; then
echo ""
else
author=$default_author
fi
echo "4) Set the author URL for your theme. Use only a-z and _. (Default: $default_author_url)"
read author_url
# use default if empty
if test -n "$author_url"; then
echo ""
else
author_url=$default_author_url
fi
echo "5) Set the package name for your theme. Use only a-z and _. (Default: $default_package)"
read package
# use default if empty
if test -n "$package"; then
echo ""
else
package=$default_package
fi
echo "6) Set local development url. Note: An SSL is required to use HTTPS (Default: $default_url)"
read url
# use default if empty
if test -n "$url"; then
echo ""
else
url=$default_url
fi
while true; do
read -p "9) Is following information correct?
name: ${bold}${pink}$name${txtreset} (Default: $default_name)
id: ${bold}${pink}$id${txtreset} (Default: $default_id)
author: ${bold}${pink}$author${txtreset} (Default: $default_author)
author_url: ${bold}${pink}$author_url${txtreset} (Default: $default_author_url)
package: ${bold}${pink}$package${txtreset} (Default: $default_package)
url: ${bold}${pink}$url${txtreset} (Default: $default_url)
Proceed to install? [y/N]
" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer y or n.";;
esac
done
echo "
Run setup:
=========="
# ----------------------------------------------------------------
# Search & Replace Name
# ----------------------------------------------------------------
# style.css
find "$basedir" -name 'style.css' -type f -exec perl -p -i -e "s|$default_name|$name|g" {} \;
# style.scss
find "$sassdir" -name 'style.scss' -type f -exec perl -p -i -e "s|$default_name|$name|g" {} \;
# PHP files
find "$basedir_all_files" -name '*.php' -type f -exec perl -p -i -e "s|$default_name|$name|g" {} \;
# README.md
find "$basedir" -name 'README.md' -type f -exec perl -p -i -e "s|$default_name|$name|g" {} \;
# package.json
find "$basedir" -name 'package.json' -type f -exec perl -p -i -e "s|$default_name|$name|g" {} \;
echo "--> Search & replace name ... ${green}done${txtreset}"
# ----------------------------------------------------------------
# Search & Replace ID
# ----------------------------------------------------------------
# PHP files
find "$basedir_all_files" -name '*.php' -type f -exec perl -p -i -e "s|$default_id|$id|g" {} \;
# style.css
find "$basedir" -name 'style.css' -type f -exec perl -p -i -e "s|$default_id|$id|g" {} \;
# style.scss
find "$sassdir" -name 'style.scss' -type f -exec perl -p -i -e "s|$default_id|$id|g" {} \;
# package.json
find "$basedir" -name 'package.json' -type f -exec perl -p -i -e "s|$default_id|$id|g" {} \;
echo "--> Search & replace id ..... ${green}done${txtreset}"
# ----------------------------------------------------------------
# Change author
# ----------------------------------------------------------------
# PHP files
find "$basedir_all_files" -name '*.php' -type f -exec perl -p -i -e "s|$default_author|$author|g" {} \;
# style.css
find "$basedir" -name 'style.css' -type f -exec perl -p -i -e "s|$default_author|$author|g" {} \;
# style.scss
find "$sassdir" -name 'style.scss' -type f -exec perl -p -i -e "s|$default_author|$author|g" {} \;
# package.json
find "$basedir" -name 'package.json' -type f -exec perl -p -i -e "s|$default_author|$author|g" {} \;
echo "--> Change author name .............. ${green}done${txtreset}"
# ----------------------------------------------------------------
# Change author URL
# ----------------------------------------------------------------
# PHP files
find "$basedir_all_files" -name '*.php' -type f -exec perl -p -i -e "s|$default_author_url|$author_url|g" {} \;
# style.css
find "$basedir" -name 'style.css' -type f -exec perl -p -i -e "s|$default_author_url|$author_url|g" {} \;
# style.scss
find "$sassdir" -name 'style.scss' -type f -exec perl -p -i -e "s|$default_author_url|$author_url|g" {} \;
# package.json
find "$basedir" -name 'package.json' -type f -exec perl -p -i -e "s|$default_author_url|$author_url|g" {} \;
echo "--> Change author URL .............. ${green}done${txtreset}"
# ----------------------------------------------------------------
# Change package
# ----------------------------------------------------------------
# PHP files
find "$basedir_all_files" -name '*.php' -type f -exec perl -p -i -e "s|$default_package|$package|g" {} \;
# style.css
find "$basedir" -name 'style.css' -type f -exec perl -p -i -e "s|$default_package|$package|g" {} \;
# style.scss
find "$sassdir" -name 'style.scss' -type f -exec perl -p -i -e "s|$default_package|$package|g" {} \;
# package.json
find "$basedir" -name 'package.json' -type f -exec perl -p -i -e "s|$default_package|$package|g" {} \;
echo "--> Change package name .............. ${green}done${txtreset}"
# ----------------------------------------------------------------
# Change dev URL
# ----------------------------------------------------------------
# Gulpfile.js
find "$basedir" -name 'Gulpfile.js' -type f -exec perl -p -i -e "s|$default_url|$url|g" {} \;
# gulpfile.js
find "$basedir" -name 'gulpfile.js' -type f -exec perl -p -i -e "s|$default_url|$url|g" {} \;
echo "--> Change url .............. ${green}done${txtreset}"
echo "--> ${green}Setup complete!${txtreset}"
# echo "--> setup.sh removed"
# rm "$setup_script"
+332
View File
@@ -0,0 +1,332 @@
<?php
//add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
//remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
//remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
//add_action( 'display_featured_image_genesis_after_title', 'ycb_event_date_location' );
// Add id="content" attributes to <main> element
add_filter( 'genesis_attr_entry-content', 'my_attr_content' );
function my_attr_content( $attr ) {
$attr['id'] .= 'content';
return $attr;
}
//add_action( 'genesis_entry_header', 'ycb_event_meta', 5);
//add_action( 'genesis_entry_header', 'ycb_event_register_button', 10);
function ycb_event_meta() {
global $post;
$EM_Event = em_get_event($post->ID, 'post_id');
echo '<div class="event-meta">';
$event_start_date = get_post_meta( get_the_ID(), _event_start_date ,true);
if ( $event_start_date ) {
$format_in = 'Y-m-d'; // the format your value is saved in (set in the field options)
$format_out = 'd/m/Y'; // the format you want to end up with
$event_start_date = DateTime::createFromFormat($format_in, $event_start_date);
echo '<span class="event-start-date">'. $event_start_date->format( $format_out ) .'</span>';
}
echo ' | <span class="event-location">';
echo $EM_Event->output('#_LOCATIONTOWN');
echo '</span>
</div>';
}
function ycb_event_register_button() {
$register_link = get_post_meta( get_the_ID(), event_register_link ,true);
//echo '<div class="event-button"><a class="button" href="#content">Chi tiết</a>';
if ( $register_link ){
echo '<a class="button register" href="'. $register_link .'">Đăng Ký</a>';
}
//echo '</div>';
}
//* Reposition Breadcrumbs
remove_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_entry', 'genesis_do_breadcrumbs', 9 );
//* Remove the entry meta in the entry header
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
//* Remove the author box on single posts HTML5 Themes
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
/**
* Display Featured Image floated to the right in single Posts.
*
* @author Sridhar Katakam
* @link http://sridharkatakam.com/how-to-display-featured-image-in-single-posts-in-genesis/
*/
function ycb_event_image() {
$image_args = array(
'size' => 'full',
);
echo '<figure class="alignwide">';
if ($image_args) {
genesis_image( $image_args );
}
echo '</figure>';
}
function ycb_event_distance() {
$product_terms = get_the_terms( get_the_ID(), 'distance' );
// Make sure we have terms and also check for WP_Error object
if ( $product_terms && !is_wp_error( $product_terms )) {
// Display your terms as normal
$term_list = [];
foreach ( $product_terms as $term )
$term_list[] = esc_html( $term->name );
}
return implode( ', ', $term_list );
}
function ycb_display_event_organizer() {
$event_organizer = get_the_terms( get_the_ID(), 'organizer' );
// Make sure we have terms and also check for WP_Error object
if ( $event_organizer && !is_wp_error( $event_organizer )) {
// Display your terms as normal
$term_list = [];
foreach ( $event_organizer as $term )
$term_list[] = esc_html( $term->name );
}
return implode( ', ', $term_list );
//echo '<h2>Ban tổ chức</h2>';
/*echo '<ul>';
foreach ( $event_organizer as $term ) {
echo '<li><strong>' . esc_html( $term->name ) . '</strong>';
echo ': ' . esc_html( $term->description ) . '</li>';
}
echo '</ul>';*/
}
add_action( 'genesis_entry_content', 'ycb_event_image', 10 );
add_action( 'genesis_entry_content', 'ycb_event_info', 10 );
//add_action( 'genesis_entry_content', 'ycb_event_register_button', 10);
function ycb_event_info_backup() {
global $post;
$EM_Event = em_get_event($post->ID, 'post_id');
$event_website = get_post_meta( get_the_ID(), event_website ,true);
$event_title = get_the_title();
$register_link = get_post_meta( get_the_ID(), event_register_link ,true);
$event_facebook = get_post_meta( get_the_ID(), event_facebook_page,true);
$event_distance = ycb_event_distance();
echo '<div class="event-info-wrapper">';
// Echo the event info on the left side
echo '<div class="event-left">';
/* echo '<p>';
if ($event_website) {
echo '<a href="'. $event_website . '" target="_blank"><ion-icon name="home"></ion-icon></a>';
}
if ($event_facebook) {
echo '<a href="'. $event_facebook . '" target="_blank"><ion-icon name="logo-facebook"></ion-icon></a>';
}
echo '</p>';*/
echo '<p><strong>Tên giải: </strong>';
echo '<a href="'.$event_website.'" target="_blank" class="eventsitelink">
<span class="summary">'.$event_title.'</span></a></p>';
echo '<p><strong>Cự ly: </strong>'.$event_distance. '</p>';
//echo do_shortcode('[post_terms taxonomy="distance" before=""]').'</p>';
echo '<p><strong>Phân loại: </strong>';
echo do_shortcode('[post_terms taxonomy="event_category" before=""]').'</p>';
echo '</p>';
echo '<p><strong>Thời gian: </strong>';
echo $EM_Event->output('#_EVENTDATES').'</p>';
if (!empty($EM_Event->location_id) && $EM_Event->get_location()->location_status) {
echo '<p><strong>Địa điểm: </strong>';
//echo $EM_Event->output('#_LOCATIONLINK');
echo '<span>'. $EM_Event->output('#_LOCATIONADDRESS') . '</span>, ';
echo $EM_Event->output('#_LOCATIONTOWN') . ', <span>';
echo $EM_Event->output('#_LOCATIONCOUNTRY') . '</span></p>';
}
echo '</div>';
// Echo the event map on the right side
/*echo '<div class="event-map">';
echo $EM_Event->output('#_LOCATIONMAP');
echo '</div>';*/
echo '<div class="event-right">';
/*if ($event_facebook) {
echo '<div class="event-facebook">';
echo do_shortcode('[sfp-page-plugin url="' . $event_facebook .'"]');
echo '</div></div>';
}*/
echo '<div class="event-map">';
echo $EM_Event->output('#_LOCATIONMAP');
echo '</div>';
echo '</div></div>';
}
function ycb_event_info() {
global $post;
$EM_Event = em_get_event($post->ID, 'post_id');
$event_website = get_post_meta( get_the_ID(), event_website ,true);
$event_title = get_the_title();
$register_link = get_post_meta( get_the_ID(), event_register_link ,true);
$event_facebook = get_post_meta( get_the_ID(), event_facebook_page,true);
$event_distance = ycb_event_distance();
$event_organizer = ycb_display_event_organizer();
echo '<div class="event-info-wrapper">';
// Echo the event info on the left side
echo '<dl class="event-info">';
echo '<div><dt>Website: </dt>';
if ($event_website) {
echo '<dd><a href="'.$event_website.'" target="_blank" class="eventsitelink">
<span class="summary">'.$event_title.'</span></a></dd>';
}
else if ($event_facebook) {
echo '<dd><a href="'.$event_facebook.'" target="_blank" class="eventsitelink">
<span class="summary">'.$event_title.'</span></a></dd>';
}
echo '</div>';
if ($event_organizer) {
echo '<div>';
echo '<dt>Ban tổ chức: </dt>';
echo '<dd>'. $event_organizer . '</dd>';
//echo do_shortcode('[post_terms taxonomy="organizer" before=""]').'</dd>';
echo '</div>';
}
echo '<div>';
echo '<dt>Cự ly: </dt><dd>'.$event_distance. '</dd>';
//echo do_shortcode('[post_terms taxonomy="distance" before=""]').'</p>';
echo '</div>';
$event_type = do_shortcode('[post_terms taxonomy="event_category" before=""]');
if ($event_type) {
echo '<div>';
echo '<dt>Phân loại: </dt><dd>';
echo $event_type .'</dd>';
echo '</div>';
}
echo '<div>';
echo '<dt>Thời gian: </dt>';
echo '<dd>'.$EM_Event->output('#_EVENTDATES').'</dd>';
echo '</div>';
if (!empty($EM_Event->location_id) && $EM_Event->get_location()->location_status) {
echo '<div>';
echo '<dt>Địa điểm: </dt>';
echo '<dd><span>'. $EM_Event->output('#_LOCATIONADDRESS') . '</span>, ';
echo $EM_Event->output('#_LOCATIONTOWN') . ', <span>';
echo $EM_Event->output('#_LOCATIONCOUNTRY') . '</span></dd>';
echo '</div>';
}
echo '</dl>';
// Echo the event map
echo '<div class="event-map">';
echo $EM_Event->output('#_LOCATIONMAP');
echo '</div>';
echo '</div>';
echo '<div style="text-align: center">';
ycb_event_register_button();
echo '</div>';
}
/*if ($event_facebook) {
echo '<div class="event-facebook">';
echo do_shortcode('[sfp-page-plugin url="' . $event_facebook .'"]');
echo '</div></div>';
}*/
//* Add custom body class to the head
add_filter( 'body_class', 'event_body_class' );
function event_body_class( $classes ) {
if ( has_post_thumbnail()) {
$classes[] = 'single-event-media';
}
return $classes;
}
// Display new sidebar for Event
//add_action('get_header','cd_change_genesis_sidebar');
function cd_change_genesis_sidebar() {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); //remove the default genesis sidebar
add_action( 'genesis_sidebar', 'ycb_event_do_sidebar' ); //add an action hook to call the function for my custom sidebar
}
//Function to output my custom sidebar
function ycb_event_do_sidebar() {
genesis_widget_area( 'single-event-sidebar' );
}
function ycb_event_hero_markup_open_1() {
echo '<div class="event-header"><div class="wrap">';
}
function ycb_event_hero_markup_open() {
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 );
if ( has_post_thumbnail() ) {
$bg_image = genesis_get_image(
array(
'format' => 'url',
'size' => 'full',
)
);
}
if ( $bg_image ) {
$output = '<div class="event-hero" style="background-image: linear-gradient(0deg, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.85) 100%), url(' . esc_url( $bg_image ) . ')"><div class="wrap">';
}
echo $output;
}
function ycb_event_hero_markup_close() {
echo '</div></div>';
}
add_action( 'corporate_hero_section', 'ycb_event_meta', 10);
add_action( 'corporate_hero_section', 'ycb_event_register_button', 10);
add_action ( 'genesis_entry_footer' , 'ycb_other_events', 15);
function ycb_other_events() {
echo '<div class="event-related-wrapper">';
echo '<h3 class="event-related-title"> Sự kiện sắp diễn ra</h3>';
do_short('[loop type=event exclude=this count=6 field=_event_start_date date_format="Y-m-d" value=future compare=equal orderby=_event_start_date date_format="Y-m-d" order=ASC]
<div class="event-related-item">[link][field image size=homepage-small][/link]
<div class="event-date">[field _event_start_date date_format="d/m/Y"]</div>
<h4 class="event-title">[field title-link]</h4></div>
[/loop]');
echo '</div>';
}
genesis();
Executable
+5085
View File
File diff suppressed because it is too large Load Diff
Executable
+1
View File
File diff suppressed because one or more lines are too long
+330
View File
@@ -0,0 +1,330 @@
'use strict';
module.exports = {
extends: [
'stylelint-config-wordpress',
'prettier-stylelint/config.js',
'stylelint-config-recommended-scss',
'stylelint-config-wordpress/scss'
],
plugins: 'stylelint-order',
ignoreFiles: [ 'style.min.css' ],
rules: {
'font-family-no-missing-generic-family-keyword': null,
'max-line-length': 255,
'no-duplicate-selectors': null,
'no-descending-specificity': null,
'selector-list-comma-newline-after': [
'always-multi-line',
{
message:
'Expected newline after "," in a multi-line list. Stylelint can\'t automatically correct this at the moment.',
severity: 'warning'
}
],
'selector-pseudo-element-colon-notation': 'single',
'order/order': [
'at-variables',
'dollar-variables',
'custom-properties',
'declarations'
],
'order/properties-order': [
'display',
'visibility',
'float',
'clear',
'overflow',
'overflow-x',
'overflow-y',
'-ms-overflow-x',
'-ms-overflow-y',
'clip',
'zoom',
'flex-direction',
'flex-order',
'flex-pack',
'flex-align',
'position',
'z-index',
'top',
'right',
'bottom',
'left',
'-webkit-box-sizing',
'-moz-box-sizing',
'box-sizing',
'width',
'min-width',
'max-width',
'height',
'min-height',
'max-height',
'margin',
'margin-top',
'margin-right',
'margin-bottom',
'margin-left',
'padding',
'padding-top',
'padding-right',
'padding-bottom',
'padding-left',
'border',
'border-width',
'border-style',
'border-color',
'border-top',
'border-top-width',
'border-top-style',
'border-top-color',
'border-right',
'border-right-width',
'border-right-style',
'border-right-color',
'border-bottom',
'border-bottom-width',
'border-bottom-style',
'border-bottom-color',
'border-left',
'border-left-width',
'border-left-style',
'border-left-color',
'-webkit-border-radius',
'-moz-border-radius',
'border-radius',
'-webkit-border-top-left-radius',
'-moz-border-radius-topleft',
'border-top-left-radius',
'-webkit-border-top-right-radius',
'-moz-border-radius-topright',
'border-top-right-radius',
'-webkit-border-bottom-right-radius',
'-moz-border-radius-bottomright',
'border-bottom-right-radius',
'-webkit-border-bottom-left-radius',
'-moz-border-radius-bottomleft',
'border-bottom-left-radius',
'-webkit-border-image',
'-moz-border-image',
'-o-border-image',
'border-image',
'-webkit-border-image-source',
'-moz-border-image-source',
'-o-border-image-source',
'border-image-source',
'-webkit-border-image-slice',
'-moz-border-image-slice',
'-o-border-image-slice',
'border-image-slice',
'-webkit-border-image-width',
'-moz-border-image-width',
'-o-border-image-width',
'border-image-width',
'-webkit-border-image-outset',
'-moz-border-image-outset',
'-o-border-image-outset',
'border-image-outset',
'-webkit-border-image-repeat',
'-moz-border-image-repeat',
'-o-border-image-repeat',
'border-image-repeat',
'table-layout',
'empty-cells',
'caption-side',
'border-spacing',
'border-collapse',
'outline',
'outline-width',
'outline-style',
'outline-color',
'outline-offset',
'opacity',
'filter:progid:DXImageTransform.Microsoft.Alpha(Opacity',
'-ms-filter:\\\'progid:DXImageTransform.Microsoft.Alpha',
'-ms-interpolation-mode',
'color',
'background',
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader',
'background-color',
'background-image',
'background-repeat',
'background-attachment',
'background-position',
'background-position-x',
'-ms-background-position-x',
'background-position-y',
'-ms-background-position-y',
'-webkit-background-clip',
'-moz-background-clip',
'background-clip',
'background-origin',
'-webkit-background-size',
'-moz-background-size',
'-o-background-size',
'background-size',
'box-decoration-break',
'-webkit-box-shadow',
'-moz-box-shadow',
'box-shadow',
'filter:progid:DXImageTransform.Microsoft.gradient',
'-ms-filter:\\\'progid:DXImageTransform.Microsoft.gradient',
'text-shadow',
'font',
'font-family',
'src',
'font-size',
'font-weight',
'font-style',
'font-variant',
'font-size-adjust',
'font-stretch',
'font-effect',
'font-emphasize',
'font-emphasize-position',
'font-emphasize-style',
'-webkit-font-smoothing',
'-moz-osx-font-smoothing',
'font-smooth',
'line-height',
'text-align',
'-webkit-text-align-last',
'-moz-text-align-last',
'-ms-text-align-last',
'text-align-last',
'vertical-align',
'white-space',
'text-decoration',
'text-emphasis',
'text-emphasis-color',
'text-emphasis-style',
'text-emphasis-position',
'text-indent',
'-ms-text-justify',
'text-justify',
'letter-spacing',
'word-spacing',
'-ms-writing-mode',
'text-outline',
'text-transform',
'text-wrap',
'text-overflow',
'-ms-text-overflow',
'text-overflow-ellipsis',
'text-overflow-mode',
'-ms-word-wrap',
'word-wrap',
'word-break',
'-ms-word-break',
'-moz-tab-size',
'-o-tab-size',
'tab-size',
'-webkit-hyphens',
'-moz-hyphens',
'hyphens',
'list-style',
'list-style-position',
'list-style-type',
'list-style-image',
'content',
'quotes',
'counter-reset',
'counter-increment',
'resize',
'cursor',
'-webkit-user-select',
'-moz-user-select',
'-ms-user-select',
'user-select',
'nav-index',
'nav-up',
'nav-right',
'nav-down',
'nav-left',
'-webkit-transition',
'-moz-transition',
'-ms-transition',
'-o-transition',
'transition',
'-webkit-transition-delay',
'-moz-transition-delay',
'-ms-transition-delay',
'-o-transition-delay',
'transition-delay',
'-webkit-transition-timing-function',
'-moz-transition-timing-function',
'-ms-transition-timing-function',
'-o-transition-timing-function',
'transition-timing-function',
'-webkit-transition-duration',
'-moz-transition-duration',
'-ms-transition-duration',
'-o-transition-duration',
'transition-duration',
'-webkit-transition-property',
'-moz-transition-property',
'-ms-transition-property',
'-o-transition-property',
'transition-property',
'-webkit-transform',
'-moz-transform',
'-ms-transform',
'-o-transform',
'transform',
'-webkit-transform-origin',
'-moz-transform-origin',
'-ms-transform-origin',
'-o-transform-origin',
'transform-origin',
'-webkit-animation',
'-moz-animation',
'-ms-animation',
'-o-animation',
'animation',
'-webkit-animation-name',
'-moz-animation-name',
'-ms-animation-name',
'-o-animation-name',
'animation-name',
'-webkit-animation-duration',
'-moz-animation-duration',
'-ms-animation-duration',
'-o-animation-duration',
'animation-duration',
'-webkit-animation-play-state',
'-moz-animation-play-state',
'-ms-animation-play-state',
'-o-animation-play-state',
'animation-play-state',
'-webkit-animation-timing-function',
'-moz-animation-timing-function',
'-ms-animation-timing-function',
'-o-animation-timing-function',
'animation-timing-function',
'-webkit-animation-delay',
'-moz-animation-delay',
'-ms-animation-delay',
'-o-animation-delay',
'animation-delay',
'-webkit-animation-iteration-count',
'-moz-animation-iteration-count',
'-ms-animation-iteration-count',
'-o-animation-iteration-count',
'animation-iteration-count',
'-webkit-animation-direction',
'-moz-animation-direction',
'-ms-animation-direction',
'-o-animation-direction',
'animation-direction',
'-webkit-backface-visibility',
'-moz-backface-visibility',
'backface-visibility',
'text-rendering',
'pointer-events'
]
}
};
+42
View File
@@ -0,0 +1,42 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the boxed page template to the Yeu Chay Bo Theme.
*
* Template Name: Boxed Template
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'body_class', 'corporate_add_boxed_body_class' );
/**
* Add contact page body class to the head.
*
* @since 1.0.0
*
* @param array $classes Array of body classes.
*
* @return array
*/
function corporate_add_boxed_body_class( $classes ) {
$classes[] = 'boxed-page';
return $classes;
}
// Run the Genesis loop.
genesis();
+41
View File
@@ -0,0 +1,41 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the page builder template to the Yeu Chay Bo theme.
*
* Template Name: Page Builder
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Remove default hero section.
remove_action( 'genesis_after_header', 'corporate_hero_section_open', 20 );
remove_action( 'genesis_after_header', 'corporate_hero_section_title', 24 );
remove_action( 'genesis_after_header', 'corporate_hero_section_close', 28 );
// Get site-header.
get_header();
// Custom loop, remove all hooks except entry content.
if ( have_posts() ) :
the_post();
do_action( 'genesis_entry_content' );
endif;
// Get site-footer.
get_footer();
+67
View File
@@ -0,0 +1,67 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the contact page template to the Yeu Chay Bo Theme.
*
* Template Name: Contact Page
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'body_class', 'corporate_add_contact_body_class' );
/**
* Add contact page body class to the head.
*
* @since 1.0.0
*
* @param array $classes Array of body classes.
*
* @return array
*/
function corporate_add_contact_body_class( $classes ) {
$classes[] = 'contact-page';
return $classes;
}
add_action( 'genesis_before_content_sidebar_wrap', 'corporate_contact_page_map' );
/**
* Display Google map shortcode.
*
* Simply echoes the default map shortcode created by the Google Map plugin.
*
* @since 1.0.0
*
* @return void
*/
function corporate_contact_page_map() {
echo do_shortcode( '[ank_google_map]' );
}
// Remove default hero section (show map instead).
remove_action( 'genesis_before_content_sidebar_wrap', 'corporate_hero_section' );
// Add entry title back inside content.
add_action( 'genesis_entry_header', 'genesis_do_post_title', 2 );
// Add page excerpt just below the title.
add_action( 'genesis_entry_header', 'corporate_page_excerpt', 3 );
// Run the Genesis loop.
genesis();
+89
View File
@@ -0,0 +1,89 @@
<?php
/**
* Yeu Chay Bo
*
* This file adds the landing page template to the Yeu Chay Bo Theme.
*
* Template Name: Landing Page
*
* @package SEOThemes\CorporatePro
* @link https://thuanbui.me/themes/yeuchaybo
* @author Thuan Bui
* @copyright Copyright © 2018 Thuan Bui
* @license GPL-2.0+
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
add_filter( 'body_class', 'corporate_add_landing_body_class' );
/**
* Add landing page body class to the head.
*
* @since 1.0.0
*
* @param array $classes Array of body classes.
*
* @return array
*/
function corporate_add_landing_body_class( $classes ) {
$classes[] = 'landing-page';
return $classes;
}
add_action( 'wp_enqueue_scripts', 'corporate_dequeue_skip_links' );
/**
* Dequeue Skip Links script.
*
* @since 1.0.0
*
* @return void
*/
function corporate_dequeue_skip_links() {
wp_dequeue_script( 'skip-links' );
}
// Remove Skip Links.
remove_action( 'genesis_before_header', 'genesis_skip_links', 5 );
// Force full width content layout.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
// 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 hero section.
remove_action( 'genesis_before_content_sidebar_wrap', 'corporate_hero_section' );
// Remove navigation.
remove_theme_support( 'genesis-menus' );
// Remove breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
// Remove footer widgets.
remove_theme_support( 'genesis-footer-widgets' );
remove_action( 'genesis_footer', 'corporate_before_footer' );
remove_action( 'genesis_footer', 'corporate_footer_credits', 14 );
// Remove site footer elements.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
// Add title back (removed in /includes/header.php).
remove_action( 'genesis_before', 'corporate_hero_section_setup' );
// Run the Genesis loop.
genesis();
Executable
+1
View File
File diff suppressed because one or more lines are too long
+1005
View File
File diff suppressed because it is too large Load Diff
+1
View File
File diff suppressed because one or more lines are too long
+8344
View File
File diff suppressed because it is too large Load Diff