discourage search index bots

This commit is contained in:
rimu 2024-02-13 19:14:51 +13:00
parent c3266823ba
commit a66311d683
3 changed files with 14 additions and 14 deletions

View file

@ -1,14 +1,14 @@
<div class="btn-group mt-1 mb-2"> <div class="btn-group mt-1 mb-2">
<a href="/{{ type }}/hot" class="btn {{ 'btn-primary' if sort == 'hot' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="/{{ type }}/hot" class="btn {{ 'btn-primary' if sort == 'hot' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Hot') }} {{ _('Hot') }}
</a> </a>
<a href="/{{ type }}/top" class="btn {{ 'btn-primary' if sort == 'top' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="/{{ type }}/top" class="btn {{ 'btn-primary' if sort == 'top' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Top') }} {{ _('Top') }}
</a> </a>
<a href="/{{ type }}/new" class="btn {{ 'btn-primary' if sort == 'new' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="/{{ type }}/new" class="btn {{ 'btn-primary' if sort == 'new' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('New') }} {{ _('New') }}
</a> </a>
<a href="/{{ type }}/active" class="btn {{ 'btn-primary' if sort == 'active' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="/{{ type }}/active" class="btn {{ 'btn-primary' if sort == 'active' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Active') }} {{ _('Active') }}
</a> </a>
</div> </div>

View file

@ -4,28 +4,28 @@
</div> </div>
{% endif %} {% endif %}
<div class="btn-group mt-1 mb-2"> <div class="btn-group mt-1 mb-2">
<a href="?sort=hot&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == '' or sort == 'hot' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=hot&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == '' or sort == 'hot' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Hot') }} {{ _('Hot') }}
</a> </a>
<a href="?sort=top&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'top' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=top&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'top' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Top') }} {{ _('Top') }}
</a> </a>
<a href="?sort=new&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'new' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=new&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'new' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('New') }} {{ _('New') }}
</a> </a>
<a href="?sort=active&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'active' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=active&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'active' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Active') }} {{ _('Active') }}
</a> </a>
</div> </div>
{% if post_layout != '' and post_layout is not none %} {% if post_layout != '' and post_layout is not none %}
<div class="btn-group mt-1 mb-2 layout_switcher"> <div class="btn-group mt-1 mb-2 layout_switcher">
<a href="?layout=list&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == '' or post_layout == 'list' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?layout=list&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == '' or post_layout == 'list' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('List') }} {{ _('List') }}
</a> </a>
<a href="?layout=masonry&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?layout=masonry&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Tile') }} {{ _('Tile') }}
</a> </a>
<a href="?layout=masonry_wide&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry_wide' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?layout=masonry_wide&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry_wide' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Wide tile') }} {{ _('Wide tile') }}
</a> </a>
</div> </div>

View file

@ -54,13 +54,13 @@
<div id="post_replies" class="row"> <div id="post_replies" class="row">
<div class="col"> <div class="col">
<div class="btn-group mt-1 mb-2"> <div class="btn-group mt-1 mb-2">
<a href="?sort=hot#post_replies" title="{{ _('Sort by magic') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == '' or request.args.get('sort', '') == 'hot' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=hot#post_replies" title="{{ _('Sort by magic') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == '' or request.args.get('sort', '') == 'hot' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Hot') }} {{ _('Hot') }}
</a> </a>
<a href="?sort=top#post_replies" title="{{ _('Comments with the most upvotes') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'top' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=top#post_replies" title="{{ _('Comments with the most upvotes') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'top' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('Top') }} {{ _('Top') }}
</a> </a>
<a href="?sort=new#post_replies" title="{{ _('Show newest first') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'new' else 'btn-outline-secondary' }}" rel="nofollow"> <a href="?sort=new#post_replies" title="{{ _('Show newest first') }}" class="btn btn-sm {{ 'btn-primary' if request.args.get('sort', '') == 'new' else 'btn-outline-secondary' }}" rel="nofollow noindex">
{{ _('New') }} {{ _('New') }}
</a> </a>
</div> </div>