This commit is contained in:
arcan1s 2014-01-16 23:48:21 +04:00
parent 13661ada27
commit 5846df6c8e
3 changed files with 10 additions and 12 deletions

View File

@ -27,8 +27,8 @@
<script>
var languageinfo=navigator.language? navigator.language : navigator.userLanguage
function redirectpage(dest) {
if (window.location.replace) window.location.replace(dest)
else window.location=dest
if (window.location.replace) window.location.replace(dest)
else window.location=dest
}
if (languageinfo.substr(0,2) == "ru") redirectpage("/ru/404")
</script>

View File

@ -41,11 +41,7 @@
{% endif %}
{% if page.category == "ru" %}
<small>Расположено на GitHub Pages. <a href="/ru/authors">Авторы</a></small></p>
{% if page.title == "arcanis" %}
<p><a href="/en/"><img src="/resources/en.png"></a></p>
{% else %}
<p><a href="{{ page.url | replace: '/ru/', '/' }}"><img src="/resources/en.png"></a></p>
{% endif %}
<p><a href="{{ page.url | replace: '/ru/', '/' }}"><img src="/resources/en.png"></a></p>
{% else %}
<small>Hosted on GitHub Pages. <a href="/authors">Authors</a></small></p>
<p><a href="/ru{{ page.url }}"><img src="/resources/ru.png"></a></p>

View File

@ -15,17 +15,19 @@ title: arcanis' homepage
<p class="view"><a href="/about">About me</a></p>
</header>
<section>
<!-- redirection to russian page -->
<script>
var languageinfo=navigator.language? navigator.language : navigator.userLanguage
function redirectpage(dest) {
if (window.location.replace) window.location.replace(dest)
else window.location=dest
if (window.location.replace) window.location.replace(dest)
else window.location=dest
}
if (document.referrer != "http://localhost:4000/ru/") {
var languageinfo=navigator.language? navigator.language : navigator.userLanguage
if (languageinfo.substr(0,2) == "ru") redirectpage("/ru/")
}
if (languageinfo.substr(0,2) == "ru") redirectpage("/ru/")
</script>
<!-- redirection to russian page -->
<section>
<h3><a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome</h3>
<p align="justify">Welcome to my homepage, <code>`echo $USERNAME`</code>. About me you may read on <a href="/about">the link</a>. I'm sorry I don't know html/php/ruby/etc (but I know GoogleFOO! At least, I think so), therefore this page may not look very pretty. But I tried (or may be not). In the blog I will write some papers about programming, living in Archlinux system and may be package maintaining. Also I will create pages for some of <a href="https://github.com/arcan1s">my projects</a>.</p>