Nicely handle the unlikely case where the h-card contains absolutely no PGP keys and/or social profiles

This commit is contained in:
Danielle McLean 2018-05-10 14:23:05 +10:00
parent 9fb2e8552f
commit 39d0a64c34
Signed by: 00dani
GPG key ID: D111F8C5A2560F19

View file

@ -33,7 +33,7 @@
</ul> </ul>
</div> </div>
<div class="card-footer"> {% if user.keys.exists %}<div class="card-footer">
<ul class="profiles"> <ul class="profiles">
{% for key in user.keys.all %}<li> {% for key in user.keys.all %}<li>
<a class="u-key" href="{{ key.file.url }}"> <a class="u-key" href="{{ key.file.url }}">
@ -42,15 +42,15 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>{% endif %}
<div class="card-footer"> {% if user.profiles.exists %}<div class="card-footer">
<ul class="profiles"> <ul class="profiles">
{% for profile in user.profiles.all %}<li> {% for profile in user.profiles.all %}<li>
<a class="u-url" rel="me" href="{{ profile.url }}" title="{{ profile }}"><i class="{{ profile.site.icon }}" aria-hidden="true"></i><span class="sr-only">{{ profile }}</span></a> <a class="u-url" rel="me" href="{{ profile.url }}" title="{{ profile }}"><i class="{{ profile.site.icon }}" aria-hidden="true"></i><span class="sr-only">{{ profile }}</span></a>
</li>{% endfor %} </li>{% endfor %}
</ul> </ul>
</div> </div>{% endif %}
<script class="p-json-ld" type="application/ld+json">{{ user.json_ld | jsonify }}</script> <script class="p-json-ld" type="application/ld+json">{{ user.json_ld | jsonify }}</script>
</article> </article>