mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Prefixed tabs and instant feature flags with 'navigation.*'
This commit is contained in:
parent
ce802a4913
commit
085117ef82
@ -23,7 +23,7 @@ can be enabled via `mkdocs.yml` with:
|
|||||||
``` yaml
|
``` yaml
|
||||||
theme:
|
theme:
|
||||||
features:
|
features:
|
||||||
- instant
|
- navigation.instant
|
||||||
```
|
```
|
||||||
|
|
||||||
The resulting page is parsed and injected and all event handlers and components
|
The resulting page is parsed and injected and all event handlers and components
|
||||||
@ -65,7 +65,7 @@ enabled via `mkdocs.yml` with:
|
|||||||
``` yaml
|
``` yaml
|
||||||
theme:
|
theme:
|
||||||
features:
|
features:
|
||||||
- tabs
|
- navigation.tabs
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that all __top-level pages__ (i.e. all top-level entries that directly
|
Note that all __top-level pages__ (i.e. all top-level entries that directly
|
||||||
|
File diff suppressed because one or more lines are too long
1
material/assets/javascripts/bundle.75f65488.min.js.map
Normal file
1
material/assets/javascripts/bundle.75f65488.min.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.97a86bda.min.js",
|
"assets/javascripts/bundle.js": "assets/javascripts/bundle.75f65488.min.js",
|
||||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.97a86bda.min.js.map",
|
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.75f65488.min.js.map",
|
||||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.141042ad.min.js",
|
"assets/javascripts/vendor.js": "assets/javascripts/vendor.141042ad.min.js",
|
||||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.141042ad.min.js.map",
|
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.141042ad.min.js.map",
|
||||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js",
|
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js",
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
<div class="md-container" data-md-component="container">
|
<div class="md-container" data-md-component="container">
|
||||||
{% block hero %}{% endblock %}
|
{% block hero %}{% endblock %}
|
||||||
{% block tabs %}
|
{% block tabs %}
|
||||||
{% if "tabs" in config.theme.features %}
|
{% if "navigation.tabs" in config.theme.features %}
|
||||||
{% include "partials/tabs.html" %}
|
{% include "partials/tabs.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -173,7 +173,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/vendor.141042ad.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/vendor.141042ad.min.js' | url }}"></script>
|
||||||
<script src="{{ 'assets/javascripts/bundle.97a86bda.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.75f65488.min.js' | url }}"></script>
|
||||||
{%- set translations = {} -%}
|
{%- set translations = {} -%}
|
||||||
{%- for key in [
|
{%- for key in [
|
||||||
"clipboard.copy",
|
"clipboard.copy",
|
||||||
|
@ -51,8 +51,8 @@ theme:
|
|||||||
# Default values, taken from mkdocs_theme.yml
|
# Default values, taken from mkdocs_theme.yml
|
||||||
language: en
|
language: en
|
||||||
features:
|
features:
|
||||||
- tabs
|
- navigation.tabs
|
||||||
#- instant
|
#- navigation.instant
|
||||||
palette:
|
palette:
|
||||||
scheme: default
|
scheme: default
|
||||||
primary: indigo
|
primary: indigo
|
||||||
|
@ -400,7 +400,10 @@ export function initialize(config: unknown) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
/* Enable instant loading, if not on file:// protocol */
|
/* Enable instant loading, if not on file:// protocol */
|
||||||
if (config.features.includes("instant") && location.protocol !== "file:") {
|
if (
|
||||||
|
config.features.includes("navigation.instant") &&
|
||||||
|
location.protocol !== "file:"
|
||||||
|
) {
|
||||||
|
|
||||||
/* Fetch sitemap and extract URL whitelist */
|
/* Fetch sitemap and extract URL whitelist */
|
||||||
base$
|
base$
|
||||||
|
@ -30,8 +30,8 @@ import { SearchIndex, SearchTransformFn } from "integrations"
|
|||||||
* Feature flags
|
* Feature flags
|
||||||
*/
|
*/
|
||||||
export type Feature =
|
export type Feature =
|
||||||
| "tabs" /* Tabs navigation */
|
| "navigation.tabs" /* Tabs navigation */
|
||||||
| "instant" /* Instant loading
|
| "navigation.instant" /* Instant loading
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@
|
|||||||
|
|
||||||
<!-- Tabs navigation -->
|
<!-- Tabs navigation -->
|
||||||
{% block tabs %}
|
{% block tabs %}
|
||||||
{% if "tabs" in config.theme.features %}
|
{% if "navigation.tabs" in config.theme.features %}
|
||||||
{% include "partials/tabs.html" %}
|
{% include "partials/tabs.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user