refactor: 修改英文nas相关

This commit is contained in:
2025-04-15 14:38:34 +08:00
parent 473b84cd11
commit a7d68b57e5
10 changed files with 183 additions and 81 deletions

View File

@@ -2,18 +2,15 @@
<div class="headcenter">
<img
class="logico"
style="cursor:pointer;"
src="__PUBLIC__/web/images/logo_nas.png"
onclick="location.href='{:url(\'TopsNas/index\')}'"
/>
style="cursor:pointer;width: 13rem;height: 2.8rem;"
src="__PUBLIC__/web/images/newlogo_nas.png" />
<nav class="headnav">
{volist name="nav_header" id="vo"}
<a
class="navitem"
href="{$vo.url}" {if condition="$vo.is_new_window_open"}target="_blank"{/if}
>
{$vo.name}
</a>
<a
class="navitem"
href="{$vo.url}" {if condition="$vo.is_new_window_open" }target="_blank" {/if}>
{$vo.name}
</a>
{/volist}
</nav>
</div>
@@ -21,8 +18,9 @@
<script type="text/javascript">
document.querySelectorAll('.navitem').forEach(function(it) {
it.classList.remove('hover')
if (location.pathname.endsWith(it.getAttribute('href'))) {
var attr = it.getAttribute('href')
if (location.href == attr || location.pathname.endsWith(attr)) {
it.classList.add('hover')
}
})
</script>
</script>