Merge pull request #109 from patriciogonzalezvivo/lang-switcher

Add language links to the top page
This commit is contained in:
Patricio Gonzalez Vivo 2016-10-31 04:29:53 -07:00 committed by GitHub
commit 30381315c8
3 changed files with 25 additions and 11 deletions

View File

@ -97,18 +97,29 @@ img {
color: #999; color: #999;
} }
.header .subtitle { .toc-header {
font-size: 16px;
line-height: 16px;
margin-top: 24px;
margin-bottom: 24px;
text-align: right;
color: #999;
} }
.header .subtitle a{ .header .subtitle {
}
.header .subtitle a,
.toc-header .subtitle a {
font-size: 1.3em; font-size: 1.3em;
font-style: italic; font-style: italic;
text-decoration: none; text-decoration: none;
border: 0!important; border: 0!important;
} }
.header a{ .header a,
.toc-header a {
font-size: 0.8em; font-size: 0.8em;
font-style: italic; font-style: italic;
text-decoration: none; text-decoration: none;
@ -228,7 +239,7 @@ code {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 700px; max-width: 700px;
} }
.simpleFunction .CodeMirror { .simpleFunction .CodeMirror {
@ -357,4 +368,3 @@ code {
font-style: italic; font-style: italic;
text-align: right; text-align: right;
} }

View File

@ -1,4 +1,4 @@
<?php <?php
$path = "."; $path = ".";
$subtitle = ""; $subtitle = "";
$README = "README"; $README = "README";
@ -12,13 +12,14 @@
} }
include("header.php"); include("header.php");
include("toc-header.php");
echo '<div id="content">'; echo '<div id="content">';
include($path."/src/parsedown/Parsedown.php"); include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown(); $Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md')); echo $Parsedown->text(file_get_contents($README.'.md'));
echo '</div>'; echo '</div>';
include("footer.php"); include("footer.php");
?> ?>

3
toc-header.php Normal file
View File

@ -0,0 +1,3 @@
<div class="toc-header">
<p> <a href="?lan=jp">日本</a> - <a href="?lan=ch">中文版</a> - <a href="?lan=kr">한국어</a> - <a href="?lan=es">Español</a> - <a href="?lan=fr">Français</a> - <a href="?lan=it">Italiano</a> - <a href=".">English</a></p>
</div>