1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

refactor params.opengraph → params.web.opengraph

This commit is contained in:
checktheroads
2020-01-28 09:51:58 -07:00
parent 3b11cd65f2
commit b5b7600880
2 changed files with 7 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ from pydantic.color import Color
# Project Imports
from hyperglass.configuration.models._utils import HyperglassModel
from hyperglass.configuration.models.opengraph import OpenGraph
class Web(HyperglassModel):
@@ -168,6 +169,7 @@ class Web(HyperglassModel):
info: StrictStr = "Help"
peeringdb = "PeeringDB"
fqdn_tooltip: StrictStr = "Use {protocol}"
cache: StrictStr = "Results will be cached for {timeout} {period}."
class Error404(HyperglassModel):
"""Validation model for 404 Error Page."""
@@ -188,9 +190,10 @@ class Web(HyperglassModel):
colors: Colors = Colors()
credit: Credit = Credit()
external_link: ExternalLink = ExternalLink()
font: Font = Font()
help_menu: HelpMenu = HelpMenu()
logo: Logo = Logo()
external_link: ExternalLink = ExternalLink()
opengraph: OpenGraph = OpenGraph()
terms: Terms = Terms()
text: Text = Text()

View File

@@ -31,9 +31,9 @@ export default () => {
const language = config?.language || "en";
const currentYear = new Date().getFullYear();
const copyright = config ? `${currentYear} ${config.org_name}` : `${currentYear} hyperglass`;
const ogImage = config?.opengraph.image || null;
const ogImageHeight = config?.opengraph.height || null;
const ogImageWidth = config?.opengraph.width || null;
const ogImage = config?.web.opengraph.image || null;
const ogImageHeight = config?.web.opengraph.height || null;
const ogImageWidth = config?.web.opengraph.width || null;
const primaryFont = googleFontUrl(theme.fonts.body);
const monoFont = googleFontUrl(theme.fonts.mono);
useEffect(() => {