Skip to content

Commit

Permalink
Finish implementing dark theme (see population_dark example)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwise committed Aug 21, 2014
1 parent 40b79e4 commit 9e65fed
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 176 deletions.
2 changes: 1 addition & 1 deletion compiled/css/storymap.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compiled/css/storymap.dark.css

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions compiled/examples/population-dark.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
<script src="../js/storymap.js"></script>
<script>
var storymap = new VCO.StoryMap('storymap', 'population.json', {
map_type:"mapbox:nuknightlab.hif6ioi4"
//map_type:"stamen:toner"
default_bg_color: {r:33, g:33, b:33}
});
window.onresize = function(event) {
storymap.updateDisplay();
Expand Down
4 changes: 2 additions & 2 deletions compiled/js/storymap-min.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions compiled/js/storymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6599,7 +6599,7 @@ VCO.Slide = VCO.Class.extend({
background: {
image: false,
color: false,
color_value :"#FFF"
color_value :""
}
}

Expand Down Expand Up @@ -7043,6 +7043,7 @@ VCO.StorySlider = VCO.Class.extend({
layout: "portrait",
width: 600,
height: 600,
default_bg_color: {r:256, g:256, b:256},
slide_padding_lr: 40, // padding on slide of slide
start_at_slide: 1,
slide_default_fade: "0%", // landscape fade
Expand Down Expand Up @@ -7168,7 +7169,7 @@ VCO.StorySlider = VCO.Class.extend({
goTo: function(n, fast, displayupdate) {
var self = this;

this.changeBackground({color_value:"#FFF", image:false});
this.changeBackground({color_value:"", image:false});

// Clear Preloader Timer
if (this.preloadTimer) {
Expand Down Expand Up @@ -7316,11 +7317,14 @@ VCO.StorySlider = VCO.Class.extend({
bg_percent_end = "15%",
bg_alpha_end = "0.87",
bg_css = "";

if (bg.color_value) {
bg_color = VCO.Util.hexToRgb(bg.color_value);
} else {
bg_color = this.options.default_bg_color;
}


bg_color_rgb = bg_color.r + "," + bg_color.g + "," + bg_color.b;
this._el.background.style.backgroundImage = "none";

Expand Down Expand Up @@ -17451,6 +17455,7 @@ VCO.StoryMap = VCO.Class.extend({
width: this._el.container.offsetWidth,
layout: "landscape", // portrait or landscape
base_class: "",
default_bg_color: {r:256, g:256, b:256},
map_size_sticky: 2.5, // Set as division 1/3 etc
map_center_offset: null, // takes object {top:0,left:0}
less_bounce: false, // Less map bounce when calculating zoom, false is good when there are clusters of tightly grouped markers
Expand Down
162 changes: 0 additions & 162 deletions config.codekit
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,6 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/compiled\/examples\/population-dark.html": {
"fileType": 8192,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/compiled\/examples\/population-dark.html",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/compiled\/examples\/population.html": {
"fileType": 8192,
"ignore": 1,
Expand Down Expand Up @@ -2438,159 +2429,6 @@
"strictMath": 0,
"strictUnits": 0
},
"\/source\/less\/css\/font.abril-droidsans.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.abril-droidsans.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.amatic-andika.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.amatic-andika.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.bitter-raleway.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.bitter-raleway.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.clicker-garamond.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.clicker-garamond.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.dancing-ledger.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.dancing-ledger.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.default.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.default.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.fjalla-average.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.fjalla-average.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.georgia-helvetica.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.georgia-helvetica.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.knightlab.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.knightlab.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.lustria-lato.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.lustria-lato.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.medula-lato.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.medula-lato.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.oldstandard.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.oldstandard.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.opensans-gentiumbook.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.opensans-gentiumbook.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.playfair.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.playfair.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.pt.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.pt.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.rufina-sintony.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.rufina-sintony.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/css\/font.ubuntu.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/source\/less\/css\/font.ubuntu.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/source\/less\/fonts\/font.abril-droidsans.less": {
"allowInsecureImports": 0,
"createSourceMap": 0,
Expand Down
3 changes: 1 addition & 2 deletions source/jade/population.dark.jade
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ html(lang="en")
script.

var storymap = new VCO.StoryMap('storymap', 'population.json', {
map_type:"mapbox:nuknightlab.hif6ioi4"
//map_type:"stamen:toner"
default_bg_color: {r:33, g:33, b:33}
});

window.onresize = function(event) {
Expand Down
1 change: 1 addition & 0 deletions source/js/VCO.StoryMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ VCO.StoryMap = VCO.Class.extend({
width: this._el.container.offsetWidth,
layout: "landscape", // portrait or landscape
base_class: "",
default_bg_color: {r:256, g:256, b:256},
map_size_sticky: 2.5, // Set as division 1/3 etc
map_center_offset: null, // takes object {top:0,left:0}
less_bounce: false, // Less map bounce when calculating zoom, false is good when there are clusters of tightly grouped markers
Expand Down
2 changes: 1 addition & 1 deletion source/js/slider/VCO.Slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ VCO.Slide = VCO.Class.extend({
background: {
image: false,
color: false,
color_value :"#FFF"
color_value :""
}
}

Expand Down
8 changes: 6 additions & 2 deletions source/js/slider/VCO.StorySlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ VCO.StorySlider = VCO.Class.extend({
layout: "portrait",
width: 600,
height: 600,
default_bg_color: {r:256, g:256, b:256},
slide_padding_lr: 40, // padding on slide of slide
start_at_slide: 1,
slide_default_fade: "0%", // landscape fade
Expand Down Expand Up @@ -185,7 +186,7 @@ VCO.StorySlider = VCO.Class.extend({
goTo: function(n, fast, displayupdate) {
var self = this;

this.changeBackground({color_value:"#FFF", image:false});
this.changeBackground({color_value:"", image:false});

// Clear Preloader Timer
if (this.preloadTimer) {
Expand Down Expand Up @@ -333,11 +334,14 @@ VCO.StorySlider = VCO.Class.extend({
bg_percent_end = "15%",
bg_alpha_end = "0.87",
bg_css = "";

if (bg.color_value) {
bg_color = VCO.Util.hexToRgb(bg.color_value);
} else {
bg_color = this.options.default_bg_color;
}


bg_color_rgb = bg_color.r + "," + bg_color.g + "," + bg_color.b;
this._el.background.style.backgroundImage = "none";

Expand Down
2 changes: 2 additions & 0 deletions source/less/slider/VCO.Slide.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// overflow-y:auto;
//z-index:26;


.vco-slide-background {
background-color:@color-background;
position:absolute;
left:0;
top:0;
Expand Down

0 comments on commit 9e65fed

Please sign in to comment.