Skip to content
Permalink
Browse files

Merge pull request #13336 from cticenhour/browser-icon

New Website Browser Icon
  • Loading branch information...
aeslaughter committed May 1, 2019
2 parents 1340129 + 1125403 commit 1148465ce564ff9687fe2db42b9a277626071bee
@@ -76,6 +76,7 @@ temp_print_trace.*
*.tiff
*.ps
*.bmp
*.ico
*.html
*.xyz
*Revision.h
@@ -22,6 +22,7 @@ Renderer:
name: MOOSE
repo: https://github.com/idaholab/moose
home: https://www.mooseframework.org
favicon: media/moose.ico
google_analytics: True

Extensions:
Binary file not shown.
@@ -38,7 +38,7 @@

# File extensions to consider when building the content tree
FILE_EXT = ('.md', '.jpg', '.jpeg', '.gif', '.png', '.svg', '.webm', '.ogv', '.mp4', '.m4v', \
'.pdf', '.css', '.js', '.bib', '.woff', '.woff2', '.html')
'.pdf', '.css', '.js', '.bib', '.woff', '.woff2', '.html', '.ico')

# Setup MOOSE_DIR/ROOT_DIR
MOOSE_DIR = os.getenv('MOOSE_DIR', None)
@@ -182,6 +182,7 @@ def defaultConfig():
"""
config = Renderer.defaultConfig()
config['google_analytics'] = (False, "Enable Google Analytics.")
config['favicon'] = (None, "The location of the website favicon.")
return config

def __init__(self, *args, **kwargs):
@@ -222,6 +223,11 @@ def rel(path):
head = anytree.search.find_by_attr(root, 'head')
body = anytree.search.find_by_attr(root, 'body')

favicon = self.get('favicon')
if favicon:
html.Tag(head, 'link', rel="icon", type="image/x-icon", href=rel(favicon), \
sizes="16x16 32x32 64x64 128x128")

for name, kwargs in self.__css:
html.Tag(head, 'link', href=rel(name), type="text/css", rel="stylesheet", **kwargs)

0 comments on commit 1148465

Please sign in to comment.
You can’t perform that action at this time.