mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Fixed linter errors
This commit is contained in:
parent
02f6a1feab
commit
f7907fc09c
@ -46,3 +46,31 @@ export function resetFocusable(
|
||||
): void {
|
||||
el.removeAttribute("tabindex")
|
||||
}
|
||||
|
||||
/**
|
||||
* Set scroll lock
|
||||
*
|
||||
* @param el - Scrollable element
|
||||
* @param value - Vertical offset
|
||||
*/
|
||||
export function setScrollLock(
|
||||
el: HTMLElement, value: number
|
||||
): void {
|
||||
el.setAttribute("data-md-state", "lock")
|
||||
el.style.top = `-${value}px`
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset scroll lock
|
||||
*
|
||||
* @param el - Scrollable element
|
||||
*/
|
||||
export function resetScrollLock(
|
||||
el: HTMLElement
|
||||
): void {
|
||||
const value = -1 * parseInt(el.style.top, 10)
|
||||
el.removeAttribute("data-md-state")
|
||||
el.style.top = ""
|
||||
if (value)
|
||||
window.scrollTo(0, value)
|
||||
}
|
||||
|
@ -24,7 +24,10 @@ import { Observable, merge } from "rxjs"
|
||||
import { filter, sample, take } from "rxjs/operators"
|
||||
|
||||
import { configuration } from "~/_"
|
||||
import { requestJSON, getElementOrThrow } from "~/browser"
|
||||
import {
|
||||
getElementOrThrow,
|
||||
requestJSON
|
||||
} from "~/browser"
|
||||
import {
|
||||
SearchIndex,
|
||||
isSearchQueryMessage,
|
||||
|
@ -20,12 +20,14 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
import { filter } from "fuzzaldrin-plus"
|
||||
import { from, fromEvent } from "rxjs"
|
||||
|
||||
import { getElement, getElementOrThrow } from "browser"
|
||||
import { map, switchMap } from "rxjs/operators"
|
||||
|
||||
import { getElement, getElementOrThrow } from "~/browser"
|
||||
|
||||
import { renderIconSearch } from "./templates/icon"
|
||||
|
||||
// Obtain configuration
|
||||
|
@ -20,6 +20,8 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
|
||||
import { wrap } from "fuzzaldrin-plus"
|
||||
import { h, round } from "utilities"
|
||||
|
||||
|
@ -96,17 +96,6 @@
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- Application configuration -->
|
||||
{% block config %}
|
||||
{%- set configuration = {
|
||||
"base": base_url,
|
||||
"features": features
|
||||
} -%}
|
||||
<script id="__config" type="application/json">
|
||||
{{- configuration | tojson -}}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
<!-- Extra JavaScript -->
|
||||
<script src="{{ 'overrides/assets/javascripts/bundle.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user