diff options
author | Pim van den Berg | 2015-05-16 16:37:53 +0200 |
---|---|---|
committer | Pim van den Berg | 2015-06-21 18:06:05 +0200 |
commit | 727ed753a9c540c71f00bafa6e43ad4cb42321f2 (patch) | |
tree | 2c0b44a62ec658de5ec4b891d72492024189fcf8 /inc/html.inc.php | |
parent | responsive: make the host page look nice on all media (diff) | |
download | apt-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.php | 33 |
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 | |||
94 | EOT; | 94 | EOT; |
95 | } | 95 | } |
96 | 96 | ||
97 | function html_end() { | 97 | function 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 | ||
121 | EOT; | 122 | EOT; |
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'; |