From a4b6f99382d9504b0967a4abf21399afe39eeb6e Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 08:14:08 +0200 Subject: [PATCH 1/6] Custom Menu Logo --- CONFIGURATION.md | 5 +++++ config/config.default.cson | 1 + lib/img/logo.png | Bin 0 -> 1692 bytes lib/index.coffee | 1 + lib/scss/_post.scss | 2 ++ lib/templates/module/menu.html | 3 +++ 6 files changed, 12 insertions(+) create mode 100644 lib/img/logo.png diff --git a/CONFIGURATION.md b/CONFIGURATION.md index 1be0e319b..0cd207e61 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -150,6 +150,7 @@ The default values live under `config/config.default.cson` (file that you should Here is a simple view of what you can configure: * title +* logo * ionicConfig * api * baseUrl @@ -198,6 +199,10 @@ Here is a simple view of what you can configure: Your website title. The title will appear on the top of the left navigation menu +### logo [String] (null to disable, replace original file to customize) + +Your website logo. The logo will appear on the left of the title + ### ionicConfig [Object] allow overwriting ionic configuration diff --git a/config/config.default.cson b/config/config.default.cson index c7b0d2a8f..e5cb11453 100755 --- a/config/config.default.cson +++ b/config/config.default.cson @@ -8,6 +8,7 @@ "title": "Your Blog title" +"logo": "/img/logo.png" # API "api": diff --git a/lib/img/logo.png b/lib/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..645e57c922281119aa81afb3172070789802fa51 GIT binary patch literal 1692 zcmV;N24ne&P)<+d1FN_y6ZV zCoS0+U8D^LUIgX?2Y?QM0a4&^cCohbwUCyXQ>+b1yBz@$4*^qvZ9pra0Ty6O@UaeD z0(Jm}z@xWHU^?(Va7>7y0pc_;19;$Oip&7E3u`F}*jYtdc+@xAvndxT^6(@;$s!BL zU8vC)zZ&OjjX+%E*5fB*V7gJKrl2;HQXKiljP35(o$l-<9$+T1h?H=eWEq)??vD|VZ- zDjcIpr8*ZmV}n8Edt$U~r%4O8nKXNoNnXB56T#0C54EN)M(*g+?Ak+Tt;7oKQl~w| zjN##JA{#In(ce*(@MTmk>X9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.appVersion = wordpressHybridClient.version || null vm.appConfig = $WPHCConfig vm.appTitle = vm.appConfig.title || null + vm.appLogo = vm.appConfig.logo || null vm ### diff --git a/lib/scss/_post.scss b/lib/scss/_post.scss index b06d23ec4..b0910e7f3 100644 --- a/lib/scss/_post.scss +++ b/lib/scss/_post.scss @@ -162,4 +162,6 @@ wphc-post { } } @include post-item("../img/post-img-border.png"); + @include post-item("../img/logo.png"); + } diff --git a/lib/templates/module/menu.html b/lib/templates/module/menu.html index b6a7802dd..13d9e3270 100644 --- a/lib/templates/module/menu.html +++ b/lib/templates/module/menu.html @@ -1,4 +1,7 @@ +
+ +

{{main.appTitle}}

From 1ad54cb2e3d3237b5226a9ebf9e180a96223db3b Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 11:17:25 +0200 Subject: [PATCH 2/6] Cleanup --- lib/scss/_bar.scss | 4 ++++ lib/scss/_post.scss | 3 +-- lib/templates/module/menu.html | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 lib/scss/_bar.scss mode change 100644 => 100755 lib/scss/_post.scss diff --git a/lib/scss/_bar.scss b/lib/scss/_bar.scss old mode 100644 new mode 100755 index 399519128..1e03c7949 --- a/lib/scss/_bar.scss +++ b/lib/scss/_bar.scss @@ -1,3 +1,7 @@ .bar { +} +.bar-logo{ + width:42px; + height:42px; } \ No newline at end of file diff --git a/lib/scss/_post.scss b/lib/scss/_post.scss old mode 100644 new mode 100755 index b0910e7f3..50aa00ef5 --- a/lib/scss/_post.scss +++ b/lib/scss/_post.scss @@ -162,6 +162,5 @@ wphc-post { } } @include post-item("../img/post-img-border.png"); - @include post-item("../img/logo.png"); - + } diff --git a/lib/templates/module/menu.html b/lib/templates/module/menu.html index 13d9e3270..d451a8e0b 100644 --- a/lib/templates/module/menu.html +++ b/lib/templates/module/menu.html @@ -1,7 +1,5 @@ -
- -
+

{{main.appTitle}}

From dbb3d15317e3dec8edb35a2d20bdf2c8cde8a8d0 Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 15:15:33 +0200 Subject: [PATCH 3/6] Prep for dist --- CONFIGURATION.md | 9 ++++----- config/config.default.cson | 2 +- {lib/img => dist}/logo.png | Bin lib/index.coffee | 2 +- scripts/install.js | 1 + 5 files changed, 7 insertions(+), 7 deletions(-) rename {lib/img => dist}/logo.png (100%) diff --git a/CONFIGURATION.md b/CONFIGURATION.md index 0cd207e61..1688b7803 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -150,7 +150,6 @@ The default values live under `config/config.default.cson` (file that you should Here is a simple view of what you can configure: * title -* logo * ionicConfig * api * baseUrl @@ -159,6 +158,7 @@ Here is a simple view of what you can configure: * menu * exposeAsideWhen * list + * logo * settings * cache * views @@ -199,10 +199,6 @@ Here is a simple view of what you can configure: Your website title. The title will appear on the top of the left navigation menu -### logo [String] (null to disable, replace original file to customize) - -Your website logo. The logo will appear on the left of the title - ### ionicConfig [Object] allow overwriting ionic configuration @@ -216,6 +212,9 @@ The media query used to determine when to always display the left menu. ``` "exposeAsideWhen": "(min-width:900px)" ``` +"logo": [String] (default: "/img/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. diff --git a/config/config.default.cson b/config/config.default.cson index e5cb11453..2040c0ae6 100755 --- a/config/config.default.cson +++ b/config/config.default.cson @@ -8,7 +8,6 @@ "title": "Your Blog title" -"logo": "/img/logo.png" # API "api": @@ -50,6 +49,7 @@ "state": "public.posts" "params": {} "exposeAsideWhen": "(min-width:900px)" + "logo": "/img/logo.png" # null will disable # SETTINGS PAGE "settings": diff --git a/lib/img/logo.png b/dist/logo.png similarity index 100% rename from lib/img/logo.png rename to dist/logo.png diff --git a/lib/index.coffee b/lib/index.coffee index 55b05a884..813b95dce 100644 --- a/lib/index.coffee +++ b/lib/index.coffee @@ -126,7 +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.logo || null + vm.appLogo = vm.appConfig.menu.logo || null vm ### diff --git a/scripts/install.js b/scripts/install.js index c58c312bf..a0ea2a276 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -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', '../img/logo.png', true); copy('../release.sh.dist', '../release.sh'); function copy(source, target, overwrite) { From 17fd3906e5be7f574cd5c9279f6362e45d6c6f6c Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 15:20:28 +0200 Subject: [PATCH 4/6] Update config.default.cson --- config/config.default.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.default.cson b/config/config.default.cson index 2040c0ae6..3398f3fbb 100755 --- a/config/config.default.cson +++ b/config/config.default.cson @@ -49,7 +49,7 @@ "state": "public.posts" "params": {} "exposeAsideWhen": "(min-width:900px)" - "logo": "/img/logo.png" # null will disable + "logo": "/img/logo.png" # null will disable # SETTINGS PAGE "settings": From 17634ec26651e599293244022036cd16712f5742 Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 15:55:10 +0200 Subject: [PATCH 5/6] Logo Image in /config/logo.png --- CONFIGURATION.md | 2 +- scripts/install.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONFIGURATION.md b/CONFIGURATION.md index 1688b7803..7a7edb06e 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -212,7 +212,7 @@ The media query used to determine when to always display the left menu. ``` "exposeAsideWhen": "(min-width:900px)" ``` -"logo": [String] (default: "/img/logo.png", null to disable, optimized 42 x 42px transparent) +"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 diff --git a/scripts/install.js b/scripts/install.js index a0ea2a276..32df6f7ad 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -8,7 +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', '../img/logo.png', true); +copy('../dist/logo.png', '../config/logo.png', true); copy('../release.sh.dist', '../release.sh'); function copy(source, target, overwrite) { From ed40bf75d9e99b21839ab202ffe4adeadcee02af Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Tue, 18 Oct 2016 15:58:05 +0200 Subject: [PATCH 6/6] forgot default --- config/config.default.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.default.cson b/config/config.default.cson index 3398f3fbb..a0279a562 100755 --- a/config/config.default.cson +++ b/config/config.default.cson @@ -49,7 +49,7 @@ "state": "public.posts" "params": {} "exposeAsideWhen": "(min-width:900px)" - "logo": "/img/logo.png" # null will disable + "logo": "/config/logo.png" # null will disable # SETTINGS PAGE "settings":