New features for footer menu

This commit is contained in:
Dita Aji Pratama 2025-05-30 15:14:42 +07:00
parent 29701cc058
commit bf206acad8
3 changed files with 23 additions and 5 deletions

View File

@ -21,6 +21,23 @@ menu = {
"href":"https://costapy.ditaajipratama.net", "href":"https://costapy.ditaajipratama.net",
"roles":["guest"] "roles":["guest"]
} }
],
"footer": [
{
"name":"Privacy",
"target":"_self",
"href":"/privacy"
},
{
"name":"Terms",
"target":"_self",
"href":"/terms"
},
{
"name":"Contact",
"target":"_self",
"href":"/contact"
}
] ]
} }
} }

View File

@ -38,6 +38,7 @@ class main:
}, },
footer = Template(params["mako"]["website"]['footer']).render( footer = Template(params["mako"]["website"]['footer']).render(
copyright = copyright, copyright = copyright,
menu = globalvar.menu['public']['footer'],
), ),
container = Template(params["mako"]["website"]['container']).render( container = Template(params["mako"]["website"]['container']).render(
greeting = greeting greeting = greeting

View File

@ -3,11 +3,11 @@
<div class="row align-items-center justify-content-between flex-column flex-sm-row"> <div class="row align-items-center justify-content-between flex-column flex-sm-row">
<div class="col-auto"><div class="small m-0 text-white">${copyright}</div></div> <div class="col-auto"><div class="small m-0 text-white">${copyright}</div></div>
<div class="col-auto"> <div class="col-auto">
<a class="link-light small" href="#!">Privacy</a> % for item in menu:
<span class="text-white mx-1">&middot;</span> <a class="link-light small" href="${item['href']}" target="${item['target']}" style="margin-left:20px;">
<a class="link-light small" href="#!">Terms</a> ${item['name']}
<span class="text-white mx-1">&middot;</span> </a>
<a class="link-light small" href="#!">Contact</a> % endfor
</div> </div>
</div> </div>
</div> </div>