Skip to content

Commit 5d398eb

Browse files
committed
new theme
1 parent d7db4b6 commit 5d398eb

File tree

118 files changed

+6541
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+6541
-0
lines changed

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea/
2+
.vscode
3+
4+
.jekyll-cache
5+
_site
6+
7+
*.log
8+
**.lock
9+
**-lock
10+
11+
**_backup/

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
gem 'jekyll-paginate'
3+
4+
gem "jekyll", "~> 4.0"
5+
gem "rake"

Rakefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
require "rubygems"
2+
require 'rake'
3+
require 'yaml'
4+
require 'time'
5+
6+
SOURCE = "."
7+
CONFIG = {
8+
'version' => "12.3.2",
9+
'themes' => File.join(SOURCE, "_includes", "themes"),
10+
'layouts' => File.join(SOURCE, "_layouts"),
11+
'posts' => File.join(SOURCE, "_posts"),
12+
'post_ext' => "md",
13+
'theme_package_version' => "0.1.0"
14+
}
15+
16+
# Usage: rake post title="A Title" subtitle="A sub title"
17+
desc "Begin a new post in #{CONFIG['posts']}"
18+
task :post do
19+
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
20+
title = ENV["title"] || "new-post"
21+
subtitle = ENV["subtitle"] || "This is a subtitle"
22+
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
23+
begin
24+
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
25+
rescue Exception => e
26+
puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!"
27+
exit -1
28+
end
29+
filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}")
30+
if File.exist?(filename)
31+
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
32+
end
33+
34+
puts "Creating new post: #{filename}"
35+
open(filename, 'w') do |post|
36+
post.puts "---"
37+
post.puts "layout: post"
38+
post.puts "title: \"#{title.gsub(/-/,' ')}\""
39+
post.puts "subtitle: \"#{subtitle.gsub(/-/,' ')}\""
40+
post.puts "date: #{date}"
41+
post.puts "author: \"Hux\""
42+
post.puts "header-img: \"img/post-bg-2015.jpg\""
43+
post.puts "tags: []"
44+
post.puts "---"
45+
end
46+
end # task :post
47+
48+
desc "Launch preview environment"
49+
task :preview do
50+
system "jekyll --auto --server"
51+
end # task :preview
52+
53+
#Load custom rake scripts
54+
Dir['_rake/*.rake'].each { |r| load r }

_includes/about/en.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Hi, I am _@huxpro_ (Huang, Xuan), an UI/Frontend engineer & designer, accidentally growing into a compiler hacker. My current interests range from programming languages theory and implementation in general (compiler, type system, type-based formal verification, virtual machine, runtime systems, garbage collection) to software engineering in the tech industry (client-side web/mobile app development, server-side backend, user interface and UX, developer infrastructure and DX).
2+
3+
I'm currently working on the [Hermes JavaScript Engine](https://hermesengine.dev/) at [Facebook](http://facebook.com/). I was also involved in some of the [Facebook Reality Labs](https://tech.fb.com/ar-vr/) and the [ReasonML](https://reasonml.github.io/) (now [ReScript](https://rescript-lang.org/)) efforts. I'm also passionated about [React](https://reactjs.org/) and [React Native](https://reactnative.dev/).
4+
5+
In the past, I worked on [Alitrip (Fliggy)](https://www.alitrip.com/) mobile and web apps under the [Alibaba Group](https://en.wikipedia.org/wiki/Alibaba_Group), found and lead front-end infrastructure team at an unicorn startup company [Beijing Weiying (a.k.a. WePiao, now acquired by Maoyan)](https://www.crunchbase.com/organization/beijing-weiying-technology), and helped [Ele.me (now acquired by Alibaba)](https://en.wikipedia.org/wiki/Ele.me) to upgrade their mobile web site into [the first influential PWA (progressive web app) in China](https://medium.com/elemefe/upgrading-ele-me-to-progressive-web-app-2a446832e509).
6+
7+
I studied BA, Digital Media Art at [Communication University of China](https://en.wikipedia.org/wiki/Communication_University_of_China) and MS, Computer Science (with a focus on programming languages) at [Rochester Institute of Technology](https://en.wikipedia.org/wiki/Rochester_Institute_of_Technology).
8+
9+
##### [My PL Spectrum (WIP 🚧)](https://huangxuan.me/2020/05/05/pl-chart/)
10+
11+
I made a chart to visualize my experiences and interests on some of the programming languages. I know. I know this is always contraversial. But it's just something quite self-entertaining to do. So bare with me and have fun reading that!
12+
13+
##### Appearence
14+
15+
- [Upgrading to Progressive Web Apps][9] · [JSConf China Shanghai 2017](http://2017.jsconf.cn/)
16+
- Building Progressive Web Apps · [CSDI Guangzhou 2017](http://www.csdisummit.com/)
17+
- The State of Progressive Web App · GDG IO Redux Beijing 2017
18+
- PWA Rehashing · Baidu HQ Beijing 2017
19+
- [Service Worker 101][5] · GDG DevFest Beijing 2016
20+
- [Progressive Web Apps][4] · QCon Shanghai 2016
21+
- Progressive Web App in my POV · GDG IO Redux Beijing 2016
22+
- [CSS Still Sucks 2015][2] · 2015
23+
- [JavaScript Modularization Journey][1] · 2015
24+
25+
[1]: //huangxuan.me/2015/07/09/js-module-7day/
26+
[2]: //huangxuan.me/2015/12/28/css-sucks-2015/
27+
[3]: //huangxuan.me/2016/06/05/pwa-in-my-pov/
28+
[4]: //huangxuan.me/2016/10/20/pwa-qcon2016/
29+
[5]: //huangxuan.me/2016/11/20/sw-101-gdgdf/
30+
[6]: https://yanshuo.io/assets/player/?deck=58ac8598b123db0067292f92 "PWA Rehashing"
31+
[7]: https://yanshuo.io/assets/player/?deck=593ad6fbfe88c2006a0a0d6d "The State of PWA"
32+
[8]: https://yanshuo.io/assets/player/?deck=594d673d570c357d0698a950 "Building PWA"
33+
[9]: //huangxuan.me/jsconfcn2017/

_includes/about/zh.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Hi,我是黄玄,前端娱乐圈 NPC,编程语言/编译器初心者,[Facebook](https://www.facebook.com/) 签约软件工程师,[广院](https://baike.baidu.com/item/%E4%B8%AD%E5%9B%BD%E4%BC%A0%E5%AA%92%E5%A4%A7%E5%AD%A6)认证数字设计师,曾被招募为阿里巴巴 · [阿里旅行(飞猪)](http://alitrip.com)· 前端工程师、微影时代 · 微票儿 · 前端基础设施工程团队负责人、[饿了么](https://ele.me/) · 大前端团队 · [PWA 顾问](https://medium.com/elemefe/upgrading-ele-me-to-progressive-web-app-2a446832e509) 等。
2+
3+
目前的物理活动范围主要在美帝硅谷,分身日常出没于[博客](https://huangxuan.me)[微博](https://weibo.com/huxpro)[知乎](https://www.zhihu.com/people/huxpro/pins/posts)[Twitter](https://twitter.com/Huxpro/)[Github](https://github.com/huxpro)[Medium](https://medium.com/@Huxpro)
4+
5+
6+
##### [我的编程语言可视化 (WIP 🚧)](https://huangxuan.me/2020/05/05/pl-chart/)
7+
8+
这个图表可视化了我对于各种编程语言的使用经历、兴趣,还附带了一些评语和解释等等。 啊我知道对比编程语言是一件很有争议的事情……自娱自乐一下!不要太较真哦 ;)
9+
10+
11+
##### 演讲与分享
12+
13+
- [Upgrading to Progressive Web Apps][9] · [JSConf CN 上海 2017](http://2017.jsconf.cn/)
14+
- Building Progressive Web Apps · [CSDI 广州 2017](http://www.csdisummit.com/)
15+
- The State of Progressive Web App · GDG IO Redux 北京 2017
16+
- 炒冷饭 · PWA 到底是个什么玩意?· Baidu HQ 北京 2017
17+
- [Service Worker 101][5] · GDG DevFest 北京 2016
18+
- [Progressive Web App,复兴序章][4] · [QCon 上海 2016](http://2016.qconshanghai.com/presentation/3111)
19+
- Progressive Web App 之我见 · GDG IO Redux 北京 2016
20+
- [CSS Still Sucks 2015][2] · 2015
21+
- [JavaScript 模块化七日谈][1] · 2015
22+
23+
[1]: //huangxuan.me/2015/07/09/js-module-7day/
24+
[2]: //huangxuan.me/2015/12/28/css-sucks-2015/
25+
[3]: //huangxuan.me/2016/06/05/pwa-in-my-pov/
26+
[4]: //huangxuan.me/2016/10/20/pwa-qcon2016/
27+
[5]: //huangxuan.me/2016/11/20/sw-101-gdgdf/
28+
[6]: https://yanshuo.io/assets/player/?deck=58ac8598b123db0067292f92 "PWA Rehashing"
29+
[7]: https://yanshuo.io/assets/player/?deck=593ad6fbfe88c2006a0a0d6d "The State of PWA"
30+
[8]: https://yanshuo.io/assets/player/?deck=594d673d570c357d0698a950 "Building PWA"
31+
[9]: //huangxuan.me/jsconfcn2017/

_includes/ads.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
2+
<!-- first shot -->
3+
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6487568398225121" data-ad-slot="4814308751"
4+
data-ad-format="auto" data-full-width-responsive="true"></ins>
5+
<script>
6+
(adsbygoogle = window.adsbygoogle || []).push({});
7+
</script>

_includes/featured-tags.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{% comment %}
2+
@param {boolean} bottom - bottom will render <hr>
3+
{% endcomment %}
4+
5+
{% if site.featured-tags %}
6+
<section>
7+
{% if include.bottom %}
8+
<hr class="hidden-sm hidden-xs">
9+
{% endif %}
10+
<h5><a href="{{'/archive/' | prepend: site.baseurl }}">FEATURED TAGS</a></h5>
11+
<div class="tags">
12+
{% capture tags %}
13+
{% comment %}
14+
there must be no space between for and if otherwise this tricky sort won't work.
15+
url_encode/decode is for escaping otherwise extra <a> will get generated
16+
but it will break sort...
17+
{% endcomment %}
18+
{% for tag in site.tags %}{% if tag[1].size > site.featured-condition-size %}
19+
<a data-sort="{{ site.posts.size | minus: tag[1].size | prepend: '0000' | slice: -4, 4 }}"
20+
href="{{ site.baseurl }}/archive/?tag={{ tag[0] | url_encode }}"
21+
title="{{ tag[0] }}"
22+
rel="{{ tag[1].size }}">{{ tag[0] }}</a>__SEPARATOR__
23+
{% endif %}{% endfor %}
24+
{% endcapture %}
25+
{{ tags | split:'__SEPARATOR__' | sort }}
26+
</div>
27+
</section>
28+
{% endif %}

_includes/friends.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% if site.friends %}
2+
<hr>
3+
<h5>FRIENDS</h5>
4+
<ul class="list-inline">
5+
{% for friend in site.friends %}
6+
<li><a href="{{friend.href}}">{{friend.title}}</a></li>
7+
{% endfor %}
8+
</ul>
9+
{% endif %}

_includes/intro-header.html

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{% comment %}
2+
@param {string} type - 'page' | 'post' | 'keynote'
3+
@param {boolean} short
4+
{% endcomment %}
5+
6+
{% if include.type == 'post' %}
7+
<style type="text/css">
8+
header.intro-header{
9+
position: relative;
10+
background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}');
11+
background: {{ page.header-bg-css }};
12+
}
13+
14+
{% if page.header-mask %}
15+
header.intro-header .header-mask{
16+
width: 100%;
17+
height: 100%;
18+
position: absolute;
19+
background: rgba(0,0,0, {{ page.header-mask }});
20+
}
21+
{% endif %}
22+
</style>
23+
{% if page.header-style == 'text' %}
24+
<header class="intro-header style-text" >
25+
{% else %}
26+
<header class="intro-header" >
27+
{% endif %}
28+
<div class="header-mask"></div>
29+
{% if page.header-img-credit %}
30+
<div class="header-img-credit">
31+
Image by <a href="//{{page.header-img-credit-href}}">{{page.header-img-credit}}</a>
32+
</div>
33+
{% endif %}
34+
<div class="container">
35+
<div class="row">
36+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
37+
<div class="post-heading">
38+
<div class="tags">
39+
{% for tag in page.tags %}
40+
<a class="tag" href="{{ site.baseurl }}/archive/?tag={{ tag | url_encode }}" title="{{ tag }}">{{ tag }}</a>
41+
{% endfor %}
42+
</div>
43+
<h1>{{ page.title }}</h1>
44+
{% comment %} always create a h2 for keeping the margin {% endcomment %}
45+
<h2 class="subheading">{{ page.subtitle }}</h2>
46+
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
47+
</div>
48+
</div>
49+
</div>
50+
</div>
51+
</header>
52+
{% endif %}
53+
54+
{% if include.type == 'keynote' %}
55+
<style type="text/css">
56+
header.intro-header{
57+
height: 500px;
58+
overflow: hidden;
59+
}
60+
header.intro-header .container{
61+
visibility: hidden;
62+
}
63+
header iframe{
64+
width: 100%;
65+
height: 100%;
66+
border: 0;
67+
}
68+
</style>
69+
<header class="intro-header" >
70+
<iframe src="{{page.iframe}}"></iframe>
71+
<!-- keep for SEO -->
72+
<div class="container">
73+
<div class="row">
74+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
75+
<div class="post-heading">
76+
<div class="tags">
77+
{% for tag in page.tags %}
78+
<a class="tag" href="{{ site.baseurl }}/archive/?tag={{ tag | url_encode }}" title="{{ tag }}">{{ tag }}</a>
79+
{% endfor %}
80+
</div>
81+
<h1>{{ page.title }}</h1>
82+
{% comment %} always create a h2 for keeping the margin {% endcomment %}
83+
<h2 class="subheading">{{ page.subtitle }}</h2>
84+
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %}
85+
on {{ page.date | date: "%B %-d, %Y" }}</span>
86+
</div>
87+
</div>
88+
</div>
89+
</div>
90+
</header>
91+
{% endif %}
92+
93+
{% if include.type == 'page' %}
94+
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
95+
<div class="container">
96+
<div class="row">
97+
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
98+
{% if include.short %}
99+
<div class="site-heading" id="tag-heading">
100+
{% else %}
101+
<div class="site-heading">
102+
{% endif %}
103+
<h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
104+
<span class="subheading">{{ page.description }}</span>
105+
</div>
106+
</div>
107+
</div>
108+
</div>
109+
</header>
110+
{% endif %}

_includes/mathjax_support.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<script type="text/x-mathjax-config">
2+
MathJax.Hub.Config({
3+
TeX: {
4+
equationNumbers: {
5+
autoNumber: "AMS"
6+
}
7+
},
8+
SVG: {
9+
scale: 90
10+
},
11+
tex2jax: {
12+
inlineMath: [ ['$','$'] ],
13+
displayMath: [ ['$$','$$'] ],
14+
processEscapes: true,
15+
}
16+
});
17+
</script>
18+
<script type="text/javascript"
19+
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG">
20+
</script>

_includes/multilingual-sel.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- Language Selector -->
2+
<select class="sel-lang" onchange= "onLanChange(this.options[this.options.selectedIndex].value)">
3+
<option value="0" selected> 中文 | Chinese </option>
4+
<option value="1"> 英文 | English </option>
5+
</select>
6+

0 commit comments

Comments
 (0)