49 lines
1.5 KiB
HTML
49 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Title</title>
|
|
</head>
|
|
<body>
|
|
<style>
|
|
:root {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
padding: 5px;
|
|
width: 99%;
|
|
height: 98%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: #000;
|
|
background-color: #fff;
|
|
}
|
|
body.dark {
|
|
color: #dfdfdf;
|
|
background-color: #282828;
|
|
}
|
|
h1, h4 {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: sans-serif;
|
|
}
|
|
h1 { font-size: 2.5rem; margin-bottom: 5px !important; }
|
|
h4 { font-size: 1.1rem; }
|
|
</style>
|
|
<h1>Title</h1>
|
|
<h4>Text</h4>
|
|
<script>
|
|
let h1 = document.querySelector('h1');
|
|
let h4 = document.querySelector('h4');
|
|
h1.textContent = (location.search.match(/[?&]title=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
|
h4.textContent = (location.search.match(/[?&]text=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
|
if (location.search.match(/[?&]theme=dark/))
|
|
document.body.classList.add('dark');
|
|
</script>
|
|
</body>
|
|
</html>
|