From 75da02b8f132b40bf6acc6a085da1dcdc3fb5b39 Mon Sep 17 00:00:00 2001 From: Fluffy Date: Fri, 23 Jun 2023 14:47:05 +0100 Subject: [PATCH] Add proper profile block on search --- TFR/server/static/sass/block.sass | 58 +++++++++++++++++++- TFR/server/static/sass/profile-settings.sass | 5 +- TFR/server/templates/views/scores.html | 18 ++++-- 3 files changed, 74 insertions(+), 7 deletions(-) diff --git a/TFR/server/static/sass/block.sass b/TFR/server/static/sass/block.sass index b527b42..c40accd 100644 --- a/TFR/server/static/sass/block.sass +++ b/TFR/server/static/sass/block.sass @@ -7,7 +7,7 @@ background-color: rgba($black, 0.5) border-radius: 2px - border: 1px solid RGBA(var(--white),0.05) + border: 1px solid RGBA($white, 0.05) > h2 margin: 0 0 0.2rem 0 @@ -28,3 +28,59 @@ display: flex flex-direction: column gap: 0.5rem + +.account-block + margin-bottom: 1rem + padding: 1rem + + display: flex + flex-direction: row + gap: 1rem + + background-color: rgba($black, 0.5) + border-radius: 2px + border: 1px solid RGBA($white, 0.05) + + > img + height: 10rem + width: 10rem + + background-color: RGBA($white, 0.02) + border: 1px solid RGBA($white, 0.1) + border-radius: 2px + + object-fit: cover + + .other + width: 100% + + display: flex + flex-direction: column + justify-content: flex-start + + gap: 0.5rem + + h2 + margin: 0 + font-size: 1.3rem + color: RGB($white) + + p + margin: 0 + font-size: 1rem + color: RGB($white) + + hr + margin: 0 + width: 100% + border: 0 solid transparent + border-bottom: 1px solid RGBA($white, 0.1) + +@media (max-width: 621px) + .account-block + flex-direction: column + + > img + margin: 0 auto + width: 15rem + height: 15rem diff --git a/TFR/server/static/sass/profile-settings.sass b/TFR/server/static/sass/profile-settings.sass index cd6d254..8219a87 100644 --- a/TFR/server/static/sass/profile-settings.sass +++ b/TFR/server/static/sass/profile-settings.sass @@ -1,7 +1,7 @@ .profile-settings display: flex flex-direction: row - gap: 0.5rem + gap: 1rem .picture margin: 0 @@ -11,6 +11,8 @@ display: flex flex-direction: column + border: 1px solid RGBA($white, 0.1) + > img height: 10rem width: 10rem @@ -70,7 +72,6 @@ @media (max-width: 621px) .profile-settings flex-direction: column - gap: 1rem .picture margin: 0 auto diff --git a/TFR/server/templates/views/scores.html b/TFR/server/templates/views/scores.html index 9f30f88..9f56813 100644 --- a/TFR/server/templates/views/scores.html +++ b/TFR/server/templates/views/scores.html @@ -37,8 +37,20 @@ {% endblock %} {% block content %} {% if user %} -
-

{{ user.username }}

+ {% endif %} @@ -50,7 +62,6 @@ Name Time Set Submitted - {% for score in scores %} @@ -72,7 +83,6 @@ {{ score.score | format_result }} {{ score.scored_at.strftime('%Y-%m-%d') }} - {% endfor %}