i had ai do this btw
This commit is contained in:
+68
-39
@@ -4,8 +4,8 @@
|
||||
<link href="/static/css/home.css" rel="stylesheet"/> <!-- Its just easier to resuse this-->
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<div id="main" class="home-page-shell">
|
||||
<div class="home-page-container">
|
||||
<!-- {% if not isEmailVerified: %}
|
||||
<div class="alert p-2 alert-warning d-flex align-items-center">
|
||||
<i class="bi bi-envelope-plus ms-2" style="font-size: 30px;"></i>
|
||||
@@ -24,58 +24,78 @@
|
||||
<a href="/settings/discord_link" class="ms-auto text-decoration-none me-2"><button class="btn btn-primary btn-sm">Link Discord</button></a>
|
||||
</div>
|
||||
{%endif%}
|
||||
<div class="d-flex align-items-center">
|
||||
<img class="rounded-5 overflow-hidden me-4" src="/Thumbs/Head.ashx?x=150&y=150&userId={{currentuser.id}}" style="width:auto;max-height: 130px;"/>
|
||||
<div class="mt-2">
|
||||
<h1>
|
||||
<span id="greetings"></span>, {{currentuser.username}}!
|
||||
</h1>
|
||||
{% if membershipValue == 1: %}
|
||||
<span class="rbx-icon-bc"></span>
|
||||
{%endif%}
|
||||
{% if membershipValue == 2: %}
|
||||
<span class="rbx-icon-tbc"></span>
|
||||
{%endif%}
|
||||
{% if membershipValue == 3: %}
|
||||
<span class="rbx-icon-negative-obc"></span>
|
||||
{%endif%}
|
||||
<section class="home-hero card-container">
|
||||
<div class="home-hero-avatar-wrap">
|
||||
<img class="home-hero-avatar" src="/Thumbs/Head.ashx?x=150&y=150&userId={{currentuser.id}}" alt="{{currentuser.username}}" />
|
||||
</div>
|
||||
</div>
|
||||
<h4>Friends ( {{friendcount}} )</h4>
|
||||
<div class="w-100 p-2 d-flex flex-nowrap card-container friends-scroll" style="min-height: 100px;">
|
||||
<div class="home-hero-copy">
|
||||
<p class="home-kicker mb-1">Welcome back</p>
|
||||
<h1 class="home-greeting mb-2"><span id="greetings"></span>, {{currentuser.username}}!</h1>
|
||||
<div class="home-status-row">
|
||||
{% if membershipValue == 1: %}
|
||||
<span class="rbx-icon-bc"></span>
|
||||
{%endif%}
|
||||
{% if membershipValue == 2: %}
|
||||
<span class="rbx-icon-tbc"></span>
|
||||
{%endif%}
|
||||
{% if membershipValue == 3: %}
|
||||
<span class="rbx-icon-negative-obc"></span>
|
||||
{%endif%}
|
||||
<span class="home-status-text">Your account and friends are the quickest places to jump back into the site.</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="home-section card-container">
|
||||
<div class="home-section-header">
|
||||
<div>
|
||||
<h4 class="home-section-title mb-1">Friends ({{friendcount}})</h4>
|
||||
<p class="home-section-meta mb-0">People online and worth checking in on.</p>
|
||||
</div>
|
||||
<a class="home-section-link" href="/users/{{currentuser.id}}/friends">View all</a>
|
||||
</div>
|
||||
<div class="home-friends-strip friends-scroll">
|
||||
{% for friend in friends %}
|
||||
<a href="/users/{{friend.id}}/profile">
|
||||
<div style="height: fit-content; width:90px;" class="me-3">
|
||||
<div class="image-container">
|
||||
<img class="rounded w-100 d-table" src="/Thumbs/Head.ashx?x=100&y=100&userId={{friend.id}}" style="margin: 0 auto;height: fit-content; max-width: 100px;"/>
|
||||
<a href="/users/{{friend.id}}/profile" class="home-friend-card">
|
||||
<div class="image-container home-friend-avatar-frame">
|
||||
<img class="home-friend-avatar" src="/Thumbs/Head.ashx?x=100&y=100&userId={{friend.id}}" alt="{{friend.username}}"/>
|
||||
{% if friend.isonline: %}<div class="status-icon {% if friend.ingame: %}status-icon-green{% endif %}"></div>{% endif %}
|
||||
</div>
|
||||
<p class="text-body w-100 text-center d-inline-block m-0 text-truncate" style="font-size: 12px;">{{friend.username}}</p>
|
||||
</div>
|
||||
<p class="text-body w-100 text-center d-inline-block m-0 text-truncate home-friend-name">{{friend.username}}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if friendcount == 0: %}
|
||||
<p style="margin: auto auto;" class="d-table align-items-center d-flex">You have no friends <img width="21" height="21" src="https://media.tenor.com/jeYb8iK3YfsAAAAi/skull-skullgif.gif"></p>
|
||||
<div class="home-empty-state">
|
||||
<p class="mb-0">You have no friends yet.</p>
|
||||
<a href="/games" class="btn btn-sm btn-primary mt-2">Explore games</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4 class="mt-2">Recently Played</h4>
|
||||
<div class="w-100 p-2 d-flex" style="overflow-x: hidden;min-height: 100px;overflow-x: auto;">
|
||||
</section>
|
||||
<section class="home-section card-container">
|
||||
<div class="home-section-header">
|
||||
<div>
|
||||
<h4 class="home-section-title mb-1">Recently Played</h4>
|
||||
<p class="home-section-meta mb-0">Pick up where you left off or try something new.</p>
|
||||
</div>
|
||||
<a class="home-section-link" href="/games">Browse games</a>
|
||||
</div>
|
||||
<div class="home-places-strip">
|
||||
{% for place in recentlyplayed %}
|
||||
<a class="text-decoration-none" href="/games/{{place.id}}/">
|
||||
<div class="me-3 overflow-hidden rounded place-card">
|
||||
<div class="position-relative">
|
||||
<img width="100%" style="aspect-ratio: 1/1;" src="/Thumbs/PlaceIcon.ashx?assetId={{place.id}}&x=150&y=150">
|
||||
<div class="me-3 overflow-hidden rounded place-card home-place-card">
|
||||
<div class="position-relative home-place-thumb-wrap">
|
||||
<img class="home-place-thumb" src="/Thumbs/PlaceIcon.ashx?assetId={{place.id}}&x=150&y=150" alt="{{place.name}}">
|
||||
<div class="position-absolute" style="bottom: 0px;left: 0px;">
|
||||
<div class="fw-bold bg-surface text-body" style="font-size: 12px;padding: 3px;border-top-right-radius: 4px;">{{place.placeyear.value}}</div>
|
||||
<div class="fw-bold bg-surface text-body home-place-year">{{place.placeyear.value}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-1">
|
||||
<h5 class="mb-0" style="font-size: 17px;text-overflow: ellipsis;">{{place.name}}</h5>
|
||||
<div class="p-2 home-place-copy">
|
||||
<h5 class="mb-1 home-place-name" title="{{place.name}}">{{place.name}}</h5>
|
||||
<div class="d-flex align-items-center">
|
||||
<p style="margin:0;font-size: 14px;" class="text-secondary"><i class="bi bi-people"></i> {{place.playercount}} <span style="font-size: 13px;">Playing</span></p>
|
||||
<p class="mb-2 text-secondary home-place-playing"><i class="bi bi-people"></i> {{place.playercount}} <span>Playing</span></p>
|
||||
</div>
|
||||
<div class="w-100 votePercentageBackground">
|
||||
<div class="votePercentageFill" style="width: {{place.likePercentage}}%;"></div>
|
||||
<div class="w-100 votePercentageBackground home-place-votes">
|
||||
<div class="votePercentageFill home-place-vote-fill" data-like-percentage="{{place.likePercentage}}"></div>
|
||||
<div>
|
||||
<div class="segment" style="left: 18%;"></div>
|
||||
<div class="segment" style="left: 38%;"></div>
|
||||
@@ -88,9 +108,13 @@
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% if recentlyplayedcount == 0: %}
|
||||
<p style="margin: auto auto;" class="d-table">Looks like you havent played any games yet, maybe you should go <a class="text-decoration-none" href="/games">play</a> one right now!</p>
|
||||
<div class="home-empty-state home-empty-wide">
|
||||
<p class="mb-0">Looks like you haven’t played any games yet.</p>
|
||||
<a class="btn btn-sm btn-primary mt-2" href="/games">Play something now</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@@ -108,5 +132,10 @@
|
||||
}
|
||||
|
||||
document.getElementById("greetings").textContent = greeting;
|
||||
|
||||
document.querySelectorAll(".home-place-vote-fill").forEach((fill) => {
|
||||
const percentage = fill.dataset.likePercentage || 0;
|
||||
fill.style.width = `${percentage}%`;
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
+226
-2
@@ -1,7 +1,103 @@
|
||||
#main {
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
margin-top: 120px;
|
||||
}
|
||||
|
||||
.home-page-shell {
|
||||
width: 100%;
|
||||
padding: 1.5rem 1rem 2rem;
|
||||
}
|
||||
|
||||
.home-page-container {
|
||||
width: 100%;
|
||||
max-width: 1080px;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.home-alert {
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
|
||||
.home-hero,
|
||||
.home-section {
|
||||
padding: 1rem 1.1rem;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(180deg, rgba(20, 20, 20, 0.95), rgba(10, 10, 10, 0.98));
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
.home-hero {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.home-hero-avatar-wrap {
|
||||
position: relative;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.home-hero-avatar {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
border-radius: 22px;
|
||||
object-fit: cover;
|
||||
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.home-kicker {
|
||||
color: var(--text-secondary, #9c9c9c);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.12em;
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
.home-greeting {
|
||||
font-size: clamp(1.6rem, 3vw, 2.4rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.home-status-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.home-status-text,
|
||||
.home-section-meta {
|
||||
color: var(--text-secondary, #9c9c9c);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.home-section-header {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.85rem;
|
||||
}
|
||||
|
||||
.home-section-title {
|
||||
font-size: 1.35rem;
|
||||
line-height: 1.1;
|
||||
margin-bottom: 0.15rem;
|
||||
}
|
||||
|
||||
.home-section-link {
|
||||
color: #4ea2ff;
|
||||
text-decoration: none;
|
||||
font-size: 0.92rem;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.home-section-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
@@ -10,6 +106,115 @@
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.home-friends-strip {
|
||||
display: flex;
|
||||
gap: 0.85rem;
|
||||
align-items: flex-start;
|
||||
min-height: 116px;
|
||||
}
|
||||
|
||||
.home-friend-card {
|
||||
width: 96px;
|
||||
flex: 0 0 auto;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.home-friend-avatar-frame {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.home-friend-avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
.home-friend-name {
|
||||
font-size: 12px;
|
||||
margin-top: 0.35rem !important;
|
||||
}
|
||||
|
||||
.home-empty-state {
|
||||
min-height: 116px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: var(--text-secondary, #9c9c9c);
|
||||
border: 1px dashed rgba(255, 255, 255, 0.12);
|
||||
border-radius: 16px;
|
||||
padding: 1rem;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.home-empty-wide {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.home-places-strip {
|
||||
display: flex;
|
||||
gap: 0.85rem;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 0.25rem;
|
||||
scroll-snap-type: x proximity;
|
||||
}
|
||||
|
||||
.home-place-card {
|
||||
width: 180px;
|
||||
flex: 0 0 auto;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.home-place-thumb-wrap {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.home-place-thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 1 / 1;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.home-place-year {
|
||||
font-size: 11px;
|
||||
padding: 4px 6px;
|
||||
border-top-right-radius: 6px;
|
||||
}
|
||||
|
||||
.home-place-copy {
|
||||
min-height: 94px;
|
||||
}
|
||||
|
||||
.home-place-name {
|
||||
font-size: 0.98rem;
|
||||
line-height: 1.15;
|
||||
line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-place-playing {
|
||||
margin: 0;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.home-place-playing span {
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.home-place-votes {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
position: absolute;
|
||||
bottom : -8px;
|
||||
@@ -44,4 +249,23 @@
|
||||
}
|
||||
|
||||
.friends-scroll::-webkit-scrollbar { display: none; }
|
||||
.friends-scroll { -ms-overflow-style: none; scrollbar-width: none; }
|
||||
.friends-scroll { -ms-overflow-style: none; scrollbar-width: none; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.home-page-shell {
|
||||
padding: 1rem 0.75rem 1.5rem;
|
||||
}
|
||||
|
||||
.home-hero {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.home-section-header {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.home-place-card {
|
||||
width: 160px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user