Learn how to use Rust to build ATProto powered applications
at main 2.4 kB view raw
1{% extends "base.html" %} 2 3{% block content %} 4<div id="root"> 5 <div class="error"></div> 6 <div id="header"> 7 <h1>Rusty Statusphere</h1> 8 <p>Set your status on the Atmosphere.</p> 9 </div> 10 <div class="container"> 11 <div class="card"> 12 {% if let Some(Profile {did, display_name}) = profile %} 13 <form action="/logout" method="get" class="session-form"> 14 <div> 15 Hi, 16 {% if let Some(display_name) = display_name %} 17 <strong>{{display_name}}</strong> 18 {% else %} 19 <strong>friend</strong> 20 {% endif %}. What's 21 your status today?? 22 </div> 23 <div> 24 <button type="submit">Log out</button> 25 </div> 26 </form> 27 {% else %} 28 <div class="session-form"> 29 <div><a href="/login">Log in</a> to set your status!</div> 30 <div> 31 <a href="/login" class="button">Log in</a> 32 </div> 33 </div> 34 {% endif %} 35 36 37 </div> 38 <form action="/status" method="post" class="status-options"> 39 {% for status in status_options %} 40 <button 41 class="{% if let Some(my_status) = my_status %} {%if my_status == status %} status-option selected {% else %} status-option {% endif %} {% else %} status-option {%endif%} " 42 name="status" value="{{status}}"> 43 {{status}} 44 </button> 45 46 {% endfor %} 47 </form> 48 {% for status in statuses %} 49 <div class="{% if loop.first %} status-line no-line {% else %} status-line {% endif %} "> 50 <div> 51 <div class="status">{{status.status}}</div> 52 </div> 53 <div class="desc"> 54 <a class="author" 55 href="https://bsky.app/profile/{{status.author_did}}">{{status.author_display_name()}}</a> 56 {% if status.is_today() %} 57 is feeling {{status.status}} today 58 {% else %} 59 was feeling {{status.status}} on {{status.created_at}} 60 {% endif %} 61 </div> 62 </div> 63 {% endfor %} 64 </div> 65</div> 66 67{%endblock content%}