ref: 8e84488f43fdf61e862cf63a2a78f810343e42d5 paste.sr.ht/pastesrht/templates/paste-base.html -rw-r--r-- 924 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% macro link(endpoint, title) %}
<a
  class="nav-link {% if request.endpoint.split('.')[-1] == endpoint[1:] %}active{% endif %}"
  href="{{ url_for(endpoint, user=paste.user.username, sha=paste.sha) }}"
>{{ title }}</a>
{% endmacro %}
{% extends "layout-full.html" %}
{% block body %}
<div class="header-tabbed">
  <div class="container-fluid">
    <ul class="nav nav-tabs">
      <h2>
        {{ paste.user.canonical_name -}}/
        {%- if len(paste.files) == 1 -%}
        {{paste.files[0].filename or paste.sha[:7]}}
        {%- else -%}
        {{paste.sha[:7]}}
        {%- endif %}
      </h2>
      <li class="nav-item">
        {{ link(".paste_GET", "view paste") }}
      </li>
      {%- if current_user.id == paste.user_id -%}
      <li class="nav-item">
        {{ link(".paste_manage", "manage") }}
      </li>
      {%- endif %}
    </ul>
  </div>
</div>
{% block paste_body %}
{% endblock %}
{% endblock %}