Skip to content

Commit

Permalink
ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlevaillant committed Jan 16, 2024
1 parent a711c0e commit 229b70a
Show file tree
Hide file tree
Showing 9 changed files with 470 additions and 299 deletions.
12 changes: 0 additions & 12 deletions assets/css/user.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ a:hover {
background-color: #007bff;
}

.user_menu a div.btn {
margin-right: .3rem;
}

.user-list {
margin-bottom: .5rem;
width: 100%;
Expand Down Expand Up @@ -84,14 +80,6 @@ a:hover {
text-align: center;
}

.profile-form-block {
margin: .5rem;
padding: 1rem;
border-radius: .35rem;
background-color: #fbfbfb;
border: 1px solid rgba(0, 0, 0, 0.125);
flex-grow: 1;
}
.mx--30 {
margin-left: -30px;
margin-right: -30px;
Expand Down
6 changes: 3 additions & 3 deletions templates/conferences/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
aria-labelledby="{{ id }}-tab">
<div class="row text-center my-3 my-md-5">
{% for conference in conferences %}
<div class="col-12 col-sm-6 col-md-4 mb-3">
<div class="card">
<div class="col-md-6 col-lg-4 mb-4">
<article class="card h-100">
<div class="card-body">
<h3 class="h5 card-title font-weight-normal">
<a href="{{ path('conferences_show', {slug: conference.slug}) }}">
Expand Down Expand Up @@ -36,7 +36,7 @@
</a>
{% endif %}
</div>
</div>
</article>
</div>
{% endfor %}
</div>
Expand Down
6 changes: 3 additions & 3 deletions templates/user/account.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

{% block content %}
{% set section = 'homepage' %}
<section class="col-8 mx-auto">
<section class="col-lg-8 mx-auto">
{{ parent() }}
{% if chart %}
{{ render_chart(chart) }}
{% else %}
<div class="d-flex justify-content-center align-items-center h-100">
<p class="text-center">
<em>You seem to be quite new around here... Nothing to display yet !</em>
</div>
</p>
{% endif %}
</section>
{% endblock %}
196 changes: 125 additions & 71 deletions templates/user/future_conferences/future_conferences.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,90 +6,144 @@
{% endblock %}

{% block content %}
<div class="mb-5 w-100">
<div class="col mb-5">
<h1 class="text-center mt-3">All upcoming Conferences</h1>

<h3 class="ml-5 my-5 text-secondary indent-50">Featured Conferences</h3>
<div class="d-flex flex-row flex-wrap justify-content-center" id="featured-conferences-block">
<h3 class="my-5 text-secondary">Featured Conferences</h3>
<div class="row" id="featured-conferences-block">
{% for conference in featuredConferences %}
<div class="card w-30 m-2 border-warning conference-card">
<div class="card-header d-flex justify-content-between">
<a href="{{ path('conferences_show', { slug: conference.slug }) }}">
<h5 class="card-title text-primary my-0"><i class="far fa-star text-warning mr-3"></i>{{ conference.name }}</h5>
</a>
</div>
<div class="card-body d-flex flex-column">
<div class="card-text text-center">From <mark>{{ conference.startAt|date('m/d/Y') }}</mark> To <mark>{{ conference.endAt|date('m/d/Y') }}</mark></div>
<div class="card-text text-center mt-2">
{% if conference.online %}
Online <img class="country-flag" alt="" src="{{ asset('build/images/online.svg') }}">
{% elseif conference.country %}
{{ conference.city }} <img class="country-flag" alt="" src="/bundles/easyadmin/images/flags/{{ conference.country|upper }}.png">
{% endif %}
</div>
<div class="card-text my-3">{{
conference.description ?
conference.description|u.truncate(100, '...', false) :
'<em>No description provided</em>'|raw
}}</div>
{% set cfpIsOpen = conference.cfpEndAt is defined and (conference.cfpEndAt|date('m/d/Y') > 'now'|date('m/d/Y') or conference.cfpEndAt|date('Y') > 'now'|date('Y')) %}
{% set flexJustify = cfpIsOpen ? 'justify-content-between' : 'justify-content-center' %}
<div class="card-text d-flex {{ flexJustify }} text-center px-3 mt-auto">
<form action="{{ path('new_participation', { id: conference.id }) }}" method="GET" class="action-ask-participation">
<button type="submit" class="btn color-done p-0"><i class="fas fa-hand-paper"></i> Ask Participation</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% if cfpIsOpen %}
<form action="{{ path('new_submit', { id: conference.id }) }}" method="GET" class="action-submit">
<button type="submit" class="btn color-pending p-0"><i class="fa fa-microphone"></i> Submit a Talk</button>
<div class="col-md-6 col-lg-4 d-flex">
<article class="card border-warning flex-grow-1 mb-4">
<header class="card-header">
<a href="{{ path('conferences_show', { slug: conference.slug }) }}">
<h5 class="card-title text-primary my-0">
<i class="far fa-star text-warning mr-2"></i>
{{ conference.name }}
</h5>
</a>
</header>
<div class="card-body d-flex flex-column">
<div class="card-text">
From
<time datetime="{{ conference.startAt|date('m/d/Y') }}" class="mark">
{{ conference.startAt|date('m/d/Y') }}
</time>
To
<time datetime="{{ conference.endAt|date('m/d/Y') }}" class="mark">
{{ conference.endAt|date('m/d/Y') }}
</time>
</div>
<div class="card-text mt-3">
{% if conference.online %}
Online
<img class="country-flag" alt="" src="{{ asset('build/images/online.svg') }}" />
{% elseif conference.country %}
{{ conference.city }}
<img class="country-flag" alt="" src="/bundles/easyadmin/images/flags/{{ conference.country|upper }}.png" />
{% endif %}
</div>
<div class="card-text my-3">
{{
conference.description ?
conference.description|u.truncate(100, '...', false) :
'<p class="card-text"><em>No description provided</em></p>'|raw
}}
</div>

{% set cfpIsOpen = conference.cfpEndAt is defined and (conference.cfpEndAt|date('m/d/Y') > 'now'|date('m/d/Y') or conference.cfpEndAt|date('Y') > 'now'|date('Y')) %}
{% set flexJustify = cfpIsOpen ? 'justify-content-between' : 'justify-content-center' %}

<div class="card-text d-flex {{ flexJustify }} text-center mt-auto">
<form action="{{ path('new_participation', { id: conference.id }) }}" method="GET" class="action-ask-participation">
<button type="submit" class="btn color-done p-0">
<i class="fas fa-hand-paper"></i>
Ask Participation
</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% endif %}
{% if cfpIsOpen %}
<form action="{{ path('new_submit', { id: conference.id }) }}" method="GET" class="action-submit">
<button type="submit" class="btn color-pending p-0">
<i class="fa fa-microphone"></i>
Submit a Talk
</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% endif %}
</div>
</div>
</div>
</article>
</div>
{% else %}
<em>No Featured Conference for now.</em>
<div class="col">
<p class="text-center">
<em>No Featured Conference for now.</em>
</p>
</div>
{% endfor %}
</div>
<h3 class="ml-5 my-5 text-secondary indent-50">Regular Conferences</h3>
<div class="d-flex flex-row flex-wrap justify-content-center" id="regular-conferences-block">
<h3 class="my-5 text-secondary">Regular Conferences</h3>
<div class="row" id="regular-conferences-block">
{% for conference in conferences %}
<div class="card w-30 m-2 border-secondary conference-card">
<div class="card-header d-flex justify-content-between">
<a href="{{ path('conferences_show', { slug: conference.slug }) }}">
<h5 class="card-title text-primary my-0">{{ conference.name }}</h5>
</a>
</div>
<div class="card-body d-flex flex-column">
<div class="card-text text-center">From <mark>{{ conference.startAt|date('m/d/Y') }}</mark> To <mark>{{ conference.endAt|date('m/d/Y') }}</mark></div>
<div class="card-text text-center mt-2">
{% if conference.online %}
Online <img class="country-flag" alt="" src="{{ asset('build/images/online.svg') }}">
{% elseif conference.country %}
{{ conference.city }} <img class="country-flag" alt="" src="/bundles/easyadmin/images/flags/{{ conference.country|upper }}.png">
{% endif %}
</div>
<div class="card-text my-3">{{
conference.description ?
conference.description|u.truncate(100, '...', false) :
'<em>No description provided</em>'|raw
}}</div>
{% set cfpIsOpen = conference.cfpEndAt is defined and (conference.cfpEndAt|date('m/d/Y') > 'now'|date('m/d/Y') or conference.cfpEndAt|date('Y') > 'now'|date('Y')) %}
{% set flexJustify = cfpIsOpen ? 'justify-content-between' : 'justify-content-center' %}
<div class="card-text d-flex {{ flexJustify }} text-center px-3 mt-auto">
<form action="{{ path('new_participation', { id: conference.id }) }}" method="GET" class="action-ask-participation">
<button type="submit" class="btn color-done p-0"><i class="fas fa-hand-paper"></i> Ask Participation</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% if cfpIsOpen %}
<form action="{{ path('new_submit', { id: conference.id }) }}" method="GET" class="action-submit">
<button type="submit" class="btn color-pending p-0"><i class="fa fa-microphone"></i> Submit a Talk</button>
<div class="col-md-6 col-lg-4 d-flex">
<article class="card border-secondary flex-grow-1 mb-4">
<header class="card-header">
<a href="{{ path('conferences_show', { slug: conference.slug }) }}">
<h5 class="card-title text-primary my-0">
{{ conference.name }}
</h5>
</a>
</header>
<div class="card-body d-flex flex-column">
<div class="card-text">
From
<time datetime="{{ conference.startAt|date('m/d/Y') }}" class="mark">
{{ conference.startAt|date('m/d/Y') }}
</time>
To
<time datetime="{{ conference.endAt|date('m/d/Y') }}" class="mark">
{{ conference.endAt|date('m/d/Y') }}
</time>
</div>
<div class="card-text mt-3">
{% if conference.online %}
Online
<img class="country-flag" alt="" src="{{ asset('build/images/online.svg') }}" />
{% elseif conference.country %}
{{ conference.city }}
<img class="country-flag" alt="" src="/bundles/easyadmin/images/flags/{{ conference.country|upper }}.png" />
{% endif %}
</div>
<div class="card-text my-3">
{{
conference.description ?
conference.description|u.truncate(100, '...', false) :
'<p class="card-text"><em>No description provided</em></p>'|raw
}}
</div>

{% set cfpIsOpen = conference.cfpEndAt is defined and (conference.cfpEndAt|date('m/d/Y') > 'now'|date('m/d/Y') or conference.cfpEndAt|date('Y') > 'now'|date('Y')) %}
{% set flexJustify = cfpIsOpen ? 'justify-content-between' : 'justify-content-center' %}

<div class="card-text d-flex {{ flexJustify }} text-center mt-auto">
<form action="{{ path('new_participation', { id: conference.id }) }}" method="GET" class="action-ask-participation">
<button type="submit" class="btn color-done p-0">
<i class="fas fa-hand-paper"></i>
Ask Participation
</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% endif %}
{% if cfpIsOpen %}
<form action="{{ path('new_submit', { id: conference.id }) }}" method="GET" class="action-submit">
<button type="submit" class="btn color-pending p-0">
<i class="fa fa-microphone"></i>
Submit a Talk
</button>
<input type="hidden" name="token" value="{{ csrf_token('') }}">
</form>
{% endif %}
</div>
</div>
</div>
</article>
</div>
{% endfor %}
</div>
Expand Down
Loading

0 comments on commit 229b70a

Please sign in to comment.