(search params) remove title when display is pure

This commit is contained in:
Julien Calixte
2023-07-08 17:43:58 +02:00
parent 9cfc58f4ac
commit f6b67f9fdf
3 changed files with 13 additions and 1 deletions

View File

@@ -112,5 +112,6 @@
</section>
</section>
</main>
<script type="module" src="main.ts"></script>
</body>
</html>

11
main.ts Normal file
View File

@@ -0,0 +1,11 @@
type TPSSearchParams = {
display?: "pure" | "full"
}
const params = new URL(document.location.href).searchParams
const display = params.get("display")
if (display === "pure") {
document.querySelector("header")?.remove()
}

View File

@@ -23,7 +23,7 @@ main {
flex-direction: column;
justify-content: center;
gap: 0;
margin: 0 1rem;
margin: 1rem 1rem 0;
}
ul {