Skip to content

Commit

Permalink
Merge branch 'eri-trabiccolo-alignwide' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nikeo committed Oct 25, 2018
2 parents 72ea6f5 + f94eb2b commit 7a1a1d9
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
59 changes: 59 additions & 0 deletions assets/front/scss/0_4_layout/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,65 @@ section[class^="post-"] {



// Gutenberg
// cover images */
//
// Real alignfull and alignwide
// allowed only in layouts with no sidebars and full-width
// in single and singular, as our only post list grid articles showing the full content
// look like cards (meaning that they're boxed with borders) and would make no sense there.
.page, .single {
&.czr-no-sidebar {
// alignwide and alignfull in boxed layouts
// only reset the .container[role=main] horizontal padding
.entry-content .wp-block-cover-image {
&.alignfull,
&.alignwide {
margin-right: -15px;
margin-left: -15px;
clear: both;
width: auto;
}
}
&.czr-boxed-layout .entry-content .wp-block-cover-image {
@include media-breakpoint-up(sm) {
&.alignfull,
&.alignwide {
margin-right: -30px;
margin-left: -30px;
}
}
}
}

&.czr-full-layout.czr-no-sidebar {
#tc-page-wrap {
overflow-x: hidden;
}
// alignfull
.entry-content .wp-block-cover-image.alignfull {
width: 100vw;
max-width: 100vw;
position: relative;
margin-left: 0;
margin-right: 0;
&:not(.has-parallax) {
@if ( true == $is_rtl ) {
right: 50%;
@include transform( translateX(50%) );
}
@else {
left: 50%;
@include transform( translateX(-50%) );
}
}
&.has-parallax:not(.czr-alignfull-p) {
width: 100%;
}
}
}
}




Expand Down
9 changes: 5 additions & 4 deletions core/class-fire-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function __construct () {
add_action( 'after_setup_theme' , array( $this , 'czr_fn_base_customizr_setup' ));

//add classes to body tag : fade effect on link hover, is_customizing. Since v3.2.0
add_filter('body_class' , array( $this , 'czr_fn_set_body_classes') );
add_filter( 'body_class' , array( $this , 'czr_fn_set_body_classes') );
//Add the context
add_filter ( 'body_class' , 'czr_fn_set_post_list_context_class' );

Expand Down Expand Up @@ -185,9 +185,7 @@ function czr_fn_set_body_classes( $_classes ) {
}

//BOXED LAYOUT
if ( 'boxed' == esc_attr( czr_fn_opt( 'tc_site_layout') ) ) {
$_classes[] = 'czr-boxed-layout';
}
$_classes[] = ( 'boxed' == esc_attr( czr_fn_opt( 'tc_site_layout') ) ) ? 'czr-boxed-layout' : 'czr-full-layout';

//SIDENAV POSITIONING
if ( czr_fn_is_possible('sidenav') ) {
Expand All @@ -206,6 +204,9 @@ function czr_fn_set_body_classes( $_classes ) {

function czr_fn_base_customizr_setup() {
add_theme_support( 'html5', array( 'comment-form', 'caption' ) );
// gutenberg alignwide/full cover images.
add_theme_support( 'align-wide' );

//tag cloud - same font size
add_filter( 'widget_tag_cloud_args' , array( $this, 'czr_fn_add_widget_tag_cloud_args' ));
//tag cloud add button classes
Expand Down
2 changes: 1 addition & 1 deletion core/class-fire-resources_styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ function czr_fn_maybe_write_boxed_layout_inline_css( $_css ) {
//Add some rules from sm up
//add padding
$css_container[] = sprintf( '@media (min-width: %1$spx){ %2$s{ padding-right: %3$spx; padding-left: %3$spx; } }',
$css_container_widths[ 'sm' ],
$css_mq_breakpoints[ 'sm' ],
$container_selector,
$additional_width
);
Expand Down

0 comments on commit 7a1a1d9

Please sign in to comment.