Improve package list design

This commit is contained in:
rubenwardy 2018-05-18 02:31:38 +01:00
parent 6711eb4afe
commit e45b4da09a
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C
3 changed files with 75 additions and 29 deletions

@ -22,10 +22,20 @@ a:hover {
.box { .box {
border-radius: 5px; border-radius: 5px;
margin: 15px 0; margin: 15px 0;
padding: 0;
}
.box h3 {
margin: 0;
padding: 1em 0.5em 0.5em 15px;
border-bottom: 1px solid #444;
}
.box p, .box table {
margin: 1em;
} }
.box_grey { .box_grey {
padding: 10px;
background: #333; background: #333;
border: 1px solid #444; border: 1px solid #444;
} }
@ -217,3 +227,50 @@ table.fancyTable tfoot td {
.EDITOR a, a.EDITOR { .EDITOR a, a.EDITOR {
color: #b6f; color: #b6f;
} }
/*
Aside
*/
.asideright {
float: right;
margin: 0 0 0 15px;
max-width: 300px;
}
.outsidecontainer {
position: absolute;
right: 102%;
top: 0;
width: intrinsic; /* Safari/WebKit uses a non-standard name */
width: -moz-max-content; /* Firefox/Gecko */
width: -webkit-max-content; /* Chrome */
}
@media (max-width: 1490px) {
.outsidecontainer {
display: none;
}
}
.flatlist, .flatlist li {
list-style: none;
padding: 0;
margin: 0;
}
.flatlist li {
display: block;
}
.flatlist a {
display: block;
padding: 0.5em 20px;
color: #ddd;
font-weight: normal;
}
.flatlist a:hover {
background: #444;
text-decoration: none;
}

@ -16,6 +16,8 @@ html, body {
main { main {
padding: 7px 0; padding: 7px 0;
position: relative;
box-sizing: border-box;
} }
header h1, header p, header form { header h1, header p, header form {
@ -44,9 +46,3 @@ footer a {
footer a:hover { footer a:hover {
color: #bbb; color: #bbb;
} }
.asideright {
float: right;
margin: 0 0 0 15px;
max-width: 300px;
}

@ -11,21 +11,10 @@
<input type="submit" value="Search" /> <input type="submit" value="Search" />
</form> </form>
<ul> <aside class="box box_grey outsidecontainer">
{% for p in packages %}
<li><a href="{{ p.getDetailsURL() }}">
{{ p.title }} by {{ p.author.display_name }}
</a></li>
{% else %}
<li><i>No packages available</i></ul>
{% endfor %}
</ul>
<h3>Tags</h3> <h3>Tags</h3>
<div class="box box_grey alert alert-warning">
Filtering by tag doesn't actually work yet! <ul class="flatlist">
</div>
<ul>
{% for t in tags %} {% for t in tags %}
<li><a href="{{ url_for('packages_page', q=(query or '')+' tag:'+t.name, type=type) }}"> <li><a href="{{ url_for('packages_page', q=(query or '')+' tag:'+t.name, type=type) }}">
{{ t.title }} {{ t.title }}
@ -34,4 +23,8 @@
<li><i>No tags available</i></ul> <li><i>No tags available</i></ul>
{% endfor %} {% endfor %}
</ul> </ul>
</aside>
{% from "macros/packagegridtile.html" import render_pkggrid %}
{{ render_pkggrid(packages) }}
{% endblock %} {% endblock %}