Browse Source

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

tags/v1.9.8
Danielle McLean 1 year ago
parent
commit
39d0a64c34
Signed by: Danielle McLean <dani@00dani.me> GPG Key ID: D111F8C5A2560F19
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      home/templates/home/index.html

+ 4
- 4
home/templates/home/index.html View File

@@ -33,7 +33,7 @@
33 33
 			</ul>
34 34
 		</div>
35 35
 
36
-		<div class="card-footer">
36
+		{% if user.keys.exists %}<div class="card-footer">
37 37
 			<ul class="profiles">
38 38
 				{% for key in user.keys.all %}<li>
39 39
 					<a class="u-key" href="{{ key.file.url }}">
@@ -42,15 +42,15 @@
42 42
 				</li>
43 43
 				{% endfor %}
44 44
 			</ul>
45
-		</div>
45
+		</div>{% endif %}
46 46
 
47
-		<div class="card-footer">
47
+		{% if user.profiles.exists %}<div class="card-footer">
48 48
 			<ul class="profiles">
49 49
 				{% for profile in user.profiles.all %}<li>
50 50
 					<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>
51 51
 				</li>{% endfor %}
52 52
 			</ul>
53
-		</div>
53
+		</div>{% endif %}
54 54
 
55 55
 		<script class="p-json-ld" type="application/ld+json">{{ user.json_ld | jsonify }}</script>
56 56
 	</article>

Loading…
Cancel
Save