Skip to content

Commit

Permalink
Improve empty ready-links class and style
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Tabor committed Apr 30, 2018
1 parent a95b958 commit db0705a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
8 changes: 8 additions & 0 deletions assets/css/merlin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,14 @@ body.loaded .merlin__content__footer--fullwidth {
filter: blur(0);
}

.merlin__content__footer--nolinks {
margin-bottom: 3.14em;
}

.merlin__content__footer--nolinks .merlin__button {
margin-top: 0.57em;
}

.merlin__content--license .merlin__content__footer {
margin-top: -0.24em;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/merlin.min.css

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion assets/scss/modules/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
}

&--nolinks {
margin-bottom: 1.9em;
margin-bottom: 3.14em;

.merlin__button {
margin-top: .57em;
}
}

.merlin__content--license & {
Expand Down
5 changes: 4 additions & 1 deletion class-merlin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1208,12 +1208,15 @@ protected function ready() {

// Links.
$links = array();

for ( $i = 1; $i < 4; $i++ ) {
if ( ! empty( $strings[ "ready-link-$i" ] ) ) {
$links[] = $strings[ "ready-link-$i" ];
}
}

$links_class = empty( $links ) ? 'merlin__content__footer--nolinks' : null;

$allowed_html_array = array(
'a' => array(
'href' => array(),
Expand All @@ -1235,7 +1238,7 @@ protected function ready() {

</div>

<footer class="merlin__content__footer merlin__content__footer--fullwidth<?php if ( empty( $links ) ) { ?> merlin__content__footer--nolinks<?php } ?>">
<footer class="merlin__content__footer merlin__content__footer--fullwidth <?php echo esc_attr( $links_class ); ?>">

<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="merlin__button merlin__button--blue merlin__button--fullwidth merlin__button--popin"><?php echo esc_html( $big_btn ); ?></a>

Expand Down

0 comments on commit db0705a

Please sign in to comment.