~edwargix/git.sr.ht

75bc61a031af9ce94f1adba31ddddb9c744b6ad2 — Drew DeVault 6 years ago 7855057
Apply redesign
3 files changed, 31 insertions(+), 19 deletions(-)

M gitsrht/blueprints/public.py
M gitsrht/templates/index.html
M scss/main.scss
M gitsrht/blueprints/public.py => gitsrht/blueprints/public.py +1 -1
@@ 19,7 19,7 @@ def index():
                .filter(Repository.owner_id == current_user.id)
                .filter(Repository.visibility != RepoVisibility.autocreated)
                .order_by(Repository.updated.desc())
                .limit(5)).all()
                .limit(10)).all()
    else:
        repos = None
    return render_template("index.html", repos=repos)

M gitsrht/templates/index.html => gitsrht/templates/index.html +29 -18
@@ 5,28 5,39 @@
    {% if current_user %}
    <div class="col-md-4">
      <p>
        Welcome back, {{ current_user.username }}!
      </p>
      <p>
        <a href="/create">Create new repository »</a>
        Welcome back, {{ current_user.username }}! This is the
        {{cfg("sr.ht", "site-name")}} git hosting service. Documentation
        for its use is
        <a href="https://man.sr.ht/git.sr.ht">available here</a>.
      </p>
      <a href="/create" class="btn btn-primary btn-block">
        Create new repository
        <i class="fa fa-caret-right"></i>
      </a>
    </div>
    <div class="col-md-6">
      {% if repos and len(repos) %}
      {% for repo in repos %}
        <h4>
          <a href="/~{{current_user.username}}/{{repo.name}}">
            ~{{current_user.username}}/{{repo.name}}
          </a>
        </h4>
        {% if repo.description %}
        <p>{{ repo.description }}</p>
        {% endif %}
        <p>
          <em class="text-muted">Last updated {{ repo.updated | date }}</em>
        </p>
      {% endfor %}
      More on <a href="/~{{current_user.username}}">your profile »</a>
      <div class="event-list">
        {% for repo in repos %}
        <div class="event">
          <h4>
            <a href="/~{{current_user.username}}/{{repo.name}}">
              ~{{current_user.username}}/{{repo.name}}
            </a>
            <small class="pull-right">
              {{ repo.updated | date }}
            </small>
          </h4>
          {% if repo.description %}
          <p>{{ repo.description }}</p>
          {% endif %}
        </div>
        {% endfor %}
      </div>
      <a href="/~{{current_user.username}}" class="btn btn-default pull-right">
        More on your profile
        <i class="fa fa-caret-right"></i>
      </a>
      {% endif %}
    </div>
    {% else %}

M scss/main.scss => scss/main.scss +1 -0
@@ 1,4 1,5 @@
@import "base";
@import "font-awesome.min";
@import "cgit";

.filter-repos {