Skip to content

Commit 6ae26a4

Browse files
author
Dylan McCall
committed
Add a per-language option to hide the banner
By default, we set the "hide-banner" class on the body element for any language other than "en". We mark "hide-banner" for translation, so once the banner content has been translated in a particular language, they can add a translation for "hide-banner" that replaces it with an empty string. This change requires additional support in the CSS provided by the creativecommons.org repository.
1 parent 236a11c commit 6ae26a4

File tree

1 file changed

+1
-1
lines changed
  • python_env/src/cc.engine/cc/engine/templates/macros_templates

1 file changed

+1
-1
lines changed

python_env/src/cc.engine/cc/engine/templates/macros_templates/deed.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
</head>
4949

50-
<body typeof="cc:License" about="http://creativecommons.org/licenses/by/4.0/" class="license {{ get_ltr_rtl }}">
50+
<body typeof="cc:License" about="http://creativecommons.org/licenses/by/4.0/" class="license {{ get_ltr_rtl }} {% if target_lang != 'en' %}{% trans %}hide-banner{% endtrans %}{% endif %}">
5151
{% block page_top %}{% endblock %}
5252
<div id="page" class="site">
5353
<div class="site-inner">

0 commit comments

Comments
 (0)