Skip to content

Commit 6473e52

Browse files
committed
feat(layout): add noisy overlay controlled by layout service
Introduce a conditional noisy overlay div in application template that renders when `shouldShowNoisyOverlay` is true. Add a corresponding getter in the layout service, currently mirroring `shouldShowHeader`. This sets up infrastructure for future UI enhancements requiring an overlay effect.
1 parent 750f912 commit 6473e52

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

app/services/layout.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ export default class LayoutService extends Service {
1919
return true;
2020
}
2121
}
22+
23+
get shouldShowNoisyOverlay(): boolean {
24+
return this.shouldShowHeader; // Same for now
25+
}
2226
}

app/templates/application.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
{{page-title "CodeCrafters"}}
44

5-
<div class="min-h-screen {{if this.darkMode.isEnabled 'dark bg-gray-950' 'bg-gray-50'}}" id="application-container" data-test-application-container>
5+
<div class="min-h-screen relative {{if this.darkMode.isEnabled 'dark bg-gray-950' 'bg-gray-50'}}" id="application-container" data-test-application-container>
66
{{! TODO: revive once https://github.com/cibernox/ember-basic-dropdown/issues/931 is out }}
77
{{! <BasicDropdownWormhole /> }}
88
<div id="ember-basic-dropdown-wormhole"></div>
99

10+
{{#if this.layout.shouldShowNoisyOverlay}}
11+
<div class="absolute inset-0 z-10 noisy-overlay pointer-events-none"></div>
12+
{{/if}}
13+
1014
{{#if this.layout.shouldShowHeader}}
1115
<Header />
1216
{{/if}}

0 commit comments

Comments
 (0)