Skip to content

Commit

Permalink
Law commission - dynamic sizes (#730)
Browse files Browse the repository at this point in the history
* Adjust focus layer

* Dynamic background sizes
  • Loading branch information
wilson1000 authored Oct 9, 2024
1 parent ebb143f commit 70a0c9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

.image {
background-size: 94%;
background-size: inherit;
background-repeat: no-repeat;
background-position: 1px 12px;
width: 38px;
Expand Down
5 changes: 3 additions & 2 deletions public/app/themes/clarity/src/components/c-logo-bar/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
$activeAgency = $oAgency->getCurrentAgency();
$header_logo = get_field(get_intranet_code() .'_header_logo', 'option');
$logo = get_stylesheet_directory_uri() . '/dist/images/moj_logo_header.png';
$size = "94%";

# If law commission, use different logo
if ($activeAgency['shortcode'] === 'law-commission') {
$logo = get_stylesheet_directory_uri() . '/dist/images/lawcomms_logo_new.jpg';
$size = "100%";
}

# If header logo is set, use that instead
Expand All @@ -22,7 +23,7 @@
<section class="c-logo-bar">
<div class="u-wrapper">
<div class="u-wrapper__stack--left">
<a href="/" rel="home">
<a href="/" rel="home" style="background-size: <?= $size ?>">
<span class="image" style="background-image: url('<?= $logo ?>')">&nbsp;</span>
<span class="agency-title l-half-section"><?= $activeAgency['label'] ?></span>
</a>
Expand Down

0 comments on commit 70a0c9f

Please sign in to comment.