Skip to content

Commit

Permalink
WIP: Add custom_banner to head_insert
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Oct 10, 2022
1 parent a251082 commit f92fe76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions pywb/templates/custom_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Add custom banner here. Used only in non-framed replay. -->
6 changes: 6 additions & 0 deletions pywb/templates/head_insert.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@

{% endif %}

{% if not wbinfo.is_framed %}

{{ custom_banner_html }}

{% endif %}

{% endautoescape %}

<!-- End WB Insert -->
Expand Down
2 changes: 1 addition & 1 deletion tests/test_auto_colls.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_add_custom_banner(self):
"""

banner_file = os.path.join(self.root_dir, COLLECTIONS, 'test',
'templates', 'banner.html')
'templates', 'custom_banner.html')

with open(banner_file, 'w+b') as fh:
fh.write(b'<div>Custom Banner Here!</div>')
Expand Down

0 comments on commit f92fe76

Please sign in to comment.