Files
project-behind-the-desk/_includes/leaderboard.liquid
T

159 lines
10 KiB
Plaintext

<div class="max-w-screen-lg mx-auto px-4 py-8">
<h1 class="text-3xl font-bold text-text-title mb-6 pb-4 border-b border-gray-200">Leaderboard</h1>
<!-- Tabs Navigation -->
<div class="mb-4 border-b border-gray-200">
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
<a href="#tab-merits" class="group whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
border-primary text-primary [&:not(:target):not(:has(~:target))]:border-primary [&:not(:target):not(:has(~:target))]:text-primary
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Merits
</a>
<a href="#tab-new-users" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
New Users
</a>
<a href="#tab-most-posts" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Most Posts
</a>
<a href="#tab-most-comments" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Most Comments
</a>
<a href="#tab-most-votes" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Most Votes
</a>
</nav>
</div>
<!-- Sub-Tabs Navigation -->
<div class="mb-4 border-b border-gray-200">
<nav class="-mb-px flex space-x-8" aria-label="Sub-Tabs">
<a href="#sub-tab-week" class="group whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
border-primary text-primary [&:not(:target):not(:has(~:target))]:border-primary [&:not(:target):not(:has(~:target))]:text-primary
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Week
</a>
<a href="#sub-tab-month" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Month
</a>
<a href="#sub-tab-quarter" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Quarter
</a>
<a href="#sub-tab-year" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
Year
</a>
<a href="#sub-tab-all-time" class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm
[&:target]:border-primary [&:target]:text-primary
[&:not(:target)]:border-transparent [&:not(:target)]:text-gray-500 [&:not(:target)]:hover:text-gray-700 [&:not(:target)]:hover:border-gray-300">
All-time
</a>
</nav>
</div>
<!-- Tab Content Panes -->
<div class="space-y-6">
<div id="tab-merits" class="block [&:not(:target)]:hidden [&:not(:target):not(:has(~:target))]:block space-y-6">
<div id="sub-tab-week" class="block [&:not(:target)]:hidden [&:not(:target):not(:has(~:target))]:block space-y-6">
<!-- Users Grid for Merits - Week -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{% assign users = site.data.users %}
{% for user in users %}
<div class="bg-white p-4 rounded-md shadow-md">
<div class="flex items-center space-x-4">
<img src="{{ user.avatar_url }}" alt="User Avatar" class="w-12 h-12 rounded-full">
<div>
<h3 class="text-lg font-bold text-text-title">{{ user.username }}</h3>
<p class="text-sm text-text-muted">Merits: {{ user.merits }}</p>
<p class="text-sm text-text-muted">Joined: {{ user.join_date }}</p>
<p class="text-sm text-text-muted">Posts: {{ user.posts_count }}</p>
<p class="text-sm text-text-muted">Comments: {{ user.comments_count }}</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div id="sub-tab-month" class="hidden [&:target]:block space-y-6">
<!-- Users Grid for Merits - Month -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{% assign users = site.data.users %}
{% for user in users %}
<div class="bg-white p-4 rounded-md shadow-md">
<div class="flex items-center space-x-4">
<img src="{{ user.avatar_url }}" alt="User Avatar" class="w-12 h-12 rounded-full">
<div>
<h3 class="text-lg font-bold text-text-title">{{ user.username }}</h3>
<p class="text-sm text-text-muted">Merits: {{ user.merits }}</p>
<p class="text-sm text-text-muted">Joined: {{ user.join_date }}</p>
<p class="text-sm text-text-muted">Posts: {{ user.posts_count }}</p>
<p class="text-sm text-text-muted">Comments: {{ user.comments_count }}</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- Add more sub-tabs for Merits as needed -->
</div>
<div id="tab-new-users" class="hidden [&:target]:block space-y-6">
<div id="sub-tab-week" class="block [&:not(:target)]:hidden [&:not(:target):not(:has(~:target))]:block space-y-6">
<!-- Users Grid for New Users - Week -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{% assign users = site.data.users %}
{% for user in users %}
<div class="bg-white p-4 rounded-md shadow-md">
<div class="flex items-center space-x-4">
<img src="{{ user.avatar_url }}" alt="User Avatar" class="w-12 h-12 rounded-full">
<div>
<h3 class="text-lg font-bold text-text-title">{{ user.username }}</h3>
<p class="text-sm text-text-muted">Joined: {{ user.join_date }}</p>
<p class="text-sm text-text-muted">Posts: {{ user.posts_count }}</p>
<p class="text-sm text-text-muted">Comments: {{ user.comments_count }}</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div id="sub-tab-month" class="hidden [&:target]:block space-y-6">
<!-- Users Grid for New Users - Month -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{% assign users = site.data.users %}
{% for user in users %}
<div class="bg-white p-4 rounded-md shadow-md">
<div class="flex items-center space-x-4">
<img src="{{ user.avatar_url }}" alt="User Avatar" class="w-12 h-12 rounded-full">
<div>
<h3 class="text-lg font-bold text-text-title">{{ user.username }}</h3>
<p class="text-sm text-text-muted">Joined: {{ user.join_date }}</p>
<p class="text-sm text-text-muted">Posts: {{ user.posts_count }}</p>
<p class="text-sm text-text-muted">Comments: {{ user.comments_count }}</p>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<!-- Add more sub-tabs for New Users as needed -->
</div>
<!-- Add more tabs for Most Posts, Most Comments, Most Votes as needed -->
</div>
</div>