updated theme GeneratePress version 3.0.2
This commit is contained in:
@ -0,0 +1,165 @@
|
||||
.block-editor-block-list__block a,
|
||||
.block-editor-block-list__block a:visited,
|
||||
.block-editor-block-list__block a:hover,
|
||||
.block-editor-block-list__block a:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.block-editor-block-list__layout pre {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: normal;
|
||||
margin-bottom: 1.5em;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
max-width: 100%;
|
||||
color: inherit; /* editor only */
|
||||
}
|
||||
|
||||
body .block-editor-block-list__block blockquote {
|
||||
border-left: 5px solid rgba(0, 0, 0, 0.05);
|
||||
padding: 20px;
|
||||
font-size: 1.2em;
|
||||
font-style:italic;
|
||||
margin: 0 0 1.5em;
|
||||
position: relative;
|
||||
color: inherit; /* editor only */
|
||||
}
|
||||
|
||||
body .wp-block-quote:not(.is-large):not(.is-style-large) {
|
||||
border-left: 5px solid rgba(0, 0, 0, 0.05);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
body .block-editor-block-list__block blockquote p:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.block-editor-block-list__layout table,
|
||||
.block-editor-block-list__layout th,
|
||||
.block-editor-block-list__layout td {
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
body .block-editor-block-list__block table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border-width: 1px 0 0 1px;
|
||||
margin: 0 0 1.5em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.block-editor-block-list__layout th,
|
||||
.block-editor-block-list__layout td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.block-editor-block-list__layout th {
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
|
||||
.block-editor-block-list__layout td {
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
|
||||
body .block-editor-block-list__block hr {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 40px;
|
||||
margin-top: 40px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
body .block-editor-block-list__block,
|
||||
body .block-editor-block-list__block p {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
body .block-editor-default-block-appender input[type=text].editor-default-block-appender__content,
|
||||
body .block-editor-default-block-appender textarea.editor-default-block-appender__content {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
## Gallery
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.block-editor-block-list__layout .wp-block-gallery li figcaption {
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
color: #000;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Button
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.block-editor-block-list__layout .wp-block-button .wp-block-button__link {
|
||||
font-size: inherit;
|
||||
padding: 10px 15px;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Content Title
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
button.content-title-visibility {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
font-size: 30px;
|
||||
line-height: 30px;
|
||||
top: calc(50% - 15px);
|
||||
opacity: 0.4;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
}
|
||||
|
||||
button.show-content-title:before {
|
||||
content: "\f530";
|
||||
}
|
||||
|
||||
button.disable-content-title:before {
|
||||
content: "\f177";
|
||||
}
|
||||
|
||||
body:not(.content-title-hidden) .editor-post-title__block:hover button.disable-content-title,
|
||||
.content-title-hidden .editor-post-title__block:hover button.show-content-title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
button.content-title-visibility:before {
|
||||
font-family: dashicons;
|
||||
}
|
||||
|
||||
.content-title-hidden .editor-post-title textarea {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.edit-post-text-editor .editor-post-title__block .editor-post-title__input {
|
||||
color: initial;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Columns
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.block-editor-block-list__block .wp-block-columns .wp-block-column {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Fix shortcode block label color
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wp-block-shortcode label,
|
||||
.wp-block-shortcode .block-editor-plain-text {
|
||||
color: initial;
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: normal;
|
||||
margin-bottom: 1.5em;
|
||||
padding: 20px;
|
||||
overflow: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 5px solid rgba(0, 0, 0, 0.05);
|
||||
padding: 20px;
|
||||
font-size: 1.2em;
|
||||
font-style:italic;
|
||||
margin: 0 0 1.5em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
blockquote p:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
table, th, td {
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border-width: 1px 0 0 1px;
|
||||
margin: 0 0 1.5em;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
padding: 8px;
|
||||
}
|
||||
th {
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
td {
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border: 0;
|
||||
height: 1px;
|
||||
margin-bottom: 40px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* Make sure embeds and iframes fit their containers */
|
||||
embed,
|
||||
iframe,
|
||||
object {
|
||||
max-width: 100%;
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
.generate-meta-box-content > div {
|
||||
padding: 12px;
|
||||
}
|
||||
#generate_layout_options_meta_box .inside {
|
||||
padding: 0;
|
||||
margin:0;
|
||||
}
|
||||
#generate-meta-box-container .generate-meta-box-menu {
|
||||
position: relative;
|
||||
float: left;
|
||||
list-style: none;
|
||||
width: 180px;
|
||||
line-height: 1em;
|
||||
margin: 0 0 -1px 0;
|
||||
padding: 0;
|
||||
background-color: #fafafa;
|
||||
border-right: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#generate-meta-box-container .generate-meta-box-menu li {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
#generate-meta-box-container .generate-meta-box-menu li a {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
line-height: 20px !important;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#generate-meta-box-container .generate-meta-box-content {
|
||||
float: left;
|
||||
width: calc( 100% - 180px );
|
||||
margin-left: -1px;
|
||||
border-left: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#generate-meta-box-container {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
background: linear-gradient( 90deg, #fafafa 0%, #fafafa 180px, #fff 180px, #fff 100% );
|
||||
}
|
||||
|
||||
#generate-meta-box-container .current {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
#generate-meta-box-container .current a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#generate-meta-box-container label {
|
||||
font-weight: 400;
|
||||
display: inline-block;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
|
||||
.generate-meta-box-menu li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#side-sortables #generate-meta-box-container .generate-meta-box-menu,
|
||||
#side-sortables #generate-meta-box-container .generate-meta-box-content {
|
||||
float: none;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.edit-post-meta-boxes-area.is-side .generate-meta-box-content > div {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.edit-post-meta-boxes-area.is-side .generate-meta-box-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#generate-meta-box-container label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-post-meta-boxes-area.is-side #generate-meta-box-container label.generate-layout-metabox-section-title {
|
||||
display: block;
|
||||
font-weight: 500;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
232
wp-content/themes/generatepress/assets/css/admin/style.css
Normal file
232
wp-content/themes/generatepress/assets/css/admin/style.css
Normal file
@ -0,0 +1,232 @@
|
||||
.js .generate-metabox.postbox .hndle {
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
.generate-metabox .clear {
|
||||
padding-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.generate-metabox .clear:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.customize-button a.button,
|
||||
.customize-button a.button:visited {
|
||||
font-size: 25px;
|
||||
padding: 10px 20px;
|
||||
line-height: normal;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.customize-button {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.addon-container:before,
|
||||
.addon-container:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.addon-container:after {
|
||||
clear: both;
|
||||
}
|
||||
.premium-addons .gp-clear {
|
||||
margin: 0 !important;
|
||||
border: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.premium-addons .add-on.gp-clear {
|
||||
padding: 15px !important;
|
||||
margin: 0 !important;
|
||||
-moz-box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset;
|
||||
-webkit-box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset;
|
||||
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset;
|
||||
}
|
||||
.premium-addons .add-on:last-child {
|
||||
border: 0 !important;
|
||||
}
|
||||
.addon-action {
|
||||
float: right;
|
||||
clear: right;
|
||||
}
|
||||
.addon-name {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.addon-name a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* New admin */
|
||||
.clearfix:after,
|
||||
.clearfix:before {
|
||||
content: ".";
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.gp-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.gp-container a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.appearance_page_generate-options #wpcontent,
|
||||
.appearance_page_generate-options #wpbody-content .metabox-holder {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.appearance_page_generate-options .wrap {
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.gp-masthead {
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
box-shadow: 0 1px 0 rgba(200,215,225,0.5), 0 1px 2px #DDD;
|
||||
margin-bottom: 40px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.gp-container .postbox {
|
||||
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #DDD;
|
||||
border: 0;
|
||||
min-width: initial;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.gp-masthead .gp-title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.gp-masthead .gp-title a {
|
||||
font-size: 20px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.gp-masthead .gp-masthead-links {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.gp-masthead-links a {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.gp-masthead .gp-version {
|
||||
display: inline-block;
|
||||
background: #EFEFEF;
|
||||
padding: 1px 3px;
|
||||
border-radius: 2px;
|
||||
font-size: 11px;
|
||||
vertical-align: top;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.gp-options-footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.popular-articles ul {
|
||||
list-style-type: disc;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.popular-articles .hndle a {
|
||||
float:right;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
#gen-delete p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.start-customizing li {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.start-customizing li span {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.start-customizing ul {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.gp-container .postbox > h3.hndle {
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.hide-on-desktop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.grid-70 {
|
||||
float: left;
|
||||
width: 70%;
|
||||
box-sizing: border-box;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.grid-30 {
|
||||
float: left;
|
||||
width: 30%;
|
||||
box-sizing: border-box;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.grid-parent {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.hide-on-mobile {
|
||||
display: none;
|
||||
}
|
||||
.gp-masthead .gp-masthead-links,
|
||||
.gp-masthead .gp-title {
|
||||
float: none;
|
||||
text-align: center;
|
||||
}
|
||||
.gp-masthead .gp-title {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
2562
wp-content/themes/generatepress/assets/css/all.css
Normal file
2562
wp-content/themes/generatepress/assets/css/all.css
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/generatepress/assets/css/all.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/all.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,125 @@
|
||||
.comment-content a {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.bypostauthor {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.comment,
|
||||
.comment-list {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.comment-author-info {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.comment-meta .avatar {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.comment-author cite {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.entry-meta.comment-metadata {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
.comment-respond {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.comment-form > .form-submit {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comment-form input,
|
||||
.comment-form-comment {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.comment-form #author,
|
||||
.comment-form #email,
|
||||
.comment-form #url {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.comment-metadata .edit-link:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-body {
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
padding: 30px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.depth-1.parent > .children {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.comment .children {
|
||||
padding-left: 30px;
|
||||
margin-top: -30px;
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.pingback .comment-body,
|
||||
.trackback .comment-body {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.pingback .edit-link {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.comment-content p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comment-list > .comment:first-child {
|
||||
padding-top: 0;
|
||||
margin-top: 0;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
ol.comment-list {
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.comment-form-cookies-consent {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.comment-form-cookies-consent input {
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.one-container .comments-area {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
.comment-content .reply {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
#cancel-comment-reply-link {
|
||||
padding-left: 10px;
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/components/comments.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/components/comments.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.comment,.comment-list{list-style-type:none;padding:0;margin:0}.comment-author-info{display:inline-block;vertical-align:middle}.comment-meta .avatar{float:left;margin-right:10px;border-radius:50%}.comment-author cite{font-style:normal;font-weight:700}.entry-meta.comment-metadata{margin-top:0}.comment-content{margin-top:1.5em}.comment-respond{margin-top:0}.comment-form>.form-submit{margin-bottom:0}.comment-form input,.comment-form-comment{margin-bottom:10px}.comment-form #author,.comment-form #email,.comment-form #url{display:block}.comment-metadata .edit-link:before{display:none}.comment-body{padding:30px 0}.comment-content{padding:30px;border:1px solid rgba(0,0,0,.05)}.depth-1.parent>.children{border-bottom:1px solid rgba(0,0,0,.05)}.comment .children{padding-left:30px;margin-top:-30px;border-left:1px solid rgba(0,0,0,.05)}.pingback .comment-body,.trackback .comment-body{border-bottom:1px solid rgba(0,0,0,.05)}.pingback .edit-link{font-size:13px}.comment-content p:last-child{margin-bottom:0}.comment-list>.comment:first-child{padding-top:0;margin-top:0;border-top:0}ol.comment-list{margin-bottom:1.5em}.comment-form-cookies-consent{display:flex;align-items:center}.comment-form-cookies-consent input{margin-right:.5em;margin-bottom:0}.one-container .comments-area{margin-top:1.5em}.comment-content .reply{font-size:85%}#cancel-comment-reply-link{padding-left:10px}
|
||||
2337
wp-content/themes/generatepress/assets/css/components/font-awesome.css
vendored
Normal file
2337
wp-content/themes/generatepress/assets/css/components/font-awesome.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/generatepress/assets/css/components/font-awesome.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/components/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,162 @@
|
||||
@font-face {
|
||||
font-family: "GeneratePress";
|
||||
src: url("../../fonts/generatepress.eot");
|
||||
src: url("../../fonts/generatepress.eot#iefix") format("embedded-opentype"), url("../../fonts/generatepress.woff2") format("woff2"), url("../../fonts/generatepress.woff") format("woff"), url("../../fonts/generatepress.ttf") format("truetype"), url("../../fonts/generatepress.svg#GeneratePress") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.menu-toggle:before,
|
||||
.search-item a:before,
|
||||
.dropdown-menu-toggle:before,
|
||||
.cat-links:before,
|
||||
.tags-links:before,
|
||||
.comments-link:before,
|
||||
.nav-previous .prev:before,
|
||||
.nav-next .next:before,
|
||||
.generate-back-to-top:before {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
text-rendering: auto;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.cat-links:before,
|
||||
.tags-links:before,
|
||||
.comments-link:before,
|
||||
.nav-previous .prev:before,
|
||||
.nav-next .next:before {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Mobile Menu
|
||||
--------------------------------------------------------------*/
|
||||
.menu-toggle:before {
|
||||
content: "\f0c9";
|
||||
font-family: GeneratePress;
|
||||
width: 1.28571429em;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.toggled .menu-toggle:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
|
||||
.main-navigation.toggled .sfHover > a .dropdown-menu-toggle:before {
|
||||
content: "\f106";
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Navigation Search
|
||||
--------------------------------------------------------------*/
|
||||
.search-item a:before {
|
||||
content: "\f002";
|
||||
font-family: GeneratePress;
|
||||
width: 1.28571429em;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.search-item.close-search a:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
|
||||
.widget .search-form button:before {
|
||||
content: "\f002";
|
||||
font-family: GeneratePress;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Navigation Dropdowns
|
||||
--------------------------------------------------------------*/
|
||||
.dropdown-menu-toggle:before {
|
||||
content: "\f107";
|
||||
font-family: GeneratePress;
|
||||
display: inline-block;
|
||||
width: 0.8em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
nav:not(.toggled) ul ul .dropdown-menu-toggle:before {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dropdown-hover .sub-menu-left:not(.toggled) ul ul .dropdown-menu-toggle:before {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.dropdown-click .menu-item-has-children.sfHover > a .dropdown-menu-toggle:before {
|
||||
content: "\f106";
|
||||
}
|
||||
|
||||
.dropdown-hover nav:not(.toggled) ul ul .dropdown-menu-toggle:before {
|
||||
content: "\f105";
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Post Content
|
||||
--------------------------------------------------------------*/
|
||||
.entry-header .cat-links:before,
|
||||
.entry-header .tags-links:before,
|
||||
.entry-header .comments-link:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cat-links:before,
|
||||
.tags-links:before,
|
||||
.comments-link:before,
|
||||
.nav-previous .prev:before,
|
||||
.nav-next .next:before {
|
||||
font-family: GeneratePress;
|
||||
text-decoration: inherit;
|
||||
position: relative;
|
||||
margin-right: 0.6em;
|
||||
width: 13px;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.cat-links:before {
|
||||
content: "\f07b";
|
||||
}
|
||||
|
||||
.tags-links:before {
|
||||
content: "\f02c";
|
||||
}
|
||||
|
||||
.comments-link:before {
|
||||
content: "\f086";
|
||||
}
|
||||
|
||||
.nav-previous .prev:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.nav-next .next:before {
|
||||
content: "\f105";
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Sidebar Navigation
|
||||
--------------------------------------------------------------*/
|
||||
.dropdown-hover.both-right .inside-left-sidebar .dropdown-menu-toggle:before,
|
||||
.dropdown-hover .inside-right-sidebar .dropdown-menu-toggle:before {
|
||||
content: "\f104";
|
||||
}
|
||||
|
||||
.dropdown-hover.both-left .inside-right-sidebar .dropdown-menu-toggle:before,
|
||||
.dropdown-hover .inside-left-sidebar .dropdown-menu-toggle:before {
|
||||
content: "\f105";
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Back to Top Button
|
||||
--------------------------------------------------------------*/
|
||||
.generate-back-to-top:before {
|
||||
content: "\f106";
|
||||
font-family: GeneratePress;
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/components/font-icons.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/components/font-icons.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
@font-face{font-family:GeneratePress;src:url(../../fonts/generatepress.eot);src:url(../../fonts/generatepress.eot#iefix) format("embedded-opentype"),url(../../fonts/generatepress.woff2) format("woff2"),url(../../fonts/generatepress.woff) format("woff"),url(../../fonts/generatepress.ttf) format("truetype"),url(../../fonts/generatepress.svg#GeneratePress) format("svg");font-weight:400;font-style:normal}.cat-links:before,.comments-link:before,.dropdown-menu-toggle:before,.generate-back-to-top:before,.menu-toggle:before,.nav-next .next:before,.nav-previous .prev:before,.search-item a:before,.tags-links:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.cat-links:before,.comments-link:before,.nav-next .next:before,.nav-previous .prev:before,.tags-links:before{opacity:.7}.menu-toggle:before{content:"\f0c9";font-family:GeneratePress;width:1.28571429em;text-align:center;display:inline-block}.toggled .menu-toggle:before{content:"\f00d"}.main-navigation.toggled .sfHover>a .dropdown-menu-toggle:before{content:"\f106"}.search-item a:before{content:"\f002";font-family:GeneratePress;width:1.28571429em;text-align:center;display:inline-block}.search-item.close-search a:before{content:"\f00d"}.widget .search-form button:before{content:"\f002";font-family:GeneratePress}.dropdown-menu-toggle:before{content:"\f107";font-family:GeneratePress;display:inline-block;width:.8em;text-align:left}nav:not(.toggled) ul ul .dropdown-menu-toggle:before{text-align:right}.dropdown-hover .sub-menu-left:not(.toggled) ul ul .dropdown-menu-toggle:before{transform:rotate(180deg)}.dropdown-click .menu-item-has-children.sfHover>a .dropdown-menu-toggle:before{content:"\f106"}.dropdown-hover nav:not(.toggled) ul ul .dropdown-menu-toggle:before{content:"\f105"}.entry-header .cat-links:before,.entry-header .comments-link:before,.entry-header .tags-links:before{display:none}.cat-links:before,.comments-link:before,.nav-next .next:before,.nav-previous .prev:before,.tags-links:before{font-family:GeneratePress;text-decoration:inherit;position:relative;margin-right:.6em;width:13px;text-align:center;display:inline-block}.cat-links:before{content:"\f07b"}.tags-links:before{content:"\f02c"}.comments-link:before{content:"\f086"}.nav-previous .prev:before{content:"\f104"}.nav-next .next:before{content:"\f105"}.dropdown-hover .inside-right-sidebar .dropdown-menu-toggle:before,.dropdown-hover.both-right .inside-left-sidebar .dropdown-menu-toggle:before{content:"\f104"}.dropdown-hover .inside-left-sidebar .dropdown-menu-toggle:before,.dropdown-hover.both-left .inside-right-sidebar .dropdown-menu-toggle:before{content:"\f105"}.generate-back-to-top:before{content:"\f106";font-family:GeneratePress}
|
||||
@ -0,0 +1,256 @@
|
||||
/*--------------------------------------------------------------
|
||||
## Footer Widgets
|
||||
--------------------------------------------------------------*/
|
||||
.footer-widgets-container {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.inside-footer-widgets {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.inside-footer-widgets > div {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
.site-footer .footer-widgets-container .inner-padding {
|
||||
padding: 0px 0px 0px 40px;
|
||||
}
|
||||
|
||||
.site-footer .footer-widgets-container .inside-footer-widgets {
|
||||
margin-left: -40px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
## Top Bar
|
||||
--------------------------------------------------------------*/
|
||||
.top-bar {
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.top-bar .inside-top-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.top-bar .inside-top-bar .widget {
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.top-bar .inside-top-bar .textwidget p:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.top-bar .widget-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.top-bar .widget {
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.top-bar .widget_nav_menu > div > ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-bar .widget_nav_menu li {
|
||||
margin: 0 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.top-bar .widget_nav_menu li:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.top-bar .widget_nav_menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-bar .widget_nav_menu li ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.inside-top-bar {
|
||||
padding: 10px 40px;
|
||||
}
|
||||
|
||||
div.top-bar .widget {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.top-bar-align-right .widget {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-bar-align-right .widget:first-child {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.top-bar-align-right .widget:nth-child(even) {
|
||||
order: -20;
|
||||
}
|
||||
|
||||
.top-bar-align-right .widget:nth-child(2) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.top-bar-align-left .widget {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.top-bar-align-left .widget:nth-child(odd) {
|
||||
order: -20;
|
||||
}
|
||||
|
||||
.top-bar-align-left .widget:nth-child(2) {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.top-bar-align-left .widget:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.top-bar-align-center .widget:first-child {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.top-bar-align-center .widget:last-child {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.top-bar-align-center .widget:not(:first-child):not(:last-child) {
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
## Footer Bar
|
||||
--------------------------------------------------------------*/
|
||||
.footer-bar-active .footer-bar .widget {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer-bar .widget_nav_menu > div > ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.footer-bar .widget_nav_menu li {
|
||||
margin: 0 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer-bar .widget_nav_menu li:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.footer-bar .widget_nav_menu li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.footer-bar .widget_nav_menu li ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-bar .textwidget p:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer-bar .widget-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-bar-align-right .copyright-bar {
|
||||
order: -20;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.footer-bar-align-left .copyright-bar {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.footer-bar-align-center .inside-site-info {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.footer-bar-align-center .footer-bar {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.site-footer:not(.footer-bar-active) .copyright-bar {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
## Breakpoint (768px)
|
||||
--------------------------------------------------------------*/
|
||||
@media (max-width: 768px) {
|
||||
/*--------------------------------------------------------------
|
||||
## Top Bar
|
||||
--------------------------------------------------------------*/
|
||||
.top-bar .inside-top-bar {
|
||||
justify-content: center;
|
||||
}
|
||||
.top-bar .inside-top-bar > .widget {
|
||||
order: 1;
|
||||
margin: 0 10px;
|
||||
}
|
||||
.top-bar .inside-top-bar:first-child {
|
||||
margin-left: auto;
|
||||
}
|
||||
.top-bar .inside-top-bar:last-child {
|
||||
margin-right: auto;
|
||||
}
|
||||
.top-bar .widget_nav_menu li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.top-bar-align-center {
|
||||
text-align: center;
|
||||
}
|
||||
/*--------------------------------------------------------------
|
||||
## Footer
|
||||
--------------------------------------------------------------*/
|
||||
.inside-footer-widgets {
|
||||
flex-direction: column;
|
||||
}
|
||||
.inside-footer-widgets > div:not(:last-child) {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets {
|
||||
margin: 0;
|
||||
}
|
||||
.site-footer .footer-widgets .footer-widgets-container .inner-padding {
|
||||
padding: 0;
|
||||
}
|
||||
.footer-bar-active .inside-site-info {
|
||||
flex-direction: column;
|
||||
}
|
||||
.footer-bar-active .footer-bar {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.footer-bar .widget_nav_menu > div > ul {
|
||||
justify-content: center;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li:first-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li:last-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.footer-bar-align-left .copyright-bar {
|
||||
margin-left: 0;
|
||||
}
|
||||
.footer-bar-align-right .copyright-bar {
|
||||
order: unset;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/components/widget-areas.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/components/widget-areas.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.footer-widgets-container{padding:40px}.inside-footer-widgets{display:flex}.inside-footer-widgets>div{flex:1 1 0}.site-footer .footer-widgets-container .inner-padding{padding:0 0 0 40px}.site-footer .footer-widgets-container .inside-footer-widgets{margin-left:-40px}.top-bar{font-weight:400;text-transform:none;font-size:13px}.top-bar .inside-top-bar{display:flex;align-items:center;flex-wrap:wrap}.top-bar .inside-top-bar .widget{padding:0;display:inline-block;margin-bottom:0}.top-bar .inside-top-bar .textwidget p:last-child{margin:0}.top-bar .widget-title{display:none}.top-bar .widget{margin:0 10px}.top-bar .widget_nav_menu>div>ul{display:flex;align-items:center}.top-bar .widget_nav_menu li{margin:0 10px;padding:0}.top-bar .widget_nav_menu li:first-child{margin-left:0}.top-bar .widget_nav_menu li:last-child{margin-right:0}.top-bar .widget_nav_menu li ul{display:none}.inside-top-bar{padding:10px 40px}div.top-bar .widget{margin-bottom:0}.top-bar-align-right .widget{margin-right:0}.top-bar-align-right .widget:first-child{margin-left:auto}.top-bar-align-right .widget:nth-child(even){order:-20}.top-bar-align-right .widget:nth-child(2){margin-left:0}.top-bar-align-left .widget{margin-left:0}.top-bar-align-left .widget:nth-child(odd){order:-20}.top-bar-align-left .widget:nth-child(2){margin-left:auto}.top-bar-align-left .widget:last-child{margin-right:0}.top-bar-align-center .widget:first-child{margin-left:auto}.top-bar-align-center .widget:last-child{margin-right:auto}.top-bar-align-center .widget:not(:first-child):not(:last-child){margin:0 5px}.footer-bar-active .footer-bar .widget{padding:0}.footer-bar .widget_nav_menu>div>ul{display:flex;align-items:center;flex-wrap:wrap}.footer-bar .widget_nav_menu li{margin:0 10px;padding:0}.footer-bar .widget_nav_menu li:first-child{margin-left:0}.footer-bar .widget_nav_menu li:last-child{margin-right:0}.footer-bar .widget_nav_menu li ul{display:none}.footer-bar .textwidget p:last-child{margin:0}.footer-bar .widget-title{display:none}.footer-bar-align-right .copyright-bar{order:-20;margin-right:auto}.footer-bar-align-left .copyright-bar{margin-left:auto}.footer-bar-align-center .inside-site-info{flex-direction:column}.footer-bar-align-center .footer-bar{margin-bottom:10px}.site-footer:not(.footer-bar-active) .copyright-bar{margin:0 auto}@media (max-width:768px){.top-bar .inside-top-bar{justify-content:center}.top-bar .inside-top-bar>.widget{order:1;margin:0 10px}.top-bar .inside-top-bar:first-child{margin-left:auto}.top-bar .inside-top-bar:last-child{margin-right:auto}.top-bar .widget_nav_menu li{padding:5px 0}.top-bar-align-center{text-align:center}.inside-footer-widgets{flex-direction:column}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}.footer-bar-active .inside-site-info{flex-direction:column}.footer-bar-active .footer-bar{margin-bottom:10px}.footer-bar .widget_nav_menu>div>ul{justify-content:center}.footer-bar .widget_nav_menu li{padding:5px 0}.footer-bar .widget_nav_menu li:first-child{margin-left:10px}.footer-bar .widget_nav_menu li:last-child{margin-right:10px}.footer-bar-align-left .copyright-bar{margin-left:0}.footer-bar-align-right .copyright-bar{order:unset;margin-right:0}}
|
||||
195
wp-content/themes/generatepress/assets/css/main-rtl.css
Normal file
195
wp-content/themes/generatepress/assets/css/main-rtl.css
Normal file
@ -0,0 +1,195 @@
|
||||
caption,
|
||||
td,
|
||||
th {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.header-aligned-right:not([class*="nav-float-"]) .inside-header {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.header-aligned-left:not([class*="nav-float-"]) .inside-header {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.header-aligned-right:not([class*="nav-float-"]) .header-widget {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.header-aligned-left:not([class*="nav-float-"]) .header-widget {
|
||||
order: -10;
|
||||
}
|
||||
|
||||
.site-logo + .site-branding {
|
||||
order: -1;
|
||||
}
|
||||
|
||||
.nav-float-right #site-navigation {
|
||||
order: -5;
|
||||
}
|
||||
|
||||
.nav-float-right #site-navigation.toggled, .nav-float-right #site-navigation.has-active-search {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.nav-float-right .header-widget {
|
||||
order: -10;
|
||||
}
|
||||
|
||||
.nav-float-left #site-navigation {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
.nav-float-left .header-widget,
|
||||
.nav-float-left .mobile-menu-control-wrapper {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.mobile-menu-control-wrapper {
|
||||
margin-right: auto;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.nav-align-right .inside-navigation {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.nav-align-left .inside-navigation {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.main-navigation ul ul {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.sidebar .menu-item-has-children .dropdown-menu-toggle,
|
||||
nav ul ul .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.comment-meta .avatar {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.page-header .avatar {
|
||||
float: right;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.slideout-navigation .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dropdown-click #generate-slideout-menu .slideout-menu .menu-item-has-children > a:first-child,
|
||||
.slideout-desktop.dropdown-hover #generate-slideout-menu .slideout-menu .menu-item-has-children > a:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.comment .children {
|
||||
padding-right: 30px;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.main-navigation .main-nav ul li.menu-item-has-children > a,
|
||||
.secondary-navigation .main-nav ul li.menu-item-has-children > a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
nav:not(.toggled) ul ul .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
nav:not(.toggled) .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.main-navigation {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0 3em 1.5em 0;
|
||||
}
|
||||
|
||||
li > ol,
|
||||
li > ul {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.menu-toggle .mobile-menu {
|
||||
margin-right: 5px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.widget_categories .children {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.widget_nav_menu ul ul,
|
||||
.widget_pages ul ul {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.cat-links:before,
|
||||
.comments-link:before,
|
||||
.nav-next .next:before,
|
||||
.nav-previous .prev:before,
|
||||
.tags-links:before {
|
||||
margin-left: 0.6em;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.entry-meta .gp-icon {
|
||||
margin-right: 0;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
.menu-toggle,
|
||||
.nav-search-enabled .main-navigation .menu-toggle {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.rtl .navigation-search {
|
||||
left: auto;
|
||||
right: -99999px;
|
||||
}
|
||||
|
||||
.rtl .navigation-search.nav-search-active {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav li {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.left-sidebar .sidebar,
|
||||
.both-left #left-sidebar,
|
||||
.both-sidebars #left-sidebar {
|
||||
order: 10;
|
||||
}
|
||||
|
||||
.both-left #right-sidebar {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
.both-right #left-sidebar {
|
||||
order: -5;
|
||||
}
|
||||
|
||||
.both-right #right-sidebar,
|
||||
.both-sidebars #right-sidebar,
|
||||
.right-sidebar #right-sidebar {
|
||||
order: -10;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.site-content .content-area {
|
||||
order: -20;
|
||||
}
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/main-rtl.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/main-rtl.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
caption,td,th{text-align:right}.header-aligned-right:not([class*=nav-float-]) .inside-header{justify-content:flex-start}.header-aligned-left:not([class*=nav-float-]) .inside-header{justify-content:flex-end}.header-aligned-right:not([class*=nav-float-]) .header-widget{order:10}.header-aligned-left:not([class*=nav-float-]) .header-widget{order:-10}.site-logo+.site-branding{order:-1}.nav-float-right #site-navigation{order:-5}.nav-float-right #site-navigation.has-active-search,.nav-float-right #site-navigation.toggled{order:10}.nav-float-right .header-widget{order:-10}.nav-float-left #site-navigation{order:5}.nav-float-left .header-widget,.nav-float-left .mobile-menu-control-wrapper{order:10}.mobile-menu-control-wrapper{margin-right:auto;margin-left:0}.nav-align-right .inside-navigation{justify-content:flex-start}.nav-align-left .inside-navigation{justify-content:flex-end}.menu-item-has-children .dropdown-menu-toggle{float:left!important}.main-navigation ul ul{text-align:right}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:left}.comment-meta .avatar{float:right;margin-left:10px}.page-header .avatar{float:right;margin-left:1.5em}.slideout-navigation .menu-item-has-children .dropdown-menu-toggle{float:left}.dropdown-click #generate-slideout-menu .slideout-menu .menu-item-has-children>a:first-child,.slideout-desktop.dropdown-hover #generate-slideout-menu .slideout-menu .menu-item-has-children>a:first-child{padding-left:0}.comment .children{padding-right:30px;border-right:1px solid rgba(0,0,0,.05)}.main-navigation .main-nav ul li.menu-item-has-children>a,.secondary-navigation .main-nav ul li.menu-item-has-children>a{padding-left:0}nav:not(.toggled) ul ul .menu-item-has-children .dropdown-menu-toggle{padding-left:15px}nav:not(.toggled) .menu-item-has-children .dropdown-menu-toggle{padding-right:10px}.main-navigation{padding-right:0}ol,ul{margin:0 3em 1.5em 0}li>ol,li>ul{margin-right:1.5em}.menu-toggle .mobile-menu{margin-right:5px;margin-left:0}.widget_categories .children{margin-right:1.5em}.widget_nav_menu ul ul,.widget_pages ul ul{margin-right:1em}.cat-links:before,.comments-link:before,.nav-next .next:before,.nav-previous .prev:before,.tags-links:before{margin-left:.6em;margin-right:0}.entry-meta .gp-icon{margin-right:0;margin-left:.6em}.menu-toggle,.nav-search-enabled .main-navigation .menu-toggle{text-align:right}.rtl .navigation-search{left:auto;right:-99999px}.rtl .navigation-search.nav-search-active{right:0}.main-navigation.toggled .main-nav li{text-align:right}.both-left #left-sidebar,.both-sidebars #left-sidebar,.left-sidebar .sidebar{order:10}.both-left #right-sidebar{order:5}.both-right #left-sidebar{order:-5}.both-right #right-sidebar,.both-sidebars #right-sidebar,.right-sidebar #right-sidebar{order:-10}@media (max-width:768px){.site-content .content-area{order:-20}}
|
||||
1639
wp-content/themes/generatepress/assets/css/main.css
Normal file
1639
wp-content/themes/generatepress/assets/css/main.css
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/generatepress/assets/css/main.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/main.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
258
wp-content/themes/generatepress/assets/css/mobile.css
Normal file
258
wp-content/themes/generatepress/assets/css/mobile.css
Normal file
@ -0,0 +1,258 @@
|
||||
/*--------------------------------------------------------------
|
||||
# Mobile Menu
|
||||
--------------------------------------------------------------*/
|
||||
.menu-toggle,
|
||||
.mobile-bar-items,
|
||||
.sidebar-nav-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
padding: 0 20px;
|
||||
line-height: 60px;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button.menu-toggle {
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button.menu-toggle:hover,
|
||||
button.menu-toggle:active,
|
||||
button.menu-toggle:focus {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.menu-toggle .mobile-menu {
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.menu-toggle .gp-icon + .mobile-menu {
|
||||
padding-left: 9px;
|
||||
}
|
||||
|
||||
.menu-toggle .mobile-menu:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.nav-search-enabled .main-navigation .menu-toggle {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.mobile-bar-items {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 21;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.mobile-bar-items a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
nav.toggled ul ul.sub-menu {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dropdown-hover .main-navigation.toggled ul li:hover > ul,
|
||||
.dropdown-hover .main-navigation.toggled ul li.sfHover > ul {
|
||||
transition-delay: 0s;
|
||||
}
|
||||
|
||||
.toggled .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.main-navigation.toggled ul ul {
|
||||
transition: 0s;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav ul ul.toggled-on {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
width: 100%;
|
||||
pointer-events: auto;
|
||||
height: auto;
|
||||
opacity: 1;
|
||||
display: block;
|
||||
visibility: visible;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav li {
|
||||
float: none;
|
||||
clear: both;
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav li.hide-on-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .menu li.search-item {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .sf-menu > li.menu-item-float-right {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Breakpoint (768px)
|
||||
--------------------------------------------------------------*/
|
||||
@media (max-width: 768px) {
|
||||
/*--------------------------------------------------------------
|
||||
## Links
|
||||
--------------------------------------------------------------*/
|
||||
a, body, button, input, select, textarea {
|
||||
transition: all 0s ease-in-out;
|
||||
}
|
||||
/*--------------------------------------------------------------
|
||||
## Top Bar
|
||||
--------------------------------------------------------------*/
|
||||
.top-bar.top-bar-align-left,
|
||||
.top-bar.top-bar-align-right {
|
||||
text-align: center;
|
||||
}
|
||||
.top-bar .widget {
|
||||
float: none !important;
|
||||
margin: 0 10px !important;
|
||||
}
|
||||
.top-bar .widget_nav_menu li {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li:first-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li:last-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/*--------------------------------------------------------------
|
||||
## Header
|
||||
--------------------------------------------------------------*/
|
||||
.inside-header > *:not(:last-child):not(.main-navigation) {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.site-header,
|
||||
.header-aligned-right .site-header {
|
||||
text-align: center;
|
||||
}
|
||||
.header-widget {
|
||||
float: none;
|
||||
max-width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
/*--------------------------------------------------------------
|
||||
## Content Area
|
||||
--------------------------------------------------------------*/
|
||||
.sidebar,
|
||||
.content-area,
|
||||
.inside-footer-widgets > div {
|
||||
float: none;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.site-main {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
body:not(.no-sidebar) .site-main {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.one-container .sidebar {
|
||||
margin-top: 40px;
|
||||
}
|
||||
.separate-containers #left-sidebar + #right-sidebar .inside-right-sidebar {
|
||||
margin-top: 0;
|
||||
}
|
||||
.both-right.separate-containers .inside-left-sidebar,
|
||||
.both-left.separate-containers .inside-left-sidebar,
|
||||
.both-right.separate-containers .inside-right-sidebar,
|
||||
.both-left.separate-containers .inside-right-sidebar {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
.alignleft,
|
||||
.alignright {
|
||||
float: none;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.post-image-aligned-left .post-image,
|
||||
.post-image-aligned-right .post-image {
|
||||
float: none;
|
||||
margin: 2em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.comment .children {
|
||||
padding-left: 10px;
|
||||
margin-left: 0;
|
||||
}
|
||||
.edd_download {
|
||||
display: block;
|
||||
float: none !important;
|
||||
margin-bottom: 1.5em;
|
||||
width: 100% !important;
|
||||
}
|
||||
.entry-meta {
|
||||
font-size: inherit;
|
||||
}
|
||||
.entry-meta a {
|
||||
line-height: 1.8em;
|
||||
}
|
||||
/*--------------------------------------------------------------
|
||||
## Footer
|
||||
--------------------------------------------------------------*/
|
||||
.site-info {
|
||||
text-align: center;
|
||||
}
|
||||
.copyright-bar {
|
||||
float: none !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
.footer-bar {
|
||||
float: none !important;
|
||||
text-align: center !important;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.footer-bar .widget_nav_menu li {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.inside-footer-widgets > div:not(:last-child) {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets {
|
||||
margin: 0;
|
||||
}
|
||||
.site-footer .footer-widgets .footer-widgets-container .inner-padding {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/mobile.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/mobile.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.menu-toggle,.mobile-bar-items,.sidebar-nav-mobile{display:none}.menu-toggle{padding:0 20px;line-height:60px;margin:0;font-weight:400;text-transform:none;font-size:15px;cursor:pointer}button.menu-toggle{background-color:transparent;width:100%;border:0;text-align:center}button.menu-toggle:active,button.menu-toggle:focus,button.menu-toggle:hover{background-color:transparent}.menu-toggle .mobile-menu{padding-left:3px}.menu-toggle .gp-icon+.mobile-menu{padding-left:9px}.menu-toggle .mobile-menu:empty{display:none}.nav-search-enabled .main-navigation .menu-toggle{text-align:left}.mobile-bar-items{display:none;position:absolute;right:0;top:0;z-index:21;list-style-type:none}.mobile-bar-items a{display:inline-block}nav.toggled ul ul.sub-menu{width:100%}.dropdown-hover .main-navigation.toggled ul li.sfHover>ul,.dropdown-hover .main-navigation.toggled ul li:hover>ul{transition-delay:0s}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled ul ul{transition:0s;visibility:hidden}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block;visibility:visible;float:none}.main-navigation.toggled .main-nav li{float:none;clear:both;display:block;text-align:left}.main-navigation.toggled .main-nav li.hide-on-mobile{display:none!important}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.main-navigation.toggled .menu li.search-item{display:none!important}.main-navigation.toggled .sf-menu>li.menu-item-float-right{float:none;display:inline-block}@media (max-width:768px){a,body,button,input,select,textarea{transition:all 0s ease-in-out}.top-bar.top-bar-align-left,.top-bar.top-bar-align-right{text-align:center}.top-bar .widget{float:none!important;margin:0 10px!important}.top-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.footer-bar .widget_nav_menu li:first-child{margin-left:10px}.footer-bar .widget_nav_menu li:last-child{margin-right:10px}.inside-header>:not(:last-child):not(.main-navigation){margin-bottom:20px}.header-aligned-right .site-header,.site-header{text-align:center}.header-widget{float:none;max-width:100%;text-align:center}.content-area,.inside-footer-widgets>div,.sidebar{float:none;width:100%;left:0;right:0}.site-main{margin-left:0!important;margin-right:0!important}body:not(.no-sidebar) .site-main{margin-bottom:0!important}.one-container .sidebar{margin-top:40px}.separate-containers #left-sidebar+#right-sidebar .inside-right-sidebar{margin-top:0}.both-left.separate-containers .inside-left-sidebar,.both-left.separate-containers .inside-right-sidebar,.both-right.separate-containers .inside-left-sidebar,.both-right.separate-containers .inside-right-sidebar{margin-right:0;margin-left:0}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.post-image-aligned-left .post-image,.post-image-aligned-right .post-image{float:none;margin:2em 0;text-align:center}.comment .children{padding-left:10px;margin-left:0}.edd_download{display:block;float:none!important;margin-bottom:1.5em;width:100%!important}.entry-meta{font-size:inherit}.entry-meta a{line-height:1.8em}.site-info{text-align:center}.copyright-bar{float:none!important;text-align:center!important}.footer-bar{float:none!important;text-align:center!important;margin-bottom:20px}.footer-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}}
|
||||
178
wp-content/themes/generatepress/assets/css/style-rtl.css
Normal file
178
wp-content/themes/generatepress/assets/css/style-rtl.css
Normal file
@ -0,0 +1,178 @@
|
||||
caption,
|
||||
td,
|
||||
th {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.main-navigation li {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.main-navigation li.search-item,
|
||||
.nav-aligned-right.nav-below-header .main-navigation .menu > li.search-item {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.nav-left-sidebar .main-navigation li.search-item.current-menu-item,
|
||||
.nav-right-sidebar .main-navigation li.search-item.current-menu-item {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl.nav-aligned-left .main-navigation .menu > li {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rtl.nav-aligned-left .main-navigation ul {
|
||||
letter-spacing: -0.31em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.rtl.nav-aligned-left .main-navigation ul li {
|
||||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.rtl.nav-aligned-left .main-navigation {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.sidebar .menu-item-has-children .dropdown-menu-toggle,
|
||||
nav ul ul .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.comment-meta .avatar {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.page-header .avatar {
|
||||
float: right;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.header-widget {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sf-menu > li.menu-item-float-right {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.slideout-navigation .menu-item-has-children .dropdown-menu-toggle {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dropdown-click #generate-slideout-menu .slideout-menu .menu-item-has-children > a:first-child,
|
||||
.slideout-desktop.dropdown-hover #generate-slideout-menu .slideout-menu .menu-item-has-children > a:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.comment .children {
|
||||
padding-right: 30px;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.main-navigation .main-nav ul li.menu-item-has-children > a,
|
||||
.secondary-navigation .main-nav ul li.menu-item-has-children > a {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
nav:not(.toggled) ul ul .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
nav:not(.toggled) .menu-item-has-children .dropdown-menu-toggle {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.main-navigation ul,
|
||||
.menu-toggle li.search-item {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 0 3em 1.5em 0;
|
||||
}
|
||||
|
||||
li > ol,
|
||||
li > ul {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.menu-toggle .mobile-menu {
|
||||
margin-right: 5px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.widget_categories .children {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.widget_nav_menu ul ul,
|
||||
.widget_pages ul ul {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.cat-links:before,
|
||||
.comments-link:before,
|
||||
.nav-next .next:before,
|
||||
.nav-previous .prev:before,
|
||||
.tags-links:before {
|
||||
margin-left: 0.6em;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.menu-toggle,
|
||||
.nav-search-enabled .main-navigation .menu-toggle {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.main-navigation .mobile-bar-items {
|
||||
float: left;
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.rtl .navigation-search {
|
||||
left: auto;
|
||||
right: -999999px;
|
||||
}
|
||||
|
||||
.rtl .navigation-search.nav-search-active {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.rtl .footer-bar .widget_nav_menu li {
|
||||
direction: rtl;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.main-navigation.toggled .main-nav li {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.entry-meta .gp-icon {
|
||||
margin-right: 0;
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.rtl .mobile-bar-items {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.inside-footer-widgets > div {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
1
wp-content/themes/generatepress/assets/css/style-rtl.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/style-rtl.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
caption,td,th{text-align:right}.menu-item-has-children .dropdown-menu-toggle{float:left!important}.main-navigation li{float:right;text-align:right}.main-navigation li.search-item,.nav-aligned-right.nav-below-header .main-navigation .menu>li.search-item{float:left}.nav-left-sidebar .main-navigation li.search-item.current-menu-item,.nav-right-sidebar .main-navigation li.search-item.current-menu-item{float:left}.rtl.nav-aligned-left .main-navigation .menu>li{float:none;display:inline-block}.rtl.nav-aligned-left .main-navigation ul{letter-spacing:-.31em;font-size:1em}.rtl.nav-aligned-left .main-navigation ul li{letter-spacing:normal}.rtl.nav-aligned-left .main-navigation{text-align:left}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:left}.comment-meta .avatar{float:right;margin-left:10px}.page-header .avatar{float:right;margin-left:1.5em}.header-widget{float:left}.sf-menu>li.menu-item-float-right{float:left!important}.slideout-navigation .menu-item-has-children .dropdown-menu-toggle{float:left}.dropdown-click #generate-slideout-menu .slideout-menu .menu-item-has-children>a:first-child,.slideout-desktop.dropdown-hover #generate-slideout-menu .slideout-menu .menu-item-has-children>a:first-child{padding-left:0}.comment .children{padding-right:30px;border-right:1px solid rgba(0,0,0,.05)}.main-navigation .main-nav ul li.menu-item-has-children>a,.secondary-navigation .main-nav ul li.menu-item-has-children>a{padding-left:0}nav:not(.toggled) ul ul .menu-item-has-children .dropdown-menu-toggle{padding-left:15px}nav:not(.toggled) .menu-item-has-children .dropdown-menu-toggle{padding-right:10px}.main-navigation ul,.menu-toggle li.search-item{padding-right:0}ol,ul{margin:0 3em 1.5em 0}li>ol,li>ul{margin-right:1.5em}.menu-toggle .mobile-menu{margin-right:5px;margin-left:0}.widget_categories .children{margin-right:1.5em}.widget_nav_menu ul ul,.widget_pages ul ul{margin-right:1em}.cat-links:before,.comments-link:before,.nav-next .next:before,.nav-previous .prev:before,.tags-links:before{margin-left:.6em;margin-right:0}.menu-toggle,.nav-search-enabled .main-navigation .menu-toggle{text-align:right}.main-navigation .mobile-bar-items{float:left;left:0;right:auto}.rtl .navigation-search{left:auto;right:-999999px}.rtl .navigation-search.nav-search-active{right:0}.rtl .footer-bar .widget_nav_menu li{direction:rtl;float:right}.main-navigation.toggled .main-nav li{text-align:right!important}.entry-meta .gp-icon{margin-right:0;margin-left:.6em}@media (max-width:768px){.rtl .mobile-bar-items{position:absolute;left:0;top:0}}@media (min-width:768px){.inside-footer-widgets>div{float:right}}
|
||||
1849
wp-content/themes/generatepress/assets/css/style.css
Normal file
1849
wp-content/themes/generatepress/assets/css/style.css
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/generatepress/assets/css/style.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/style.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1465
wp-content/themes/generatepress/assets/css/unsemantic-grid.css
Normal file
1465
wp-content/themes/generatepress/assets/css/unsemantic-grid.css
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/generatepress/assets/css/unsemantic-grid.min.css
vendored
Normal file
1
wp-content/themes/generatepress/assets/css/unsemantic-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
wp-content/themes/generatepress/assets/fonts/FontAwesome.otf
Normal file
BIN
wp-content/themes/generatepress/assets/fonts/FontAwesome.otf
Normal file
Binary file not shown.
Binary file not shown.
2671
wp-content/themes/generatepress/assets/fonts/fontawesome-webfont.svg
Normal file
2671
wp-content/themes/generatepress/assets/fonts/fontawesome-webfont.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 437 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.eot
Normal file
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.eot
Normal file
Binary file not shown.
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="GeneratePress" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="896" descent="-128" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="search" d="M416 800c-176.732 0-320-143.268-320-320s143.268-320 320-320c176.732 0 320 143.268 320 320s-143.268 320-320 320zM0 480c0 229.75 186.25 416 416 416s416-186.25 416-416c0-97.482-33.53-187.132-89.686-258.048l267.652-268.036c18.732-18.758 18.71-49.15-0.050-67.882-18.758-18.732-49.15-18.71-67.882 0.050l-267.558 267.942c-70.982-56.36-160.798-90.026-258.476-90.026-229.75 0-416 186.25-416 416z" />
|
||||
<glyph unicode="" glyph-name="times" d="M142.058 753.942c18.746 18.744 49.138 18.744 67.884 0l302.058-302.060 302.058 302.060c18.746 18.744 49.138 18.744 67.884 0 18.744-18.746 18.744-49.138 0-67.884l-302.060-302.058 302.060-302.058c18.744-18.746 18.744-49.138 0-67.884-18.746-18.744-49.138-18.744-67.884 0l-302.058 302.060-302.058-302.060c-18.746-18.744-49.138-18.744-67.884 0-18.744 18.746-18.744 49.138 0 67.884l302.060 302.058-302.060 302.058c-18.744 18.746-18.744 49.138 0 67.884z" />
|
||||
<glyph unicode="" glyph-name="tags" d="M40 817c-17.672 0-32-14.326-32-32v-352c0-8.486 3.372-16.626 9.374-22.628l448-448c12.496-12.496 32.756-12.496 45.252 0l352 352c12.488 12.488 12.5 32.728 0.026 45.23l-447 448c-6.002 6.016-14.152 9.398-22.652 9.398h-353zM152 625c0 26.51 21.49 48 48 48s48-21.49 48-48c0-26.51-21.49-48-48-48s-48 21.49-48 48zM519.030 809.97c9.372 9.374 24.568 9.374 33.94 0l456-456c9.372-9.372 9.372-24.568 0-33.94l-360-360c-9.372-9.374-24.568-9.374-33.94 0-9.372 9.372-9.372 24.568 0 33.94l343.028 343.030-439.028 439.030c-9.372 9.372-9.372 24.568 0 33.94z" />
|
||||
<glyph unicode="" glyph-name="folder" d="M0 672c0 53.020 42.98 96 96 96h220.028c37.462 0 71.502-21.792 87.184-55.814l24.698-53.582c5.228-11.34 16.574-18.604 29.062-18.604h471.028c53.020 0 96-42.98 96-96v-448c0-53.020-42.98-96-96-96h-832c-53.020 0-96 42.98-96 96v576z" />
|
||||
<glyph unicode="" glyph-name="comments" d="M265.676 236.054c11.374 5.805 22.622 11.82 33.537 18.008 26.727 15.149 53.176 32.285 74.839 51.015 15.088-1.193 30.54-1.851 46.197-1.851 109.809 0 211.267 30.622 286.571 82.561 47.454 32.73 86.229 75.384 108.309 125.29 109.478-44.412 182.996-126.545 182.996-220.573 0-84.371-59.116-158.995-150.179-205.655 46.921-98.432 150.179-203.418 150.179-203.418s-231.674 76.701-308.848 156.918c-19.911-2.238-40.594-3.515-61.584-3.515-177.454 0-325.855 86.143-362.015 201.221zM766.742 630.996c0-141.206-165.922-255.575-370.433-255.575-20.991 0-41.674 1.278-61.584 3.515-77.174-80.187-308.848-156.859-308.848-156.859s103.258 104.944 150.179 203.341c-91.063 46.641-150.179 121.237-150.179 205.577 0 141.204 165.922 255.573 370.433 255.573s370.433-114.369 370.433-255.573z" />
|
||||
<glyph unicode="" glyph-name="bars" d="M0 704c0 26.51 21.49 48 48 48h928c26.51 0 48-21.49 48-48s-21.49-48-48-48h-928c-26.51 0-48 21.49-48 48zM0 384c0 26.51 21.49 48 48 48h928c26.51 0 48-21.49 48-48s-21.49-48-48-48h-928c-26.51 0-48 21.49-48 48zM0 64c0 26.51 21.49 48 48 48h928c26.51 0 48-21.49 48-48s-21.49-48-48-48h-928c-26.51 0-48 21.49-48 48z" />
|
||||
<glyph unicode="" glyph-name="angle-left" horiz-adv-x="384" d="M356.85 619.576c0-4.53-2.266-9.627-5.665-13.025l-222.633-222.554 222.633-222.554c3.399-3.398 5.665-8.494 5.665-13.025s-2.266-9.627-5.665-13.025l-28.325-28.315c-3.399-3.398-8.497-5.663-13.029-5.663s-9.63 2.265-13.029 5.663l-263.987 263.893c-3.399 3.398-5.665 8.494-5.665 13.025s2.266 9.627 5.665 13.025l263.987 263.893c3.399 3.398 8.497 5.663 13.029 5.663s9.63-2.265 13.029-5.663l28.325-28.315c3.399-3.398 5.665-7.928 5.665-13.025z" />
|
||||
<glyph unicode="" glyph-name="angle-right" horiz-adv-x="384" d="M356.85 383.998c0-4.532-2.266-9.63-5.665-13.029l-263.987-263.987c-3.399-3.399-8.497-5.665-13.029-5.665s-9.63 2.266-13.029 5.665l-28.325 28.325c-3.399 3.399-5.665 7.931-5.665 13.029 0 4.532 2.266 9.63 5.665 13.029l222.633 222.633-222.633 222.633c-3.399 3.399-5.665 8.497-5.665 13.029s2.266 9.63 5.665 13.029l28.325 28.325c3.399 3.399 8.497 5.665 13.029 5.665s9.63-2.266 13.029-5.665l263.987-263.987c3.399-3.399 5.665-8.497 5.665-13.029z" />
|
||||
<glyph unicode="" glyph-name="angle-up" horiz-adv-x="660" d="M611.725 266.169c0-4.532-2.265-9.63-5.663-13.029l-28.315-28.325c-3.398-3.399-7.928-5.665-13.025-5.665-4.53 0-9.627 2.266-13.025 5.665l-222.554 222.633-222.554-222.633c-3.398-3.399-8.494-5.665-13.025-5.665s-9.627 2.266-13.025 5.665l-28.315 28.325c-3.398 3.399-5.663 8.497-5.663 13.029s2.265 9.63 5.663 13.029l263.893 263.987c3.398 3.399 8.494 5.665 13.025 5.665s9.627-2.266 13.025-5.665l263.893-263.987c3.398-3.399 5.663-8.497 5.663-13.029z" />
|
||||
<glyph unicode="" glyph-name="angle-down" horiz-adv-x="660" d="M611.825 501.831c0-4.532-2.266-9.63-5.665-13.029l-263.987-263.987c-3.399-3.399-8.497-5.665-13.029-5.665s-9.63 2.266-13.029 5.665l-263.987 263.987c-3.399 3.399-5.665 8.497-5.665 13.029s2.266 9.63 5.665 13.029l28.325 28.325c3.399 3.399 7.931 5.665 13.029 5.665 4.532 0 9.63-2.266 13.029-5.665l222.633-222.633 222.633 222.633c3.399 3.399 8.497 5.665 13.029 5.665s9.63-2.266 13.029-5.665l28.325-28.325c3.399-3.399 5.665-8.497 5.665-13.029z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 5.3 KiB |
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.ttf
Normal file
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.ttf
Normal file
Binary file not shown.
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.woff
Normal file
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.woff
Normal file
Binary file not shown.
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.woff2
Normal file
BIN
wp-content/themes/generatepress/assets/fonts/generatepress.woff2
Normal file
Binary file not shown.
127
wp-content/themes/generatepress/assets/js/a11y.js
Normal file
127
wp-content/themes/generatepress/assets/js/a11y.js
Normal file
@ -0,0 +1,127 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
var body = document.body;
|
||||
|
||||
body.addEventListener( 'mousedown', function() {
|
||||
body.classList.add( 'using-mouse' );
|
||||
} );
|
||||
|
||||
body.addEventListener( 'keydown', function() {
|
||||
body.classList.remove( 'using-mouse' );
|
||||
} );
|
||||
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ),
|
||||
menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' );
|
||||
|
||||
/**
|
||||
* Make menu items tab accessible when using the hover dropdown type
|
||||
*/
|
||||
var toggleFocus = function() {
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
while ( -1 === self.className.indexOf( 'main-nav' ) ) {
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
self.classList.toggle( 'sfHover' );
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make our menu bar items tab accessible.
|
||||
*/
|
||||
var toggleMenuBarItemFocus = function() {
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) {
|
||||
if ( self.classList.contains( 'menu-bar-item' ) ) {
|
||||
self.classList.toggle( 'sfHover' );
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0; i < navLinks.length; i++ ) {
|
||||
navLinks[i].addEventListener( 'focus', toggleFocus );
|
||||
navLinks[i].addEventListener( 'blur', toggleFocus );
|
||||
}
|
||||
|
||||
for ( var i = 0; i < menuBarItems.length; i++ ) {
|
||||
menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus );
|
||||
menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make hover dropdown touch-friendly.
|
||||
*/
|
||||
if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < parentElements.length; i++ ) {
|
||||
parentElements[i].addEventListener( 'touchend', function( e ) {
|
||||
|
||||
// Bail on mobile
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( e.touches.length === 1 || e.touches.length === 0 ) {
|
||||
// Prevent touch events within dropdown bubbling down to document
|
||||
e.stopPropagation();
|
||||
|
||||
// Toggle hover
|
||||
if ( ! this.classList.contains( 'sfHover' ) ) {
|
||||
// Prevent link on first touch
|
||||
if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
var getSiblings = function( elem ) {
|
||||
return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) {
|
||||
return sibling !== elem;
|
||||
} );
|
||||
};
|
||||
|
||||
// Close other sub-menus.
|
||||
var closestLi = this.closest( 'li' ),
|
||||
siblings = getSiblings( closestLi );
|
||||
|
||||
for ( var i = 0; i < siblings.length; i++ ) {
|
||||
if ( siblings[i].classList.contains( 'sfHover' ) ) {
|
||||
siblings[i].classList.remove( 'sfHover' );
|
||||
}
|
||||
}
|
||||
|
||||
this.classList.add( 'sfHover' );
|
||||
|
||||
// Hide dropdown on touch outside
|
||||
var closeDropdown,
|
||||
thisItem = this;
|
||||
|
||||
document.addEventListener( 'touchend', closeDropdown = function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
thisItem.classList.remove( 'sfHover' );
|
||||
document.removeEventListener( 'touchend', closeDropdown );
|
||||
} );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
} )();
|
||||
1
wp-content/themes/generatepress/assets/js/a11y.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/a11y.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;if(e.addEventListener("mousedown",function(){e.classList.add("using-mouse")}),e.addEventListener("keydown",function(){e.classList.remove("using-mouse")}),e.classList.contains("dropdown-hover")){for(var t=document.querySelectorAll("nav .main-nav ul a"),s=document.querySelectorAll(".menu-bar-items .menu-bar-item > a"),n=function(){if(!this.closest("nav").classList.contains("toggled")&&!this.closest("nav").classList.contains("slideout-navigation"))for(var e=this;-1===e.className.indexOf("main-nav");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("sfHover"),e=e.parentElement},o=function(){if(!this.closest("nav").classList.contains("toggled")&&!this.closest("nav").classList.contains("slideout-navigation"))for(var e=this;-1===e.className.indexOf("menu-bar-items");)e.classList.contains("menu-bar-item")&&e.classList.toggle("sfHover"),e=e.parentElement},i=0;i<t.length;i++)t[i].addEventListener("focus",n),t[i].addEventListener("blur",n);for(i=0;i<s.length;i++)s[i].addEventListener("focus",o),s[i].addEventListener("blur",o)}}if("ontouchend"in document.documentElement&&document.body.classList.contains("dropdown-hover"))for(var a=document.querySelectorAll(".sf-menu .menu-item-has-children"),i=0;i<a.length;i++)a[i].addEventListener("touchend",function(e){var t;if(!this.closest("nav").classList.contains("toggled")&&((1===e.touches.length||0===e.touches.length)&&(e.stopPropagation(),!this.classList.contains("sfHover")))){e.target!==this&&e.target.parentNode!==this&&!e.target.parentNode.parentNode||e.preventDefault();for(var s=this.closest("li"),n=(t=s,Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})),o=0;o<n.length;o++)n[o].classList.contains("sfHover")&&n[o].classList.remove("sfHover");this.classList.add("sfHover");var i,a=this;document.addEventListener("touchend",i=function(e){e.stopPropagation(),a.classList.remove("sfHover"),document.removeEventListener("touchend",i)})}})}();
|
||||
@ -0,0 +1,98 @@
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
var container_width_elements = 'body .wp-block,\
|
||||
html body.gutenberg-editor-page .editor-post-title__block,\
|
||||
html body.gutenberg-editor-page .editor-default-block-appender,\
|
||||
html body.gutenberg-editor-page .editor-block-list__block,\
|
||||
.edit-post-visual-editor .editor-block-list__block[data-align=wide]';
|
||||
|
||||
$( 'select[name="_generate-full-width-content"]' ).on( 'change', function() {
|
||||
if ( 'true' === this.value ) {
|
||||
$( 'style#container_width' ).remove();
|
||||
$( 'head' ).append( '<style id="container_width">' + container_width_elements + '{max-width: 100%;}</style>' );
|
||||
} else {
|
||||
$( 'style#container_width' ).remove();
|
||||
}
|
||||
} );
|
||||
|
||||
$( 'select[name="_generate-sidebar-layout-meta"]' ).on( 'change', function() {
|
||||
if ( 'true' !== $( this ).val() ) {
|
||||
var this_value = this.value,
|
||||
content_width = '',
|
||||
calc = '',
|
||||
container_width = generate_block_editor.container_width,
|
||||
right_sidebar_width = generate_block_editor.right_sidebar_width,
|
||||
left_sidebar_width = generate_block_editor.left_sidebar_width,
|
||||
right_content_padding = generate_block_editor.content_padding_right,
|
||||
left_content_padding = generate_block_editor.content_padding_left;
|
||||
|
||||
if ( '' === this_value ) {
|
||||
this_value = generate_block_editor.global_sidebar_layout;
|
||||
}
|
||||
|
||||
if ( 'left-sidebar' == this_value ) {
|
||||
content_width = container_width * ( ( 100 - left_sidebar_width ) / 100 );
|
||||
} else if ( 'right-sidebar' == this_value ) {
|
||||
content_width = container_width * ( ( 100 - right_sidebar_width ) / 100 );
|
||||
} else if ( 'no-sidebar' == this_value ) {
|
||||
content_width = container_width;
|
||||
} else {
|
||||
content_width = container_width * ( ( 100 - ( Number( left_sidebar_width ) + Number( right_sidebar_width ) ) ) / 100 );
|
||||
}
|
||||
|
||||
calc = 'max-width: calc(' + content_width + 'px - ' + right_content_padding + ' - ' + left_content_padding + ')';
|
||||
|
||||
$( 'style#content-width' ).remove();
|
||||
$( 'head' ).append( '<style id="content-width">' + container_width_elements + '{' + calc + '}</style>' );
|
||||
|
||||
$( 'style#wide-width' ).remove();
|
||||
$( 'head' ).append( '<style id="wide-width">.edit-post-visual-editor .editor-block-list__block[data-align=wide]{max-width:' + content_width + 'px}' );
|
||||
}
|
||||
} );
|
||||
|
||||
var disable_content_title_input = $( '#meta-generate-disable-headline' );
|
||||
var disable_content_title_button = $( 'button.content-title-visibility' );
|
||||
var body = $( 'body' );
|
||||
|
||||
if ( 'false' === generate_block_editor.content_title ) {
|
||||
body.addClass( 'content-title-hidden' );
|
||||
}
|
||||
|
||||
disable_content_title_input.on( 'change', function() {
|
||||
if ( this.checked ) {
|
||||
body.addClass( 'content-title-hidden' );
|
||||
} else {
|
||||
body.removeClass( 'content-title-hidden' );
|
||||
}
|
||||
} );
|
||||
|
||||
$( document ).on( 'click', 'button.content-title-visibility', function() {
|
||||
var _this = $( this );
|
||||
|
||||
if ( disable_content_title_input.prop( 'checked' ) ) {
|
||||
disable_content_title_input.prop( 'checked', false );
|
||||
body.removeClass( 'content-title-hidden' );
|
||||
} else {
|
||||
disable_content_title_input.prop( 'checked', true );
|
||||
body.addClass( 'content-title-hidden' );
|
||||
}
|
||||
} );
|
||||
|
||||
if ( generate_block_editor.show_editor_styles ) {
|
||||
var text_color = tinycolor( generate_block_editor.text_color ).toHex8(),
|
||||
isTextDark = tinycolor( text_color ).isDark();
|
||||
|
||||
if ( ! isTextDark ) {
|
||||
$( 'body' ).addClass( 'is-dark-theme' );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery( window ).on( 'load', function() {
|
||||
var post_title_block = jQuery( '.editor-post-title__block' ),
|
||||
disable_title_option = jQuery( '#meta-generate-disable-headline' );
|
||||
|
||||
if ( post_title_block && disable_title_option.length > 0 ) {
|
||||
post_title_block.append( '<button class="content-title-visibility disable-content-title" title="' + generate_block_editor.disable_content_title + '" aria-hidden="true"></button>' );
|
||||
post_title_block.append( '<button class="content-title-visibility show-content-title" title="' + generate_block_editor.show_content_title + '" aria-hidden="true"></button>' );
|
||||
}
|
||||
} );
|
||||
1195
wp-content/themes/generatepress/assets/js/admin/tinycolor.js
Normal file
1195
wp-content/themes/generatepress/assets/js/admin/tinycolor.js
Normal file
File diff suppressed because it is too large
Load Diff
65
wp-content/themes/generatepress/assets/js/back-to-top.js
Normal file
65
wp-content/themes/generatepress/assets/js/back-to-top.js
Normal file
@ -0,0 +1,65 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
// Feature Test
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
|
||||
var goTopBtn = document.querySelector( '.generate-back-to-top' );
|
||||
|
||||
var trackScroll = function() {
|
||||
var scrolled = window.pageYOffset;
|
||||
var coords = goTopBtn.getAttribute( 'data-start-scroll' ) ;
|
||||
|
||||
if ( scrolled > coords ) {
|
||||
goTopBtn.style.opacity = '1';
|
||||
goTopBtn.style.visibility = 'visible';
|
||||
}
|
||||
|
||||
if (scrolled < coords) {
|
||||
goTopBtn.style.opacity = '0';
|
||||
goTopBtn.style.visibility = 'hidden';
|
||||
}
|
||||
};
|
||||
|
||||
// Function to animate the scroll
|
||||
var smoothScroll = function (anchor, duration) {
|
||||
// Calculate how far and how fast to scroll
|
||||
var startLocation = window.pageYOffset;
|
||||
var endLocation = document.body.offsetTop;
|
||||
var distance = endLocation - startLocation;
|
||||
var increments = distance/(duration/16);
|
||||
var stopAnimation;
|
||||
|
||||
// Scroll the page by an increment, and check if it's time to stop
|
||||
var animateScroll = function () {
|
||||
window.scrollBy(0, increments);
|
||||
stopAnimation();
|
||||
};
|
||||
|
||||
// Stop animation when you reach the anchor OR the top of the page
|
||||
stopAnimation = function () {
|
||||
var travelled = window.pageYOffset;
|
||||
if ( travelled <= (endLocation || 0) ) {
|
||||
clearInterval(runAnimation);
|
||||
document.activeElement.blur();
|
||||
}
|
||||
};
|
||||
|
||||
// Loop the animation function
|
||||
var runAnimation = setInterval(animateScroll, 16);
|
||||
};
|
||||
|
||||
if ( goTopBtn ) {
|
||||
// Show the button when scrolling down.
|
||||
window.addEventListener( 'scroll', trackScroll );
|
||||
|
||||
// Scroll back to top when clicked.
|
||||
goTopBtn.addEventListener( 'click', function( e ) {
|
||||
e.preventDefault();
|
||||
smoothScroll( document.body, goTopBtn.getAttribute( 'data-scroll-speed' ) || 400 );
|
||||
}, false );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} )();
|
||||
1
wp-content/themes/generatepress/assets/js/back-to-top.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/back-to-top.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";var l;"querySelector"in document&&"addEventListener"in window&&(l=document.querySelector(".generate-back-to-top"),l&&(window.addEventListener("scroll",function(){var t=window.pageYOffset,e=l.getAttribute("data-start-scroll");e<t&&(l.style.opacity="1",l.style.visibility="visible"),t<e&&(l.style.opacity="0",l.style.visibility="hidden")}),l.addEventListener("click",function(t){var e,n,i,o,c,d;t.preventDefault(),document.body,e=l.getAttribute("data-scroll-speed")||400,n=window.pageYOffset,i=document.body.offsetTop,o=(i-n)/(e/16),c=function(){window.pageYOffset<=(i||0)&&(clearInterval(d),document.activeElement.blur())},d=setInterval(function(){window.scrollBy(0,o),c()},16)},!1)))}();
|
||||
240
wp-content/themes/generatepress/assets/js/classList.js
Normal file
240
wp-content/themes/generatepress/assets/js/classList.js
Normal file
@ -0,0 +1,240 @@
|
||||
/*
|
||||
* classList.js: Cross-browser full element.classList implementation.
|
||||
* 1.1.20170427
|
||||
*
|
||||
* By Eli Grey, http://eligrey.com
|
||||
* License: Dedicated to the public domain.
|
||||
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/*global self, document, DOMException */
|
||||
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
||||
|
||||
if ("document" in self) {
|
||||
|
||||
// Full polyfill for browsers with no classList support
|
||||
// Including IE < Edge missing SVGElement.classList
|
||||
if (!("classList" in document.createElement("_"))
|
||||
|| document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg","g"))) {
|
||||
|
||||
(function (view) {
|
||||
|
||||
"use strict";
|
||||
|
||||
if (!('Element' in view)) return;
|
||||
|
||||
var
|
||||
classListProp = "classList"
|
||||
, protoProp = "prototype"
|
||||
, elemCtrProto = view.Element[protoProp]
|
||||
, objCtr = Object
|
||||
, strTrim = String[protoProp].trim || function () {
|
||||
return this.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
, arrIndexOf = Array[protoProp].indexOf || function (item) {
|
||||
var
|
||||
i = 0
|
||||
, len = this.length
|
||||
;
|
||||
for (; i < len; i++) {
|
||||
if (i in this && this[i] === item) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
// Vendors: please allow content code to instantiate DOMExceptions
|
||||
, DOMEx = function (type, message) {
|
||||
this.name = type;
|
||||
this.code = DOMException[type];
|
||||
this.message = message;
|
||||
}
|
||||
, checkTokenAndGetIndex = function (classList, token) {
|
||||
if (token === "") {
|
||||
throw new DOMEx(
|
||||
"SYNTAX_ERR"
|
||||
, "An invalid or illegal string was specified"
|
||||
);
|
||||
}
|
||||
if (/\s/.test(token)) {
|
||||
throw new DOMEx(
|
||||
"INVALID_CHARACTER_ERR"
|
||||
, "String contains an invalid character"
|
||||
);
|
||||
}
|
||||
return arrIndexOf.call(classList, token);
|
||||
}
|
||||
, ClassList = function (elem) {
|
||||
var
|
||||
trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
|
||||
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
|
||||
, i = 0
|
||||
, len = classes.length
|
||||
;
|
||||
for (; i < len; i++) {
|
||||
this.push(classes[i]);
|
||||
}
|
||||
this._updateClassName = function () {
|
||||
elem.setAttribute("class", this.toString());
|
||||
};
|
||||
}
|
||||
, classListProto = ClassList[protoProp] = []
|
||||
, classListGetter = function () {
|
||||
return new ClassList(this);
|
||||
}
|
||||
;
|
||||
// Most DOMException implementations don't allow calling DOMException's toString()
|
||||
// on non-DOMExceptions. Error's toString() is sufficient here.
|
||||
DOMEx[protoProp] = Error[protoProp];
|
||||
classListProto.item = function (i) {
|
||||
return this[i] || null;
|
||||
};
|
||||
classListProto.contains = function (token) {
|
||||
token += "";
|
||||
return checkTokenAndGetIndex(this, token) !== -1;
|
||||
};
|
||||
classListProto.add = function () {
|
||||
var
|
||||
tokens = arguments
|
||||
, i = 0
|
||||
, l = tokens.length
|
||||
, token
|
||||
, updated = false
|
||||
;
|
||||
do {
|
||||
token = tokens[i] + "";
|
||||
if (checkTokenAndGetIndex(this, token) === -1) {
|
||||
this.push(token);
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
while (++i < l);
|
||||
|
||||
if (updated) {
|
||||
this._updateClassName();
|
||||
}
|
||||
};
|
||||
classListProto.remove = function () {
|
||||
var
|
||||
tokens = arguments
|
||||
, i = 0
|
||||
, l = tokens.length
|
||||
, token
|
||||
, updated = false
|
||||
, index
|
||||
;
|
||||
do {
|
||||
token = tokens[i] + "";
|
||||
index = checkTokenAndGetIndex(this, token);
|
||||
while (index !== -1) {
|
||||
this.splice(index, 1);
|
||||
updated = true;
|
||||
index = checkTokenAndGetIndex(this, token);
|
||||
}
|
||||
}
|
||||
while (++i < l);
|
||||
|
||||
if (updated) {
|
||||
this._updateClassName();
|
||||
}
|
||||
};
|
||||
classListProto.toggle = function (token, force) {
|
||||
token += "";
|
||||
|
||||
var
|
||||
result = this.contains(token)
|
||||
, method = result ?
|
||||
force !== true && "remove"
|
||||
:
|
||||
force !== false && "add"
|
||||
;
|
||||
|
||||
if (method) {
|
||||
this[method](token);
|
||||
}
|
||||
|
||||
if (force === true || force === false) {
|
||||
return force;
|
||||
} else {
|
||||
return !result;
|
||||
}
|
||||
};
|
||||
classListProto.toString = function () {
|
||||
return this.join(" ");
|
||||
};
|
||||
|
||||
if (objCtr.defineProperty) {
|
||||
var classListPropDesc = {
|
||||
get: classListGetter
|
||||
, enumerable: true
|
||||
, configurable: true
|
||||
};
|
||||
try {
|
||||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
|
||||
} catch (ex) { // IE 8 doesn't support enumerable:true
|
||||
// adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
|
||||
// modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
|
||||
if (ex.number === undefined || ex.number === -0x7FF5EC54) {
|
||||
classListPropDesc.enumerable = false;
|
||||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
|
||||
}
|
||||
}
|
||||
} else if (objCtr[protoProp].__defineGetter__) {
|
||||
elemCtrProto.__defineGetter__(classListProp, classListGetter);
|
||||
}
|
||||
|
||||
}(self));
|
||||
|
||||
}
|
||||
|
||||
// There is full or partial native classList support, so just check if we need
|
||||
// to normalize the add/remove and toggle APIs.
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var testElement = document.createElement("_");
|
||||
|
||||
testElement.classList.add("c1", "c2");
|
||||
|
||||
// Polyfill for IE 10/11 and Firefox <26, where classList.add and
|
||||
// classList.remove exist but support only one argument at a time.
|
||||
if (!testElement.classList.contains("c2")) {
|
||||
var createMethod = function(method) {
|
||||
var original = DOMTokenList.prototype[method];
|
||||
|
||||
DOMTokenList.prototype[method] = function(token) {
|
||||
var i, len = arguments.length;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
token = arguments[i];
|
||||
original.call(this, token);
|
||||
}
|
||||
};
|
||||
};
|
||||
createMethod('add');
|
||||
createMethod('remove');
|
||||
}
|
||||
|
||||
testElement.classList.toggle("c3", false);
|
||||
|
||||
// Polyfill for IE 10 and Firefox <24, where classList.toggle does not
|
||||
// support the second argument.
|
||||
if (testElement.classList.contains("c3")) {
|
||||
var _toggle = DOMTokenList.prototype.toggle;
|
||||
|
||||
DOMTokenList.prototype.toggle = function(token, force) {
|
||||
if (1 in arguments && !this.contains(token) === !force) {
|
||||
return force;
|
||||
} else {
|
||||
return _toggle.call(this, token);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
testElement = null;
|
||||
}());
|
||||
|
||||
}
|
||||
2
wp-content/themes/generatepress/assets/js/classList.min.js
vendored
Normal file
2
wp-content/themes/generatepress/assets/js/classList.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
|
||||
"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",""+this)}},u=l[n]=[],h=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),s=!0);while(++n<i);s&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do for(t=n[i]+"",e=c(this,t);-1!==e;)this.splice(e,1),r=!0,e=c(this,t);while(++i<s);r&&this._updateClassName()},u.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},u.toString=function(){return this.join(" ")},s.defineProperty){var f={get:h,enumerable:!0,configurable:!0};try{s.defineProperty(i,e,f)}catch(g){(void 0===g.number||-2146823252===g.number)&&(f.enumerable=!1,s.defineProperty(i,e,f))}}else s[n].__defineGetter__&&i.__defineGetter__(e,h)}}(self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;i>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}());
|
||||
124
wp-content/themes/generatepress/assets/js/dropdown-click.js
Normal file
124
wp-content/themes/generatepress/assets/js/dropdown-click.js
Normal file
@ -0,0 +1,124 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
var body = document.body;
|
||||
/**
|
||||
* Dropdown click
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var dropdownClick = function( e, _this ) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if ( ! _this ) {
|
||||
var _this = this;
|
||||
}
|
||||
|
||||
var closestLi = _this.closest( 'li' );
|
||||
|
||||
// Close other sub-menus
|
||||
var openedSubMenus = _this.closest( 'nav' ).querySelectorAll( 'ul.toggled-on' );
|
||||
if ( openedSubMenus && ! _this.closest( 'ul' ).classList.contains( 'toggled-on' ) && ! _this.closest( 'li' ).classList.contains( 'sfHover' ) ) {
|
||||
for ( var o = 0; o < openedSubMenus.length; o++ ) {
|
||||
openedSubMenus[o].classList.remove( 'toggled-on' );
|
||||
openedSubMenus[o].closest( 'li' ).classList.remove( 'sfHover' );
|
||||
}
|
||||
}
|
||||
|
||||
// Add sfHover class to parent li
|
||||
closestLi.classList.toggle( 'sfHover' );
|
||||
|
||||
// Set aria-expanded on arrow
|
||||
var dropdownToggle = closestLi.querySelector( '.dropdown-menu-toggle' );
|
||||
if ( 'false' === dropdownToggle.getAttribute( 'aria-expanded' ) || ! dropdownToggle.getAttribute( 'aria-expanded' ) ) {
|
||||
dropdownToggle.setAttribute( 'aria-expanded', 'true' );
|
||||
} else {
|
||||
dropdownToggle.setAttribute( 'aria-expanded', 'false' );
|
||||
}
|
||||
|
||||
if ( closestLi.querySelector( '.sub-menu' ) ) {
|
||||
var subMenuSelector = '.sub-menu';
|
||||
} else {
|
||||
var subMenuSelector = '.children';
|
||||
}
|
||||
|
||||
// Open the sub-menu
|
||||
if ( body.classList.contains( 'dropdown-click-menu-item' ) ) {
|
||||
_this.parentNode.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' );
|
||||
} else if ( body.classList.contains( 'dropdown-click-arrow' ) ) {
|
||||
closestLi.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' );
|
||||
}
|
||||
}
|
||||
|
||||
// Do stuff if click dropdown if enabled
|
||||
var parentElementLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a' );
|
||||
|
||||
// Open the sub-menu by clicking on the entire link element
|
||||
if ( body.classList.contains( 'dropdown-click-menu-item' ) ) {
|
||||
for ( var i = 0; i < parentElementLinks.length; i++ ) {
|
||||
parentElementLinks[i].addEventListener( 'click', dropdownClick, true );
|
||||
}
|
||||
}
|
||||
|
||||
// Open the sub-menu by clicking on a dropdown arrow
|
||||
if ( body.classList.contains( 'dropdown-click-arrow' ) ) {
|
||||
// Add a class to sub-menu items that are set to #
|
||||
for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a' ).length; i++ ) {
|
||||
if ( '#' == document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].getAttribute( 'href' ) ) {
|
||||
document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].classList.add( 'menu-item-dropdown-click' );
|
||||
}
|
||||
}
|
||||
|
||||
var dropdownToggleLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a .dropdown-menu-toggle' );
|
||||
for ( var i = 0; i < dropdownToggleLinks.length; i++ ) {
|
||||
dropdownToggleLinks[i].addEventListener( 'click', dropdownClick, false );
|
||||
|
||||
dropdownToggleLinks[i].addEventListener( 'keydown', function( e ) {
|
||||
var _this = this;
|
||||
var key = e.which || e.keyCode;
|
||||
if ( key === 13 ) { // 13 is enter
|
||||
dropdownClick( e, _this );
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' ).length; i++ ) {
|
||||
document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' )[i].addEventListener( 'click', dropdownClick, false );
|
||||
}
|
||||
}
|
||||
|
||||
var closeSubMenus = function() {
|
||||
if ( document.querySelector( 'nav ul .toggled-on' ) ) {
|
||||
var activeSubMenus = document.querySelectorAll( 'nav ul .toggled-on' );
|
||||
var activeDropdownToggles = document.querySelectorAll( 'nav .dropdown-menu-toggle' );
|
||||
for ( var i = 0; i < activeSubMenus.length; i++ ) {
|
||||
activeSubMenus[i].classList.remove( 'toggled-on' );
|
||||
activeSubMenus[i].closest( '.sfHover' ).classList.remove( 'sfHover' );
|
||||
}
|
||||
|
||||
for ( var i = 0; i < activeDropdownToggles.length; i++ ) {
|
||||
activeDropdownToggles[i].setAttribute( 'aria-expanded', 'false' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Close sub-menus when clicking elsewhere
|
||||
document.addEventListener( 'click', function ( event ) {
|
||||
if ( ! event.target.closest( '.sfHover' ) ) {
|
||||
closeSubMenus();
|
||||
}
|
||||
}, false);
|
||||
|
||||
// Close sub-menus on escape key
|
||||
document.addEventListener( 'keydown', function( e ) {
|
||||
var key = e.which || e.keyCode;
|
||||
if ( key === 27 ) { // 27 is esc
|
||||
closeSubMenus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
})();
|
||||
1
wp-content/themes/generatepress/assets/js/dropdown-click.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/dropdown-click.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var c=document.body,t=function(e,t){e.preventDefault(),e.stopPropagation();var n=(t=t||this).closest("li"),o=t.closest("nav").querySelectorAll("ul.toggled-on");if(o&&!t.closest("ul").classList.contains("toggled-on")&&!t.closest("li").classList.contains("sfHover"))for(var l=0;l<o.length;l++)o[l].classList.remove("toggled-on"),o[l].closest("li").classList.remove("sfHover");n.classList.toggle("sfHover");var r,i=n.querySelector(".dropdown-menu-toggle");"false"!==i.getAttribute("aria-expanded")&&i.getAttribute("aria-expanded")?i.setAttribute("aria-expanded","false"):i.setAttribute("aria-expanded","true"),r=n.querySelector(".sub-menu")?".sub-menu":".children",c.classList.contains("dropdown-click-menu-item")?t.parentNode.querySelector(r).classList.toggle("toggled-on"):c.classList.contains("dropdown-click-arrow")&&n.querySelector(r).classList.toggle("toggled-on")},e=document.querySelectorAll(".main-nav .menu-item-has-children > a");if(c.classList.contains("dropdown-click-menu-item"))for(var n=0;n<e.length;n++)e[n].addEventListener("click",t,!0);if(c.classList.contains("dropdown-click-arrow")){for(n=0;n<document.querySelectorAll(".main-nav .menu-item-has-children > a").length;n++)"#"==document.querySelectorAll(".main-nav .menu-item-has-children > a")[n].getAttribute("href")&&document.querySelectorAll(".main-nav .menu-item-has-children > a")[n].classList.add("menu-item-dropdown-click");for(var o=document.querySelectorAll(".main-nav .menu-item-has-children > a .dropdown-menu-toggle"),n=0;n<o.length;n++)o[n].addEventListener("click",t,!1),o[n].addEventListener("keydown",function(e){13===(e.which||e.keyCode)&&t(e,this)},!1);for(n=0;n<document.querySelectorAll(".main-nav .menu-item-has-children > a.menu-item-dropdown-click").length;n++)document.querySelectorAll(".main-nav .menu-item-has-children > a.menu-item-dropdown-click")[n].addEventListener("click",t,!1)}var l=function(){if(document.querySelector("nav ul .toggled-on")){for(var e=document.querySelectorAll("nav ul .toggled-on"),t=document.querySelectorAll("nav .dropdown-menu-toggle"),n=0;n<e.length;n++)e[n].classList.remove("toggled-on"),e[n].closest(".sfHover").classList.remove("sfHover");for(n=0;n<t.length;n++)t[n].setAttribute("aria-expanded","false")}};document.addEventListener("click",function(e){e.target.closest(".sfHover")||l()},!1),document.addEventListener("keydown",function(e){27===(e.which||e.keyCode)&&l()},!1)}}();
|
||||
430
wp-content/themes/generatepress/assets/js/main.js
Normal file
430
wp-content/themes/generatepress/assets/js/main.js
Normal file
@ -0,0 +1,430 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
/**
|
||||
* matches() pollyfil
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
|
||||
*/
|
||||
if ( ! Element.prototype.matches ) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* closest() pollyfil
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
|
||||
*/
|
||||
if ( ! Element.prototype.closest ) {
|
||||
Element.prototype.closest = function( s ) {
|
||||
var el = this;
|
||||
var ancestor = this;
|
||||
if ( ! document.documentElement.contains( el ) ) {
|
||||
return null;
|
||||
}
|
||||
do {
|
||||
if ( ancestor.matches( s ) ) {
|
||||
return ancestor;
|
||||
}
|
||||
ancestor = ancestor.parentElement;
|
||||
} while ( ancestor !== null );
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
var getSiblings = function( elem ) {
|
||||
return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) {
|
||||
return sibling !== elem;
|
||||
} );
|
||||
};
|
||||
|
||||
var allNavToggles = document.querySelectorAll( '.menu-toggle' ),
|
||||
dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ),
|
||||
navLinks = document.querySelectorAll( 'nav ul a' ),
|
||||
mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ),
|
||||
body = document.body,
|
||||
htmlEl = document.documentElement;
|
||||
|
||||
var enableDropdownArrows = function( nav ) {
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < dropdownItems.length; i++ ) {
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var disableDropdownArrows = function( nav ) {
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < dropdownItems.length; i++ ) {
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var setDropdownArrowAttributes = function( arrow ) {
|
||||
if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) {
|
||||
arrow.setAttribute( 'aria-expanded', 'true' );
|
||||
arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel );
|
||||
} else {
|
||||
arrow.setAttribute( 'aria-expanded', 'false' );
|
||||
arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Start mobile menu toggle.
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var toggleNav = function( e, _this ) {
|
||||
if ( ! _this ) {
|
||||
var _this = this;
|
||||
}
|
||||
|
||||
var parentContainer = '';
|
||||
|
||||
if ( _this.getAttribute( 'data-nav' ) ) {
|
||||
parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) );
|
||||
} else {
|
||||
parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) );
|
||||
}
|
||||
|
||||
if ( ! parentContainer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isExternalToggle = false;
|
||||
|
||||
if ( _this.closest( '.mobile-menu-control-wrapper' ) ) {
|
||||
isExternalToggle = true;
|
||||
}
|
||||
|
||||
var nav = parentContainer.getElementsByTagName( 'ul' )[0];
|
||||
|
||||
if ( parentContainer.classList.contains( 'toggled' ) ) {
|
||||
parentContainer.classList.remove( 'toggled' );
|
||||
htmlEl.classList.remove( 'mobile-menu-open' );
|
||||
nav.setAttribute( 'aria-hidden', 'true' );
|
||||
_this.setAttribute( 'aria-expanded', 'false' );
|
||||
|
||||
if ( isExternalToggle ) {
|
||||
mobileMenuControls.classList.remove( 'toggled' );
|
||||
} else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) {
|
||||
mobileMenuControls.classList.remove( 'toggled' );
|
||||
}
|
||||
|
||||
disableDropdownArrows( nav );
|
||||
} else {
|
||||
parentContainer.classList.add( 'toggled' );
|
||||
htmlEl.classList.add( 'mobile-menu-open' );
|
||||
nav.setAttribute( 'aria-hidden', 'false' );
|
||||
_this.setAttribute( 'aria-expanded', 'true' );
|
||||
|
||||
if ( isExternalToggle ) {
|
||||
mobileMenuControls.classList.add( 'toggled' );
|
||||
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ) ) {
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) {
|
||||
mobileMenuControls.querySelector( '.search-item' ).click();
|
||||
}
|
||||
}
|
||||
} else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) {
|
||||
mobileMenuControls.classList.add( 'toggled' );
|
||||
}
|
||||
|
||||
enableDropdownArrows( nav );
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0; i < allNavToggles.length; i++ ) {
|
||||
allNavToggles[i].addEventListener( 'click', toggleNav, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Open sub-menus
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var toggleSubNav = function( e, _this ) {
|
||||
|
||||
if ( ! _this ) {
|
||||
var _this = this;
|
||||
}
|
||||
|
||||
if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) {
|
||||
e.preventDefault();
|
||||
var closestLi = _this.closest( 'li' );
|
||||
|
||||
setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) );
|
||||
|
||||
if ( closestLi.querySelector( '.sub-menu' ) ) {
|
||||
var subMenu = closestLi.querySelector( '.sub-menu' );
|
||||
} else {
|
||||
var subMenu = closestLi.querySelector( '.children' );
|
||||
}
|
||||
|
||||
if ( generatepressMenu.toggleOpenedSubMenus ) {
|
||||
var siblings = getSiblings( closestLi );
|
||||
|
||||
for ( var i = 0; i < siblings.length; i++ ) {
|
||||
if ( siblings[i].classList.contains( 'sfHover' ) ) {
|
||||
siblings[i].classList.remove( 'sfHover' );
|
||||
siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' );
|
||||
setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closestLi.classList.toggle( 'sfHover' );
|
||||
subMenu.classList.toggle( 'toggled-on' );
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
for ( var i = 0; i < dropdownToggle.length; i++ ) {
|
||||
dropdownToggle[i].addEventListener( 'click', toggleSubNav, false );
|
||||
dropdownToggle[i].addEventListener( 'keypress', function( e ) {
|
||||
var key = e.which || e.keyCode;
|
||||
if (key === 13) { // 13 is enter
|
||||
toggleSubNav( e, this );
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the mobile menu if our toggle isn't visible.
|
||||
* Makes it possible to style mobile item with .toggled class.
|
||||
*/
|
||||
var checkMobile = function() {
|
||||
var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' );
|
||||
|
||||
for ( var i = 0; i < openedMobileMenus.length; i++ ) {
|
||||
var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' );
|
||||
|
||||
if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) {
|
||||
menuToggle = mobileMenuControls.querySelector( '.menu-toggle' );
|
||||
}
|
||||
|
||||
if ( menuToggle && menuToggle.offsetParent === null ) {
|
||||
if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) {
|
||||
var remoteNav = false;
|
||||
|
||||
if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) {
|
||||
remoteNav = true;
|
||||
}
|
||||
|
||||
if ( ! remoteNav ) {
|
||||
// Navigation is toggled, but .menu-toggle isn't visible on the page (display: none).
|
||||
var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ],
|
||||
closestNavItems = closestNav.getElementsByTagName( 'li' ),
|
||||
closestSubMenus = closestNav.getElementsByTagName( 'ul' );
|
||||
}
|
||||
|
||||
document.activeElement.blur();
|
||||
openedMobileMenus[i].classList.remove( 'toggled' );
|
||||
|
||||
htmlEl.classList.remove( 'mobile-menu-open' );
|
||||
menuToggle.setAttribute( 'aria-expanded', 'false' );
|
||||
|
||||
if ( ! remoteNav ) {
|
||||
for ( var li = 0; li < closestNavItems.length; li++ ) {
|
||||
closestNavItems[li].classList.remove( 'sfHover' );
|
||||
}
|
||||
|
||||
for ( var sm = 0; sm < closestSubMenus.length; sm++ ) {
|
||||
closestSubMenus[sm].classList.remove( 'toggled-on' );
|
||||
}
|
||||
|
||||
if ( closestNav ) {
|
||||
closestNav.removeAttribute( 'aria-hidden' );
|
||||
}
|
||||
}
|
||||
|
||||
disableDropdownArrows( openedMobileMenus[i] );
|
||||
}
|
||||
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ) ) {
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) {
|
||||
mobileMenuControls.querySelector( '.search-item' ).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
window.addEventListener( 'resize', checkMobile, false );
|
||||
window.addEventListener( 'orientationchange', checkMobile, false );
|
||||
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
/**
|
||||
* Do some essential things when menu items are clicked.
|
||||
*/
|
||||
for ( var i = 0; i < navLinks.length; i++ ) {
|
||||
navLinks[i].addEventListener( 'click', function( e ) {
|
||||
// Remove sfHover class if we're going to another site.
|
||||
if ( this.hostname !== window.location.hostname ) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
var closest_nav = this.closest( 'nav' );
|
||||
if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) {
|
||||
var url = this.getAttribute( 'href' );
|
||||
|
||||
// Open the sub-menu if the link has no destination
|
||||
if ( '#' == url || '' == url ) {
|
||||
e.preventDefault();
|
||||
var closestLi = this.closest( 'li' );
|
||||
closestLi.classList.toggle( 'sfHover' );
|
||||
var subMenu = closestLi.querySelector( '.sub-menu' );
|
||||
|
||||
if ( subMenu ) {
|
||||
subMenu.classList.toggle( 'toggled-on' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
var body = document.body;
|
||||
|
||||
body.addEventListener( 'mousedown', function() {
|
||||
body.classList.add( 'using-mouse' );
|
||||
} );
|
||||
|
||||
body.addEventListener( 'keydown', function() {
|
||||
body.classList.remove( 'using-mouse' );
|
||||
} );
|
||||
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ),
|
||||
menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' );
|
||||
|
||||
/**
|
||||
* Make menu items tab accessible when using the hover dropdown type
|
||||
*/
|
||||
var toggleFocus = function() {
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
while ( -1 === self.className.indexOf( 'main-nav' ) ) {
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
self.classList.toggle( 'sfHover' );
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make our menu bar items tab accessible.
|
||||
*/
|
||||
var toggleMenuBarItemFocus = function() {
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) {
|
||||
if ( self.classList.contains( 'menu-bar-item' ) ) {
|
||||
self.classList.toggle( 'sfHover' );
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0; i < navLinks.length; i++ ) {
|
||||
navLinks[i].addEventListener( 'focus', toggleFocus );
|
||||
navLinks[i].addEventListener( 'blur', toggleFocus );
|
||||
}
|
||||
|
||||
for ( var i = 0; i < menuBarItems.length; i++ ) {
|
||||
menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus );
|
||||
menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make hover dropdown touch-friendly.
|
||||
*/
|
||||
if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < parentElements.length; i++ ) {
|
||||
parentElements[i].addEventListener( 'touchend', function( e ) {
|
||||
|
||||
// Bail on mobile
|
||||
if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( e.touches.length === 1 || e.touches.length === 0 ) {
|
||||
// Prevent touch events within dropdown bubbling down to document
|
||||
e.stopPropagation();
|
||||
|
||||
// Toggle hover
|
||||
if ( ! this.classList.contains( 'sfHover' ) ) {
|
||||
// Prevent link on first touch
|
||||
if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
var getSiblings = function( elem ) {
|
||||
return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) {
|
||||
return sibling !== elem;
|
||||
} );
|
||||
};
|
||||
|
||||
// Close other sub-menus.
|
||||
var closestLi = this.closest( 'li' ),
|
||||
siblings = getSiblings( closestLi );
|
||||
|
||||
for ( var i = 0; i < siblings.length; i++ ) {
|
||||
if ( siblings[i].classList.contains( 'sfHover' ) ) {
|
||||
siblings[i].classList.remove( 'sfHover' );
|
||||
}
|
||||
}
|
||||
|
||||
this.classList.add( 'sfHover' );
|
||||
|
||||
// Hide dropdown on touch outside
|
||||
var closeDropdown,
|
||||
thisItem = this;
|
||||
|
||||
document.addEventListener( 'touchend', closeDropdown = function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
thisItem.classList.remove( 'sfHover' );
|
||||
document.removeEventListener( 'touchend', closeDropdown );
|
||||
} );
|
||||
}
|
||||
}
|
||||
} );
|
||||
}
|
||||
}
|
||||
} )();
|
||||
1
wp-content/themes/generatepress/assets/js/main.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/main.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
302
wp-content/themes/generatepress/assets/js/menu.js
Normal file
302
wp-content/themes/generatepress/assets/js/menu.js
Normal file
@ -0,0 +1,302 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
/**
|
||||
* matches() pollyfil
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
|
||||
*/
|
||||
if ( ! Element.prototype.matches ) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
|
||||
/**
|
||||
* closest() pollyfil
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
|
||||
*/
|
||||
if ( ! Element.prototype.closest ) {
|
||||
Element.prototype.closest = function( s ) {
|
||||
var el = this;
|
||||
var ancestor = this;
|
||||
if ( ! document.documentElement.contains( el ) ) {
|
||||
return null;
|
||||
}
|
||||
do {
|
||||
if ( ancestor.matches( s ) ) {
|
||||
return ancestor;
|
||||
}
|
||||
ancestor = ancestor.parentElement;
|
||||
} while ( ancestor !== null );
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
var getSiblings = function( elem ) {
|
||||
return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) {
|
||||
return sibling !== elem;
|
||||
} );
|
||||
};
|
||||
|
||||
var allNavToggles = document.querySelectorAll( '.menu-toggle' ),
|
||||
dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ),
|
||||
navLinks = document.querySelectorAll( 'nav ul a' ),
|
||||
mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ),
|
||||
body = document.body,
|
||||
htmlEl = document.documentElement;
|
||||
|
||||
var enableDropdownArrows = function( nav ) {
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < dropdownItems.length; i++ ) {
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var disableDropdownArrows = function( nav ) {
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' );
|
||||
|
||||
for ( var i = 0; i < dropdownItems.length; i++ ) {
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' );
|
||||
dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var setDropdownArrowAttributes = function( arrow ) {
|
||||
if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) {
|
||||
arrow.setAttribute( 'aria-expanded', 'true' );
|
||||
arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel );
|
||||
} else {
|
||||
arrow.setAttribute( 'aria-expanded', 'false' );
|
||||
arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Start mobile menu toggle.
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var toggleNav = function( e, _this ) {
|
||||
if ( ! _this ) {
|
||||
var _this = this;
|
||||
}
|
||||
|
||||
var parentContainer = '';
|
||||
|
||||
if ( _this.getAttribute( 'data-nav' ) ) {
|
||||
parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) );
|
||||
} else {
|
||||
parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) );
|
||||
}
|
||||
|
||||
if ( ! parentContainer ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isExternalToggle = false;
|
||||
|
||||
if ( _this.closest( '.mobile-menu-control-wrapper' ) ) {
|
||||
isExternalToggle = true;
|
||||
}
|
||||
|
||||
var nav = parentContainer.getElementsByTagName( 'ul' )[0];
|
||||
|
||||
if ( parentContainer.classList.contains( 'toggled' ) ) {
|
||||
parentContainer.classList.remove( 'toggled' );
|
||||
htmlEl.classList.remove( 'mobile-menu-open' );
|
||||
nav.setAttribute( 'aria-hidden', 'true' );
|
||||
_this.setAttribute( 'aria-expanded', 'false' );
|
||||
|
||||
if ( isExternalToggle ) {
|
||||
mobileMenuControls.classList.remove( 'toggled' );
|
||||
} else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) {
|
||||
mobileMenuControls.classList.remove( 'toggled' );
|
||||
}
|
||||
|
||||
disableDropdownArrows( nav );
|
||||
} else {
|
||||
parentContainer.classList.add( 'toggled' );
|
||||
htmlEl.classList.add( 'mobile-menu-open' );
|
||||
nav.setAttribute( 'aria-hidden', 'false' );
|
||||
_this.setAttribute( 'aria-expanded', 'true' );
|
||||
|
||||
if ( isExternalToggle ) {
|
||||
mobileMenuControls.classList.add( 'toggled' );
|
||||
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ) ) {
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) {
|
||||
mobileMenuControls.querySelector( '.search-item' ).click();
|
||||
}
|
||||
}
|
||||
} else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) {
|
||||
mobileMenuControls.classList.add( 'toggled' );
|
||||
}
|
||||
|
||||
enableDropdownArrows( nav );
|
||||
}
|
||||
}
|
||||
|
||||
for ( var i = 0; i < allNavToggles.length; i++ ) {
|
||||
allNavToggles[i].addEventListener( 'click', toggleNav, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Open sub-menus
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var toggleSubNav = function( e, _this ) {
|
||||
|
||||
if ( ! _this ) {
|
||||
var _this = this;
|
||||
}
|
||||
|
||||
if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) {
|
||||
e.preventDefault();
|
||||
var closestLi = _this.closest( 'li' );
|
||||
|
||||
setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) );
|
||||
|
||||
if ( closestLi.querySelector( '.sub-menu' ) ) {
|
||||
var subMenu = closestLi.querySelector( '.sub-menu' );
|
||||
} else {
|
||||
var subMenu = closestLi.querySelector( '.children' );
|
||||
}
|
||||
|
||||
if ( generatepressMenu.toggleOpenedSubMenus ) {
|
||||
var siblings = getSiblings( closestLi );
|
||||
|
||||
for ( var i = 0; i < siblings.length; i++ ) {
|
||||
if ( siblings[i].classList.contains( 'sfHover' ) ) {
|
||||
siblings[i].classList.remove( 'sfHover' );
|
||||
siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' );
|
||||
setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closestLi.classList.toggle( 'sfHover' );
|
||||
subMenu.classList.toggle( 'toggled-on' );
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
for ( var i = 0; i < dropdownToggle.length; i++ ) {
|
||||
dropdownToggle[i].addEventListener( 'click', toggleSubNav, false );
|
||||
dropdownToggle[i].addEventListener( 'keypress', function( e ) {
|
||||
var key = e.which || e.keyCode;
|
||||
if (key === 13) { // 13 is enter
|
||||
toggleSubNav( e, this );
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the mobile menu if our toggle isn't visible.
|
||||
* Makes it possible to style mobile item with .toggled class.
|
||||
*/
|
||||
var checkMobile = function() {
|
||||
var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' );
|
||||
|
||||
for ( var i = 0; i < openedMobileMenus.length; i++ ) {
|
||||
var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' );
|
||||
|
||||
if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) {
|
||||
menuToggle = mobileMenuControls.querySelector( '.menu-toggle' );
|
||||
}
|
||||
|
||||
if ( menuToggle && menuToggle.offsetParent === null ) {
|
||||
if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) {
|
||||
var remoteNav = false;
|
||||
|
||||
if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) {
|
||||
remoteNav = true;
|
||||
}
|
||||
|
||||
if ( ! remoteNav ) {
|
||||
// Navigation is toggled, but .menu-toggle isn't visible on the page (display: none).
|
||||
var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ],
|
||||
closestNavItems = closestNav.getElementsByTagName( 'li' ),
|
||||
closestSubMenus = closestNav.getElementsByTagName( 'ul' );
|
||||
}
|
||||
|
||||
document.activeElement.blur();
|
||||
openedMobileMenus[i].classList.remove( 'toggled' );
|
||||
|
||||
htmlEl.classList.remove( 'mobile-menu-open' );
|
||||
menuToggle.setAttribute( 'aria-expanded', 'false' );
|
||||
|
||||
if ( ! remoteNav ) {
|
||||
for ( var li = 0; li < closestNavItems.length; li++ ) {
|
||||
closestNavItems[li].classList.remove( 'sfHover' );
|
||||
}
|
||||
|
||||
for ( var sm = 0; sm < closestSubMenus.length; sm++ ) {
|
||||
closestSubMenus[sm].classList.remove( 'toggled-on' );
|
||||
}
|
||||
|
||||
if ( closestNav ) {
|
||||
closestNav.removeAttribute( 'aria-hidden' );
|
||||
}
|
||||
}
|
||||
|
||||
disableDropdownArrows( openedMobileMenus[i] );
|
||||
}
|
||||
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ) ) {
|
||||
if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) {
|
||||
mobileMenuControls.querySelector( '.search-item' ).click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
window.addEventListener( 'resize', checkMobile, false );
|
||||
window.addEventListener( 'orientationchange', checkMobile, false );
|
||||
|
||||
if ( body.classList.contains( 'dropdown-hover' ) ) {
|
||||
/**
|
||||
* Do some essential things when menu items are clicked.
|
||||
*/
|
||||
for ( var i = 0; i < navLinks.length; i++ ) {
|
||||
navLinks[i].addEventListener( 'click', function( e ) {
|
||||
// Remove sfHover class if we're going to another site.
|
||||
if ( this.hostname !== window.location.hostname ) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
var closest_nav = this.closest( 'nav' );
|
||||
if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) {
|
||||
var url = this.getAttribute( 'href' );
|
||||
|
||||
// Open the sub-menu if the link has no destination
|
||||
if ( '#' == url || '' == url ) {
|
||||
e.preventDefault();
|
||||
var closestLi = this.closest( 'li' );
|
||||
closestLi.classList.toggle( 'sfHover' );
|
||||
var subMenu = closestLi.querySelector( '.sub-menu' );
|
||||
|
||||
if ( subMenu ) {
|
||||
subMenu.classList.toggle( 'toggled-on' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
1
wp-content/themes/generatepress/assets/js/menu.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/menu.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
128
wp-content/themes/generatepress/assets/js/navigation-search.js
Normal file
128
wp-content/themes/generatepress/assets/js/navigation-search.js
Normal file
@ -0,0 +1,128 @@
|
||||
( function() {
|
||||
'use strict';
|
||||
|
||||
if ( 'querySelector' in document && 'addEventListener' in window ) {
|
||||
/**
|
||||
* Navigation search.
|
||||
*
|
||||
* @param e The event.
|
||||
* @param _this The clicked item.
|
||||
*/
|
||||
var toggleSearch = function( e, item ) {
|
||||
e.preventDefault();
|
||||
|
||||
if ( ! item ) {
|
||||
var item = this;
|
||||
}
|
||||
|
||||
var forms = document.querySelectorAll( '.navigation-search' ),
|
||||
toggles = document.querySelectorAll( '.search-item' ),
|
||||
focusableEls = document.querySelectorAll('a[href], area[href], input:not([disabled]):not(.navigation-search), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),
|
||||
nav = '';
|
||||
|
||||
if ( item.closest( '.mobile-menu-control-wrapper' ) ) {
|
||||
nav = document.getElementById( 'site-navigation' );
|
||||
}
|
||||
|
||||
for ( var i = 0; i < forms.length; i++ ) {
|
||||
if ( forms[i].classList.contains( 'nav-search-active' ) ) {
|
||||
if ( forms[i].closest( '#sticky-placeholder' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
forms[i].classList.remove( 'nav-search-active' );
|
||||
|
||||
var activeSearch = document.querySelector( '.has-active-search' );;
|
||||
|
||||
if ( activeSearch ) {
|
||||
activeSearch.classList.remove( 'has-active-search' );
|
||||
}
|
||||
|
||||
for ( var t = 0; t < toggles.length; t++ ) {
|
||||
toggles[t].classList.remove( 'close-search' );
|
||||
toggles[t].classList.remove( 'active' );
|
||||
toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.open );
|
||||
|
||||
// Allow tabindex on items again.
|
||||
for ( var f = 0; f < focusableEls.length; f++ ) {
|
||||
if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) {
|
||||
focusableEls[f].removeAttribute( 'tabindex' );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
document.activeElement.blur();
|
||||
} else {
|
||||
if ( forms[i].closest( '#sticky-placeholder' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var openedMobileMenu = forms[i].closest( '.toggled' );
|
||||
|
||||
if ( openedMobileMenu ) {
|
||||
// Close the mobile menu.
|
||||
openedMobileMenu.querySelector( 'button.menu-toggle' ).click();
|
||||
}
|
||||
|
||||
if ( nav ) {
|
||||
nav.classList.add( 'has-active-search' );
|
||||
}
|
||||
|
||||
forms[i].classList.add( 'nav-search-active' );
|
||||
|
||||
var container = this.closest( 'nav' );
|
||||
|
||||
if ( container ) {
|
||||
if ( container.classList.contains( 'mobile-menu-control-wrapper' ) ) {
|
||||
container = nav;
|
||||
}
|
||||
|
||||
var searchField = container.querySelector( '.search-field' );
|
||||
|
||||
if ( searchField ) {
|
||||
searchField.focus();
|
||||
}
|
||||
}
|
||||
|
||||
for ( var t = 0; t < toggles.length; t++ ) {
|
||||
toggles[t].classList.add( 'active' );
|
||||
toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.close );
|
||||
|
||||
// Trap tabindex within the search element
|
||||
for ( var f = 0; f < focusableEls.length; f++ ) {
|
||||
if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) {
|
||||
focusableEls[f].setAttribute( 'tabindex', '-1' );
|
||||
}
|
||||
};
|
||||
|
||||
toggles[t].classList.add( 'close-search' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( document.body.classList.contains( 'nav-search-enabled' ) ) {
|
||||
var searchItems = document.querySelectorAll( '.search-item' );
|
||||
|
||||
for ( var i = 0; i < searchItems.length; i++ ) {
|
||||
searchItems[i].addEventListener( 'click', toggleSearch, false );
|
||||
}
|
||||
|
||||
// Close navigation search on escape key
|
||||
document.addEventListener( 'keydown', function( e ) {
|
||||
if ( document.querySelector( '.navigation-search.nav-search-active' ) ) {
|
||||
var key = e.which || e.keyCode;
|
||||
|
||||
if ( key === 27 ) { // 27 is esc
|
||||
var activeSearchItems = document.querySelectorAll( '.search-item.active' );
|
||||
|
||||
for ( var i = 0; i < activeSearchItems.length; i++ ) {
|
||||
toggleSearch( e, activeSearchItems[i] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
}
|
||||
})();
|
||||
1
wp-content/themes/generatepress/assets/js/navigation-search.min.js
vendored
Normal file
1
wp-content/themes/generatepress/assets/js/navigation-search.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var s=function(e,t){e.preventDefault(),t=t||this;var a=document.querySelectorAll(".navigation-search"),s=document.querySelectorAll(".search-item"),c=document.querySelectorAll('a[href], area[href], input:not([disabled]):not(.navigation-search), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'),r="";t.closest(".mobile-menu-control-wrapper")&&(r=document.getElementById("site-navigation"));for(var n=0;n<a.length;n++)if(a[n].classList.contains("nav-search-active")){if(a[n].closest("#sticky-placeholder"))continue;a[n].classList.remove("nav-search-active");var i=document.querySelector(".has-active-search");i&&i.classList.remove("has-active-search");for(var o=0;o<s.length;o++){s[o].classList.remove("close-search"),s[o].classList.remove("active"),s[o].querySelector("a").setAttribute("aria-label",generatepressNavSearch.open);for(var l=0;l<c.length;l++)c[l].closest(".navigation-search")||c[l].closest(".search-item")||c[l].removeAttribute("tabindex")}document.activeElement.blur()}else{if(a[n].closest("#sticky-placeholder"))continue;var d=a[n].closest(".toggled");d&&d.querySelector("button.menu-toggle").click(),r&&r.classList.add("has-active-search"),a[n].classList.add("nav-search-active");var v,u=this.closest("nav");u&&(u.classList.contains("mobile-menu-control-wrapper")&&(u=r),(v=u.querySelector(".search-field"))&&v.focus());for(o=0;o<s.length;o++){s[o].classList.add("active"),s[o].querySelector("a").setAttribute("aria-label",generatepressNavSearch.close);for(l=0;l<c.length;l++)c[l].closest(".navigation-search")||c[l].closest(".search-item")||c[l].setAttribute("tabindex","-1");s[o].classList.add("close-search")}}};if(document.body.classList.contains("nav-search-enabled")){for(var e=document.querySelectorAll(".search-item"),t=0;t<e.length;t++)e[t].addEventListener("click",s,!1);document.addEventListener("keydown",function(e){if(document.querySelector(".navigation-search.nav-search-active")&&27===(e.which||e.keyCode))for(var t=document.querySelectorAll(".search-item.active"),a=0;a<t.length;a++){s(e,t[a]);break}},!1)}}}();
|
||||
Reference in New Issue
Block a user