From 6dc2dccddbcd8a83a757e6131bf08590265d1bec Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 17 Apr 2018 12:26:23 +0300 Subject: www: reduce tags cloud and its layout --- .../src/main/java/com/juick/service/TagServiceImpl.java | 4 +--- juick-www/src/main/assets/style.css | 16 ++++++++++++---- .../resources/templates/views/partial/homecolumn.html | 6 ++++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java index 63e07bd2..0e371ab5 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java @@ -175,9 +175,7 @@ public class TagServiceImpl extends BaseJdbcService implements TagService { @Override public List getPopularTags() { return getJdbcTemplate().queryForList( - "SELECT name FROM tags WHERE top=1 ORDER BY name ASC", String.class) - .stream() - .collect(Collectors.toList()); + "select name from tags where noindex=0 order by stat_messages desc limit 20", String.class); } @Transactional(readOnly = true) diff --git a/juick-www/src/main/assets/style.css b/juick-www/src/main/assets/style.css index 0101a640..34e990fd 100644 --- a/juick-www/src/main/assets/style.css +++ b/juick-www/src/main/assets/style.css @@ -234,11 +234,12 @@ body > header { #column .margtop { margin-top: 15px; } -#column p { - font-size: 10pt; - line-height: 140%; -} + #column .tags { + background: #fff; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.16); + line-height: 140%; + padding: 6px; text-align: justify; } #column .inp { @@ -248,6 +249,13 @@ body > header { padding: 4px; width: 222px; } +#column .tags h4 { + background: #eee; + border: 1px solid #eee; + color: #888; + display: block; + text-align: center; +} #ctitle { font-size: 14pt; } diff --git a/juick-www/src/main/resources/templates/views/partial/homecolumn.html b/juick-www/src/main/resources/templates/views/partial/homecolumn.html index 6142e9e9..1de734e4 100644 --- a/juick-www/src/main/resources/templates/views/partial/homecolumn.html +++ b/juick-www/src/main/resources/templates/views/partial/homecolumn.html @@ -15,9 +15,11 @@ -

+

+

Темы

{% include "views/partial/tags" %} {% if showAdv | default(false) %} +

Наши друзья

конструктор сайтов {% endif %} -

\ No newline at end of file +
\ No newline at end of file -- cgit v1.2.3