aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-03-23 10:10:44 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-03-23 10:10:44 +0100
commit36ea1abe1f922a4a97c535348c7f1b94fcf6721c (patch)
treea2d424e3ee657bb93e64ee7dd9136749ad026fea
parentaacb48afce4ee021535f938b2b418a2e0796d105 (diff)
Zoom table out when it doesn't fit the screen
-rw-r--r--public/javascripts/bundle.js41
-rw-r--r--public/javascripts/main.js1
-rw-r--r--public/javascripts/zoom.js30
-rw-r--r--public/stylesheets/style.css13
4 files changed, 69 insertions, 16 deletions
diff --git a/public/javascripts/bundle.js b/public/javascripts/bundle.js
index 8c00a23..00d9b67 100644
--- a/public/javascripts/bundle.js
+++ b/public/javascripts/bundle.js
@@ -1090,6 +1090,7 @@ module.exports = self;
'use strict';
require('./featureDetect').check();
+require('./zoom');
var frontpage = require('./frontpage');
var search = require('./search');
@@ -1161,7 +1162,7 @@ favorite.on('click', function () {
document.body.style.opacity = 1;
-},{"./analytics":5,"./favorite":8,"./featureDetect":9,"./frontpage":10,"./schedule":12,"./scrollSnap":13,"./search":14,"./url":15,"./weekSelector":16}],12:[function(require,module,exports){
+},{"./analytics":5,"./favorite":8,"./featureDetect":9,"./frontpage":10,"./schedule":12,"./scrollSnap":13,"./search":14,"./url":15,"./weekSelector":16,"./zoom":17}],12:[function(require,module,exports){
'use strict';
var EventEmitter = require('events');
@@ -1572,5 +1573,39 @@ self._nodes.nextButton.addEventListener('click', self._handleNextButtonClick);
module.exports = self;
-},{"events":1}]},{},[11])
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvZXZlbnRzL2V2ZW50cy5qcyIsIm5vZGVfbW9kdWxlcy9mdXp6eS9saWIvZnV6enkuanMiLCJub2R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Jlc3VsdCBvZiBhcHBseWluZyBlYXNlIG1hdGggZnVuY3Rpb24gdG8gYSBudW1iZXJcbiAgICAgKiBAbWV0aG9kIGVhc2VcbiAgICAgKiBAcGFyYW0ge051bWJlcn0ga1xuICAgICAqIEByZXR1cm5zIHtOdW1iZXJ9XG4gICAgICovXG4gICAgZnVuY3Rpb24gZWFzZShrKSB7XG4gICAgICByZXR1cm4gMC41ICogKDEgLSBNYXRoLmNvcyhNYXRoLlBJICogaykpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIGluZGljYXRlcyBpZiBhIHNtb290aCBiZWhhdmlvciBzaG91bGQgYmUgYXBwbGllZFxuICAgICAqIEBtZXRob2Qgc2hvdWxkQmFpbE91dFxuICAgICAqIEBwYXJhbSB7TnVtYmVyfE9iamVjdH0geFxuICAgICAqIEByZXR1cm5zIHtCb29sZWFufVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHNob3VsZEJhaWxPdXQoeCkge1xuICAgICAgaWYgKHR5cGVvZiB4ICE9PSAnb2JqZWN0J1xuICAgICAgICAgICAgfHwgeCA9PT0gbnVsbFxuICAgICAgICAgICAgfHwgeC5iZWhhdmlvciA9PT0gdW5kZWZpbmVkXG4gICAgICAgICAgICB8fCB4LmJlaGF2aW9yID09PSAnYXV0bydcbiAgICAgICAgICAgIHx8IHguYmVoYXZpb3IgPT09ICdpbnN0YW50Jykge1xuICAgICAgICAvLyBmaXJzdCBhcmcgbm90IGFuIG9iamVjdC9udWxsXG4gICAgICAgIC8vIG9yIGJlaGF2aW9yIGlzIGF1dG8sIGluc3RhbnQgb3IgdW5kZWZpbmVkXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIHggPT09ICdvYmplY3QnXG4gICAgICAgICAgICAmJiB4LmJlaGF2aW9yID09PSAnc21vb3RoJykge1xuICAgICAgICAvLyBmaXJzdCBhcmd1bWVudCBpcyBhbiBvYmplY3QgYW5kIGJlaGF2aW9yI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AgICB3LFxuICAgICAgICAgIGFyZ3VtZW50c1swXS5sZWZ0IHx8IGFyZ3VtZW50c1swXSxcbiAgICAgICAgICBhcmd1bWVudHNbMF0udG9wIHx8IGFyZ3VtZW50c1sxXVxuICAgICAgICApO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIC8vIExFVCBUSEUgU01PT1RITkVTUyBCRUdJTiFcbiAgICAgIHNtb290aFNjcm9sbC5jYWxsKFxuICAgICAgICB3LFxuICAgICAgICBkLmJvZHksXG4gICAgICAgIH5+YXJndW1lbnRzWzBdLmxlZnQsXG4gICAgICAgIH5+YXJndW1lbnRzWzBdLnRvcFxuICAgICAgKTtcbiAgICB9O1xuXG4gICAgLy8gdy5zY3JvbGxCeVxuICAgIHcuc2Nyb2xsQnkgPSBmdW5jdGlvbigpIHtcbiAgICAgIC8vIGF2b2lkIHNtb290aCBiZWhhdmlvciBpZiBub3QgcmVxdWlyZWRcbiAgICAgIGlmIChzaG91bGRCYWlsT3V0KGFyZ3VtZW50c1swXSkpIHtcbiAgICAgICAgb3JpZ2luYWwuc2Nyb2xsQnkuY2FsbChcbiAgICAgICAgICB3LFxuICAgICAgICAgIGFyZ3VtZW50c1swXS5sZWZ0IHx8IGFyZ3VtZW50c1swXSxcbiAgICAgICAgICBhcmd1bWVudHNbMF0udG9wIHx8IGFyZ3VtZW50c1sxXVxuICAgICAgICApO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIC8vIExFVCBUSEUgU01PT1RITkVTUyBCRUdJTiFcbiAgICAgIHNtb290aFNjcm9sbC5jYWxsKFxuICAgICAgICB3LFxuICAgICAgICBkLmJvZHksXG4gICAgICAgIH5+YXJndW1lbnRzWzBdLmxlZnQgKyAody5zY3JvbGxYIHx8IHcucGFnZVhPZmZzZXQpLFxuICAgICAgICB+fmFyZ3VtZW50c1swXS50b3AgKyAody5zY3JvbGxZIHx8IHcucGFnZVlPZmZzZXQpXG4gICAgICApO1xuICAgIH07XG5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bnQgPSAnV2VlayAnICsgc2VsZWN0ZWRXZWVrTnVtYmVyXG4gIH1cbn1cblxuc2VsZi5faGFuZGxlUHJldkJ1dHRvbkNsaWNrID0gZnVuY3Rpb24gKCkge1xuICBzZWxmLl93ZWVrT2Zmc2V0IC09IDFcbiAgc2VsZi51cGRhdGVDdXJyZW50V2VlaygpXG59XG5cbnNlbGYuX2hhbmRsZU5leHRCdXR0b25DbGljayA9IGZ1bmN0aW9uICgpIHtcbiAgc2VsZi5fd2Vla09mZnNldCArPSAxXG4gIHNlbGYudXBkYXRlQ3VycmVudFdlZWsoKVxufVxuXG5zZWxmLl9ub2Rlcy5wcmV2QnV0dG9uLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgc2VsZi5faGFuZGxlUHJldkJ1dHRvbkNsaWNrKVxuc2VsZi5fbm9kZXMubmV4dEJ1dHRvbi5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIHNlbGYuX2hhbmRsZU5leHRCdXR0b25DbGljaylcblxubW9kdWxlLmV4cG9ydHMgPSBzZWxmXG4iXX0=
+},{"events":1}],17:[function(require,module,exports){
+'use strict';
+
+var schedule = require('./schedule');
+
+var self = {};
+
+self._nodes = {
+ body: document.body
+};
+
+self._handleResize = function () {
+ // the table node may not exist before this function is called
+ var tableNode = document.querySelector('center > table');
+
+ // infact, it may not even exist when this function is called.
+ if (!tableNode) return;
+
+ var tableWidth = tableNode.getBoundingClientRect().width;
+ var tableGoalWidth = self._nodes.body.getBoundingClientRect().width * 0.9;
+ var zoomFactor = tableGoalWidth / tableWidth;
+
+ if (zoomFactor < 1) {
+ tableNode.style.zoom = '' + zoomFactor;
+ } else {
+ tableNode.style.zoom = '1';
+ }
+};
+
+schedule.on('load', self._handleResize);
+window.addEventListener('resize', self._handleResize);
+
+module.exports = self;
+
+},{"./schedule":12}]},{},[11])
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9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ge051bWJlcn1cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlYXNlKGspIHtcbiAgICAgIHJldHVybiAwLjUgKiAoMSAtIE1hdGguY29zKE1hdGguUEkgKiBrKSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogaW5kaWNhdGVzIGlmIGEgc21vb3RoIGJlaGF2aW9yIHNob3VsZCBiZSBhcHBsaWVkXG4gICAgICogQG1ldGhvZCBzaG91bGRCYWlsT3V0XG4gICAgICogQHBhcmFtIHtOdW1iZXJ8T2JqZWN0fSB4XG4gICAgICogQHJldHVybnMge0Jvb2xlYW59XG4gICAgICovXG4gICAgZnVuY3Rpb24gc2hvdWxkQmFpbE91dCh4KSB7XG4gICAgICBpZiAodHlwZW9mIHggIT09ICdvYmplY3QnXG4gICAgICAgICAgICB8fCB4ID09PSBudWxsXG4gICAgICAgICAgICB8fCB4LmJlaGF2aW9yID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgIHx8IHguYmVoYXZpb3IgPT09ICdhdXRvJ1xuICAgICAgICAgICAgfHwgeC5iZWhhdmlvciA9PT0gJ2luc3RhbnQnKSB7XG4gICAgICAgIC8vIGZpcnN0IGFyZyBub3QgYW4gb2JqZWN0L251bGxcbiAgICAgICAgLy8gb3IgYmVoYXZpb3IgaXMgYXV0bywgaW5zdGFudCBvciB1bmRlZmluZWRcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG5cbiAgICAgIGlmICh0eXBlb2YgeCA9PT0gJ29iamVjdCdcbiAgICAgICAgICAgICYmIHguYmVoYXZpb3IgPT09ICdzbW9vdGgnKSB7XG4gICAgICAgIC8vIGZpcnN0IGFyZ3VtZW50IGlzIGFuIG9iamVjdCBhbmQgYmVoYXZpb3IgaXMgc21vb3RoXG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cblxuICAgICAgLy8gdGhyb3cgZXJyb3Igd2hlbiBiZWhhdmlvciBpcyBub3Qgc3VwcG9ydGVkXG4gICAgICB0aHJ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QgdGFibGVHb2FsV2lkdGggPSBzZWxmLl9ub2Rlcy5ib2R5LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLndpZHRoICogMC45XG4gIGNvbnN0IHpvb21GYWN0b3IgPSB0YWJsZUdvYWxXaWR0aCAvIHRhYmxlV2lkdGhcblxuICBpZiAoem9vbUZhY3RvciA8IDEpIHtcbiAgICB0YWJsZU5vZGUuc3R5bGUuem9vbSA9IGAke3pvb21GYWN0b3J9YFxuICB9IGVsc2Uge1xuICAgIHRhYmxlTm9kZS5zdHlsZS56b29tID0gYDFgXG4gIH1cbn1cblxuc2NoZWR1bGUub24oJ2xvYWQnLCBzZWxmLl9oYW5kbGVSZXNpemUpXG53aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigncmVzaXplJywgc2VsZi5faGFuZGxlUmVzaXplKVxuXG5tb2R1bGUuZXhwb3J0cyA9IHNlbGZcbiJdfQ==
diff --git a/public/javascripts/main.js b/public/javascripts/main.js
index 67e1567..5d0ef9c 100644
--- a/public/javascripts/main.js
+++ b/public/javascripts/main.js
@@ -1,4 +1,5 @@
require('./featureDetect').check()
+require('./zoom')
const frontpage = require('./frontpage')
const search = require('./search')
diff --git a/public/javascripts/zoom.js b/public/javascripts/zoom.js
new file mode 100644
index 0000000..59b80db
--- /dev/null
+++ b/public/javascripts/zoom.js
@@ -0,0 +1,30 @@
+const schedule = require('./schedule')
+
+const self = {}
+
+self._nodes = {
+ body: document.body
+}
+
+self._handleResize = function () {
+ // the table node may not exist before this function is called
+ const tableNode = document.querySelector('center > table')
+
+ // infact, it may not even exist when this function is called.
+ if (!tableNode) return
+
+ const tableWidth = tableNode.getBoundingClientRect().width
+ const tableGoalWidth = self._nodes.body.getBoundingClientRect().width * 0.9
+ const zoomFactor = tableGoalWidth / tableWidth
+
+ if (zoomFactor < 1) {
+ tableNode.style.zoom = `${zoomFactor}`
+ } else {
+ tableNode.style.zoom = `1`
+ }
+}
+
+schedule.on('load', self._handleResize)
+window.addEventListener('resize', self._handleResize)
+
+module.exports = self
diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css
index fd2bfb8..b3fb6d8 100644
--- a/public/stylesheets/style.css
+++ b/public/stylesheets/style.css
@@ -351,19 +351,6 @@ body.no-input #week-selector {
display: none;
}
-@media screen and (max-width: 600px) {
- table table tr {
- display: flex;
- flex-direction: column;
- }
-
- table * {
- padding: 0;
- line-height: 13px;
- font-size: 13px;
- }
-}
-
.error {
text-align: center;
margin-top: 100px;