−useless

This commit is contained in:
Marc Beninca 2023-07-01 10:19:04 +02:00
parent befcbfc8eb
commit 0b1097ce35

View file

@ -3,36 +3,13 @@
import os import os
import subprocess import subprocess
import rwx.io
def run(*args): def run(*args):
subprocess.call(args) subprocess.call(args)
def link(active:str, id:str, text:str)->str:
items = ['<a']
if (active == id):
items.append(' class="active"')
items.append(f' href="#{id}">{text}</a>')
return str().join(items)
def nav(active:str=None)->str:
return f'''\
<nav>
{link(active, 'main', 'main')}
{link(active, 'cv', 'CV')}
{link(active, 'git', 'Git')}
{link(active, 'health', 'Health')}
{link(active, 'id', 'Identity')}
{link(active, 'lib', 'LinkInBio')}
{link(active, 'music', 'Music')}
{link(active, 'pubnix', 'PubNix')}
{link(active, 'thesis', 'Thesis')}
{link(active, 'vegan', 'Vegan')}
{link(active, 'others', 'others…')}
</nav>
'''
def main(): def main():
style = 'css' style = 'css'
script = 'js' script = 'js'