mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
Fixed errors in deprecation path of social plugin settings
This commit is contained in:
parent
b0d59f2241
commit
8b50290f5e
@ -62,11 +62,13 @@ class SocialPluginConfig(Config):
|
|||||||
|
|
||||||
# Deprecated options
|
# Deprecated options
|
||||||
cards_color = opt.Deprecated(
|
cards_color = opt.Deprecated(
|
||||||
|
option_type = opt.Type(dict, default = {}),
|
||||||
message =
|
message =
|
||||||
"Deprecated, use 'cards_layout_options.background_color' "
|
"Deprecated, use 'cards_layout_options.background_color' "
|
||||||
"and 'cards_layout_options.color' with 'default' layout"
|
"and 'cards_layout_options.color' with 'default' layout"
|
||||||
)
|
)
|
||||||
cards_font = opt.Deprecated(
|
cards_font = opt.Deprecated(
|
||||||
|
option_type = opt.Type(str),
|
||||||
message = "Deprecated, use 'cards_layout_options.font_family'"
|
message = "Deprecated, use 'cards_layout_options.font_family'"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -138,12 +140,10 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
|||||||
self.color = colors.get(primary, self.color)
|
self.color = colors.get(primary, self.color)
|
||||||
|
|
||||||
# Retrieve color overrides
|
# Retrieve color overrides
|
||||||
|
options = self.config.cards_layout_options
|
||||||
self.color = {
|
self.color = {
|
||||||
**self.color,
|
"fill": options.get("background_color", self.color["fill"]),
|
||||||
**{
|
"text": options.get("color", self.color["text"])
|
||||||
"fill": self.config.cards_layout_options.get("background_color"),
|
|
||||||
"text": self.config.cards_layout_options.get("color")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retrieve custom_dir path
|
# Retrieve custom_dir path
|
||||||
|
@ -62,11 +62,13 @@ class SocialPluginConfig(Config):
|
|||||||
|
|
||||||
# Deprecated options
|
# Deprecated options
|
||||||
cards_color = opt.Deprecated(
|
cards_color = opt.Deprecated(
|
||||||
|
option_type = opt.Type(dict, default = {}),
|
||||||
message =
|
message =
|
||||||
"Deprecated, use 'cards_layout_options.background_color' "
|
"Deprecated, use 'cards_layout_options.background_color' "
|
||||||
"and 'cards_layout_options.color' with 'default' layout"
|
"and 'cards_layout_options.color' with 'default' layout"
|
||||||
)
|
)
|
||||||
cards_font = opt.Deprecated(
|
cards_font = opt.Deprecated(
|
||||||
|
option_type = opt.Type(str),
|
||||||
message = "Deprecated, use 'cards_layout_options.font_family'"
|
message = "Deprecated, use 'cards_layout_options.font_family'"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -138,12 +140,10 @@ class SocialPlugin(BasePlugin[SocialPluginConfig]):
|
|||||||
self.color = colors.get(primary, self.color)
|
self.color = colors.get(primary, self.color)
|
||||||
|
|
||||||
# Retrieve color overrides
|
# Retrieve color overrides
|
||||||
|
options = self.config.cards_layout_options
|
||||||
self.color = {
|
self.color = {
|
||||||
**self.color,
|
"fill": options.get("background_color", self.color["fill"]),
|
||||||
**{
|
"text": options.get("color", self.color["text"])
|
||||||
"fill": self.config.cards_layout_options.get("background_color"),
|
|
||||||
"text": self.config.cards_layout_options.get("color")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Retrieve custom_dir path
|
# Retrieve custom_dir path
|
||||||
|
Loading…
Reference in New Issue
Block a user