From 78c22915492bc02898a21777fe405b962002bccc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Wed, 20 Jul 2016 15:58:48 +0200 Subject: [PATCH] Update styles page --- app/static/src/js/index.js | 2 ++ app/static/src/js/modules/overflow-init.js | 24 +++++++++++++++++++++ app/templates/includes/html_styleguide.html | 3 +-- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 app/static/src/js/modules/overflow-init.js diff --git a/app/static/src/js/index.js b/app/static/src/js/index.js index c6a320ba..059b6e8f 100644 --- a/app/static/src/js/index.js +++ b/app/static/src/js/index.js @@ -7,6 +7,7 @@ var OpenButton = require('./modules/open-button'); var CloseButton = require('./modules/close-button'); var CloseEscape = require('./modules/close-escape'); var Search = require('./modules/search'); +var OverflowInit = require('./modules/overflow-init'); // // Init all the modules @@ -17,3 +18,4 @@ window[OpenButton] = new OpenButton(); window[CloseButton] = new CloseButton(); window[CloseEscape] = new CloseEscape(); window[Search] = new Search(); +window[OverflowInit] = new OverflowInit(); diff --git a/app/static/src/js/modules/overflow-init.js b/app/static/src/js/modules/overflow-init.js new file mode 100644 index 00000000..4538853e --- /dev/null +++ b/app/static/src/js/modules/overflow-init.js @@ -0,0 +1,24 @@ +var OverflowInit = function() { + + // + // Init + // + this.init(); + +}; + +OverflowInit.prototype.init = function() { + + var that = this; + + Overflow.initialize({ + selector: '[data-overflow]' + }); + + Overflow.initialize({ + selector: 'hr' + }); + +}; + +module.exports = OverflowInit; diff --git a/app/templates/includes/html_styleguide.html b/app/templates/includes/html_styleguide.html index 1c818366..239277ac 100644 --- a/app/templates/includes/html_styleguide.html +++ b/app/templates/includes/html_styleguide.html @@ -103,7 +103,6 @@ for (i = 0; i < divs.length; ++i) { divs[i].style.color = "green"; }

Monospace Text wrapped in "pre" tags

-

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl.


@@ -354,4 +353,4 @@ for (i = 0; i < divs.length; ++i) {

- \ No newline at end of file + -- 2.39.5