1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 10:18:21 +01:00
antd-web-apps/info/views/default/layout.ls

78 lines
2.6 KiB
Plaintext
Raw Normal View History

<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
2018-09-05 16:56:04 +02:00
<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" />
2018-09-11 10:35:02 +02:00
<?lua
if not toc then
?>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" />
2018-09-11 10:35:02 +02:00
<?lua
end
?>
2018-10-19 11:20:56 +02:00
<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>
2018-09-11 10:35:02 +02:00
<?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
2018-09-05 16:56:04 +02:00
if user then
user:render()
end
2018-09-05 16:56:04 +02:00
if __main__ then
__main__:render()
end
?>
2018-10-19 11:20:56 +02:00
<div class = "container_footer">
<h1 style="margin:0;"></h1>
2020-06-22 22:14:52 +02:00
<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
2018-09-05 16:56:04 +02:00
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>