From 24a3a690b9d95e631c507b7da6f4114072405ac5 Mon Sep 17 00:00:00 2001 From: edavidaja Date: Sun, 19 May 2019 16:51:12 -0400 Subject: added license; moved sidebar to partials; abandon sw for now --- layouts/_default/baseof.html | 3 +- layouts/_default/single.html | 6 - layouts/page/single.html | 6 + layouts/partials/head.html | 8 +- layouts/partials/header.html | 2 +- layouts/partials/sidebar.html | 15 ++ static/assets/css/main.css | 525 ++++++++++++++++++++++++++++++++++++++++ static/assets/css/normalize.css | 406 +++++++++++++++++++++++++++++++ static/assets/css/syntax.css | 60 +++++ static/assets/js/respond.min.js | 6 + 10 files changed, 1024 insertions(+), 13 deletions(-) create mode 100644 layouts/page/single.html create mode 100644 layouts/partials/sidebar.html create mode 100644 static/assets/css/main.css create mode 100644 static/assets/css/normalize.css create mode 100644 static/assets/css/syntax.css create mode 100644 static/assets/js/respond.min.js diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5f8e2ec..527f491 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,9 +3,8 @@ {{- partial "head.html" . -}} {{- partial "header.html" . -}} -
+ {{- partial "sidebar.html" . -}} {{- block "main" . }}{{- end }} -
{{- partial "footer.html" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d21e435..e69de29 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +0,0 @@ -{{ define "main" }} -

{{ page.title }}

- -{{ content }} - -{{ end }} \ No newline at end of file diff --git a/layouts/page/single.html b/layouts/page/single.html new file mode 100644 index 0000000..d21e435 --- /dev/null +++ b/layouts/page/single.html @@ -0,0 +1,6 @@ +{{ define "main" }} +

{{ page.title }}

+ +{{ content }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2d1c66f..7181412 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -9,12 +9,12 @@ {{ end }} - - - + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 2c8df9e..96bb432 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,4 +5,4 @@ {{ end }}

{{ site.name }}

- \ No newline at end of file + diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..0db8b1b --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/static/assets/css/main.css b/static/assets/css/main.css new file mode 100644 index 0000000..4d28e4c --- /dev/null +++ b/static/assets/css/main.css @@ -0,0 +1,525 @@ +/* +Main.css +================================== +Begin with generic 'mobile first' styles +*/ + +/* +Normalize the box model +================================== +*/ + +*, +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + +/* +global styles +================================== +*/ + +html, body { + height: 100%; +} + +/* +Typography +================================== +*/ + +body { + font-family: "Avenir Next", Arial, sans-serif; + font-weight: 400; + font-style: normal; + line-height: 1.466666667; +} + +h1, +h3, +h4, +h5, +strong { + font-family: "Avenir Next Demi", "Avenir Next", Arial, sans-serif; + font-weight: 600; +} + +.site-title { + font-size: 1.625em; + font-family: "Avenir Next", Arial, sans-serif; + font-weight: normal; + color: #919395; + margin: 0; + line-height: 1.2941176470588236; + display: inline-block; +} + +h2 { + font-weight: 400; + font-style: normal; + font-size: 1.375em; + margin: 1.4em 0 0 0; +} + +h4 { + font-size: 1em; + text-transform: uppercase; +} + +.page-title { + margin-top: .727272727em; /* 16/22 */ +} + +/* +Lists +-------------------------------- +*/ + +.main-content ul { + padding-left: 1.1em; +} + +.main-content li { + margin-bottom: 1em; +} + +li h3, +li h4 { + margin: 0; +} + +li p { + margin-top: 0; +} + +/* +Links +================================== +*/ + +a { + -webkit-transition: .2s; + -moz-transition: .2s; + transition: .2s; +} + +a, +a:link, +a:visited { + color: #0072ce; + border-bottom: 1px dotted #0072ce; + text-decoration: none; +} + +a:hover { + border-bottom: 1px solid #7eb8dd; + color: #7eb8dd; + text-decoration: none; +} + +a:active { + border-bottom: 1px solid #002d72; + color: #002d72; + text-decoration: none; +} + +a:focus { + border-bottom: 1px solid #0072ce; + color: #0072ce; + outline: thin dotted; + text-decoration: none; +} + +a.title-link { + color: #75787B; + border-bottom: none; +} + +a.title-link:hover, +a.title-link:active, +a.title-link:focus { + color: #7eb8dd; + border-bottom: none; +} + +a.skip-link { + color: #0072ce; + border-bottom: none; + padding: .25em; +} + +a.skip-link:hover, +a.skip-link:active, +a.skip-link:focus { + background-color: #0072ce; + color: #fff; + border-bottom: none; +} + + +/* +Navigation +================================== +*/ + +.sidebar-nav a { + display: block; + padding: 10px; + -webkit-transition: unset; + transition: unset; +} +.sidebar-nav a, +.sidebar-nav a:link, +.sidebar-nav a:visited { + border-bottom: none; + color: #75787b; +} +.sidebar-nav li:hover, +.sidebar-nav a:focus, +.sidebar-nav li:active, +.sidebar-nav .sidebar-nav-active { + color: #75787b; + border-left: 4px solid #0039ac; + background-color: transparent; + border-bottom: 1px solid #babbbd; +} +.sidebar-nav li:hover, +.sidebar-nav li:active, +.sidebar-nav .sidebar-nav-active { + padding-left: 0; +} +.sidebar-nav a:focus { + padding-left: 6px; +} +.sidebar-nav li:hover a:focus, +.sidebar-nav li:active a:focus { + border-left: none; + padding-left: 10px; +} +.sidebar-nav ul { + margin: 0; + padding: 0; + /*border-top: 1px solid @gray-50;*/ +} +.sidebar-nav li { + list-style: none; + border-bottom: 1px solid #babbbd; + font-size: 1.125em; + padding-left: 4px; +} +.sidebar-nav li:last-child { + border-bottom: none; +} + + +/* +Layout +================================== +*/ + +.logo { + display: block; +} + +.content { + padding-top: 2em; + padding-bottom: 2em; +} + +/* offset the fixed position header for jump links */ +section:before { + display: block; + content: ""; + height: 60px; + margin: -60px 0 0; +} + +.wrap { + max-width: 1200px; + margin: 0 auto; + padding-left: 20px; + padding-right: 20px; +} + +header { + width: 100%; + border-bottom: 4px solid #0039ac; + background-color: #fff; + padding: 2em 0; +} + + +/* +Footer +================================== +*/ + +/* for sticky footer */ +.container { + display: table; + height: 100%; + width: 100%; +} + +footer { + display: table-row; /* for sticky footer */ + height: 1px; /* for sticky footer */ + border-top: 2px solid #babbbd; + background: #f1f2f2; + width: 100%; + font-size: 0.875em; +} + +footer .wrap { + padding-top: 2em; + padding-bottom: 2em; +} + + +/* +Helpers +================================== +*/ + +/* 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; +} + + +/* +Style +================================== +*/ + +.intro { + color: #75787B; +} + +li h4 { + margin: 0; +} + +.license { + font-family: "Avenir Next Demi", Arial, sans-serif; + font-weight: normal; + font-style: normal; +} + +pre { + max-width: 100%; + font-size: 0.875em; + overflow-y: scroll; + background-color: #f1f2f2; + padding: 10px; +} + +/* +Post list +---------------------------------- +*/ + +ul.posts { + padding: 0; +} + +.posts li { + list-style: none; +} + +.post-date { + color: #75787B; +} + +/* +Repo list +---------------------------------- +*/ + +ul.repo-list { + margin: .5em 0 1em 0; + padding: 0; +} + +.repo-list li { + list-style: none; +} + +.repo-list p { + margin: 0; + font-size: 0.875em; +} + +.repo-list h4 { + text-transform: none; +} + +/* +Helper Classes +================================== +*/ + +/* +Clearfix list +---------------------------------- +*/ + +.group:before, +.group:after { + content: " "; + display: table; +} + +.group:after { + clear: both; +} + +.group { + *zoom: 1; +} + +/* +Desktop Styles +================================== +*/ + +@media screen and (min-width: 45em) and (min-height: 32.5em) { + + /* + Typography + ============================== + */ + + /* + Layout + ============================== + */ + + .logo { + max-width: 30%; + padding-right: 20px; + float: right; + } + + aside { + width: 30%; + float: left; + } + + .main-content { + width: 67%; + float: right; + margin-bottom: 120px; + } + + /* + Navigation + ============================== + */ + + + /* + Style + ============================== + */ + + /* + Repo list + ------------------------------ + */ + + .repo-list li { + list-style: none; + display: block; + float: left; + height: 4.0625em; + max-height: 4.0625em; + background-color: #E7E7E6; + border-left: 1px solid #BABBBD; + width: 30%; + } + + .repo-list a:link, + .repo-list a:visited { + display: block; + max-height: 4.0625em; + background-color: #E7E7E6; + border-bottom: none; + padding: .625em 1em 1em 1em; + } + + .repo-list a:hover { + color: #4D5F87; + background-color: #CDE3F1; + } + + .repo-list li:first-child { + text-align: center; + border-left: none; + line-height: 60px; + padding: .625em 1em; + width: 10%; + } + +} + +@media screen and (max-width: 54.375em) and (min-height: 32.5em) { + + /* keep the repo list containers the same height, but account for the need for more height */ + + .repo-list li { + height: 6em; + max-height: 6em; + } + + .repo-list a:link, + .repo-list a:visited { + max-height: 6em; + } +} + +/* +Mobile Styles +================================== +*/ + +@media screen and (max-width: 40.5em) { + + .main-content { + margin-top: 1.5em; + } + +} diff --git a/static/assets/css/normalize.css b/static/assets/css/normalize.css new file mode 100644 index 0000000..562891a --- /dev/null +++ b/static/assets/css/normalize.css @@ -0,0 +1,406 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/static/assets/css/syntax.css b/static/assets/css/syntax.css new file mode 100644 index 0000000..2774b76 --- /dev/null +++ b/static/assets/css/syntax.css @@ -0,0 +1,60 @@ +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ diff --git a/static/assets/js/respond.min.js b/static/assets/js/respond.min.js new file mode 100644 index 0000000..e3dc2c0 --- /dev/null +++ b/static/assets/js/respond.min.js @@ -0,0 +1,6 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ +window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); + +/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(a){"use strict";function x(){u(!0)}var b={};if(a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,!b.mediaQueriesSupported){var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var b=m.shift();v(b.href,function(c){p(c,b.href,b.media),h[b.href]=!0,a.setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(b){var h="clientWidth",k=d[h],m="CSS1Compat"===c.compatMode&&k||c.body[h]||k,n={},o=l[l.length-1],p=(new Date).getTime();if(b&&q&&i>p-q)return a.clearTimeout(r),r=a.setTimeout(u,i),void 0;q=p;for(var v in e)if(e.hasOwnProperty(v)){var w=e[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?t||s():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?t||s():1)),w.hasquery&&(z&&A||!(z||m>=x)||!(A||y>=m))||(n[w.media]||(n[w.media]=[]),n[w.media].push(f[w.rules]))}for(var C in g)g.hasOwnProperty(C)&&g[C]&&g[C].parentNode===j&&j.removeChild(g[C]);for(var D in n)if(n.hasOwnProperty(D)){var E=c.createElement("style"),F=n[D].join("\n");E.type="text/css",E.media=D,j.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(c.createTextNode(F)),g.push(E)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)}})(this); -- cgit v1.2.3