aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/dispy/theme.php
diff options
context:
space:
mode:
authorSimon <simon@kisikew.org>2012-04-26 13:23:23 -0700
committerSimon <simon@kisikew.org>2012-04-26 13:23:23 -0700
commit552895001c5b0a43b3e37e8dbdedda718dd882c6 (patch)
tree2ba64b2890eb342beed92e320f677f1cbdfd8d5f /view/theme/dispy/theme.php
parent82abb14bf9393d47e8c38ff9487f0855e22d78a7 (diff)
parentd6116b6979fb3d0f706550e0e5ca91c18079b3fd (diff)
downloadvolse-hubzilla-552895001c5b0a43b3e37e8dbdedda718dd882c6.tar.gz
volse-hubzilla-552895001c5b0a43b3e37e8dbdedda718dd882c6.tar.bz2
volse-hubzilla-552895001c5b0a43b3e37e8dbdedda718dd882c6.zip
Merge pull request #268 from simonlnu/master
announced dipsy change. re-tie your boots, we're in for a wee ride ;)
Diffstat (limited to 'view/theme/dispy/theme.php')
-rw-r--r--view/theme/dispy/theme.php35
1 files changed, 29 insertions, 6 deletions
diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php
index b72de51e5..1598220b8 100644
--- a/view/theme/dispy/theme.php
+++ b/view/theme/dispy/theme.php
@@ -2,22 +2,38 @@
/*
* Name: Dispy
- * Description: Dispy, Friendica theme
- * Version: 1.1
- * Author: unknown
+ * Description: <p style="white-space:pre;"> Dispy: Light, Spartan, Sleek, and Functional<br /> Dispy Dark: Dark, Spartan, Sleek, and Functional</p>
+ * Version: 1.2
+ * Author: Simon <http://simon.kisikew.org/>
* Maintainer: Simon <http://simon.kisikew.org/>
* Screenshot: <a href="screenshot.jpg">Screenshot</a>
*/
$a = get_app();
$a->theme_info = array(
- 'name' => 'dispy',
- 'version' => '1.1'
+ 'family' => 'dispy',
+ 'version' => '1.2'
);
function dispy_init(&$a) {
- // aside on profile page
+ /** @purpose set some theme defaults
+ */
+ $cssFile = null;
+ $colour = false;
+ $colour = get_pconfig(local_user(), "dispy", "colour");
+ if ($colour === false) { $colour = "light"; }
+ if ($colour == "light") {
+ $colour_path = "/light/";
+ require_once ('light/theme.php');
+ }
+ if ($colour == "dark") {
+ $colour_path = "/dark/";
+ require_once ('dark/theme.php');
+ }
+
+ /** @purpose aside on profile page
+ */
if (($a->argv[0] . $a->argv[1]) === ("profile" . $a->user['nickname'])) {
dispy_community_info();
}
@@ -139,10 +155,17 @@ function dispy_init(&$a) {
</script>
EOT;
+ // custom css
+ if (!is_null($cssFile)) {
+ $a->page['htmlhead'] .= sprintf('<link rel="stylesheet" type="text/css" href="%s" />', $cssFile);
+ }
+
js_in_foot();
}
function dispy_community_info() {
+ /** @purpose some sidebar stuff for new users
+ */
$a = get_app();
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;