diff --git a/appendix/00/index.php b/appendix/00/index.php index 041cc63..00f2758 100644 --- a/appendix/00/index.php +++ b/appendix/00/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/01/index.php b/appendix/01/index.php index 041cc63..00f2758 100644 --- a/appendix/01/index.php +++ b/appendix/01/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/02/index.php b/appendix/02/index.php index 041cc63..00f2758 100644 --- a/appendix/02/index.php +++ b/appendix/02/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/03/index.php b/appendix/03/index.php index 041cc63..00f2758 100644 --- a/appendix/03/index.php +++ b/appendix/03/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/04/index.php b/appendix/04/index.php index 9ab9c01..00f2758 100644 --- a/appendix/04/index.php +++ b/appendix/04/index.php @@ -1,31 +1,32 @@

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - $Parsedown = new Parsedown(); - echo $Parsedown->text(file_get_contents ('README.md')); - /* - echo ' -
-
- '; - //*/ + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); - include($path."/footer.php"); + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/05/index.php b/appendix/05/index.php index 041cc63..00f2758 100644 --- a/appendix/05/index.php +++ b/appendix/05/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/06/index.php b/appendix/06/index.php index 041cc63..00f2758 100644 --- a/appendix/06/index.php +++ b/appendix/06/index.php @@ -1,25 +1,32 @@ -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; + $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 ' -
-
- '; + include($path."/header.php"); + include($path."/chap-header.php"); + echo '
'; - include($path."/footer.php"); + include($path."/src/parsedown/Parsedown.php"); + $Parsedown = new Parsedown(); + echo $Parsedown->text(file_get_contents($README.'.md')); + + echo ' +
+
+ '; + + include($path."/footer.php"); ?> diff --git a/appendix/index.php b/appendix/index.php index e8d7d64..3ee01f6 100644 --- a/appendix/index.php +++ b/appendix/index.php @@ -1,17 +1,23 @@ -'; + include($path."/src/parsedown/Parsedown.php"); - - echo ' -

The Book of Shaders by Patricio Gonzalez Vivo

-
-
- '; - $Parsedown = new Parsedown(); - echo $Parsedown->text(file_get_contents ('README.md')); + echo $Parsedown->text(file_get_contents($README.'.md')); echo '
@@ -22,5 +28,5 @@ '; - include($path."/footer.php"); + include($path."/footer.php"); ?>