wip/tabs
This commit is contained in:
parent
860d33a922
commit
9ebdd74457
1 changed files with 10 additions and 2 deletions
12
build.py
12
build.py
|
@ -68,7 +68,7 @@ def main():
|
||||||
</head><body onload="main()"><header>
|
</head><body onload="main()"><header>
|
||||||
<!----------------------------------------------------------------------------->
|
<!----------------------------------------------------------------------------->
|
||||||
|
|
||||||
<input type="checkbox" onclick="swap()" checked />
|
<input type="checkbox" id="dark" onclick="swap()" />
|
||||||
<h1><a href="#home">Marc Beninca</a></h1>
|
<h1><a href="#home">Marc Beninca</a></h1>
|
||||||
|
|
||||||
<!----------------------------------------------------------------------------->
|
<!----------------------------------------------------------------------------->
|
||||||
|
@ -302,9 +302,13 @@ padding: 10px;
|
||||||
function check(tab) {{
|
function check(tab) {{
|
||||||
const tabs = tab.split('/')
|
const tabs = tab.split('/')
|
||||||
let id = 'tab'
|
let id = 'tab'
|
||||||
|
let element
|
||||||
for (tab of tabs) {{
|
for (tab of tabs) {{
|
||||||
id = `${{id}}/${{tab}}`
|
id = `${{id}}/${{tab}}`
|
||||||
document.getElementById(id).checked = true
|
element = document.getElementById(id)
|
||||||
|
if (element) {{
|
||||||
|
element.checked = true
|
||||||
|
}}
|
||||||
}}
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -326,6 +330,10 @@ function main() {{
|
||||||
check(tab)
|
check(tab)
|
||||||
push(tab)
|
push(tab)
|
||||||
}}
|
}}
|
||||||
|
const dark = document.getElementById('dark')
|
||||||
|
if (dark) {{
|
||||||
|
dark.checked = true
|
||||||
|
}}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
function swap() {{
|
function swap() {{
|
||||||
|
|
Loading…
Reference in a new issue