aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-05-29 17:12:20 +0300
committerGravatar Vitaly Takmazov2024-05-29 17:12:20 +0300
commitd6670eb2cd789f1c7191f460226e4a5f07759e5d (patch)
tree50d7fcde664a1551d9752426dc5c5d192eceefa0 /src/main
parentf99dad55bc2b2c0dc4ada8769b9630860fb1b2e8 (diff)
web: dim uri part from external recommendations
Diffstat (limited to 'src/main')
-rw-r--r--src/main/assets/style.css4
-rw-r--r--src/main/java/com/juick/service/MessagesServiceImpl.java2
-rw-r--r--src/main/resources/templates/views/thread.html2
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>