diff --git a/umap/static/umap/base.css b/umap/static/umap/base.css index 4bf1ce0a..803c5068 100644 --- a/umap/static/umap/base.css +++ b/umap/static/umap/base.css @@ -84,6 +84,11 @@ hgroup { hgroup > :not(:first-child):last-child { font-weight: normal; } +hgroup p, +hgroup button { + margin: 0; +} + /* * List @@ -158,10 +163,23 @@ dt { } .grid-container { display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); + --grid-layout-gap: calc(var(--gutter) * 2); + --grid-column-count: 3; + --grid-item--min-width: 300px; + + /** + * Calculated values. + */ + --gap-count: calc(var(--grid-column-count) - 1); + --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap)); + --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count)); + + grid-template-columns: repeat(auto-fill, minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr)); + grid-gap: var(--grid-layout-gap); } .grid-container.by4 { - grid-template-columns: repeat(4, minmax(0, 1fr)); + --grid-column-count: 4; + --grid-item--min-width: 60px; } .grid-container > * { text-align: center; diff --git a/umap/static/umap/content.css b/umap/static/umap/content.css index 3aad3eff..64687adf 100644 --- a/umap/static/umap/content.css +++ b/umap/static/umap/content.css @@ -56,9 +56,9 @@ body.login header { .map_fragment { width: 100%; } -.map_list .map_fragment, +.map_fragment, .demo_map .map_fragment { - height: 210px; + height: var(--map-fragment-height); } .map_list .legend { padding-top: 7px; @@ -164,6 +164,9 @@ h2.tabs a:hover { color: #efefef; text-decoration: underline; } +.more_button { + min-height: var(--map-fragment-height); +} /* **************************** */ diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 9becf5c5..998d8d12 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -660,10 +660,6 @@ a.umap-control-caption, .umap-caption .header i.icon { flex-shrink: 0; } -.umap-caption hgroup p, -.umap-caption hgroup button { - margin: 0; -} .umap-browser .main-toolbox { padding-left: 4px; /* Align with toolbox below */ border-top: 1px solid var(--color-mediumGray); diff --git a/umap/static/umap/vars.css b/umap/static/umap/vars.css index af30d376..68df8ee3 100644 --- a/umap/static/umap/vars.css +++ b/umap/static/umap/vars.css @@ -45,6 +45,7 @@ --box-margin: 14px; --text-margin: 7px; --dialog-width: 40vw; + --map-fragment-height: 210px; /* z-indexes (leaflet CSS sets the map at 400 by default) */ --zindex-alert: 500; diff --git a/umap/templates/auth/user_detail.html b/umap/templates/auth/user_detail.html index 0c47e768..5a9b3a4d 100644 --- a/umap/templates/auth/user_detail.html +++ b/umap/templates/auth/user_detail.html @@ -13,7 +13,7 @@
{% trans "by" %} {{ author }}
{% endif %} {% endwith %} -