diff options
Diffstat (limited to 'pastepy/templates/view.html')
-rw-r--r-- | pastepy/templates/view.html | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/pastepy/templates/view.html b/pastepy/templates/view.html index b0b114c..8cf60cd 100644 --- a/pastepy/templates/view.html +++ b/pastepy/templates/view.html @@ -1,28 +1,35 @@ {% extends "base.html" %} {% block head %} - <link rel="StyleSheet" href="{{ url_for('.highlight_stylesheet') }}" type="text/css"> - <script type="text/javascript" src="{{ url_for('static', filename='view.js') }}"></script> + <link rel="StyleSheet" href="{{ url_for('.highlight_stylesheet') }}" type="text/css" id="pygments-css"> + <script type="text/javascript" src="{{ url_for('static', filename='js/view.js') }}"></script> +{% endblock %} +{% block nav %} +<ul class="navbar-nav mr-auto"> + <li class="nav-item"><a href="{{ url_for('.paste') }}" class="nav-link">New paste</a></li> + {% if hash %} + <li class="nav-item active"><a href="{{ url_for('.view_paste', paste_hash=hash) }}" class="nav-link">View {{ pastetitle }}</a></li> + {% endif %} +</ul> {% endblock %} {% block content %} - <p><a href="/">New paste</a></p> - <div id="paste"> - <h3>{{ pastetitle }}</h3> - <div id="info">Pasted by <span id="nick">{{ nick }}</span> on <span id="date">{{date }}</span> - {% if syntax %} as <span id="syntax-type">{{ syntax }}</span>{% endif %} - </div> - <div id="alt-links"> - {% if hash %} - <a href="/raw/{{ hash }}">Download as plain text</a> - — - <a href="/full/{{ hash }}">View in fullscreen</a> - {% endif %} - </div> - {% if rendered %} - <div class="paste-rendered"> - {% endif %} - {{ text|safe }} - {% if rendered %} - </div> - {% endif %} - </div> +<h1>{{ pastetitle }}</h1> +<div class="paste-header"> + <div id="info">Pasted by <span id="nick">{{ nick }}</span> on <span id="date">{{date }}</span> + {% if syntax %} as <span id="syntax-type">{{ syntax }}</span>{% endif %} + </div> + <div id="alt-links"> + {% if hash %} + <a href="/raw/{{ hash }}">Download as plain text</a> + — + <a href="/full/{{ hash }}">View in fullscreen</a> + {% endif %} + </div> +</div> +{% if rendered %} +<div class="paste-rendered"> +{% endif %} +{{ text|safe }} +{% if rendered %} +</div> +{% endif %} {% endblock %} |