Files
OpenFrontIO/src/client/components/MainLayout.ts
T
Evan 5396931909 add footer ad to homepage (#3385)
Ad a footer ad to the bottom of the homescreen


<img width="1568" height="984" alt="Screenshot 2026-03-08 at 2 28 05 PM"
src="https://github.com/user-attachments/assets/a8009e37-778e-47f0-add8-42885d4f0c11"
/>

<img width="716" height="834" alt="Screenshot 2026-03-08 at 2 28 56 PM"
src="https://github.com/user-attachments/assets/5e910d6a-5019-4e06-ad9a-8980470371ca"
/>

<img width="862" height="834" alt="Screenshot 2026-03-08 at 2 29 31 PM"
src="https://github.com/user-attachments/assets/85e87052-ff7a-4266-8a2d-432831e3c7d6"
/>




## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
2026-03-09 09:31:02 -07:00

33 lines
990 B
TypeScript

import { LitElement, html } from "lit";
import { customElement } from "lit/decorators.js";
@customElement("main-layout")
export class MainLayout extends LitElement {
private _initialChildren: Node[] = [];
createRenderRoot() {
return this;
}
connectedCallback() {
if (this._initialChildren.length === 0 && this.childNodes.length > 0) {
this._initialChildren = Array.from(this.childNodes);
}
super.connectedCallback();
}
render() {
return html`
<main
class="relative [.in-game_&]:hidden flex flex-col flex-1 overflow-hidden w-full px-0 lg:px-[clamp(1.5rem,3vw,3rem)] pt-0 lg:pt-[clamp(0.75rem,1.5vw,1.5rem)] pb-0 lg:pb-[clamp(0.375rem,0.75vw,0.75rem)]"
>
<div
class="w-full lg:max-w-[20cm] 2xl:max-w-[24cm] mx-auto flex flex-col flex-1 gap-0 lg:gap-[clamp(1.5rem,3vw,3rem)] overflow-y-auto overflow-x-hidden sm:px-4 lg:px-0"
>
${this._initialChildren}
</div>
</main>
`;
}
}