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

173 lines
7.4 KiB
Plaintext
Raw Normal View History

2018-09-05 16:56:04 +02:00
2018-02-25 02:31:13 +01:00
<?lua
local chat_uri="https://chat.iohub.dev/comment"
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">
<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" />
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>
<!--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-->
2020-09-22 16:18:12 +02:00
<script src="<?=HTTP_ROOT?>/assets/afx.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.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.iohub.dev" />
<meta name="twitter:creator" content="@DanyLE" />
2018-06-26 10:56:53 +02:00
<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.iohub.dev" />
2018-06-26 13:45:24 +02:00
<meta property="og:type" content="article" />
<meta property="og:title" content="Dany 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",
api_uri: "<?=chat_uri?>",
2020-09-22 16:18:12 +02:00
uri: "<?=url?>",
2020-09-22 19:50:59 +02:00
author: {
first: "mrsang",
last: "iohub.dev"
},
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?>">
<div class = "logo"><a href = "https://iohub.dev"></a></div>
2018-02-23 19:52:10 +01:00
<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
?>
<li > <i class = "fa fa-globe"></i><a href = "<?=HTTP_ROOT?>/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 ?>
<li ><i class = "fa fa-address-card"></i><a href="https://info.iohub.dev" >Portfolio</a></li>
2021-02-17 12:59:42 +01:00
<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
?>
<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>
2018-02-23 19:52:10 +01:00
<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>