Skip to content

Commit

Permalink
Header arrangement was broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Nov 1, 2023
1 parent 875dacb commit 7d62981
Showing 1 changed file with 63 additions and 61 deletions.
124 changes: 63 additions & 61 deletions templates/profile/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,70 +24,72 @@
</div>
<div class="row align-items-center">
<div class="col-12 col-sm-6">
<div class="d-md-none u-w-full u-relative u-pb-[100%] u-m-auto">
<div class="u-absolute u-left-0 u-top-0 u-w-full u-h-full">
{% if use_lightbox is defined %}
<a class="js-profile-picture" href="{{ url('avatar', { username: member.Username, size: 'original'}) }}" data-toggle="lightbox"
data-always-show-close="true" data-type="image"
data-title="{{ 'profile.picture.title'| trans }}">
<img class="u-rounded-8 u-w-full u-h-full u-object-cover js-profile-picture" src="{{ url('avatar', { username: member.Username, size: 320}) }}"
alt="{{ 'profile.picture.title'| trans }}">
</a>
{% else %}
<a href="{{ url('members_profile', {username: member.username}) }}">
<img class="u-rounded-8 u-w-full u-h-full u-object-cover js-profile-picture" src="{{ url('avatar', { username: member.Username, size: 320}) }}"
alt="{{ 'profile.picture.title'| trans }}">
</a>
{% endif %}
<div class="text-center text-md-left">
<div class="d-md-none u-w-full u-relative u-pb-[100%] u-m-auto">
<div class="u-absolute u-left-0 u-top-0 u-w-full u-h-full">
{% if use_lightbox is defined %}
<a class="js-profile-picture" href="{{ url('avatar', { username: member.Username, size: 'original'}) }}" data-toggle="lightbox"
data-always-show-close="true" data-type="image"
data-title="{{ 'profile.picture.title'| trans }}">
<img class="u-rounded-8 u-w-full u-h-full u-object-cover js-profile-picture" src="{{ url('avatar', { username: member.Username, size: 320}) }}"
alt="{{ 'profile.picture.title'| trans }}">
</a>
{% else %}
<a href="{{ url('members_profile', {username: member.username}) }}">
<img class="u-rounded-8 u-w-full u-h-full u-object-cover js-profile-picture" src="{{ url('avatar', { username: member.Username, size: 320}) }}"
alt="{{ 'profile.picture.title'| trans }}">
</a>
{% endif %}
</div>
</div>
{% if member.Name != ''%}<h3>{{ member.Name }}</h3>{% endif %}
{% set city = member.city %}
<h5><a href="{{ url('places_city', {countryname: city.country.name, countrycode: city.countryId, regionname: city.admin1.name, regioncode: city.admin1id, cityname: city.name, citycode: city.geonameId}) }}">{{ member.city.name }}</a>
{%- if city.admin1 != null -%}
, <a href="{{ url('places_region', {countryname: city.country.name, countrycode: city.countryId, regionname: city.admin1.name, regioncode: city.admin1id}) }}">{{ city.admin1.name }}</a>
{%- endif -%}
, <a href="{{ url('places_country', {countryname: city.country.name, countrycode: city.countryId}) }}">{{ city.country.name }}</a>
</h5>
{% if status_form is defined and not status_form is null %}
{{ form_start(status_form, {'attr': {'class': 'u-grid u-grid-cols-2 u-gap-8'}}) }}
{{ form_widget(status_form.status) }}
<button type="submit" class="o-button o-button--s u-self-center" value="{{ 'submit'|trans }}">{{ 'submit'|trans }}</button>
{{ form_end(status_form) }}
{% endif %}
</div>
</div>
<div class="col-12 col-sm-6 teaser-border text-center text-md-left">
{% if memberfields.Occupation is defined and memberfields.Occupation != null %}
<p class="h5">{{ memberfields.Occupation }}</p>
{% endif %}
{% if member.Name != ''%}<h3>{{ member.Name }}</h3>{% endif %}
{% set city = member.city %}
<h5><a href="{{ url('places_city', {countryname: city.country.name, countrycode: city.countryId, regionname: city.admin1.name, regioncode: city.admin1id, cityname: city.name, citycode: city.geonameId}) }}">{{ member.city.name }}</a>
{%- if city.admin1 != null -%}
, <a href="{{ url('places_region', {countryname: city.country.name, countrycode: city.countryId, regionname: city.admin1.name, regioncode: city.admin1id}) }}">{{ city.admin1.name }}</a>
<p class="mb-2">
{%- if member.HideBirthDate == 'No' -%}
<strong>{{ 'profile.age'|trans }} </strong> {{ member.age }}
{%- endif -%}
, <a href="{{ url('places_country', {countryname: city.country.name, countrycode: city.countryId}) }}">{{ city.country.name }}</a>
</h5>
{% if status_form is defined and not status_form is null %}
{{ form_start(status_form, {'attr': {'class': 'u-grid u-grid-cols-2 u-gap-8'}}) }}
{{ form_widget(status_form.status) }}
<button type="submit" class="o-button o-button--s u-self-center" value="{{ 'submit'|trans }}">{{ 'submit'|trans }}</button>
{{ form_end(status_form) }}
{% endif %}
{%- if member.HideBirthDate == 'No' and member.HideGender == 'No' -%}, {%- endif %}
{%- if member.HideBirthDate == 'Yes' and member.HideGender == 'No' -%}<strong>{{ 'profile.gender'|trans }}</strong> {%- endif %}
{% if member.HideGender == 'No' %}
{{ member.gender|trans }}
{%- endif -%}
<br><strong>{{ 'profile.joined'|trans }} </strong>
{% set difference = date(member.created).diff(date()) %}
{% if difference.days <= 7 %}
{{ 'lastloginprivacy'| trans }}
{% else %}
{{ member.created.diffForHumans }}
{% endif %}
{% if member.hasRight('SafetyTeam') %} ({{ member.created|format_datetime() }}){% endif %}
<br><strong>{{ 'profile.last.activity'|trans }} </strong>
{% set lastLogin = (member.lastLogin == null) ? member.created : member.lastLogin %}
{% set difference = date(lastLogin).diff(date()) %}
{% if difference.days <= 7 %}
{{ 'lastloginprivacy'| trans }}
{% else %}
{{ lastLogin.diffForHumans }}
{% endif %}
{% if member.hasRight('SafetyTeam') %} ({{ lastLogin|format_datetime() }}){% endif %}
</p>
</div>
</div>
<div class="col-12 col-sm-6 teaser-border text-center text-md-left">
{% if memberfields.Occupation is defined and memberfields.Occupation != null %}
<p class="h5">{{ memberfields.Occupation }}</p>
{% endif %}
<p class="mb-2">
{%- if member.HideBirthDate == 'No' -%}
<strong>{{ 'profile.age'|trans }} </strong> {{ member.age }}
{%- endif -%}
{%- if member.HideBirthDate == 'No' and member.HideGender == 'No' -%}, {%- endif %}
{%- if member.HideBirthDate == 'Yes' and member.HideGender == 'No' -%}<strong>{{ 'profile.gender'|trans }}</strong> {%- endif %}
{% if member.HideGender == 'No' %}
{{ member.gender|trans }}
{%- endif -%}
<br><strong>{{ 'profile.joined'|trans }} </strong>
{% set difference = date(member.created).diff(date()) %}
{% if difference.days <= 7 %}
{{ 'lastloginprivacy'| trans }}
{% else %}
{{ member.created.diffForHumans }}
{% endif %}
{% if member.hasRight('SafetyTeam') %} ({{ member.created|format_datetime() }}){% endif %}
<br><strong>{{ 'profile.last.activity'|trans }} </strong>
{% set lastLogin = (member.lastLogin == null) ? member.created : member.lastLogin %}
{% set difference = date(lastLogin).diff(date()) %}
{% if difference.days <= 7 %}
{{ 'lastloginprivacy'| trans }}
{% else %}
{{ lastLogin.diffForHumans }}
{% endif %}
{% if member.hasRight('SafetyTeam') %} ({{ lastLogin|format_datetime() }}){% endif %}
</p>
</div>

0 comments on commit 7d62981

Please sign in to comment.