−useless
This commit is contained in:
parent
befcbfc8eb
commit
0b1097ce35
1 changed files with 2 additions and 25 deletions
27
build.py
27
build.py
|
@ -3,36 +3,13 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
import rwx.io
|
||||
|
||||
|
||||
def run(*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():
|
||||
style = 'css'
|
||||
script = 'js'
|
||||
|
|
Loading…
Reference in a new issue