mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: refine map fragment card CSS
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
8c90535105
commit
54420568af
2 changed files with 39 additions and 34 deletions
|
@ -76,26 +76,8 @@ body.login header {
|
||||||
.demo_map .map_fragment {
|
.demo_map .map_fragment {
|
||||||
height: var(--map-fragment-height);
|
height: var(--map-fragment-height);
|
||||||
}
|
}
|
||||||
.map_list .legend {
|
.grid-container hgroup {
|
||||||
padding-top: 7px;
|
text-align: left;
|
||||||
margin-bottom: 28px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
.map_list .legend a {
|
|
||||||
color: #222;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.map_list .legend em,
|
|
||||||
.map_list .legend em a {
|
|
||||||
color: #444;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.map_list hr {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.map_list .wide + hr {
|
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
.umap-features-list ul {
|
.umap-features-list ul {
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
|
@ -189,7 +171,6 @@ h2.tabs a:hover {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: calc(var(--gutter) / 2 );
|
gap: calc(var(--gutter) / 2 );
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
.tag-list li {
|
.tag-list li {
|
||||||
border: 1px solid var(--color-darkBlue);
|
border: 1px solid var(--color-darkBlue);
|
||||||
|
@ -206,6 +187,27 @@ h2.tabs a:hover {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
.card {
|
||||||
|
border: 1px solid var(--color-lightGray);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding: var(--box-padding);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.card .button {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.card hgroup {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
gap: var(--gutter);
|
||||||
|
}
|
||||||
|
.card h3 {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* **************************** */
|
/* **************************** */
|
||||||
/* colors */
|
/* colors */
|
||||||
|
|
|
@ -1,22 +1,25 @@
|
||||||
{% load umap_tags i18n %}
|
{% load umap_tags i18n %}
|
||||||
|
|
||||||
{% for map_inst in maps %}
|
{% for map_inst in maps %}
|
||||||
<div>
|
<div class="card">
|
||||||
{% map_fragment map_inst prefix=prefix page=request.GET.p %}
|
{% map_fragment map_inst prefix=prefix page=request.GET.p %}
|
||||||
<hgroup>
|
<hgroup>
|
||||||
{% if map_inst.tags %}
|
<div>
|
||||||
<ul class="tag-list">
|
{% if map_inst.tags %}
|
||||||
{% for tag, label in map_inst.get_tags_display %}
|
<ul class="tag-list">
|
||||||
<li><a href="{% url 'search' %}?tags={{ tag }}">{{ label }}</a></li>
|
{% for tag, label in map_inst.get_tags_display %}
|
||||||
{% endfor %}
|
<li><a href="{% url 'search' %}?tags={{ tag }}">{{ label }}</a></li>
|
||||||
</ul>
|
{% endfor %}
|
||||||
{% endif %}
|
</ul>
|
||||||
<h3><a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a></h3>
|
|
||||||
{% with author=map_inst.get_author %}
|
|
||||||
{% if author %}
|
|
||||||
<p>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
<h3><a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a></h3>
|
||||||
|
{% with author=map_inst.get_author %}
|
||||||
|
{% if author %}
|
||||||
|
<p>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
<a class="button" href="{{ map_inst.get_absolute_url }}">{% translate "See the map" %}</a>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue