Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy giving Tuesday banner #803

Merged
merged 11 commits into from
Dec 2, 2024
2 changes: 1 addition & 1 deletion browse/formatting/cite.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _fmt_author_list(pauths: List[List[str]]) -> str:
authors = [
(f"{au[1]} " if (len(au) > 1 and au[1]) else "")
+ f"{au[0]}"
+ (f" {au[2]} au2" if (len(au) > 2 and au[2]) else "")
+ (f" {au[2]}" if (len(au) > 2 and au[2]) else "")
for au in pauths
]
return " and ".join(authors)
Expand Down
5 changes: 3 additions & 2 deletions browse/static/css/slider.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* latest update: 8/15/2024 v1.14*/
/* latest update: 12/02/2024 v1.15*/

body {
margin: 0;
Expand Down Expand Up @@ -159,7 +159,8 @@ body {
float: left;
}
.slider-wrapper .donate-cta {
float: left;
float: right;
margin-right: 15%;
}
}
@media (min-width: 983px) {
Expand Down
5 changes: 3 additions & 2 deletions browse/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@

<div id="header" class="is-hidden-mobile">
{% block header %}
{#- The ignore_me link is not meant to be visible to users; it is meant to catch robots/crawlers not respecting robots.txt. aria-hidden prevents screenreaders from being caught. -#}
<a aria-hidden="true" href="/IgnoreMe"></a>
{#- The ignore_me link is not meant to be visible to users; it is meant to catch robots/crawlers not respecting robots.txt.
aria-hidden prevents screenreaders from being caught, and tabindex prevents it from being selectable via the tab key. -#}
<a aria-hidden="true" tabindex="-1" href="/IgnoreMe"></a>
{% block header_h1 %}<h1><img src="{{ url_for('static', filename='images/arxiv-logo-one-color-white.svg') }}" alt="arxiv logo" style="height:60px;"/></h1>{% endblock header_h1%}
{% block login_link %}{% endblock %}
{{ base_macros.compactsearch() }}
Expand Down
14 changes: 7 additions & 7 deletions browse/templates/user_banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
-#}

{# Set these variables to a string of YYYYMMDD of the start and end date #}
{% set BANNER_START_1 = 202410210000 %}
{% set BANNER_END_1 = 202410272359 %}
{% set BANNER_START_1 = 202412030000 %}
{% set BANNER_END_1 = 202412032359 %}
{% set SLIDE = True %}

{%- macro content(request_datetime) -%}
{%- set now=request_datetime.strftime("%Y%m%d%H%M")|int -%}

{%- if now >= BANNER_START_1 and now < BANNER_END_1 -%}
{# October 21 - October 27 #}
{# Dec3 - Dec3 #}
<aside class="slider-wrapper bps-banner forum blue">
<a class="close-slider bps-banner" href="#"><img src="{{ url_for('static', filename='images/icons/close-slider.png') }}" alt="close this message"></a>
<div class="columns">
<img role="presentation" class="bps-banner-image" src="{{ url_for('static', filename='images/icons/smileybones-infinity-large.png') }}" alt="arXiv Smilely Bones">
<img role="presentation" class="bps-banner-image" src="{{ url_for('static', filename='images/icons/smileybones-pixel.png') }}" alt="arXiv Smilely Bones">
<div class="copy-donation bps-banner">
<h2>Happy Open Access Week from arXiv!</h2>
<p>Open access is only possible with YOUR support. Give to arXiv this week to help keep science open for all.</p>
<h2>Happy Giving Tuesday - support arXiv today!</h2>
<p>Thank you to everyone who makes arXiv possible. Give to arXiv today and help keep science open.</p>
</div>
<div class="amount-donation bps-banner">
<div class="donate-cta"><a class="banner_link banner-btn-grad" target="_blank" href="https://securelb.imodules.com/s/1717/giving/interior.aspx?sid=1717&gid=2&pgid=22315&cid=35778&dids=276&bledit=1&sort=1"><b>Donate!</b></a></div>
Expand All @@ -52,7 +52,7 @@ <h2>Happy Open Access Week from arXiv!</h2>
{%- set now=request_datetime.strftime("%Y%m%d%H%M")|int -%}
{%- if (SLIDE and (BANNER_START_1|int <= now) and (BANNER_END_1|int > now)) -%}
{# only run this script while a banner is active #}
<link rel="stylesheet" type="text/css" media="screen" href="{{ url_for('static', filename='css/slider.css') }}?v=1.14" />
<link rel="stylesheet" type="text/css" media="screen" href="{{ url_for('static', filename='css/slider.css') }}?v=1.15" />
<script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/donate.js') }}?v=1.11"></script>
{%- endif -%}
Expand Down
Loading