updated theme GeneratePress version 3.2.0

This commit is contained in:
KawaiiPunk 2022-10-27 11:14:10 +00:00 committed by Gitium
parent 7b1024e711
commit 1465186bc5
41 changed files with 3367 additions and 4581 deletions

View File

@ -1,7 +1,3 @@
.wp-block a {
text-decoration: none;
}
.block-editor-block-list__layout pre { .block-editor-block-list__layout pre {
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
font-family: inherit; font-family: inherit;
@ -10,7 +6,6 @@
margin-bottom: 1.5em; margin-bottom: 1.5em;
padding: 20px; padding: 20px;
overflow: auto; overflow: auto;
max-width: 100%;
color: inherit; /* editor only */ color: inherit; /* editor only */
} }

View File

@ -1218,8 +1218,8 @@ object {
margin: 0px 40px 0px 40px; margin: 0px 40px 0px 40px;
} }
.one-container.archive .post:not(:last-child), .one-container.archive .post:not(:last-child):not(.is-loop-template-item),
.one-container.blog .post:not(:last-child) { .one-container.blog .post:not(:last-child):not(.is-loop-template-item) {
padding-bottom: 40px; padding-bottom: 40px;
} }

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-data', 'wp-plugins', 'wp-polyfill'), 'version' => '11ef0750a5fe7ac2ec7219a41656ae84'); <?php return array('dependencies' => array('wp-data', 'wp-dom-ready', 'wp-element', 'wp-plugins', 'wp-polyfill'), 'version' => 'f87d99f84e8d3ed6f9273c647f854953');

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'da1908e9e6ce0313d16a77f4eee7c763'); <?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '799faa7f09d874497fa43aed7476064a');

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '1544fd10034784b46bf2292e69917371'); <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '0b0b00a375613f57beee85895b88af90');

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
.components-base-control__help{margin-top:2px;margin-bottom:0}.components-base-control__label{display:block;margin-bottom:10px}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper[data-wrapper-type=color]>div:first-child{flex-grow:1}.generate-customize-control-wrapper[data-wrapper-type=color]>div:not(:first-child):not(:empty){margin-left:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div{flex-basis:calc(50% - 5px)}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(odd){margin-right:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(even){margin-left:5px}.generate-customize-control--popover>.components-popover__content{padding:15px;width:280px;box-sizing:border-box}.generate-customize-control--popover .components-base-control:not(:last-child){margin-bottom:15px}.customize-control[data-toggleid]{display:none}#customize-control-generate_settings-google_font_display{margin-top:10px;display:flex;flex-direction:column}#customize-control-generate_settings-google_font_display .description{order:10;margin-bottom:0;margin-top:5px} .components-base-control__help{margin-top:2px;margin-bottom:0}.components-base-control__label{display:block;margin-bottom:10px}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper[data-wrapper-type=color]>div:first-child{flex-grow:1}.generate-customize-control-wrapper[data-wrapper-type=color]>div:not(:first-child):not(:empty){margin-left:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div{flex-basis:calc(50% - 5px)}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(odd){margin-right:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(even){margin-left:5px}.generate-customize-control--popover>.components-popover__content{padding:15px;width:280px;box-sizing:border-box}.generate-customize-control--popover .components-base-control:not(:last-child){margin-bottom:15px}.customize-control[data-toggleid]{display:none}#customize-control-generate_settings-google_font_display{margin-top:10px;display:flex;flex-direction:column}#customize-control-generate_settings-google_font_display .description{order:10;margin-bottom:0;margin-top:5px}
.generate-component-color-picker{position:fixed !important;margin:5px}
.generate-component-color-picker .components-color-picker{box-sizing:border-box}.generate-component-color-picker .components-color-picker__inputs-wrapper{display:none}.generate-component-color-picker .react-colorful{width:100% !important}.generate-component-color-picker .react-colorful .react-colorful__saturation{height:150px}.generate-component-color-picker .react-colorful .react-colorful__hue,.generate-component-color-picker .react-colorful .react-colorful__alpha{width:calc(100% - 40px)}.generate-component-color-picker .react-colorful+div{display:none}.generate-component-color-picker .generate-color-input-wrapper{display:flex;padding:0}.generate-component-color-picker .generate-color-input-wrapper .generate-color-input{flex-grow:1}.generate-component-color-picker .generate-color-input-wrapper .components-color-clear-color{margin-left:5px}.generate-component-color-picker .generate-color-input-wrapper input{margin-right:5px}.generate-component-color-picker .generate-color-input-wrapper .components-base-control__field{margin-bottom:0}.generate-component-color-picker>.components-base-control:first-child{margin-bottom:0}.generate-component-color-picker .components-color-picker__inputs-wrapper{min-width:auto}.generate-component-color-picker .generate-component-color-picker-palette{padding:16px 0 0}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker{display:flex;flex-wrap:wrap}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches{display:flex;flex-wrap:wrap;gap:6px}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches .components-circular-option-picker__option-wrapper{margin:0}.generate-component-color-picker .components-color-palette{margin:0}.generate-component-color-picker .components-color-picker{padding:5px;width:100%}.generate-component-color-picker .components-color-picker__body{padding-bottom:0}.generate-component-color-picker .components-popover__content{padding:10px;width:295px;box-sizing:border-box}.generate-component-color-picker .components-color-clear-color{height:auto}.generate-component-color-picker .components-circular-option-picker__option.is-pressed+svg{fill:#fff;background:#000;transform:scale(0.6)}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:first-child{flex-grow:1}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:not(:last-child){margin-right:5px}.generate-component-color-picker-wrapper>.components-base-control__field{position:relative;display:flex;align-items:center;justify-content:space-between}.generate-component-color-picker-wrapper>.components-base-control__field .components-color-palette__item-wrapper{margin:0}.generate-component-color-picker-palette button,.generate-color-picker-area button{width:28px;height:28px;position:relative}.generate-component-color-picker-palette button:hover,.generate-color-picker-area button:hover{background-color:inherit}.generate-component-color-picker-palette button:focus:after,.generate-color-picker-area button:focus:after{width:28px;height:28px}.generate-customize-control--popover .components-color-picker{box-sizing:border-box}.generate-customize-control--popover .components-color-picker__inputs-wrapper{display:none}.generate-customize-control--popover>.components-base-control:first-child{margin-bottom:0}.generate-customize-control--popover .components-color-picker__inputs-wrapper{min-width:auto}.generate-customize-control--popover .components-color-picker{padding:5px}.generate-customize-control--popover .components-color-picker__body{padding-bottom:0}.generate-customize-control--popover .components-color-clear-color{height:auto}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-color-input--icon{align-items:center;justify-content:center;display:flex;padding:5px;border:1px solid currentColor;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.generate-color-input--icon svg{height:1em;width:1em;transform:scale(1.3)}.generate-color-option-area{padding:16px 16px 0}.generate-color-input--css-var-name-wrapper{position:relative}.generate-color-input--css-var-name-wrapper button{position:absolute;bottom:0;right:0;padding:0 8px;min-height:30px;height:auto}.generate-color-input--css-var-name-wrapper button svg{width:1em;height:1em;fill:none} .generate-component-color-picker .components-color-picker{box-sizing:border-box}.generate-component-color-picker .components-color-picker__inputs-wrapper{display:none}.generate-component-color-picker .react-colorful{width:100% !important}.generate-component-color-picker .react-colorful .react-colorful__pointer{width:20px;height:20px}.generate-component-color-picker .react-colorful .react-colorful__saturation{height:150px}.generate-component-color-picker .generate-color-input-wrapper{display:flex;padding:0}.generate-component-color-picker .generate-color-input-wrapper .generate-color-input{flex-grow:1}.generate-component-color-picker .generate-color-input-wrapper .components-color-clear-color{margin-left:5px}.generate-component-color-picker .generate-color-input-wrapper input{margin-right:5px}.generate-component-color-picker .generate-color-input-wrapper .components-base-control__field{margin-bottom:0}.generate-component-color-picker>.components-base-control:first-child{margin-bottom:0}.generate-component-color-picker .components-color-picker__inputs-wrapper{min-width:auto}.generate-component-color-picker .generate-component-color-picker-palette{padding:16px 0 0}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker{display:flex;flex-wrap:wrap}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches{display:flex;flex-wrap:wrap;gap:6px}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches .components-circular-option-picker__option-wrapper{margin:0}.generate-component-color-picker .components-color-palette{margin:0}.generate-component-color-picker .components-color-picker{padding:5px;width:100%}.generate-component-color-picker .components-color-picker__body{padding-bottom:0}.generate-component-color-picker .components-popover__content{padding:10px;width:295px;box-sizing:border-box}.generate-component-color-picker .components-color-clear-color{height:auto}.generate-component-color-picker .components-circular-option-picker__option.is-pressed+svg{fill:#fff;background:#000;transform:scale(0.6)}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:first-child{flex-grow:1}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:not(:last-child){margin-right:5px}.generate-component-color-picker-wrapper>.components-base-control__field{position:relative;display:flex;align-items:center;justify-content:space-between}.generate-component-color-picker-wrapper>.components-base-control__field .components-color-palette__item-wrapper{margin:0}.generate-component-color-picker-palette button,.generate-color-picker-area button{width:28px;height:28px;position:relative}.generate-component-color-picker-palette button:hover,.generate-color-picker-area button:hover{background-color:inherit}.generate-component-color-picker-palette button:focus:after,.generate-color-picker-area button:focus:after{width:28px;height:28px;top:0;left:0;border:0;box-shadow:inset 0 0 0 2px #757575}.generate-customize-control--popover .components-color-picker{box-sizing:border-box}.generate-customize-control--popover .components-color-picker__inputs-wrapper{display:none}.generate-customize-control--popover>.components-base-control:first-child{margin-bottom:0}.generate-customize-control--popover .components-color-picker__inputs-wrapper{min-width:auto}.generate-customize-control--popover .components-color-picker{padding:5px}.generate-customize-control--popover .components-color-picker__body{padding-bottom:0}.generate-customize-control--popover .components-color-clear-color{height:auto}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-color-input--icon{align-items:center;justify-content:center;display:flex;padding:5px;border:1px solid currentColor;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.generate-color-input--icon svg{height:1em;width:1em;transform:scale(1.3)}.generate-color-option-area{padding:16px 0 0}.generate-color-input--css-var-name-wrapper{position:relative}.generate-color-input--css-var-name-wrapper button{position:absolute;bottom:0;right:0;padding:0 8px;min-height:30px;height:auto}.generate-color-input--css-var-name-wrapper button svg{width:1em;height:1em;fill:none}
.generate-font-manager--item{margin-bottom:10px}.generate-font-manager--item .generate-font-manager--header{display:flex;align-items:center}.generate-font-manager--item .generate-font-manager--header .generate-font-manager--label{flex-grow:1;padding-left:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label){background:#fff;border:1px solid #777;padding:0;display:flex;justify-content:center;align-items:center;width:30px;height:30px;min-width:30px;margin-left:5px;border-radius:100%;flex-shrink:0}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label) svg{margin-right:0;width:1em;height:1em}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label).generate-font-manager--open svg{fill:none}.generate-font-manager--item .generate-font-manager--options{margin-top:15px}.generate-font-manager--item .generate-font-manager--footer{margin-top:15px;padding-top:15px;border-top:1px solid #ddd}.generate-font-manager--item .generate-font-manager-google-font--field{margin-top:10px}.generate-font-manager--item .generate-font-manager--google-font-options{display:flex;flex-wrap:wrap;margin-top:15px}.generate-font-manager--item .generate-font-manager--google-font-options>div{flex-basis:calc(50% - 10px);margin-bottom:0}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .generate-font-manager--google-font-options .components-base-control__field{margin-bottom:0 !important}.generate-font-manager--item .generate-font-manager--select-options{display:flex;flex-wrap:wrap}.generate-font-manager--item .generate-font-manager--select-options>div{flex-basis:calc(50% - 5px)}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .components-select-control__input--generate-fontfamily{margin-bottom:3px}.generate-font-manager--item .generate-advanced-select__menu{position:relative !important}.generate-font-manager-group{margin-top:10px;margin-bottom:20px}.generate-font-manager-group__label{margin-top:0;color:#000;text-transform:uppercase;font-size:11px;margin-bottom:10px}.generate-font-manager-group .generate-font-manager--item:last-child{margin-bottom:0}.generate-customize-control--font-dropdown{background:#fff;padding:15px;margin-top:10px;position:relative}.generate-customize-control--font-dropdown:before{content:"";position:absolute;left:11px;top:-10px;width:0;height:0;border-style:solid;border-width:0 10px 10px 10px;border-color:transparent transparent #fff transparent;z-index:10}.generate-customize-control--font-dropdown>.components-base-control:not(:last-child){margin-bottom:15px}.generate-customize-control--font-dropdown>.components-base-control:last-child .components-base-control__field{margin-bottom:0} .generate-font-manager--item{margin-bottom:10px}.generate-font-manager--item .generate-font-manager--header{display:flex;align-items:center}.generate-font-manager--item .generate-font-manager--header .generate-font-manager--label{flex-grow:1;padding-left:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label){background:#fff;border:1px solid #777;padding:0;display:flex;justify-content:center;align-items:center;width:30px;height:30px;min-width:30px;margin-left:5px;border-radius:100%;flex-shrink:0}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label) svg{margin-right:0;width:1em;height:1em}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label).generate-font-manager--open svg{fill:none}.generate-font-manager--item .generate-font-manager--options{margin-top:15px}.generate-font-manager--item .generate-font-manager--footer{margin-top:15px;padding-top:15px;border-top:1px solid #ddd}.generate-font-manager--item .generate-font-manager-google-font--field{margin-top:10px}.generate-font-manager--item .generate-font-manager--google-font-options{display:flex;flex-wrap:wrap;margin-top:15px}.generate-font-manager--item .generate-font-manager--google-font-options>div{flex-basis:calc(50% - 10px);margin-bottom:0}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .generate-font-manager--google-font-options .components-base-control__field{margin-bottom:0 !important}.generate-font-manager--item .generate-font-manager--select-options{display:flex;flex-wrap:wrap}.generate-font-manager--item .generate-font-manager--select-options>div{flex-basis:calc(50% - 5px)}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .components-select-control__input--generate-fontfamily{margin-bottom:3px}.generate-font-manager--item .generate-advanced-select__menu{position:relative !important}.generate-font-manager-group{margin-top:10px;margin-bottom:20px}.generate-font-manager-group__label{margin-top:0;color:#000;text-transform:uppercase;font-size:11px;margin-bottom:10px}.generate-font-manager-group .generate-font-manager--item:last-child{margin-bottom:0}.generate-customize-control--font-dropdown{background:#fff;padding:15px;margin-top:10px;position:relative}.generate-customize-control--font-dropdown:before{content:"";position:absolute;left:11px;top:-10px;width:0;height:0;border-style:solid;border-width:0 10px 10px 10px;border-color:transparent transparent #fff transparent;z-index:10}.generate-customize-control--font-dropdown>.components-base-control:not(:last-child){margin-bottom:15px}.generate-customize-control--font-dropdown>.components-base-control:last-child .components-base-control__field{margin-bottom:0}
.generate-advanced-select__control{margin-bottom:12px}.generate-advanced-select__value-container{padding:0 6px !important}.generate-advanced-select__value-container>div{padding:0;margin:0}.generate-advanced-select__input input[type=text]:focus{box-shadow:none}.generate-advanced-select__option--is-selected{color:rgba(255,255,255,.5) !important} .generate-advanced-select__control{margin-bottom:12px}.generate-advanced-select__value-container{padding:0 6px !important}.generate-advanced-select__value-container>div{padding:0;margin:0}.generate-advanced-select__input input[type=text]:focus{box-shadow:none}.generate-advanced-select__option--is-selected{color:rgba(255,255,255,.5) !important}
.components-generate-units-control-header__units{display:flex;justify-content:space-between;margin-bottom:5px;align-items:center}.components-generate-control__units .components-generate-control-buttons__units button.components-button{background:#fff;box-shadow:none !important;color:#929da7;font-size:10px;padding:0 5px;position:relative;text-align:center;text-shadow:none;border:0;border-radius:0 !important;line-height:20px;padding:0 5px;height:auto}.components-generate-control__units .components-generate-control-buttons__units button.components-button.is-primary{background:#fff !important;color:#000 !important;cursor:default;z-index:1;font-weight:bold}.generate-component-device-field[data-device=desktop],.generate-component-device-field[data-device=tablet],.generate-component-device-field[data-device=mobile]{display:none}.preview-desktop .generate-component-device-field[data-device=desktop]{display:block}.preview-desktop .components-generate-control__units button.components-generate-control-button__units--desktop{color:#000}.preview-tablet .generate-component-device-field[data-device=tablet]{display:block}.preview-tablet .components-generate-control__units button.components-generate-control-button__units--tablet{color:#000}.preview-mobile .generate-component-device-field[data-device=mobile]{display:block}.preview-mobile .components-generate-control__units button.components-generate-control-button__units--mobile{color:#000} .components-generate-units-control-header__units{display:flex;justify-content:space-between;margin-bottom:5px;align-items:center}.components-generate-control__units .components-generate-control-buttons__units button.components-button{background:#fff;box-shadow:none !important;color:#929da7;font-size:10px;padding:0 5px;position:relative;text-align:center;text-shadow:none;border:0;border-radius:0 !important;line-height:20px;padding:0 5px;height:auto}.components-generate-control__units .components-generate-control-buttons__units button.components-button.is-primary{background:#fff !important;color:#000 !important;cursor:default;z-index:1;font-weight:bold}.generate-component-device-field[data-device=desktop],.generate-component-device-field[data-device=tablet],.generate-component-device-field[data-device=mobile]{display:none}.preview-desktop .generate-component-device-field[data-device=desktop]{display:block}.preview-desktop .components-generate-control__units button.components-generate-control-button__units--desktop{color:#000}.preview-tablet .generate-component-device-field[data-device=tablet]{display:block}.preview-tablet .components-generate-control__units button.components-generate-control-button__units--tablet{color:#000}.preview-mobile .generate-component-device-field[data-device=mobile]{display:block}.preview-mobile .components-generate-control__units button.components-generate-control-button__units--mobile{color:#000}
.components-generate-range-control .components-generate-range-control--wrapper{display:flex;justify-content:space-between}.components-generate-range-control .components-generate-range-control--wrapper .components-generate-range-control--range{width:calc(100% - 80px)}.components-generate-range-control .components-generate-range-control--wrapper .components-generate-range-control-input{width:65px}.components-generate-range-control .components-base-control__help{margin-top:-8px;font-size:12px;font-style:normal;color:#757575} .components-generate-range-control .components-generate-range-control--wrapper{display:flex;justify-content:space-between}.components-generate-range-control .components-generate-range-control--wrapper .components-generate-range-control--range{width:calc(100% - 80px)}.components-generate-range-control .components-generate-range-control--wrapper .components-generate-range-control-input{width:65px}.components-generate-range-control .components-base-control__help{margin-top:-8px;font-size:12px;font-style:normal;color:#757575}
.components-generate--control__units{display:flex}.generate-component-input-with-unit{display:flex;align-items:center}.generate-component-input-with-unit>div:not(.components-generate--control__units){flex-grow:1}.generate-component-input-with-unit div{margin-bottom:0}.generate-component-input-with-unit .components-generate-range-control--range{max-height:30px}.generate-component-input-with-unit .components-generate-range-control-input input{max-height:30px}.generate-component-control--unit-picker button{height:auto;min-height:30px;margin-left:2px;border:1px solid #444;font-weight:500;font-size:11px;text-transform:uppercase;width:40px;justify-content:center}.components-generate--control-buttons__units{display:flex}.components-generate--control-buttons__units button.components-button{text-transform:uppercase;padding:10px;height:auto;line-height:normal;font-weight:500} .components-generate--control__units{display:flex}.generate-component-input-with-unit{display:flex;align-items:center}.generate-component-input-with-unit>div:not(.components-generate--control__units){flex-grow:1}.generate-component-input-with-unit div{margin-bottom:0}.generate-component-input-with-unit .components-generate-range-control--range{max-height:30px}.generate-component-input-with-unit .components-generate-range-control-input input{max-height:30px}.generate-component-control--unit-picker button{height:auto;min-height:30px;margin-left:2px;border:1px solid #444;font-weight:500;font-size:11px;text-transform:uppercase;width:40px;justify-content:center}.components-generate--control-buttons__units{display:flex}.components-generate--control-buttons__units button.components-button{text-transform:uppercase;padding:10px;height:auto;line-height:normal;font-weight:500}
.generate-color-manager-wrapper{display:flex;flex-wrap:wrap}.generate-color-manager-wrapper .generate-color-manager--item{position:relative;margin-right:5px;margin-bottom:5px}.generate-color-manager-wrapper .generate-color-manager--item:last-child{margin-right:0}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color{position:absolute;top:-10px;right:-10px;height:auto;min-width:0;padding:2px;background:rgba(0,0,0,.7);color:#fff;border-radius:100%;opacity:0;pointer-events:none;transition:opacity 500ms ease}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color svg{width:15px;height:15px;margin-right:0 !important}.generate-color-manager-wrapper .generate-color-manager--item:hover .components-button.generate-color-manager--delete-color{opacity:1;pointer-events:auto}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color:focus{opacity:1;pointer-events:auto}.generate-color-manager-wrapper .generate-color-manager--item .components-circular-option-picker__option-wrapper{margin:0}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--add-color{padding:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:100%;background:#fff;border:1px solid #777}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--add-color svg{width:20px} .generate-color-manager-dnd-list{display:flex;flex-wrap:wrap;border:1px dashed #959595;padding:10px 5px 5px}.generate-color-manager-dnd-list .generate-color-manager-dnd-list-item{display:inline-block;height:28px;width:28px;vertical-align:top;cursor:grab;border-radius:50%;margin:0 5px 5px 0;position:relative}.generate-color-manager-dnd-list .generate-color-manager-dnd-list-item:before{content:"";position:absolute;top:1px;left:1px;bottom:1px;right:1px;border-radius:50%;z-index:-1;background:url('data:image/svg+xml,%3Csvg width="28" height="28" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M6 8V6H4v2h2zM8 8V6h2v2H8zM10 16H8v-2h2v2zM12 16v-2h2v2h-2zM12 18v-2h-2v2H8v2h2v-2h2zM14 18v2h-2v-2h2zM16 18h-2v-2h2v2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z" fill="%23555D65"/%3E%3Cpath d="M18 18v2h-2v-2h2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z" fill="%23555D65"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z" fill="%23555D65"/%3E%3C/svg%3E')}.generate-color-manager-dnd-list .generate-color-manager-dnd-list-item span{width:28px;height:28px;display:block;border-radius:50%;position:relative}.generate-color-manager-dnd-list .generate-color-manager-dnd-list-item span:after{content:"";position:absolute;top:-1px;left:-1px;bottom:-1px;right:-1px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);border:1px solid transparent}.generate-color-manager-wrapper{display:flex;flex-wrap:wrap}.generate-color-manager-wrapper .generate-color-manager--item{position:relative;margin-right:5px;margin-bottom:5px}.generate-color-manager-wrapper .generate-color-manager--item:last-child{margin-right:0}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color{position:absolute;top:-10px;right:-10px;height:auto;min-width:0;padding:2px;background:rgba(0,0,0,.7);color:#fff;border-radius:100%;opacity:0;pointer-events:none;transition:opacity 500ms ease}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color svg{width:15px;height:15px;margin-right:0 !important}.generate-color-manager-wrapper .generate-color-manager--item:hover .components-button.generate-color-manager--delete-color{opacity:1;pointer-events:auto}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--delete-color:focus{opacity:1;pointer-events:auto}.generate-color-manager-wrapper .generate-color-manager--item .components-circular-option-picker__option-wrapper{margin:0}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--add-color{padding:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:100%;background:#fff;border:1px solid #777}.generate-color-manager-wrapper .generate-color-manager--item .components-button.generate-color-manager--add-color svg{width:20px}
.generate-customize-control-title{display:flex;justify-content:space-between}.generate-customize-control-title button.generate-customize-control-title--label{font-size:14px;font-weight:500;padding:0;height:auto}.generate-customize-control-title button.generate-customize-control-title--toggle{background:#fff;border-radius:100%;border:1px solid #777;padding:0;width:28px;height:28px;display:flex;justify-content:center;align-items:center}.generate-customize-control-title button.generate-customize-control-title--toggle svg{width:1em;height:1em;fill:none}.generate-customize-control-title h3{font-size:14px !important;font-weight:500;margin-bottom:0} .generate-customize-control-title{display:flex;justify-content:space-between}.generate-customize-control-title button.generate-customize-control-title--label{font-size:14px;font-weight:500;padding:0;height:auto}.generate-customize-control-title button.generate-customize-control-title--toggle{background:#fff;border-radius:100%;border:1px solid #777;padding:0;width:28px;height:28px;display:flex;justify-content:center;align-items:center}.generate-customize-control-title button.generate-customize-control-title--toggle svg{width:1em;height:1em;fill:none}.generate-customize-control-title h3{font-size:14px !important;font-weight:500;margin-bottom:0}

View File

@ -1,4 +1,4 @@
.generate-dashboard-page .wrap{margin-right:0}.generate-dashboard-page #wpcontent{padding-left:0}.generate-dashboard-page .update-nag{margin-bottom:20px;margin-left:22px}.generate-dashboard-page.edit-php #wpbody-content .wrap{padding:0 20px;margin:0}.generatepress-dashboard-header{background:#fff;border-bottom:1px solid #e2e4e7;padding:0 20px;text-align:center;display:flex;justify-content:space-between;align-items:center}.generatepress-dashboard-header h1{font-size:17px;font-weight:600;padding-bottom:0;display:flex;align-items:center}.generatepress-dashboard-header h1 svg{width:1em;height:1em;padding-right:10px;fill:#006eb7}.generatepress-dashboard-header__navigation{background:#fff;display:flex}.generatepress-dashboard-header__navigation a{padding:1rem;display:flex;align-items:center;color:inherit;text-decoration:none}.generatepress-dashboard-header__navigation a.active{font-weight:600;box-shadow:inset 0 -3px #007cba}.generatepress-dashboard{max-width:1000px;margin:40px auto;font-size:15px}.generatepress-dashboard h2{font-size:25px;margin:0;line-height:1.2em}.generatepress-dashboard__placeholder.components-placeholder{outline:none;background:none;margin-bottom:50px;box-shadow:none;padding:0}.generatepress-dashboard__section-title{display:flex;align-items:center;margin-bottom:15px}.generatepress-dashboard__section-title>h2:first-child:not(:last-child){margin-right:10px}.generatepress-dashboard__section-description{margin-top:-10px;margin-bottom:20px}.generatepress-dashboard__section-description p{font-size:15px;margin:0}.generatepress-dashboard__section{color:#555;margin-bottom:50px}.generatepress-dashboard__section-item{padding:20px;background:#fff;display:flex;justify-content:space-between;align-items:center}.generatepress-dashboard__section-item:not(:last-child){border-bottom:1px solid #ddd}.generatepress-dashboard__section-item-title{font-weight:600}.generatepress-dashboard__section-item-action{padding-left:20px;display:flex;align-items:center}.generatepress-dashboard__section-item-action>*:not(:last-child){margin-right:10px}.generatepress-dashboard__section-item-action .is-primary .components-spinner{margin-top:0;background:#000}.generatepress-dashboard__section-item-description{font-size:13px;color:#80879a;margin-top:3px}.generatepress-dashboard__section-item-message{display:none;font-size:12px;color:#555;background:#fafafa;padding:5px 10px;border-radius:3px;box-shadow:1px 1px 1px rgba(0,0,0,.05)}.generatepress-dashboard__section-item-message__show{display:inline;color:green}.generatepress-dashboard__section-item-message__error{color:red}.generatepress-dashboard__reset-button.is-primary{background-color:#e02a2a}.generatepress-dashboard__reset-button.is-primary:hover:not(:disabled){background-color:darkred}@media(max-width: 768px){.generatepress-dashboard-header{flex-direction:column}.generatepress-dashboard{padding-left:20px;padding-right:20px}} .generate-dashboard-page .wrap{margin-right:0}.generate-dashboard-page #wpcontent{padding-left:0}.generate-dashboard-page .update-nag{margin-bottom:20px;margin-left:22px}.generate-dashboard-page.edit-php #wpbody-content .wrap{padding:0 20px;margin:0}.generatepress-dashboard-header{background:#fff;border-bottom:1px solid #e2e4e7;padding:0 20px;text-align:center;display:flex;justify-content:space-between;align-items:center}.generatepress-dashboard-header h1{font-size:17px;font-weight:600;padding-bottom:0;display:flex;align-items:center}.generatepress-dashboard-header h1 svg{width:1em;height:1em;padding-right:10px;fill:#006eb7}.generatepress-dashboard-header__navigation{background:#fff;display:flex}.generatepress-dashboard-header__navigation a{padding:1rem;display:flex;align-items:center;color:inherit;text-decoration:none}.generatepress-dashboard-header__navigation a.active{font-weight:600;box-shadow:inset 0 -3px #007cba}.generatepress-dashboard{max-width:1000px;margin:40px auto;font-size:15px}.generatepress-dashboard h2{font-size:25px;margin:0;line-height:1.2em}.generatepress-dashboard__placeholder.components-placeholder{outline:none;background:none;margin-bottom:50px;box-shadow:none;padding:0}.generatepress-dashboard__section-title{display:flex;align-items:center;margin-bottom:15px}.generatepress-dashboard__section-title>h2:first-child:not(:last-child){margin-right:10px}.generatepress-dashboard__section-description{margin-top:-10px;margin-bottom:20px}.generatepress-dashboard__section-description p{font-size:15px;margin:0}.generatepress-dashboard__section{color:#555;margin-bottom:50px}.generatepress-dashboard__section-item{padding:20px;background:#fff;display:flex;justify-content:space-between;align-items:center}.generatepress-dashboard__section-item:not(:last-child){border-bottom:1px solid #ddd}.generatepress-dashboard__section-item-title{font-weight:600}.generatepress-dashboard__section-item-action{padding-left:20px;display:flex;align-items:center}.generatepress-dashboard__section-item-action>*:not(:last-child){margin-right:10px}.generatepress-dashboard__section-item-action .is-primary .components-spinner{margin-top:0;background:rgba(0,0,0,.1);border-radius:100%}.generatepress-dashboard__section-item-description{font-size:13px;color:#80879a;margin-top:3px}.generatepress-dashboard__section-item-message{display:none;font-size:12px;color:#555;background:#fafafa;padding:5px 10px;border-radius:3px;box-shadow:1px 1px 1px rgba(0,0,0,.05)}.generatepress-dashboard__section-item-message__show{display:inline;color:green}.generatepress-dashboard__section-item-message__error{color:red}.generatepress-dashboard__reset-button.is-primary{background-color:#e02a2a}.generatepress-dashboard__reset-button.is-primary:hover:not(:disabled){background-color:darkred}@media(max-width: 768px){.generatepress-dashboard-header{flex-direction:column}.generatepress-dashboard{padding-left:20px;padding-right:20px}}
.generatepress-start-customizing{display:flex;flex-wrap:wrap;margin-left:-30px;color:#555}.generatepress-start-customizing__item{padding:30px;background:#fff;margin-left:30px;margin-bottom:30px;width:calc(50% - 30px);box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,.1)}.generatepress-start-customizing__icon{color:#fff;background:#1e72bd;height:50px;width:50px;display:flex;align-items:center;justify-content:center;border-radius:100%;margin-bottom:25px}.generatepress-start-customizing__title{font-weight:500;margin-bottom:1em}.generatepress-start-customizing__description{margin-bottom:1em;font-weight:300;line-height:1.5em}.generatepress-start-customizing__action{margin-top:auto}.generatepress-start-customizing__pro{font-size:11px;background:#f0544f;padding:0 5px;display:inline-block;margin-left:5px;color:#fff;border-radius:2px} .generatepress-start-customizing{display:flex;flex-wrap:wrap;margin-left:-30px;color:#555}.generatepress-start-customizing__item{padding:30px;background:#fff;margin-left:30px;margin-bottom:30px;width:calc(50% - 30px);box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,.1)}.generatepress-start-customizing__icon{color:#fff;background:#1e72bd;height:50px;width:50px;display:flex;align-items:center;justify-content:center;border-radius:100%;margin-bottom:25px}.generatepress-start-customizing__title{font-weight:500;margin-bottom:1em}.generatepress-start-customizing__description{margin-bottom:1em;font-weight:300;line-height:1.5em}.generatepress-start-customizing__action{margin-top:auto}.generatepress-start-customizing__pro{font-size:11px;background:#f0544f;padding:0 5px;display:inline-block;margin-left:5px;color:#fff;border-radius:2px}
.generatepress-dashboard__premium{display:flex;flex-wrap:wrap;margin-left:-30px;color:#555}.generatepress-dashboard__premium-item{padding:30px;background:#fff;margin-left:30px;margin-bottom:30px;width:calc(50% - 30px);box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,.1);flex-grow:1}.generatepress-dashboard__premium-item-icon{color:#fff;background:#1e72bd;height:50px;width:50px;display:flex;align-items:center;justify-content:center;border-radius:100%;margin-bottom:25px}.generatepress-dashboard__premium-item-icon svg{width:25px;height:25px}.generatepress-dashboard__premium-item-title{font-weight:500;margin-bottom:10px;display:flex;align-items:center;font-size:17px}.generatepress-dashboard__premium-item-description{margin-bottom:1em;font-weight:300;line-height:1.5em}.generatepress-dashboard__premium-item-action{margin-top:auto}.generatepress-dashboard__premium-item-pro{font-size:11px;background:#f0544f;padding:0 5px;display:inline-block;margin-left:5px;color:#fff;border-radius:2px} .generatepress-dashboard__premium{display:flex;flex-wrap:wrap;margin-left:-30px;color:#555}.generatepress-dashboard__premium-item{padding:30px;background:#fff;margin-left:30px;margin-bottom:30px;width:calc(50% - 30px);box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,.1);flex-grow:1}.generatepress-dashboard__premium-item-icon{color:#fff;background:#1e72bd;height:50px;width:50px;display:flex;align-items:center;justify-content:center;border-radius:100%;margin-bottom:25px}.generatepress-dashboard__premium-item-icon svg{width:25px;height:25px}.generatepress-dashboard__premium-item-title{font-weight:500;margin-bottom:10px;display:flex;align-items:center;font-size:17px}.generatepress-dashboard__premium-item-description{margin-bottom:1em;font-weight:300;line-height:1.5em}.generatepress-dashboard__premium-item-action{margin-top:auto}.generatepress-dashboard__premium-item-pro{font-size:11px;background:#f0544f;padding:0 5px;display:inline-block;margin-left:5px;color:#fff;border-radius:2px}
.generatepress-dashboard__section-item-modules{margin-top:20px} .generatepress-dashboard__section-item-modules{margin-top:20px}

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File

@ -1,20 +1,20 @@
<?xml version="1.0" standalone="no"?> <?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" > <!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"> <svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata> <metadata>Generated by IcoMoon</metadata>
<defs> <defs>
<font id="GeneratePress" horiz-adv-x="1024"> <font id="GeneratePress" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="896" descent="-128" /> <font-face units-per-em="1024" ascent="896" descent="-128" />
<missing-glyph horiz-adv-x="1024" /> <missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" /> <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xf002;" 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="&#xf002;" 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="&#xf00d;" 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="&#xf00d;" 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="&#xf02c;" 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="&#xf02c;" 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="&#xf07b;" 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="&#xf07b;" 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="&#xf086;" 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="&#xf086;" 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="&#xf0c9;" 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="&#xf0c9;" 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="&#xf104;" 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="&#xf104;" 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="&#xf105;" 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="&#xf105;" 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="&#xf106;" 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="&#xf106;" 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="&#xf107;" 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" /> <glyph unicode="&#xf107;" 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> </font></defs></svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,103 +0,0 @@
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' );
}
} );
} );
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>' );
}
// This is a fallback in case the core editor check for the dark theme fails.
// If the background is using a gradient or rgba, the WP method can be wrong.
// So instead, we check for text color, as it's a better indicator of the true background color.
if ( generate_block_editor.show_editor_styles ) {
var text_color = tinycolor( generate_block_editor.text_color ).toHex8(),
isTextDark = tinycolor( text_color ).isDark();
if ( ! isTextDark ) {
document.body.classList.add( 'is-dark-theme' );
} else {
document.body.classList.remove( 'is-dark-theme' );
}
}
} );

File diff suppressed because it is too large Load Diff

View File

@ -10,13 +10,11 @@
var coords = goTopBtn.getAttribute( 'data-start-scroll' ); var coords = goTopBtn.getAttribute( 'data-start-scroll' );
if ( scrolled > coords ) { if ( scrolled > coords ) {
goTopBtn.style.opacity = '1'; goTopBtn.classList.add( 'generate-back-to-top__show' );
goTopBtn.style.visibility = 'visible';
} }
if ( scrolled < coords ) { if ( scrolled < coords ) {
goTopBtn.style.opacity = '0'; goTopBtn.classList.remove( 'generate-back-to-top__show' );
goTopBtn.style.visibility = 'hidden';
} }
}; };

View File

@ -1 +1 @@
!function(){"use strict";var s;"querySelector"in document&&"addEventListener"in window&&(s=document.querySelector(".generate-back-to-top"),s&&(window.addEventListener("scroll",function(){var e=window.pageYOffset,t=s.getAttribute("data-start-scroll");t<e&&(s.style.opacity="1",s.style.visibility="visible"),e<t&&(s.style.opacity="0",s.style.visibility="hidden")}),s.addEventListener("click",function(e){var t,n,o,i,r;e.preventDefault(),generatepressBackToTop.smooth?(document.body,t=s.getAttribute("data-scroll-speed")||400,e=window.pageYOffset,n=document.body.offsetTop,o=(n-e)/(t/16),i=function(){window.pageYOffset<=(n||0)&&(clearInterval(r),document.activeElement.blur())},r=setInterval(function(){window.scrollBy(0,o),i()},16)):window.scrollTo(0,0)},!1)))}(); !function(){"use strict";var c;"querySelector"in document&&"addEventListener"in window&&(c=document.querySelector(".generate-back-to-top"),c&&(window.addEventListener("scroll",function(){var e=window.pageYOffset,t=c.getAttribute("data-start-scroll");t<e&&c.classList.add("generate-back-to-top__show"),e<t&&c.classList.remove("generate-back-to-top__show")}),c.addEventListener("click",function(e){var t,o,n,a,r;e.preventDefault(),generatepressBackToTop.smooth?(document.body,t=c.getAttribute("data-scroll-speed")||400,e=window.pageYOffset,o=document.body.offsetTop,n=(o-e)/(t/16),a=function(){window.pageYOffset<=(o||0)&&(clearInterval(r),document.activeElement.blur())},r=setInterval(function(){window.scrollBy(0,n),a()},16)):window.scrollTo(0,0)},!1)))}();

View File

@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
} }
// Set our theme version. // Set our theme version.
define( 'GENERATE_VERSION', '3.1.3' ); define( 'GENERATE_VERSION', '3.2.0' );
if ( ! function_exists( 'generate_setup' ) ) { if ( ! function_exists( 'generate_setup' ) ) {
add_action( 'after_setup_theme', 'generate_setup' ); add_action( 'after_setup_theme', 'generate_setup' );

View File

@ -13,7 +13,6 @@ if ( ! defined( 'ABSPATH' ) ) {
<html <?php language_attributes(); ?>> <html <?php language_attributes(); ?>>
<head> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>"> <meta charset="<?php bloginfo( 'charset' ); ?>">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?> <?php wp_head(); ?>
</head> </head>

View File

@ -115,6 +115,12 @@ function generate_add_inline_block_editor_styles( $editor_settings ) {
$editor_settings['styles'][] = array( 'css' => $google_fonts_import ); $editor_settings['styles'][] = array( 'css' => $google_fonts_import );
} }
} }
$editor_settings['styles'][] = array( 'css' => wp_strip_all_tags( generate_do_inline_block_editor_css() ) );
if ( generate_is_using_dynamic_typography() ) {
$editor_settings['styles'][] = array( 'css' => wp_strip_all_tags( GeneratePress_Typography::get_css( 'core' ) ) );
}
} }
return $editor_settings; return $editor_settings;
@ -128,24 +134,10 @@ add_action( 'enqueue_block_editor_assets', 'generate_enqueue_backend_block_edito
* @since 2.2 * @since 2.2
*/ */
function generate_enqueue_backend_block_editor_assets() { function generate_enqueue_backend_block_editor_assets() {
wp_enqueue_script( 'generate-block-editor-tinycolor', get_template_directory_uri() . '/assets/js/admin/tinycolor.js', false, GENERATE_VERSION, true );
wp_enqueue_script( 'generate-block-editor-scripts', get_template_directory_uri() . '/assets/js/admin/block-editor.js', array( 'jquery', 'generate-block-editor-tinycolor' ), GENERATE_VERSION, true );
$show_editor_styles = apply_filters( 'generate_show_block_editor_styles', true );
if ( $show_editor_styles ) {
// Using wp-edit-blocks for now until we do this: https://github.com/tomusborne/generatepress/pull/343.
wp_add_inline_style( 'wp-edit-blocks', wp_strip_all_tags( generate_do_inline_block_editor_css() ) );
if ( generate_is_using_dynamic_typography() ) {
wp_add_inline_style( 'wp-edit-blocks', wp_strip_all_tags( GeneratePress_Typography::get_css( 'core', 'editor' ) ) );
}
}
wp_enqueue_script( wp_enqueue_script(
'generate-block-editor', 'generate-block-editor',
trailingslashit( get_template_directory_uri() ) . 'assets/dist/block-editor.js', trailingslashit( get_template_directory_uri() ) . 'assets/dist/block-editor.js',
array( 'wp-i18n', 'wp-components', 'wp-element' ), array( 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-plugins', 'wp-polyfill' ),
GENERATE_VERSION, GENERATE_VERSION,
true true
); );
@ -167,56 +159,36 @@ function generate_enqueue_backend_block_editor_assets() {
} }
wp_localize_script( wp_localize_script(
'generate-block-editor-scripts', 'generate-block-editor',
'generate_block_editor', 'generatepressBlockEditor',
array( array(
'global_sidebar_layout' => generate_get_block_editor_sidebar_layout( false ), 'globalSidebarLayout' => generate_get_block_editor_sidebar_layout( false ),
'container_width' => generate_get_option( 'container_width' ), 'containerWidth' => generate_get_option( 'container_width' ),
'right_sidebar_width' => apply_filters( 'generate_right_sidebar_width', '25' ), 'contentPaddingRight' => absint( $spacing_settings['content_right'] ) . 'px',
'left_sidebar_width' => apply_filters( 'generate_left_sidebar_width', '25' ), 'contentPaddingLeft' => absint( $spacing_settings['content_left'] ) . 'px',
'content_padding_right' => absint( $spacing_settings['content_right'] ) . 'px', 'rightSidebarWidth' => apply_filters( 'generate_right_sidebar_width', '25' ),
'content_padding_left' => absint( $spacing_settings['content_left'] ) . 'px', 'leftSidebarWidth' => apply_filters( 'generate_left_sidebar_width', '25' ),
'content_title' => generate_get_block_editor_show_content_title() ? 'true' : 'false',
'disable_content_title' => esc_html__( 'Disable Content Title', 'generatepress' ),
'show_content_title' => esc_html__( 'Show Content Title', 'generatepress' ),
'text_color' => $text_color, 'text_color' => $text_color,
'show_editor_styles' => $show_editor_styles, 'show_editor_styles' => apply_filters( 'generate_show_block_editor_styles', true ),
'contentAreaType' => apply_filters( 'generate_block_editor_content_area_type', '' ),
'customContentWidth' => apply_filters( 'generate_block_editor_container_width', '' ),
) )
); );
wp_register_style( 'generate-block-editor', false, array(), true, true );
wp_add_inline_style( 'generate-block-editor', generate_do_inline_block_editor_css( 'block-editor' ) );
wp_enqueue_style( 'generate-block-editor' );
} }
/** /**
* Write our CSS for the block editor. * Write our CSS for the block editor.
* *
* @since 2.2 * @since 2.2
* @param string $for Define whether this CSS for the block content or the block editor.
*/ */
function generate_do_inline_block_editor_css() { function generate_do_inline_block_editor_css( $for = 'block-content' ) {
$color_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_color_defaults()
);
$font_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_default_fonts()
);
$css = new GeneratePress_CSS(); $css = new GeneratePress_CSS();
$content_width = generate_get_block_editor_content_width();
$spacing_settings = wp_parse_args(
get_option( 'generate_spacing_settings', array() ),
generate_spacing_get_defaults()
);
$content_width_calc = sprintf(
'calc(%1$s - %2$s - %3$s)',
absint( $content_width ) . 'px',
absint( $spacing_settings['content_left'] ) . 'px',
absint( $spacing_settings['content_right'] ) . 'px'
);
$css->set_selector( ':root' ); $css->set_selector( ':root' );
$global_colors = generate_get_global_colors(); $global_colors = generate_get_global_colors();
@ -231,23 +203,55 @@ function generate_do_inline_block_editor_css() {
foreach ( (array) $global_colors as $key => $data ) { foreach ( (array) $global_colors as $key => $data ) {
if ( ! empty( $data['slug'] ) && ! empty( $data['color'] ) ) { if ( ! empty( $data['slug'] ) && ! empty( $data['color'] ) ) {
$css->set_selector( '.has-' . $data['slug'] . '-color' ); $css->set_selector( '.has-' . $data['slug'] . '-color' );
$css->add_property( 'color', $data['color'] ); $css->add_property( 'color', 'var(--' . $data['slug'] . ')' );
$css->set_selector( '.has-' . $data['slug'] . '-background-color' ); $css->set_selector( '.has-' . $data['slug'] . '-background-color' );
$css->add_property( 'background-color', $data['color'] ); $css->add_property( 'background-color', 'var(--' . $data['slug'] . ')' );
} }
} }
} }
$css->set_selector( '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' ); // If this CSS is for the editor only (not the block content), we can return here.
if ( 'block-editor' === $for ) {
if ( 'true' === get_post_meta( get_the_ID(), '_generate-full-width-content', true ) ) { return $css->css_output();
$css->add_property( 'max-width', '100%' );
} else {
$css->add_property( 'max-width', $content_width_calc );
} }
$css->set_selector( '.editor-styles-wrapper .wp-block[data-align="full"]' ); $color_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_color_defaults()
);
$font_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_default_fonts()
);
$content_width = generate_get_block_editor_content_width();
$spacing_settings = wp_parse_args(
get_option( 'generate_spacing_settings', array() ),
generate_spacing_get_defaults()
);
$content_width_calc = sprintf(
'calc(%1$s - %2$s - %3$s)',
absint( $content_width ) . 'px',
absint( $spacing_settings['content_left'] ) . 'px',
absint( $spacing_settings['content_right'] ) . 'px'
);
$css->set_selector( 'body' );
$css->add_property(
'--content-width',
'true' === get_post_meta( get_the_ID(), '_generate-full-width-content', true )
? '100%'
: $content_width_calc
);
$css->set_selector( 'body .wp-block' );
$css->add_property( 'max-width', 'var(--content-width)' );
$css->set_selector( '.wp-block[data-align="full"]' );
$css->add_property( 'max-width', 'none' ); $css->add_property( 'max-width', 'none' );
$css->set_selector( '.wp-block[data-align="wide"]' ); $css->set_selector( '.wp-block[data-align="wide"]' );
@ -262,6 +266,9 @@ function generate_do_inline_block_editor_css() {
} }
if ( 'hover' === $underline_links ) { if ( 'hover' === $underline_links ) {
$css->set_selector( '.wp-block a' );
$css->add_property( 'text-decoration', 'none' );
$css->set_selector( '.wp-block a:hover, .wp-block a:focus' ); $css->set_selector( '.wp-block a:hover, .wp-block a:focus' );
$css->add_property( 'text-decoration', 'underline' ); $css->add_property( 'text-decoration', 'underline' );
} }
@ -276,6 +283,9 @@ function generate_do_inline_block_editor_css() {
$css->set_selector( 'a.button, .wp-block-button__link' ); $css->set_selector( 'a.button, .wp-block-button__link' );
$css->add_property( 'text-decoration', 'none' ); $css->add_property( 'text-decoration', 'none' );
} else {
$css->set_selector( '.wp-block a' );
$css->add_property( 'text-decoration', 'none' );
} }
if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) {
@ -286,14 +296,14 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ) ); $css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ) );
} }
$css->set_selector( '.editor-styles-wrapper a.button, .editor-styles-wrapper a.button:visited, .wp-block-button__link:not(.has-background)' ); $css->set_selector( 'a.button, a.button:visited, .wp-block-button__link:not(.has-background)' );
$css->add_property( 'color', $color_settings['form_button_text_color'] ); $css->add_property( 'color', $color_settings['form_button_text_color'] );
$css->add_property( 'background-color', $color_settings['form_button_background_color'] ); $css->add_property( 'background-color', $color_settings['form_button_background_color'] );
$css->add_property( 'padding', '10px 20px' ); $css->add_property( 'padding', '10px 20px' );
$css->add_property( 'border', '0' ); $css->add_property( 'border', '0' );
$css->add_property( 'border-radius', '0' ); $css->add_property( 'border-radius', '0' );
$css->set_selector( '.editor-styles-wrapper a.button:hover, .editor-styles-wrapper a.button:active, .editor-styles-wrapper a.button:focus, .wp-block-button__link:not(.has-background):active, .wp-block-button__link:not(.has-background):focus, .wp-block-button__link:not(.has-background):hover' ); $css->set_selector( 'a.button:hover, a.button:active, a.button:focus, .wp-block-button__link:not(.has-background):active, .wp-block-button__link:not(.has-background):focus, .wp-block-button__link:not(.has-background):hover' );
$css->add_property( 'color', $color_settings['form_button_text_color_hover'] ); $css->add_property( 'color', $color_settings['form_button_text_color_hover'] );
$css->add_property( 'background-color', $color_settings['form_button_background_color_hover'] ); $css->add_property( 'background-color', $color_settings['form_button_background_color_hover'] );
@ -308,7 +318,7 @@ function generate_do_inline_block_editor_css() {
$buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() );
} }
$css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, html .editor-styles-wrapper' ); $css->set_selector( 'body' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $body_family ); $css->add_property( 'font-family', $body_family );
@ -330,15 +340,15 @@ function generate_do_inline_block_editor_css() {
} }
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->set_selector( 'html .editor-styles-wrapper, html .editor-styles-wrapper p, html .editor-styles-wrapper .mce-content-body' ); $css->set_selector( 'body, p' );
$css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) ); $css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) );
$css->set_selector( 'html .editor-styles-wrapper p' ); $css->set_selector( 'p' );
$css->add_property( 'margin-top', '0px' ); $css->add_property( 'margin-top', '0px' );
$css->add_property( 'margin-bottom', $font_settings['paragraph_margin'], false, 'em' ); $css->add_property( 'margin-bottom', $font_settings['paragraph_margin'], false, 'em' );
} }
$css->set_selector( 'html .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-styles-wrapper .editor-post-title__input' ); $css->set_selector( 'h1' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family ); $css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family );
@ -363,7 +373,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', $color_settings['content_title_color'] ); $css->add_property( 'color', $color_settings['content_title_color'] );
} }
$css->set_selector( 'html .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' ); $css->set_selector( 'h2' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $h2_family ); $css->add_property( 'font-family', $h2_family );
@ -383,7 +393,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'text_color' ) ); $css->add_property( 'color', generate_get_option( 'text_color' ) );
} }
$css->set_selector( 'html .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' ); $css->set_selector( 'h3' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $h3_family ); $css->add_property( 'font-family', $h3_family );
@ -403,7 +413,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'text_color' ) ); $css->add_property( 'color', generate_get_option( 'text_color' ) );
} }
$css->set_selector( 'html .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' ); $css->set_selector( 'h4' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $h4_family ); $css->add_property( 'font-family', $h4_family );
@ -431,7 +441,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'text_color' ) ); $css->add_property( 'color', generate_get_option( 'text_color' ) );
} }
$css->set_selector( 'html .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' ); $css->set_selector( 'h5' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $h5_family ); $css->add_property( 'font-family', $h5_family );
@ -459,7 +469,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'text_color' ) ); $css->add_property( 'color', generate_get_option( 'text_color' ) );
} }
$css->set_selector( 'html .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' ); $css->set_selector( 'h6' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $h6_family ); $css->add_property( 'font-family', $h6_family );
@ -487,7 +497,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'text_color' ) ); $css->add_property( 'color', generate_get_option( 'text_color' ) );
} }
$css->set_selector( '.editor-styles-wrapper a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link' ); $css->set_selector( 'a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link' );
if ( ! generate_is_using_dynamic_typography() ) { if ( ! generate_is_using_dynamic_typography() ) {
$css->add_property( 'font-family', $buttons_family ); $css->add_property( 'font-family', $buttons_family );
@ -505,7 +515,7 @@ function generate_do_inline_block_editor_css() {
$css->set_selector( '.block-editor__container .edit-post-visual-editor' ); $css->set_selector( '.block-editor__container .edit-post-visual-editor' );
$css->add_property( 'background-color', generate_get_option( 'background_color' ) ); $css->add_property( 'background-color', generate_get_option( 'background_color' ) );
$css->set_selector( '.block-editor__container .editor-styles-wrapper' ); $css->set_selector( 'body' );
if ( $color_settings['content_background_color'] ) { if ( $color_settings['content_background_color'] ) {
$css->add_property( 'background-color', $color_settings['content_background_color'] ); $css->add_property( 'background-color', $color_settings['content_background_color'] );
@ -513,7 +523,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'background-color', generate_get_option( 'background_color' ) ); $css->add_property( 'background-color', generate_get_option( 'background_color' ) );
} }
} else { } else {
$css->set_selector( 'body .editor-styles-wrapper' ); $css->set_selector( 'body' );
$css->add_property( 'background-color', generate_get_option( 'background_color' ) ); $css->add_property( 'background-color', generate_get_option( 'background_color' ) );
if ( $color_settings['content_background_color'] ) { if ( $color_settings['content_background_color'] ) {
@ -524,7 +534,7 @@ function generate_do_inline_block_editor_css() {
} }
} }
$css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' ); $css->set_selector( 'a, a:visited' );
if ( $color_settings['content_link_color'] ) { if ( $color_settings['content_link_color'] ) {
$css->add_property( 'color', $color_settings['content_link_color'] ); $css->add_property( 'color', $color_settings['content_link_color'] );
@ -532,7 +542,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', generate_get_option( 'link_color' ) ); $css->add_property( 'color', generate_get_option( 'link_color' ) );
} }
$css->set_selector( '.block-editor-block-list__block a:hover, .block-editor-block-list__block a:focus, .block-editor-block-list__block a:active' ); $css->set_selector( 'a:hover, a:focus, a:active' );
if ( $color_settings['content_link_hover_color'] ) { if ( $color_settings['content_link_hover_color'] ) {
$css->add_property( 'color', $color_settings['content_link_hover_color'] ); $css->add_property( 'color', $color_settings['content_link_hover_color'] );

View File

@ -217,10 +217,10 @@ class GeneratePress_Dashboard {
array( array(
'hasPremium' => defined( 'GP_PREMIUM_VERSION' ), 'hasPremium' => defined( 'GP_PREMIUM_VERSION' ),
'customizeSectionUrls' => array( 'customizeSectionUrls' => array(
'siteIdentitySection' => admin_url( 'customize.php?autofocus[section]=title_tagline' ), 'siteIdentitySection' => add_query_arg( rawurlencode( 'autofocus[section]' ), 'title_tagline', wp_customize_url() ),
'colorsSection' => admin_url( 'customize.php?autofocus[section]=generate_colors_section' ), 'colorsSection' => add_query_arg( rawurlencode( 'autofocus[section]' ), 'generate_colors_section', wp_customize_url() ),
'typographySection' => admin_url( 'customize.php?autofocus[section]=generate_typography_section' ), 'typographySection' => add_query_arg( rawurlencode( 'autofocus[section]' ), 'generate_typography_section', wp_customize_url() ),
'layoutSection' => admin_url( 'customize.php?autofocus[panel]=generate_layout_panel' ), 'layoutSection' => add_query_arg( rawurlencode( 'autofocus[panel]' ), 'generate_layout_panel', wp_customize_url() ),
), ),
) )
); );

View File

@ -116,6 +116,9 @@ class GeneratePress_HTML_Attributes {
case 'footer-entry-meta': case 'footer-entry-meta':
return $this->footer_entry_meta( $attributes ); return $this->footer_entry_meta( $attributes );
case 'woocommerce-content':
return $this->woocommerce_content( $attributes );
} }
return $attributes; return $attributes;
@ -311,7 +314,7 @@ class GeneratePress_HTML_Attributes {
public function post_navigation( $attributes ) { public function post_navigation( $attributes ) {
if ( is_single() ) { if ( is_single() ) {
$attributes['class'] .= ' post-navigation'; $attributes['class'] .= ' post-navigation';
$attributes['aria-label'] = esc_attr__( 'Single Post', 'generatepress' ); $attributes['aria-label'] = esc_attr__( 'Posts', 'generatepress' );
} else { } else {
$attributes['class'] .= ' paging-navigation'; $attributes['class'] .= ' paging-navigation';
$attributes['aria-label'] = esc_attr__( 'Archive Page', 'generatepress' ); $attributes['aria-label'] = esc_attr__( 'Archive Page', 'generatepress' );
@ -460,6 +463,34 @@ class GeneratePress_HTML_Attributes {
return $attributes; return $attributes;
} }
/**
* Add attributes to our WooCommerce content container.
*
* @since 3.2.0
* @param array $attributes The existing attributes.
*/
public function woocommerce_content( $attributes ) {
if ( is_singular() ) {
$attributes['id'] = 'post-' . get_the_ID();
$attributes['class'] = esc_attr( implode( ' ', get_post_class( '', get_the_ID() ) ) );
if ( 'microdata' === generate_get_schema_type() ) {
$type = apply_filters( 'generate_article_itemtype', 'CreativeWork' );
$attributes['itemtype'] = sprintf(
'itemtype="https://schema.org/%s"',
$type
);
$attributes['itemscope'] = true;
}
} else {
$attributes['class'] = 'woocommerce-archive-wrapper';
}
return $attributes;
}
} }
GeneratePress_HTML_Attributes::get_instance(); GeneratePress_HTML_Attributes::get_instance();

View File

@ -75,6 +75,7 @@ class GeneratePress_Typography {
$variants = apply_filters( 'generate_google_font_variants', $variants, $font['fontFamily'] ); $variants = apply_filters( 'generate_google_font_variants', $variants, $font['fontFamily'] );
$name = str_replace( ' ', '+', $font['fontFamily'] ); $name = str_replace( ' ', '+', $font['fontFamily'] );
$name = str_replace( '"', '', $name );
if ( $variants ) { if ( $variants ) {
$data[] = $name . ':' . implode( ',', $variants ); $data[] = $name . ':' . implode( ',', $variants );
@ -118,9 +119,8 @@ class GeneratePress_Typography {
* Build our typography CSS. * Build our typography CSS.
* *
* @param string $module The name of the module we're generating CSS for. * @param string $module The name of the module we're generating CSS for.
* @param string $type Either frontend or editor.
*/ */
public static function get_css( $module = 'core', $type = 'frontend' ) { public static function get_css( $module = 'core' ) {
$typography = generate_get_option( 'typography' ); $typography = generate_get_option( 'typography' );
// Get data for a specific module so CSS can be compiled separately. // Get data for a specific module so CSS can be compiled separately.
@ -137,18 +137,13 @@ class GeneratePress_Typography {
$body_selector = 'body'; $body_selector = 'body';
$paragraph_selector = 'p'; $paragraph_selector = 'p';
if ( 'editor' === $type ) {
$body_selector = 'html .editor-styles-wrapper';
$paragraph_selector = 'html .editor-styles-wrapper p';
}
foreach ( $typography as $key => $data ) { foreach ( $typography as $key => $data ) {
$options = wp_parse_args( $options = wp_parse_args(
$data, $data,
self::get_defaults() self::get_defaults()
); );
$selector = self::get_css_selector( $options['selector'], $type ); $selector = self::get_css_selector( $options['selector'] );
if ( 'custom' === $selector ) { if ( 'custom' === $selector ) {
$selector = $options['customSelector']; $selector = $options['customSelector'];
@ -160,6 +155,8 @@ class GeneratePress_Typography {
$css->add_property( 'font-family', $font_family ); $css->add_property( 'font-family', $font_family );
$css->add_property( 'font-weight', $options['fontWeight'] ); $css->add_property( 'font-weight', $options['fontWeight'] );
$css->add_property( 'text-transform', $options['textTransform'] ); $css->add_property( 'text-transform', $options['textTransform'] );
$css->add_property( 'font-style', $options['fontStyle'] );
$css->add_property( 'text-decoration', $options['textDecoration'] );
$css->add_property( 'font-size', $options['fontSize'], false, $options['fontSizeUnit'] ); $css->add_property( 'font-size', $options['fontSize'], false, $options['fontSizeUnit'] );
$css->add_property( 'letter-spacing', $options['letterSpacing'], false, $options['letterSpacingUnit'] ); $css->add_property( 'letter-spacing', $options['letterSpacing'], false, $options['letterSpacingUnit'] );
@ -221,98 +218,63 @@ class GeneratePress_Typography {
* Get the CSS selector. * Get the CSS selector.
* *
* @param string $selector The saved selector to look up. * @param string $selector The saved selector to look up.
* @param string $type Whether we're getting the selectors for the frontend or editor.
*/ */
public static function get_css_selector( $selector, $type ) { public static function get_css_selector( $selector ) {
if ( 'frontend' === $type ) { switch ( $selector ) {
switch ( $selector ) { case 'body':
case 'body': $selector = 'body, button, input, select, textarea';
$selector = 'body, button, input, select, textarea'; break;
break;
case 'main-title': case 'main-title':
$selector = '.main-title'; $selector = '.main-title';
break; break;
case 'site-description': case 'site-description':
$selector = '.site-description'; $selector = '.site-description';
break; break;
case 'primary-menu-items': case 'primary-menu-items':
$selector = '.main-navigation a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items'; $selector = '.main-navigation a, .main-navigation .menu-toggle, .main-navigation .menu-bar-items';
break; break;
case 'primary-sub-menu-items': case 'primary-sub-menu-items':
$selector = '.main-navigation .main-nav ul ul li a'; $selector = '.main-navigation .main-nav ul ul li a';
break; break;
case 'primary-menu-toggle': case 'primary-menu-toggle':
$selector = '.main-navigation .menu-toggle'; $selector = '.main-navigation .menu-toggle';
break; break;
case 'buttons': case 'buttons':
$selector = 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.wp-block-button .wp-block-button__link'; $selector = 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.wp-block-button .wp-block-button__link';
break; break;
case 'all-headings': case 'all-headings':
$selector = 'h1, h2, h3, h4, h5, h6'; $selector = 'h1, h2, h3, h4, h5, h6';
break; break;
case 'single-content-title': case 'single-content-title':
$selector = 'h1.entry-title'; $selector = 'h1.entry-title';
break; break;
case 'archive-content-title': case 'archive-content-title':
$selector = 'h2.entry-title'; $selector = 'h2.entry-title';
break; break;
case 'top-bar': case 'top-bar':
$selector = '.top-bar'; $selector = '.top-bar';
break; break;
case 'widget-titles': case 'widget-titles':
$selector = '.widget-title'; $selector = '.widget-title';
break; break;
case 'footer': case 'footer':
$selector = '.site-info'; $selector = '.site-info';
break; break;
}
} }
if ( 'editor' === $type ) { return apply_filters( 'generate_typography_css_selector', $selector );
switch ( $selector ) {
case 'body':
$selector = 'html .editor-styles-wrapper';
break;
case 'buttons':
$selector = '.editor-styles-wrapper a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link';
break;
case 'all-headings':
$selector = 'html .editor-styles-wrapper h1, html .editor-styles-wrapper h2, html .editor-styles-wrapper h3, html .editor-styles-wrapper h4, html .editor-styles-wrapper h5, html .editor-styles-wrapper h6';
break;
case 'h1':
$selector = 'html .editor-styles-wrapper h1, html .editor-styles-wrapper .editor-post-title__input';
break;
case 'single-content-title':
$selector = 'html .editor-styles-wrapper .editor-post-title__input';
break;
case 'h2':
case 'h3':
case 'h4':
case 'h5':
case 'h6':
$selector = 'html .editor-styles-wrapper ' . $selector;
break;
}
}
return apply_filters( 'generate_typography_css_selector', $selector, $type );
} }
/** /**
@ -338,6 +300,11 @@ class GeneratePress_Typography {
} }
if ( ! empty( $font_family_args['googleFont'] ) && ! empty( $font_family_args['googleFontCategory'] ) ) { if ( ! empty( $font_family_args['googleFont'] ) && ! empty( $font_family_args['googleFontCategory'] ) ) {
// Add quotations around font names with standalone numbers.
if ( preg_match( '/(?<!\S)\d+(?!\S)/', $font_family ) ) {
$font_family = '"' . $font_family . '"';
}
$font_family = $font_family . ', ' . $font_family_args['googleFontCategory']; $font_family = $font_family . ', ' . $font_family_args['googleFontCategory'];
} elseif ( 'System Default' === $font_family ) { } elseif ( 'System Default' === $font_family ) {
$font_family = generate_get_system_default_font(); $font_family = generate_get_system_default_font();
@ -355,6 +322,8 @@ class GeneratePress_Typography {
'fontFamily' => '', 'fontFamily' => '',
'fontWeight' => '', 'fontWeight' => '',
'textTransform' => '', 'textTransform' => '',
'textDecoration' => '',
'fontStyle' => '',
'fontSize' => '', 'fontSize' => '',
'fontSizeTablet' => '', 'fontSizeTablet' => '',
'fontSizeMobile' => '', 'fontSizeMobile' => '',

View File

@ -125,6 +125,12 @@ if ( ! function_exists( 'generate_base_css' ) ) {
$css->add_property( 'text-align', 'center' ); $css->add_property( 'text-align', 'center' );
$css->add_property( 'z-index', '10' ); $css->add_property( 'z-index', '10' );
$css->add_property( 'transition', 'opacity 300ms ease-in-out' ); $css->add_property( 'transition', 'opacity 300ms ease-in-out' );
$css->add_property( 'opacity', '0.1' ); // Can't be 0 or we face double-tap issues on iOS.
$css->add_property( 'transform', 'translateY(1000px)' ); // Can't use visibility or we face the same issue as above.
$css->set_selector( '.generate-back-to-top__show' );
$css->add_property( 'opacity', '1' );
$css->add_property( 'transform', 'translateY(0)' );
} }
if ( 'enable' === generate_get_option( 'nav_search' ) ) { if ( 'enable' === generate_get_option( 'nav_search' ) ) {
@ -255,10 +261,10 @@ if ( ! function_exists( 'generate_base_css' ) ) {
foreach ( (array) $global_colors as $key => $data ) { foreach ( (array) $global_colors as $key => $data ) {
if ( ! empty( $data['slug'] ) && ! empty( $data['color'] ) ) { if ( ! empty( $data['slug'] ) && ! empty( $data['color'] ) ) {
$css->set_selector( '.has-' . $data['slug'] . '-color' ); $css->set_selector( '.has-' . $data['slug'] . '-color' );
$css->add_property( 'color', $data['color'] ); $css->add_property( 'color', 'var(--' . $data['slug'] . ')' );
$css->set_selector( '.has-' . $data['slug'] . '-background-color' ); $css->set_selector( '.has-' . $data['slug'] . '-background-color' );
$css->add_property( 'background-color', $data['color'] ); $css->add_property( 'background-color', 'var(--' . $data['slug'] . ')' );
} }
} }
} }
@ -819,7 +825,7 @@ if ( ! function_exists( 'generate_spacing_css' ) ) {
$css->set_selector( '.both-right .inside-right-sidebar,.both-left .inside-right-sidebar' ); $css->set_selector( '.both-right .inside-right-sidebar,.both-left .inside-right-sidebar' );
$css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' );
$css->set_selector( '.one-container.archive .post:not(:last-child), .one-container.blog .post:not(:last-child)' ); $css->set_selector( '.one-container.archive .post:not(:last-child):not(.is-loop-template-item), .one-container.blog .post:not(:last-child):not(.is-loop-template-item)' );
$css->add_property( 'padding-bottom', absint( $settings['content_bottom'] ), absint( $defaults['content_bottom'] ), 'px' ); $css->add_property( 'padding-bottom', absint( $settings['content_bottom'] ), absint( $defaults['content_bottom'] ), 'px' );
} else { } else {
$css->set_selector( '.both-right.separate-containers .inside-left-sidebar' ); $css->set_selector( '.both-right.separate-containers .inside-left-sidebar' );

View File

@ -274,7 +274,7 @@ if ( ! function_exists( 'generate_customize_register' ) ) {
return $new_settings; return $new_settings;
}, },
'transport' => 'refresh', 'transport' => 'postMessage',
), ),
array( array(
'type' => 'generate-color-manager-control', 'type' => 'generate-color-manager-control',
@ -440,6 +440,8 @@ if ( ! function_exists( 'generate_customize_register' ) ) {
'fontFamily' => 'sanitize_text_field', 'fontFamily' => 'sanitize_text_field',
'fontWeight' => 'sanitize_text_field', 'fontWeight' => 'sanitize_text_field',
'textTransform' => 'sanitize_text_field', 'textTransform' => 'sanitize_text_field',
'textDecoration' => 'sanitize_text_field',
'fontStyle' => 'sanitize_text_field',
'fontSize' => 'generate_sanitize_empty_decimal_integer', 'fontSize' => 'generate_sanitize_empty_decimal_integer',
'fontSizeTablet' => 'generate_sanitize_empty_decimal_integer', 'fontSizeTablet' => 'generate_sanitize_empty_decimal_integer',
'fontSizeMobile' => 'generate_sanitize_empty_decimal_integer', 'fontSizeMobile' => 'generate_sanitize_empty_decimal_integer',

File diff suppressed because one or more lines are too long

View File

@ -1,142 +1,142 @@
.customize-control-generatepress-range-slider .generatepress-slider { .customize-control-generatepress-range-slider .generatepress-slider {
position: relative; position: relative;
width: calc(100% - 60px); width: calc(100% - 60px);
height: 6px; height: 6px;
background-color: rgba(0,0,0,.10); background-color: rgba(0,0,0,.10);
cursor: pointer; cursor: pointer;
-webkit-transition: background .5s; -webkit-transition: background .5s;
-moz-transition: background .5s; -moz-transition: background .5s;
transition: background .5s; transition: background .5s;
} }
.customize-control-generatepress-range-slider .has-unit .generatepress-slider { .customize-control-generatepress-range-slider .has-unit .generatepress-slider {
width: calc(100% - 90px); width: calc(100% - 90px);
} }
.customize-control-generatepress-range-slider .gp_range_value.hide-value { .customize-control-generatepress-range-slider .gp_range_value.hide-value {
display: none; display: none;
} }
.customize-control-generatepress-range-slider .gp_range_value.hide-value + .generatepress-slider { .customize-control-generatepress-range-slider .gp_range_value.hide-value + .generatepress-slider {
width: 100%; width: 100%;
} }
.customize-control-generatepress-range-slider .generatepress-slider .ui-slider-handle { .customize-control-generatepress-range-slider .generatepress-slider .ui-slider-handle {
height: 16px; height: 16px;
width: 16px; width: 16px;
background-color: #3498D9; background-color: #3498D9;
display: inline-block; display: inline-block;
position: absolute; position: absolute;
top: 50%; top: 50%;
-webkit-transform: translateY(-50%) translateX(-4px); -webkit-transform: translateY(-50%) translateX(-4px);
transform: translateY(-50%) translateX(-4px); transform: translateY(-50%) translateX(-4px);
border-radius: 50%; border-radius: 50%;
cursor: pointer; cursor: pointer;
} }
.gp-range-title-area { .gp-range-title-area {
display: flex; display: flex;
} }
.gp-range-slider-controls { .gp-range-slider-controls {
margin-left: auto; margin-left: auto;
} }
.customize-control-generatepress-range-slider .wrapper { .customize-control-generatepress-range-slider .wrapper {
display: -webkit-box; display: -webkit-box;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-pack: justify; -webkit-box-pack: justify;
-ms-flex-pack: justify; -ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
-webkit-box-align: center; -webkit-box-align: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
} }
.customize-control-generatepress-range-slider .gp_range_value { .customize-control-generatepress-range-slider .gp_range_value {
font-size: 14px; font-size: 14px;
padding: 0; padding: 0;
font-weight: 400; font-weight: 400;
width: 50px; width: 50px;
display: -webkit-box; display: -webkit-box;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
} }
.customize-control-generatepress-range-slider .has-unit .gp_range_value { .customize-control-generatepress-range-slider .has-unit .gp_range_value {
width: 80px; width: 80px;
} }
.customize-control-generatepress-range-slider .gp_range_value span.value { .customize-control-generatepress-range-slider .gp_range_value span.value {
font-size: 12px; font-size: 12px;
width: calc(100% - 2px); width: calc(100% - 2px);
text-align: center; text-align: center;
min-height: 30px; min-height: 30px;
background: #FFF; background: #FFF;
line-height: 30px; line-height: 30px;
border: 1px solid #DDD; border: 1px solid #DDD;
} }
.customize-control-generatepress-range-slider .has-unit .gp_range_value span.value { .customize-control-generatepress-range-slider .has-unit .gp_range_value span.value {
width: calc(100% - 32px); width: calc(100% - 32px);
display: block; display: block;
} }
.customize-control-generatepress-range-slider .gp_range_value .unit { .customize-control-generatepress-range-slider .gp_range_value .unit {
width: 29px; width: 29px;
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
line-height: 30px; line-height: 30px;
background: #fff; background: #fff;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-left: 1px; margin-left: 1px;
} }
.customize-control-generatepress-range-slider .generatepress-range-slider-reset span { .customize-control-generatepress-range-slider .generatepress-range-slider-reset span {
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
} }
.customize-control-generatepress-range-slider .gp_range_value input { .customize-control-generatepress-range-slider .gp_range_value input {
font-size: 12px; font-size: 12px;
padding: 0px; padding: 0px;
text-align: center; text-align: center;
min-height: 30px; min-height: 30px;
height: auto; height: auto;
border-radius: 0; border-radius: 0;
border-color: #ddd; border-color: #ddd;
} }
.customize-control-generatepress-range-slider .has-unit .gp_range_value input { .customize-control-generatepress-range-slider .has-unit .gp_range_value input {
width: calc(100% - 30px); width: calc(100% - 30px);
} }
.customize-control-generatepress-range-slider .gp-range-title-area .dashicons { .customize-control-generatepress-range-slider .gp-range-title-area .dashicons {
cursor: pointer; cursor: pointer;
font-size: 11px; font-size: 11px;
width: 20px; width: 20px;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
color: #222; color: #222;
text-align: center; text-align: center;
position: relative; position: relative;
top: 2px; top: 2px;
} }
.customize-control-generatepress-range-slider .gp-range-title-area .dashicons:hover { .customize-control-generatepress-range-slider .gp-range-title-area .dashicons:hover {
background: #fafafa; background: #fafafa;
} }
.customize-control-generatepress-range-slider .gp-range-title-area .dashicons.selected { .customize-control-generatepress-range-slider .gp-range-title-area .dashicons.selected {
background: #fff; background: #fff;
color: #222; color: #222;
} }
.customize-control-generatepress-range-slider .gp-device-controls > span:first-child:last-child { .customize-control-generatepress-range-slider .gp-device-controls > span:first-child:last-child {
display: none; display: none;
} }
.customize-control-generatepress-range-slider .sub-description { .customize-control-generatepress-range-slider .sub-description {
margin-top: 10px; margin-top: 10px;
} }

View File

@ -1,47 +1,47 @@
.generatepress-font-family { .generatepress-font-family {
margin-bottom: 12px; margin-bottom: 12px;
} }
.generatepress-weight-transform-wrapper { .generatepress-weight-transform-wrapper {
display: -webkit-box; display: -webkit-box;
display: -ms-flexbox; display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-pack: justify; -webkit-box-pack: justify;
-ms-flex-pack: justify; -ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
} }
.generatepress-font-weight, .generatepress-font-weight,
.generatepress-font-transform { .generatepress-font-transform {
width: calc(50% - 5px); width: calc(50% - 5px);
} }
span.select2-container.select2-container--default.select2-container--open li.select2-results__option { span.select2-container.select2-container--default.select2-container--open li.select2-results__option {
margin:0; margin:0;
} }
span.select2-container.select2-container--default.select2-container--open{ span.select2-container.select2-container--default.select2-container--open{
z-index:999999; z-index:999999;
} }
.select2-selection__rendered li { .select2-selection__rendered li {
margin-bottom: 0; margin-bottom: 0;
} }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--single,
.select2-container--default.select2-container .select2-selection--multiple, .select2-container--default.select2-container .select2-selection--multiple,
.select2-dropdown, .select2-dropdown,
.select2-container--default .select2-selection--multiple .select2-selection__choice { .select2-container--default .select2-selection--multiple .select2-selection__choice {
border-color: #ddd; border-color: #ddd;
border-radius: 0; border-radius: 0;
} }
.select2-container--default .select2-results__option[aria-selected=true] { .select2-container--default .select2-results__option[aria-selected=true] {
color: rgba(0,0,0,0.4); color: rgba(0,0,0,0.4);
} }
#customize-control-font_heading_1_control, #customize-control-font_heading_1_control,
#customize-control-font_heading_2_control, #customize-control-font_heading_2_control,
#customize-control-font_heading_3_control { #customize-control-font_heading_3_control {
margin-top: 20px; margin-top: 20px;
} }

View File

@ -499,4 +499,24 @@ function generatepress_typography_live_update( id, selector, property, unit, med
} }
} }
} ); } );
wp.customize( 'generate_settings[global_colors]', function( value ) {
value.bind( function( newval ) {
var globalColors = '';
newval.forEach( function( item ) {
globalColors += '--' + item.slug + ':' + item.color + ';';
} );
if ( $( 'style#global_colors' ).length ) {
$( 'style#global_colors' ).html( ':root{' + globalColors + '}' );
} else {
$( 'head' ).append( '<style id="global_colors">:root{' + globalColors + '}</style>' );
setTimeout( function() {
$( 'style#global_colors' ).not( ':last' ).remove();
}, 100 );
}
} );
} );
}( jQuery ) ); }( jQuery ) );

View File

@ -1,154 +1,154 @@
( function( api ) { ( function( api ) {
api.controlConstructor['gp-customizer-typography'] = api.Control.extend( { api.controlConstructor['gp-customizer-typography'] = api.Control.extend( {
ready: function() { ready: function() {
var control = this; var control = this;
control.container.on( 'change', '.generatepress-font-family select', control.container.on( 'change', '.generatepress-font-family select',
function() { function() {
var _this = jQuery( this ), var _this = jQuery( this ),
_value = _this.val(), _value = _this.val(),
_categoryID = _this.attr( 'data-category' ), _categoryID = _this.attr( 'data-category' ),
_variantsID = _this.attr( 'data-variants' ); _variantsID = _this.attr( 'data-variants' );
// Set our font family // Set our font family
control.settings['family'].set( _this.val() ); control.settings['family'].set( _this.val() );
// Bail if our controls don't exist // Bail if our controls don't exist
if ( 'undefined' == typeof control.settings['category'] || 'undefined' == typeof control.settings['variant'] ) { if ( 'undefined' == typeof control.settings['category'] || 'undefined' == typeof control.settings['variant'] ) {
return; return;
} }
setTimeout( function() { setTimeout( function() {
// Send our request to the generate_get_all_google_fonts_ajax function // Send our request to the generate_get_all_google_fonts_ajax function
var response = jQuery.getJSON({ var response = jQuery.getJSON({
type: 'POST', type: 'POST',
url: ajaxurl, url: ajaxurl,
data: { data: {
action: 'generate_get_all_google_fonts_ajax', action: 'generate_get_all_google_fonts_ajax',
gp_customize_nonce: gp_customize.nonce gp_customize_nonce: gp_customize.nonce
}, },
async: false, async: false,
dataType: 'json', dataType: 'json',
}); });
// Get our response // Get our response
var fonts = response.responseJSON; var fonts = response.responseJSON;
// Create an ID from our selected font // Create an ID from our selected font
var id = _value.split(' ').join('_').toLowerCase(); var id = _value.split(' ').join('_').toLowerCase();
// Set our values if we have them // Set our values if we have them
if ( id in fonts ) { if ( id in fonts ) {
// Get existing variants if this font is already selected // Get existing variants if this font is already selected
var got_variants = false; var got_variants = false;
jQuery( '.generatepress-font-family select' ).not( _this ).each( function( key, select ) { jQuery( '.generatepress-font-family select' ).not( _this ).each( function( key, select ) {
var parent = jQuery( this ).closest( '.generatepress-font-family' ); var parent = jQuery( this ).closest( '.generatepress-font-family' );
if ( _value == jQuery( select ).val() && _this.data( 'category' ) !== jQuery( select ).data( 'category' ) ) { if ( _value == jQuery( select ).val() && _this.data( 'category' ) !== jQuery( select ).data( 'category' ) ) {
if ( ! got_variants ) { if ( ! got_variants ) {
updated_variants = jQuery( parent.next( '.generatepress-font-variant' ).find( 'select' ) ).val(); updated_variants = jQuery( parent.next( '.generatepress-font-variant' ).find( 'select' ) ).val();
got_variants = true; got_variants = true;
} }
} }
} ); } );
// We're using a Google font, so show the variants field // We're using a Google font, so show the variants field
_this.closest( '.generatepress-font-family' ).next( 'div' ).show(); _this.closest( '.generatepress-font-family' ).next( 'div' ).show();
// Remove existing variants // Remove existing variants
jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove(); jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove();
// Populate our select input with available variants // Populate our select input with available variants
jQuery.each( fonts[ id ].variants, function( key, value ) { jQuery.each( fonts[ id ].variants, function( key, value ) {
jQuery( 'select[name="' + _variantsID + '"]' ).append( jQuery( '<option></option>' ).attr( 'value', value ).text( value ) ); jQuery( 'select[name="' + _variantsID + '"]' ).append( jQuery( '<option></option>' ).attr( 'value', value ).text( value ) );
} ); } );
// Set our variants // Set our variants
if ( ! got_variants ) { if ( ! got_variants ) {
control.settings[ 'variant' ].set( fonts[ id ].variants ); control.settings[ 'variant' ].set( fonts[ id ].variants );
} else { } else {
control.settings[ 'variant' ].set( updated_variants ); control.settings[ 'variant' ].set( updated_variants );
} }
// Set our font category // Set our font category
control.settings[ 'category' ].set( fonts[ id ].category ); control.settings[ 'category' ].set( fonts[ id ].category );
jQuery( 'input[name="' + _categoryID + '"' ).val( fonts[ id ].category ); jQuery( 'input[name="' + _categoryID + '"' ).val( fonts[ id ].category );
} else { } else {
_this.closest( '.generatepress-font-family' ).next( 'div' ).hide(); _this.closest( '.generatepress-font-family' ).next( 'div' ).hide();
control.settings[ 'category' ].set( '' ) control.settings[ 'category' ].set( '' )
control.settings[ 'variant' ].set( '' ) control.settings[ 'variant' ].set( '' )
jQuery( 'input[name="' + _categoryID + '"' ).val( '' ); jQuery( 'input[name="' + _categoryID + '"' ).val( '' );
jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove(); jQuery( 'select[name="' + _variantsID + '"]' ).find( 'option' ).remove();
} }
}, 25 ); }, 25 );
} }
); );
control.container.on( 'change', '.generatepress-font-variant select', control.container.on( 'change', '.generatepress-font-variant select',
function() { function() {
var _this = jQuery( this ); var _this = jQuery( this );
var variants = _this.val(); var variants = _this.val();
control.settings['variant'].set( variants ); control.settings['variant'].set( variants );
jQuery( '.generatepress-font-variant select' ).each( function( key, value ) { jQuery( '.generatepress-font-variant select' ).each( function( key, value ) {
var this_control = jQuery( this ).closest( 'li' ).attr( 'id' ).replace( 'customize-control-', '' ); var this_control = jQuery( this ).closest( 'li' ).attr( 'id' ).replace( 'customize-control-', '' );
var parent = jQuery( this ).closest( '.generatepress-font-variant' ); var parent = jQuery( this ).closest( '.generatepress-font-variant' );
var font_val = api.control( this_control ).settings['family'].get(); var font_val = api.control( this_control ).settings['family'].get();
if ( font_val == control.settings['family'].get() && _this.attr( 'name' ) !== jQuery( value ).attr( 'name' ) ) { if ( font_val == control.settings['family'].get() && _this.attr( 'name' ) !== jQuery( value ).attr( 'name' ) ) {
jQuery( parent.find( 'select' ) ).not( _this ).val( variants ).triggerHandler( 'change' ); jQuery( parent.find( 'select' ) ).not( _this ).val( variants ).triggerHandler( 'change' );
api.control( this_control ).settings['variant'].set( variants ); api.control( this_control ).settings['variant'].set( variants );
} }
} ); } );
} }
); );
control.container.on( 'change', '.generatepress-font-category input', control.container.on( 'change', '.generatepress-font-category input',
function() { function() {
control.settings['category'].set( jQuery( this ).val() ); control.settings['category'].set( jQuery( this ).val() );
} }
); );
control.container.on( 'change', '.generatepress-font-weight select', control.container.on( 'change', '.generatepress-font-weight select',
function() { function() {
control.settings['weight'].set( jQuery( this ).val() ); control.settings['weight'].set( jQuery( this ).val() );
} }
); );
control.container.on( 'change', '.generatepress-font-transform select', control.container.on( 'change', '.generatepress-font-transform select',
function() { function() {
control.settings['transform'].set( jQuery( this ).val() ); control.settings['transform'].set( jQuery( this ).val() );
} }
); );
} }
} ); } );
} )( wp.customize ); } )( wp.customize );
jQuery( document ).ready( function( $ ) { jQuery( document ).ready( function( $ ) {
$( '.generatepress-font-family select' ).select2(); $( '.generatepress-font-family select' ).select2();
$( '.generatepress-font-variant' ).each( function( key, value ) { $( '.generatepress-font-variant' ).each( function( key, value ) {
var _this = $( this ); var _this = $( this );
var value = _this.data( 'saved-value' ); var value = _this.data( 'saved-value' );
if ( value ) { if ( value ) {
value = value.toString().split( ',' ); value = value.toString().split( ',' );
} }
_this.find( 'select' ).select2().val( value ).trigger( 'change.select2' ); _this.find( 'select' ).select2().val( value ).trigger( 'change.select2' );
} ); } );
$( ".generatepress-font-family" ).each( function( key, value ) { $( ".generatepress-font-family" ).each( function( key, value ) {
var _this = $( this ); var _this = $( this );
if ( $.inArray( _this.find( 'select' ).val(), typography_defaults ) !== -1 ) { if ( $.inArray( _this.find( 'select' ).val(), typography_defaults ) !== -1 ) {
_this.next( '.generatepress-font-variant' ).hide(); _this.next( '.generatepress-font-variant' ).hide();
} }
} ); } );
} ); } );

View File

@ -17,7 +17,6 @@ GeneratePress_Customize_Field::add_title(
'choices' => array( 'choices' => array(
'toggleId' => 'top-bar-colors', 'toggleId' => 'top-bar-colors',
), ),
'active_callback' => 'generate_is_top_bar_active',
) )
); );

View File

@ -351,6 +351,7 @@ function generate_do_control_inline_scripts() {
'generateCustomizerControls', 'generateCustomizerControls',
array( array(
'palette' => $colors, 'palette' => $colors,
'showGoogleFonts' => apply_filters( 'generate_font_manager_show_google_fonts', true ),
) )
); );

View File

@ -241,15 +241,33 @@ if ( ! function_exists( 'generate_resource_hints' ) ) {
*/ */
function generate_resource_hints( $urls, $relation_type ) { function generate_resource_hints( $urls, $relation_type ) {
$handle = generate_is_using_dynamic_typography() ? 'generate-google-fonts' : 'generate-fonts'; $handle = generate_is_using_dynamic_typography() ? 'generate-google-fonts' : 'generate-fonts';
$hint_type = apply_filters( 'generate_google_font_resource_hint_type', 'preconnect' );
$has_crossorigin_support = version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' );
if ( wp_style_is( $handle, 'queue' ) && 'preconnect' === $relation_type ) { if ( wp_style_is( $handle, 'queue' ) ) {
if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { if ( $relation_type === $hint_type ) {
$urls[] = array( if ( $has_crossorigin_support && 'preconnect' === $hint_type ) {
'href' => 'https://fonts.gstatic.com', $urls[] = array(
'crossorigin', 'href' => 'https://fonts.gstatic.com',
); 'crossorigin',
} else { );
$urls[] = 'https://fonts.gstatic.com';
$urls[] = array(
'href' => 'https://fonts.googleapis.com',
'crossorigin',
);
} else {
$urls[] = 'https://fonts.gstatic.com';
$urls[] = 'https://fonts.googleapis.com';
}
}
if ( 'dns-prefetch' !== $hint_type ) {
$googleapis_index = array_search( 'fonts.googleapis.com', $urls );
if ( false !== $googleapis_index ) {
unset( $urls[ $googleapis_index ] );
}
} }
} }

View File

@ -32,6 +32,17 @@ function generate_setup_woocommerce() {
add_action( 'woocommerce_sidebar', 'generate_construct_sidebars' ); add_action( 'woocommerce_sidebar', 'generate_construct_sidebars' );
} }
/**
* Get the tag name for our WooCommerce wrappers.
*
* @since 3.2.0
*/
function generate_get_woocommerce_wrapper_tagname() {
echo is_singular()
? 'article'
: 'div';
}
if ( ! function_exists( 'generate_woocommerce_start' ) ) { if ( ! function_exists( 'generate_woocommerce_start' ) ) {
add_action( 'woocommerce_before_main_content', 'generate_woocommerce_start', 10 ); add_action( 'woocommerce_before_main_content', 'generate_woocommerce_start', 10 );
/** /**
@ -51,7 +62,7 @@ if ( ! function_exists( 'generate_woocommerce_start' ) ) {
*/ */
do_action( 'generate_before_main_content' ); do_action( 'generate_before_main_content' );
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php generate_do_microdata( 'article' ); ?>> <<?php generate_get_woocommerce_wrapper_tagname(); ?> <?php generate_do_attr( 'woocommerce-content' ); ?>>
<div class="inside-article"> <div class="inside-article">
<?php <?php
/** /**
@ -93,7 +104,7 @@ if ( ! function_exists( 'generate_woocommerce_end' ) ) {
do_action( 'generate_after_content' ); do_action( 'generate_after_content' );
?> ?>
</div> </div>
</article> </<?php generate_get_woocommerce_wrapper_tagname(); ?>>
<?php <?php
/** /**
* generate_after_main_content hook. * generate_after_main_content hook.

View File

@ -52,9 +52,18 @@ if ( ! function_exists( 'generate_comment' ) ) {
do_action( 'generate_after_comment_author_name' ); do_action( 'generate_after_comment_author_name' );
if ( apply_filters( 'generate_show_comment_entry_meta', true ) ) : if ( apply_filters( 'generate_show_comment_entry_meta', true ) ) :
$has_comment_date_link = apply_filters( 'generate_add_comment_date_link', true );
?> ?>
<div class="entry-meta comment-metadata"> <div class="entry-meta comment-metadata">
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> <?php
if ( $has_comment_date_link ) {
printf(
'<a href="%s">',
esc_url( get_comment_link( $comment->comment_ID ) )
);
}
?>
<time datetime="<?php comment_time( 'c' ); ?>" itemprop="datePublished"> <time datetime="<?php comment_time( 'c' ); ?>" itemprop="datePublished">
<?php <?php
printf( printf(
@ -65,8 +74,13 @@ if ( ! function_exists( 'generate_comment' ) ) {
); );
?> ?>
</time> </time>
</a> <?php
<?php edit_comment_link( __( 'Edit', 'generatepress' ), '<span class="edit-link">| ', '</span>' ); ?> if ( $has_comment_date_link ) {
echo '</a>';
}
edit_comment_link( __( 'Edit', 'generatepress' ), '<span class="edit-link">| ', '</span>' );
?>
</div> </div>
<?php <?php
endif; endif;

View File

@ -222,7 +222,7 @@ if ( ! function_exists( 'generate_back_to_top' ) ) {
echo apply_filters( // phpcs:ignore echo apply_filters( // phpcs:ignore
'generate_back_to_top_output', 'generate_back_to_top_output',
sprintf( sprintf(
'<a title="%1$s" aria-label="%1$s" rel="nofollow" href="#" class="generate-back-to-top" style="opacity:0;visibility:hidden;" data-scroll-speed="%2$s" data-start-scroll="%3$s"> '<a title="%1$s" aria-label="%1$s" rel="nofollow" href="#" class="generate-back-to-top" data-scroll-speed="%2$s" data-start-scroll="%3$s">
%5$s %5$s
</a>', </a>',
esc_attr__( 'Scroll back to top', 'generatepress' ), esc_attr__( 'Scroll back to top', 'generatepress' ),

View File

@ -112,7 +112,6 @@ if ( ! function_exists( 'generate_construct_logo' ) ) {
'class' => 'header-image is-logo-image', 'class' => 'header-image is-logo-image',
'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), 'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
'src' => $logo_url, 'src' => $logo_url,
'title' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
) )
); );
@ -134,8 +133,13 @@ if ( ! function_exists( 'generate_construct_logo' ) ) {
$data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) ); $data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) );
if ( ! empty( $data ) ) { if ( ! empty( $data ) ) {
$attr['width'] = $data['width']; if ( isset( $data['width'] ) ) {
$attr['height'] = $data['height']; $attr['width'] = $data['width'];
}
if ( isset( $data['height'] ) ) {
$attr['height'] = $data['height'];
}
} }
} }
} }
@ -152,12 +156,11 @@ if ( ! function_exists( 'generate_construct_logo' ) ) {
'generate_logo_output', 'generate_logo_output',
sprintf( sprintf(
'<div class="site-logo"> '<div class="site-logo">
<a href="%1$s" title="%2$s" rel="home"> <a href="%1$s" rel="home">
<img %3$s /> <img %2$s />
</a> </a>
</div>', </div>',
esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ),
esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ),
$html_attr $html_attr
), ),
$logo_url, $logo_url,

View File

@ -36,16 +36,14 @@ if ( ! function_exists( 'generate_content_nav' ) ) {
} }
?> ?>
<nav <?php generate_do_attr( 'post-navigation', array( 'id' => esc_attr( $nav_id ) ) ); ?>> <nav <?php generate_do_attr( 'post-navigation', array( 'id' => esc_attr( $nav_id ) ) ); ?>>
<span class="screen-reader-text"><?php esc_html_e( 'Post navigation', 'generatepress' ); ?></span>
<?php <?php
if ( is_single() ) : // navigation links for single posts. if ( is_single() ) : // navigation links for single posts.
$post_navigation_args = apply_filters( $post_navigation_args = apply_filters(
'generate_post_navigation_args', 'generate_post_navigation_args',
array( array(
'previous_format' => '<div class="nav-previous">' . generate_get_svg_icon( 'arrow-left' ) . '<span class="prev" title="' . esc_attr__( 'Previous', 'generatepress' ) . '">%link</span></div>', 'previous_format' => '<div class="nav-previous">' . generate_get_svg_icon( 'arrow-left' ) . '<span class="prev">%link</span></div>',
'next_format' => '<div class="nav-next">' . generate_get_svg_icon( 'arrow-right' ) . '<span class="next" title="' . esc_attr__( 'Next', 'generatepress' ) . '">%link</span></div>', 'next_format' => '<div class="nav-next">' . generate_get_svg_icon( 'arrow-right' ) . '<span class="next">%link</span></div>',
'link' => '%title', 'link' => '%title',
'in_same_term' => apply_filters( 'generate_category_post_navigation', false ), 'in_same_term' => apply_filters( 'generate_category_post_navigation', false ),
'excluded_terms' => '', 'excluded_terms' => '',

View File

@ -562,26 +562,10 @@ function generate_do_template_part( $template ) {
if ( apply_filters( 'generate_do_template_part', true, $template ) ) { if ( apply_filters( 'generate_do_template_part', true, $template ) ) {
if ( 'archive' === $template || 'index' === $template ) { if ( 'archive' === $template || 'index' === $template ) {
get_template_part( 'content', get_post_format() ); get_template_part( 'content', get_post_format() );
} } elseif ( 'none' === $template ) {
if ( 'page' === $template ) {
get_template_part( 'content', 'page' );
}
if ( 'single' === $template ) {
get_template_part( 'content', 'single' );
}
if ( 'search' === $template ) {
get_template_part( 'content', 'search' );
}
if ( '404' === $template ) {
get_template_part( 'content', '404' );
}
if ( 'none' === $template ) {
get_template_part( 'no-results' ); get_template_part( 'no-results' );
} else {
get_template_part( 'content', $template );
} }
} }

View File

@ -5,8 +5,8 @@ License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
Requires at least: 5.2 Requires at least: 5.2
Tested up to: 5.9 Tested up to: 6.1
Stable tag: 3.1.3 Stable tag: 3.2.0
GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.
@ -99,6 +99,32 @@ MIT License: https://github.com/JedWatson/react-select/blob/master/LICENSE
== Changelog == == Changelog ==
= 3.2.0 =
Release date: October 25, 2022
* Feature: Re-order global colors in the Customizer
* Feature: Add live preview to global color changes in Customizer
* Feature: Add font-style option to Typography
* Feature: Add text-decoration option to Typography
* Feature: Add generate_font_manager_show_google_fonts PHP filter
* Feature: Add generate_font_manager_system_fonts JS filter
* Feature: Add generate_font_manager_google_fonts JS filter
* Feature: Add generate_add_comment_date_link PHP filter
* Fix: Missing link underlines in the editor
* Fix: Code block width in the editor
* Fix: WooCommerce archive wrapper HTML attributes
* Fix: Google font API requests using a standalone numbers
* Fix: Customizer shortcut links in the GP Dashboard
* Fix: Check for logo dimension data
* Fix: Back to top iOS double-click issues
* Tweak: Use block_editor_settings_all to add editor CSS
* Tweak: Remove title attributes from logo and logo link
* Tweak: Remove excess screen reader text from post navigation
* Tweak: Improve editor width calculations based on your layouts
* Tweak: Improve check for is-dark-theme class
* Tweak: Change Google Font label in Font Manager
= 3.1.3 = = 3.1.3 =
Release date: February 9, 2022 Release date: February 9, 2022
@ -667,4 +693,4 @@ Release date: December 6, 2017
= Earlier versions = = Earlier versions =
For the changelog of earlier versions, please refer to our [development log](https://generatepress.com/category/development/). For the changelog of earlier versions, please refer to our [development log](https://generatepress.com/category/changelog/).

View File

@ -4,9 +4,9 @@ Theme URI: https://generatepress.com
Author: Tom Usborne Author: Tom Usborne
Author URI: https://tomusborne.com Author URI: https://tomusborne.com
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS, and is translated into over 25 languages by our amazing community of users. A few of our many features include 60+ color controls, powerful dynamic typography, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover), and 9 widget areas. Learn more and check out our powerful premium version at https://generatepress.com Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS, and is translated into over 25 languages by our amazing community of users. A few of our many features include 60+ color controls, powerful dynamic typography, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover), and 9 widget areas. Learn more and check out our powerful premium version at https://generatepress.com
Version: 3.1.3 Version: 3.2.0
Requires at least: 5.2 Requires at least: 5.2
Tested up to: 5.9 Tested up to: 6.1
Requires PHP: 5.6 Requires PHP: 5.6
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html