mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 22:16:02 +00:00
Update search input styles
This commit is contained in:
1 parent
7234c140c0
commit
03dc2766ac
11 files changed
+182
-50
No files matched your search
@@ -12,4 +12,6 @@ draft: false
|
||||
slug:
|
||||
aliases: []
|
||||
notes:
|
||||
---
|
||||
---
|
||||
|
||||
The Hugo docs have been completely reformatted to include
|
||||
Binary file not shown.
@@ -1,14 +1,15 @@
|
||||
{{$version := .Hugo.Version}}
|
||||
<header id="site-header" class="site-header">
|
||||
<div class="hugo-meta" title="Hugo version {{$version}}">
|
||||
<a href="/" id="home-link">
|
||||
<img src="/images/hugo-logo-wide.png" alt=""><span class="hugo-v">v{{$version}}</span>
|
||||
</a>
|
||||
<a href="/" id="home-link">
|
||||
<img src="/images/hugo-logo-wide.png" alt=""><span class="hugo-v">v{{$version}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<a href="#" id="toggle-search">
|
||||
</header>
|
||||
<a href="#" id="toggle-search">
|
||||
<i class="icon-search"></i>
|
||||
</a>
|
||||
<form id="site-search-form" action="">
|
||||
<input type="search" id="search-input" placeholder="Search {{.Site.Title}}...">
|
||||
</form>
|
||||
</header>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script src="{{.Site.BaseURL}}js/vendor/jquery-2.2.4.min.js"></script>
|
||||
<script src="/js/script.min.js" async></script>
|
||||
{{$gaid := .Site.Params.googleanalyticstrackingcode }}
|
||||
<!-- Place this tag in your head or just before your close body tag. -->
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
{{$gaid := .Site.Params.googleanalyticstrackingcode }}
|
||||
<script>
|
||||
(function() {
|
||||
if (window.location.hostname === "localhost") {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
$('#toggle-search').on('click',function(evt){
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
$('#site-search-form').toggleClass('search-open');
|
||||
});
|
||||
$('#toggle-search').on('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
$('#site-search-form').toggleClass('search-open');
|
||||
window.setTimeout(function() {
|
||||
var sInput = document.getElementById('search-input');
|
||||
sInput.focus();
|
||||
},400);
|
||||
});
|
||||
@@ -47,7 +47,7 @@ $button-border-radius: .25em;
|
||||
|
||||
//Codeblocks
|
||||
$code-font-family:'courierprime',courier,monospace;
|
||||
$code-tooltip-bg-color: $hugo-blue;
|
||||
$code-tooltip-bg-color: $hugo-pink;
|
||||
$code-block-base-font-color: #ffffff;
|
||||
$code-block-background-color: $hugo-black;
|
||||
$code-editor-header-bg-color: $hugo-gray-dark;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS and IE text size adjust after device orientation change,
|
||||
@@ -7,11 +8,15 @@
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
font-family: sans-serif;
|
||||
/* 1 */
|
||||
-ms-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
@@ -20,9 +25,11 @@ body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||
@@ -46,6 +53,7 @@ summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
@@ -55,10 +63,13 @@ audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
display: inline-block;
|
||||
/* 1 */
|
||||
vertical-align: baseline;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
@@ -69,6 +80,7 @@ audio:not([controls]) {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
|
||||
@@ -79,9 +91,11 @@ template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
@@ -90,6 +104,7 @@ a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Improve readability of focused elements when they are also in an
|
||||
* active/hover state.
|
||||
@@ -100,9 +115,11 @@ a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||
*/
|
||||
@@ -111,6 +128,7 @@ abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
@@ -120,6 +138,7 @@ strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari and Chrome.
|
||||
*/
|
||||
@@ -128,6 +147,7 @@ dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari, and Chrome.
|
||||
@@ -138,6 +158,7 @@ h1 {
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
@@ -147,6 +168,7 @@ mark {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
@@ -155,6 +177,7 @@ small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
@@ -175,9 +198,11 @@ sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9/10.
|
||||
*/
|
||||
@@ -186,6 +211,7 @@ img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Correct overflow not hidden in IE 9/10/11.
|
||||
*/
|
||||
@@ -194,9 +220,11 @@ svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari.
|
||||
*/
|
||||
@@ -205,6 +233,7 @@ figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
@@ -214,6 +243,7 @@ hr {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contain overflow in all browsers.
|
||||
*/
|
||||
@@ -222,6 +252,7 @@ pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address odd `em`-unit font size rendering in all browsers.
|
||||
*/
|
||||
@@ -234,14 +265,17 @@ samp {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
* styling of `select`, unless a `border` property is set.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct color not being inherited.
|
||||
* Known issue: affects color of disabled elements.
|
||||
@@ -254,11 +288,15 @@ input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
color: inherit;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
margin: 0;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||
*/
|
||||
@@ -267,6 +305,7 @@ button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
@@ -279,6 +318,7 @@ select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
@@ -288,13 +328,19 @@ select {
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
html input[type="button"],
|
||||
|
||||
/* 1 */
|
||||
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
-webkit-appearance: button;
|
||||
/* 2 */
|
||||
cursor: pointer;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
@@ -304,6 +350,7 @@ html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
@@ -314,6 +361,7 @@ input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
@@ -323,6 +371,7 @@ input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* It's recommended that you don't attempt to style these elements.
|
||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
@@ -333,10 +382,13 @@ input {
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
* `font-size` values of the `input`, it causes the cursor style of the
|
||||
@@ -348,16 +400,22 @@ input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
box-sizing: content-box; /* 2 */
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
box-sizing: content-box;
|
||||
/* 2 */
|
||||
border-radius: 0px;
|
||||
outline:none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||
@@ -369,6 +427,7 @@ input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
@@ -379,16 +438,20 @@ fieldset {
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
border: 0;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||
*/
|
||||
@@ -397,6 +460,7 @@ textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Don't inherit the `font-weight` (applied by a rule above).
|
||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
@@ -406,9 +470,11 @@ optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* Tables
|
||||
========================================================================== */
|
||||
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
@@ -1,26 +1,78 @@
|
||||
#toggle-search {
|
||||
display:block;
|
||||
float:right;
|
||||
margin-right:20px;
|
||||
z-index:60;
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: .5em;
|
||||
right: .5em;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
font-size: 1.2em;
|
||||
z-index: 60;
|
||||
}
|
||||
|
||||
form#site-search-form {
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 50;
|
||||
width: 300px;
|
||||
transform: translateX(290px);
|
||||
transition: transform .3s ease-in-out;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
position: fixed;
|
||||
top: $site-header-height;
|
||||
height: $site-header-height * .9;
|
||||
transform:translateY(-#{$site-header-height});
|
||||
background-color: $body-bg-color;
|
||||
z-index: 19;
|
||||
box-shadow: 0 3px 6px rgba($hugo-pink, 0.15), 0 3px 6px rgba($hugo-pink, 0.3);
|
||||
&.search-open {
|
||||
transition: transform .3s ease-in-out;
|
||||
border-bottom: 1px solid $base-font-color;
|
||||
transform: translateX(0px);
|
||||
transform: translateY(0);
|
||||
border-bottom: 1px solid $hugo-pink;
|
||||
}
|
||||
#search-input {
|
||||
max-height: $site-header-height * .9;
|
||||
padding-left: 20px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@include MQ(L) {
|
||||
form#site-search-form {
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: 8px;
|
||||
right: 0px;
|
||||
z-index: 50;
|
||||
width: 300px;
|
||||
transform: translateX(290px);
|
||||
transition: transform .3s ease-in-out;
|
||||
box-shadow: none;
|
||||
max-height: $site-header-height * .8;
|
||||
&.search-open {
|
||||
transition: transform .3s ease-in-out;
|
||||
border-bottom-width: 0px;
|
||||
transform: translateX(0px);
|
||||
#search-input {
|
||||
transition: opacity .3 ease-in-out;
|
||||
opacity: 1;
|
||||
border-bottom:3px solid $hugo-pink;
|
||||
&::after {
|
||||
display:inline-block;
|
||||
content:'';
|
||||
width:1em;
|
||||
border-bottom:3px solid $hugo-pink;
|
||||
}
|
||||
}
|
||||
}
|
||||
#search-input {
|
||||
transition: opacity .3s ease-in-out;
|
||||
max-height: $site-header-height * .8;
|
||||
padding-left: 0px;
|
||||
font-size: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//clear default search styles
|
||||
#search-input {
|
||||
@include on-event($self: true) {
|
||||
outline: none;
|
||||
@@ -28,6 +80,7 @@ form#site-search-form {
|
||||
width:260px;
|
||||
outline:none;
|
||||
border:0px;
|
||||
border-radius:0px;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,8 +151,8 @@ form#site-search-form {
|
||||
}
|
||||
|
||||
.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column-text .algolia-docsearch-suggestion--highlight {
|
||||
color:$hugo-blue;
|
||||
font-weight:bold;
|
||||
color: $hugo-blue;
|
||||
font-weight: bold;
|
||||
background: desaturate(lighten($hugo-blue, 50%), 30%);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,22 @@
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 10;
|
||||
z-index: 20;
|
||||
@include card(1);
|
||||
@include MQ(L) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
.hugo-meta {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@include MQ(L) {
|
||||
float: left;
|
||||
width: auto;
|
||||
justify-content: flex-start;
|
||||
// max-width: 200px;
|
||||
}
|
||||
}
|
||||
#home-link {
|
||||
display: flex;
|
||||
@@ -49,5 +57,3 @@
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300}body{font-size:90%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sass:before{content:'\e803'}.icon-search:before{content:'\e80b'}.icon-share:before{content:'\f1e0'}.icLine truncated
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300}body{font-size:90%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quote-left:before{content:'\e809'}.icon-quote-right:before{content:'\e80a'}.icon-sass:before{content:'\e803'}.icon-search:before{content:'\e80b'}.icon-sLine truncated
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
"use strict";function getMobileOperatingSystem(){var e=navigator.userAgent||navigator.vendor||window.opera;return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"Android":/iPad|iPhone|iPod/.test(e)&&!window.MSStream?"iOS":void 0}function urlize(e){return"string"==typeof e?e.replace(/[^\w\s\-]/gi,"").toLowerCase().replace(" ","-"):e instanceof HTMLElement?e.textContent.replace(/[^\w\s\-]/gi,"").toLowerCase().replace(" ","-"):void 0}function showTooltip(e,t){e.setAttribute("class","copy-button tooltipped tooltipped-s"),e.setAttribute("aria-label",t)}function fallbackMessage(e){var t="",r="cut"===e?"X":"C";return t=isMac?"Press ⌘-"+r:"Press Ctrl-"+r}var byId=function(e){return document.getElementById(e)},qs=function(e){return document.querySelector(e)},qsa=function(e){return document.querySelectorAll(e)},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){function t(e){var t=e.length,n=r.type(e);return"function"!==n&&!r.isWindow(e)&&(!(1!==e.nodeType||!t)||"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}if(!e.jQuery){var r=function c(e,t){return new c.fn.init(e,t)};r.isWindow=function(e){return e&&e===e.window},r.type=function(e){return e?"object"==("undefined"==typeof e?"undefined":_typeof(e))||"function"==typeof e?a[o.call(e)]||"object":"undefined"==typeof e?"undefined":_typeof(e):e+""},r.isArray=Array.isArray||function(e){return"array"===r.type(e)},r.isPlainObject=function(e){var t;if(!e||"object"!==r.type(e)||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!i.call(e,"constructor")&&!i.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(t in e);return void 0===t||i.call(e,t)},r.each=function(e,r,n){var a,i=0,o=e.length,s=t(e);if(n){if(s)for(;i<o&&(a=r.apply(e[i],n),a!==!1);i++);else for(i in e)if(a=r.apply(e[i],n),a===!1)break}else if(s)for(;i<o&&(a=r.call(e[i],i,e[i]),a!==!1);i++);else for(i in e)if(a=r.call(e[i],i,e[i]),a===!1)break;return e},r.data=function(e,t,a){if(void 0===a){var i=e[r.expando],o=i&&n[i];if(void 0===t)return o;if(o&&t in o)return o[t]}else if(void 0!==t){var s=e[r.expando]||(e[r.expando]=++r.uuid);return n[s]=n[s]||{},n[s][t]=a,a}},r.removeData=function(e,t){var a=e[r.expando],i=a&&n[a];i&&(t?r.each(t,function(e,t){delete i[t]}):delete n[a])},r.extend=function(){var e,t,n,a,i,o,s=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[l]||{},l++),"object"!=("undefined"==typeof s?"undefined":_typeof(s))&&"function"!==r.type(s)&&(s={}),l===c&&(s=this,l--);l<c;l++)if(i=arguments[l])for(a in i)e=s[a],n=i[a],s!==n&&(u&&n&&(r.isPlainObject(n)||(t=r.isArray(n)))?(t?(t=!1,o=e&&r.isArray(e)?e:[]):o=e&&r.isPlainObject(e)?e:{},s[a]=r.extend(u,o,n)):void 0!==n&&(s[a]=n));return s},r.queue=function(e,n,a){function i(e,r){var n=r||[];return e&&(t(Object(e))?!function(e,t){for(var r=+t.length,n=0,a=e.length;n<r;)e[a++]=t[n++];if(r!==r)for(;void 0!==t[n];)e[a++]=t[n++];return e.length=a,e}(n,"string"==typeof e?[e]:e):[].push.call(n,e)),n}if(e){n=(n||"fx")+"queue";var o=r.data(e,n);return a?(!o||r.isArray(a)?o=r.data(e,n,i(a)):o.push(a),o):o||[]}},r.dequeue=function(e,t){r.each(e.nodeType?[e]:e,function(e,n){t=t||"fx";var a=r.queue(n,t),i=a.shift();"inprogress"===i&&(i=a.shift()),i&&("fx"===t&&a.unshift("inprogress"),i.call(n,function(){r.dequeue(n,t)}))})},r.fn=r.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function e(e){for(var t=e.offsetParent||document;t&&"html"!==t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var t=this[0],n=e(t),a=this.offset(),i=/^(?:body|html)$/i.test(n.nodeName)?{top:0,left:0}:r(n).offset();return a.top-=parseFloat(t.style.marginTop)||0,a.left-=parseFloat(t.style.marginLeft)||0,n.style&&(i.top+=parseFloat(n.style.borderTopWidth)||0,i.left+=parseFloat(n.style.borderLeftWidth)||0),{top:a.top-i.top,left:a.left-i.left}}};var n={};r.expando="velocity"+(new Date).getTime(),r.uuid=0;for(var a={},i=a.hasOwnProperty,o=a.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)a["[object "+s[l]+"]"]=s[l].toLowerCase();r.fn.init.prototype=r.fn,e.Velocity={Utilities:r}}}(window),function(e){"object"==("undefined"==typeof module?"undefined":_typeof(module))&&"object"==_typeof(module.exports)?module.exports=e():"function"==typeof define&&define.amd?define(e):e()}(function(){return function(e,t,r,n){function a(e){for(var t=-1,r=e?e.length:0,n=[];++t<r;){var a=e[t];a&&n.push(a)}return n}function i(e){return m.isWrapped(e)Line truncated
|
||||
g=0,b=this,d=this):(l=!0,g=1,b=x?arguments[0].elements||arguments[0].e:arguments[0]),b=i(b)){x?(y=arguments[0].properties||arguments[0].p,S=arguments[0].options||arguments[0].o):(y=arguments[g],S=arguments[g+1]);var C=b.length,P=0;if(!/^(stop|finish|finishAll)$/i.test(y)&&!f.isPlainObject(S)){var N=g+1;S={};for(var E=N;E<arguments.length;E++)m.isArray(arguments[E])||!/^(fast|normal|slow)$/i.test(arguments[E])&&!/^\d/.test(arguments[E])?m.isString(arguments[E])||m.isArray(arguments[E])?S.easing=arguments[E]:m.isFunction(arguments[E])&&(S.complete=arguments[E]):S.duration=arguments[E]}var T={promise:null,resolver:null,rejecter:null};l&&v.Promise&&(T.promise=new v.Promise(function(e,t){T.resolver=e,T.rejecter=t}));var O;switch(y){case"scroll":O="scroll";break;case"reverse":O="reverse";break;case"finish":case"finishAll":case"stop":f.each(b,function(e,t){o(t)&&o(t).delayTimer&&(clearTimeout(o(t).delayTimer.setTimeout),o(t).delayTimer.next&&o(t).delayTimer.next(),delete o(t).delayTimer),"finishAll"!==y||S!==!0&&!m.isString(S)||(f.each(f.queue(t,m.isString(S)?S:""),function(e,t){m.isFunction(t)&&t()}),f.queue(t,m.isString(S)?S:"",[]))});var M=[];return f.each(v.State.calls,function(e,t){t&&f.each(t[1],function(r,a){var i=S===n?"":S;return i!==!0&&t[2].queue!==i&&(S!==n||t[2].queue!==!1)||void f.each(b,function(r,n){if(n===a)if((S===!0||m.isString(S))&&(f.each(f.queue(n,m.isString(S)?S:""),function(e,t){m.isFunction(t)&&t(null,!0)}),f.queue(n,m.isString(S)?S:"",[])),"stop"===y){var s=o(n);s&&s.tweensContainer&&i!==!1&&f.each(s.tweensContainer,function(e,t){t.endValue=t.currentValue}),M.push(e)}else"finish"!==y&&"finishAll"!==y||(t[2].duration=1)})})}),"stop"===y&&(f.each(M,function(e,t){p(t,!0)}),T.promise&&T.resolver(b)),e();default:if(!f.isPlainObject(y)||m.isEmptyObject(y)){if(m.isString(y)&&v.Redirects[y]){s=f.extend({},S);var A=s.duration,I=s.delay||0;return s.backwards===!0&&(b=f.extend(!0,[],b).reverse()),f.each(b,function(e,t){parseFloat(s.stagger)?s.delay=I+parseFloat(s.stagger)*e:m.isFunction(s.stagger)&&(s.delay=I+s.stagger.call(t,e,C)),s.drag&&(s.duration=parseFloat(A)||(/^(callout|transition)/.test(y)?1e3:h),s.duration=Math.max(s.duration*(s.backwards?1-e/C:(e+1)/C),.75*s.duration,200)),v.Redirects[y].call(t,t,s||{},e,C,b,T.promise?T:n)}),e()}var D="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";return T.promise?T.rejecter(new Error(D)):console.log(D),e()}O="start"}var R={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},V=[];f.each(b,function(e,t){m.isNode(t)&&a(t,e)}),s=f.extend({},v.defaults,S),s.loop=parseInt(s.loop,10);var L=2*s.loop-1;if(s.loop)for(var j=0;j<L;j++){var X={delay:s.delay,progress:s.progress};j===L-1&&(X.display=s.display,X.visibility=s.visibility,X.complete=s.complete),k(b,"reverse",X)}return e()}};v=f.extend(x,v),v.animate=x;var C=t.requestAnimationFrame||g;return v.State.isMobile||r.hidden===n||r.addEventListener("visibilitychange",function(){r.hidden?(C=function(e){return setTimeout(function(){e(!0)},16)},u()):C=t.requestAnimationFrame||g}),e.Velocity=v,e!==t&&(e.fn.velocity=x,e.fn.velocity.defaults=v.defaults),f.each(["Down","Up"],function(e,t){v.Redirects["slide"+t]=function(e,r,a,i,o,s){var l=f.extend({},r),c=l.begin,u=l.complete,p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};l.display===n&&(l.display="Down"===t?"inline"===v.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){c&&c.call(o,o);for(var r in p){d[r]=e.style[r];var n=v.CSS.getPropertyValue(e,r);p[r]="Down"===t?[n,0]:[0,n]}d.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in d)e.style[t]=d[t];u&&u.call(o,o),s&&s.resolver(o)},v(e,p,l)}}),f.each(["In","Out"],function(e,t){v.Redirects["fade"+t]=function(e,r,a,i,o,s){var l=f.extend({},r),c=l.complete,u={opacity:"In"===t?1:0};a!==i-1?l.complete=l.begin=null:l.complete=function(){c&&c.call(o,o),s&&s.resolver(o)},l.display===n&&(l.display="In"===t?"auto":"none"),v(this,u,l)}}),v}(window.jQuery||window.Zepto||window,window,document)});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e){"function"==typeof require&&"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e():"function"==typeof define&&define.amd?define(["velocity"],e):e()}(function(){return function(e,t,r,n){function a(e,t){var r=[];return!(!e||!t)&&(o.each([e,t],function(e,t){var n=[];o.each(t,function(e,t){for(;t.toString().length<5;)t="0"+t;n.push(t)}),r.push(n.join(""))}),parseFloat(r[0])>parseFloat(r[1]))}var i=e.Velocity;if(!i||!i.Utilities)return void(t.console&&console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."));var
Line truncated
|
||||
}function s(e,t){if(n(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?s(e.parent,t):void 0}function l(e,t){return!a&&n(t.iR,e)}function f(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function d(e,t,r,n){var a=n?"":O.classPrefix,i='<span class="'+a,o=r?"":T;return i+=e+'">',i+t+o}function g(){var e,r,n,a;if(!x.k)return t(N);for(a="",r=0,x.lR.lastIndex=0,n=x.lR.exec(N);n;)a+=t(N.substring(r,n.index)),e=f(x,n),e?(E+=e[1],a+=d(e[0],t(n[0]))):a+=t(n[0]),r=x.lR.lastIndex,n=x.lR.exec(N);return a+t(N.substr(r))}function m(){var e="string"==typeof x.sL;if(e&&!C[x.sL])return t(N);var r=e?u(x.sL,N,!0,k[x.sL]):p(N,x.sL.length?x.sL:void 0);return x.r>0&&(E+=r.r),e&&(k[x.sL]=r.top),d(r.language,r.value,!1,!0)}function b(){P+=null!=x.sL?m():g(),N=""}function h(e){P+=e.cN?d(e.cN,"",!0):"",x=Object.create(e,{parent:{value:x}})}function y(e,t){if(N+=e,null==t)return b(),0;var r=o(t,x);if(r)return r.skip?N+=t:(r.eB&&(N+=t),b(),r.rB||r.eB||(N=t)),h(r,t),r.rB?0:t.length;var n=s(x,t);if(n){var a=x;a.skip?N+=t:(a.rE||a.eE||(N+=t),b(),a.eE&&(N=t));do x.cN&&(P+=T),x.skip||(E+=x.r),x=x.parent;while(x!==n.parent);return n.starts&&h(n.starts,""),a.rE?0:t.length}if(l(t,x))throw new Error('Illegal lexeme "'+t+'" for mode "'+(x.cN||"<unnamed>")+'"');return N+=t,t.length||1}var v=S(e);if(!v)throw new Error('Unknown language: "'+e+'"');c(v);var w,x=i||v,k={},P="";for(w=x;w!==v;w=w.parent)w.cN&&(P=d(w.cN,"",!0)+P);var N="",E=0;try{for(var M,A,I=0;x.t.lastIndex=I,M=x.t.exec(r),M;)A=y(r.substring(I,M.index),M[0]),I=M.index+A;for(y(r.substr(I)),w=x;w.parent;w=w.parent)w.cN&&(P+=T);return{r:E,value:P,language:e,top:x}}catch(D){if(D.message&&-1!==D.message.indexOf("Illegal"))return{r:0,value:t(r)};throw D}}function p(e,r){r=r||O.languages||x(C);var n={r:0,value:t(e)},a=n;return r.filter(S).forEach(function(t){var r=u(t,e,!1);r.language=t,r.r>a.r&&(a=r),r.r>n.r&&(a=n,n=r)}),a.language&&(n.second_best=a),n}function f(e){return O.tabReplace||O.useBR?e.replace(E,function(e,t){return O.useBR&&"\n"===e?"<br>":O.tabReplace?t.replace(/\t/g,O.tabReplace):void 0}):e}function d(e,t,r){var n=t?k[t]:r,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(n)&&a.push(n),a.join(" ").trim()}function g(e){var t,r,n,o,c,g=i(e);a(g)||(O.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e,c=t.textContent,n=g?u(g,c,!0):p(c),r=s(t),r.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=n.value,n.value=l(r,s(o),c)),n.value=f(n.value),e.innerHTML=n.value,e.className=d(e.className,g,n.language),e.result={language:n.language,re:n.r},n.second_best&&(e.second_best={language:n.second_best.language,re:n.second_best.r}))}function m(e){O=o(O,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,g)}}function h(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function y(t,r){var n=C[t]=r(e);n.aliases&&n.aliases.forEach(function(e){k[e]=t})}function v(){return x(C)}function S(e){return e=(e||"").toLowerCase(),C[e]||C[k[e]]}var w=[],x=Object.keys,C={},k={},P=/^(no-?highlight|plain|text)$/i,N=/\blang(?:uage)?-([\w-]+)\b/i,E=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,T="</span>",O={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},M={"&":"&","<":"<",">":">"};return e.highlight=u,e.highlightAuto=p,e.fixMarkup=f,e.highlightBlock=g,e.configure=m,e.initHighlighting=b,e.initHighlightingOnLoad=h,e.registerLanguage=y,e.listLanguages=v,e.getLanguage=S,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(t,r,n){var a=e.inherit({cN:"comment",b:t,e:r,c:[]},n||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e}),hljs.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={eW:!0,i:/</,r:0,c:[{cN:"attr",b:t,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,vLine truncated
|
||||
}function s(e,t){if(n(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?s(e.parent,t):void 0}function l(e,t){return!a&&n(t.iR,e)}function f(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function d(e,t,r,n){var a=n?"":O.classPrefix,i='<span class="'+a,o=r?"":T;return i+=e+'">',i+t+o}function g(){var e,r,n,a;if(!x.k)return t(N);for(a="",r=0,x.lR.lastIndex=0,n=x.lR.exec(N);n;)a+=t(N.substring(r,n.index)),e=f(x,n),e?(E+=e[1],a+=d(e[0],t(n[0]))):a+=t(n[0]),r=x.lR.lastIndex,n=x.lR.exec(N);return a+t(N.substr(r))}function m(){var e="string"==typeof x.sL;if(e&&!C[x.sL])return t(N);var r=e?u(x.sL,N,!0,k[x.sL]):p(N,x.sL.length?x.sL:void 0);return x.r>0&&(E+=r.r),e&&(k[x.sL]=r.top),d(r.language,r.value,!1,!0)}function b(){P+=null!=x.sL?m():g(),N=""}function h(e){P+=e.cN?d(e.cN,"",!0):"",x=Object.create(e,{parent:{value:x}})}function y(e,t){if(N+=e,null==t)return b(),0;var r=o(t,x);if(r)return r.skip?N+=t:(r.eB&&(N+=t),b(),r.rB||r.eB||(N=t)),h(r,t),r.rB?0:t.length;var n=s(x,t);if(n){var a=x;a.skip?N+=t:(a.rE||a.eE||(N+=t),b(),a.eE&&(N=t));do x.cN&&(P+=T),x.skip||(E+=x.r),x=x.parent;while(x!==n.parent);return n.starts&&h(n.starts,""),a.rE?0:t.length}if(l(t,x))throw new Error('Illegal lexeme "'+t+'" for mode "'+(x.cN||"<unnamed>")+'"');return N+=t,t.length||1}var v=S(e);if(!v)throw new Error('Unknown language: "'+e+'"');c(v);var w,x=i||v,k={},P="";for(w=x;w!==v;w=w.parent)w.cN&&(P=d(w.cN,"",!0)+P);var N="",E=0;try{for(var M,A,I=0;x.t.lastIndex=I,M=x.t.exec(r),M;)A=y(r.substring(I,M.index),M[0]),I=M.index+A;for(y(r.substr(I)),w=x;w.parent;w=w.parent)w.cN&&(P+=T);return{r:E,value:P,language:e,top:x}}catch(D){if(D.message&&-1!==D.message.indexOf("Illegal"))return{r:0,value:t(r)};throw D}}function p(e,r){r=r||O.languages||x(C);var n={r:0,value:t(e)},a=n;return r.filter(S).forEach(function(t){var r=u(t,e,!1);r.language=t,r.r>a.r&&(a=r),r.r>n.r&&(a=n,n=r)}),a.language&&(n.second_best=a),n}function f(e){return O.tabReplace||O.useBR?e.replace(E,function(e,t){return O.useBR&&"\n"===e?"<br>":O.tabReplace?t.replace(/\t/g,O.tabReplace):void 0}):e}function d(e,t,r){var n=t?k[t]:r,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(n)&&a.push(n),a.join(" ").trim()}function g(e){var t,r,n,o,c,g=i(e);a(g)||(O.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e,c=t.textContent,n=g?u(g,c,!0):p(c),r=s(t),r.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=n.value,n.value=l(r,s(o),c)),n.value=f(n.value),e.innerHTML=n.value,e.className=d(e.className,g,n.language),e.result={language:n.language,re:n.r},n.second_best&&(e.second_best={language:n.second_best.language,re:n.second_best.r}))}function m(e){O=o(O,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,g)}}function h(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function y(t,r){var n=C[t]=r(e);n.aliases&&n.aliases.forEach(function(e){k[e]=t})}function v(){return x(C)}function S(e){return e=(e||"").toLowerCase(),C[e]||C[k[e]]}var w=[],x=Object.keys,C={},k={},P=/^(no-?highlight|plain|text)$/i,N=/\blang(?:uage)?-([\w-]+)\b/i,E=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,T="</span>",O={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},M={"&":"&","<":"<",">":">"};return e.highlight=u,e.highlightAuto=p,e.fixMarkup=f,e.highlightBlock=g,e.configure=m,e.initHighlighting=b,e.initHighlightingOnLoad=h,e.registerLanguage=y,e.listLanguages=v,e.getLanguage=S,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(t,r,n){var a=e.inherit({cN:"comment",b:t,e:r,c:[]},n||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e}),hljs.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={eW:!0,i:/</,r:0,c:[{cN:"attr",b:t,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,vLine truncated
|
||||
Reference in new issue
Block a user