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
|
||||
theme:
|
||||
features:
|
||||
- instant
|
||||
- navigation.instant
|
||||
```
|
||||
|
||||
The resulting page is parsed and injected and all event handlers and components
|
||||
@ -65,7 +65,7 @@ enabled via `mkdocs.yml` with:
|
||||
``` yaml
|
||||
theme:
|
||||
features:
|
||||
- tabs
|
||||
- navigation.tabs
|
||||
```
|
||||
|
||||
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.map": "assets/javascripts/bundle.97a86bda.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.75f65488.min.js",
|
||||
"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.map": "assets/javascripts/vendor.141042ad.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js",
|
||||
|
@ -114,7 +114,7 @@
|
||||
<div class="md-container" data-md-component="container">
|
||||
{% block hero %}{% endblock %}
|
||||
{% block tabs %}
|
||||
{% if "tabs" in config.theme.features %}
|
||||
{% if "navigation.tabs" in config.theme.features %}
|
||||
{% include "partials/tabs.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@ -173,7 +173,7 @@
|
||||
</div>
|
||||
{% block scripts %}
|
||||
<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 = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -51,8 +51,8 @@ theme:
|
||||
# Default values, taken from mkdocs_theme.yml
|
||||
language: en
|
||||
features:
|
||||
- tabs
|
||||
#- instant
|
||||
- navigation.tabs
|
||||
#- navigation.instant
|
||||
palette:
|
||||
scheme: default
|
||||
primary: indigo
|
||||
|
@ -400,7 +400,10 @@ export function initialize(config: unknown) {
|
||||
})
|
||||
|
||||
/* 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 */
|
||||
base$
|
||||
|
@ -30,8 +30,8 @@ import { SearchIndex, SearchTransformFn } from "integrations"
|
||||
* Feature flags
|
||||
*/
|
||||
export type Feature =
|
||||
| "tabs" /* Tabs navigation */
|
||||
| "instant" /* Instant loading
|
||||
| "navigation.tabs" /* Tabs navigation */
|
||||
| "navigation.instant" /* Instant loading
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
@ -234,7 +234,7 @@
|
||||
|
||||
<!-- Tabs navigation -->
|
||||
{% block tabs %}
|
||||
{% if "tabs" in config.theme.features %}
|
||||
{% if "navigation.tabs" in config.theme.features %}
|
||||
{% include "partials/tabs.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user