about summary refs log blame commit diff
path: root/templates/index.html
blob: 024d0aef534d136e711206bb3f64b083eedb4381 (plain) (tree)
1
2
3
4
5
6
7
8
9

                
        

                                                                                          
                                                                            


                                                                                                                                                                                                                    

         




                                                                             
                                                                

                                                                                                                  








                                                                                     
                                                                                                                                                                                        
                                                                
                                                                                                                                              
                                                                                                                          
                    



                                                                       



                         
            
          

         
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="Content-Security-Policy" content="script-src 'self';">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <title>Converse Index</title>
  </head>
  <body>
    <header>
      <nav class="navbar navbar-light bg-light justify-content-between mb-3">
        <a class="navbar-brand" href="/">
          <h2>Converse</h2>
        </a>
        <form class="form-inline" method="get" action="/search">
          <input class="form-control mr-sm-2" type="search" placeholder="Search" name="query" aria-label="Search">
          <button class="btn btn-outline-success my-2 my-sm-0 mr-1" type="submit">Search</button>
          <a class="btn btn-outline-secondary my-2" href="/thread/new">New thread</a>
        </form>
      </nav>
    </header>
    <div class="container">
      <div class="row">
        <div class="col-12">
          <div class="list-group">
            {% for thread in threads -%}
            <a href="/thread/{{ thread.id }}" class="list-group-item list-group-item-action flex-column align-items-start {%- if thread.sticky %} bg-secondary text-white {% endif -%}">
              <div class="d-flex w-100 justify-content-between">
                <h5 class="mb-1">{% if thread.sticky %}<span class="badge badge-light">Sticky</span> {% endif %}{{ thread.title | safe }}</h5>
                <small class="{% if thread.sticky %}text-white{% else %}text-muted{% endif %}">{{ thread.posted }}</small>
              </div>
              <div class="d-flex justify-content-between">
                <p class="mb-1">Created by {{ thread.author_name }}</p>
                <small>Last post by {{ thread.post_author }}</small>
              </div>
            </a>
            {%- endfor %}
          </div>
        </div>
      </div>
    </div>
  </body>
</html>