Skip to content

Commit

Permalink
Merge pull request #787 from arXiv/ARXIVCE-2705-nofollow-abs-page-links
Browse files Browse the repository at this point in the history
no follow to certain links on abs pages
  • Loading branch information
kyokukou authored Oct 31, 2024
2 parents 76faf2c + 8f2bc2d commit 4f3a311
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions browse/templates/abs/abs.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1>{% if abs_meta.primary_archive.id != abs_meta.primary_category.id %}{{ abs_m
)
}}
<div class="submission-history">
<h2>Submission history</h2> From: {{ abs_meta.submitter.name|tex2utf if abs_meta.submitter.name != None }} [<a href="/show-email/{{ abs_meta.arxiv_id|show_email_hash }}/{{ abs_meta.arxiv_id }}">view email</a>]
<h2>Submission history</h2> From: {{ abs_meta.submitter.name|tex2utf if abs_meta.submitter.name != None }} [<a href="/show-email/{{ abs_meta.arxiv_id|show_email_hash }}/{{ abs_meta.arxiv_id }}" rel="nofollow">view email</a>]
{#- Extra message for proxy sites (i.e. Proxy line has username and id) -#}
{#- TODO: revisit this. Logic for display follows classic but is strange; sometimes a proxy is just a person's name. -#}
{% if abs_meta.proxy != None %}&nbsp;[via {% if abs_meta.proxy|wordcount == 1 or abs_meta.proxy.startswith('ccsd') %}{{ abs_meta.proxy.split()[0]|upper }} proxy{% else %}{{ abs_meta.proxy|tex2utf }} as proxy{% endif %}]{% endif %}
Expand All @@ -93,7 +93,7 @@ <h2>Submission history</h2> From: {{ abs_meta.submitter.name|tex2utf if abs_meta
{% endif %}

<div class="endorsers">
<a href="{{ url_for('.show_endorsers',arxiv_id=abs_meta.arxiv_id) }}" class="endorser-who">Which authors of this paper are endorsers?</a> |
<a href="{{ url_for('.show_endorsers',arxiv_id=abs_meta.arxiv_id) }}" class="endorser-who" rel="nofollow">Which authors of this paper are endorsers?</a> |
<a id="mathjax_toggle" href="javascript:setMathjaxCookie()">Disable MathJax</a> (<a href="{{ url_for('help_mathjax') }}">What is MathJax?</a>)
<span class="help" style="font-style: normal; float: right; margin-top: 0; margin-right: 1em;"></span>
</div>
Expand All @@ -115,7 +115,7 @@ <h2>Submission history</h2> From: {{ abs_meta.submitter.name|tex2utf if abs_meta
{%- if version_entry.version == this_version -%}
<strong>[v{{ version_entry.version }}]</strong>
{% else %}
<strong><a href="{{ url_for('.abstract', arxiv_id='{}v{}'.format(abs_meta.arxiv_id, version_entry.version)) }}">[v{{ version_entry.version }}]</a></strong>
<strong><a href="{{ url_for('.abstract', arxiv_id='{}v{}'.format(abs_meta.arxiv_id, version_entry.version)) }}" rel="nofollow">[v{{ version_entry.version }}]</a></strong>
{% endif %}
{%- endmacro -%}

Expand Down
2 changes: 1 addition & 1 deletion browse/templates/abs/author_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- if part is string -%}
{{- part -}}
{%- else -%}
<a href="{{ url_for('search_archive', searchtype='author', archive=abs_meta.primary_archive.id, query=part[1]) }}">{{ part[0] }}</a>
<a href="{{ url_for('search_archive', searchtype='author', archive=abs_meta.primary_archive.id, query=part[1]) }}" rel="nofollow">{{ part[0] }}</a>
{%- endif -%}
{% endfor %}
{%- endmacro -%}
Expand Down
14 changes: 7 additions & 7 deletions browse/templates/abs/extra_services.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
{% if browse_context_previous_url -%}
<span class="arrow">
<a class="abs-button prev-url" href="{{browse_context_previous_url }}"
accesskey="p" title="previous in {{ browse_context }} (accesskey p)">&lt;&nbsp;prev</a>
accesskey="p" title="previous in {{ browse_context }} (accesskey p)" rel="nofollow">&lt;&nbsp;prev</a>
</span>
<span class="is-hidden-mobile">&nbsp; | &nbsp;</span>
{%- else -%}
Expand All @@ -84,7 +84,7 @@
{% if browse_context_next_url %}
<span class="arrow">
<a class="abs-button next-url" href="{{browse_context_next_url}}" accesskey="n"
title="next in {{ browse_context }} (accesskey n)">next&nbsp;&gt;</a>
title="next in {{ browse_context }} (accesskey n)" rel="nofollow">next&nbsp;&gt;</a>
</span>
{%- else -%}
<span class="abs-button next-url" class="nolink">next article&nbsp;&gt;</span>
Expand All @@ -95,12 +95,12 @@
{%- if browse_context != 'arxiv' -%}
{#- This fixes a bug in the classic UI logic -#}
<div class="list">
<a class="abs-button abs-button-grey abs-button-small context-new" href="{{url_for('.list_articles',context=browse_context, subcontext='new')}}">new</a>
<a class="abs-button abs-button-grey abs-button-small context-new" href="{{url_for('.list_articles',context=browse_context, subcontext='new')}}" rel="nofollow">new</a>
<span class="is-hidden-mobile"> | </span>
<a class="abs-button abs-button-grey abs-button-small context-recent" href="{{url_for('.list_articles',context=browse_context, subcontext='recent')}}">recent</a>
<a class="abs-button abs-button-grey abs-button-small context-recent" href="{{url_for('.list_articles',context=browse_context, subcontext='recent')}}" rel="nofollow">recent</a>
<span class="is-hidden-mobile"> | </span>
{%- set yyyymm = '%04d-%02d' % (abs_meta.arxiv_identifier.year, abs_meta.arxiv_identifier.month) -%}
<a class="abs-button abs-button-grey abs-button-small context-id" href="{{url_for('.list_articles',context=browse_context, subcontext=yyyymm)}}">
<a class="abs-button abs-button-grey abs-button-small context-id" href="{{url_for('.list_articles',context=browse_context, subcontext=yyyymm)}}" rel="nofollow">
{{- yyyymm -}}</a>
</div>
{%- endif -%}
Expand All @@ -112,9 +112,9 @@
{% for category in abs_meta.get_browse_context_list() if not (browse_context==category) %}
{%- set switch_url = url_for('browse.abstract', arxiv_id=abs_meta.arxiv_identifier.id, context=category) -%}
{% if '.' in category %}
<a class="subclass" href="{{ switch_url}}">{{ category }}</a><br class="is-hidden-mobile">
<a class="subclass" href="{{ switch_url}}" rel="nofollow">{{ category }}</a><br class="is-hidden-mobile">
{% else %}
<a href="{{ switch_url}}">{{ category }}</a><br class="is-hidden-mobile">
<a href="{{ switch_url}}" rel="nofollow">{{ category }}</a><br class="is-hidden-mobile">
{% endif %}
{% endfor %}
</div>
Expand Down

0 comments on commit 4f3a311

Please sign in to comment.