-
-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd3a816
commit 61eae5c
Showing
67 changed files
with
2,690 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
layout: 404 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Site settings | ||
# These are used to personalize your new site. If you look in the HTML files, | ||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. | ||
# You can create any custom variable you would like, and they will be accessible | ||
# in the templates via {{ site.myvariable }}. | ||
|
||
title: Your awesome title | ||
email: [email protected] | ||
author: GitHub User | ||
copyright: Copyright © 1970-2010 | ||
description: >- # this means to ignore newlines until "baseurl:" | ||
Write an awesome description for your new site here. You can edit this | ||
line in _config.yml. It will appear in your document head meta (for | ||
Google search results) and in your feed.xml site description. | ||
baseurl: "" # the subpath of your site, e.g. /blog | ||
url: "" # the base hostname & protocol for your site, e.g. http://example.com | ||
|
||
# Yat date format | ||
# refer to https://shopify.github.io/liquid/filters/date/ if you want to customize this | ||
yat: | ||
date_format: "%b %-d, %Y" | ||
|
||
# If you want more debug log, you can set true | ||
# debug: true | ||
|
||
# If you want to link only specific pages in your header, uncomment | ||
# this and add the path to the pages in order as they should show up | ||
# header_pages: | ||
# - index.html | ||
# - archives.html | ||
# - categories.html | ||
# - tags.html | ||
|
||
# Page default value | ||
# defaults: | ||
# home: | ||
# heading: "Your awesome heading" | ||
# subheading: "Your awesome subheading" | ||
# banner: "Your image url" | ||
|
||
# Pagination setting | ||
paginate: 5 | ||
|
||
# Disqus comments | ||
# disqus: | ||
# shortname: "Your Disqus username" | ||
|
||
# Gitment comments | ||
# gitment: | ||
# username: "Your GitHub username" | ||
# repo: "The repo to store comments" | ||
# client_id: "Your client ID" | ||
# client_secret: "Your client secret" | ||
# redirect_uri: "Your redirect url" # If you use a custom domain name | ||
|
||
# Build settings | ||
markdown: kramdown | ||
theme: jekyll-theme-yat | ||
|
||
plugins: | ||
- jekyll-feed | ||
- jekyll-seo-tag | ||
- jekyll-paginate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
home: | ||
heading: "Your awesome heading" | ||
subheading: "Your awesome subheading" | ||
banner: "Your image url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- lang: en | ||
img: https://www.countryflags.io/us/flat/64.png | ||
text: English | ||
|
||
- lang: fr | ||
img: https://www.countryflags.io/fr/flat/64.png | ||
text: Franch | ||
|
||
- lang: zh-CN | ||
img: https://www.countryflags.io/cn/flat/64.png | ||
text: Chinese(Simple) | ||
|
||
- lang: zh-TW | ||
img: https://www.countryflags.io/tw/flat/64.png | ||
text: Chinese(Traditional) | ||
|
||
- lang: ja | ||
img: https://www.countryflags.io/jp/flat/64.png | ||
text: Japan | ||
|
||
- lang: ko | ||
img: https://www.countryflags.io/kr/flat/64.png | ||
text: Korean | ||
|
||
- lang: ru | ||
img: https://www.countryflags.io/ru/flat/64.png | ||
text: Russia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div id="disqus_thread"></div> | ||
<script> | ||
var disqus_config = function () { | ||
this.page.url = '{{ page.url | absolute_url }}'; | ||
this.page.identifier = '{{ page.url | absolute_url }}'; | ||
}; | ||
|
||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
|
||
// s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js'; | ||
s.src = 'https://jeffreytse.disqus.com/embed.js'; | ||
|
||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div id="gitment_thread"></div> | ||
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css"> | ||
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script> | ||
<script> | ||
var gitment = new Gitment({ | ||
id: '{{ page.id }}', | ||
owner: '{{ site.gitment.username }}', | ||
repo: '{{ site.gitment.repo }}', | ||
oauth: { | ||
client_id: '{{ site.gitment.client_id }}', | ||
client_secret: '{{ site.gitment.client_secret }}', | ||
}, | ||
}); | ||
gitment.render('gitment_thread') | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{% if include.selector %} | ||
{% assign selector = include.selector %} | ||
{% endif %} | ||
|
||
{% if include.seed %} | ||
{% assign seed = include.seed %} | ||
{% endif %} | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script> | ||
<script> | ||
function setRandomBgImage(selector, seed) { | ||
var pattern = GeoPattern.generate(seed); | ||
var element = document.querySelector(selector) | ||
if (element) { | ||
element.style.backgroundImage = pattern.toDataUrl(); | ||
} | ||
} | ||
|
||
setRandomBgImage('{{ selector }}', '{{ seed }}'); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script> | ||
if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) { | ||
(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','https://www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', '{{ site.google_analytics }}', 'auto'); | ||
ga('send', 'pageview'); | ||
} | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{% if include.translate_langs %} | ||
{% assign translate_langs = include.translate_langs %} | ||
{% endif %} | ||
|
||
<div id="google_translate_element" style="display: none;"> | ||
</div> | ||
|
||
<span class="ct-language"> | ||
<ul class="list-unstyled ct-language-dropdown"> | ||
{% for item in translate_langs %} | ||
<li> | ||
<a href="#" class="lang-select" data-lang="{{ item.lang }}"> | ||
{% if item.img %} | ||
<img src="{{ item.img }}" title="{{ item.text }}"> | ||
{% else %} | ||
{{ item.text }} | ||
{% endif %} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</span> | ||
|
||
<script type="text/javascript"> | ||
function googleTranslateElementInit() { | ||
new google.translate.TranslateElement({ | ||
pageLanguage: '', | ||
autoDisplay: false, | ||
layout: google.translate.TranslateElement.InlineLayout.VERTICAL | ||
}, 'google_translate_element'); | ||
|
||
function restoreLang() { | ||
var iframe = document.getElementsByClassName('goog-te-banner-frame')[0]; | ||
if (!iframe) return; | ||
|
||
var innerDoc = iframe.contentDocument || iframe.contentWindow.document; | ||
var restore_el = innerDoc.getElementsByTagName("button"); | ||
|
||
for (var i = 0; i < restore_el.length; i++) { | ||
if (restore_el[i].id.indexOf("restore") >= 0) { | ||
restore_el[i].click(); | ||
var close_el = innerDoc.getElementsByClassName("goog-close-link"); | ||
close_el[0].click(); | ||
return; | ||
} | ||
} | ||
} | ||
|
||
function triggerHtmlEvent(element, eventName) { | ||
var event; | ||
if (document.createEvent) { | ||
event = document.createEvent('HTMLEvents'); | ||
event.initEvent(eventName, true, true); | ||
element.dispatchEvent(event); | ||
} else { | ||
event = document.createEventObject(); | ||
event.eventType = eventName; | ||
element.fireEvent('on' + event.eventType, event); | ||
} | ||
} | ||
|
||
var googleCombo = document.querySelector("select.goog-te-combo"); | ||
var langSelect = document.querySelector('.ct-language'); | ||
langSelect.addEventListener('click', function(event) { | ||
if (!event.target) { | ||
return; | ||
} | ||
|
||
var selected = document.querySelector('.ct-language .ct-language-selected'); | ||
if (selected) { | ||
selected.classList.remove('ct-language-selected'); | ||
} | ||
|
||
var target = event.target; | ||
while (target && target !== langSelect ) { | ||
if (target.matches('.lang-select')) { | ||
break; | ||
} | ||
target = target.parentElement; | ||
} | ||
|
||
if (target && target.matches('.lang-select')) { | ||
var lang = target.getAttribute('data-lang'); | ||
if (googleCombo.value == lang) { | ||
restoreLang(); | ||
} else { | ||
target.parentElement.classList.add('ct-language-selected'); | ||
googleCombo.value = lang; | ||
triggerHtmlEvent(googleCombo, 'change'); | ||
} | ||
} | ||
|
||
event.preventDefault(); | ||
}); | ||
} | ||
</script> | ||
|
||
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script> | ||
function hashLocate(hashValue) { | ||
hashValue = hashValue.replace(/^.*#h-/, ''); | ||
var element = document.getElementById(hashValue); | ||
|
||
if (!element) { | ||
return; | ||
} | ||
|
||
var headerHeight = 0; | ||
var header = document.querySelector('header'); | ||
if (header) { | ||
headerHeight = header.offsetHeight; | ||
} | ||
var supportPageOffset = window.pageXOffset !== undefined; | ||
var isCSS1Compat = ((document.compatMode || "") === "CSS1Compat"); | ||
|
||
var x = supportPageOffset ? window.pageXOffset : isCSS1Compat ? document.documentElement.scrollLeft : document.body.scrollLeft; | ||
var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop; | ||
|
||
var offsetY = element.offsetTop - headerHeight - 12; | ||
if (y === offsetY) { | ||
return; | ||
} | ||
|
||
window.scrollTo(x, offsetY); | ||
} | ||
|
||
// The first event occurred | ||
if (window.location.hash) { | ||
hashLocate(window.location.hash); | ||
} | ||
|
||
window.addEventListener('click', function(event) { | ||
if (event.target.matches('a')) { | ||
hashLocate(event.target.getAttribute('href')); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Config({ | ||
tex2jax: { | ||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], | ||
inlineMath: [['$','$']] | ||
} | ||
}); | ||
</script> | ||
<script | ||
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% if include.selector %} | ||
{% assign selector = include.selector %} | ||
{% endif %} | ||
|
||
{% if include.seed %} | ||
{% assign seed = include.seed %} | ||
{% endif %} | ||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/2.0.0/trianglify.min.js"></script> | ||
<script> | ||
function setRandomBgImage(selector, seed) { | ||
var element = document.querySelector(selector); | ||
if (!element) return; | ||
var pattern = Trianglify({ | ||
width: screen.width, | ||
height: element.offsetHeight, | ||
seed: seed | ||
}); | ||
element.appendChild(pattern.canvas()); | ||
} | ||
|
||
setRandomBgImage('{{ selector }}', '{{ seed }}'); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{%- if include.func -%} | ||
{%- assign func = include.func -%} | ||
{%- endif -%} | ||
|
||
{%- assign include_path = func -%} | ||
{%- assign path_array = include_path | split: '.' -%} | ||
{%- if path_array.size == 1 -%} | ||
{%- assign include_path = include_path | append: '.html' -%} | ||
{%- endif -%} | ||
|
||
{%- if func == 'log' -%} | ||
{%- include functions/log.html level=include.level msg=include.msg -%} | ||
{%- else -%} | ||
{%- assign include_path = 'functions/' | append: include_path -%} | ||
{%- include {{ include_path }} -%} | ||
{%- endif -%} | ||
|
||
{%- if func != 'log' -%} | ||
{%- assign msg = '[function][' | ||
| append: {{func}} | ||
| append: '] ' | ||
| append: {{return}} | ||
-%} | ||
{%- include functions.html func='log' level='info' -%} | ||
{%- endif -%} |
Oops, something went wrong.