Skip to content

Commit

Permalink
Merge pull request #284 from SharmPRO/develop
Browse files Browse the repository at this point in the history
Custom Menu Logo. Closes #5
  • Loading branch information
shprink committed Oct 18, 2016
2 parents e14e0dd + ed40bf7 commit af62e57
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CONFIGURATION.md
Expand Up @@ -158,6 +158,7 @@ Here is a simple view of what you can configure:
* menu
* exposeAsideWhen
* list
* logo
* settings
* cache
* views
Expand Down Expand Up @@ -211,6 +212,9 @@ The media query used to determine when to always display the left menu.
```
"exposeAsideWhen": "(min-width:900px)"
```
"logo": [String] (default: "/config/logo.png", null to disable, optimized 42 x 42px transparent)

Your website logo. The logo will appear on the left of the title

### Settings configuration.

Expand Down
1 change: 1 addition & 0 deletions config/config.default.cson
Expand Up @@ -49,6 +49,7 @@
"state": "public.posts"
"params": {}
"exposeAsideWhen": "(min-width:900px)"
"logo": "/config/logo.png" # null will disable

# SETTINGS PAGE
"settings":
Expand Down
Binary file added dist/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/index.coffee
Expand Up @@ -126,6 +126,7 @@ app.controller 'WPHCMainController' , ($log, $WPHCConfig) ->
vm.appVersion = wordpressHybridClient.version || null
vm.appConfig = $WPHCConfig
vm.appTitle = vm.appConfig.title || null
vm.appLogo = vm.appConfig.menu.logo || null
vm

###
Expand Down
4 changes: 4 additions & 0 deletions lib/scss/_bar.scss 100644 → 100755
@@ -1,3 +1,7 @@
.bar {

}
.bar-logo{
width:42px;
height:42px;
}
1 change: 1 addition & 0 deletions lib/scss/_post.scss 100644 → 100755
Expand Up @@ -162,4 +162,5 @@ wphc-post {
}
}
@include post-item("../img/post-img-border.png");

}
1 change: 1 addition & 0 deletions lib/templates/module/menu.html
@@ -1,4 +1,5 @@
<ion-header-bar class="bar-positive">
<div ng-if="::main.appLogo" class="bar-logo" wphc-img-background-cache="{{::main.appLogo}}"></div>
<h1 class="title">{{main.appTitle}}</h1>
</ion-header-bar>
<ion-content>
Expand Down
1 change: 1 addition & 0 deletions scripts/install.js
Expand Up @@ -8,6 +8,7 @@ copy('../dist/config.xml', '../config.xml');
copy('../dist/config.scss', '../config/config.scss');
copy('../dist/index.js', '../config/index.js', true);
copy('../dist/templates', '../config/templates');
copy('../dist/logo.png', '../config/logo.png', true);
copy('../release.sh.dist', '../release.sh');

function copy(source, target, overwrite) {
Expand Down

0 comments on commit af62e57

Please sign in to comment.