pyfedi/app/templates/community/_community_nav.html

32 lines
1.6 KiB
HTML
Raw Normal View History

2024-01-28 18:11:32 +13:00
{% if community %}
<div class="mobile_create_post d-md-none mt-1">
<a class="btn btn-primary" href="/community/{{ community.link() }}/submit">{{ _('Create post') }}</a>
</div>
{% endif %}
2024-01-03 20:14:39 +13:00
<div class="btn-group mt-1 mb-2">
2024-01-21 20:20:40 +13:00
<a href="?sort=hot&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == '' or sort == 'hot' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-03 20:14:39 +13:00
{{ _('Hot') }}
</a>
2024-01-21 20:20:40 +13:00
<a href="?sort=top&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'top' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-03 20:14:39 +13:00
{{ _('Top') }}
</a>
2024-01-21 20:20:40 +13:00
<a href="?sort=new&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'new' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-03 20:14:39 +13:00
{{ _('New') }}
</a>
2024-01-21 20:20:40 +13:00
<a href="?sort=active&layout={{ post_layout }}" class="btn {{ 'btn-primary' if sort == 'active' else 'btn-outline-secondary' }}" rel="nofollow">
{{ _('Active') }}
</a>
2024-01-21 15:44:13 +13:00
</div>
2024-01-21 17:12:38 +13:00
{% if post_layout != '' and post_layout is not none %}
2024-01-21 15:44:13 +13:00
<div class="btn-group mt-1 mb-2 layout_switcher">
2024-01-21 20:20:40 +13:00
<a href="?layout=list&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == '' or post_layout == 'list' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-21 15:44:13 +13:00
{{ _('List') }}
</a>
2024-01-21 20:20:40 +13:00
<a href="?layout=masonry&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-21 15:44:13 +13:00
{{ _('Tile') }}
</a>
2024-01-21 20:20:40 +13:00
<a href="?layout=masonry_wide&sort={{ sort }}" class="btn {{ 'btn-primary' if post_layout == 'masonry_wide' else 'btn-outline-secondary' }}" rel="nofollow">
2024-01-21 15:44:13 +13:00
{{ _('Wide tile') }}
</a>
</div>
{% endif %}