style: Apply merit list style from notifications.liquid
This commit is contained in:
1 parent
0d7d7eb159
commit
5259d42716
1 file changed
+35
-46
@@ -149,62 +149,51 @@
|
||||
{% if user_merit_events.size > 0 %}
|
||||
<ul class="space-y-4">
|
||||
{% for event in user_merit_events %}
|
||||
<li class="flex items-start space-x-3 p-3 border border-gray-200 rounded-md bg-white/50">
|
||||
<div class="flex-shrink-0 pt-1">
|
||||
{% if event.type == 'upvote' %}
|
||||
<i class="fas fa-arrow-up text-green-500 fa-fw" title="Upvote"></i>
|
||||
{% elsif event.type == 'comment' %}
|
||||
<i class="fas fa-comment text-blue-500 fa-fw" title="Comment"></i>
|
||||
{% elsif event.type == 'post' %}
|
||||
<i class="fas fa-file-alt text-purple-500 fa-fw" title="Post"></i>
|
||||
{% else %}
|
||||
<i class="fas fa-star text-yellow-500 fa-fw" title="Merit"></i>
|
||||
{% endif %}
|
||||
<div class="pb-4 mb-4 border-b border-border-light">
|
||||
<small class="text-sm mb-1 block">
|
||||
<a href="/user/{{ event.username }}" class="text-primary font-action hover:underline">{{ event.username }}</a>
|
||||
<span class="text-text-muted opacity-75">{{ event.action }}</span>
|
||||
<a href="{{ event.content_url }}" class="text-primary font-action hover:underline">"{{ event.content_title | truncate: 50 }}"</a>
|
||||
<span class="text-text-muted text-xs opacity-75 ml-1">{{ event.date | date: "%b %d, %Y %I:%M %p" }}</span>
|
||||
</small>
|
||||
</div>
|
||||
<div class="flex-grow">
|
||||
<p class="text-sm font-medium text-primary">
|
||||
<span class="font-bold text-green-600">+{{ event.amount | default: 1 }} Merit</span>
|
||||
{% if event.reason %} - {{ event.reason }}{% endif %}
|
||||
{% if event.content_title %}
|
||||
on <a href="{{ event.content_url }}" class="hover:underline">"{{ event.content_title | truncate: 50 }}"</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="text-xs text-text-muted">{{ event.date | date: "%b %d, %Y %I:%M %p" }}</p>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<!-- Static Examples for Demonstration -->
|
||||
<ul class="space-y-4">
|
||||
<li class="flex items-start space-x-3 p-3 border border-gray-200 rounded-md bg-white/50">
|
||||
<div class="flex-shrink-0 pt-1"><i class="fas fa-arrow-up text-green-500 fa-fw" title="Upvote"></i></div>
|
||||
<div class="flex-grow">
|
||||
<p class="text-sm font-medium text-primary"><span class="font-bold text-green-600">+1 Merit</span> - Upvote received on post <a href="#" class="hover:underline">"Found the perfect focus playlist"</a></p>
|
||||
<p class="text-xs text-text-muted">May 04, 2025 10:30 AM</p>
|
||||
<div class="pb-4 mb-4 border-b border-border-light">
|
||||
<small class="text-sm mb-1 block">
|
||||
<a href="/user/user123" class="text-primary font-action hover:underline">user123</a>
|
||||
<span class="text-text-muted opacity-75">upvoted your post:</span>
|
||||
<a href="/single-post/1" class="text-primary font-action hover:underline">"Found the perfect focus playlist"</a>
|
||||
<span class="text-text-muted text-xs opacity-75 ml-1">May 04, 2025 10:30 AM</span>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex items-start space-x-3 p-3 border border-gray-200 rounded-md bg-white/50">
|
||||
<div class="flex-shrink-0 pt-1"><i class="fas fa-comment text-blue-500 fa-fw" title="Comment"></i></div>
|
||||
<div class="flex-grow">
|
||||
<p class="text-sm font-medium text-primary"><span class="font-bold text-green-600">+2 Merits</span> - New comment on your post <a href="#" class="hover:underline">"My standing desk setup"</a></p>
|
||||
<p class="text-xs text-text-muted">May 03, 2025 08:15 PM</p>
|
||||
<div class="pb-4 mb-4 border-b border-border-light">
|
||||
<small class="text-sm mb-1 block">
|
||||
<a href="/user/anotherUser" class="text-primary font-action hover:underline">anotherUser</a>
|
||||
<span class="text-text-muted opacity-75">commented on your post:</span>
|
||||
<a href="/single-post/2" class="text-primary font-action hover:underline">"My standing desk setup"</a>
|
||||
<span class="text-text-muted text-xs opacity-75 ml-1">May 03, 2025 08:15 PM</span>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex items-start space-x-3 p-3 border border-gray-200 rounded-md bg-white/50">
|
||||
<div class="flex-shrink-0 pt-1"><i class="fas fa-file-alt text-purple-500 fa-fw" title="Post"></i></div>
|
||||
<div class="flex-grow">
|
||||
<p class="text-sm font-medium text-primary"><span class="font-bold text-green-600">+5 Merits</span> - Created new post <a href="#" class="hover:underline">"The best ergonomic accessories..."</a></p>
|
||||
<p class="text-xs text-text-muted">May 02, 2025 11:00 AM</p>
|
||||
<div class="pb-4 mb-4 border-b border-border-light">
|
||||
<small class="text-sm mb-1 block">
|
||||
<a href="/user/helpfulHannah" class="text-primary font-action hover:underline">helpfulHannah</a>
|
||||
<span class="text-text-muted opacity-75">created a new post:</span>
|
||||
<a href="/single-post/3" class="text-primary font-action hover:underline">"The best ergonomic accessories..."</a>
|
||||
<span class="text-text-muted text-xs opacity-75 ml-1">May 02, 2025 11:00 AM</span>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
<li class="flex items-start space-x-3 p-3 border border-gray-200 rounded-md bg-white/50">
|
||||
<div class="flex-shrink-0 pt-1"><i class="fas fa-arrow-up text-green-500 fa-fw" title="Upvote"></i></div>
|
||||
<div class="flex-grow">
|
||||
<p class="text-sm font-medium text-primary"><span class="font-bold text-green-600">+1 Merit</span> - Upvote received on comment for <a href="#" class="hover:underline">"Office plants that actually survive..."</a></p>
|
||||
<p class="text-xs text-text-muted">May 01, 2025 09:45 AM</p>
|
||||
<div class="pb-4 mb-4 border-b border-border-light">
|
||||
<small class="text-sm mb-1 block">
|
||||
<a href="/user/techGuru" class="text-primary font-action hover:underline">techGuru</a>
|
||||
<span class="text-text-muted opacity-75">upvoted your comment on:</span>
|
||||
<a href="/single-post/4#comment-5" class="text-primary font-action hover:underline">"Office plants that actually survive..."</a>
|
||||
<span class="text-text-muted text-xs opacity-75 ml-1">May 01, 2025 09:45 AM</span>
|
||||
</small>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- End Static Examples -->
|
||||
{% endif %}
|
||||
|
||||
Reference in new issue
Block a user