Skip to content

Commit

Permalink
Cleaning up image resources (#1892)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Sep 19, 2024
1 parent f3d16df commit 3dd2763
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 22 deletions.
18 changes: 1 addition & 17 deletions armi/bookkeeping/report/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ class Link(Tag):
tag = "link"


# ---------------------------


def encode64(file_path):
"""Return the embedded HTML src attribute for an image in base64."""
xtn = os.path.splitext(file_path)[1][1:] # [1:] to cut out the period
Expand All @@ -195,9 +192,6 @@ def encode64(file_path):
)


# ---------------------------


def writeStandardReportTemplate(f, report, caseTitle=""):
f.write(r"<!DOCTYPE html>" + "\n")
with Html(f):
Expand All @@ -222,17 +216,7 @@ def writeStandardReportTemplate(f, report, caseTitle=""):
with Span(
f, attrs={"class": "navbar-text navbar-version pull-left"}
):
with Img(
f,
attrs={
"src": encode64(
os.path.join(
context.RES, "images", "armiicon.ico"
)
)
},
):
pass
pass

with A(
f,
Expand Down
Binary file removed armi/resources/images/armi-icon.ico
Binary file not shown.
Binary file removed armi/resources/images/armiicon.ico
Binary file not shown.
File renamed without changes
File renamed without changes
7 changes: 3 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ def setup(app):
# as long as this file @import's the theme's main css it won't break anything
html_style = "css/theme_fixes.css"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# The name of an image file (within the static path) to use as favicon of the docs. This file should
# be a Windows icon file (.ico) being 16x16 or 32x32 pixels large.
html_favicon = os.path.join(".static", "armiicon_16x16.ico")

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down Expand Up @@ -481,7 +480,7 @@ def setup(app):
]
),
"within_subsection_order": FileNameSortKey,
"default_thumb_file": os.path.join(context.RES, "images", "TerraPowerLogo.png"),
"default_thumb_file": os.path.join(".static", "TerraPowerLogo.png"),
}

suppress_warnings = ["autoapi.python_import_resolution"]
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ armi = [
"physics/neutronics/tests/ISOXA",
"physics/neutronics/tests/rzmflxYA",
"resources/*",
"resources/**/*",
"tests/1DslabXSByCompTest.yaml",
"tests/armiRun-SHUFFLES.txt",
"tests/armiRun.yaml",
Expand Down

0 comments on commit 3dd2763

Please sign in to comment.