aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/html.inc.php
diff options
context:
space:
mode:
authorPim van den Berg2015-05-16 16:37:53 +0200
committerPim van den Berg2015-06-21 18:06:05 +0200
commit727ed753a9c540c71f00bafa6e43ad4cb42321f2 (patch)
tree2c0b44a62ec658de5ec4b891d72492024189fcf8 /inc/html.inc.php
parentresponsive: make the host page look nice on all media (diff)
downloadapt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.zip
apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.gz
apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.bz2
apt-panopticon_cgp-727ed753a9c540c71f00bafa6e43ad4cb42321f2.tar.xz
responsive: introduce a hamburger navicon to toggle the menu on smaller devices
Diffstat (limited to '')
-rw-r--r--inc/html.inc.php33
1 files changed, 17 insertions, 16 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index 7fedeb6..7312601 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -94,32 +94,33 @@ echo <<<EOT
94EOT; 94EOT;
95} 95}
96 96
97function html_end() { 97function html_end($footer = false) {
98 global $CONFIG; 98 global $CONFIG;
99 99
100 $git = '/usr/bin/git'; 100 if ($footer) {
101 $changelog = $CONFIG['webdir'].'/doc/CHANGELOG'; 101 $git = '/usr/bin/git';
102 102 $changelog = $CONFIG['webdir'].'/doc/CHANGELOG';
103 $version = 'v?';
104 if (file_exists($git) && is_dir($CONFIG['webdir'].'/.git')) {
105 chdir($CONFIG['webdir']);
106 $version = exec($git.' describe --tags');
107 } elseif (file_exists($changelog)) {
108 $changelog = file($changelog);
109 $version = explode(' ', $changelog[0]);
110 $version = 'v'.$version[0];
111 }
112 103
113 $html_weburl = htmlentities($CONFIG['weburl']); 104 $version = 'v?';
105 if (file_exists($git) && is_dir($CONFIG['webdir'].'/.git')) {
106 chdir($CONFIG['webdir']);
107 $version = exec($git.' describe --tags');
108 } elseif (file_exists($changelog)) {
109 $changelog = file($changelog);
110 $version = explode(' ', $changelog[0]);
111 $version = 'v'.$version[0];
112 }
114 113
115 echo <<<EOT 114 $html_weburl = htmlentities($CONFIG['weburl']);
115
116 echo <<<EOT
116</div> 117</div>
117<div id="footer"> 118<div id="footer">
118<hr><span class="small"><a href="http://pommi.nethuis.nl/category/cgp/" rel="external">Collectd Graph Panel</a> ({$version}) is distributed under the <a href="{$html_weburl}doc/LICENSE" rel="license">GNU General Public License (GPLv3)</a></span> 119<hr><span class="small"><a href="http://pommi.nethuis.nl/category/cgp/" rel="external">Collectd Graph Panel</a> ({$version}) is distributed under the <a href="{$html_weburl}doc/LICENSE" rel="license">GNU General Public License (GPLv3)</a></span>
119</div> 120</div>
120 121
121EOT; 122EOT;
122 123 }
123 if ($CONFIG['graph_type'] == 'canvas') { 124 if ($CONFIG['graph_type'] == 'canvas') {
124 if ($CONFIG['rrd_fetch_method'] == 'async') { 125 if ($CONFIG['rrd_fetch_method'] == 'async') {
125 $js_async = 'true'; 126 $js_async = 'true';