Skip to content

Commit

Permalink
remove height 100vh if running in an iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmars committed Dec 1, 2024
1 parent 5995923 commit c8b35dd
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 30 deletions.
1 change: 1 addition & 0 deletions docs/assets/main-19qKFKJm.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/assets/main-8RQKjc-r.css

This file was deleted.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/auto/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/commercial_bank/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/comms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/energy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/gov/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/health_care/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/health_payer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/health_pharma/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/health_provider/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/insurance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/manufacturing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/retail_bank/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/travel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions docs/wealth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
document.write('<script src="./i18n/lang-' + settings.i18n.languages[i] + '.js"><\/script>');
}
</script>
<script type="module" crossorigin src="../assets/main-C17xZuhk.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-8RQKjc-r.css">
<script type="module" crossorigin src="../assets/main-BcE_9p0V.js"></script>
<link rel="stylesheet" crossorigin href="../assets/main-19qKFKJm.css">
</head>

<body>
Expand Down
6 changes: 6 additions & 0 deletions src/assets/css/_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
flex-flow: column;
}

.app-iframe > .front,
.app-iframe > .form,
.app-iframe > .offer {
height:auto;
}

.hero-wrap a {
width: 150px;
background: #FFF;
Expand Down
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ const app = createApp(MainPage);

// Resize observer for sending the height of the iframe to the parent
if(window.parent) {
const appEl = document.getElementById('app');
if(appEl) {
appEl.classList.add('app-iframe');
}
const onResize = () => {
// Obviously you can format your data object however you want
window.parent.postMessage({
Expand Down

0 comments on commit c8b35dd

Please sign in to comment.