Multilingual URLs do not work on thebookofshaders.com/appendix/
This commit is contained in:
Yvan Sraka 2017-08-20 16:22:24 +02:00
parent e92bdbd414
commit ba2c5c6ea8
8 changed files with 202 additions and 153 deletions

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,31 +1,32 @@
<?php
$path = "../../";
$subtitle = "learning to fly";
$language = isset( $_GET[ 'lan' ] ) ? $_GET[ 'lan' ] : "";
$path = "../..";
$README = "README";
$language = "";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
/*
echo '
</div>
<hr>
<ul class="navigationBar" >
<!--li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li /-->
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
//*/
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
include($path."/footer.php");
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,25 +1,32 @@
<?php
$path = "../../";
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
<?php
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$path = "../..";
$README = "README";
$language = "";
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/footer.php");
include($path."/src/parsedown/Parsedown.php");
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
<hr>
<ul class="navigationBar" >
<li class="navigationBar" onclick="previusPage()">&lt; &lt; Previous</li>
<li class="navigationBar" onclick="homePage()"> Home </li>
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
?>

View File

@ -1,17 +1,23 @@
<?php
<?php
$path = "..";
$README = "README";
$language = "";
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
include($path."/header.php");
include($path."/chap-header.php");
echo '<div id="content">';
include($path."/src/parsedown/Parsedown.php");
echo '
<div class="header"><p><a href="https://thebookofshaders.com/">The Book of Shaders</a> by <a href="http://patriciogonzalezvivo.com">Patricio Gonzalez Vivo</a></p></div>
<hr>
<div id="content">
';
$Parsedown = new Parsedown();
echo $Parsedown->text(file_get_contents ('README.md'));
echo $Parsedown->text(file_get_contents($README.'.md'));
echo '
</div>
@ -22,5 +28,5 @@
<li class="navigationBar" onclick="nextPage()">Next &gt; &gt;</li>
</ul>';
include($path."/footer.php");
include($path."/footer.php");
?>