aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-05-23 22:19:02 +0200
committerMario Vavti <mario@mariovavti.com>2015-05-23 22:19:02 +0200
commitf575ef551d5c22953080faab5890b675c6e0985e (patch)
tree9249af53589ddf82904f56699a4281d122d48c75 /include
parent81d94dae2c5f986a5d5784f66b378d6320de2c07 (diff)
downloadvolse-hubzilla-f575ef551d5c22953080faab5890b675c6e0985e.tar.gz
volse-hubzilla-f575ef551d5c22953080faab5890b675c6e0985e.tar.bz2
volse-hubzilla-f575ef551d5c22953080faab5890b675c6e0985e.zip
use $a->data instead of $a->page for $content and ad another library for use with webpages - foundation
Diffstat (limited to 'include')
-rw-r--r--include/comanche.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/comanche.php b/include/comanche.php
index 93cbd8b12..9fe7dc255 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -175,12 +175,12 @@ function comanche_block($s, $class = '') {
}
if($r[0]['title'] && trim($r[0]['title']) === '$content' && get_app()->data['webpage'][0]['title']) {
- $o .= '<h3>' . get_app()->data['webpage'][0]['title'] . '</h3>';
+ $o .= '<h3>' . get_app()->page['title'] . '</h3>';
}
if(trim($r[0]['body']) === '$content') {
- $o .= prepare_text(get_app()->data['webpage'][0]['body'], get_app()->data['webpage'][0]['mimetype']);
+ $o .= prepare_text(get_app()->page['content'], get_app()->data['webpage'][0]['mimetype']);
}
else {
$o .= prepare_text($r[0]['body'], $r[0]['mimetype']);
@@ -202,9 +202,17 @@ function comanche_js($s) {
case 'bootstrap':
$path = 'library/bootstrap/js/bootstrap.min.js';
break;
+ case 'foundation':
+ $path = 'library/foundation/js/foundation.min.js';
+ $init = "\r\n" . '<script>$(document).ready(function() { $(document).foundation(); });</script>';
+ break;
}
- return '<script src="' . z_root() . '/' . $path . '" ></script>';
+ $ret = '<script src="' . z_root() . '/' . $path . '" ></script>';
+ if($init)
+ $ret .= $init;
+
+ return $ret;
}
@@ -214,9 +222,14 @@ function comanche_css($s) {
case 'bootstrap':
$path = 'library/bootstrap/css/bootstrap.min.css';
break;
+ case 'foundation':
+ $path = 'library/foundation/css/foundation.min.css';
+ break;
}
- return '<link rel="stylesheet" href="' . z_root() . '/' . $path . '" type="text/css" media="screen">';
+ $ret = '<link rel="stylesheet" href="' . z_root() . '/' . $path . '" type="text/css" media="screen">';
+
+ return $ret;
}