mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-12-27 09:58:20 +01:00
159 lines
6.7 KiB
Plaintext
159 lines
6.7 KiB
Plaintext
|
|
|
|
<?lua
|
|
local title = __main__:get("title")
|
|
local render = __main__:get("render")
|
|
local url = __main__:get("url")
|
|
local tags = __main__:get("tags")
|
|
local d3 = __main__:get("d3")
|
|
local cls = ""
|
|
if HEADER.mobile then
|
|
cls = "navmobile"
|
|
end
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title><?=title?></title>
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/ubuntu-regular.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/font-awesome.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/afx.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/assets/style.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/assets/github-markdown.css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://chat.iohub.dev/assets/quicktalk.css" />
|
|
<script src="https://chat.iohub.dev/assets/quicktalk.js"> </script>
|
|
|
|
<script src="<?=HTTP_ROOT?>/rst/afx.js"> </script>
|
|
<script src="<?=HTTP_ROOT?>/rst/gscripts/jquery-3.4.1.min.js"> </script>
|
|
<script src="<?=HTTP_ROOT?>/assets/main.js"></script>
|
|
<?lua if d3 then ?>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/6.5.0/d3.min.js" ></script>
|
|
<script src="https://d3js.org/d3-dispatch.v2.min.js"></script>
|
|
<script src="https://d3js.org/d3-quadtree.v2.min.js"></script>
|
|
<script src="https://d3js.org/d3-timer.v2.min.js"></script>
|
|
<script src="https://d3js.org/d3-force.v2.min.js"></script>
|
|
<script src="<?=HTTP_ROOT?>/assets/graph.js"></script>
|
|
<?lua end ?>
|
|
<meta property="og:image" content="" />
|
|
<?lua if render then ?>
|
|
<meta name="twitter:card" content="summary" />
|
|
<meta name="twitter:site" content="@blog.lxsang.me" />
|
|
<meta name="twitter:creator" content="@lexsang" />
|
|
<meta property="og:url" content="<?=url?>" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="<?=title?>" />
|
|
<meta property="og:description" content="<?=tags?>" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/hljs/github.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/katex/katex.min.css" />
|
|
<script src="<?=HTTP_ROOT?>/rst/hljs/highlight.pack.js"> </script>
|
|
<script src="<?=HTTP_ROOT?>/rst/hljs/highlightjs-line-numbers.min.js"> </script>
|
|
<script src="<?=HTTP_ROOT?>/rst/katex/katex.min.js"> </script>
|
|
<script src="<?=HTTP_ROOT?>/rst/katex/auto-render.min.js"> </script>
|
|
<?lua else ?>
|
|
<meta property="og:url" content="https://blog.lxsang.me" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="Xuan Sang LE's blog" />
|
|
<meta property="og:description" content="Blog Home" />
|
|
<?lua end ?>
|
|
<script>
|
|
|
|
<?lua if render then ?>
|
|
$(document).ready(function() {
|
|
var options = {
|
|
target: "quick_talk_comment_thread",
|
|
page: "desktop",
|
|
api_uri: "https://chat.iohub.dev/comment",
|
|
uri: "<?=url?>",
|
|
author: {
|
|
first: "mrsang",
|
|
last: "iohub.dev"
|
|
},
|
|
onload: function(){
|
|
renderMathInElement($("#desktop")[0]);
|
|
$('pre code').each(function(i, block) {
|
|
hljs.highlightBlock(block);
|
|
hljs.lineNumbersBlock(block);
|
|
});
|
|
}
|
|
};
|
|
new QuickTalk(options);
|
|
});
|
|
<?lua end ?>
|
|
window.twttr = (function(d, s, id) {
|
|
var js, fjs = d.getElementsByTagName(s)[0],
|
|
t = window.twttr || {};
|
|
if (d.getElementById(id)) return t;
|
|
js = d.createElement(s);
|
|
js.id = id;
|
|
js.src = "https://platform.twitter.com/widgets.js";
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
|
|
t._e = [];
|
|
t.ready = function(f) {
|
|
t._e.push(f);
|
|
};
|
|
|
|
return t;
|
|
}(document, "script", "twitter-wjs"));
|
|
|
|
// facebook
|
|
/*
|
|
(function(d, s, id) {
|
|
var js, fjs = d.getElementsByTagName(s)[0];
|
|
if (d.getElementById(id)) return;
|
|
js = d.createElement(s); js.id = id;
|
|
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12';
|
|
fjs.parentNode.insertBefore(js, fjs);
|
|
}(document, 'script', 'facebook-jssdk'));*/
|
|
|
|
/*(function() {
|
|
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
|
po.src = 'https://apis.google.com/js/plusone.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
|
})();*/
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="fb-root"></div>
|
|
|
|
<div id = "top">
|
|
<div id = "navbar" class = "<?=cls?>">
|
|
<div class = "logo"><a href = "https://lxsang.me"></a></div>
|
|
<ul>
|
|
<li><i class = "fa fa-home"></i><a href="<?=HTTP_ROOT?>">Home</a></li>
|
|
<?lua
|
|
if not HEADER.mobile then
|
|
?>
|
|
<li > <i class = "fa fa-globe"></i><a href = "/post/graph">Explore</a></li>
|
|
<li> <i class = "fa fa-paper-plane"></i><a href="#" onclick="subscribe('<?=HTTP_ROOT?>')">Subscribe</a></li>
|
|
<?lua end ?>
|
|
<li ><i class = "fa fa-address-card"></i><a href="https://info.lxsang.me" >Portfolio</a></li>
|
|
<li><i class = "fa fa-envelope"></i><a href="#" onclick="mailtoMe('<?=HTTP_ROOT?>')" >Contact</a></li>
|
|
</ul>
|
|
<?lua
|
|
if not HEADER.mobile then
|
|
?>
|
|
<input type = "text" class = "search-box"></input>
|
|
<div class= "search-icon"></div>
|
|
<?lua
|
|
end
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div id = "desktop">
|
|
<div id = "container">
|
|
<?lua
|
|
__main__:render()
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div id = "bottom">
|
|
Powered by antd server, (c) 2017 - <?=os.date("*t").year?> Dany LE
|
|
</div>
|
|
</body>
|
|
</html>
|