~edwargix/git.sr.ht

fc4ed75131f09f6ffaa90143fc6fb3747b272f69 — Drew DeVault 8 years ago 08031bc
Minor improvements
3 files changed, 16 insertions(+), 4 deletions(-)

M git/blueprints/cgit.py
M templates/cgit.html
M templates/layout.html
M git/blueprints/cgit.py => git/blueprints/cgit.py +4 -1
@@ 11,4 11,7 @@ upstream = cfg("cgit", "remote")
@cgit.route("/<user>/<repo>/<path:cgit_path>")
def cgit_passthrough(user, repo, cgit_path):
    r = requests.get("{}/{}".format(upstream, request.full_path))
    return render_template("cgit.html", cgit_html=r.text)
    return render_template("cgit.html",
            cgit_html=r.text,
            owner_name=user,
            repo_name=repo)

M templates/cgit.html => templates/cgit.html +11 -2
@@ 1,4 1,13 @@
{% extends "git.html" %}
{% block content %}
{% extends "layout.html" %}
{% block body %}
<div class="container">
  <div class="row">
    <div class="col-md-12">
      <h2>
        <a href="/{{ owner_name }}">{{ owner_name }}</a>/{{ repo_name }}
      </h2>
    </div>
  </div>
</div>
{{ cgit_html | safe }}
{% endblock %}

M templates/layout.html => templates/layout.html +1 -1
@@ 45,7 45,7 @@
      <div class="login pull-xs-right">
        <a href="/login">Log in</a>
        &mdash;
        <a href="/">Register</a>
        <a href="{{cfg("network", "meta")}}">Register</a>
      </div>
      {% endif %}
    </nav>