Skip to content

Commit

Permalink
Add primary venue title to project card footer (#2136)
Browse files Browse the repository at this point in the history
* Add primary venue title to project card

* Flattened nested if conditions in the project card footer

* Use trans tag when there's a comma; indent if statements

* Fixed missing references to featured_project

---------

Co-authored-by: Kiran Jonnalagadda <kiran@hasgeek.com>
anishTP and jace authored Nov 16, 2024
1 parent d3ec2fa commit a1da11b
Showing 2 changed files with 29 additions and 5 deletions.
15 changes: 13 additions & 2 deletions funnel/templates/macros.html.jinja2
Original file line number Diff line number Diff line change
@@ -190,8 +190,19 @@
<p class="mui--text-body2 mui--text-light zero-top-margin search-snippets">{{ faicon(icon='search', css_class="search-icon", baseline=false) }} {{ snippet_html }}</p>
{% endif %}
<div class="flex-wrapper flex-wrapper--end flex-wrapper--space-between flex-wrapper--wrap top-padding">
{%- if include_details %}
<div class="card__body__location mui--text-light">{% if project.primary_venue %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {% if project.primary_venue.city %}{{ project.primary_venue.city }}{% else %}{{ project.primary_venue.title }}{% endif %}{% elif project.location %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {{ project.location }}{% endif %}</div>
{%- if include_details and (project.primary_venue or project.location) -%}
<div class="card__body__location mui--text-light">
{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }}
{%- if project.primary_venue.title and project.primary_venue.city %}
{% trans venue=project.primary_venue.title, city=project.primary_venue.city -%}
{{ venue }}, {{ city }}
{%- endtrans %}
{%- elif project.primary_venue.title %}
{{ project.primary_venue.title }}
{%- elif project.location %}
{{ project.location }}
{%- endif -%}
</div>
{% endif %}
</div>
</div>
19 changes: 16 additions & 3 deletions funnel/templates/profile_layout.html.jinja2
Original file line number Diff line number Diff line change
@@ -126,9 +126,22 @@
<div class="mui--hidden-lg mui--hidden-xl">
<h3 class="card__body__title mui--text-subhead {% if not featured_project.start_at %} card__body__subtitle {% endif %}"><a href="{{ featured_project.url_for() }}" class="mui--text-dark nounderline"><span class="text-bold">{{ featured_project.title_inline }}</span> <span class="mui--text-light js-truncate" data-truncate-lines="2">{{ featured_project.tagline }}</span></a></h3>
</div>
<div class="flex-wrapper flex-wrapper--space-between flex-wrapper--center top-padding">
<div class="card__body__location mui--text-light zero-bottom-margin">{% if featured_project.primary_venue %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {% if featured_project.primary_venue.city %}{{ featured_project.primary_venue.city }}{% else %}{{ featured_project.primary_venue.title }}{% endif %}{% elif featured_project.location %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {{ featured_project.location }}{% endif %}</div>
</div>
{%- if featured_project.primary_venue or featured_project.location %}
<div class="flex-wrapper flex-wrapper--space-between flex-wrapper--center top-padding">
<div class="card__body__location mui--text-light">
{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }}
{%- if featured_project.primary_venue.title and featured_project.primary_venue.city %}
{% trans venue=featured_project.primary_venue.title, city=featured_project.primary_venue.city -%}
{{ venue }}, {{ city }}
{%- endtrans %}
{%- elif featured_project.primary_venue.title %}
{{ featured_project.primary_venue.title }}
{%- elif featured_project.location %}
{{ featured_project.location }}
{%- endif -%}
</div>
</div>
{%- endif %}
</div>
{% endif %}
</div>

0 comments on commit a1da11b

Please sign in to comment.