diasporadiaries

a platform for writing stories with personal accounts and messages
git clone https://git.parazyd.org/diasporadiaries
Log | Files | Refs | Submodules | README | LICENSE

profile.html (3541B)


      1 {% include 'header.html' %}
      2 
      3   <title>Diaries by {{ name }} | Diaspora Diaries</title>
      4 
      5 {% include 'nav.html' %}
      6 
      7   <main role="main" class="container cover">
      8 
      9     <h1 class="cover-heading">Diaries by {{ name }}</h1>
     10     <hr>
     11 
     12     <div class="container">
     13       {% if current_user.id == uid %}
     14       <a href="/following" class="btn btn-outline-primary">People you follow</a>
     15       <a href="/changepass" class="btn btn-outline-primary">Change your password</a>
     16       <hr>
     17       {% else %}
     18       <form action="/follow" method="POST" id="followform">
     19         <input type="hidden" name="Id" value="{{ uid }}">
     20         {% if is_following %}
     21         <input type="hidden" name="Act" value="unfollow">
     22         <input type="submit" class="btn btn-primary" value="Following" title="Click to unfollow">
     23         {% else %}
     24         <input type="hidden" name="Act" value="follow">
     25         <input type="submit" class="btn btn-outline-primary" value="Follow">
     26         {% endif %}
     27       </form>
     28       {% endif %}
     29       <hr>
     30     </div>
     31 
     32 {% include 'gallery.html' %}
     33 
     34     {% if current_user.is_active %}
     35     <hr>
     36     <div class="container text-center">
     37       <a href="/messages?from={{ uid }}" class="btn btn-outline-primary">Send PM</a>
     38       <button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#shoutModal">
     39         Leave shout
     40       </button>
     41     </div>
     42 
     43     <div class="modal fade" id="shoutModal" tabindex="-1" role="dialog" aria-labelledby="shoutModalTitle" aria-hidden="true">
     44       <div class="modal-dialog modal-dialog-centered" role="document">
     45         <div class="modal-content">
     46           <div class="modal-header">
     47             <h5 class="modal-title" id="shoutModalLongTitle">Leave shout</h5>
     48             <button type="button" class="close" data-dismiss="modal" aria-label="Close">
     49               <span aria-hidden="true">&times;</span>
     50             </button>
     51           </div>
     52           <div class="modal-body">
     53             <p>Write shout:</p>
     54             <form action="/sendshout" method="POST" id="shoutform">
     55               <input type="hidden" name="Id" value="{{ uid }}">
     56               <input type="hidden" name="Us" value="{{ current_user.id }}">
     57               <textarea name="Message" class="form-control" form="shoutform" required></textarea>
     58             </form>
     59           </div>
     60           <div class="modal-footer">
     61             <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
     62             <button form="shoutform" type="submit" class="btn btn-outline-success">Shout</button>
     63           </div>
     64         </div>
     65       </div>
     66     </div>
     67     {% endif %}
     68 
     69     <hr>
     70     <h3>Shoutbox</h3>
     71     {% if not shouts %}
     72     <hr>
     73     <p>No shouts.</p>
     74     {% endif %}
     75 
     76     {% for i in shouts %}
     77       <hr>
     78       <blockquote class="blockquote">
     79         <p>{{ i['message'] }}</p>
     80         <footer class="blockquote-footer">
     81           {{ i['from'] }} - {{ parsetime(i['time']) }}
     82           {% if current_user.id == uid or current_user.is_admin %}
     83           <form action="/delshout" method="POST" id="shoutdel_{{ loop.index }}">
     84             <input type="hidden" name="Id" value="{{ uid }}">
     85             <input type="hidden" name="ShoutId" value="{{ i['id'] }}">
     86             <button type="submit" class="btn btn-sm" title="Delete this shout" form="shoutdel_{{ loop.index }}">
     87               <span class="fa">&times;</span>
     88             </button>
     89           </form>
     90           {% endif %}
     91         </footer>
     92       </blockquote>
     93     {% endfor %}
     94     <hr>
     95 
     96   </main>
     97 
     98 {% include 'footer.html' %}