1
0
Fork 0

Toggle header with checkbox

This commit is contained in:
Alex Kotov 2023-08-29 19:46:32 +04:00
parent b4a1f5a0a4
commit e7bb984f45
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 13 additions and 0 deletions

View file

@ -13,6 +13,7 @@
</head>
<body>
<header class="header">
<input id="header-toggle" type="checkbox" checked/>
<div class="header-top container-fluid">
<div>
<img src="favicon.ico"/>&nbsp;&nbsp;{{title|safe}}

View file

@ -18,6 +18,18 @@ small {
border: 0;
}
#header-toggle {
position: absolute;
top: 8px;
right: 8px;
}
#header-toggle:checked ~ .header-bottom {
display: block;
}
#header-toggle:not(:checked) ~ .header-bottom {
display: none;
}
.header {
background-color: #aa1e55;
}