Skip to content

Commit aad47c1

Browse files
committed
improve: show countries as multiple columns on the /countries page
Fix #604
1 parent 5c49160 commit aad47c1

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/main/java/ru/mystamps/web/feature/site/ResourceUrl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class ResourceUrl {
3232
public static final String STATIC_RESOURCES_URL = "https://stamps.filezz.ru";
3333

3434
// MUST be updated when any of our resources were modified
35-
public static final String RESOURCES_VERSION = "v0.4.5.5";
35+
public static final String RESOURCES_VERSION = "v0.4.5.6";
3636

3737
// CheckStyle: ignore LineLength for next 17 lines
3838
private static final String CATALOG_UTILS_JS = "/public/js/" + RESOURCES_VERSION + "/CatalogUtils.min.js";

src/main/webapp/WEB-INF/static/styles/main.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,25 @@ label {
151151
height: 200px;
152152
padding: 0;
153153
}
154+
155+
@media (min-width: 384px) { /* Extra Small devices (our custom) */
156+
.countries-list {
157+
column-count: 2;
158+
}
159+
}
160+
/* Media queries use values from Bootstrap (https://getbootstrap.com/docs/3.4/css/#grid-media-queries) */
161+
@media (min-width: 768px) { /* Small devices */
162+
.countries-list {
163+
column-count: 3;
164+
}
165+
}
166+
@media (min-width: 992px) { /* Medium devices */
167+
.countries-list {
168+
column-count: 4;
169+
}
170+
}
171+
@media (min-width: 1200px) { /* Large devices */
172+
.countries-list {
173+
column-count: 5;
174+
}
175+
}

src/main/webapp/WEB-INF/views/country/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ <h3 th:text="${#strings.capitalize(country_list)}">
7373
</a>
7474
</div>
7575

76-
<ul th:if="${not #lists.isEmpty(countries)}">
76+
<ul th:if="${not #lists.isEmpty(countries)}" class="countries-list">
7777
<li th:each="country : ${countries}">
7878
<a href="../country/info.html" th:href="@{${INFO_COUNTRY_PAGE}(slug=${country.slug})}" th:text="${country.name}">Italy</a>
7979
</li>

0 commit comments

Comments
 (0)