mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 18:28:22 +01:00
173 lines
7.4 KiB
Plaintext
173 lines
7.4 KiB
Plaintext
|
|
|
|
<?lua
|
|
local chat_uri="https://chat.iohub.dev/comment"
|
|
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="https://fonts.googleapis.com/css?family=Ubuntu:regular,bold&subset=Latin" />
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
|
<link rel="stylesheet" type="text/css" href="<?=HTTP_ROOT?>/assets/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>
|
|
|
|
<!--link rel="stylesheet" type="text/css" href="https://app.iohub.dev/next/talk/assets/quicktalk.css" />
|
|
<script src="https://app.iohub.dev/next/talk/assets/quicktalk.js"> </script-->
|
|
|
|
<script src="<?=HTTP_ROOT?>/assets/afx.js"> </script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.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.iohub.dev" />
|
|
<meta name="twitter:creator" content="@DanyLE" />
|
|
<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.iohub.dev" />
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:title" content="Dany 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: "<?=chat_uri?>",
|
|
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://iohub.dev"></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 = "<?=HTTP_ROOT?>/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.iohub.dev" >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
|
|
?>
|
|
<form class="search-form" method="get" action="<?=HTTP_ROOT?>/post/search">
|
|
<input type = "text" class = "search-box" name="q"></input>
|
|
<input type="submit" hidden ></input>
|
|
</form>
|
|
<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.
|
|
<?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
|
|
?>
|
|
</div>
|
|
</body>
|
|
</html>
|