Skip to content

Commit

Permalink
Merge pull request #264 from cid-harvard/feature/peru-104-hero-image-…
Browse files Browse the repository at this point in the history
…feature-toggle

Hero image feature toggle / Peru hero image PERU-104
  • Loading branch information
makmanalp committed May 31, 2016
2 parents 87bb1f6 + 31c6d10 commit 887fdae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ export default Ember.Controller.extend({
isSearchRoute: computed.equal('currentRouteName','search'),
showStreamer: computed('isHomePageRoute', function(){
return !this.get('isHomePageRoute');
}),
heroImageStyle: computed(function(){
let url = this.get('featureToggle.hero_image');
return Ember.String.htmlSafe(`background-image: url('${url}');`);
})
});
1 change: 0 additions & 1 deletion app/styles/components/_modules/_pageheader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@
}

.pageheader__bground {
background-image: url('/assets/img/hero_images/front-header-treemap.png');
display: none;
}
.header--pageheader--home .pageheader__bground {
Expand Down
2 changes: 1 addition & 1 deletion app/templates/partials/-pageheader.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<header {{bind-attr class=":header--pageheader isHomePageRoute:header--pageheader--home"}}>
<div class="pageheader__bground"></div>
<div class="pageheader__bground" style={{heroImageStyle}}></div>
<div class="pageheader__home__cap"></div>
<div class="pageheader__wrap">
<div class="branding">
Expand Down
3 changes: 3 additions & 0 deletions app/variables/data-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
"country": "department",
"department": "municipality"
},
"hero_image": "/assets/img/hero_images/front-header-treemap.png",
"show_downloads": true,
"homepage_logos": [
{
Expand Down Expand Up @@ -88,6 +89,7 @@ export default {
"country": "department",
"department": "municipality",
},
"hero_image": "/assets/img/hero_images/front-header-treemap.png",
"show_downloads": true,
"download_files": {
"methodology": "calculation-documentation/Metodos_Calculo_Calculation_Methods.pdf",
Expand Down Expand Up @@ -131,6 +133,7 @@ export default {
"country": "department",
"department": "msa",
},
"hero_image": "/assets/img/hero_images/front-header-peru.png",
"show_downloads": true,
"homepage_logos": [
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 887fdae

Please sign in to comment.