Commit cb23a6e8 authored by ancoats's avatar ancoats
Browse files

Initialise local group user template

parent 4a9ee350
......@@ -45,11 +45,11 @@
</section>
</article>
{% embed '_partials/components/default/entries-grid-related.twig' with {
entries: queryRelatedEntries,
class: 'u-background-color-blue-lazuli u-color-white',
heading: 'More events from {author}'|t({
author: author.userNamePublic | default(author.name)
}),
entries: queryRelatedEntries,
})
} %}
{% block loop %}
{% for entry in entries %}
......
......@@ -6,6 +6,17 @@
.username(username)
.first() %}
{% set queryEvents = craft.entries()
.section('events')
.datetimeStart('> ' ~ now | date('c'))
.orderBy('datetimeStart asc')
.byline(user) %}
{% set entriesPerPage = 1 %}
{% set limitedEntries = clone(queryEvents).limit(entriesPerPage) %}
{% paginate limitedEntries as pageData, pageEntries %}
{% set isPageFirst = (craft.app.request.getPageNum() == 1) %}
{% set breadcrumb = craft.entries()
.section('pageLocalGroups')
.all() %}
......@@ -13,5 +24,38 @@
{% block content %}
<article>
{% include '_partials/components/template-page/page-header.twig' %}
<div class="tell-the-truth">
{% include '_partials/components/shared/tile.twig' with {
tileButtonURL: user.userURL,
tileButtonLabel: user.userURL | replace({
'http://': '',
'https://': '',
'www.': ''
}),
tileTheme: 'extinction-part-one'
} %}
{% include '_partials/components/shared/tile.twig' with {
tileButtonURL: (user.userEmailPublic ? "mailto:#{user.userEmailPublic}"),
tileButtonLabel: (user.userEmailPublic ? 'Email {user}'|t({
user: user.userNamePublic | default(user.name)
})),
tileTheme: 'tree-of-life-circle'
} %}
{% include '_partials/components/template-user-local-group/block-social-media.twig' with {
user: user
} %}
</div>
{% embed '_partials/components/default/entries-grid.twig' with {
entries: queryEvents.limit(entriesPerPage).all(),
heading: 'Upcoming events from {author}'|t({
author: user.userNamePublic | default(user.name)
})
} %}
{% block loop %}
{% for entry in entries %}
{% include '_partials/components/template-entry-event/entry-card.twig' %}
{% endfor %}
{% endblock %}
{% endembed %}
</article>
{% endblock %}
{% if icons|length %}
{% macro icon(handle, target, label = '') %}
<a class="c-icon c-icon--{{ handle }}" href="{{ target }}">
<span class="u-visually-hidden">{{ label | default(handle|capitalize) }}</span>
</a>
{% endmacro %}
<div class="c-icon-group{% if (class is defined and class) %} {{ class }}{% endif %}">
{% import _self as this %}
{% for handle, target in icons | filter(target => (target != '')) %}
{% switch handle %}
{% case 'website' %}
{{ this.icon('xr', target, target | replace({
'http://': '',
'https://': '',
'www.': '' })
) }}
{% case 'email' %}
{{ this.icon(handle, "mailto:#{target}", 'Email'|t) }}
{% case 'twitter' %}
{{ this.icon(handle, target, 'Twitter') }}
{% case 'facebook' %}
{{ this.icon(handle, target, 'Facebook') }}
{% case 'instagram' %}
{{ this.icon(handle, target, 'Instagram') }}
{% case 'youtube' %}
{{ this.icon(handle, target, 'YouTube') }}
{% endswitch %}
{% endfor %}
</div>
{% endif %}
<div class="c-icon-group">
{% if socialMedia.channelURLTwitter %}
<a class="c-icon c-icon--twitter" href="{{ socialMedia.channelURLTwitter }}">
<span class="u-visually-hidden">Twitter</span>
</a>
{% endif %}
{% if socialMedia.channelURLFacebook %}
<a class="c-icon c-icon--facebook" href="{{ socialMedia.channelURLFacebook }}">
<span class="u-visually-hidden">Facebook</span>
</a>
{% endif %}
{% if socialMedia.channelURLInstagram %}
<a class="c-icon c-icon--instagram" href="{{ socialMedia.channelURLInstagram }}">
<span class="u-visually-hidden">Instagram</span>
</a>
{% endif %}
{% if socialMedia.channelURLYouTube %}
<a class="c-icon c-icon--youtube" href="{{ socialMedia.channelURLYouTube }}">
<span class="u-visually-hidden">YouTube</span>
</a>
{% endif %}
</div>
......@@ -7,37 +7,15 @@
{% for user in localGroups %}
<li class="c-list__item">
<h3 class="c-list__item__label">{{ user.userNamePublic ? user.userNamePublic : user.name }}</h3>
<div class="c-icon-group">
{% if user.userURL %}
<a class="c-icon c-icon--xr" href="{{ user.userURL }}">
<span class="u-visually-hidden">{{ user.userURL | replace({
'http://': '',
'https://': '',
'www.': '' })
}}</span>
</a>
{% endif %}
{% if user.userEmailPublic %}
<a class="c-icon c-icon--email" href="mailto:{{ user.userEmailPublic }}">
<span class="u-visually-hidden">{{ user.userEmailPublic }}</span>
</a>
{% endif %}
{% if user.userURLTwitter %}
<a class="c-icon c-icon--twitter" href="{{ user.userURLTwitter }}">
<span class="u-visually-hidden">Twitter</span>
</a>
{% endif %}
{% if user.userURLFacebook %}
<a class="c-icon c-icon--facebook" href="{{ user.userURLFacebook }}">
<span class="u-visually-hidden">Facebook</span>
</a>
{% endif %}
{% if user.userURLInstagram %}
<a class="c-icon c-icon--instagram" href="{{ user.userURLInstagram }}">
<span class="u-visually-hidden">Instagram</span>
</a>
{% endif %}
</div>
{% include '_partials/components/shared/icon-group.twig' with {
icons: {
'website': user.userURL,
'email': user.userEmailPublic,
'twitter': user.userURLTwitter,
'facebook': user.userURLFacebook,
'instagram': user.userURLInstagram,
}
} %}
</li>
{% endfor %}
</ol>
......
{% if user|length %}
<div class="c-box c-box--center u-background-color-black u-color-white">
<h2 class="h3">{{ 'Follow {user}'|t({
user: user.userNamePublic | default(user.name)
}) }}</h2>
{% include '_partials/components/shared/icon-group.twig' with {
class: 'u-margin-top-1',
icons: {
'twitter': user.userURLTwitter,
'facebook': user.userURLFacebook,
'instagram': user.userURLInstagram,
}
} %}
</div>
{% endif %}
<footer class="r-site-footer" id="site-footer">
{% include '_partials/components/shared/logo.twig' %}
{% include '_partials/components/site-footer/social-media.twig' %}
{% include '_partials/components/shared/icon-group.twig' with {
icons: {
'twitter': socialMedia.channelURLTwitter,
'facebook': socialMedia.channelURLFacebook,
'instagram': socialMedia.channelURLInstagram,
'youtube': socialMedia.channelURLYouTube,
}
} %}
{% include '_partials/components/site-footer/navigation.twig' %}
</footer>
......@@ -13,9 +13,11 @@ return [
'Email our Press Circle' => 'Envoyer un email à notre cercle de presse',
'Email our Recruitment Circle' => 'Envoyer un email à notre cercle de recrutement',
'Email XR Belgium' => 'Envoyer un email à XR Belgique',
'Email {user}' => 'Envoyer un email à {user}',
'Filter events by category' => 'Filtrer les événements par catégorie',
'Filter news by category' => 'Filtrer les actualités par catégorie',
'Filter posts by category' => 'Filtrer les articles par catégorie',
'Follow {user}' => 'Suivre {user}',
'From' => 'De',
'Go to page' => 'Aller à la page',
'Home' => 'Accueil',
......@@ -56,6 +58,7 @@ return [
'Type' => 'Type',
'Type of work' => 'Type de travail',
'Upcoming events' => 'Évènements à venir',
'Upcoming events from {author}' => 'Évènements à venir de {author}',
'Unspecified' => 'Non spécifié',
'We demand' => 'Nous demandons',
'Working group' => 'Groupe de travail',
......
......@@ -13,9 +13,11 @@ return [
'Email our Press Circle' => 'Mail onze Perscirkel',
'Email our Recruitment Circle' => 'Mail onze Recruitmentcirkel',
'Email XR Belgium' => 'Mail XR Belgie',
'Email {user}' => 'Mail {user}',
'Filter events by category' => 'Filter evenementen op categorië',
'Filter news by category' => 'Filter nieuws op categorië',
'Filter posts by category' => 'Filter berichten op categorië',
'Follow {user}' => 'Volg {user}',
'From' => 'Van',
'Go to page' => 'Ga naar pagina',
'Home' => 'Homepagina',
......@@ -56,6 +58,7 @@ return [
'Type' => 'Type',
'Type of work' => 'Type werk',
'Upcoming events' => 'Aankomende evenementen',
'Upcoming events from {author}' => 'Aankomende evenementen van {author}',
'Unspecified' => 'Ongespecifeerd',
'We demand' => 'Wij eisen',
'Working group' => 'Werkgroep',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment