mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Use CSS grid for package tiles
This commit is contained in:
parent
800cacb003
commit
bf20177756
@ -262,3 +262,21 @@ pre {
|
||||
}
|
||||
|
||||
@import "dracula.scss";
|
||||
|
||||
.grid-2 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
|
||||
.gap-2 {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.gap-3 {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
@ -1,11 +1,4 @@
|
||||
.packagetile {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 7px 7px 0;
|
||||
min-width: 250px;
|
||||
}
|
||||
|
||||
li.d-flex {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -16,7 +16,7 @@
|
||||
{%- endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/static/libs/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=40">
|
||||
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=41">
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/static/opensearch.xml" title="ContentDB" />
|
||||
|
||||
{% if noindex -%}
|
||||
|
@ -38,16 +38,11 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_pkggrid(packages, show_author=True) -%}
|
||||
<ul class="d-flex p-0 flex-row flex-wrap justify-content-start align-content-start ">
|
||||
<ul class="grid-4 gap-2 p-0">
|
||||
{% for p in packages %}
|
||||
{{ render_pkgtile(p, show_author) }}
|
||||
{% else %}
|
||||
<li class="packagetile flex-fill"><i>{{ _("No packages available") }}</i></li>
|
||||
<li class="packagetile"><i>{{ _("No packages available") }}</i></li>
|
||||
{% endfor %}
|
||||
{% if packages %}
|
||||
{% for i in range(4) %}
|
||||
<li class="packagetile flex-fill"></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
|
Loading…
Reference in New Issue
Block a user