mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
Clean up first draft of templates/partials
This commit is contained in:
1 parent
149156391a
commit
bfddd8ab47
15 files changed
+134
-106
No files matched your search
+1
-1
@@ -26,7 +26,7 @@ layoutDir = "layouts"
|
||||
# Enable Logging
|
||||
log = true
|
||||
# Log Filepath (if set, logging enabled automatically)
|
||||
logFil = ""
|
||||
logFile = ""
|
||||
# This accepts yaml, toml, or json
|
||||
metaDataFormat = "yaml"
|
||||
# This intelligently adds an "s" to the titles of list pages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Go Template Primer
|
||||
linktitle: Go Template Primer
|
||||
description: Hugo uses Go html/template library, an extremely lightweight and performant, engine as the basis for all Hugo templating.
|
||||
description: Hugo uses Go's html/template library, an extremely lightweight and performant engine, as the basis for all Hugo templating.
|
||||
godocref: https://golang.org/pkg/html/template/
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
|
||||
@@ -42,9 +42,7 @@ Note that a homepage can also have a content file with front matter. This conten
|
||||
|
||||
## Example Homepage Template
|
||||
|
||||
The following is an example of a homepage template.
|
||||
|
||||
It makes use of [partial templates][partials] and uses a similar approach as a [Hugo list template][lists].
|
||||
The following is an example of a homepage template makes use of [partial][partials] and [block][] templates.
|
||||
|
||||
{{% code file="layouts/index.html" download="index.html" %}}
|
||||
```html
|
||||
@@ -63,6 +61,7 @@ It makes use of [partial templates][partials] and uses a similar approach as a [
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
[block]: /templates/base/
|
||||
[contentorg]: /content-management/organization/
|
||||
[lists]: /templates/lists/
|
||||
[lookup]: /templates/lookup-order/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Introduction to Lists in Hugo
|
||||
linktitle: Hugo Lists
|
||||
description: Lists have a specific meaning and usage in Hugo. If you want to know how to render your site homepage, section homepage, taxonomy list, or taxonomy terms list, start here.
|
||||
description: Lists have a specific meaning and usage in Hugo when it comes to rendering your site homepage, section page, taxonomy list, or taxonomy terms list.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
|
||||
+116
-91
@@ -14,36 +14,94 @@ toc: true
|
||||
wip: true
|
||||
---
|
||||
|
||||
## Partials vs Templates
|
||||
In practice, splitting out reusable template portions into **partial templates** to be included anywhere help keep your templating DRY.
|
||||
|
||||
In practice, it's very convenient to split out common template portions into a partial template that can be included anywhere. As you create the rest of your templates, you will include templates from the `/layouts/partials/` directory or from arbitrary partial subdirectories like `/layouts/partials/post/tag/`.
|
||||
## Partial Template Lookup Order
|
||||
|
||||
Partials are especially important for [themes][] because they give theme users an opportunity to [overwrite just a small portion of a theme][customize] while maintaining compatibility with the theme's upstream.
|
||||
Partial templates---like [single page templates][singletemps] and [list page templates][listtemps]---have a specific lookup order. However, partials are simpler in that Hugo will only check in two places:
|
||||
|
||||
Theme developers may want to include a few partials with empty HTML files in the theme just so end users have an easy place to inject their customized content.
|
||||
1. `layouts/partials/*<PARTIALNAME>.html`
|
||||
2. `themes/<THEME>/layouts/partials/*<PARTIALNAME>.html`
|
||||
|
||||
I've found it helpful to include a header and footer template in partials so I can include those in all the full page layouts. There is nothing special about header.html and footer.html other than they seem like good names to use for inclusion in your other templates.
|
||||
This allows a theme's end user to copy a partial's contents into a file of the same name for [further customization][customize].
|
||||
|
||||
```bash
|
||||
▾ layouts/
|
||||
▾ partials/
|
||||
header.html
|
||||
footer.html
|
||||
## Using Partials in your Templates
|
||||
|
||||
All partials for your Hugo project are located in a single `layouts/partials` directory. For better organization, you can create multiple subdirectories within `partials` as well:
|
||||
|
||||
```
|
||||
.
|
||||
└── layouts
|
||||
└── partials
|
||||
├── footer
|
||||
│ ├── scripts.html
|
||||
│ └── site-footer.html
|
||||
├── head
|
||||
│ ├── favicons.html
|
||||
│ ├── metadata.html
|
||||
│ ├── prerender.html
|
||||
│ └── twitter.html
|
||||
└── header
|
||||
├── site-header.html
|
||||
└── site-nav.html
|
||||
```
|
||||
|
||||
## Partial vs Template
|
||||
All partials are called within your templates using the following pattern:
|
||||
|
||||
Version v0.12 of Hugo introduced the `partial` call inside the template system. This is a change to the way partials were handled previously inside the template system. In earlier versions, Hugo didn’t treat partials specially, and you could include a partial template with the `template` call in the standard template language.
|
||||
```
|
||||
{{ partial "<PATH>/<PARTIAL>.html" . }}
|
||||
```
|
||||
|
||||
With the addition of the theme system in v0.11, it became apparent that a theme & override-aware partial was needed.
|
||||
{{% note %}}
|
||||
One of the most common mistakes with new Hugo users is failing to pass a context to the partial call. In the pattern above, note how "the dot" (`.`) is required as the second argument to give the partial context. You can read more about "the dot" in the [Go Template Primer](/templates/go-templates/).
|
||||
{{% /note %}}
|
||||
|
||||
When using Hugo v0.12 and above, please use the `partial` call (and leave out the “partial/” path). The old approach would still work, but wouldn’t benefit from the ability to have users override the partial theme file with local layouts.
|
||||
As shown in the above example directory structure, you can nest your directories within `partials` for better source organization. You only need to call the nested partial's path relative to the `partials` directory:
|
||||
|
||||
## Example `header.html`
|
||||
```golang
|
||||
{{ partial "header/site-header.html" . }}
|
||||
{{ partial "footer/scripts.html" . }}
|
||||
```
|
||||
|
||||
This header template is used for [spf13.com](http://spf13.com/):
|
||||
{{% note %}}
|
||||
Before v0.12, Hugo used the `template` call to include partial templates. When using Hugo v0.12 and newer, be sure to use the `{{ partial "<PATH>/<PARTIAL>.html" . }}` syntax. The old approach will still work but has fewer benefits.
|
||||
{{% /note %}}
|
||||
|
||||
{{% code file="layouts/partials/header.html" %}}
|
||||
### Variable Scoping
|
||||
|
||||
The second argument in a partial call is the variable being passed down. The above examples are passing the `.`, which tells the template receiving the partial to apply the current [context][context].
|
||||
|
||||
This means the partial will *only* be able to access those variables. The partial is isolated and *has no access to the outer scope*. From within the partial, `$.Var` is equivalent to `.Var`.
|
||||
|
||||
### Cached Partials
|
||||
|
||||
The [`partialCached` template function][partialcached] can offer significant performance gains for complex templates that don't need to be re-rendered on every invocation. The simplest usage is as follows:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . }}
|
||||
```
|
||||
|
||||
You can also pass additional parameters to `partialCached` to create *variants* of the cached partial.
|
||||
|
||||
For example, you can tell Hugo to only render the partial `footer.html` once per section:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . .Section }}
|
||||
```
|
||||
|
||||
If you need to pass additional parameters to create unique variants, you can pass as many variant parameters as you need:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . .Params.country .Params.province }}
|
||||
```
|
||||
|
||||
Note that the variant parameters are not made available to the underlying partial template. They are only use to create a unique cache key.
|
||||
|
||||
### Example `header.html`
|
||||
|
||||
The following `header.html` partial template is used for [spf13.com](http://spf13.com/):
|
||||
|
||||
{{% code file="layouts/partials/header.html" download="header.html" %}}
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
@@ -63,11 +121,15 @@ This header template is used for [spf13.com](http://spf13.com/):
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
## Example `footer.html`
|
||||
{{% note %}}
|
||||
The `header.html` example partial was built before the introduction of block templates to Hugo. Read more on [base templates and blocks](/templates/base/) for defining the outer chrome or shell of your master templates (i.e., your site's head, header, and footer). You can even combine blocks and partials for added flexibility.
|
||||
{{% /note %}}
|
||||
|
||||
This footer template is used for [spf13.com](http://spf13.com/):
|
||||
### Example `footer.html`
|
||||
|
||||
{{% code file="layouts/partials/footer.html" %}}
|
||||
The following `footer.html` partial template is used for [spf13.com](http://spf13.com/):
|
||||
|
||||
{{% code file="layouts/partials/footer.html" download="footer.html" %}}
|
||||
```html
|
||||
<footer>
|
||||
<div>
|
||||
@@ -98,104 +160,54 @@ This footer template is used for [spf13.com](http://spf13.com/):
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
To reference a partial template stored in a subfolder, e.g. `/layouts/partials/post/tag/list.html`, call it this way:
|
||||
|
||||
```
|
||||
{{ partial "post/tag/list" . }}
|
||||
```
|
||||
## Using Hugo's Internal Partial Templates
|
||||
|
||||
Note that the subdirectories you create under /layouts/partials can be named whatever you like.
|
||||
|
||||
For more examples of referencing these templates, see [single content templates](/templates/content/), [list templates](/templates/list/) and [homepage templates](/templates/homepage/).
|
||||
|
||||
## Variable Scoping
|
||||
|
||||
As you might have noticed, `partial` calls receive two parameters.
|
||||
|
||||
1. The first is the name of the partial and determines the file
|
||||
location to be read.
|
||||
2. The second is the variables to be passed down to the partial.
|
||||
|
||||
This means that the partial will _only_ be able to access those variables. It is isolated and has no access to the outer scope. From within the partial, `$.Var` is equivalent to `.Var`.
|
||||
|
||||
## Cached Partials
|
||||
|
||||
The `partialCached` template function can offer significant performance gains for complex templates that don't need to be rerendered upon every invocation. The simplest usage is as follows:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . }}
|
||||
```
|
||||
|
||||
You can also pass additional parameters to `partialCached` to create *variants* of the cached partial. For example, say you have a complex partial that should be identical when rendered for pages within the same section. You could use a variant based upon section so that the partial is only rendered once per section:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . .Section }}
|
||||
```
|
||||
|
||||
If you need to pass additional parameters to create unique variants, you can pass as many variant parameters as you need:
|
||||
|
||||
```
|
||||
{{ partialCached "footer.html" . .Params.country .Params.province }}
|
||||
```
|
||||
|
||||
Note that the variant parameters are not made available to the underlying partial template. They are only use to create a unique cache key.
|
||||
|
||||
## Using Hugo's Built-in Partials
|
||||
{{% warning %}}
|
||||
While the following internal templates are called similar to partials, they do *not* observe the partial template lookup order.
|
||||
{{% /warning %}}
|
||||
|
||||
### Google Analytics
|
||||
|
||||
Hugo ships with prebuilt internal partial templates for Google Analytics tracking, including both synchronous and asynchronous tracking codes.
|
||||
|
||||
<!-- pulled from extras/analytics -->
|
||||
Hugo ships with internal partial templates for Google Analytics tracking, including both synchronous and asynchronous tracking codes.
|
||||
|
||||
#### Configuring Google Analytics
|
||||
|
||||
Provide your tracking id in your configuration file, e.g. config.yaml.
|
||||
Provide your tracking id in your configuration file:
|
||||
|
||||
```toml
|
||||
googleAnalytics = "UA-123-45"
|
||||
```
|
||||
|
||||
#### Google Analytics Example
|
||||
```yml
|
||||
googleAnalytics: "UA-123-45"
|
||||
```
|
||||
|
||||
Include the internal template in your templates like so:
|
||||
#### Adding the Google Analytics Template
|
||||
|
||||
You can then include the Google Analytics internal partial in your templates:
|
||||
|
||||
{{% code file="call-ga.html" %}}
|
||||
```golang
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
|
||||
{{% code file="call-ga-async.html" %}}
|
||||
```golang
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
<!-- pulled from extras/comments -->
|
||||
### Disqus
|
||||
|
||||
Hugo also ships with a built-in partial for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites.
|
||||
|
||||
#### Adding Disqus to a Template
|
||||
|
||||
Hugo comes with all the code you would need to include load Disqus. Simply include the following line where you want your comments to appear:
|
||||
|
||||
```golang
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
```
|
||||
Hugo also ships with a built-in partial for [Disqus comments][disqus], a popular commenting system for both static and dynamic websites. In order to effectively use Disqus, you will need to secure a Disqus "shortname" by [signing up for the free service][disqussignup].
|
||||
|
||||
#### Configuring Disqus
|
||||
|
||||
That template requires you to set a single value in your site `config`:
|
||||
To use Hugo's Disqus template, you first need to set a single value in your site's `config.toml` or `config.yml`:
|
||||
|
||||
```toml
|
||||
disqusShortname = "yourdiscussshortname"
|
||||
```
|
||||
|
||||
Or with a `config.yml`:
|
||||
|
||||
```yaml
|
||||
disqusShortname: "yourdiscussshortname"
|
||||
```
|
||||
@@ -206,11 +218,21 @@ You also have the option to set the following in the front matter for a given pi
|
||||
* `disqus_title`
|
||||
* `disqus_url`
|
||||
|
||||
#### Adding the Disqus Template
|
||||
|
||||
To add Disqus, include the following line in templates where you want your comments to appear:
|
||||
|
||||
```golang
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
```
|
||||
|
||||
#### Conditional Loading of Disqus Comments
|
||||
|
||||
Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account. In order to prevent this, a slightly tweaked partial template is required. So, rather than using the built-in `"_internal/disqus.html"` template referenced above, create a template in `layouts/partials` that looks like the following:
|
||||
Users have noticed that enabling Disqus comments when running the Hugo web server on `localhost` (i.e. via `hugo server`) causes the creation of unwanted discussions on the associated Disqus account.
|
||||
|
||||
{{% code file="layouts/partials/disqus.html" %}}
|
||||
You can create the following `layouts/partials/disqus.html`:
|
||||
|
||||
{{% code file="layouts/partials/disqus.html" download="disqus.html" %}}
|
||||
```html
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
@@ -234,14 +256,17 @@ Users have noticed that enabling Disqus comments when running the Hugo web serve
|
||||
|
||||
The `if` statement skips the initialization of the Disqus comment injection when you are running on `localhost`.
|
||||
|
||||
You can then reference the partial template:
|
||||
You can then reference then render your custom analytics partial template as follows:
|
||||
|
||||
{{% code file="disqus-reference.html" %}}
|
||||
```golang
|
||||
{{ partial "disqus.html" . }}
|
||||
```
|
||||
{{% /code %}}
|
||||
|
||||
[themes]: /themes/
|
||||
[context]: /templates/go-templates/ "The most easily overlooked concept to understand about Go templating is how the dot always refers to the current context."
|
||||
[customize]: /themes/customizing/
|
||||
[disqus]: https://disqus.com
|
||||
[disqus]: https://disqus.com
|
||||
[disqussignup]: https://disqus.com/profile/signup/
|
||||
[listtemps]: /templates/lists/
|
||||
[partialcached]: /functions/partialcached/
|
||||
[singletemps]: /templates/single-page-templates/
|
||||
[themes]: /themes/
|
||||
@@ -14,7 +14,6 @@ toc: true
|
||||
wip: true
|
||||
---
|
||||
|
||||

|
||||
|
||||
## Understanding `.Data.Pages`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ categories: [templates]
|
||||
tags: [lists,sections]
|
||||
weight: 40
|
||||
draft: false
|
||||
aliases: []
|
||||
aliases: [/templates/sections/]
|
||||
toc: true
|
||||
wip: true
|
||||
---
|
||||
|
||||
@@ -35,7 +35,7 @@ functions:
|
||||
desc: "Comprehensive list of Hugo templating functions, including basic and advanced usage examples"
|
||||
variablesandparams:
|
||||
order: 6
|
||||
title: "Variables and Params"
|
||||
title: "Variables"
|
||||
url: "variables"
|
||||
haschildren: true
|
||||
sortsubpagesby: "weight"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ block "main" . }}
|
||||
{{ end}}
|
||||
</div>
|
||||
{{- partial "site-footer.html" . -}}
|
||||
{{- partialCached "site-footer.html" . -}}
|
||||
{{- partial "site-navigation.html" . -}}
|
||||
{{- partial "site-scripts.html" . -}}
|
||||
{{ block "addscripts" . }}
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
{{- partial "page-title.html" . -}}
|
||||
{{- partial "content-header-links.html" . -}}
|
||||
{{- partial "tags.html" . -}}
|
||||
{{ with .Params.wip}}
|
||||
<div class="wip">WIP</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
<div class="body-copy" data-section={{.Section | urlize}}>
|
||||
{{.Content}}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
$('.top-menu-item-link.true').on('click', function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
var $ul = $(this).next('ul'),
|
||||
var allTopLinks = $('.top-menu-item-link.true:not(.active-section)').next('ul'),
|
||||
$ul = $(this).next('ul'),
|
||||
isOpen = $ul.is(':visible'),
|
||||
slideDir = isOpen ? 'slideUp' : 'slideDown',
|
||||
dur = isOpen ? 200 : 400;
|
||||
@@ -9,6 +10,7 @@ $('.top-menu-item-link.true').on('click', function(evt) {
|
||||
easing: 'easeOut',
|
||||
duration: dur
|
||||
});
|
||||
console.log(allTopLinks);
|
||||
});
|
||||
|
||||
//toggle off-canvas navigation for M- screens
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#beingreviewed {
|
||||
.wip {
|
||||
background-color: $hugo-pink;
|
||||
color:white;
|
||||
position:absolute;
|
||||
|
||||
@@ -121,7 +121,7 @@ code.language-toml:after {
|
||||
|
||||
code.language-yaml:after,
|
||||
code.language-yml:after {
|
||||
content: 'TOML';
|
||||
content: 'YAML';
|
||||
font-size: .8em;
|
||||
padding-right: .3em;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.container-fluid,.container{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-0.5rem;margin-left:-0.5rem}.row.reverse{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12{box-sizing:border-box;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-ms-flex-align:start;align-items:flex-start}.middle-xs{-ms-flex-align:center;align-items:center}.bottom-xs{-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-ms-flex-pack:justify;justify-content:space-between}.first-xs{-ms-flex-order:-1;order:-1}.last-xs{-ms-flex-order:1;order:1}@media only screen and (min-width: 48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12{box-sizing:border-box;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{marLine truncated
|
||||
.container-fluid,.container{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 1 auto;flex:0 1 auto;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-0.5rem;margin-left:-0.5rem}.row.reverse{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12{box-sizing:border-box;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-ms-flex-align:start;align-items:flex-start}.middle-xs{-ms-flex-align:center;align-items:center}.bottom-xs{-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-ms-flex-pack:justify;justify-content:space-between}.first-xs{-ms-flex-order:-1;order:-1}.last-xs{-ms-flex-order:1;order:1}@media only screen and (min-width: 48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12{box-sizing:border-box;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:0.5rem;padding-left:0.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{marLine truncated
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
"use strict";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}function toggleToc(e){e.preventDefault(),e.stopPropagation(),console.log("hello"),document.getElementById("toc").classList.toggle("toc-open"),document.getElementById("toc-toggle").classList.toggle("toc-open")}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){if("object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e;return function t(e,r,n){function a(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(i)return i(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,function(t){var r=e[o][1][t];return a(r?r:t)},u,u.exports,t,e,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,r){var n=e("matches-selector");t.exports=function(e,t,r){for(var a=r?e:e.parentNode;a&&a!==document;){if(n(a,t))return a;a=a.parentNode}}},{"matches-selector":5}],2:[function(e,t,r){function n(e,t,r,n,i){var o=a.apply(this,arguments);return e.addEventListener(r,o,i),{destroy:function(){e.removeEventListener(r,o,i)}}}function a(e,t,r,n){return function(r){r.delegateTarget=i(r.target,t,!0),r.delegateTarget&&n.call(e,r)}}var i=e("closest");t.exports=n},{closest:1}],3:[function(e,t,r){r.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},r.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||r.node(e[0]))},r.string=function(e){return"string"==typeof e||e instanceof String},r.fn=function(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t}},{}],4:[function(e,t,r){function n(e,t,r){if(!e&&!t&&!r)throw new Error("Missing required arguments");if(!s.string(t))throw new TypeError("Second argument must be a String");if(!s.fn(r))throw new TypeError("Third argument must be a Function");if(s.node(e))return a(e,t,r);if(s.nodeList(e))return i(e,t,r);if(s.string(e))return o(e,t,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function a(e,t,r){return e.addEventListener(t,r),{destroy:function(){e.removeEventListener(t,r)}}}function i(e,t,r){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,r)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,r)})}}}function o(e,t,r){return l(document.body,e,t,r)}var s=e("./is"),l=e("delegate");t.exports=n},{"./is":3,delegate:2}],5:[function(e,t,r){function n(e,t){if(i)return i.call(e,t);for(var r=e.parentNode.querySelectorAll(t),n=0;n<r.length;++n)if(r[n]==e)return!0;return!1}var a=Element.prototype,i=a.matchesSelector||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector;t.exports=n},{}],6:[function(e,t,r){function n(e){var t;if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),n=document.createRange();n.selectNodeContents(e),r.removeAllRanges(),r.addRange(n),t=r.toString()}return t}t.exports=n},{}],7:[function(e,t,r){function n(){}n.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){function n(){a.off(e,n),t.apply(r,arguments)}var a=this;return n._=t,this.on(e,n,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,a=r.length;for(n;a>n;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],a=[];if(n&&t)for(var i=0,o=n.length;o>i;i++)n[i].fn!==t&&n[i].fn._!==t&&a.push(n[i]);return a.length?r[e]=a:delete r[e],this}},t.exports=n},{}],8:[function(t,r,n){!function(a,i){if("function"==typeof e&&e.amd)e(["module","select"],i);else if("undefined"!=typeof n)i(r,t("select"));else{var o={exports:{}};i(o,a.select),a.clipboardAction=o.exports}}(this,function(e,t){function r(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=r(t),i="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeofLine truncated
|
||||
},isCSSNullValue:function(e){return!e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){e.classList?e.classList.add(t):e.className+=(e.className.length?" ":"")+t},removeClass:function(e,t){e.classList?e.classList.remove(t):e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(e,r,a,i){function s(e,r){var a=0;if(p<=8)a=d.css(e,r);else{var l=!1;/^(width|height)$/.test(r)&&0===S.getPropertyValue(e,"display")&&(l=!0,S.setPropertyValue(e,"display",S.Values.getDisplayType(e)));var c=function(){l&&S.setPropertyValue(e,"display","none")};if(!i){if("height"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var u=e.offsetHeight-(parseFloat(S.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(S.getPropertyValue(e,"paddingBottom"))||0);return c(),u}if("width"===r&&"border-box"!==S.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var f=e.offsetWidth-(parseFloat(S.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(S.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(S.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(S.getPropertyValue(e,"paddingRight"))||0);return c(),f}}var g;g=o(e)===n?t.getComputedStyle(e,null):o(e).computedStyle?o(e).computedStyle:o(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===r&&(r="borderTopColor"),a=9===p&&"filter"===r?g.getPropertyValue(r):g[r],""!==a&&null!==a||(a=e.style[r]),c()}if("auto"===a&&/^(top|right|bottom|left)$/i.test(r)){var m=s(e,"position");("fixed"===m||"absolute"===m&&/top|left/i.test(r))&&(a=d(e).position()[r]+"px")}return a}var l;if(S.Hooks.registered[r]){var c=r,u=S.Hooks.getRoot(c);a===n&&(a=S.getPropertyValue(e,S.Names.prefixCheck(u)[0])),S.Normalizations.registered[u]&&(a=S.Normalizations.registered[u]("extract",e,a)),l=S.Hooks.extractValue(c,a)}else if(S.Normalizations.registered[r]){var f,g;f=S.Normalizations.registered[r]("name",e),"transform"!==f&&(g=s(e,S.Names.prefixCheck(f)[0]),S.Values.isCSSNullValue(g)&&S.Hooks.templates[r]&&(g=S.Hooks.templates[r][1])),l=S.Normalizations.registered[r]("extract",e,g)}if(!/^[\d-]/.test(l)){var m=o(e);if(m&&m.isSVG&&S.Names.SVGAttribute(r))if(/^(height|width)$/i.test(r))try{l=e.getBBox()[r]}catch(h){l=0}else l=e.getAttribute(r);else l=s(e,S.Names.prefixCheck(r)[0])}return S.Values.isCSSNullValue(l)&&(l=0),v.debug>=2&&console.log("Get "+r+": "+l),l},setPropertyValue:function(e,r,n,a,i){var s=r;if("scroll"===r)i.container?i.container["scroll"+i.direction]=n:"Left"===i.direction?t.scrollTo(n,i.alternateValue):t.scrollTo(i.alternateValue,n);else if(S.Normalizations.registered[r]&&"transform"===S.Normalizations.registered[r]("name",e))S.Normalizations.registered[r]("inject",e,n),s="transform",n=o(e).transformCache[r];else{if(S.Hooks.registered[r]){var l=r,c=S.Hooks.getRoot(r);a=a||S.getPropertyValue(e,c),n=S.Hooks.injectValue(l,n,a),r=c}if(S.Normalizations.registered[r]&&(n=S.Normalizations.registered[r]("inject",e,n),r=S.Normalizations.registered[r]("name",e)),s=S.Names.prefixCheck(r)[0],p<=8)try{e.style[s]=n}catch(u){v.debug&&console.log("Browser does not support ["+n+"] for ["+s+"]")}else{var f=o(e);f&&f.isSVG&&S.Names.SVGAttribute(r)?e.setAttribute(r,n):e.style[s]=n}v.debug>=2&&console.log("Set "+r+" ("+s+"): "+n)}return[s,n]},flushTransformCache:function(e){var t="",r=o(e);if((p||v.State.isAndroid&&!v.State.isChrome)&&r&&r.isSVG){var n=function(t){return parseFloat(S.getPropertyValue(e,t))},a={translate:[n("translateX"),n("translateY")],skewX:[n("skewX")],skewY:[n("skewY")],scale:1!==n("scale")?[n("scale"),n("scale")]:[n("scaleX"),n("scaleY")],rotate:[n("rotateZ"),0,0]};d.each(o(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),a[e]&&(t+=e+"("+a[e].join(" ")+") ",delete a[e])})}else{var i,s;d.each(o(e).transformCache,function(r){return i=o(e).transformCache[r],"transformPerspective"===r?(s=i,!0):(9===p&&"rotateZ"===r&&(r="rotate"),void(t+=r+i+" "))}),s&&(t="perspective"+s+" "+t)}S.setPropertyValue(e,"transform",t)}};S.Hooks.register(),S.Normalizations.register(),v.hook=function(e,t,r){var a;return e=i(e),d.each(e,function(e,i){if(o(i)===n&&v.init(i),r===n)a===n&&(a=v.CSS.getPropertyValue(i,t));else{Line truncated
|
||||
a=o+"-"+t.delimiter.toLowerCase()+"-"+i.toLowerCase(),n.className+=" "+a}return t.aria&&n.setAttribute("aria-hidden","true"),n.appendChild(e.cloneNode(!1)),n}function p(e,t){var r=-1,n=0;if(3===e.nodeType&&e.data.length){if(b.nodeBeginning&&(e.data=t.search||"sentence"!==t.delimiter?f(e.data):u(e.data),b.nodeBeginning=!1),r=e.data.search(m),r!==-1){var a=e.data.match(m),i=a[0],o=a[1]||!1;""===i?r++:o&&o!==i&&(r+=i.indexOf(o),i=o);var s=e.splitText(r);s.splitText(i.length),n=1,t.search||"sentence"!==t.delimiter||(s.data=f(s.data));var c=d(s,t,b.blastedIndex);s.parentNode.replaceChild(c,s),b.wrappers.push(c),b.blastedIndex++}}else if(1===e.nodeType&&e.hasChildNodes()&&!l.skippedElements.test(e.tagName)&&!l.hasPluginClass.test(e.className))for(var g=0;g<e.childNodes.length;g++)b.nodeBeginning=!0,g+=p(e.childNodes[g],t);return n}function g(r,s){s.debug&&i.time("blast reversal");var l=!1;r.removeClass(o+"-root").removeAttr("aria-label").find("."+o).each(function(){var t=e(this);if(t.closest("."+o+"-root").length)l=!0;else{var r=this.parentNode;a<=7&&r.firstChild.nodeName,r.replaceChild(this.firstChild,this),r.normalize()}}),t.Zepto?r.data(o,n):r.removeData(o),s.debug&&(i.log(o+": Reversed Blast"+(r.attr("id")?" on #"+r.attr("id")+".":".")+(l?" Skipped reversal on the children of one or more descendant root elements.":"")),i.timeEnd("blast reversal"))}var m,h=e.extend({},e.fn[o].defaults,c),b={};if(h.search.length&&("string"==typeof h.search||/^\d/.test(parseFloat(h.search))))h.delimiter=h.search.toString().replace(/[-[\]{,}(.)*+?|^$\\\/]/g,"\\$&"),m=new RegExp("(?:^|[^-"+s.latinLetters+"])("+h.delimiter+"('s)?)(?![-"+s.latinLetters+"])","i");else switch("string"==typeof h.delimiter&&(h.delimiter=h.delimiter.toLowerCase()),h.delimiter){case"all":m=/(.)/;break;case"letter":case"char":case"character":m=/(\S)/;break;case"word":m=/\s*(\S+)\s*/;break;case"sentence":m=/(?=\S)(([.]{2,})?[^!?]+?([.…!?]+|(?=\s+$)|$)(\s*[′’'”″“")»]+)*)/;break;case"element":m=/(?=\S)([\S\s]*\S)/;break;default:if(!(h.delimiter instanceof RegExp))return i.log(o+": Unrecognized delimiter, empty search string, or invalid custom Regex. Aborting."),!0;m=h.delimiter}if(this.each(function(){var t=e(this),a=t.text();if(c!==!1){b={blastedIndex:0,nodeBeginning:!1,wrappers:b.wrappers||[]},t.data(o)===n||"search"===t.data(o)&&h.search!==!1||(g(t,h),h.debug&&i.log(o+": Removed element's existing Blast call.")),t.data(o,h.search!==!1?"search":h.delimiter),h.aria&&t.attr("aria-label",a),h.stripHTMLTags&&t.html(a);try{r.createElement(h.tag)}catch(s){h.tag="span",h.debug&&i.log(o+": Invalid tag supplied. Defaulting to span.")}t.addClass(o+"-root"),h.debug&&i.time(o),p(this,h),h.debug&&i.timeEnd(o)}else c===!1&&t.data(o)!==n&&g(t,h);h.debug&&e.each(b.wrappers,function(e,t){i.log(o+" ["+h.delimiter+"] "+this.outerHTML),this.style.backgroundColor=e%2?"#f12185":"#075d9a"})}),c!==!1&&h.returnGenerated===!0){var y=e().add(b.wrappers);return y.prevObject=this,y.context=this.context,y}return this},e.fn.blast.defaults={returnGenerated:!0,delimiter:"word",tag:"span",search:!1,customClass:"",generateIndexID:!1,generateValueClass:!1,stripHTMLTags:!1,aria:!0,debug:!1}}(window.jQuery||window.Zepto,window,document),$("document").ready(function(){$('.body-copy a[href$=".pdf"]').append('<i class="icon-pdf"></i>'),$(".body-copy > h2:not(.section-heading),.body-copy > h3").each(function(){var e=$(this).attr("id");$(this).prepend('<a class="smooth-scroll heading-link" href="#'+e+'"><i class="icon-link"></i></a>')})}),function(){for(var e=document.querySelectorAll("blockquote > p"),t=new RegExp(/\s\-\s/),r=0;r<e.length;r++)if(t.test(e[r].textContent)){var n=e[r].innerHTML.split(" - ")[0],a=e[r].innerHTML.split(" - ")[1];e[r].innerHTML=n+'<cite class="blockquote-citation">― '+a+"</cite>"}}(),$(".download-button").on("click",function(){var e=$(this).siblings(".code-copy-content"),t=e.text(),r=e.attr("id"),n=new Blob([t],{type:"text/plain;charset=utf-8"});saveAs(n,r)});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(){$(".body-copy img:not(.hugo-icon)").each(function(){$(this).wrap('<a class="image-link" data-featherlight="image" href="'+$(this).attr("src")+'"></a>')})}(),function(e){function t(e,r){if(!(this instanceof t)){var n=new t(e,r);return n.open(),n}this.id=t.id++,this.setup(e,r),this.chainCallbacks(t._callbackChain)}if("undefined"==typeof e)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));var r=[],n=function(t){return r=e.grep(r,function(e){return e!==t&&e.$instance.closest("body").length>0})},a=function(e,t){var r={},n=new RegExp("^"+t+"([A-Z])(.*)");for(var a in e){var i=a.match(n);if(i){var o=(i[1]+i[2].replace(/([A-Z])/g,"-$1")).toLowerCase();r[o]=e[a]}}return r},i={keyup:"onKeyUp",resize:"onResize"},o=function(r){e.each(Line truncated
|
||||
nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[t,e.NM,a,i,n,r,s]}}),hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"variable",b:"(\\$"+t+")\\b"},n={cN:"number",b:"#[0-9A-Fa-f]+"};return{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[n,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}},{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},r,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middleLine truncated
|
||||
nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[t,e.NM,a,i,n,r,s]}}),hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"variable",b:"(\\$"+t+")\\b"},n={cN:"number",b:"#[0-9A-Fa-f]+"};return{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[n,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}},{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},r,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middleLine truncated
|
||||
Reference in new issue
Block a user