Adds Tainacan Heading section pattern.

This commit is contained in:
mateuswetah 2020-07-15 14:21:03 -03:00
parent 10511d02ad
commit d7a0ba01b9
7 changed files with 196 additions and 48 deletions

View File

@ -178,38 +178,47 @@
@media only screen and (min-height: 1080px) {
min-height: 50vh;
}
&h1, &h2{
font-size: 1rem;
}
h1 {
color: #298596;
font-size: 1.125rem;
font-weight: 600;
}
h2 {
color: #000;
font-size: 1.125rem;
font-weight: 600;
}
h3 {
color: #000;
font-size: 1rem;
h1,
h2,
h3,
h5 {
font-weight: 600;
}
h4 {
color: #555758;
font-size: 1rem;
font-style: italic;
}
h5 {
color: #000;
font-size: 0.875rem;
font-weight: 600;
}
h6 {
font-style: 400;
}
h1:not(.has-text-color),
h6:not(.has-text-color) {
color: #298596;
}
h2:not(.has-text-color),
h3:not(.has-text-color),
h5:not(.has-text-color) {
color: #000;
}
h4:not(.has-text-color) {
color:#555758;
}
h1:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.125rem;
}
h2:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.125rem;
}
h3:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1rem;
}
h4:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1rem;
}
h5:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 0.875rem;
}
h6:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 0.875rem;
font-weight: 400;
}
pre:not(.wp-block-code) {
color: #555758;
@ -263,12 +272,21 @@
}
}
.tainacan-group-heading {
h1 { font-size: 1.5rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h1:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) { font-size: 1.6rem; }
h2:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) { font-size: 1.5rem; }
h3:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) { font-size: 1.25rem; }
h4:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) { font-size: 1.125rem; }
h1:not(.has-text-color),
h2:not(.has-text-color),
h3:not(.has-text-color),
h4:not(.has-text-color) {
color: #298596;
}
p {
font-style: italic;
}
p:not(.has-text-color) {
color: #898d8f;
}
hr.wp-block-separator:not(.is-style-wide) {
@ -868,4 +886,25 @@
font-weight: 400;
}
}
}
.tainacan-heading-section-pattern-pattern {
h1,
h2,
h3,
h4 {
margin-bottom: 0px !important;
}
p {
font-style: italic;
margin-bottom: 0 !important;
}
hr.wp-block-separator:not(.is-style-wide) {
margin-left: 0;
margin-top: 0.5rem;
max-width: 200px;
}
hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
border-width: 2px;
height: 3px;
}
}

View File

@ -449,12 +449,32 @@
.wp-block-heading {
color: #298596 !important;
}
h1.wp-block-heading { font-size: 1.5rem; }
h2.wp-block-heading { font-size: 1.5rem; }
h3.wp-block-heading { font-size: 1.25rem; }
h4.wp-block-heading { font-size: 1.125rem; }
p.wp-block-paragraph {
h1:not(.has-text-color),
h2:not(.has-text-color),
h3:not(.has-text-color),
h4:not(.has-text-color) {
color: #298596;
}
h1.wp-block-heading,
h1:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.6rem;
}
h2.wp-block-heading,
h2:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.5rem;
}
h3.wp-block-heading,
h3:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.25rem;
}
h4.wp-block-heading,
h4:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.125rem;
}
p {
font-style: italic;
}
p:not(.has-text-color) {
color: #898d8f;
}
hr.wp-block-separator:not(.is-style-wide) {
@ -467,4 +487,25 @@
height: 3px;
}
}
}
.tainacan-heading-section-pattern-pattern {
h1,
h2,
h3,
h4 {
margin-bottom: 0px !important;
}
p {
font-style: italic;
margin-bottom: 0 !important;
}
hr.wp-block-separator:not(.is-style-wide) {
margin-left: 0;
margin-top: 0.5rem;
max-width: 200px;
}
hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
border-width: 2px;
height: 3px;
}
}

View File

@ -569,21 +569,40 @@
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading .wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading .wp-block-heading {
color: #298596 !important; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h1:not(.has-text-color),
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h2:not(.has-text-color),
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h3:not(.has-text-color),
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h4:not(.has-text-color),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h1:not(.has-text-color),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h2:not(.has-text-color),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h3:not(.has-text-color),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h4:not(.has-text-color) {
color: #298596; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h1.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h1.wp-block-heading {
font-size: 1.5rem; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h1:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h1.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h1:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.6rem; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h2.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h2.wp-block-heading {
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h2:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h2.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h2:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.5rem; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h3.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h3.wp-block-heading {
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h3:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h3.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h3:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.25rem; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h4.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h4.wp-block-heading {
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading h4:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h4.wp-block-heading,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading h4:not(.has-huge-font-size):not(.has-large-font-size):not(.has-medium-font-size):not(.has-normal-font-size):not(.has-small-font-size) {
font-size: 1.125rem; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading p.wp-block-paragraph,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading p.wp-block-paragraph {
font-style: italic;
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading p,
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading p {
font-style: italic; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading p:not(.has-text-color),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading p:not(.has-text-color) {
color: #898d8f; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading hr.wp-block-separator:not(.is-style-wide),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading hr.wp-block-separator:not(.is-style-wide) {
@ -592,7 +611,23 @@
border-color: #298596; }
.edit-post-visual-editor.editor-styles-wrapper .wp-block-group.tainacan-group-heading hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots),
.components-modal__screen-overlay .wp-block-group.tainacan-group-heading hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
border-width: 3px;
border-width: 2px;
height: 3px; }
.tainacan-heading-section-pattern-pattern h1,
.tainacan-heading-section-pattern-pattern h2,
.tainacan-heading-section-pattern-pattern h3,
.tainacan-heading-section-pattern-pattern h4 {
margin-bottom: 0px !important; }
.tainacan-heading-section-pattern-pattern p {
font-style: italic;
margin-bottom: 0 !important; }
.tainacan-heading-section-pattern-pattern hr.wp-block-separator:not(.is-style-wide) {
margin-left: 0;
margin-top: 0.5rem;
max-width: 200px; }
.tainacan-heading-section-pattern-pattern hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
border-width: 2px;
height: 3px; }
/*# sourceMappingURL=editor-style.css.map */

File diff suppressed because one or more lines are too long

View File

@ -204,6 +204,32 @@ function tainacan_widgets_footer_init() {
}
add_action( 'widgets_init', 'tainacan_widgets_footer_init' );
/*
* Register Tainacan Heading Section Pattern
*/
function tainacan_block_patterns_init() {
global $wp_version;
if ((is_plugin_active('gutenberg/gutenberg.php') || $wp_version >= '5') && function_exists('register_block_pattern_category')) {
register_block_pattern_category(
'tainacan-interface',
array( 'label' => _x( 'Tainacan Interface', 'Block pattern category', 'tainacan-interface' ) ) );
}
if ((is_plugin_active('gutenberg/gutenberg.php') || $wp_version >= '5') && function_exists('register_block_pattern')) {
register_block_pattern(
'tainacan-interface/tainacan-heading-section-pattern',
array(
'title' => __( 'Tainacan heading section', 'tainacan-interface' ),
'description' => _x( 'A left-aligned heading section containing a light sub-heading and an underline bellow the title.', 'Block pattern description', 'tainacan-interface' ),
'content' => '<!-- wp:group {"className":"tainacan-heading-section-pattern-pattern"} --><div class="wp-block-group tainacan-heading-section-pattern-pattern"><div class="wp-block-group__inner-container"><!-- wp:heading {"textColor":"default","style":{"typography":{"fontSize":24}}} --><h2 class="has-default-color has-text-color" style="font-size:24px">' . esc_html__( 'Section heading', 'tainacan-interface' ) . '</h2><!-- /wp:heading --><!-- wp:paragraph {"style":{"color":{"text":"#838386"}}} --><p class="has-text-color" style="color:#898d8f">' . esc_html__( 'Section optional description...', 'tainacan-interface' ) . '</p><!-- /wp:paragraph --><!-- wp:separator {"color":"default"} --><hr class="wp-block-separator has-text-color has-background has-default-background-color has-default-color"/><!-- /wp:separator --><!-- wp:spacer {"height":32} --><div style="height:32px" aria-hidden="true" class="wp-block-spacer"></div><!-- /wp:spacer --></div></div><!-- /wp:group -->',
'categories' => array('tainacan-interface')
)
);
}
}
add_action( 'init', 'tainacan_block_patterns_init' );
/**
* get Logo function
*

View File

@ -1484,6 +1484,13 @@ function tainacan_get_color_scheme_css( $colors ) {
.tainacan-content .wp-block-tainacan-carousel-terms-list .swiper-button-next svg {
fill: {$colors['tainacan_link_color']} !important;
}
.tainacan-content .wp-block-tainacan-facets-list .show-more-button {
background-color: {$colors['tainacan_link_color']} !important;
}
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-cloud li.facet-list-item:hover a,
.wp-block-tainacan-facets-list ul.facets-list-edit.facets-layout-cloud li.facet-list-item:hover a {
color: {$colors['tainacan_link_color']} !important;
}
.tainacan-single-post .single-item-collection--attachments-next,
.tainacan-single-post .single-item-collection--attachments-prev {
@ -1544,10 +1551,10 @@ function tainacan_get_color_scheme_css( $colors ) {
}
/* Extra title group class, that can be added for styling special headings */
.wp-block-group.tainacan-group-heading h1,
.wp-block-group.tainacan-group-heading h2,
.wp-block-group.tainacan-group-heading h3,
.wp-block-group.tainacan-group-heading h4 {
.wp-block-group.tainacan-group-heading h1:not(.has-text-color),
.wp-block-group.tainacan-group-heading h2:not(.has-text-color),
.wp-block-group.tainacan-group-heading h3:not(.has-text-color),
.wp-block-group.tainacan-group-heading h4:not(.has-text-color) {
color: {$colors['tainacan_link_color']} !important;
}
.wp-block-group.tainacan-group-heading hr.wp-block-separator {

File diff suppressed because one or more lines are too long