Add 'plain' link from blobs to nav bar
Diff
templates/base.html | 10 ++++++++++
statics/sass/style.scss | 5 +++++
templates/repo/base.html | 22 +++++++++++++++++++---
templates/repo/file.html | 4 ++++
4 files changed, 33 insertions(+), 8 deletions(-)
@@ -18,7 +18,15 @@
{%- block nav -%}
<nav>
<a href="/" class="active">index</a>
<div>
<a href="/" class="active">index</a>
</div>
<div class="grow"></div>
<div>
{%- block extra_nav_links %}{% endblock %}
</div>
</nav>
{%- endblock -%}
@@ -28,6 +28,11 @@
nav {
margin-top: 2rem;
border-bottom: solid 3px #ccc;
display: flex;
.grow {
flex-grow: 1;
}
@media (prefers-color-scheme: dark) {
border-bottom-color: $darkModeHighlightColour;
@@ -8,12 +8,20 @@
{% block nav %}
<nav>
<a href="/{{ repo.display() }}/about" class="{% block about_nav_class %}{% endblock %}">about</a>
<a href="/{{ repo.display() }}" class="{% block summary_nav_class %}{% endblock %}">summary</a>
<a href="/{{ repo.display() }}/refs" class="{% block refs_nav_class %}{% endblock %}">refs</a>
<a href="/{{ repo.display() }}/log" class="{% block log_nav_class %}{% endblock %}">log</a>
<a href="/{{ repo.display() }}/tree" class="{% block tree_nav_class %}{% endblock %}">tree</a>
<a href="/{{ repo.display() }}/commit" class="{% block commit_nav_class %}{% endblock %}">commit</a>
<a href="/{{ repo.display() }}/diff" class="{% block diff_nav_class %}{% endblock %}">diff</a>
<div>
<a href="/{{ repo.display() }}/about" class="{% block about_nav_class %}{% endblock %}">about</a>
<a href="/{{ repo.display() }}" class="{% block summary_nav_class %}{% endblock %}">summary</a>
<a href="/{{ repo.display() }}/refs" class="{% block refs_nav_class %}{% endblock %}">refs</a>
<a href="/{{ repo.display() }}/log" class="{% block log_nav_class %}{% endblock %}">log</a>
<a href="/{{ repo.display() }}/tree" class="{% block tree_nav_class %}{% endblock %}">tree</a>
<a href="/{{ repo.display() }}/commit" class="{% block commit_nav_class %}{% endblock %}">commit</a>
<a href="/{{ repo.display() }}/diff" class="{% block diff_nav_class %}{% endblock %}">diff</a>
</div>
<div class="grow"></div>
<div>
{%- block extra_nav_links %}{% endblock %}
</div>
</nav>
{% endblock %}
@@ -7,6 +7,10 @@
{% block tree_nav_class %}active{% endblock %}
{% block extra_nav_links %}
<a href="?raw=true">plain</a>
{% endblock %}
{% block content %}
<pre>{{ file.content|safe }}</pre>
{% endblock %}