Navigation Menu

Skip to content

Commit

Permalink
#269: added custom logo support and installation/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Matti Maier committed Jan 7, 2018
1 parent 2090957 commit fe18d85
Show file tree
Hide file tree
Showing 13 changed files with 1,010 additions and 8 deletions.
Binary file added Assets/BNote_Logo_white_transparent_44px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/BNote_Logo_white_transparent_800px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions BNote-Releases/build_patch.sh
Expand Up @@ -10,6 +10,11 @@ fi
# Change to root dir of BNote Repo
cd ..

# Compile Themes
cd BNote/style/css
./compile_themes.sh
cd -

# Check if the tmp folder exists -> if so, clean it otherwise create it
if [ -d "$tmp_dir" ]; then
rm -r $tmp_dir/*
Expand Down
6 changes: 6 additions & 0 deletions BNote/install.php
Expand Up @@ -142,6 +142,12 @@ private function write_appConfig() {
and should be displayed and functional, otherwise false. -->
<UseInfoPages>True</UseInfoPages>
<!-- Theme Name -->
<Theme>default</Theme>
<!-- Logo, BNote's Logo by default. Please put your logo in BNote/style/images -->
<Logo>BNote_Logo_white_transparent_44px.png</Logo>
<!-- The webpages available in the website module.
A page tag contains an attribute \"file\" specifying the filename without the html-extension
in the data/webpages folder and the body containing the displayed name of the page. -->
Expand Down
20 changes: 20 additions & 0 deletions BNote/src/data/systemdata.php
Expand Up @@ -23,6 +23,7 @@ class Systemdata {
private $dir_prefix;

private $theme;
private $logoFilename;

/**
* Creates a new system data object.
Expand Down Expand Up @@ -511,10 +512,16 @@ public function getVersion() {
return $this->version;
}

/**
* @return String Language Code to use from the settings.
*/
public function getLang() {
return $this->getDynamicConfigParameter("language");
}

/**
* @return string Name of the theme to use.
*/
public function getTheme() {
if($this->theme == null) {
$this->theme = $this->cfg_system->getParameter("Theme");
Expand All @@ -524,6 +531,19 @@ public function getTheme() {
}
return $this->theme;
}

/**
* @return string Filename of the logo in style/images
*/
public function getLogoFilename() {
if($this->logoFilename == null) {
$this->logoFilename = $this->cfg_system->getParameter("Logo");
if($this->logoFilename == null) {
return "BNote_Logo_white_transparent_44px.png";
}
}
return $this->logoFilename;
}
}

?>
2 changes: 1 addition & 1 deletion BNote/src/presentation/banner.php
Expand Up @@ -2,7 +2,7 @@
<div id="banner">
<div id="bannerContent">
<div id="logoBanner">
<img height="44px" src="style/images/BNote_Logo_white_on_blue_44px.png" />
<img height="44px" src="style/images/<?php echo $system_data->getLogoFilename(); ?>" />
</div>

<div id="CompanyName"><?php echo $system_data->getCompany(); ?></div>
Expand Down
13 changes: 13 additions & 0 deletions BNote/style/css/compile_themes.sh
@@ -0,0 +1,13 @@
cd dark
lessc bnote.less > bnote.css

cd ../green
lessc bnote.less > bnote.css

cd ../orange
lessc bnote.less > bnote.css

cd ../red
lessc bnote.less > bnote.css

cd ..

0 comments on commit fe18d85

Please sign in to comment.