style and accessability
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#2e3440">
|
||||
@@ -13,7 +13,7 @@
|
||||
<body class="dark">
|
||||
<h1>{title}</h1>
|
||||
<div class="theme">
|
||||
<select onchange="setTheme(event)">
|
||||
<select aria-label="Theme" onchange="setTheme(event)">
|
||||
<option value="darker">Light-on-Black</option>
|
||||
<option value="dark" selected>Light-on-Dark</option>
|
||||
<option value="light">Dark-on-White</option>
|
||||
@@ -25,27 +25,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function setTheme(e) {{
|
||||
const theme = e.currentTarget.value;
|
||||
function setTheme(e) {{
|
||||
const theme = e.currentTarget.value;
|
||||
|
||||
document.body.className = theme;
|
||||
document.body.className = theme;
|
||||
|
||||
let color;
|
||||
switch (theme) {{
|
||||
case "dark":
|
||||
color = "#2e3440";
|
||||
break;
|
||||
case "light":
|
||||
color = "#ffffff";
|
||||
break;
|
||||
case "darker":
|
||||
default:
|
||||
color = "#000000";
|
||||
break;
|
||||
}}
|
||||
let color;
|
||||
switch (theme) {{
|
||||
case "dark":
|
||||
color = "#2e3440";
|
||||
break;
|
||||
case "light":
|
||||
color = "#ffffff";
|
||||
break;
|
||||
case "darker":
|
||||
default:
|
||||
color = "#000000";
|
||||
break;
|
||||
}}
|
||||
|
||||
document.getElementsByName("theme-color")[0].content = color;
|
||||
}}
|
||||
document.getElementsByName("theme-color")[0].content = color;
|
||||
}}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#2e3440">
|
||||
|
||||
16
site.css
16
site.css
@@ -24,9 +24,11 @@ body {
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 28px;
|
||||
font-weight: 800;
|
||||
font-size: 3rem;
|
||||
font-weight: 400;
|
||||
hyphens: auto;
|
||||
margin: 32px auto;
|
||||
max-width: 40rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -43,10 +45,10 @@ h1 {
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
margin: 0;
|
||||
max-width: 40em;
|
||||
max-width: 40rem;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
@@ -57,8 +59,8 @@ img {
|
||||
|
||||
label,
|
||||
input {
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user