[init] initial commit
This commit is contained in:
17
_includes/about/en.md
Normal file
17
_includes/about/en.md
Normal file
@ -0,0 +1,17 @@
|
||||
**Hi, my friend, welcome visiting my blog site.**
|
||||
|
||||
## About ME
|
||||
|
||||
This blogger is from Shandong, and currently working in Fujian, who loves poring over many computer things while he himself is not so professional. Privately I think that life lies in finding something to do, because life is so boring if you just do one thing all the time. With regards to my non-professionality, sometimes I have to go with trial and error.
|
||||
|
||||
## About EDU&JOB
|
||||
|
||||
- 2011.09 ~ 2015.07:Xi'an-Northwestern Polytechnical University
|
||||
- 2015.09 ~ 2018.01:Tianjin-Tianjin University
|
||||
- 2018.01 ~ 2019.01:Wuxi-CSC Sony R&D Department
|
||||
- 2019.03 ~ 2021.07:Ji'nan-Inspur Electronic Information Co.,Ltd
|
||||
- 2021.07 ~ 2022.12:Xiamen-China Telecom Cloud
|
||||
|
||||
## About FUTURE
|
||||
|
||||
Hoping living together with my family as soon as possible, hoping getting married with Miss Right as fast as I can, hoping covid-19 vanishing like it has never appeared, and hoping everything goes well and the future would be promising!
|
17
_includes/about/zh.md
Normal file
17
_includes/about/zh.md
Normal file
@ -0,0 +1,17 @@
|
||||
**你好,我的朋友,欢迎来到诲之的博客。**
|
||||
|
||||
## 关于博主
|
||||
|
||||
博主籍贯山东,目前在福建,是一个又菜又爱折腾的人。私以为生命在于折腾,生命不息,折腾不止,不然生活就少了很多乐趣。非科班,却又对IT类的技术相关非常感兴趣,所以大部分都是在试错中摸索前行。
|
||||
|
||||
## 个人履历
|
||||
|
||||
- 2011.09 ~ 2015.07:西安-西北工业大学
|
||||
- 2015.09 ~ 2018.01:天津-天津大学
|
||||
- 2018.01 ~ 2019.01:无锡-CSC索尼研发部
|
||||
- 2019.03 ~ 2021.07:济南-浪潮信息项目管理部
|
||||
- 2021.07 ~ 2022.12:厦门-CTC天翼研发部
|
||||
|
||||
## 未来期许
|
||||
|
||||
希望和家人早点团聚,共同生活;希望赶快结婚,筑建自己的小窝;希望让疫情不在肆虐,凭空消失。总的来说,希望未来诸事顺遂,美好可期!
|
28
_includes/featured-tags.html
Normal file
28
_includes/featured-tags.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% comment %}
|
||||
@param {boolean} bottom - bottom will render <hr>
|
||||
{% endcomment %}
|
||||
|
||||
{% if site.featured-tags %}
|
||||
<section>
|
||||
{% if include.bottom %}
|
||||
<hr class="hidden-sm hidden-xs">
|
||||
{% endif %}
|
||||
<h5><a href="{{'/archive/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5>
|
||||
<div class="tags">
|
||||
{% capture tags %}
|
||||
{% comment %}
|
||||
there must be no space between for and if otherwise this tricky sort won't work.
|
||||
url_encode/decode is for escaping otherwise extra <a> will get generated
|
||||
but it will break sort...
|
||||
{% endcomment %}
|
||||
{% for tag in site.tags %}{% if tag[1].size > site.featured-condition-size %}
|
||||
<a data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}"
|
||||
href="{{ site.baseurl }}/archive/?tag={{ tag[0] | url_encode }}"
|
||||
title="{{ tag[0] }}"
|
||||
rel="{{ tag[1].size }}">{{ tag[0] }}</a>__SEPARATOR__
|
||||
{% endif %}{% endfor %}
|
||||
{% endcapture %}
|
||||
{{ tags | split:'__SEPARATOR__' | sort }}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
330
_includes/footer.html
Normal file
330
_includes/footer.html
Normal file
@ -0,0 +1,330 @@
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<!-- SNS Link -->
|
||||
{% include sns-links.html center=true %}
|
||||
|
||||
<p class="copyright text-muted">
|
||||
Copyright © {{ site.title }} {{ site.time | date: '%Y' }}
|
||||
| Powered by <a href="https://jekyllrb.com">Jekyll</a> |
|
||||
<iframe style="margin-left: 2px; margin-bottom:-5px;" frameborder="0" scrolling="0" width="100px"
|
||||
height="20px"
|
||||
src="https://ghbtns.com/github-btn.html?user=mffan0922&repo=mffan0922.github.io&type=star&count=true">
|
||||
</iframe>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="{{ "/js/jquery.min.js " | prepend: site.baseurl }}"></script>
|
||||
|
||||
<!-- Bootstrap Core JavaScript -->
|
||||
<!-- Currently, only navbar scroll-down effect at desktop still depends on this -->
|
||||
<script src="{{ "/js/bootstrap.min.js " | prepend: site.baseurl }}"></script>
|
||||
|
||||
<!-- Custom Theme JavaScript -->
|
||||
<script src="{{ "/js/hux-blog.min.js " | prepend: site.baseurl }}"></script>
|
||||
|
||||
<!-- Simple Jekyll Search -->
|
||||
<script src="{{ "/js/simple-jekyll-search.min.js" | prepend: site.baseurl }}"></script>
|
||||
|
||||
<!-- Service Worker -->
|
||||
{% if site.service-worker %}
|
||||
<script src="{{ "/js/snackbar.js " | prepend: site.baseurl }}"></script>
|
||||
<script src="{{ "/js/sw-registration.js " | prepend: site.baseurl }}"></script>
|
||||
{% endif %}
|
||||
|
||||
<!-- async load function -->
|
||||
<script>
|
||||
function async(u, c) {
|
||||
var d = document, t = 'script',
|
||||
o = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
o.src = u;
|
||||
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
|
||||
s.parentNode.insertBefore(o, s);
|
||||
}
|
||||
</script>
|
||||
|
||||
<!--
|
||||
Because of the native support for backtick-style fenced code blocks
|
||||
right within the Markdown is landed in Github Pages,
|
||||
From V1.6, There is no need for Highlight.js,
|
||||
so Huxblog drops it officially.
|
||||
|
||||
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
|
||||
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
|
||||
- https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers
|
||||
-->
|
||||
<!--
|
||||
<script>
|
||||
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
|
||||
hljs.initHighlightingOnLoad();
|
||||
})
|
||||
</script>
|
||||
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
|
||||
-->
|
||||
|
||||
|
||||
{% if page.plchart %}
|
||||
<!-- jquery.tagcloud.js -->
|
||||
<script>
|
||||
// https://stackoverflow.com/questions/9975810/make-iframe-automatically-adjust-height-according-to-the-contents-without-using
|
||||
function resizeIframe(obj) {
|
||||
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var $chart = document.querySelector("#chart");
|
||||
$chart.onload = function () {
|
||||
resizeIframe($chart)
|
||||
}
|
||||
window.addEventListener("resize", () => {
|
||||
resizeIframe($chart)
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if page.title == 'Archive' %}
|
||||
<!-- jquery.tagcloud.js -->
|
||||
<script>
|
||||
async('{{ "/js/jquery.tagcloud.js" | prepend: site.baseurl }}', function () {
|
||||
$.fn.tagcloud.defaults = {
|
||||
//size: {start: 1, end: 1, unit: 'em'},
|
||||
color: { start: '#bbbbee', end: '#2f93b4' },
|
||||
};
|
||||
$('#tag_cloud a').tagcloud();
|
||||
})
|
||||
</script>
|
||||
<script src='{{ "/js/archive.js " | prepend: site.baseurl }}'></script>
|
||||
{% endif %}
|
||||
|
||||
<!--fastClick.js -->
|
||||
<script>
|
||||
async("/js/fastclick.min.js", function () {
|
||||
var $nav = document.querySelector("nav");
|
||||
if ($nav) FastClick.attach($nav);
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Google Analytics
|
||||
{% if site.ga_track_id %}
|
||||
<script>
|
||||
// dynamic User by Hux
|
||||
var _gaId = '{{ site.ga_track_id }}';
|
||||
var _gaDomain = '{{ site.ga_domain }}';
|
||||
|
||||
// Originial
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
ga('create', _gaId, _gaDomain);
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
{% endif %}
|
||||
-->
|
||||
|
||||
|
||||
<!-- Baidu Tongji
|
||||
{% if site.ba_track_id %}
|
||||
<script>
|
||||
// dynamic User by Hux
|
||||
var _baId = '{{ site.ba_track_id }}';
|
||||
|
||||
// Originial
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "//hm.baidu.com/hm.js?" + _baId;
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
-->
|
||||
|
||||
<!-- Side Catalog -->
|
||||
{% unless page.no-catalog %}
|
||||
<script type="text/javascript">
|
||||
function generateCatalog(selector) {
|
||||
|
||||
// interop with multilangual
|
||||
if ('{{ page.multilingual }}' == 'true') {
|
||||
_containerSelector = 'div.post-container.active'
|
||||
} else {
|
||||
_containerSelector = 'div.post-container'
|
||||
}
|
||||
|
||||
// init
|
||||
var P = $(_containerSelector), a, n, t, l, i, c;
|
||||
a = P.find('h1,h2,h3,h4,h5,h6');
|
||||
|
||||
// clean
|
||||
$(selector).html('')
|
||||
|
||||
// appending
|
||||
a.each(function () {
|
||||
n = $(this).prop('tagName').toLowerCase();
|
||||
i = "#" + $(this).prop('id');
|
||||
t = $(this).text();
|
||||
c = $('<a href="' + i + '" rel="nofollow">' + t + '</a>');
|
||||
l = $('<li class="' + n + '_nav"></li>').append(c);
|
||||
$(selector).append(l);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
generateCatalog(".catalog-body");
|
||||
|
||||
// toggle side catalog
|
||||
$(".catalog-toggle").click((function (e) {
|
||||
e.preventDefault();
|
||||
$('.side-catalog').toggleClass("fold")
|
||||
}))
|
||||
|
||||
/*
|
||||
* Doc: https://github.com/davist11/jQuery-One-Page-Nav
|
||||
* Fork by Hux to support padding
|
||||
*/
|
||||
async("{{ '/js/jquery.nav.js' | prepend: site.baseurl }}", function () {
|
||||
$('.catalog-body').onePageNav({
|
||||
currentClass: "active",
|
||||
changeHash: !1,
|
||||
easing: "swing",
|
||||
filter: "",
|
||||
scrollSpeed: 700,
|
||||
scrollOffset: 0,
|
||||
scrollThreshold: .2,
|
||||
begin: null,
|
||||
end: null,
|
||||
scrollChange: null,
|
||||
padding: 80
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endunless %}
|
||||
|
||||
|
||||
<!-- Multi-Lingual -->
|
||||
{% if page.multilingual %}
|
||||
<!-- Handle Language Change -->
|
||||
<script type="text/javascript">
|
||||
// get nodes
|
||||
var $zh = document.querySelector(".zh");
|
||||
var $en = document.querySelector(".en");
|
||||
var $select = document.querySelector("select");
|
||||
|
||||
// Changes at v1.8.1: include lang flag as a url query. This interop well with catalog hash anchors.
|
||||
function getLang() { return new URLSearchParams(document.location.search).get("lang") }
|
||||
|
||||
function setLang(newLang) {
|
||||
var params = new URLSearchParams(document.location.search)
|
||||
params.set("lang", newLang)
|
||||
document.location.search = params.toString() // refresh.
|
||||
}
|
||||
|
||||
// handle render
|
||||
function _render() {
|
||||
var lang = getLang()
|
||||
// en
|
||||
if (lang == "en") {
|
||||
$select.selectedIndex = 1;
|
||||
$en.style.display = "block";
|
||||
$en.classList.add("active");
|
||||
$zh.style.display = "none";
|
||||
$zh.classList.remove("active");
|
||||
// default to zh-cn
|
||||
} else {
|
||||
$select.selectedIndex = 0;
|
||||
$zh.style.display = "block";
|
||||
$zh.classList.add("active");
|
||||
$en.style.display = "none";
|
||||
$en.classList.remove("active");
|
||||
}
|
||||
// interop with catalog
|
||||
generateCatalog(".catalog-body");
|
||||
}
|
||||
|
||||
// handle select change
|
||||
function onLanChange(index) {
|
||||
if (index == 0) {
|
||||
lang = "zh"
|
||||
} else {
|
||||
lang = "en"
|
||||
}
|
||||
setLang(lang)
|
||||
}
|
||||
|
||||
// init
|
||||
_render();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- Simple Jekyll Search -->
|
||||
<script>
|
||||
// https://stackoverflow.com/questions/1912501/unescape-html-entities-in-javascript
|
||||
function htmlDecode(input) {
|
||||
var e = document.createElement('textarea');
|
||||
e.innerHTML = input;
|
||||
// handle case of empty input
|
||||
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
|
||||
}
|
||||
|
||||
SimpleJekyllSearch({
|
||||
searchInput: document.getElementById('search-input'),
|
||||
resultsContainer: document.getElementById('search-results'),
|
||||
json: '/search.json',
|
||||
searchResultTemplate: '<div class="post-preview item"><a href="{url}"><h2 class="post-title">{title}</h2><h3 class="post-subtitle">{subtitle}</h3><hr></a></div>',
|
||||
noResultsText: 'No results',
|
||||
limit: 50,
|
||||
fuzzy: false,
|
||||
// a hack to get escaped subtitle unescaped. for some reason,
|
||||
// post.subtitle w/o escape filter nuke entire search.
|
||||
templateMiddleware: function (prop, value, template) {
|
||||
if (prop === 'subtitle' || prop === 'title') {
|
||||
if (value.indexOf("code")) {
|
||||
return htmlDecode(value);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
var $searchPage = $('.search-page');
|
||||
var $searchOpen = $('.search-icon');
|
||||
var $searchClose = $('.search-icon-close');
|
||||
var $searchInput = $('#search-input');
|
||||
var $body = $('body');
|
||||
|
||||
$searchOpen.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$searchPage.toggleClass('search-active');
|
||||
var prevClasses = $body.attr('class') || '';
|
||||
setTimeout(function () {
|
||||
$body.addClass('no-scroll');
|
||||
}, 400)
|
||||
|
||||
if ($searchPage.hasClass('search-active')) {
|
||||
$searchClose.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$searchPage.removeClass('search-active');
|
||||
$body.attr('class', prevClasses); // from closure
|
||||
});
|
||||
$searchInput.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
9
_includes/friends.html
Normal file
9
_includes/friends.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% if site.friends %}
|
||||
<hr>
|
||||
<h5>FRIENDS</h5>
|
||||
<ul class="list-inline">
|
||||
{% for friend in site.friends %}
|
||||
<li><a href="{{friend.href}}">{{friend.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
75
_includes/head.html
Normal file
75
_includes/head.html
Normal file
@ -0,0 +1,75 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!--
|
||||
<meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
|
||||
-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="description" content="{{ site.description }}">
|
||||
<meta name="keywords" content="{{ site.keyword }}">
|
||||
<meta name="theme-color" content="{{ site.chrome-tab-theme-color }}">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title"
|
||||
content="{% if page.title %}{{ page.title }} - {{ site.SEOTitle }}{% else %}{{ site.SEOTitle }}{% endif %}">
|
||||
{% case page.layout %}
|
||||
{% when 'post' %}
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:description" content="{{ page.excerpt | strip_html | truncate:200 }}">
|
||||
{% if page.date %}
|
||||
<meta property="article:published_time" content="{{ page.date | date: " %Y-%m-%dT%H:%M:%SZ" }}">
|
||||
{% endif %}
|
||||
{% if page.author %}
|
||||
<meta property="article:author" content="{{ page.author }}">
|
||||
{% endif %}
|
||||
{% for tag in page.tags %}
|
||||
<meta property="article:tag" content="{{ tag }}">
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description"
|
||||
content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
||||
{% endcase %}
|
||||
<meta property="og:image" content="{{ site.url }}{{ site.sidebar-avatar }}">
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
|
||||
<meta property="og:site_name" content="{{ site.SEOTitle }}">
|
||||
|
||||
<title>{% if page.title %}{{ page.title }} - {{ site.SEOTitle }}{% else %}{{ site.SEOTitle }}{% endif %}</title>
|
||||
|
||||
<!-- Web App Manifest -->
|
||||
<link rel="manifest" href="{{ site.baseurl }}/pwa/manifest.json">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" href="{{ site.baseurl }}/img/favicon.ico">
|
||||
|
||||
<!-- Canonical URL -->
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
|
||||
<!-- Bootstrap Core CSS -->
|
||||
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{{ "/css/hux-blog.min.css" | prepend: site.baseurl }}">
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<!-- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
|
||||
<!-- Hux change font-awesome CDN to qiniu -->
|
||||
<link href="/css/font-awesome.min.css" rel="stylesheet"
|
||||
type="text/css">
|
||||
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- ga & ba script hoook -->
|
||||
<script></script>
|
||||
|
||||
<!-- Google AdSense
|
||||
<script data-ad-client="ca-pub-6487568398225121" async
|
||||
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
-->
|
||||
</head>
|
110
_includes/intro-header.html
Normal file
110
_includes/intro-header.html
Normal file
@ -0,0 +1,110 @@
|
||||
{% comment %}
|
||||
@param {string} type - 'page' | 'post' | 'keynote'
|
||||
@param {boolean} short
|
||||
{% endcomment %}
|
||||
|
||||
{% if include.type == 'post' %}
|
||||
<style type="text/css">
|
||||
header.intro-header{
|
||||
position: relative;
|
||||
background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}');
|
||||
background: {{ page.header-bg-css }};
|
||||
}
|
||||
|
||||
{% if page.header-mask %}
|
||||
header.intro-header .header-mask{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background: rgba(0,0,0, {{ page.header-mask }});
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
{% if page.header-style == 'text' %}
|
||||
<header class="intro-header style-text" >
|
||||
{% else %}
|
||||
<header class="intro-header" >
|
||||
{% endif %}
|
||||
<div class="header-mask"></div>
|
||||
{% if page.header-img-credit %}
|
||||
<div class="header-img-credit">
|
||||
Image by <a href="//{{page.header-img-credit-href}}">{{page.header-img-credit}}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<div class="tags">
|
||||
{% for tag in page.tags %}
|
||||
<a class="tag" href="{{ site.baseurl }}/archive/?tag={{ tag | url_encode }}" title="{{ tag }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% comment %} always create a h2 for keeping the margin {% endcomment %}
|
||||
<h2 class="subheading">{{ page.subtitle }}</h2>
|
||||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == 'keynote' %}
|
||||
<style type="text/css">
|
||||
header.intro-header{
|
||||
height: 500px;
|
||||
overflow: hidden;
|
||||
}
|
||||
header.intro-header .container{
|
||||
visibility: hidden;
|
||||
}
|
||||
header iframe{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
<header class="intro-header" >
|
||||
<iframe src="{{page.iframe}}"></iframe>
|
||||
<!-- keep for SEO -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<div class="tags">
|
||||
{% for tag in page.tags %}
|
||||
<a class="tag" href="{{ site.baseurl }}/archive/?tag={{ tag | url_encode }}" title="{{ tag }}">{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% comment %} always create a h2 for keeping the margin {% endcomment %}
|
||||
<h2 class="subheading">{{ page.subtitle }}</h2>
|
||||
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %}
|
||||
on {{ page.date | date: "%B %-d, %Y" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{% endif %}
|
||||
|
||||
{% if include.type == 'page' %}
|
||||
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
{% if include.short %}
|
||||
<div class="site-heading" id="tag-heading">
|
||||
{% else %}
|
||||
<div class="site-heading">
|
||||
{% endif %}
|
||||
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
|
||||
<span class="subheading">{{ page.description }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{% endif %}
|
20
_includes/mathjax_support.html
Normal file
20
_includes/mathjax_support.html
Normal file
@ -0,0 +1,20 @@
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
TeX: {
|
||||
equationNumbers: {
|
||||
autoNumber: "AMS"
|
||||
}
|
||||
},
|
||||
SVG: {
|
||||
scale: 90
|
||||
},
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'] ],
|
||||
displayMath: [ ['$$','$$'] ],
|
||||
processEscapes: true,
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG">
|
||||
</script>
|
6
_includes/multilingual-sel.html
Normal file
6
_includes/multilingual-sel.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!-- Language Selector -->
|
||||
<select class="sel-lang" onchange= "onLanChange(this.options[this.options.selectedIndex].value)">
|
||||
<option value="0" selected> 中文 | Chinese </option>
|
||||
<option value="1"> 英文 | English </option>
|
||||
</select>
|
||||
|
97
_includes/nav.html
Normal file
97
_includes/nav.html
Normal file
@ -0,0 +1,97 @@
|
||||
<!-- Navigation -->
|
||||
{% if page.nav-style == "invert" or page.header-style == "text" %}
|
||||
<nav class="navbar navbar-default navbar-custom navbar-fixed-top invert">
|
||||
{% else %}
|
||||
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
|
||||
{% endif %}
|
||||
<div class="container-fluid">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header page-scroll">
|
||||
<button type="button" class="navbar-toggle">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.SEOTitle }}</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div id="huxblog_navbar">
|
||||
<div class="navbar-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="{{ site.baseurl }}/">Home</a>
|
||||
</li>
|
||||
{% for page in site.pages %}
|
||||
{% if page.title and page.hide-in-nav != true %}
|
||||
<li>
|
||||
<a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<li class="search-icon">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="fa fa-search"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</nav>
|
||||
|
||||
<script>
|
||||
// Drop Bootstarp low-performance Navbar
|
||||
// Use customize navbar with high-quality material design animation
|
||||
// in high-perf jank-free CSS3 implementation
|
||||
var $body = document.body;
|
||||
var $toggle = document.querySelector('.navbar-toggle');
|
||||
var $navbar = document.querySelector('#huxblog_navbar');
|
||||
var $collapse = document.querySelector('.navbar-collapse');
|
||||
|
||||
var __HuxNav__ = {
|
||||
close: function () {
|
||||
$navbar.className = " ";
|
||||
// wait until animation end.
|
||||
setTimeout(function () {
|
||||
// prevent frequently toggle
|
||||
if ($navbar.className.indexOf('in') < 0) {
|
||||
$collapse.style.height = "0px"
|
||||
}
|
||||
}, 400)
|
||||
},
|
||||
open: function () {
|
||||
$collapse.style.height = "auto"
|
||||
$navbar.className += " in";
|
||||
}
|
||||
}
|
||||
|
||||
// Bind Event
|
||||
$toggle.addEventListener('click', function (e) {
|
||||
if ($navbar.className.indexOf('in') > 0) {
|
||||
__HuxNav__.close()
|
||||
} else {
|
||||
__HuxNav__.open()
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Since Fastclick is used to delegate 'touchstart' globally
|
||||
* to hack 300ms delay in iOS by performing a fake 'click',
|
||||
* Using 'e.stopPropagation' to stop 'touchstart' event from
|
||||
* $toggle/$collapse will break global delegation.
|
||||
*
|
||||
* Instead, we use a 'e.target' filter to prevent handler
|
||||
* added to document close HuxNav.
|
||||
*
|
||||
* Also, we use 'click' instead of 'touchstart' as compromise
|
||||
*/
|
||||
document.addEventListener('click', function (e) {
|
||||
if (e.target == $toggle) return;
|
||||
if (e.target.className == 'icon-bar') return;
|
||||
__HuxNav__.close();
|
||||
})
|
||||
</script>
|
18
_includes/search.html
Normal file
18
_includes/search.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!-- Search -->
|
||||
<div class="search-page">
|
||||
<div class="search-icon-close-container">
|
||||
<span class="search-icon-close">
|
||||
<i class="fa fa-chevron-down"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="search-main container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<form></form>
|
||||
<input type="text" id="search-input" placeholder="$ grep...">
|
||||
</form>
|
||||
<div id="search-results" class="mini-post-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
14
_includes/short-about.html
Normal file
14
_includes/short-about.html
Normal file
@ -0,0 +1,14 @@
|
||||
<section class="visible-md visible-lg">
|
||||
<hr>
|
||||
<h5><a href="{{'/about/' | prepend: site.baseurl }}">ABOUT ME</a></h5>
|
||||
<div class="short-about">
|
||||
{% if site.sidebar-avatar %}
|
||||
<img src="{{site.sidebar-avatar}}" />
|
||||
{% endif %}
|
||||
{% if site.sidebar-about-description %}
|
||||
<p>{{site.sidebar-about-description}}</p>
|
||||
{% endif %}
|
||||
<!-- SNS Link -->
|
||||
{% include sns-links.html %}
|
||||
</div>
|
||||
</section>
|
81
_includes/sns-links.html
Normal file
81
_includes/sns-links.html
Normal file
@ -0,0 +1,81 @@
|
||||
{% comment %}
|
||||
@param {Boolean} center
|
||||
{% endcomment %}
|
||||
|
||||
{% if include.center %}
|
||||
<ul class="list-inline text-center">
|
||||
{% else %}
|
||||
<ul class="list-inline">
|
||||
{% endif %}
|
||||
|
||||
{% if site.RSS %}
|
||||
<li>
|
||||
<a href="{{ "/feed.xml" | prepend: site.baseurl }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-rss fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.twitter_username %}
|
||||
<li>
|
||||
<a href="https://twitter.com/{{ site.twitter_username }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.zhihu_username %}
|
||||
<li>
|
||||
<a target="_blank" href="https://www.zhihu.com/people/{{ site.zhihu_username }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-stack-1x fa-inverse">知</i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.weibo_username %}
|
||||
<li>
|
||||
<a target="_blank" href="http://weibo.com/{{ site.weibo_username }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.mail_username %}
|
||||
<li>
|
||||
<a target="_blank" href="mailto:mffan0922@163.com">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-mail-reply fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.github_username %}
|
||||
<li>
|
||||
<a target="_blank" href="https://github.com/{{ site.github_username }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if site.linkedin_username %}
|
||||
<li>
|
||||
<a target="_blank" href="https://www.linkedin.com/in/{{ site.linkedin_username }}">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
Reference in New Issue
Block a user