[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tpo/master] people page: add mastondon



commit 63236ce8ec57e1e4a4f29ff98211d587338f8ff0
Author: Antonela <hola@xxxxxxxxxxx>
Date:   Fri Sep 27 15:36:12 2019 -0300

    people page: add mastondon
    
    close #44 https://dip.torproject.org/torproject/web/tpo/issues/44
    
    I added mastodon support for the social links in about/people. If you want to add your mastodon link, find your name folder in content/about/people/nickname and add this line at the header
    
    ---
    mastodon_handle: your_handle
    ---
---
 content/about/people/meejah/contents.lr | 2 ++
 models/person.ini                       | 5 +++++
 templates/macros/people.html            | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/content/about/people/meejah/contents.lr b/content/about/people/meejah/contents.lr
index 24b5145..ade1175 100644
--- a/content/about/people/meejah/contents.lr
+++ b/content/about/people/meejah/contents.lr
@@ -14,6 +14,8 @@ gpg: https://meejah.ca/meejah.asc
 ---
 image: /static/images/people/meejah.png
 ---
+mastodon_handle: meejah
+---
 description:
 
 [Author](https://meejah.ca/) of [txtorcon](https://github.com/meejah/txtorcon), [carml](https://github.com/meejah/carml) and other Tor Python tools including some for bad-relay hunting.
diff --git a/models/person.ini b/models/person.ini
index fb6c59d..b4868da 100644
--- a/models/person.ini
+++ b/models/person.ini
@@ -12,6 +12,11 @@ label = Twitter Handle
 type = string
 addon_label = @
 
+[fields.mastodon_handle]
+label = Mastodon Handle
+type = string
+addon_label = @
+
 [fields.gpg]
 label = GPG
 type = string
diff --git a/templates/macros/people.html b/templates/macros/people.html
index 1a4d7d1..779d171 100644
--- a/templates/macros/people.html
+++ b/templates/macros/people.html
@@ -25,6 +25,9 @@
         {% if item.twitter_handle %}
           <a class="float-right py-4 px-2" href="https://twitter.com/{{ item.twitter_handle }}"><i class="fab fa-twitter-png-purple"></i></a>
         {% endif %}
+        {% if item.mastodon_handle %}
+            <a class="float-right py-4 px-2" href="https://mastodon.social/@{{ item.mastodon_handle }}"><i class="fab fa-mastodon-png-purple"></i></a>
+        {% endif %}
         {% if item.gpg %}
           {% set link = site.get(item.gpg) %}
           {% if link %}

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits