Use vertical nav

This commit is contained in:
rubenwardy 2021-05-04 21:52:43 +01:00
parent a6ab2d6f79
commit a93eea8612
4 changed files with 37 additions and 33 deletions

View File

@ -25,6 +25,17 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if package %}
<h2 class="mt-0">{{ _("Edit Details") }}</h2>
{% else %}
<h2 class="mt-0">
{{ _("Create Package") }}
{% if author != current_user %}
for {{ author.display_name }}
{% endif %}
</h2>
{% endif %}
{% if not package %} {% if not package %}
<div class="alert alert-info"> <div class="alert alert-info">
<a class="float-right btn btn-sm btn-default" href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("View") }}</a> <a class="float-right btn btn-sm btn-default" href="{{ url_for('flatpage', path='policy_and_guidance') }}">{{ _("View") }}</a>

View File

@ -4,8 +4,8 @@
{{ _("Edit Maintainers") }} {{ _("Edit Maintainers") }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h2 class="mt-0">{{ _("Maintainers") }}</h2>
{% from "macros/forms.html" import render_submit_field, render_field %} {% from "macros/forms.html" import render_submit_field, render_field %}
<p> <p>
{{ _("Maintainers are given write access to the package.") }} {{ _("Maintainers are given write access to the package.") }}

View File

@ -1,40 +1,33 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block container %} {% block container %}
{% if tabs %} <main class="container mt-4">
<nav class="pt-4 tabs-container"> <div class="row">
<div class="container"> {% if tabs %}
<a class="float-right btn btn-primary" href="{{ package.getDetailsURL() }}"> <div class="col-md-3 mb-4">
{{ _("View Package") }} <div class="list-group">
</a> <a class="list-group-item list-group-item-action" href="{{ package.getDetailsURL() }}">
<h1 class="mb-5"> <span class="row m-0 p-0">
<a href="{{ package.getDetailsURL() }}"> <span class="col-auto m-0 p-0">
{{ package.title }} <img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ package.getThumbnailURL() }}" alt="Thumbnail" style="max-height: 20px;">
</span>
<span class="col m-0 p-0 pl-2">
{{ package.title }}
</span>
</span>
</a> </a>
</h1>
<ul class="nav nav-tabs">
{% for item in tabs %} {% for item in tabs %}
<li class="nav-item"> <a href="{{ item.url }}"
<a href="{{ item.url }}" class="nav-link {% if item.id == current_tab %}active{% endif %}"> class="list-group-item list-group-item-action {% if item.id == current_tab %}active{% endif %}">
{{ item.title }} {{ item.title }}
</a> </a>
</li>
{% endfor %} {% endfor %}
</ul> </div>
</div> </div>
</nav> {% endif %}
{% endif %} <div class="col {% if not tabs %}mt-4{% endif %}">
{% if tabs %}
<main class="container mt-5">
{{ self.content() }} {{ self.content() }}
</main> </div>
{% else %} </div>
<main class="container mt-4"> </main>
<h1 class="mb-4">{{ self.title() }}</h1>
{{ self.content() }}
</main>
{% endif %}
{% endblock %} {% endblock %}

View File

@ -6,7 +6,7 @@ Remove {{ package.title }}
{% block content %} {% block content %}
<form method="POST" action=""> <form method="POST" action="">
<h2>Remove {{ package.title }}</h2> <h2 class="mt-0">Remove {{ package.title }}</h2>
<p> <p>
In order to avoid data loss, you cannot permanently delete packages. In order to avoid data loss, you cannot permanently delete packages.
You can remove them from ContentDB, which will cause them to not be You can remove them from ContentDB, which will cause them to not be