Skip to content

Commit c8a29a7

Browse files
Allow hero route full width
1 parent 4378548 commit c8a29a7

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

css/common.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ main {
3333
width: 100%;
3434
}
3535

36+
main.full-width {
37+
max-width: none;
38+
margin: 0;
39+
}
40+
3641
footer {
3742
bottom: 0;
3843
width: 100%;

js/components/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default async (hostComponent, baseUrl = config.BASE_URL) => {
4242
*/
4343
const loadRoute = async (url) => {
4444
try {
45+
hostComponent.classList.remove('full-width');
4546
const routePath =
4647
url === '/' || url === '' ? `${baseUrl}/routes/index.js` : `${baseUrl}/routes${url}.js`;
4748

js/routes/heros.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default (hostComponent) => {
2+
hostComponent.classList.add('full-width');
23
// Define HTML structure with data attributes directly in the template
34
const indexHTML = `
45
<div data-component="fullscreen-hero"

0 commit comments

Comments
 (0)