forked from patriciogonzalezvivo/thebookofshaders
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
38 lines (31 loc) · 841 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$path = "..";
$README = "README";
$language = "";
if ( !empty($_GET['lan']) ) {
if (file_exists($README.'-'.$_GET['lan'].'.md')) {
$language = '-'.$_GET['lan'];
$README .= $language;
}
}
if(!empty($_GET))
$subtitle = ": ".$_GET['search'];
include($path."/header.php");
include($path."/src/parsedown/Parsedown.php");
?>
<div class="header">
<p class="subtitle"><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">
<?php
$Parsedown = new Parsedown();
if(empty($_GET['search']))
echo $Parsedown->text(file_get_contents($README.'.md'));
else
echo $Parsedown->text(file_get_contents ( $_GET['search'].'/'.$README.'.md' ));
echo '
</div>
<hr>';
include($path."/footer.php");
?>