forked from Huxpro/huxpro.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathabout.html
76 lines (58 loc) · 1.93 KB
/
about.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
layout: page
title: "About Me"
description: ""
header-img: "img/about-bg.jpg"
---
<!-- Language Selector -->
<select onchange= "onLanChange(this.options[this.options.selectedIndex].value)">
<option value="0" selected> 中文 Chinese </option>
<option value="1"> 英文 English </option>
</select>
<!-- Chinese Version -->
<div class="zh post-container">
<!--copied from markdown -->
<blockquote><p>享受技术<br>
热爱生活</p></blockquote>
<p>我是许敏,09年毕业于西南大学计科系。毕业后在淘宝和天猫的会员营销共工作过近3年的时间,也曾在创业小团队热情拼搏过一段时间,现在从事着大数据计算相关的工作。<br/>
keywords: java,hadoop,spark,kafka,docker,recommender system</p>
</div>
<!-- English Version -->
<div class="en post-container">
<blockquote><p>System Architect & Senior Developer <br></p></blockquote>
</div>
<!-- Handle Language Change -->
<script type="text/javascript">
// get nodes
var $zh = document.querySelector(".zh");
var $en = document.querySelector(".en");
var $select = document.querySelector("select");
// bind hashchange event
window.addEventListener('hashchange', _render);
// handle render
function _render(){
var _hash = window.location.hash;
// en
if(_hash == "#en"){
$select.selectedIndex = 1;
$en.style.display = "block";
$zh.style.display = "none";
// zh by default
}else{
// not trigger onChange, otherwise cause a loop call.
$select.selectedIndex = 0;
$zh.style.display = "block";
$en.style.display = "none";
}
}
// handle select change
function onLanChange(index){
if(index == 0){
window.location.hash = "#zh"
}else{
window.location.hash = "#en"
}
}
// init
_render();
</script>