Commit 41e8c19f authored by Murukesh Mohanan's avatar Murukesh Mohanan

Multilingual stuff, and JavaScript's back!

parent eb66ec96
...@@ -23,7 +23,7 @@ Or, alternatively: ...@@ -23,7 +23,7 @@ Or, alternatively:
---- ----
The site is written for Jekyll as used by Github Pages, and that is The site is written for Jekyll as used by Github Pages, and that is
installed on mars. The site is updated using: installed on mars. The site is updated on www.cse.iitb.ac.in using:
```sh ```sh
cd ~/devel/web && cd ~/devel/web &&
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
{% else %} {% else %}
{% assign pagestyle = layout.pagestyle %} {% assign pagestyle = layout.pagestyle %}
{% endif %} {% endif %}
{% if page.script %}
<script src="js/{{ page.script }}.js" type="text/javascript">
</script>
{% endif %}
{% if pagestyle %} {% if pagestyle %}
<link rel="stylesheet" href="{{ site.base-url }}/styles/{{ pagestyle }}.css" type="text/css"> <link rel="stylesheet" href="{{ site.base-url }}/styles/{{ pagestyle }}.css" type="text/css">
{% endif %} {% endif %}
......
...@@ -11,7 +11,7 @@ permalink: /cv/ ...@@ -11,7 +11,7 @@ permalink: /cv/
{:.org} {:.org}
<details markdown="1"> <details markdown="1">
- TBC - Tokyo, Japan
</details> </details>
<!-- section --> <!-- section -->
...@@ -37,6 +37,8 @@ Computer Science and Engineering ...@@ -37,6 +37,8 @@ Computer Science and Engineering
<details markdown="1"> <details markdown="1">
### Senior Application Developer ### Senior Application Developer
- Chennai, India
</details> </details>
<!-- section --> <!-- section -->
......
--- ---
title: About Me title: About Me
pagestyle: index
script: index
--- ---
- {:#en .active} En
- {:#ml} മ
- {:#jp} 日
{:#i18n}
Call me Muru. Call me Muru.
{:.en .active}
私は ムルケシュ モハナン です。
ムルーと 呼んで ください。
どうぞ よろしく おねがいします。
二千十六年七月から 日本語を ならった います。
{:.jp .inactive}
എന്റെ പേര മുരുകെഷ് ആണു.
എന്നെ മുരു എന്നു വിളിക്കുക.
മലയാളി ആണെങ്കിലും വളര്‍നതു ബോംബെയില്‍ ആണു.
{:.ml .inactive}
I know English, മലയാളം (Malayalam), हिंदी (Hindi), and a smattering of 日本語 (Japanese) and मराठी (Marathi).
<!-- section --> <!-- section -->
......
(
function(m) {
var currentButton = 'en';
var swapClass = function (classList, del, add) {
}
m.SwitchTo = function (id) {
if (id == currentButton) {
return;
}
var next_el = document.getElementById(id);
var curr_el = document.getElementById(currentButton);
next_el.className = 'active';
curr_el.className = 'inactive';
to_hide = document.getElementsByClassName(currentButton);
to_show = document.getElementsByClassName(id);
Array.prototype.forEach.call(to_hide, function(elem){
elem.classList.remove('active');
elem.classList.add('inactive');
});
Array.prototype.forEach.call(to_show, function(elem){
elem.classList.remove('inactive');
elem.classList.add('active');
});
currentButton = id;
};
window.onload = function () {
document.getElementById('i18n').childNodes.forEach(
function(elem) {
if (elem.tagName == "LI") {
console.log(elem.id);
elem.onclick = function() {
m.SwitchTo(elem.id);
};
}
}
);
};
}(window.M = window.M || {})
);
ul#i18n li {
display: inline-block;
list-style: none;
width: 3em;
font-size: 0.7em;
background-color: #505050;
text-align: center;
margin-left: 0;
border: 0.05em solid #555555;
}
#i18n {
border-radius: 0.2em;
overflow: hidden;
display: flex;
float: right;
box-shadow: inset 0 0 0.1em 0.1em rgba(128,128,128,0.75);
}
#i18n li.active {
box-shadow: 0 0 0.1em 0.1em rgba(16,16,16,0.85);
background-color: #606060;
z-index: 1000;
border-radius: 0.1em;
border: 0.1em solid #555555;
}
.active {
display: initial;
}
.inactive {
display: none;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment