Skip to content

Commit 1f87feb

Browse files
committed
Minor style fixes & allow gutenberg block usage
1 parent 67f43b9 commit 1f87feb

8 files changed

Lines changed: 87 additions & 7 deletions

File tree

CHANGELOG.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- Allow gutenberg block usage
11+
- Minor style fixes across layouts
12+
1013
## [1.0.0] - 2026-06-17
1114

1215
- Create tms-theme-muumib2b from tms-theme-base

assets/styles/layouts/_call-to-action.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
/*
3333
* Specific styles if CTA is below hero
3434
*/
35-
.hero + .call-to-action {
35+
body.page-template-page-front-page .hero + .call-to-action.before-has-background-white:has(.shape-slot--top.border-shape--wave-top-reverse) {
3636
margin-top: $theme-spacing-two;
3737
padding-top: 0 !important;
3838

@@ -71,7 +71,7 @@ $_hero-bleed-colors: (
7171
);
7272

7373
@each $name, $color in $_hero-bleed-colors {
74-
.hero.has-background-#{$name} + .call-to-action {
74+
body.page-template-page-front-page .hero.has-background-#{$name} + .call-to-action.before-has-background-white:has(.shape-slot--top.border-shape--wave-top-reverse) {
7575
background-image: linear-gradient(
7676
to bottom,
7777
#{$color} 16rem,

assets/styles/layouts/_hero.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
max-height: 900px;
7474
height: 100%;
7575
object-fit: cover;
76-
object-position: bottom center;
76+
object-position: center;
7777
}
7878

7979
.hero-image--rounded img {

assets/styles/layouts/_image-banner.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@
2424

2525
.image-banner {
2626
padding: 0 !important;
27+
28+
&.is-align-full {
29+
width: 100%;
30+
}
2731
}

assets/styles/views/_page-exhibition-three.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
min-height: 600px;
77
}
88

9-
.image {
10-
@media (min-width: 768px) {
9+
.column.is-6-desktop > .image {
10+
@media (min-width: 768px) and (max-width: 2000px) {
1111
position: absolute;
1212
right: -25%;
1313
top: 0;

models/page-extend.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,45 @@ public function hero_image() : ?int {
3131
: null;
3232
}
3333

34+
/**
35+
* Check if the page has any Gutenberg block content.
36+
*
37+
* @return bool
38+
*/
39+
public function has_content() : bool {
40+
return \has_blocks( \get_the_ID() );
41+
}
42+
43+
/**
44+
* Check if page has a hero flexible content layout.
45+
*
46+
* @return bool
47+
*/
48+
public function has_hero_layout() : bool {
49+
$content = \get_field( 'components' ) ?? [];
50+
51+
if ( empty( $content ) || ! \is_array( $content ) ) {
52+
return false;
53+
}
54+
55+
$hero_layouts = [
56+
'hero',
57+
'hero_and_image_carousel',
58+
];
59+
60+
foreach ( $content as $layout ) {
61+
if ( empty( $layout['acf_fc_layout'] ) ) {
62+
continue;
63+
}
64+
65+
if ( \in_array( $layout['acf_fc_layout'], $hero_layouts, true ) ) {
66+
return true;
67+
}
68+
}
69+
70+
return false;
71+
}
72+
3473
/**
3574
* Get post siblings.
3675
*

partials/page.dust

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@
99
{>"views/page/page-hero" /}
1010
{/Page.hero_image}
1111

12+
{^Page.hero_image}
13+
{^Page.has_hero_layout}
14+
<section class="section pb-0">
15+
<div class="container">
16+
<div class="columns">
17+
<div class="column is-10 is-offset-1">
18+
<h1 class="entry__title mt-0 mb-8 has-line-height-tight has-text-centered ">
19+
{@title /}
20+
</h1>
21+
</div>
22+
</div>
23+
</div>
24+
</section>
25+
{/Page.has_hero_layout}
26+
{/Page.hero_image}
27+
28+
{?Page.has_content}
29+
<section class="section pt-0">
30+
<div class="container">
31+
<div class="columns">
32+
<div class="column is-10 is-offset-1">
33+
<div class="entry__content is-content-grid keep-vertical-spacing">
34+
{@content /}
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
</section>
40+
{/Page.has_content}
41+
1242
{>"ui/components" components=Page.components /}
1343
{/Page.is_password_protected_page}
1444
</main>

partials/shared/footer-inner.dust

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@
105105
<div class="column is-12 is-4-desktop mt-6 mt-0-desktop has-text-centered has-text-right-desktop">
106106
<a href="{brand_logo_url|url}" class="site-footer__tampere-vaakuna is-flex">
107107
<span class="is-sr-only">{Strings.s.footer.to_main_site|html}</span>
108-
{@image id=bottom_logo class="brand-logo" size="large" /}
109-
{@image id=bottom_second_logo class="brand-logo" size="large" /}
108+
{?bottom_logo}
109+
{@image id=bottom_logo class="brand-logo" size="large" /}
110+
{/bottom_logo}
111+
{?bottom_second_logo}
112+
{@image id=bottom_second_logo class="brand-logo" size="large" /}
113+
{/bottom_second_logo}
110114
</a>
111115
</div>
112116
</div>

0 commit comments

Comments
 (0)