theme: end support for Internet Explorer 11 #584

This commit is contained in:
Sören Weber 2024-03-05 23:25:04 +01:00
parent 77ed3f431a
commit e952e148fc
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
22 changed files with 30 additions and 1525 deletions

View file

@ -18,7 +18,6 @@ The Relearn theme is a fork of the great [Learn theme](https://github.com/matcor
- Usable offline, no external dependencies
- [Usable from your local file system via `file://` protocol](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#file-system)
- Support for the [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) for on-premise CMS capabilities
- Support for Internet Explorer 11
- [Support for Open Graph and Twitter Cards](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#social-media-meta-tags)
- **Configurable theming and visuals**
- [Configurable brand images](https://mcshelby.github.io/hugo-theme-relearn/basics/branding#change-the-logo)

View file

@ -128,10 +128,10 @@ h1 + .footline{
}
#R-topbar{
/* the header is sticky which is not suitable for print; */
position: inherit; /* IE11 doesn't know "initial" here */
position: initial;
}
#R-topbar > .topbar-wrapper {
background-color: rgba( 255, 255, 255, 1 ); /* IE11 doesn't know "initial" here */
background-color: initial;
}
#R-body .topbar-sidebar-divider {
border-width: 0;

View file

@ -63,15 +63,6 @@ title = "Hugo Relearn Theme"
# if in doubt, remove this line
renderer.unsafe = true
# allows `hugo server` to display this showcase in IE11; this is used for testing, as we
# are still supporting IE11 - although with degraded experience; if you don't care about
# `hugo server` or browsers of ancient times, fell free to remove this whole block
[server]
[[server.headers]]
for = "**.html"
[server.headers.values]
X-UA-Compatible = "IE=edge"
# showcase of the menu shortcuts; you can use relative URLs linking
# to your content or use fully-qualified URLs to link outside of
# your project

View file

@ -21,7 +21,6 @@ The theme is a fork of the great [Learn theme](https://github.com/matcornic/hugo
- Usable offline, no external dependencies
- [Usable from your local file system via `file://` protocol](basics/customization#file-system)
- Support for the [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) for on-premise CMS capabilities
- Support for Internet Explorer 11
- [Support for Open Graph and Twitter Cards](basics/customization#social-media-meta-tags)
- **Configurable theming and visuals**
- [Configurable brand images](basics/branding#change-the-logo)

View file

@ -23,14 +23,6 @@ Remove reported issue from the browser's console.
Check for unnecessary whitespace and correct indention of your resulting HTML.
Be compatible to IE11, at least for main functionality, this means:
- test in IE11
- check caniuse.com
- don't use JavaScript arrow functions
- don't use JavaScript template literals
- don't use other fancy JavaScript ES5/6 stuff
## Conventional Commits
Write commit messages in the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) format.

View file

@ -19,10 +19,6 @@ That's some more text with a footnote.[^someid]
Blue light glows blue.
{{% /expand %}}
{{% notice note %}}
This only works in modern browsers flawlessly. While Internet Explorer 11 has issues in displaying it, the functionality still works.
{{% /notice %}}
## Usage
While the examples are using shortcodes with named parameter you are free to use positional as well or also call this shortcode from your own partials.

View file

@ -9,10 +9,6 @@ The `math` shortcode generates beautiful formatted math and chemical formulae us
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
{{< /math >}}
{{% notice note %}}
This only works in modern browsers.
{{% /notice %}}
## Usage
While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Math codefences (eg. GitHub) and so your markdown becomes more portable.

View file

@ -11,10 +11,6 @@ graph LR;
Then --> Else
{{< /mermaid >}}
{{% notice note %}}
This only works in modern browsers.
{{% /notice %}}
## Usage
While the examples are using shortcodes with named parameter it is recommended to use codefences instead. This is because more and more other software supports Mermaid codefences (eg. GitHub) and so your markdown becomes more portable.

View file

@ -5,10 +5,6 @@ title: "OpenAPI"
The `openapi` shortcode uses the [Swagger UI](https://github.com/swagger-api/swagger-ui) library to display your OpenAPI / Swagger specifications.
{{% notice note %}}
This only works in modern browsers.
{{% /notice %}}
## Usage
While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.

View file

@ -12,11 +12,6 @@
{{- $faviconMatch = true }}
<link href="{{ printf "images/%s.%s" $faviconName .ext | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" {{ .type | safeHTMLAttr }}>
{{- end }}
{{- $c:="" }}{{/*
Warning: IE and old browser versions do not support media queries necessary for the light & dark theme option.
If you have requirements to support IE and/or older browser versions, use one of the other options.
Reference: https://caniuse.com/css-media-interaction
*/}}
{{- if (fileExists (printf "/static/images/%s-light.%s" $faviconName .ext)) }}
{{- $faviconMatch = true }}
<link href="{{ printf "images/%s-light.%s" $faviconName .ext | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="icon" {{ .type | safeHTMLAttr }} media="(prefers-color-scheme: light)">

View file

@ -40,23 +40,6 @@
margin-inline-end: .5rem;
}
}
@media all and (-ms-high-contrast:none) {
{{ "/* IE11s understanding of positioning is weird at best */" | safeCSS }}
a#R-logo {
margin-top: -3.625rem;
}
#R-logo svg {
margin-bottom: -3.875rem;
margin-left: -1.47rem;
margin-right: .5rem;
}
}
@media only all and (-ms-high-contrast:none) and (max-width: 59.999rem) {
#R-logo svg {
margin-left: -1.47rem;
margin-right: .5rem;
}
}
</style>
<a id="R-logo" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Site.Home) }}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64.044 64.044">

View file

@ -25,8 +25,6 @@
{{- if or (partialCached "fileExists.hugo" $f $f) (resources.Get (printf "/css/format-%s.css" $outputFormat)) }}
<link href="{{(printf "css/format-%s.css" $outputFormat) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
{{- end }}
<link href="{{"css/ie.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
<script src="{{"js/url.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script>
window.relearn = window.relearn || {};

View file

@ -1,7 +1,3 @@
/* this variant does not work well if we use fallback styles for IE11 so better
ignore this variant in IE completely */
@supports not (-ms-high-contrast:none) {
/* based on rrt */
/* Background */ .bg { color: #f8f8f2; background-color: #000000; }
/* PreWrapper */ .chroma { color: #f8f8f2; background-color: #000000; }

View file

@ -1,926 +0,0 @@
@media all and (-ms-high-contrast:none) {
/* ----------------------------------------------- */
/* turn off LTR support as it is depending on CSS properties that aren't supported by IE11 */
html {
direction: ltr !important;
}
/* nucleus */
th {
text-align: left;
}
input[type="checkbox"], input[type="radio"] {
margin-right: 0.425rem;
}
blockquote {
padding-left: 0.85rem;
}
/* theme */
#R-sidebar {
left: 0;
min-width: 18.75rem;
max-width: 18.75rem;
width: 18.75rem;
}
#R-header {
border-right: 1px solid transparent;
}
.searchbox > :first-child {
left: .5rem;
}
.searchbox > :last-child {
right: .5rem;
}
.searchbox input {
padding-left: 1.8rem;
padding-right: 1.6rem;
}
#R-sidebar ul li.visited + span {
margin-right: 1rem;
}
#R-sidebar ul li .read-icon {
right: 1rem;
}
#R-sidebar .nav-title {
padding-left: 1rem;
}
#R-body {
margin-left: 18.75rem;
min-width: calc( 100% - 18.75rem );
max-width: calc( 100% - 18.75rem );
width: calc( 100% - 18.75rem );
}
#R-body .flex-block-wrapper {
max-width: calc( 81.25rem - 18.75rem - 2 * 3.25rem );
}
body:not(.print) #R-body .narrow .flex-block-wrapper {
max-width: calc( 81.25rem - 18.75rem - 2 * 9.75rem );
}
/* we limit width if we have large screens */
@media screen and ( min-width: 81.25rem ){ /* #R-sidebar/width + ./max-width */
#R-body .flex-block-wrapper {
width: calc( 81.25rem - 18.75rem - 2 * 3.25rem );
}
body:not(.print) #R-body .narrow .flex-block-wrapper {
width: calc( 81.25rem - 18.75rem - 2 * 9.75rem );
}
}
h2, h3, h4, h5, h6 {
padding-right: 2rem;
}
blockquote {
border-left: .6rem solid rgba( 134, 134, 134, .4 );
}
blockquote cite {
text-align: right;
}
div.attachments .box-content {
padding-left: 1.75rem;
}
#R-body-inner ul.children-h2,
#R-body-inner ul.children-h3,
#R-body-inner ul.children-h4,
#R-body-inner ul.children-h5,
#R-body-inner ul.children-h6 {
/* if we display children with style=h2 but without a containerstyle
a ul will be used for structuring; we remove default indention for uls
in this case */
padding-left: 0;
}
code.copy-to-clipboard-code {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
border-right-width: 0;
}
.topbar-wrapper > .topbar-area-start > .topbar-button > .topbar-control {
border-right: 1px solid rgba( 134, 134, 134, .333 );
}
.topbar-wrapper > .topbar-area-end > .topbar-button > .topbar-control {
border-left: 1px solid rgba( 134, 134, 134, .333 );
}
#R-body .topbar-sidebar-divider {
border-left-style: solid;
border-left-width: 1px;
margin-right: -1px;
}
html[dir="rtl"] .topbar-button-prev i,
html[dir="rtl"] .topbar-button-next i {
transform: scaleX(1);
}
.topbar-content {
left: 1rem;
}
@media screen and (max-width: 59.999rem) {
#R-sidebar {
min-width: 14.375rem;
max-width: 14.375rem;
width: 14.375rem;
}
#R-body {
margin-left: 14.375rem;
min-width: calc( 100% - 14.375rem );
max-width: calc( 100% - 14.375rem );
width: calc( 100% - 14.375rem );
}
}
@media screen and (max-width: 47.999rem) {
.mobile-support #R-sidebar {
left: -14.375rem;
}
.mobile-support #R-body {
margin-left: 0;
}
.mobile-support.sidebar-flyout #R-sidebar {
left: 0;
}
.mobile-support.sidebar-flyout #R-body {
margin-left: 14.375rem;
}
}
.copy-to-clipboard-button {
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
span > .copy-to-clipboard-button {
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.disableInlineCopyToClipboard span > code.copy-to-clipboard-code {
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-right-width: 1px;
}
.expand > label {
left: 0;
}
.expand > .expand-content {
margin-left: 1rem;
}
html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
transform: scaleX(1);
}
.headline i,
.footline i{
margin-left: .5rem;
}
.headline i:first-child,
.footline i:first-child{
margin-left: 0;
}
.anchor {
margin-left: .66em;
}
html[dir="rtl"] .menu-control i,
html[dir="rtl"] .menu-control span {
float: left;
}
.menu-control > button {
text-align: left;
}
.searchform input {
margin-right: .5rem;
}
.badge > .badge-title {
border-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.badge.badge-with-title > .badge-content {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
article ul > li:has(> input[type="checkbox"]) {
margin-left: -1rem;
}
/* tabs */
#R-body .tab-nav-button {
margin-left: .6rem;
}
#R-body .tab-content{
margin-top: -1px;
}
/* auto-complete */
.autocomplete-suggestions {
text-align: left;
}
.autocomplete-suggestion > .breadcrumbs {
margin-left: 1em;
}
.autocomplete-suggestion > .context {
margin-left: 1em;
}
/* menu */
#R-sidebar ul ul {
padding-left: 1rem;
}
#R-sidebar ul.collapsible-menu > li > label {
left: 0;
padding-left: .125rem;
}
html[dir="rtl"] #R-sidebar ul.collapsible-menu > li > label > i.fa-chevron-right {
transform: scaleX(1);
}
#R-header-topbar {
border-right-style: solid;
border-right-width: 1px;
}
#R-header-wrapper,
#R-homelinks,
#R-content-wrapper > * {
border-right-style: solid;
border-right-width: 1px;
}
/* ----------------------------------------------- */
/* set default colors as in variant.css for IE11 */
html {
color-scheme: only light;
}
body {
background-color: rgba( 255, 255, 255, 1 ); /* var(--MAIN-BG-color) */
color: rgba( 0, 0, 0, 1 ); /* var(--MAIN-TEXT-color) */
font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; /* var(--MAIN-font) */
}
a,
.anchor,
.topbar-button button,
#R-searchresults .autocomplete-suggestion {
color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
}
#R-body .topbar-sidebar-divider {
border-left-color: rgba( 125, 201, 3, 1 ); /* var(--MENU-TOPBAR-SEPARATOR-color) */
}
@media screen and (max-width: 47.999rem) {
#R-body .topbar-sidebar-divider {
border-left-color: transparent;
}
}
a:hover,
a:active,
a:focus,
.anchor:hover,
.anchor:active,
.anchor:focus,
.topbar-button button:hover,
.topbar-button button:active,
.topbar-button button:focus{
color: rgba( 32, 40, 145, 1 ); /* var(--MAIN-LINK-HOVER-color) */
}
#R-sidebar {
background: rgba( 40, 40, 40, 1 ); /* var(--MENU-SECTIONS-BG-color) */
}
#R-header-wrapper {
/* initially use section background to avoid flickering on load when a
non default variant is active */
background-color: rgba( 0, 0, 0, 0 ); /* var(--MENU-SECTIONS-BG-color) */
color: rgba( 224, 224, 224, 1 ); /* var(--MENU-SEARCH-color) */
}
.searchbox {
border-color: rgba( 224, 224, 224, 1 ); /* var(--MENU-SEARCH-BORDER-color) */
background-color: rgba( 50, 50, 50, 1 ); /* var(--MENU-SEARCH-BG-color) */
}
.searchbox input:-ms-input-placeholder {
color: rgba( 224, 224, 224, 1 ); /* var(--INTERNAL-MENU-SEARCH-color) */
opacity: .45;
}
#R-sidebar .searchbox > :first-child,
#R-sidebar .searchbox > :last-child {
color: rgba( 224, 224, 224, 1 ); /* var(--INTERNAL-MENU-SEARCH-color) */
}
.searchform input:-ms-input-placeholder {
color: rgba( 134, 134, 134, 1 );
opacity: .666;
}
#R-sidebar .collapsible-menu label,
#R-sidebar .menu-control,
#R-sidebar :is( a, span ) {
color: rgba( 186, 186, 186, 1 ); /* var(--MENU-SECTIONS-LINK-color) */
}
#R-sidebar select:hover,
#R-sidebar .collapsible-menu li:not(.active) > label:hover,
#R-sidebar .menu-control:hover,
#R-sidebar a:hover {
color: rgba( 255, 255, 255, 1 ); /* var(--MENU-SECTIONS-LINK-HOVER-color) */
}
#R-sidebar ul.enlarge > li.parent,
#R-sidebar ul.enlarge > li.active {
background-color: rgba( 0, 0, 0, .166 ); /* var(--MENU-SECTIONS-ACTIVE-BG-color) */
}
#R-sidebar li.active > label,
#R-sidebar li.active > a {
color: rgba( 68, 68, 68, 1 ); /* var(--MENU-SECTION-ACTIVE-CATEGORY-color) */
}
#R-sidebar li.active > a {
background-color: rgba( 255, 255, 255, 1 ); /* var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color) */
}
#R-sidebar ul li > a .read-icon {
color: rgba( 72, 106, 201, 1 ); /* var(--MENU-VISITED-color) */
}
#R-sidebar .nav-title {
color: rgba( 186, 186, 186, 1 ); /* var(--MENU-SECTIONS-LINK-color) */
}
#R-content-wrapper hr {
border-color: rgba( 96, 96, 96, 1 ); /* var(--MENU-SECTION-SEPARATOR-color) */
}
#R-footer {
color: rgba( 186, 186, 186, 1 ); /* var(--MENU-SECTIONS-LINK-color) */
}
mark {
background-color: rgba( 255, 255, 0, 1 );
}
h1 {
color: rgba( 0, 0, 0, 1 ); /* var(--MAIN-TEXT-color) */
font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; /* var(--MAIN-font) */
}
h2, h3, .article-subheading, h4, h5, h6 {
color: rgba( 16, 16, 16, 1 ); /* var(--MAIN-TITLES-TEXT-color) */
font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; /* var(--MAIN-TITLES-TEXT-font) */
}
.expand > label {
color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
}
.expand > label:hover,
.expand > label:active,
.expand > label:focus,
.expand > input:hover + label,
.expand > input:active + label,
.expand > input:focus + label{
color: rgba( 32, 40, 145, 1 ); /* var(--MAIN-LINK-HOVER-color) */
}
div.box {
background-color: rgba( 128, 128, 128, 1 ); /* var(--INTERNAL-BOX-NEUTRAL-color) */
border-color: rgba( 128, 128, 128, 1 ); /* var(--INTERNAL-BOX-NEUTRAL-color) */
}
div.box > .box-label {
color: rgba( 255, 255, 255, 1 ); /* var(--BOX-CAPTION-color) */
}
div.box > .box-content {
background-color: rgba( 255, 255, 255, .833 ); /* var(--BOX-BG-color) */
color: rgba( 16, 16, 16, 1 ); /* var(--BOX-TEXT-color) */
}
div.box.info {
background-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-INFO-color) */
border-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-INFO-color) */
}
div.box.info > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-INFO-TEXT-color) */
}
div.box.warning {
background-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-WARNING-color) */
border-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-WARNING-color) */
}
div.box.warning > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-WARNING-TEXT-color) */
}
div.box.note {
background-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-NOTE-color) */
border-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-NOTE-color) */
}
div.box.note > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-NOTE-TEXT-color) */
}
div.box.tip {
background-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-TIP-color) */
border-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-TIP-color) */
}
div.box.tip > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-TIP-TEXT-color) */
}
div.box.primary {
background-color: rgba( 125, 201, 3, 1 ); /* var(--INTERNAL-PRIMARY-color) */
border-color: rgba( 125, 201, 3, 1 ); /* var(--INTERNAL-PRIMARY-color) */
}
div.box.primary > .box-content {
color: rgba( 0, 0, 0, 1 ); /* var(--INTERNAL-MAIN-TEXT-color) */
}
div.box.secondary {
background-color: rgba( 72, 106, 201, 1 ); /* var(--INTERNAL-SECONDARY-color) */
border-color: rgba( 72, 106, 201, 1 ); /* var(--INTERNAL-SECONDARY-color) */
}
div.box.secondary > .box-content {
color: rgba( 0, 0, 0, 1 ); /* var(--INTERNAL-MAIN-TEXT-color) */
}
div.box.accent {
background-color: rgb( 255, 102, 78, 1 ); /* var(--INTERNAL-ACCENT-color) */
border-color: rgb( 255, 102, 78, 1 ); /* var(--INTERNAL-ACCENT-color) */
}
div.box.accent > .box-content {
color: rgba( 0, 0, 0, 1 ); /* var(--INTERNAL-MAIN-TEXT-color) */
}
div.box.blue {
background-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-BLUE-color) */
border-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-BLUE-color) */
}
div.box.blue > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-BLUE-TEXT-color) */
}
div.box.green {
background-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-GREEN-color) */
border-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-GREEN-color) */
}
div.box.green > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-GREEN-TEXT-color) */
}
div.box.grey {
background-color: rgba( 160, 160, 160, 1 ); /* var(--INTERNAL-BOX-GREY-color) */
border-color: rgba( 160, 160, 160, 1 ); /* var(--INTERNAL-BOX-GREY-color) */
}
div.box.grey > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-GREY-TEXT-color) */
}
div.box.orange {
background-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-ORANGE-color) */
border-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-ORANGE-color) */
}
div.box.orange > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-ORANGE-TEXT-color) */
}
div.box.red {
background-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-RED-color) */
border-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-RED-color) */
}
div.box.red > .box-content {
color: rgba( 16, 16, 16, 1 ); /* var(--INTERNAL-BOX-RED-TEXT-color) */
}
div.box.transparent {
background-color: transparent;
border-color: transparent;
}
div.box.transparent > .box-label {
color: rgba( 16, 16, 16, 1 ); /* var(--MAIN-TITLES-TEXT-color) */
}
div.box.transparent > .box-content {
background-color: transparent;
color: rgba( 0, 0, 0, 1 ); /* var(--MAIN-TEXT-color) */
}
code,
kbd,
pre:not(.mermaid),
samp {
font-family: "Consolas", menlo, monospace; /* var(--CODE-font) */
}
code {
background-color: rgba( 255, 250, 233, 1 ); /* var(--CODE-INLINE-BG-color) */
border-color: rgba( 248, 232, 200, 1 ); /* var(--CODE-INLINE-BORDER-color) */
color: rgba( 94, 94, 94, 1 ); /* var(--CODE-INLINE-color) */
}
pre:not(.mermaid) {
background-color: rgba( 250, 250, 250, 1 ); /* var(--CODE-BLOCK-BG-color) */
border-color: rgba( 216, 216, 216, 1 ); /* var(--CODE-BLOCK-BORDER-color) */
color: rgba( 39, 40, 34, 1 ); /* var(--CODE-BLOCK-color) */
}
div.highlight > div {
background-color: rgba( 250, 250, 250, 1 ); /* var(--CODE-BLOCK-BG-color) */
border-color: rgba( 216, 216, 216, 1 ); /* var(--CODE-BLOCK-BORDER-color) */
}
table {
background-color: rgba( 255, 255, 255, 1 ); /* var(--INTERNAL-MAIN-BG-color) */
}
.lightbox-back img{
background-color: rgba( 255, 255, 255, 1 ) /* var(--INTERNAL-MAIN-BG-color); */
}
#R-topbar {
background-color: rgba( 255, 255, 255, 1 ); /* var(--MAIN-BG-color) */
}
#R-body a[aria-disabled="true"],
#R-searchresults .autocomplete-suggestion > .context {
color: rgba( 0, 0, 0, 1 ); /* var(--MAIN-TEXT-color) - inherit is not processed correctly in Chrome */
}
#R-searchresults .autocomplete-suggestion > .breadcrumbs {
color: rgba( 125, 201, 3, 1 ); /* var(--PRIMARY-color) */
}
.copy-to-clipboard-button {
background-color: rgba( 255, 250, 233, 1 ); /* var(--CODE-INLINE-BG-color) */
border-color: rgba( 248, 232, 200, 1 ); /* var(--CODE-INLINE-BORDER-color) */
color: rgba( 94, 94, 94, 1 ); /* var(--CODE-INLINE-color) */
font-family: "Consolas", menlo, monospace; /* var(--CODE-font) */
}
.copy-to-clipboard-button:hover {
background-color: rgba( 94, 94, 94, 1 ); /* var(--CODE-INLINE-color) */
color: rgba( 255, 250, 233, 1 ); /* var(--CODE-INLINE-BG-color) */
}
div.highlight > div table + .copy-to-clipboard-button,
div.highlight pre:not(.mermaid) + .copy-to-clipboard-button,
pre:not(.mermaid) .copy-to-clipboard-button {
border-color: rgba( 216, 216, 216, 1 ); /* var(--CODE-BLOCK-BORDER-color) */
color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
}
div.highlight > div table + .copy-to-clipboard-button:hover,
div.highlight pre:not(.mermaid) + .copy-to-clipboard-button:hover,
pre:not(.mermaid) .copy-to-clipboard-button:hover {
background-color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
border-color: #486ac9; /* var(--MAIN-LINK-color) */
color: rgba( 250, 250, 250, 1 ); /* var(--CODE-BLOCK-BG-color) */
}
.svg-reset-button {
border-color: rgba( 216, 216, 216, 1 ); /* var(--CODE-BLOCK-BORDER-color) */
color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
}
.svg-reset-button:hover {
background-color: rgba( 72, 106, 201, 1 ); /* var(--MAIN-LINK-color) */
border-color: #486ac9; /* var(--MAIN-LINK-color) */
color: rgba( 250, 250, 250, 1 ); /* var(--CODE-BLOCK-BG-color) */
}
#R-homelinks {
background-color: rgba( 125, 201, 3, 1 ); /* var(--MENU-HEADER-BORDER-color) */
}
#R-homelinks a {
color: rgba( 64, 64, 64, 1 ) /* var(--MENU-HOME-LINK-color) */
}
#R-homelinks a:hover {
color: rgba( 128, 128, 128, 1 ) /* var(--MENU-HOME-LINK-HOVER-color) */;
}
#R-homelinks hr {
border-color: rgba( 125, 201, 3, 1 ); /* var(--MENU-HEADER-SEPARATOR-color) */
}
.topbar-content {
background-color: rgba( 255, 255, 255, 1 ); /* var(--MAIN-BG-color) */
}
.btn {
background-color: rgba( 128, 128, 128, 1 ); /* var(--BOX-NEUTRAL-color) */
}
.btn > * {
border-color: rgba( 128, 128, 128, 1 ); /* var(--BOX-NEUTRAL-color) */
color: rgba( 255, 255, 255, 1 ); /* var(--BOX-CAPTION-color) */
}
.btn.interactive > *:hover,
.btn.interactive > *:active,
.btn.interactive > *:focus {
background-color: rgba( 255, 255, 255, .833 ); /* var(--BOX-BG-color) */
color: rgba( 16, 16, 16, 1 ); /* var(--BOX-NEUTRAL-TEXT-color) */
}
.btn.cstyle.info {
background-color: rgba( 48, 117, 229, 1 ); /* var(--BOX-INFO-color) */
}
.btn.cstyle.info > * {
border-color: rgba( 48, 117, 229, 1 ); /* var(--BOX-INFO-color) */
}
.btn.cstyle.note {
background-color: rgba( 237, 153, 9, 1 ); /* var(--BOX-NOTE-color) */
}
.btn.cstyle.note > * {
border-color: rgba( 237, 153, 9, 1 ); /* var(--BOX-NOTE-color) */
}
.btn.cstyle.tip {
background-color: rgba( 42, 178, 24, 1 ); /* var(--BOX-TIP-color) */
}
.btn.cstyle.tip > * {
border-color: rgba( 42, 178, 24, 1 ); /* var(--BOX-TIP-color) */
}
.btn.cstyle.warning {
background-color: rgba( 224, 62, 62, 1 ); /* var(--BOX-WARNING-color) */
}
.btn.cstyle.warning > * {
border-color: rgba( 224, 62, 62, 1 ); /* var(--BOX-WARNING-color) */
}
.btn.cstyle.primary {
background-color: rgba( 125, 201, 3, 1 ); /* var(--PRIMARY-color) */
}
.btn.cstyle.primary > * {
border-color: rgba( 125, 201, 3, 1 ); /* var(--PRIMARY-color) */
}
.btn.cstyle.secondary {
background-color: rgba( 72, 106, 201, 1 ); /* var(--SECONDARY-color) */
}
.btn.cstyle.secondary > * {
border-color: rgba( 72, 106, 201, 1 ); /* var(--SECONDARY-color) */
}
.btn.cstyle.accent {
background-color: rgb( 255, 102, 78, 1 ); /* var(--ACCENT-color) */
}
.btn.cstyle.accent > * {
border-color: rgb( 255, 102, 78, 1 ); /* var(--ACCENT-color) */
}
.btn.cstyle.blue {
background-color: rgba( 48, 117, 229, 1 ); /* var(--BOX-BLUE-color) */
}
.btn.cstyle.blue > * {
border-color: rgba( 48, 117, 229, 1 ); /* var(--BOX-BLUE-color) */
}
.btn.cstyle.green {
background-color: rgba( 42, 178, 24, 1 ); /* var(--BOX-GREEN-color) */
}
.btn.cstyle.green > * {
border-color: rgba( 42, 178, 24, 1 ); /* var(--BOX-GREEN-color) */
}
.btn.cstyle.grey {
background-color: rgba( 160, 160, 160, 1 ); /* var(--BOX-GREY-color) */
}
.btn.cstyle.grey > * {
border-color: rgba( 160, 160, 160, 1 ); /* var(--BOX-GREY-color) */
}
.btn.cstyle.orange {
background-color: rgba( 237, 153, 9, 1 ); /* var(--BOX-ORANGE-color) */
}
.btn.cstyle.orange > * {
border-color: rgba( 237, 153, 9, 1 ); /* var(--BOX-ORANGE-color) */
}
.btn.cstyle.red {
background-color: rgba( 224, 62, 62, 1 ); /* var(--BOX-RED-color) */
}
.btn.cstyle.red > * {
border-color: rgba( 224, 62, 62, 1 ); /* var(--BOX-RED-color) */
}
.btn.cstyle.transparent {
background-color: transparent;
color: rgba( 0, 0, 0, 1 ); /* var(--MAIN-TEXT-color) */
}
.btn.cstyle.interactive.transparent:hover,
.btn.cstyle.interactive.transparent:focus,
.btn.cstyle.interactive.transparent:active {
background-color: rgba( 128, 128, 128, 1 ); /* var(--BOX-NEUTRAL-color) */
}
.btn.cstyle.transparent > * {
color: rgba( 16, 16, 16, 1 ); /* var(--MAIN-TITLES-TEXT-color) */
}
#R-body .tags a.term-link {
background-color: rgba( 125, 201, 3, 1 ); /* var(--TAG-BG-color) */
color: rgba( 255, 255, 255, 1 ); /* var(--MAIN-BG-color) */
margin-right: 16px;
}
#R-body .tags a.term-link:before {
border-right-color: rgba( 125, 201, 3, 1 ); /* var(--TAG-BG-color) */
}
#R-body .tags a.term-link:after {
background: rgba( 255, 255, 255, 1 ); /* var(--MAIN-BG-color) */
}
.badge > * {
border-color: rgba( 16, 16, 16, 1 ); /* var(--BOX-TEXT-color) */
}
.badge > .badge-content {
background-color: rgba( 128, 128, 128, 1 ); /* var(--INTERNAL-BOX-NEUTRAL-color) */
color: rgba( 255, 255, 255, 1 ); /* var(--BOX-CAPTION-color) */
}
.badge.info > .badge-content {
background-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-INFO-color) */
}
.badge.warning > .badge-content {
background-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-WARNING-color) */
}
.badge.note > .badge-content {
background-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-NOTE-color) */
}
.badge.tip > .badge-content {
background-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-TIP-color) */
}
.badge.primary > .badge-content {
background-color: rgba( 125, 201, 3, 1 ); /* var(--INTERNAL-PRIMARY-color) */
}
.badge.secondary > .badge-content {
background-color: rgba( 72, 106, 201, 1 ); /* var(--INTERNAL-SECONDARY-color) */
}
.badge.accent > .badge-content {
background-color: rgb( 255, 102, 78, 1 ); /* var(--INTERNAL-ACCENT-color) */
}
.badge.blue > .badge-content {
background-color: rgba( 48, 117, 229, 1 ); /* var(--INTERNAL-BOX-BLUE-color) */
}
.badge.green > .badge-content {
background-color: rgba( 42, 178, 24, 1 ); /* var(--INTERNAL-BOX-GREEN-color) */
}
.badge.grey > .badge-content {
background-color: rgba( 160, 160, 160, 1 ); /* var(--INTERNAL-BOX-GREY-color) */
}
.badge.orange > .badge-content {
background-color: rgba( 237, 153, 9, 1 ); /* var(--INTERNAL-BOX-ORANGE-color) */
}
.badge.red > .badge-content {
background-color: rgba( 224, 62, 62, 1 ); /* var(--INTERNAL-BOX-RED-color) */
}
.badge.transparent > .badge-content {
background-color: transparent;
color: rgba( 16, 16, 16, 1 ); /* var(--MAIN-TITLES-TEXT-color) */
}
article ul > li > input[type="checkbox"] {
background-color: rgba( 255, 255, 255, 1 ); /* var(--INTERNAL-MAIN-BG-color); */
color: rgba( 0, 0, 0, 1 ); /* var(--INTERNAL-MAIN-TEXT-color) */
}
article ul > li > input[type="checkbox"]::before {
box-shadow: inset 1em 1em rgba( 125, 201, 3, 1 ); /* var(--INTERNAL-PRIMARY-color) */
}
/* no style support for tabs in IE11; all styled as default */
#R-body .tab-nav-button {
color: rgba( 0, 0, 0, 1 ); /* var(--INTERNAL-MAIN-TEXT-color) */
}
#R-body .tab-nav-button.active {
background-color: rgba( 255, 255, 255, 1 ); /* var(--VARIABLE-BOX-BG-color) */
border-bottom-color: rgba( 255, 255, 255, 1 ); /* var(--VARIABLE-BOX-BG-color) */
border-left-color: rgba( 134, 134, 134, .4 ); /* var(--VARIABLE-BOX-color) */
border-right-color: rgba( 134, 134, 134, .4 ); /* var(--VARIABLE-BOX-color) */
border-top-color: rgba( 134, 134, 134, .4 ); /* var(--VARIABLE-BOX-color) */
color: rgba( 16, 16, 16, 1 ); /* var(--VARIABLE-BOX-TEXT-color) */
}
#R-body .tab-nav-button.active > .tab-nav-text{
background-color: rgba( 255, 255, 255, 1 ); /* var(--VARIABLE-BOX-BG-color) */
}
#R-body .tab-nav-button > .tab-nav-text{
border-color: rgba( 134, 134, 134, .4 ); /* var(--VARIABLE-BOX-color) */
}
#R-body .tab-content{
background-color: rgba( 255, 255, 255, 1 ); /* var(--VARIABLE-BOX-BG-color) */
border-color: rgba( 134, 134, 134, .4 ); /* var(--VARIABLE-BOX-color) */
}
#R-body .tab-content-text{
background-color: rgba( 255, 255, 255, 1 ); /* var(--VARIABLE-BOX-BG-color) */
color: rgba( 16, 16, 16, 1 ); /* var(--VARIABLE-BOX-TEXT-color) */
}
#R-topbar {
border-bottom-color: transparent; /* var(--MAIN-TOPBAR-BORDER-color) */
}
#R-header-topbar {
border-bottom-color: transparent;
border-right-color: transparent; /* var(--MENU-TOPBAR-BORDER-color) */
}
#R-header-wrapper,
#R-homelinks,
#R-content-wrapper > * {
border-right-color: transparent; /* var(--MENU-BORDER-color) */
}
#R-sidebar ul.collapsible-menu li.active > a{
border-bottom-color: transparent; /* var(--MENU-BORDER-color) */
border-top-color: transparent; /* var(--MENU-BORDER-color) */
border-left-color: transparent; /* var(--MENU-BORDER-color) */
border-right-color: transparent; /* var(--MENU-SECTION-ACTIVE-CATEGORY-BORDER-color) */
}
/* ----------------------------------------------- */
/* set further styles to fix broken stuff in IE11 */
/* turn off animiation in IE because this causes the menu
to move in from the left on every page load */
.default-animation{
transition: none;
}
/* our silly dinosaur browser wants to have the real colors */
#R-header-wrapper {
background-color: rgba( 125, 201, 3, 1 ); /* var(--MENU-HEADER-BG-color) */
border-bottom-color: rgba( 125, 201, 3, 1 ); /* var(--MENU-HEADER-BORDER-color) */
}
/* clears the 'X' from Internet Explorer's search input */
input[type=search]::-ms-clear { display: none; width : 0; height: 0; }
input[type=search]::-ms-reveal { display: none; width : 0; height: 0; }
/* turn off variant selector as it uses modern stuff; don't change
order with block below */
.showVariantSwitch{
display: getamodernbrowser;
}
/* dumb IE11 doesn't understand initial, so we force a fallback here */
.showLangSwitch,
.showVisitedLinks,
.showFooter {
display: block;
}
.menu-control select::-ms-expand {
/* hide the triangle */
display: none;
}
}
@media print and (-ms-high-contrast:none) {
code.copy-to-clipboard-code {
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-right-width: 1px;
}
}

View file

@ -7,15 +7,12 @@
width: device-width; }
@-moz-viewport {
width: device-width; }
@-ms-viewport {
width: device-width; }
@-o-viewport {
width: device-width; }
@viewport {
width: device-width; }
html {
font-size: 16px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%; }
@ -255,7 +252,6 @@ select {
button,
input[type="submit"] {
cursor: pointer;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
white-space: nowrap;

View file

@ -1,7 +1,3 @@
/* this variant does not work well if we use fallback styles for IE11 so better
ignore this variant in IE completely */
@supports not (-ms-high-contrast:none) {
:root {
--PRIMARY-color: rgba( 243, 0, 178, 1 ); /* brand primary color */
--SECONDARY-color: rgba( 28, 144, 243, 1 ); /* brand secondary color */

View file

@ -115,7 +115,7 @@ html {
body {
display: flex;
flex-direction: row-reverse; /* IE11 to allow body to have initial focus for PS and better SEO and a11y */
flex-direction: row-reverse; /* to allow body to have initial focus for PS in some browsers and better SEO and a11y */
font-size: 1.015625rem;
font-weight: 300;
height: 100%;
@ -839,7 +839,6 @@ div.highlight > div td{
}
/* disable selection for lineno cells */
div.highlight > div td:first-child:not(:last-child){
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@ -1577,7 +1576,6 @@ html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
line-height: 1.1;
margin-bottom: 0;
touch-action: manipulation;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@ -1606,7 +1604,6 @@ html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
padding: 6px 12px;
text-align: center;
touch-action: manipulation;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
white-space: nowrap;

View file

@ -31,7 +31,6 @@ var autoComplete = (function(){
if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);
}
function removeEvent(el, type, handler){
// if (el.removeEventListener) not working in IE11
if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler);
}
function live(elClass, event, cb, context){

View file

@ -1,15 +1,6 @@
window.relearn = window.relearn || {};
var theme = true;
var isIE = /*@cc_on!@*/false || !!document.documentMode;
if( isIE ){
// we don't support sidebar flyout in IE
document.querySelector( 'body' ).classList.remove( 'mobile-support' );
}
else{
document.querySelector( 'body' ).classList.add( 'mobile-support' );
}
var isPrint = document.querySelector( 'body' ).classList.contains( 'print' );
var isRtl = document.querySelector( 'html' ).getAttribute( 'dir' ) == 'rtl';
@ -19,7 +10,7 @@ var dir_padding_end = 'padding-right';
var dir_key_start = 37;
var dir_key_end = 39;
var dir_scroll = 1;
if( isRtl && !isIE ){
if( isRtl ){
dir_padding_start = 'padding-right';
dir_padding_end = 'padding-left';
dir_key_start = 39;
@ -357,10 +348,6 @@ function initMermaid( update, attrs ) {
}
function initOpenapi( update, attrs ){
if( isIE ){
return;
}
var state = this;
if( update && !state.is_initialized ){
return;
@ -1569,10 +1556,6 @@ function updateTheme( detail ){
})();
function useMermaid( config ){
if( !Object.assign ){
// We don't support Mermaid for IE11 anyways, so bail out early
return;
}
window.relearn.mermaidConfig = config;
if (typeof mermaid != 'undefined' && typeof mermaid.mermaidAPI != 'undefined') {
mermaid.initialize( Object.assign( { "securityLevel": "antiscript", "startOnLoad": false }, config ) );

View file

@ -1,430 +0,0 @@
// https://github.com/inexorabletash/polyfill/blob/v0.1.25/url.js
// URL Polyfill
// Draft specification: https://url.spec.whatwg.org
// Notes:
// - Primarily useful for parsing URLs and modifying query parameters
// - Should work in IE8+ and everything more modern
(function (global) {
'use strict';
// Browsers may have:
// * No global URL object
// * URL with static methods only - may have a dummy constructor
// * URL with members except searchParams
// * Full URL API support
var origURL = global.URL;
var nativeURL;
try{
if( origURL ){
nativeURL = new global.URL('http://example.com');
if( 'searchParams' in nativeURL )
return;
if( !('href' in nativeURL) )
nativeURL = undefined;
}
}
catch( _ ){}
// NOTE: Doesn't do the encoding/decoding dance
function urlencoded_serialize(pairs) {
var output = '', first = true;
pairs.forEach(function (pair) {
var name = encodeURIComponent(pair.name);
var value = encodeURIComponent(pair.value);
if( !first ) output += '&';
output += name + '=' + value;
first = false;
});
return output.replace(/%20/g, '+');
}
// NOTE: Doesn't do the encoding/decoding dance
function urlencoded_parse(input, isindex) {
var sequences = input.split('&');
if( isindex && sequences[0].indexOf('=') === -1 )
sequences[0] = '=' + sequences[0];
var pairs = [];
sequences.forEach(function (bytes) {
if( bytes.length === 0 ) return;
var index = bytes.indexOf('=');
if( index !== -1 ){
var name = bytes.substring(0, index);
var value = bytes.substring(index + 1);
}
else{
name = bytes;
value = '';
}
name = name.replace(/\+/g, ' ');
value = value.replace(/\+/g, ' ');
pairs.push({ name: name, value: value });
});
var output = [];
pairs.forEach(function (pair) {
output.push({
name: decodeURIComponent(pair.name),
value: decodeURIComponent(pair.value)
});
});
return output;
}
function URLUtils(url) {
if( nativeURL )
return new origURL(url);
var anchor = document.createElement('a');
anchor.href = url;
return anchor;
}
function URLSearchParams(init) {
var $this = this;
this._list = [];
if( init === undefined || init === null )
init = '';
if( Object(init) !== init || !(init instanceof URLSearchParams) )
init = String(init);
if( typeof init === 'string' && init.substring(0, 1) === '?' )
init = init.substring(1);
if( typeof init === 'string' )
this._list = urlencoded_parse(init);
else
this._list = init._list.slice();
this._url_object = null;
this._setList = function (list) { if( !updating ) $this._list = list; };
var updating = false;
this._update_steps = function() {
if( updating ) return;
updating = true;
if( !$this._url_object ) return;
// Partial workaround for IE issue with 'about:'
if( $this._url_object.protocol === 'about:' &&
$this._url_object.pathname.indexOf('?') !== -1 ){
$this._url_object.pathname = $this._url_object.pathname.split('?')[0];
}
$this._url_object.search = urlencoded_serialize($this._list);
updating = false;
};
}
Object.defineProperties(URLSearchParams.prototype, {
append: {
value: function (name, value) {
this._list.push({ name: name, value: value });
this._update_steps();
}, writable: true, enumerable: true, configurable: true
},
'delete': {
value: function (name) {
for( var i = 0; i < this._list.length; ){
if( this._list[i].name === name )
this._list.splice(i, 1);
else
++i;
}
this._update_steps();
}, writable: true, enumerable: true, configurable: true
},
get: {
value: function (name) {
for( var i = 0; i < this._list.length; ++i ){
if( this._list[i].name === name )
return this._list[i].value;
}
return null;
}, writable: true, enumerable: true, configurable: true
},
getAll: {
value: function (name) {
var result = [];
for( var i = 0; i < this._list.length; ++i ){
if( this._list[i].name === name )
result.push(this._list[i].value);
}
return result;
}, writable: true, enumerable: true, configurable: true
},
has: {
value: function (name) {
for( var i = 0; i < this._list.length; ++i ){
if( this._list[i].name === name )
return true;
}
return false;
}, writable: true, enumerable: true, configurable: true
},
set: {
value: function (name, value) {
var found = false;
for( var i = 0; i < this._list.length; ){
if( this._list[i].name === name ){
if( !found ){
this._list[i].value = value;
found = true;
++i;
}
else{
this._list.splice(i, 1);
}
}
else{
++i;
}
}
if( !found )
this._list.push({ name: name, value: value });
this._update_steps();
}, writable: true, enumerable: true, configurable: true
},
entries: {
value: function() {
var $this = this, index = 0;
return { next: function() {
if( index >= $this._list.length )
return {done: true, value: undefined};
var pair = $this._list[index++];
return {done: false, value: [pair.name, pair.value]};
}};
}, writable: true, enumerable: true, configurable: true
},
keys: {
value: function() {
var $this = this, index = 0;
return { next: function() {
if( index >= $this._list.length )
return {done: true, value: undefined};
var pair = $this._list[index++];
return {done: false, value: pair.name};
}};
}, writable: true, enumerable: true, configurable: true
},
values: {
value: function() {
var $this = this, index = 0;
return { next: function() {
if( index >= $this._list.length )
return {done: true, value: undefined};
var pair = $this._list[index++];
return {done: false, value: pair.value};
}};
}, writable: true, enumerable: true, configurable: true
},
forEach: {
value: function(callback) {
var thisArg = (arguments.length > 1) ? arguments[1] : undefined;
this._list.forEach(function(pair, _index) {
callback.call(thisArg, pair.name, pair.value);
});
}, writable: true, enumerable: true, configurable: true
},
toString: {
value: function () {
return urlencoded_serialize(this._list);
}, writable: true, enumerable: false, configurable: true
}
});
if( 'Symbol' in global && 'iterator' in global.Symbol ){
Object.defineProperty(URLSearchParams.prototype, global.Symbol.iterator, {
value: URLSearchParams.prototype.entries,
writable: true, enumerable: true, configurable: true});
}
function URL(url, base) {
if( !(this instanceof global.URL) )
throw new TypeError('Failed to construct "URL": Please use the "new" operator.');
if( base ){
url = (function () {
if( nativeURL ) return new origURL(url, base).href;
var doc;
// Use another document/base tag/anchor for relative URL resolution, if possible
if( document.implementation && document.implementation.createHTMLDocument ){
doc = document.implementation.createHTMLDocument('');
}
else if( document.implementation && document.implementation.createDocument ){
doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null);
doc.documentElement.appendChild(doc.createElement('head'));
doc.documentElement.appendChild(doc.createElement('body'));
}
else if( window.ActiveXObject ){
doc = new window.ActiveXObject('htmlfile');
doc.write('<head></head><body></body>');
doc.close();
}
if( !doc ) throw Error('base not supported');
var baseTag = doc.createElement('base');
baseTag.href = base;
doc.getElementsByTagName('head')[0].appendChild(baseTag);
var anchor = doc.createElement('a');
anchor.href = url;
return anchor.href;
}());
}
// An inner object implementing URLUtils (either a native URL
// object or an HTMLAnchorElement instance) is used to perform the
// URL algorithms. With full ES5 getter/setter support, return a
// regular object For IE8's limited getter/setter support, a
// different HTMLAnchorElement is returned with properties
// overridden
var instance = URLUtils(url || '');
// Detect for ES5 getter/setter support
// (an Object.defineProperties polyfill that doesn't support getters/setters may throw)
var ES5_GET_SET = (function() {
if( !('defineProperties' in Object) ) return false;
try{
var obj = {};
Object.defineProperties(obj, { prop: { 'get': function () { return true; } } });
return obj.prop;
}
catch( _ ){
return false;
}
})();
var self = ES5_GET_SET ? this : document.createElement('a');
var query_object = new URLSearchParams(
instance.search ? instance.search.substring(1) : null);
query_object._url_object = self;
Object.defineProperties(self, {
href: {
get: function () { return instance.href; },
set: function (v) { instance.href = v; tidy_instance(); update_steps(); },
enumerable: true, configurable: true
},
origin: {
get: function () {
if( 'origin' in instance ) return instance.origin;
return this.protocol + '//' + this.host;
},
enumerable: true, configurable: true
},
protocol: {
get: function () { return instance.protocol; },
set: function (v) { instance.protocol = v; },
enumerable: true, configurable: true
},
username: {
get: function () { return instance.username; },
set: function (v) { instance.username = v; },
enumerable: true, configurable: true
},
password: {
get: function () { return instance.password; },
set: function (v) { instance.password = v; },
enumerable: true, configurable: true
},
host: {
get: function () {
// IE returns default port in |host|
var re = {'http:': /:80$/, 'https:': /:443$/, 'ftp:': /:21$/}[instance.protocol];
return re ? instance.host.replace(re, '') : instance.host;
},
set: function (v) { instance.host = v; },
enumerable: true, configurable: true
},
hostname: {
get: function () { return instance.hostname; },
set: function (v) { instance.hostname = v; },
enumerable: true, configurable: true
},
port: {
get: function () { return instance.port; },
set: function (v) { instance.port = v; },
enumerable: true, configurable: true
},
pathname: {
get: function () {
// IE does not include leading '/' in |pathname|
if( instance.pathname.charAt(0) !== '/' ) return '/' + instance.pathname;
return instance.pathname;
},
set: function (v) { instance.pathname = v; },
enumerable: true, configurable: true
},
search: {
get: function () { return instance.search; },
set: function (v) {
if( instance.search === v ) return;
instance.search = v; tidy_instance(); update_steps();
},
enumerable: true, configurable: true
},
searchParams: {
get: function () { return query_object; },
enumerable: true, configurable: true
},
hash: {
get: function () { return instance.hash; },
set: function (v) { instance.hash = v; tidy_instance(); },
enumerable: true, configurable: true
},
toString: {
value: function() { return instance.toString(); },
enumerable: false, configurable: true
},
valueOf: {
value: function() { return instance.valueOf(); },
enumerable: false, configurable: true
}
});
function tidy_instance() {
var href = instance.href.replace(/#$|\?$|\?(?=#)/g, '');
if( instance.href !== href )
instance.href = href;
}
function update_steps() {
query_object._setList(instance.search ? urlencoded_parse(instance.search.substring(1)) : []);
query_object._update_steps();
}
return self;
}
if( origURL ){
for( var i in origURL ){
if( Object.prototype.hasOwnProperty.call(origURL, i) && typeof origURL[i] === 'function' )
URL[i] = origURL[i];
}
}
global.URL = URL;
global.URLSearchParams = URLSearchParams;
}( typeof self !== 'undefined' ? self : this ));

View file

@ -3,35 +3,6 @@ window.relearn = window.relearn || {};
// we need to load this script in the html head to avoid flickering
// on page load if the user has selected a non default variant
// polyfill this rotten piece of sh...oftware
if( typeof NodeList !== "undefined" && NodeList.prototype && !NodeList.prototype.forEach ){
NodeList.prototype.forEach = Array.prototype.forEach;
}
if (!String.prototype.startsWith) {
Object.defineProperty(String.prototype, 'startsWith', {
value: function(search, rawPos) {
var pos = rawPos > 0 ? rawPos|0 : 0;
return this.substring(pos, pos + search.length) === search;
}
});
}
"function"!=typeof Object.assign&&(Object.assign=function(n,t){"use strict";if(null==n)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(n),e=1;e<arguments.length;e++){var o=arguments[e];if(null!=o)for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r});
if(!Array.prototype.find){Array.prototype.find=function(predicate){if(this===null){throw new TypeError('Array.prototype.find called on null or undefined')}if(typeof predicate!=='function'){throw new TypeError('predicate must be a function')}var list=Object(this);var length=list.length>>>0;var thisArg=arguments[1];var value;for(var i=0;i<length;i+=1){value=list[i];if(predicate.call(thisArg,value,i,list)){return value}}return undefined}}
Array.from||(Array.from=function(){var r;try{r=Symbol.iterator?Symbol.iterator:"Symbol(Symbol.iterator)"}catch(t){r="Symbol(Symbol.iterator)"}var t=Object.prototype.toString,n=function(r){return"function"==typeof r||"[object Function]"===t.call(r)},o=Math.pow(2,53)-1,e=function(r){var t=function(r){var t=Number(r);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(r);return Math.min(Math.max(t,0),o)},a=function(t,n){var o=t&&n[r]();return function(r){return t?o.next():n[r]}},i=function(r,t,n,o,e,a){for(var i=0;i<n||e;){var u=o(i),f=e?u.value:u;if(e&&u.done)return t;t[i]=a?void 0===r?a(f,i):a.call(r,f,i):f,i+=1}if(e)throw new TypeError("Array.from: provided arrayLike or iterator has length more then 2 ** 52 - 1");return t.length=n,t};return function(t){var o=this,u=Object(t),f=n(u[r]);if(null==t&&!f)throw new TypeError("Array.from requires an array-like object or iterator - not null or undefined");var l,c=arguments.length>1?arguments[1]:void 0;if(void 0!==c){if(!n(c))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(l=arguments[2])}var y=e(u.length),h=n(o)?Object(new o(y)):new Array(y);return i(l,h,y,a(f,u),f,c)}}());
const ElementPrototype=window.Element.prototype;
if(typeof ElementPrototype.matches!=='function'){ElementPrototype.matches=ElementPrototype.msMatchesSelector||ElementPrototype.mozMatchesSelector||ElementPrototype.webkitMatchesSelector||function matches(selector){let element=this;const elements=(element.document||element.ownerDocument).querySelectorAll(selector);let index=0;while(elements[index]&&elements[index]!==element){index+=1}return Boolean(elements[index])}}if(typeof ElementPrototype.closest!=='function'){ElementPrototype.closest=function closest(selector){let element=this;while(element&&element.nodeType===1){if(element.matches(selector)){return element}element=element.parentNode}return null}}
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function ready(fn) { if (document.readyState == 'complete') { fn(); } else { document.addEventListener('DOMContentLoaded',fn); } }
var variants = {
@ -263,52 +234,34 @@ var variants = {
this.download( style, 'text/css', 'theme-' + this.customvariantname + '.css' );
},
adjustCSSRules: function(selector, props, sheets) {
// get stylesheet(s)
if (!sheets) sheets = [].concat(Array.from(document.styleSheets));else if (sheets.sup) {
// sheets is a string
var absoluteURL = new URL(sheets, document.baseURI).href;
sheets = [].concat(document.styleSheets).filter(function (i) {
return i.href == absoluteURL;
});
} else sheets = [sheets]; // sheets is a stylesheet
// CSS (& HTML) reduce spaces in selector to one.
adjustCSSRules: function(selector, props, sheets){
// get stylesheet(s)
if (!sheets) sheets = [...document.styleSheets];
else if (sheets.sup){ // sheets is a string
let absoluteURL = new URL(sheets, document.baseURI).href;
sheets = [...document.styleSheets].filter(i => i.href == absoluteURL);
}
else sheets = [sheets]; // sheets is a stylesheet
selector = selector.replace(/\s+/g, ' ');
// CSS (& HTML) reduce spaces in selector to one.
selector = selector.replace(/\s+/g, ' ');
const findRule = s => [...s.cssRules].reverse().find(i => i.selectorText == selector)
let rule = sheets.map(findRule).filter(i=>i).pop()
var findRule = function findRule(s) {
return [].concat(s.cssRules).reverse().find(function (i) {
return i.selectorText == selector;
});
};
const propsArr = props.sup
? props.split(/\s*;\s*/).map(i => i.split(/\s*:\s*/)) // from string
: Object.entries(props); // from Object
var rule = sheets.map(findRule).filter(function (i) {
return i;
}).pop();
var propsArr = props.sup ? props.split(/\s*;\s*/).map(function (i) {
return i.split(/\s*:\s*/);
}) // from string
: Object.entries(props); // from Object
if (rule) {
for (var _iterator = _createForOfIteratorHelperLoose(propsArr), _step; !(_step = _iterator()).done;) {
var _rule$style;
var _step$value = _step.value,
prop = _step$value[0],
val = _step$value[1];
// rule.style[prop] = val; is against the spec, and does not support !important.
(_rule$style = rule.style).setProperty.apply(_rule$style, [prop].concat(val.split(/ *!(?=important)/)));
}
} else {
sheet = sheets.pop();
if (!props.sup) props = propsArr.reduce(function (str, _ref) {
var k = _ref[0],
v = _ref[1];
return str + "; " + k + ": " + v;
}, '');
sheet.insertRule(selector + " { " + props + " }", sheet.cssRules.length);
}
},
if (rule) for (let [prop, val] of propsArr){
// rule.style[prop] = val; is against the spec, and does not support !important.
rule.style.setProperty(prop, ...val.split(/ *!(?=important)/));
}
else {
sheet = sheets.pop();
if (!props.sup) props = propsArr.reduce((str, [k, v]) => `${str}; ${k}: ${v}`, '');
sheet.insertRule(`${selector} { ${props} }`, sheet.cssRules.length);
}
},
normalizeColor: function( c ){
if( !c || !c.trim ){

View file

@ -12,7 +12,7 @@ features = ["badges", "breadcrumbs", "boxes", "buttons",
"favicon", "file inclusion", "file system support", "font awesome", "front matter cms",
"gfm",
"hidden pages",
"i18n", "icons", "ie11", "image resizing", "include", "internet explorer",
"i18n", "icons", "image resizing", "include",
"light", "lightbox", "logo",
"math", "mathjax", "menu", "mermaid", "multilingual", "mobile",
"nested sections", "notice",