script
This commit is contained in:
parent
6a74eb8729
commit
a30516f846
1 changed files with 20 additions and 8 deletions
26
build.py
26
build.py
|
@ -16,7 +16,7 @@ def link(active: str, id: str, text: str) -> str:
|
|||
return str().join(items)
|
||||
|
||||
|
||||
def nav(active: str) -> str:
|
||||
def nav(active:str=None)->str:
|
||||
return f'''\
|
||||
<nav>
|
||||
{link(active, 'home', 'Home')}
|
||||
|
@ -45,7 +45,15 @@ def main():
|
|||
<title>Marc Beninca</title>
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
</head><body><header>
|
||||
</head><script>
|
||||
<!----------------------------------------------------------------------------->
|
||||
function main() {{
|
||||
if (! window.location.href.includes('#')) {{
|
||||
window.location.href+='#home';
|
||||
}}
|
||||
}}
|
||||
<!----------------------------------------------------------------------------->
|
||||
</script><body onload="main();"><header>
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
<h1><a href="#home">Marc Beninca</a></h1>
|
||||
|
@ -54,15 +62,19 @@ def main():
|
|||
</header><main>
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
{nav('home')}
|
||||
|
||||
<!----------------------------------------------------------------------------->
|
||||
|
||||
<section id="home">
|
||||
|
||||
{nav('home')}
|
||||
|
||||
Home
|
||||
<ul>
|
||||
<li><a href="https://linkedin.com/in/marc-beninca">LinkedIn</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Curriculum Vitæ</h2>
|
||||
<ul>
|
||||
<li><a href="cv.en.pdf">English</a></li>
|
||||
<li><a href="cv.fr.pdf">Français</a></li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in a new issue