mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Merge pull request #959 from ae-utbm/counter-click-step-4
Make counter click client side first
This commit is contained in:
@ -578,14 +578,6 @@ class User(AbstractUser):
|
||||
return "%s (%s)" % (self.get_full_name(), self.nick_name)
|
||||
return self.get_full_name()
|
||||
|
||||
def get_age(self):
|
||||
"""Returns the age."""
|
||||
today = timezone.now()
|
||||
born = self.date_of_birth
|
||||
return (
|
||||
today.year - born.year - ((today.month, today.day) < (born.month, born.day))
|
||||
)
|
||||
|
||||
def get_family(
|
||||
self,
|
||||
godfathers_depth: NonNegativeInt = 4,
|
||||
|
@ -208,6 +208,7 @@ body {
|
||||
a.btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
@ -336,7 +337,8 @@ body {
|
||||
margin-left: -125px;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
z-index: 10;
|
||||
/* to get on top of tomselect */
|
||||
left: 50%;
|
||||
top: 60px;
|
||||
text-align: center;
|
||||
@ -431,12 +433,17 @@ body {
|
||||
flex-wrap: wrap;
|
||||
|
||||
$col-gap: 1rem;
|
||||
$row-gap: 0.5rem;
|
||||
|
||||
&.gap {
|
||||
column-gap: var($col-gap);
|
||||
row-gap: var($row-gap);
|
||||
}
|
||||
|
||||
@for $i from 2 through 5 {
|
||||
&.gap-#{$i}x {
|
||||
column-gap: $i * $col-gap;
|
||||
row-gap: $i * $row-gap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1242,40 +1249,6 @@ u,
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#bar-ui {
|
||||
padding: 0.4em;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
#products {
|
||||
flex-basis: 100%;
|
||||
margin: 0.2em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#click_form {
|
||||
flex: auto;
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
#user_info {
|
||||
flex: auto;
|
||||
padding: 0.5em;
|
||||
margin: 0.2em;
|
||||
height: 100%;
|
||||
background: $secondary-neutral-light-color;
|
||||
|
||||
img {
|
||||
max-width: 70%;
|
||||
}
|
||||
|
||||
input {
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------USER PROFILE----------------------------*/
|
||||
|
||||
.user_mini_profile {
|
||||
|
@ -60,7 +60,7 @@
|
||||
{% endif %}
|
||||
{% if user.date_of_birth %}
|
||||
<div class="user_mini_profile_dob">
|
||||
{{ user.date_of_birth|date("d/m/Y") }} ({{ user.get_age() }})
|
||||
{{ user.date_of_birth|date("d/m/Y") }} ({{ user.age }})
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user