2018-09-05 16:56:04 +02:00
|
|
|
|
|
|
|
|
2018-02-25 02:31:13 +01:00
|
|
|
<?lua
|
2018-09-05 16:56:04 +02:00
|
|
|
local title = __main__:get("title")
|
|
|
|
local render = __main__:get("render")
|
|
|
|
local url = __main__:get("url")
|
|
|
|
local tags = __main__:get("tags")
|
2021-02-17 12:59:42 +01:00
|
|
|
local d3 = __main__:get("d3")
|
2018-02-25 13:54:37 +01:00
|
|
|
local cls = ""
|
|
|
|
if HEADER.mobile then
|
|
|
|
cls = "navmobile"
|
|
|
|
end
|
2018-02-25 02:31:13 +01:00
|
|
|
?>
|
2018-02-23 19:52:10 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2018-02-25 02:31:13 +01:00
|
|
|
<title><?=title?></title>
|
2018-02-23 19:52:10 +01:00
|
|
|
<meta charset="UTF-8">
|
2018-03-18 14:22:15 +01:00
|
|
|
|
2018-02-23 19:52:10 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2018-09-05 16:56:04 +02:00
|
|
|
<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" />
|
2020-09-18 13:17:43 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/rst/afx.css" />
|
2018-09-05 16:56:04 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/assets/style.css" />
|
2020-12-09 11:22:51 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/assets/github-markdown.css" />
|
2020-09-22 16:18:12 +02:00
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://chat.iohub.dev/assets/quicktalk.css" />
|
|
|
|
<script src="https://chat.iohub.dev/assets/quicktalk.js"> </script>
|
|
|
|
|
2020-09-18 13:17:43 +02:00
|
|
|
<script src="<?=HTTP_ROOT?>/rst/afx.js"> </script>
|
2021-04-22 09:23:42 +02:00
|
|
|
<script src="<?=HTTP_ROOT?>/rst/gscripts/jquery-3.4.1.min.js"> </script>
|
2018-09-05 19:07:37 +02:00
|
|
|
<script src="<?=HTTP_ROOT?>/assets/main.js"></script>
|
2021-02-17 12:59:42 +01:00
|
|
|
<?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 ?>
|
2018-06-26 13:45:24 +02:00
|
|
|
<meta property="og:image" content="" />
|
2018-03-15 23:31:31 +01:00
|
|
|
<?lua if render then ?>
|
2018-06-26 10:56:53 +02:00
|
|
|
<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?>" />
|
2018-06-26 13:45:24 +02:00
|
|
|
<meta property="og:type" content="article" />
|
2018-06-26 10:56:53 +02:00
|
|
|
<meta property="og:title" content="<?=title?>" />
|
|
|
|
<meta property="og:description" content="<?=tags?>" />
|
2018-09-05 16:56:04 +02:00
|
|
|
<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>
|
2018-06-26 10:56:53 +02:00
|
|
|
<?lua else ?>
|
|
|
|
<meta property="og:url" content="https://blog.lxsang.me" />
|
2018-06-26 13:45:24 +02:00
|
|
|
<meta property="og:type" content="article" />
|
2018-06-26 10:56:53 +02:00
|
|
|
<meta property="og:title" content="Xuan Sang LE's blog" />
|
2018-09-05 16:56:04 +02:00
|
|
|
<meta property="og:description" content="Blog Home" />
|
2018-03-15 23:31:31 +01:00
|
|
|
<?lua end ?>
|
|
|
|
<script>
|
2018-03-15 23:38:32 +01:00
|
|
|
|
2018-03-15 23:31:31 +01:00
|
|
|
<?lua if render then ?>
|
2018-03-15 23:38:32 +01:00
|
|
|
$(document).ready(function() {
|
2020-09-22 16:18:12 +02:00
|
|
|
var options = {
|
|
|
|
target: "quick_talk_comment_thread",
|
2020-12-09 11:51:59 +01:00
|
|
|
page: "desktop",
|
2020-09-22 16:18:12 +02:00
|
|
|
api_uri: "https://chat.iohub.dev/comment",
|
|
|
|
uri: "<?=url?>",
|
2020-09-22 19:50:59 +02:00
|
|
|
author: {
|
|
|
|
first: "mrsang",
|
|
|
|
last: "iohub.dev"
|
|
|
|
},
|
2020-09-22 17:13:42 +02:00
|
|
|
onload: function(){
|
|
|
|
renderMathInElement($("#desktop")[0]);
|
|
|
|
$('pre code').each(function(i, block) {
|
|
|
|
hljs.highlightBlock(block);
|
|
|
|
hljs.lineNumbersBlock(block);
|
|
|
|
});
|
|
|
|
}
|
2020-09-22 16:18:12 +02:00
|
|
|
};
|
|
|
|
new QuickTalk(options);
|
2018-03-15 23:38:32 +01:00
|
|
|
});
|
2018-03-15 23:31:31 +01:00
|
|
|
<?lua end ?>
|
2018-02-25 16:11:37 +01:00
|
|
|
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
|
2020-06-05 20:00:42 +02:00
|
|
|
/*
|
2018-02-25 16:11:37 +01:00
|
|
|
(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);
|
2020-06-05 20:00:42 +02:00
|
|
|
}(document, 'script', 'facebook-jssdk'));*/
|
2018-02-25 16:11:37 +01:00
|
|
|
|
2018-06-05 15:40:15 +02:00
|
|
|
/*(function() {
|
2018-02-25 16:11:37 +01:00
|
|
|
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);
|
2018-06-05 15:40:15 +02:00
|
|
|
})();*/
|
2018-02-23 19:52:10 +01:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2018-02-25 16:11:37 +01:00
|
|
|
<div id="fb-root"></div>
|
|
|
|
|
2018-02-23 19:52:10 +01:00
|
|
|
<div id = "top">
|
2018-02-25 13:54:37 +01:00
|
|
|
<div id = "navbar" class = "<?=cls?>">
|
2018-02-23 19:52:10 +01:00
|
|
|
<div class = "logo"><a href = "https://lxsang.me"></a></div>
|
|
|
|
<ul>
|
2018-09-05 16:56:04 +02:00
|
|
|
<li><i class = "fa fa-home"></i><a href="<?=HTTP_ROOT?>">Home</a></li>
|
2018-02-25 13:54:37 +01:00
|
|
|
<?lua
|
|
|
|
if not HEADER.mobile then
|
|
|
|
?>
|
2021-02-17 12:59:42 +01:00
|
|
|
<li > <i class = "fa fa-globe"></i><a href = "/post/graph">Explore</a></li>
|
2018-09-05 19:07:37 +02:00
|
|
|
<li> <i class = "fa fa-paper-plane"></i><a href="#" onclick="subscribe('<?=HTTP_ROOT?>')">Subscribe</a></li>
|
2018-02-25 13:54:37 +01:00
|
|
|
<?lua end ?>
|
2021-02-17 12:59:42 +01:00
|
|
|
<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>
|
2018-02-23 19:52:10 +01:00
|
|
|
</ul>
|
2018-02-25 13:54:37 +01:00
|
|
|
<?lua
|
|
|
|
if not HEADER.mobile then
|
|
|
|
?>
|
2018-02-23 19:52:10 +01:00
|
|
|
<input type = "text" class = "search-box"></input>
|
|
|
|
<div class= "search-icon"></div>
|
2018-02-25 13:54:37 +01:00
|
|
|
<?lua
|
|
|
|
end
|
|
|
|
?>
|
2018-02-23 19:52:10 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-03-15 22:36:05 +01:00
|
|
|
<div id = "desktop">
|
2018-02-23 19:52:10 +01:00
|
|
|
<div id = "container">
|
2018-09-05 16:56:04 +02:00
|
|
|
<?lua
|
|
|
|
__main__:render()
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id = "bottom">
|
2022-10-18 13:35:33 +02:00
|
|
|
Powered by antd server, (c) 2017 - <?=os.date("*t").year?> Dany LE.
|
|
|
|
<?lua
|
|
|
|
if not HEADER.mobile then
|
|
|
|
?>
|
|
|
|
This site does not use cookie, but some third-party contents (e.g. Youtube, Twitter) may do.
|
|
|
|
<?lua
|
|
|
|
end
|
|
|
|
?>
|
2018-09-05 16:56:04 +02:00
|
|
|
</div>
|
|
|
|
</body>
|
2021-04-22 09:23:42 +02:00
|
|
|
</html>
|