-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
47 lines (39 loc) · 1.64 KB
/
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
39
40
41
42
43
44
45
46
47
<?php
require_once('vendor/autoload.php');
$config = require_once('config.php');
if (file_exists('config.local.php')) {
$userConfig = require_once('config.local.php');
$config['modules'] = array_merge($config['modules'], $userConfig['modules']);
}
?>
<html>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="libs/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="libs/bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="libs/syntaxhighlighter_3.0.83/styles/shCoreDefault.css"/>
<link rel="stylesheet" href="libs/syntaxhighlighter_3.0.83/styles/shThemeGithub.css"/>
<link rel="stylesheet" href="css/style.css">
<script src="libs/jquery/jquery.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="libs/syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
<script type="text/javascript" src="libs/syntaxhighlighter_3.0.83/scripts/shBrushPhp.js"></script>
<body>
<div id="main">
<h1>CodeGenerator</h1>
<?php $generator = new codegenerator\CodeGenerator(); ?>
<?php echo $generator->generateHtml(codegenerator\Request::getCurrentRequest(), $config['modules']); ?>
</div>
<script>
$('.nav-tabs a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
var activeTab = 'Input';
if (window.location.href.match(/#/)) {
activeTab = window.location.href.replace(/.*#/, '');
}
$('.nav-tabs a[href="#' + activeTab + '"]').tab('show');
SyntaxHighlighter.all();
</script>
</body>
</html>