Skip to content

Commit

Permalink
Merge pull request #803 from arXiv/develop
Browse files Browse the repository at this point in the history
deploy giving Tuesday banner
  • Loading branch information
kyokukou authored Dec 2, 2024
2 parents 0ddf984 + e34369e commit d5307f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
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
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

0 comments on commit d5307f5

Please sign in to comment.