Skip to content

Commit fc0efca

Browse files
authored
Merge pull request #176 from arXiv/ARXIVNG-3419
minimizes COVID message block on homepage
2 parents 7a65a78 + c998630 commit fc0efca

File tree

3 files changed

+63
-60
lines changed

3 files changed

+63
-60
lines changed

browse/static/css/arXiv.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,21 +549,21 @@ footer .sorry-app-links .a11y-main-link {
549549
border-radius: 10px;
550550
background-color: #fef6f6;
551551
padding: .5em 1em;
552-
margin: 2em 1% 1em 1%;
552+
margin: 1em 1% 1em 1%;
553553
width: 92%;
554554
}
555555
.message-special span.label {
556556
display: block;
557557
background-color: #b31a1a;
558558
width: 160px;
559559
text-align: center;
560-
margin-top: -1.5em;
560+
margin-top: -1.9em;
561561
color: #ffffff;
562562
padding: .25em 0;
563563
font-size: 12px;
564564
}
565565
.message-special ul {
566-
margin-bottom: 2em;
566+
margin-bottom: 1em;
567567
margin-top: 0;
568568
}
569569
.message-special p {
@@ -748,6 +748,12 @@ p.tagline {
748748
}
749749
.home-search {
750750
clear:both;
751+
border: 1px solid #dddddd;
752+
padding: .5em;
753+
margin-top: 1em;
754+
}
755+
.home-search label {
756+
font-weight: bold;
751757
}
752758
@media screen and (max-width: 768px) {
753759
.tagline-cta, .tagline-wrapper {

browse/templates/home/home.html

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,55 @@
99

1010
{%- block content %}
1111
{#- TODO: display order in taxonomy? -#}
12-
<p class="tagline">arXiv is a free distribution service and an open-access archive for {% if document_count -%}{{ "{:,}".format(document_count) }}{%- endif %}
13-
scholarly articles in the fields of physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering and systems science, and economics.
14-
Materials on this site are not peer-reviewed by arXiv.
15-
</p>
1612

17-
<br>
18-
{#- /multi sends to either search, catchup or form interface based on which button is hit. -#}
19-
<form name="home-adv-search" class="home-search" action="/multi" method="get" role="search">
20-
Subject search and browse:
21-
<select name="group" title="Search in">
22-
{%- for group_key, group_details in groups.items() if not group_details.is_test %}
23-
<option
24-
value ="{{group_key}}"
25-
data-url="{{url_for('search_archive', archive=group_key[4:])}}"
26-
{% if group_key == 'grp_physics' %}selected="selected"{% endif %}>
27-
{{ group_details.name }}
28-
</option>
29-
{%- endfor %}
30-
</select>
31-
<input id="adv-search-btn" type="button" value="Search">
32-
<input type="submit" name="/form" value="Form Interface">
33-
<input type="submit" name="/catchup" value="Catchup">
34-
</form>
13+
<div class="columns">
14+
<div class="column">
15+
<p class="tagline">arXiv is a free distribution service and an open-access archive for {% if document_count -%}{{ "{:,}".format(document_count) }}{%- endif %}
16+
scholarly articles in the fields of physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering and systems science, and economics.
17+
Materials on this site are not peer-reviewed by arXiv.
18+
</p>
3519

36-
<script type="text/javascript">
37-
function doAdvSearchBtn(event) {
38-
sel = document.querySelector('select[name="group"]')
39-
if(sel && sel.options && sel.options[sel.selectedIndex].dataset.url ){
40-
data_url = sel.options[sel.selectedIndex].dataset.url
41-
if( data_url ){
42-
window.location = data_url;
43-
}else{
44-
console.error('home page search button: no data_url found for search');
20+
{#- /multi sends to either search, catchup or form interface based on which button is hit. -#}
21+
<form name="home-adv-search" class="home-search" action="/multi" method="get" role="search">
22+
<label for="search-category">Subject search and browse:</label><br>
23+
<select name="group" title="Search in" id="search-category">
24+
{%- for group_key, group_details in groups.items() if not group_details.is_test %}
25+
<option
26+
value ="{{group_key}}"
27+
data-url="{{url_for('search_archive', archive=group_key[4:])}}"
28+
{% if group_key == 'grp_physics' %}selected="selected"{% endif %}>
29+
{{ group_details.name }}
30+
</option>
31+
{%- endfor %}
32+
</select>
33+
<input id="adv-search-btn" type="button" value="Search">
34+
<input type="submit" name="/form" value="Form Interface">
35+
<input type="submit" name="/catchup" value="Catchup">
36+
</form>
37+
<script type="text/javascript">
38+
function doAdvSearchBtn(event) {
39+
sel = document.querySelector('select[name="group"]')
40+
if(sel && sel.options && sel.options[sel.selectedIndex].dataset.url ){
41+
data_url = sel.options[sel.selectedIndex].dataset.url
42+
if( data_url ){
43+
window.location = data_url;
44+
}else{
45+
console.error('home page search button: no data_url found for search');
46+
}
4547
}
4648
}
47-
}
48-
document.addEventListener('DOMContentLoaded',function() {
49-
document.getElementById('adv-search-btn').onclick=doAdvSearchBtn;
50-
},false);
51-
</script>
52-
<p>
53-
{%- include "home/news.html" -%}
54-
See cumulative <a href="/new/">"What's New"</a> pages.
55-
Read <a href="/help/robots">robots beware</a> before attempting any automated download
56-
</p>
49+
document.addEventListener('DOMContentLoaded',function() {
50+
document.getElementById('adv-search-btn').onclick=doAdvSearchBtn;
51+
},false);
52+
</script>
53+
<h4 class="homepage-news-title">News</h4>
54+
See cumulative <a href="/new/">"What's New"</a> pages.
55+
Read <a href="/help/robots">robots beware</a> before attempting any automated download
56+
</div>
57+
<!-- special news column -->
58+
{%- include "home/news.html" -%}
59+
</div>
60+
5761
{#- TODO: define display order in taxonomy? -#}
5862
{{- group_section(('grp_physics','grp_math','grp_cs','grp_q-bio','grp_q-fin','grp_stat','grp_eess','grp_econ')) }}
5963

browse/templates/home/news.html

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
{#- News blurbs appear at the top of the home page. Generally there should be no more than four items. -#}
22
{%- set rd_int = request_datetime.strftime("%Y%m%d%H%M")|int -%}
3-
43
{%- if rd_int >= 202003300900 -%}
5-
<div class="columns">
6-
<div class="message-special column">
7-
<span class="label">COVID-19 Quick Links</span>
8-
<p>See COVID-19 SARS-CoV-2 preprints from</p>
9-
<ul>
10-
<li><a href="https://arxiv.org/covid19search" title="COVID-19 SARS-CoV-2 preprints from arXiv">arXiv</a></li>
11-
<li><a target="_blank" href="https://connect.biorxiv.org/relate/content/181" title="COVID-19 SARS-CoV-2 preprints from medRxiv and bioRxiv">medRxiv and bioRxiv</a></li>
12-
</ul>
13-
<p>30 Mar 2020: <a href="https://blogs.cornell.edu/arxiv/2020/03/30/new-covid-19-quick-search/">arXiv announces new COVID-19 quick search</a><br/>
14-
12 Mar 2020: <a href="https://blogs.cornell.edu/arxiv/2020/03/12/arxiv-responds-to-covid-19-uncertainties/">arXiv responds to COVID-19 uncertainties</a></p>
15-
<p><em>Important:</em> e-prints posted on arXiv are not peer-reviewed by arXiv; they should not be relied upon without context to guide clinical practice or health-related behavior and should not be reported in news media as established information without consulting multiple experts in the field.</p>
16-
</div>
4+
<div class="message-special column">
5+
<span class="label">COVID-19 Quick Links</span>
6+
<p>See COVID-19 SARS-CoV-2 preprints from</p>
7+
<ul>
8+
<li><a href="https://arxiv.org/covid19search" title="COVID-19 SARS-CoV-2 preprints from arXiv">arXiv</a></li>
9+
<li><a target="_blank" href="https://connect.biorxiv.org/relate/content/181" title="COVID-19 SARS-CoV-2 preprints from medRxiv and bioRxiv">medRxiv and bioRxiv</a></li>
10+
</ul>
11+
<p><em>Important:</em> e-prints posted on arXiv are not peer-reviewed by arXiv; they should not be relied upon without context to guide clinical practice or health-related behavior and should not be reported in news media as established information without consulting multiple experts in the field.</p>
1712
</div>
1813
{% else %}
1914
16 Mar 2020: <a href="https://blogs.cornell.edu/arxiv/2020/03/16/arxiv-announces-its-first-executive-director/">arXiv announces its first executive director</a><br/>
2015
12 Mar 2020: <a href="https://blogs.cornell.edu/arxiv/2020/03/12/arxiv-responds-to-covid-19-uncertainties/">arXiv responds to COVID-19 uncertainties</a><br/>
2116
{%- endif -%}
2217

23-
<br style="clear:both;">
24-
25-
<h4 class="homepage-news-title">News</h4>
18+
<!-- annual giving message -->
2619
{%- if rd_int >= 2019092300 and rd_int <= 2019092700 -%}
2720
23 Sep 2019: Our giving campaign is this week. <a href="https://blogs.cornell.edu/arxiv/2019/09/19/donate-to-arxiv-4/">Support arXiv with a donation!</a><br/>
2821
{%- endif -%}

0 commit comments

Comments
 (0)