Skip to content

Commit

Permalink
Replace contact card style with desc list
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Feb 12, 2021
1 parent bb4b0ed commit 7690876
Showing 1 changed file with 78 additions and 93 deletions.
171 changes: 78 additions & 93 deletions wcivf/apps/people/templates/people/person_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,101 +168,86 @@ <h3>Associated companies</h3>
{% endif %}

<!-- CONTACT CARD -->
<section class="ds-card">
<div class="ds-card-body ds-stack-smaller">
<h2 class="ds-candidate-name ds-h3">
{{ object.name }} online
</h2>
<dl class="ds-descriptions">
<!-- create a method on the model
to have a list of all social media urls
for loop
if statement -->

<!-- refactor this as a definition list -->
<ul>
<!-- First Column -->
<li class="dc-stack-smallest">
<p>
{% if object.facebook_page_url or object.facebook_personal_url %}
<i class="icon-facebook-squared" aria-hidden="true" title="Facebook"></i>
Facebook
{% endif %}
</p>
<!-- add conditional here -->
<p>
<i class="icon-globe" aria-hidden="true" title="Candidate Party Page"></i>
Candidate Party Page
</p>
<p>
{% if object.email %}
<i class="icon-mail" aria-hidden="true" title="Email"></i>
Email
{% endif %}
</p>
<p>
{% if object.linkedin_url %}
<i class="icon-linkedin-squared" aria-hidden="true" title="LinkedIn"></i>
LinkedIn
{% endif %}
</p>
<p>
{% if object.instagram_url %}
<i class="icon-mail" aria-hidden="true" title="Instagram"></i>
Instagram
{% endif %}
</p>
</li>
<!-- Second Column -->
<li class="dc-stack-smallest">
<p>{% if object.facebook_page_url or object.facebook_personal_url %}
<a href="{{ object.facebook_page_url }}" title="{{ object.name }}">
{{ object.name }}
</a>
<div>
{% if object.facebook_page_url or object.facebook_personal_url %}
<dt>Facebook</dt>
<dd>
{% if object.facebook_personal_url %}
{% if object.facebook_page_url and object.facebook_personal_url %}Personal profile: {% endif %}<a
href="{{ object.facebook_personal_url }}" title="{{ object.name }}'s Facebook page">
{{ object. }}
</a><br />
{% endif %}
{% if object.facebook_page_url %}
{% if object.facebook_page_url and object.facebook_personal_url %}Public page: {% endif %}<a
href="{{ object.facebook_page_url }}" title="{{ object.name }}'s Facebook profile">
{{ object.facebook_page_url }}
</a>
{% endif %}
</p>
<p>
{% if object.homepage_url %}
<a href="{{ object.homepage_url }}" title="{{ object.name }}'s home page">
{{ object.homepage_url }}
</a>
{% endif %}
</p>
<p>
{% if object.email and object.current_or_future_candidacies %}
<a href="mailto:{{ object.email }}">{{ object.email }}</a>
{% else %}
We don't know {{ object.name }}'s email address. <a href="{{ object.get_ynr_url }}">Can you add it?</a>
{% endif %}
</p>
<p>
<p>
<p>
{% if object.linkedin_url %}}
<a href="{{ object.linkedin_url }}" title="{{ object.name }}'s LinkedIn profile">
{{ object.linkedin_url }}
</a>
{% endif %}
</p>
</p>
</p>
<p>
{% if object.instagram_url %}
<a href="{{ object.instagram_url }}" title="{{ object.name }}'s instagram">
{{ object.instagram_url }}
</a>
{% endif %}
</p>
</li>
</ul>
{% if object.twitter_username %}
<h3>Latest tweets</h3>
<div class="twitter_container">
<a data-width="100%" data-height="500" class="twitter-timeline"
href="https://twitter.com/{{ object.twitter_username }}">
Tweets by @{{ object.twitter_username }}</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
{% endif %}

{#{% include "people/includes/facebook_adverts_card.html" %}#}
</div>
</section>
{% endif %
</dd>
{% endif %}
</div>
<div>
{% if object.linkedin_url %}
<dt>LinkedIn</dt>
<dd>
<a href="{{ object.linkedin_url }}" title="{{ object.name }}'s LinkedIn profile">
{{ object.linkedin_url }}
</a>
</dd>
{% endif %}
<div>
{% if object.homepage_url %}
<dt>Home page</dt>
<dd>
<a href="{{ object.homepage_url }}" title="{{ object.name }}'s home page">
{{ object.homepage_url }}
</a>
</dd>
{% endif %}
</div>
<div>
{% if object.instagram_url %}
<dt>Instagram</dt>
<dd>
<a href="{{ object.instagram_url }}" title="{{ object.name }}'s instagram">
{{ object.instagram_url }}
</a>
</dd>
{% endif %}
</div>
{% if object.youtube_profile %}
<dt>YouTube</dt>
<dd>
<a href="{{ object.youtube_profile }}" title="{{ object.name }}'s YouTube">
{{ object.youtube_profile }}
</a>
</dd>
{% endif %}
{% if object.party_ppc_page_url %}
<dt>The party's candidate page for this person</dt>
<dd>
<a href="{{ object.party_ppc_page_url }}" title="Party page for {{ object.name }}">
{{ object.party_ppc_page_url }}
</a>
</dd>
{% if object.email and object.current_or_future_candidacies %}
<dt>Email</dt>
<dd><a href="mailto:{{ object.email }}">{{ object.email }}</a></dd>
{% else %}
We don't know {{ object.name }}'s email address.
<a href="{{ object.get_ynr_url }}">Can you add it?</a>
{% endif %}
{% endif %}
</div>
</dl>

<!-- PREVIOUS ELECTIONS CARD -->
{% if object.past_not_current_candidacies %}
Expand Down

0 comments on commit 7690876

Please sign in to comment.