mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-24 06:43:50 -04:00
Added support for hero text
This commit is contained in:
@@ -212,12 +212,12 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
}).listen()
|
||||
|
||||
/* Component: header shadow toggle */
|
||||
new Material.Event.MatchMedia("(min-width: 1220px)",
|
||||
new Material.Event.Listener(window, [
|
||||
"scroll", "resize", "orientationchange"
|
||||
], new Material.Header.Shadow(
|
||||
"[data-md-component=container]",
|
||||
"[data-md-component=header]")))
|
||||
new Material.Event.Listener(window, [
|
||||
"scroll", "resize", "orientationchange"
|
||||
], new Material.Header.Shadow(
|
||||
"[data-md-component=container]",
|
||||
"[data-md-component=header]")
|
||||
).listen()
|
||||
|
||||
/* Component: header title toggle */
|
||||
new Material.Event.Listener(window, [
|
||||
@@ -227,6 +227,12 @@ function initialize(config) { // eslint-disable-line func-style
|
||||
".md-typeset h1")
|
||||
).listen()
|
||||
|
||||
/* Component: hero visibility toggle */
|
||||
if (document.querySelector("[data-md-component=hero]"))
|
||||
new Material.Event.Listener(window, [
|
||||
"scroll", "resize", "orientationchange"
|
||||
], new Material.Tabs.Toggle("[data-md-component=hero]")).listen()
|
||||
|
||||
/* Component: tabs visibility toggle */
|
||||
if (document.querySelector("[data-md-component=tabs]"))
|
||||
new Material.Event.Listener(window, [
|
||||
|
||||
Reference in New Issue
Block a user