diff --git a/browse/config.py b/browse/config.py
index 6dcf3a5b0..8f353e589 100644
--- a/browse/config.py
+++ b/browse/config.py
@@ -100,6 +100,15 @@ class Settings(BaseSettings):
BROWSE_ANALYTICS_ENABLED: bool = bool(int(os.environ.get("BROWSE_ANALYTICS_ENABLED", "0")))
"""Enable/disable web analytics, ie: Pendo, Piwik, geoip."""
+ BROWSE_USER_BANNER_ENABLED: bool = bool(int(os.environ.get("BROWSE_USER_BANNER_ENABLED", "0")))
+ """Enable/disable the user banner, the full width one, above the Cornell logo."""
+
+ BROWSE_MINIMAL_BANNER_ENABLED: bool = bool(int(os.environ.get("BROWSE_MINIMAL_BANNER_ENABLED", "0")))
+ """Enable/disable the banner to the right of the Cornell logo, before the donate button."""
+
+ BROWSE_SPECIAL_MESSAGE_ENABLED: bool = bool(int(os.environ.get("BROWSE_SPECIAL_MESSAGE_ENABLED", "0")))
+ """Enable/disable the cloud list item, in the arXiv News section, in home/special-message.html"""
+
############################## Services ##############################
DOCUMENT_LISTING_SERVICE: PyObject = 'browse.services.listing.fs_listing' # type: ignore
"""What implementation to use for the listing service.
diff --git a/browse/templates/base.html b/browse/templates/base.html
index 7562103e7..987115921 100644
--- a/browse/templates/base.html
+++ b/browse/templates/base.html
@@ -34,12 +34,15 @@
- {%- set rd_int = request_datetime.strftime("%Y%m%d%H%M")|int -%}
- {%- if rd_int >= 202305010100 and rd_int <= 202307170100 -%}
-
- We are hiring
+ {%- if config["BROWSE_MINIMAL_BANNER_ENABLED"] and rd_int >= 202310010100 and rd_int <= 202312300100 -%}
+
{%- endif -%}
+
+{%- if config['BROWSE_SPECIAL_MESSAGE_ENABLED'] and rd_int >= 202210010100 and rd_int <= 202212300100 -%}
+
+ arXiv is moving!
+
Experience the future with our cloud-powered app today!
+
+ Stay tuned for
+ updates
+ on our migration timeline.
+
+
+{%- endif -%}
diff --git a/browse/templates/user_banner.html b/browse/templates/user_banner.html
index fb419e2d6..920667aa9 100644
--- a/browse/templates/user_banner.html
+++ b/browse/templates/user_banner.html
@@ -2,7 +2,7 @@
The content() and script() macro get added to the base.html.
-The content() elements will be added at the starty of the above the
+The content() elements will be added at the start of the above the
header in base.html.
The script() elements will be added to the in the base.html. This has
@@ -13,20 +13,23 @@
the user_banner.script() macro.
This no longer uses env vars set in browse.config or httpd/conf/ng_flask.conf on
-production. -#}
+production.
-{# Set these variables to a string of YYYYMMMDD of the start and end date #}
-{% set BANNER_START = '202000101' %}
-{% set BANNER_END = '20200101' %}
+Adding an environment var, so we can enable only on gcp.
+-#}
+
+{# Set these variables to a string of YYYYMMDD of the start and end date #}
+{% set BANNER_START = '20221001' %}
+{% set BANNER_END = '20221030' %}
{%- macro content(request_datetime) -%}
-{%- if BANNER_START <= request_datetime.strftime('%Y%m%d') and BANNER_END > request_datetime.strftime('%Y%m%d') %}
+{%- if config['BROWSE_USER_BANNER_ENABLED'] and (BANNER_START <= request_datetime.strftime('%Y%m%d')) and (BANNER_END > request_datetime.strftime('%Y%m%d')) %}
{%- endif -%}
@@ -34,7 +37,7 @@
Example banner
{%- macro script(request_datetime) -%}
-{%- if BANNER_START <= request_datetime.strftime('%Y%m%d') and BANNER_END > request_datetime.strftime('%Y%m%d') %}
+{%- if config['BROWSE_USER_BANNER_ENABLED'] and (BANNER_START <= request_datetime.strftime('%Y%m%d')) and (BANNER_END > request_datetime.strftime('%Y%m%d')) %}
{%- endif -%}
{%- endmacro -%}