From 2595445692c232da322c94a8a80efa614d94f2e8 Mon Sep 17 00:00:00 2001 From: Fabiano Date: Wed, 11 Jul 2018 12:31:18 -0300 Subject: [PATCH] Revised banner on mobile --- src/assets/scss/style.scss | 16 +++++++++++----- src/functions/single-functions.php | 11 ++++++++++- src/template-parts/bannerHeader.php | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index 7548ca9..e2d6a74 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -293,12 +293,16 @@ form{ .title-header{ display: inline-block; padding: 1.5rem; + padding-left: 4.166667%; + padding-right: 4.166667%; + max-width: 90vw; + word-break: break-word; @media only screen and (min-width: 992px){ - height: 100px; + min-height: 100px; min-width: 450px; padding: 0rem; padding-left: 4.166667%; - padding-right: 1rem; + padding-right: 4.166667%; &.singular-title{ padding: 1.5rem; padding-left: 4.166667%; @@ -308,11 +312,12 @@ form{ padding: 0.7rem; padding-top: 2.2rem; padding-left: 4.166667%; - height: 100px; + padding-right: 4.166667%; + min-height: 100px; } @media only screen and (max-width: 576px){ - height: 60px; - padding: 0.3rem 1.3rem 0.3rem 4.16666666667%; + min-height: 60px; + padding: 1rem 1.3rem 0.3rem 4.16666666667%; } h1{ color: #000; @@ -337,6 +342,7 @@ form{ .tainacan-title-page{ .title-page{ font-size: 20px; + word-break: break-word; } .title-back{ font: { diff --git a/src/functions/single-functions.php b/src/functions/single-functions.php index 631084e..c21e43d 100644 --- a/src/functions/single-functions.php +++ b/src/functions/single-functions.php @@ -82,4 +82,13 @@ function filter_cancel_comment_reply_link( $formatted_link, $link, $text ) { $formatted_link = ''; return $formatted_link; } -add_filter( 'cancel_comment_reply_link', 'filter_cancel_comment_reply_link', 10, 3 ); \ No newline at end of file +add_filter( 'cancel_comment_reply_link', 'filter_cancel_comment_reply_link', 10, 3 ); + +/* function max_title_length($title){ + $max = 20; + if(strlen($title) > $max) + return substr($title, 0, $max). " …"; + else + return $title; +} +add_filter('the_title', 'max_title_length'); */ \ No newline at end of file diff --git a/src/template-parts/bannerHeader.php b/src/template-parts/bannerHeader.php index 8f7c443..c5c0ca5 100644 --- a/src/template-parts/bannerHeader.php +++ b/src/template-parts/bannerHeader.php @@ -8,7 +8,7 @@

Blog - +