1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-30 19:18:21 +01:00
antd-web-apps/info/views/default/toc/index.ls

17 lines
345 B
Plaintext
Raw Normal View History

<?lua
if HEADER.mobile then return end
if not data then return end
?>
<div class = "cv-toc">
<ul>
<?lua
2018-10-19 11:20:56 +02:00
local active = "toc_active"
for k, v in pairs(data) do
?>
2018-10-19 11:20:56 +02:00
<li class="<?=active?>"><a href=<?='"#toc'..v[2]..'"'?> onclick='switchTab("toc<?=v[2]?>", this)' ><?=v[1]?></a></li>
<?lua
2018-10-19 11:20:56 +02:00
active = ''
end
?>
</ul>
</div>