1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 18:28:22 +01:00
antd-web-apps/info/views/default/layout.ls
DanyLE a76942f2f3
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good
WIP: make code compatible with new SILK API
2023-04-26 18:51:03 +02:00

78 lines
2.6 KiB
Plaintext

<html>
<head>
<script type="text/javascript" src="<?=HTTP_ROOT?>/rst/gscripts/showdown.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/style.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<?lua
if not toc then
?>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" />
<?lua
end
?>
<script>
var switchTab = function(id, e)
{
var els = document.getElementsByClassName("container_active");
var tab = document.getElementById(id)
var tactiv = document.getElementsByClassName("toc_active");
if(els.length == 0) return;
if(!tab) return;
if(tactiv.length == 0) return;
els[0].className = "container";
tab.className = "container_active";
tactiv[0].className = "";
e.parentElement.className = "toc_active";
console.log('switch to ', id, e);
}
</script>
<title>Porfolio</title>
</head>
<body>
<?lua
local classname = "layout"
if not toc then
classname = "layoutprint"
if user then user:set("preview", true) end
end
?>
<div class="<?=classname?>">
<div class = "cv-content">
<?lua
if user then
user:render()
end
if __main__ then
__main__:render()
end
?>
<div class = "container_footer">
<h1 style="margin:0;"></h1>
<p style="text-align:right; padding:0; margin:0;color:#878887;">Powered by antd server, (C) 2017-<?=os.date("*t").year?> Xuan Sang LE</p>
</div>
</div>
<?lua
if toc then
toc:set("data", __main__:get("toc"))
toc:render()
end
?>
</div>
<script>
window.onload = function()
{
var els = document.getElementsByClassName("entry-description");
var converter = new showdown.Converter();
for(var i in els)
{
var text = els[i].innerHTML;
var html = converter.makeHtml(text);
els[i].innerHTML = html;
}
}
</script>
</body>
</html>