refactor(templates): Restyle thread view using flex layout
This commit is contained in:
		
							parent
							
								
									9cee48f2da
								
							
						
					
					
						commit
						ee4b690d22
					
				
					 1 changed files with 36 additions and 49 deletions
				
			
		| 
						 | 
					@ -21,61 +21,48 @@
 | 
				
			||||||
    </header>
 | 
					    </header>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="container">
 | 
					    <div class="container">
 | 
				
			||||||
      <div class="row">
 | 
					      <div class="list-group d-flex flex-column">
 | 
				
			||||||
        <div class="col-12">
 | 
					        <div class="list-group-item d-flex">
 | 
				
			||||||
          <div class="list-group">
 | 
					 | 
				
			||||||
            <div class="list-group-item flex-column">
 | 
					 | 
				
			||||||
              <div class="row">
 | 
					 | 
				
			||||||
                <div class="col-12">
 | 
					 | 
				
			||||||
          <h3>{{ title }}</h3>
 | 
					          <h3>{{ title }}</h3>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
              </div>
 | 
					 | 
				
			||||||
            </div>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        {% for post in posts -%}
 | 
					        {% for post in posts -%}
 | 
				
			||||||
            <div id="post-{{ post.id}}" class="list-group-item flex-column align-items-start">
 | 
					        <div id="post-{{ post.id}}" class="list-group-item d-flex flex-row">
 | 
				
			||||||
              <a href="/thread/{{ id }}#post-{{ post.id }}">
 | 
					          <div class="d-flex flex-column pr-3 mr-1 border-right">
 | 
				
			||||||
                <small class="text-muted float-right">{{ post.posted }}</small>
 | 
					            <img src="https://www.gravatar.com/avatar/{{ post.author_gravatar }}?d=monsterid" style="width: 80px;"/>
 | 
				
			||||||
              </a>
 | 
					 | 
				
			||||||
              <div class="row">
 | 
					 | 
				
			||||||
                <div class="col-2 border-right">
 | 
					 | 
				
			||||||
                  <div class="row">
 | 
					 | 
				
			||||||
                    <div class="col-12">
 | 
					 | 
				
			||||||
                      <img src="https://www.gravatar.com/avatar/{{ post.author_gravatar }}?d=monsterid" />
 | 
					 | 
				
			||||||
                    </div>
 | 
					 | 
				
			||||||
                  </div>
 | 
					 | 
				
			||||||
                  <div class="row">
 | 
					 | 
				
			||||||
                    <div class="col-12">
 | 
					 | 
				
			||||||
            <strong>{{ post.author_name }}</strong>
 | 
					            <strong>{{ post.author_name }}</strong>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
                  </div>
 | 
					
 | 
				
			||||||
                </div>
 | 
					          <div class="align-self-stretch">{{ post.body }}</div>
 | 
				
			||||||
                <div class="col-10">
 | 
					
 | 
				
			||||||
                  {{ post.body }}
 | 
					          <div class="d-inline-flex flex-column align-items-end ml-auto">
 | 
				
			||||||
 | 
					            <a href="/thread/{{ id }}#post-{{ post.id }}" class="ml-auto">
 | 
				
			||||||
 | 
					              <small class="text-muted float-right">{{ post.posted }}</small>
 | 
				
			||||||
 | 
					            </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <div class="d-inline-flex flex-row mt-auto ml-auto">
 | 
				
			||||||
 | 
					              {%- if post.editable %}
 | 
				
			||||||
 | 
					              <a href="#edit" class="badge badge-light border m-1 p-1">Edit</a>
 | 
				
			||||||
 | 
					              {% endif -%}
 | 
				
			||||||
 | 
					              <a href="#quote" class="badge badge-light border m-1 p-1">Quote</a>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        {%- endfor %}
 | 
					        {%- endfor %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div class="list-group-item flex-column align-items-start">
 | 
					        <div class="list-group-item flex-column align-items-start">
 | 
				
			||||||
              <div class="row">
 | 
					 | 
				
			||||||
                <div class="col-12">
 | 
					 | 
				
			||||||
          <form id="reply-form" action="/thread/reply" method="post">
 | 
					          <form id="reply-form" action="/thread/reply" method="post">
 | 
				
			||||||
            <input type="hidden" id="thread_id" name="thread_id" value="{{ id }}">
 | 
					            <input type="hidden" id="thread_id" name="thread_id" value="{{ id }}">
 | 
				
			||||||
            <label for="body">You can use <strong>Markdown</strong>!</label>
 | 
					            <label for="body">You can use <strong>Markdown</strong>!</label>
 | 
				
			||||||
            <div class="input-group">
 | 
					            <div class="input-group">
 | 
				
			||||||
                      <textarea class="form-control" id="body" name="body" aria-label="thread response"></textarea>
 | 
					              <textarea class="form-control" id="body" name="body" aria-label="thread response" rows="10"></textarea>
 | 
				
			||||||
              <div class="input-group-append">
 | 
					              <div class="input-group-append">
 | 
				
			||||||
                        <button class="btn btn-outline-primary" type="submit">Post!</button>
 | 
					                <button class="btn btn-primary" type="submit">Post!</button>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </form>
 | 
					          </form>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
  </body>
 | 
					  </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue