-
Notifications
You must be signed in to change notification settings - Fork 3
/
about.html
73 lines (60 loc) · 2.25 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"
description: "Hi, this is Slade."
header-img: "img/about-bg.jpg"
---
<!-- 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>
<!-- Chinese Version -->
<div class="zh post-container">
<!--copied from markdown -->
<blockquote><p>Stay hungry,<br>
Stay foolish</p></blockquote>
<p>我是<strong>slade</strong>,现在在读硕士。主要的研究兴趣在计算机视觉和机器学习。目前主要在做场景文字识别(STR)。具体的项目可以参见<a href="http://slade-ruan.me/portfolio/">Project</a></p>
</div>
<!-- English Version -->
<div class="en post-container">
<blockquote><p>Stay hungry <br>
Stay foolish.</p></blockquote>
<p>Hi, I am <strong>Slade</strong>. Currently, I'm studing for my master degree. Majored in pattern recognition and intelligent system.</p>
<p>My research focus mainly on computer vision and machine learning. Currently, I'm working on scene text recognition & detection. See <a href="http://slade-ruan.me/portfolio/">here</a> for more detail.</p>
</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>