diff options
author | Vitaly Takmazov | 2024-05-29 17:12:20 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-05-29 17:12:20 +0300 |
commit | d6670eb2cd789f1c7191f460226e4a5f07759e5d (patch) | |
tree | 50d7fcde664a1551d9752426dc5c5d192eceefa0 | |
parent | f99dad55bc2b2c0dc4ada8769b9630860fb1b2e8 (diff) |
web: dim uri part from external recommendations
-rw-r--r-- | src/main/assets/style.css | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/service/MessagesServiceImpl.java | 2 | ||||
-rw-r--r-- | src/main/resources/templates/views/thread.html | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/main/assets/style.css b/src/main/assets/style.css index f5e4ef00..1172b3f0 100644 --- a/src/main/assets/style.css +++ b/src/main/assets/style.css @@ -443,6 +443,10 @@ article .tags > a::before, padding: 0 10px; } +.dimmed { + color: var(--dimmed-link-color); +} + .l .msg-button { padding: 12px; } diff --git a/src/main/java/com/juick/service/MessagesServiceImpl.java b/src/main/java/com/juick/service/MessagesServiceImpl.java index b1b50f2a..bad080a0 100644 --- a/src/main/java/com/juick/service/MessagesServiceImpl.java +++ b/src/main/java/com/juick/service/MessagesServiceImpl.java @@ -522,7 +522,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ user.setUri(uri); String path = uri.getPath(); String name = path.substring(path.lastIndexOf('/') + 1); - user.setName(name + "@" + uri.getHost()); + user.setName(name); } return new ImmutablePair<>(rs.getInt(1), user); }); diff --git a/src/main/resources/templates/views/thread.html b/src/main/resources/templates/views/thread.html index 9aad1ce5..ab751294 100644 --- a/src/main/resources/templates/views/thread.html +++ b/src/main/resources/templates/views/thread.html @@ -116,7 +116,7 @@ {% if rec.uri.toString() is empty %} <a href="/{{ rec.name }}/">@{{ rec.name }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %} {% else %} - <a href="{{ rec.uri }}">@{{ rec.name }}</a>{% if loop.index < (loop.length - 1) %}, {% endif %} + <a href="{{ rec.uri }}">@{{ rec.name }}<span class="dimmed">@{{ rec.uri.host }}</span></a>{% if loop.index < (loop.length - 1) %}, {% endif %} {% endif %} {% endfor %} </div> |