forked from mirrors/thatmattlove-hyperglass
added favicon path config variable & base.html jinja variable
This commit is contained in:
parent
baaa3d1a1b
commit
5f15935b7b
3 changed files with 22 additions and 2 deletions
|
|
@ -334,6 +334,24 @@ class brand:
|
|||
else:
|
||||
return t["logo_path"]
|
||||
|
||||
def favicon16_path():
|
||||
list = []
|
||||
for t in branding:
|
||||
if len(t["favicon16_path"]) == 0:
|
||||
f = "static/images/favicon/favicon-16x16.png"
|
||||
return f
|
||||
else:
|
||||
return t["favicon16_path"]
|
||||
|
||||
def favicon32_path():
|
||||
list = []
|
||||
for t in branding:
|
||||
if len(t["favicon32_path"]) == 0:
|
||||
f = "static/images/favicon/favicon-32x32.png"
|
||||
return f
|
||||
else:
|
||||
return t["favicon32_path"]
|
||||
|
||||
def logo_width():
|
||||
list = []
|
||||
for t in branding:
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ class html:
|
|||
footer_content=md.convert(footer),
|
||||
logo_path=configuration.brand.logo_path(),
|
||||
logo_width=configuration.brand.logo_width(),
|
||||
favicon16_path=configuration.brand.favicon16_path(),
|
||||
favicon32_path=configuration.brand.favicon32_path(),
|
||||
placeholder_prefix=configuration.brand.placeholder_prefix(),
|
||||
show_peeringdb=configuration.brand.show_peeringdb(),
|
||||
text_results=configuration.brand.text_results(),
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="static/images/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="static/images/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="static/images/favicon/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon32_path }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon16_path }}">
|
||||
<link rel="manifest" href="static/images/favicon/site.webmanifest">
|
||||
<link rel="mask-icon" href="static/images/favicon/safari-pinned-tab.svg" color="{{ color_tag_cmd }}">
|
||||
<link rel="shortcut icon" href="static/images/favicon/favicon.ico">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue