mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-14 10:57:41 +01:00
Fixed interference of social plugin and auto dark mode
This commit is contained in:
parent
cc78979185
commit
66d450009d
@ -117,9 +117,12 @@ class SocialPlugin(BasePlugin[SocialConfig]):
|
|||||||
if "palette" in theme:
|
if "palette" in theme:
|
||||||
palette = theme["palette"]
|
palette = theme["palette"]
|
||||||
|
|
||||||
# Use first palette, if multiple are defined
|
# Find first palette that includes primary color definition
|
||||||
if isinstance(palette, list):
|
if isinstance(palette, list):
|
||||||
palette = palette[0]
|
for p in palette:
|
||||||
|
if "primary" in p and p["primary"]:
|
||||||
|
palette = p
|
||||||
|
break
|
||||||
|
|
||||||
# Set colors according to palette
|
# Set colors according to palette
|
||||||
if "primary" in palette and palette["primary"]:
|
if "primary" in palette and palette["primary"]:
|
||||||
|
@ -117,9 +117,12 @@ class SocialPlugin(BasePlugin[SocialConfig]):
|
|||||||
if "palette" in theme:
|
if "palette" in theme:
|
||||||
palette = theme["palette"]
|
palette = theme["palette"]
|
||||||
|
|
||||||
# Use first palette, if multiple are defined
|
# Find first palette that includes primary color definition
|
||||||
if isinstance(palette, list):
|
if isinstance(palette, list):
|
||||||
palette = palette[0]
|
for p in palette:
|
||||||
|
if "primary" in p and p["primary"]:
|
||||||
|
palette = p
|
||||||
|
break
|
||||||
|
|
||||||
# Set colors according to palette
|
# Set colors according to palette
|
||||||
if "primary" in palette and palette["primary"]:
|
if "primary" in palette and palette["primary"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user