mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
Update algolia search styles
This commit is contained in:
1 parent
c20a89b311
commit
eb7f8aed67
10 files changed
+225
-32
No files matched your search
@@ -22,22 +22,6 @@ followed by a `./config.json` file.
|
||||
|
||||
In this `config` file, you can include precise directions to Hugo regarding how it should render your website, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
|
||||
|
||||
## Configure Through Environmental Variables
|
||||
|
||||
In addition to the 3 configuration file options already mentioned, website configuration can be accomplished through operating system environment variables.
|
||||
|
||||
For example, the following command will effectively set a website's title on Unix-like systems:
|
||||
|
||||
{{% input "environment-variable.sh" %}}
|
||||
```bash
|
||||
$ env HUGO_TITLE="Some Title" hugo
|
||||
```
|
||||
{{% /input %}}
|
||||
|
||||
{{% note "Setting Environment Variables" %}}
|
||||
names must be prefixed with `HUGO_` when setting environment variables through operating system environment variables.
|
||||
{{% /note %}}
|
||||
|
||||
## Configuration in YAML
|
||||
|
||||
The following is a typical example of a YAML configuration file. Note the document opens with 3 hyphens and closes with 3 periods. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]:
|
||||
@@ -85,7 +69,7 @@ canonifyURLs = true
|
||||
|
||||
## All Configuration Variables, YAML
|
||||
|
||||
The following is a list of Hugo-defined variables. The values provided in this example represent the default values used by Hugo if not otherwise specified.
|
||||
The following is the full list of Hugo-defined variables in a example YAML file. The values provided in this example represent the default values used by Hugo if not otherwise specified.
|
||||
|
||||
{{% input "config.yml" %}}
|
||||
```yaml
|
||||
@@ -198,7 +182,130 @@ taxonomies:
|
||||
|
||||
## All Configuration Variables, TOML
|
||||
|
||||
The following is the full list of Hugo-defined variables in a example YAML file. The values provided in this example represent the default values used by Hugo if not otherwise specified.
|
||||
|
||||
{{% input "config.toml" %}}
|
||||
```toml
|
||||
---
|
||||
archetypeDir = "archetypes"
|
||||
# hostname (and path) to the root, e.g. http://spf13.com/
|
||||
baseURL = ""
|
||||
# include content marked as draft
|
||||
buildDrafts = false
|
||||
# include content with publishdate in the future
|
||||
buildFuture = false
|
||||
# include content already expired
|
||||
buildExpired = false
|
||||
# enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
|
||||
relativeURLs = false
|
||||
canonifyURLs = false
|
||||
# config file (default is path/config.yaml|json|toml)
|
||||
config = "config.toml"
|
||||
contentDir = "content"
|
||||
dataDir = "data"
|
||||
defaultExtension = "html"
|
||||
defaultLayout = "post"
|
||||
# Missing translations will default to this content language
|
||||
defaultContentLanguage = "en"
|
||||
# Renders the default content language in subdir, e.g. /en/. The root directory / will redirect to /en/
|
||||
defaultContentLanguageInSubdir = false
|
||||
disableLiveReload = false
|
||||
# Do not build RSS files
|
||||
disableRSS = false
|
||||
# Do not build Sitemap file
|
||||
disableSitemap = false
|
||||
# Enable GitInfo feature
|
||||
enableGitInfo = false
|
||||
# Build robots.txt file
|
||||
enableRobotsTXT = false
|
||||
# Do not render 404 page
|
||||
disable404 = false
|
||||
# Do not inject generator meta tag on homepage
|
||||
disableHugoGeneratorInject = false
|
||||
# Do not make the url/path to lowercase
|
||||
disablePathToLower = false
|
||||
# edit new content with this editor, if provided
|
||||
editor = ""
|
||||
# Enable Emoji emoticons support for page content.
|
||||
# See www.emoji-cheat-sheet.com
|
||||
enableEmoji = false
|
||||
# Show a placeholder instead of the default value or an empty string if a translation is missing
|
||||
enableMissingTranslationPlaceholders = false
|
||||
footnoteAnchorPrefix = ""
|
||||
footnoteReturnLinkContents = ""
|
||||
# google analytics tracking id
|
||||
googleAnalytics = ""
|
||||
# if true, auto-detect Chinese/Japanese/Korean Languages in the content. (.Summary and .WordCount can work properly in CJKLanguage)
|
||||
hasCJKLanguage = false
|
||||
languageCode = ""
|
||||
layoutDir = "layouts"
|
||||
# Enable Logging
|
||||
log = false
|
||||
# Log File path (if set, logging enabled automatically)
|
||||
logFile = ""
|
||||
# "toml","yaml", or "json"
|
||||
metaDataFormat = "toml"
|
||||
newContentEditor = ""
|
||||
# Don't sync permission mode of files
|
||||
noChmod = false
|
||||
# Don't sync modification time of files
|
||||
noTimes = false
|
||||
# Pagination
|
||||
paginate = 10
|
||||
paginatePath = "page"
|
||||
# See "content-management/permalinks"
|
||||
permalinks =
|
||||
# Pluralize titles in lists using inflect
|
||||
pluralizeListTitles = true
|
||||
# Preserve special characters in taxonomy names ("Gérard Depardieu" vs "Gerard Depardieu")
|
||||
preserveTaxonomyNames = false
|
||||
# filesystem path to write files to
|
||||
publishDir = "public"
|
||||
# enables syntax guessing for code fences without specified language
|
||||
pygmentsCodeFencesGuessSyntax = false
|
||||
# color-codes for highlighting derived from this style
|
||||
pygmentsStyle = "monokai"
|
||||
# true: use pygments-css or false: color-codes directly
|
||||
pygmentsUseClasses = false
|
||||
# default sitemap configuration map
|
||||
sitemap =
|
||||
# filesystem path to read files relative from
|
||||
source = ""
|
||||
staticDir = "static"
|
||||
# display memory and timing of different steps of the program
|
||||
stepAnalysis = false
|
||||
# theme to use (located by default in /themes/THEMENAME/)
|
||||
themesDir = "themes"
|
||||
theme = ""
|
||||
title = ""
|
||||
# if true, use /filename.html instead of /filename/
|
||||
uglyURLs = false
|
||||
# verbose output
|
||||
verbose = false
|
||||
# verbose logging
|
||||
verboseLog = false
|
||||
# watch filesystem for changes and recreate as needed
|
||||
watch = true
|
||||
[taxonomies]
|
||||
category = "categories"
|
||||
tag = "tags"
|
||||
---
|
||||
```
|
||||
{{% /input %}}
|
||||
|
||||
## Configure Through Environmental Variables
|
||||
|
||||
In addition to the 3 configuration file options already mentioned, website configuration can be accomplished through operating system environment variables.
|
||||
|
||||
For example, the following command will effectively set a website's title on Unix-like systems:
|
||||
|
||||
```bash
|
||||
$ env HUGO_TITLE="Some Title" hugo
|
||||
```
|
||||
|
||||
{{% note "Setting Environment Variables" %}}
|
||||
names must be prefixed with `HUGO_` when setting environment variables through operating system environment variables.
|
||||
{{% /note %}}
|
||||
|
||||
## Ignoring Files When Rendering
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
|
||||
<link rel="stylesheet" href="/css/style.min.css">
|
||||
<!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> -->
|
||||
@@ -8,5 +8,5 @@
|
||||
</header>
|
||||
<form id="site-search" action="">
|
||||
<i class="icon-search"></i>
|
||||
<input type="search" id="search-input">
|
||||
<input type="search" id="search-input" placeholder="Search {{.Site.Title}}...">
|
||||
</form>
|
||||
@@ -6,7 +6,7 @@
|
||||
<script>
|
||||
(function() {
|
||||
if (window.location.hostname === "localhost") {
|
||||
console.log("Analytics not running on local dev.");
|
||||
console.log("Analytics not running on local dev.");
|
||||
return;
|
||||
} else {
|
||||
(function(i, s, o, g, r, a, m) {
|
||||
@@ -23,16 +23,19 @@
|
||||
|
||||
ga('create', '{{$gaid}}', 'auto');
|
||||
ga('send', 'pageview');
|
||||
ga('create', '{{$gaid}}', {'siteSpeedSampleRate': 100});
|
||||
ga('create', '{{$gaid}}', {
|
||||
'siteSpeedSampleRate': 100
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<!-- Algolia embed -->
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script>
|
||||
<script type="text/javascript"> docsearch({
|
||||
apiKey: '41fdb7fafd9b009498ef9ab6d3fb1886',
|
||||
indexName: 'hugodocsconcept',
|
||||
inputSelector: '#search-input',
|
||||
debug: true // Set debug to true if you want to inspect the dropdown
|
||||
<script type="text/javascript">
|
||||
docsearch({
|
||||
apiKey: '41fdb7fafd9b009498ef9ab6d3fb1886',
|
||||
indexName: 'hugodocsconcept',
|
||||
inputSelector: '#search-input',
|
||||
debug: true // Set debug to true if you want to inspect the dropdown
|
||||
});
|
||||
</script>
|
||||
@@ -17,7 +17,7 @@ $(document).ready(function () {
|
||||
// scroll to each target
|
||||
$(target).velocity('scroll', {
|
||||
duration: 500,
|
||||
offset: -50,
|
||||
offset: -20,
|
||||
easing: 'ease-in-out'
|
||||
});
|
||||
location.hash = hashid;
|
||||
|
||||
@@ -8,7 +8,7 @@ $searchbox-config: (
|
||||
input-focus-border-color: #AAAAAA,
|
||||
input-background: #FFFFFF,
|
||||
input-focus-background: #FFFFFF,
|
||||
font-size: 12px,
|
||||
font-size: 1em,
|
||||
placeholder-color: #AAAAAA,
|
||||
icon-size: 14px,
|
||||
icon-position: left,
|
||||
@@ -22,7 +22,7 @@ $searchbox-config: (
|
||||
$dropdown-config: (
|
||||
main-color: #458EE1,
|
||||
layout-type: normal,
|
||||
layout-width: normal,
|
||||
layout-width: small,
|
||||
layout-alignment: align,
|
||||
background-color: #fff,
|
||||
border-radius: 4,
|
||||
|
||||
@@ -6,7 +6,7 @@ h3,
|
||||
h4 {
|
||||
font-weight: $heading-font-weight;
|
||||
margin: 0px;
|
||||
padding-bottom: 20px;
|
||||
padding-bottom: 40px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,91 @@
|
||||
@include on-event($self: true) {
|
||||
outline: none;
|
||||
}
|
||||
width:300px;
|
||||
outline:none;
|
||||
border:0px;
|
||||
border-bottom:1px solid $base-font-color;
|
||||
}
|
||||
|
||||
|
||||
/* Bottom border of each suggestion */
|
||||
|
||||
.algolia-docsearch-suggestion {
|
||||
border-bottom-color: #3A3DD1;
|
||||
}
|
||||
|
||||
|
||||
/* Main category headers */
|
||||
|
||||
// .algolia-docsearch-suggestion--category-header {
|
||||
// background-color: #4B54DE;
|
||||
// }
|
||||
|
||||
/* Highlighted search terms */
|
||||
|
||||
.algolia-docsearch-suggestion--highlight {
|
||||
color: #3A33D1;
|
||||
}
|
||||
|
||||
|
||||
/* Highligted search terms in the main category headers */
|
||||
|
||||
.algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight {
|
||||
background-color: #4D47D5;
|
||||
}
|
||||
|
||||
|
||||
/* Currently selected suggestion */
|
||||
|
||||
.aa-cursor .algolia-docsearch-suggestion--content {
|
||||
color: #272296;
|
||||
}
|
||||
|
||||
.aa-cursor .algolia-docsearch-suggestion {
|
||||
background: #EBEBFB;
|
||||
}
|
||||
|
||||
.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
|
||||
box-shadow: inset 0 -2px 0 0 $hugo-pink;
|
||||
}
|
||||
|
||||
.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
|
||||
color: $hugo-pink;
|
||||
background: desaturate(lighten($hugo-pink, 50%), 30%);
|
||||
padding: 0.1em 0.05em;
|
||||
}
|
||||
|
||||
.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
|
||||
background-color: $hugo-white;
|
||||
}
|
||||
|
||||
.algolia-autocomplete .ds-dropdown-menu {
|
||||
font-size:.8em;
|
||||
min-width: 340px;
|
||||
max-width: 340px;
|
||||
@include MQ(M) {
|
||||
font-size:1em;
|
||||
min-width: 400px;
|
||||
max-width: 500px;
|
||||
}
|
||||
@include MQ(L) {
|
||||
min-width: 500px;
|
||||
max-width: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* For bigger screens, when displaying results in two columns */
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Bottom border of each suggestion */
|
||||
.algolia-docsearch-suggestion {
|
||||
border-bottom-color: #7671df;
|
||||
}
|
||||
/* Left column, with secondary category header */
|
||||
.algolia-docsearch-suggestion--subcategory-column {
|
||||
border-right-color: #7671df;
|
||||
background-color: #F2F2FF;
|
||||
color: #4E4726;
|
||||
}
|
||||
}
|
||||
+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}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
|
||||
+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 R="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";return T.promise?T.rejecter(new Error(R)):console.log(R),e()}O="start"}var D={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
|
||||
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 R="Velocity: First argument ("+y+") was not a property map, a known action, or a registered redirect. Aborting.";return T.promise?T.rejecter(new Error(R)):console.log(R),e()}O="start"}var D={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(R){if(R.message&&-1!==R.message.indexOf("Illegal"))return{r:0,value:t(r)};throw R}}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