From 0934fbfa917d374ee837e13a787cba6300df102e Mon Sep 17 00:00:00 2001 From: Django Doucet Date: Sat, 8 Feb 2020 23:25:11 -0500 Subject: [PATCH] CSS Fix styles for narrow columns --- assets/ElementQueries.js | 530 +++++++++++++++++++++++++++++++++ assets/ResizeSensor.js | 354 ++++++++++++++++++++++ assets/mastodon.css | 20 ++ assets/pixelfed.css | 14 + fediembedi-mastodon-widget.php | 1 + fediembedi.php | 9 +- readme.md | 11 +- readme.txt | 13 +- templates/mastodon.tpl.php | 16 +- templates/pixelfed.tpl.php | 4 +- 10 files changed, 951 insertions(+), 21 deletions(-) create mode 100644 assets/ElementQueries.js create mode 100644 assets/ResizeSensor.js diff --git a/assets/ElementQueries.js b/assets/ElementQueries.js new file mode 100644 index 0000000..4fe4298 --- /dev/null +++ b/assets/ElementQueries.js @@ -0,0 +1,530 @@ +'use strict'; + +/** + * Copyright Marc J. Schmidt. See the LICENSE file at the top-level + * directory of this distribution and at + * https://github.com/marcj/css-element-queries/blob/master/LICENSE. + */ +(function (root, factory) { + if (typeof define === "function" && define.amd) { + define(['./ResizeSensor.js'], factory); + } else if (typeof exports === "object") { + module.exports = factory(require('./ResizeSensor.js')); + } else { + root.ElementQueries = factory(root.ResizeSensor); + root.ElementQueries.listen(); + } +}(typeof window !== 'undefined' ? window : this, function (ResizeSensor) { + + /** + * + * @type {Function} + * @constructor + */ + var ElementQueries = function () { + //