hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit d3c8ff24ef32fcc6583f2dc3abc145582db98f96
parent a75f737d7d42017ff7a12df17afb9ff71c7526fd
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Sun, 11 Dec 2016 11:26:38 -0500

Autogenerate static files

Diffstat:
Mstatic/prod/css/styles.css | 107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mstatic/prod/css/styles.min.css | 4++--
Mstatic/prod/js/script.js | 116+------------------------------------------------------------------------------
Mstatic/prod/js/script.min.js | 6++----
4 files changed, 112 insertions(+), 121 deletions(-)

diff --git a/static/prod/css/styles.css b/static/prod/css/styles.css @@ -680,6 +680,113 @@ img { max-width:100%; width:auto; } +/* HELPERS CLASSES */ + +/* + * Image replacement + */ + +.ir { + background-color: transparent; + border: 0; + overflow: hidden; + /* IE 6/7 fallback */ + *text-indent: -9999px; +} + +.ir:before { + content: ""; + display: block; + width: 0; + height: 150%; +} + +/* + * Hide from both screenreaders and browsers: h5bp.com/u + */ + +.hidden { + display: none !important; + visibility: hidden; +} + +/* + * Hide only visually, but have it available for screenreaders: h5bp.com/v + */ + +.visuallyhidden { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} + +/* + * Extends the .visuallyhidden class to allow the element to be focusable + * when navigated to via the keyboard: h5bp.com/p + */ + +.visuallyhidden.focusable:active, +.visuallyhidden.focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + width: auto; +} + +/* + * Hide visually and from screenreaders, but maintain layout + */ + +.invisible { + visibility: hidden; +} + +/* + * Clearfix: contain floats + * + * For modern browsers + * 1. The space content is one way to avoid an Opera bug when the + * `contenteditable` attribute is included anywhere else in the document. + * Otherwise it causes space to appear at the top and bottom of elements + * that receive the `clearfix` class. + * 2. The use of `table` rather than `block` is only necessary if using + * `:before` to contain the top-margins of child elements. + */ + +.clearfix:before, +.clearfix:after { + content: " "; /* 1 */ + display: table; /* 2 */ +} + +.clearfix:after { + clear: both; +} + +/* + * For IE 6/7 only + * Include this rule to trigger hasLayout and contain floats. + */ + +.clearfix { + *zoom: 1; +} + +/*Position */ +.position--fixed { + position:fixed; +} + +.position--relative { + position:relative; +} /* LAYOUT & GRID */ .layout { diff --git a/static/prod/css/styles.min.css b/static/prod/css/styles.min.css @@ -1 +1 @@ -@font-face{font-family:leitura news;src:url(../fonts/leitura/leituranews-italic4-webfont.eot);src:url(../fonts/leitura/leituranews-italic4-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/leitura/leituranews-italic4-webfont.woff) format('woff'),url(../fonts/leitura/leituranews-italic4-webfont.ttf) format('truetype'),url(../fonts/leitura/leituranews-italic4-webfont.svg#LeituraNewsItalic4Regular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:domine;src:url(../fonts/domine/domine-bold-webfont.eot);src:url(../fonts/domine/domine-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/domine/domine-bold-webfont.woff2) format('woff2'),url(../fonts/domine/domine-bold-webfont.woff) format('woff'),url(../fonts/domine/domine-bold-webfont.ttf) format('truetype'),url(../fonts/domine/domine-bold-webfont.svg#dominebold) format('svg');font-weight:700;font-style:normal}@font-face{font-family:domine;src:url(../fonts/domine/domine-regular-webfont.eot);src:url(../fonts/domine/domine-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/domine/domine-regular-webfont.woff2) format('woff2'),url(../fonts/domine/domine-regular-webfont.woff) format('woff'),url(../fonts/domine/domine-regular-webfont.ttf) format('truetype'),url(../fonts/domine/domine-regular-webfont.svg#domineregular) format('svg');font-weight:400;font-style:normal}/*!normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css*/html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted buttontext}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html,button,input,select,textarea{color:#111;font-family:domine,georgia,times new roman,times,serif}html{font-size:18px;line-height:1.5}@media screen and (min-width:62em){html{font-size:24px}}html,body{height:100%;min-height:100%;position:relative}body{background:#f1f1f1 url(http://assets.soucy.cc/images/noise.png) repeat}hr{display:block;height:1px;border:0;border-top:1px solid #111;margin:1em 0;padding:0}h1,.like-h1{font-size:2em;hyphens:none;margin:0 0 .67em;padding-top:.67em}h2,.like-h2{font-size:1.5em;margin:.83em 0}h3,.like-h3{font-size:1.17em;margin:1em 0}h4,.like-h4{font-size:1em;margin:1.33em 0}h5,.like-h5{font-size:.83em;margin:1.67em 0}h6,.like-h6{font-size:.67em;margin:2.33em 0}a{border-bottom:1px dotted #00f;color:#00f;text-decoration:none}a:active,a:visited{border-bottom:1px dotted #111;color:#111}a:focus,a:hover{background-color:#00f;border:0;color:#f1f1f1}ol,ul{margin-left:1em;padding:0}ul ul{margin-bottom:.5em;margin-top:.5em}li{margin-bottom:.25em}address{font-style:normal}address,dl,menu,ol,ul{margin:1em 0}dd{margin:0}dl,menu,ol,ul{padding:0}nav ul,nav ol{list-style:none;list-style-image:none}menu ul,menu ol,nav ul,nav ol{margin:0}blockquote{border-left:10px solid #ccc;display:block;margin:1em 0;padding-left:1.5em}blockquote span{display:inline-block}blockquote span:before,blockquote span:after{display:inline}blockquote span:after{content:"\00A0\00BB"}blockquote span:before{content:"\00AB\00A0"}blockquote p{display:inline}img{max-width:100%;width:auto}.layout{hyphens:auto;margin-left:auto;margin-right:auto;max-width:992px;padding:0 .889em;width:auto}@media screen and (min-width:48em){padding:0 1.111em; text-align:left; } .layout__vcenter { display:table-cell; height:100vh; vertical-align:middle; } .cv { color:#111; } .cv__title { font-size:1em; line-height:normal; } .cv__title a { display:inline-block; } .cv__banner .logo { margin-bottom:0; } .cv__title a[rel=home] { border:0; color:#111; } .cv__banner,.cv__main { text-align:left; } .cv__banner .job { font-size:1.5em; margin-top:0; } footer { font-size:.7619047619em; } .img-cache { border:1rem solid transparent; border-radius:100%; display:inline-block; float:right; height:150px; position:relative; overflow:hidden; width:150px; } .img-cache>.u-photo { max-width:100%; position:relative; top:-20px; } .logo { font:normal 3.33333em/1.1 "Leitura News","Domine",serif; hyphens:none; margin:0 0 .333em; padding-top:.333em; padding-right:1.08333333333em; text-shadow:3px 3px #ccc; } @media screen and (min-width: 22.5em) { .logo{line-height:normal}}.logo a[rel=home]{border:0;color:#111}.nav-button,.nav__close{border:0;display:inline-block;position:absolute;right:.9375rem;text-align:center;top:.9375rem}@media screen and (min-width:48em){.nav-button,.nav__close{right:1.25rem}}.nav-button:active,.nav-button:hover,.nav-button:focus,.nav-button:visited{background:transparent;border-bottom:0;color:#111}.nav__close,.nav__close:visited{background:transparent;border-bottom:0;color:#fff}.nav-button__text,.nav__close__text{font-size:.75rem;display:block}.nav-button__burger,.nav__x{display:block;height:50px;margin:0 auto;position:relative;width:50px}.nav-button__burger{background:#111}.nav__x{background:#333}.nav-button:hover .nav-button__burger,.nav-button:focus .nav-button__burger{background:#00f}.nav__panel{background:#111;color:#f1f1f1}.js .nav__panel{display:none}.nav__panel.state--hidden,.nav__panel.state--visible{display:block;height:auto;left:0;min-height:1em;opacity:1;position:absolute;top:0;width:100%}.mod_csstransitions .nav__panel.state--hidden,.mod_csstransitions .nav__panel.state--visible{transition:transform .25s ease-in-out}.nav__panel.state--hidden{top:-100%}.mod_csstransforms .nav__panel.state--hidden{top:0;transform:translateY(-100%)}.nav__panel.state--visible{top:0}.mod_csstransforms .nav__panel.state--visible{transform:translateY(0)}.nav__panel__content{margin:0 auto;position:relative;text-align:left;width:auto}.nav__list{padding:1em 0}.nav__link,.nav__link:visited{color:#fff}.nav__link{font-size:.7619047619em}.no-js .nav__close{display:none;opacity:0}.note__list{list-style-type:none;margin-left:0}.note__item{border-bottom:1px solid #ccc;margin-bottom:1.5em;padding-bottom:1em}.note__blockquote__footer{margin:1em 0 0}.note__footer{font-size:14px}@media screen and (min-width:48em){.note__footer{font-size:16px}}.single{text-align:left}.single h1{padding-right:66px}- \ No newline at end of file +@font-face{font-family:leitura news;src:url(../fonts/leitura/leituranews-italic4-webfont.eot);src:url(../fonts/leitura/leituranews-italic4-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/leitura/leituranews-italic4-webfont.woff) format('woff'),url(../fonts/leitura/leituranews-italic4-webfont.ttf) format('truetype'),url(../fonts/leitura/leituranews-italic4-webfont.svg#LeituraNewsItalic4Regular) format('svg');font-weight:400;font-style:normal}@font-face{font-family:domine;src:url(../fonts/domine/domine-bold-webfont.eot);src:url(../fonts/domine/domine-bold-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/domine/domine-bold-webfont.woff2) format('woff2'),url(../fonts/domine/domine-bold-webfont.woff) format('woff'),url(../fonts/domine/domine-bold-webfont.ttf) format('truetype'),url(../fonts/domine/domine-bold-webfont.svg#dominebold) format('svg');font-weight:700;font-style:normal}@font-face{font-family:domine;src:url(../fonts/domine/domine-regular-webfont.eot);src:url(../fonts/domine/domine-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../fonts/domine/domine-regular-webfont.woff2) format('woff2'),url(../fonts/domine/domine-regular-webfont.woff) format('woff'),url(../fonts/domine/domine-regular-webfont.ttf) format('truetype'),url(../fonts/domine/domine-regular-webfont.svg#domineregular) format('svg');font-weight:400;font-style:normal}/*!normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css*/html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:0;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted buttontext}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html,button,input,select,textarea{color:#111;font-family:domine,georgia,times new roman,times,serif}html{font-size:18px;line-height:1.5}@media screen and (min-width:62em){html{font-size:24px}}html,body{height:100%;min-height:100%;position:relative}body{background:#f1f1f1 url(http://assets.soucy.cc/images/noise.png) repeat}hr{display:block;height:1px;border:0;border-top:1px solid #111;margin:1em 0;padding:0}h1,.like-h1{font-size:2em;hyphens:none;margin:0 0 .67em;padding-top:.67em}h2,.like-h2{font-size:1.5em;margin:.83em 0}h3,.like-h3{font-size:1.17em;margin:1em 0}h4,.like-h4{font-size:1em;margin:1.33em 0}h5,.like-h5{font-size:.83em;margin:1.67em 0}h6,.like-h6{font-size:.67em;margin:2.33em 0}a{border-bottom:1px dotted #00f;color:#00f;text-decoration:none}a:active,a:visited{border-bottom:1px dotted #111;color:#111}a:focus,a:hover{background-color:#00f;border:0;color:#f1f1f1}ol,ul{margin-left:1em;padding:0}ul ul{margin-bottom:.5em;margin-top:.5em}li{margin-bottom:.25em}address{font-style:normal}address,dl,menu,ol,ul{margin:1em 0}dd{margin:0}dl,menu,ol,ul{padding:0}nav ul,nav ol{list-style:none;list-style-image:none}menu ul,menu ol,nav ul,nav ol{margin:0}blockquote{border-left:10px solid #ccc;display:block;margin:1em 0;padding-left:1.5em}blockquote span{display:inline-block}blockquote span:before,blockquote span:after{display:inline}blockquote span:after{content:"\00A0\00BB"}blockquote span:before{content:"\00AB\00A0"}blockquote p{display:inline}img{max-width:100%;width:auto}.ir{background-color:transparent;border:0;overflow:hidden;*text-indent:-9999px}.ir:before{content:"";display:block;width:0;height:150%}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.clearfix{*zoom:1}.position--fixed{position:fixed}.position--relative{position:relative}.layout{hyphens:auto;margin-left:auto;margin-right:auto;max-width:992px;padding:0 .889em;width:auto}@media screen and (min-width:48em){padding:0 1.111em; text-align:left; } .layout__vcenter { display:table-cell; height:100vh; vertical-align:middle; } .cv { color:#111; } .cv__title { font-size:1em; line-height:normal; } .cv__title a { display:inline-block; } .cv__banner .logo { margin-bottom:0; } .cv__title a[rel=home] { border:0; color:#111; } .cv__banner,.cv__main { text-align:left; } .cv__banner .job { font-size:1.5em; margin-top:0; } footer { font-size:.7619047619em; } .img-cache { border:1rem solid transparent; border-radius:100%; display:inline-block; float:right; height:150px; position:relative; overflow:hidden; width:150px; } .img-cache>.u-photo { max-width:100%; position:relative; top:-20px; } .logo { font:normal 3.33333em/1.1 "Leitura News","Domine",serif; hyphens:none; margin:0 0 .333em; padding-top:.333em; padding-right:1.08333333333em; text-shadow:3px 3px #ccc; } @media screen and (min-width: 22.5em) { .logo{line-height:normal}}.logo a[rel=home]{border:0;color:#111}.nav-button,.nav__close{border:0;display:inline-block;position:absolute;right:.9375rem;text-align:center;top:.9375rem}@media screen and (min-width:48em){.nav-button,.nav__close{right:1.25rem}}.nav-button:active,.nav-button:hover,.nav-button:focus,.nav-button:visited{background:transparent;border-bottom:0;color:#111}.nav__close,.nav__close:visited{background:transparent;border-bottom:0;color:#fff}.nav-button__text,.nav__close__text{font-size:.75rem;display:block}.nav-button__burger,.nav__x{display:block;height:50px;margin:0 auto;position:relative;width:50px}.nav-button__burger{background:#111}.nav__x{background:#333}.nav-button:hover .nav-button__burger,.nav-button:focus .nav-button__burger{background:#00f}.nav__panel{background:#111;color:#f1f1f1}.js .nav__panel{display:none}.nav__panel.state--hidden,.nav__panel.state--visible{display:block;height:auto;left:0;min-height:1em;opacity:1;position:absolute;top:0;width:100%}.mod_csstransitions .nav__panel.state--hidden,.mod_csstransitions .nav__panel.state--visible{transition:transform .25s ease-in-out}.nav__panel.state--hidden{top:-100%}.mod_csstransforms .nav__panel.state--hidden{top:0;transform:translateY(-100%)}.nav__panel.state--visible{top:0}.mod_csstransforms .nav__panel.state--visible{transform:translateY(0)}.nav__panel__content{margin:0 auto;position:relative;text-align:left;width:auto}.nav__list{padding:1em 0}.nav__link,.nav__link:visited{color:#fff}.nav__link{font-size:.7619047619em}.no-js .nav__close{display:none;opacity:0}.note__list{list-style-type:none;margin-left:0}.note__item{border-bottom:1px solid #ccc;margin-bottom:1.5em;padding-bottom:1em}.note__blockquote__footer{margin:1em 0 0}.note__footer{font-size:14px}@media screen and (min-width:48em){.note__footer{font-size:16px}}.single{text-align:left}.single h1{padding-right:66px}+ \ No newline at end of file diff --git a/static/prod/js/script.js b/static/prod/js/script.js @@ -1,98 +1,3 @@ -/*! atomic v1.0.0 | (c) 2015 @toddmotto | https://github.com/toddmotto/atomic */ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - define(factory); - } else if (typeof exports === 'object') { - module.exports = factory; - } else { - root.atomic = factory(root); - } -})(this, function (root) { - - 'use strict'; - - var exports = {}; - - var config = { - contentType: 'application/x-www-form-urlencoded' - }; - - var parse = function (req) { - var result; - try { - result = JSON.parse(req.responseText); - } catch (e) { - result = req.responseText; - } - return [result, req]; - }; - - var xhr = function (type, url, data) { - var methods = { - success: function () {}, - error: function () {}, - always: function () {} - }; - var XHR = root.XMLHttpRequest || ActiveXObject; - var request = new XHR('MSXML2.XMLHTTP.3.0'); - - request.open(type, url, true); - request.setRequestHeader('Content-type', config.contentType); - request.onreadystatechange = function () { - var req; - if (request.readyState === 4) { - req = parse(request); - if (request.status >= 200 && request.status < 300) { - methods.success.apply(methods, req); - } else { - methods.error.apply(methods, req); - } - methods.always.apply(methods, req); - } - }; - request.send(data); - - var atomXHR = { - success: function (callback) { - methods.success = callback; - return atomXHR; - }, - error: function (callback) { - methods.error = callback; - return atomXHR; - }, - always: function (callback) { - methods.always = callback; - return atomXHR; - } - }; - - return atomXHR; - }; - - exports.get = function (src) { - return xhr('GET', src); - }; - - exports.put = function (url, data) { - return xhr('PUT', url, data); - }; - - exports.post= function (url, data) { - return xhr('POST', url, data); - }; - - exports.delete = function (url) { - return xhr('DELETE', url); - }; - - exports.setContentType = function(value) { - config.contentType = value; - }; - - return exports; - -}); // DOM Utilities // A mashup of functions gleaned everywhere to code in lightweight vanilla Javascript (internet explorer 8 gte). // This is a toolkit, so take what you need and comment or delete the rest. @@ -484,6 +389,7 @@ var du = (function(win) { }; })(window); function setNavigation() { + 'use strict'; var $nav = document.querySelector('.nav'); var $nav_button; var $nav_panel; @@ -513,23 +419,3 @@ function setNavigation() { } setNavigation(); - -// function getWebmentions() { -// console.log('!!!!'); - -// atomic.setContentType('application/json'); -// atomic.get('http://webmention.io/api/mentions?jsonp=f&target=http://hugo.soucy.cc/note/2016/11/browsers-not-apps-are-the-future-of-mobile') -// .success(function (data, xhr) { -// console.log(data, xhr); - -// }) -// .error(function (data, xhr) { -// console.log(data, xhr); - -// }) -// .always(function (data, xhr) { -// console.log(data, xhr); -// }); -// } - -// getWebmentions(); diff --git a/static/prod/js/script.min.js b/static/prod/js/script.min.js @@ -1,6 +1,4 @@ -/*!atomic v1.0.0 | (c) 2015 @toddmotto | https://github.com/toddmotto/atomic*/(function(root,factory){if(typeof define==='function'&&define.amd){define(factory);}else if(typeof exports==='object'){module.exports=factory;}else{root.atomic=factory(root);}})(this,function(root){'use strict';var exports={};var config={contentType:'application/x-www-form-urlencoded'};var parse=function(req){var result;try{result=JSON.parse(req.responseText);}catch(e){result=req.responseText;} -return[result,req];};var xhr=function(type,url,data){var methods={success:function(){},error:function(){},always:function(){}};var XHR=root.XMLHttpRequest||ActiveXObject;var request=new XHR('MSXML2.XMLHTTP.3.0');request.open(type,url,true);request.setRequestHeader('Content-type',config.contentType);request.onreadystatechange=function(){var req;if(request.readyState===4){req=parse(request);if(request.status>=200&&request.status<300){methods.success.apply(methods,req);}else{methods.error.apply(methods,req);} -methods.always.apply(methods,req);}};request.send(data);var atomXHR={success:function(callback){methods.success=callback;return atomXHR;},error:function(callback){methods.error=callback;return atomXHR;},always:function(callback){methods.always=callback;return atomXHR;}};return atomXHR;};exports.get=function(src){return xhr('GET',src);};exports.put=function(url,data){return xhr('PUT',url,data);};exports.post=function(url,data){return xhr('POST',url,data);};exports.delete=function(url){return xhr('DELETE',url);};exports.setContentType=function(value){config.contentType=value;};return exports;});var du=(function(win){'use strict';function doExtend(out){var key;var i;out=out||{};for(i=1;i<arguments.length;i++){if(!arguments[i]){continue;} +var du=(function(win){'use strict';function doExtend(out){var key;var i;out=out||{};for(i=1;i<arguments.length;i++){if(!arguments[i]){continue;} for(key in arguments[i]){if(arguments[i].hasOwnProperty(key)){out[key]=arguments[i][key];}}} return out;} function queryAll(selector,context){return Array.prototype.slice.call((context||document).querySelectorAll(selector));} @@ -30,5 +28,5 @@ function triggerEvent(el,eventType){if(document.createEvent){var event=document. function triggerCustomEvent(el,eventType,eventData){var customEvent;if(window.CustomEvent){customEvent=new CustomEvent(eventType,{detail:eventData});}else{customEvent=document.createEvent('CustomEvent');customEvent.initCustomEvent(eventType,true,true,eventData);} el.dispatchEvent(customEvent);} function isElementInViewport(el){var elRect=el.getBoundingClientRect();return(elRect.top>=0&&elRect.left>=0&&elRect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&elRect.right<=(window.innerWidth||document.documentElement.clientWidth));} -return{doExtend:doExtend,queryAll:queryAll,setAttrs:setAttrs,setEvent:setEvent,setEventList:setEventList,getIndex:getIndex,getClosest:getClosest,getHeight:getHeight,setClass:setClass,unsetClass:unsetClass,hasClass:hasClass,toggleClass:toggleClass,setDebounce:setDebounce,setThrottle:setThrottle,isElement:isElement,isObject:isObject,triggerEvent:triggerEvent,triggerCustomEvent:triggerCustomEvent,isElementInViewport:isElementInViewport};})(window);function setNavigation(){var $nav=document.querySelector('.nav');var $nav_button;var $nav_panel;var $nav_close;if($nav){$nav_button=document.querySelector('.nav-button');$nav_panel=$nav.querySelector('.nav__panel');$nav_close=$nav_panel.querySelector('.nav__close');du.setClass($nav_panel,'state--hidden');du.setEvent($nav_button,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});du.setEvent($nav_close,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});}} +return{doExtend:doExtend,queryAll:queryAll,setAttrs:setAttrs,setEvent:setEvent,setEventList:setEventList,getIndex:getIndex,getClosest:getClosest,getHeight:getHeight,setClass:setClass,unsetClass:unsetClass,hasClass:hasClass,toggleClass:toggleClass,setDebounce:setDebounce,setThrottle:setThrottle,isElement:isElement,isObject:isObject,triggerEvent:triggerEvent,triggerCustomEvent:triggerCustomEvent,isElementInViewport:isElementInViewport};})(window);function setNavigation(){'use strict';var $nav=document.querySelector('.nav');var $nav_button;var $nav_panel;var $nav_close;if($nav){$nav_button=document.querySelector('.nav-button');$nav_panel=$nav.querySelector('.nav__panel');$nav_close=$nav_panel.querySelector('.nav__close');du.setClass($nav_panel,'state--hidden');du.setEvent($nav_button,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});du.setEvent($nav_close,'click',function(thatEvt){thatEvt.preventDefault();du.toggleClass($nav_panel,'state--hidden');du.toggleClass($nav_panel,'state--visible');});}} setNavigation(); \ No newline at end of file