重新设计为阿里云风格
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2026-01-10 16:59:58 +08:00
parent 228aec9339
commit a5323e15a5
4 changed files with 370 additions and 38 deletions

View File

@@ -66,41 +66,66 @@
{if isset($item.children) && !empty($item.children)}
<div class="nav-cont-menu mega-menu animated">
<div class="nav-content">
{foreach $item.children as $child}
{if isset($child.children) && !empty($child.children)}
<div class="nav-category">
<a href="{if !empty($child.file_address)}{$child.file_address}{else/}javascript:;{/if}"
class="nav-category-header" {if !empty($child.blank)}target="_blank" {/if}>
{php}
// 检查是否有包含三级菜单的二级项
$hasThirdLevel = false;
foreach ($item['children'] as $child) {
if (isset($child['children']) && !empty($child['children'])) {
$hasThirdLevel = true;
break;
}
}
{/php}
{if $hasThirdLevel}
<!-- 左侧二级菜单栏 -->
<div class="nav-left-sidebar">
{foreach $item.children as $childIndex=>$child}
{if isset($child.children) && !empty($child.children)}
<div class="nav-category-item" data-category-index="{$childIndex}">
{if !empty($child.icon)}
<div class="nav-category-icon">
<span class="category-icon">
<img src="{$child.icon}" alt="{$child.name}">
</div>
</span>
{/if}
<span class="nav-category-name">{$child.name}</span>
{if !empty($child.description)}
<span class="nav-category-desc">{$child.description}</span>
{/if}
<div class="nav-category-info">
<div class="nav-category-title">{$child.name}</div>
{if !empty($child.description)}
<div class="nav-category-desc">{$child.description}</div>
{/if}
</div>
</a>
<div class="nav-third-level">
{foreach $child.children as $grandchild}
<div class="nav-third-item">
<a href="{if !empty($grandchild.file_address)}{$grandchild.file_address}{else/}javascript:;{/if}"
class="nav-third-link" {if !empty($grandchild.blank)}target="_blank" {/if}>
<span class="nav-third-name">{$grandchild.name}</span>
{if !empty($grandchild.description)}
<span class="nav-third-desc">{$grandchild.description}</span>
{/if}
</a>
</div>
{/foreach}
</div>
{/if}
{/foreach}
</div>
{else /}
<a href="{if !empty($child.file_address)}{$child.file_address}{else/}javascript:;{/if}" {if
!empty($child.blank)}target="_blank" {/if} style="text-decoration: none;">
<div class="nav-item-box">
<!-- 右侧三级菜单区域 -->
<div class="nav-right-content">
{foreach $item.children as $childIndex=>$child}
{if isset($child.children) && !empty($child.children)}
<div class="nav-third-panel" data-panel-index="{$childIndex}">
<div class="nav-third-title">{$child.name}</div>
<div class="nav-third-grid">
{foreach $child.children as $grandchild}
<div class="nav-third-item">
<a href="{if !empty($grandchild.file_address)}{$grandchild.file_address}{else/}javascript:;{/if}"
class="nav-third-link" {if !empty($grandchild.blank)}target="_blank" {/if}>
<span class="nav-third-name">{$grandchild.name}</span>
{if !empty($grandchild.description)}
<span class="nav-third-desc">{$grandchild.description}</span>
{/if}
</a>
</div>
{/foreach}
</div>
</div>
{/if}
{/foreach}
</div>
{else}
<!-- 无三级菜单,使用旧版样式 -->
<div class="nav-left-sidebar">
{foreach $item.children as $child}
<a href="{if !empty($child.file_address)}{$child.file_address}{else/}javascript:;{/if}" class="nav-item-box"
{if !empty($child.blank)}target="_blank" {/if}>
{if !empty($child.icon)}
<img src="{$child.icon}" alt="{$child.name}">
{/if}
@@ -110,10 +135,10 @@
<div class="desc">{$child.description}</div>
{/if}
</div>
</div>
</a>
</a>
{/foreach}
</div>
{/if}
{/foreach}
</div>
</div>
{else /}