Explorar el Código

Updated styling on main page things to make it look nicer.

master
Trey Del Bonis hace 2 años
padre
commit
0dc0ccbe19
Se han modificado 2 ficheros con 32 adiciones y 17 borrados
  1. 4
    0
      static/style.css
  2. 28
    17
      templates/main.htm

+ 4
- 0
static/style.css Ver fichero

font-size: 36pt; font-size: 36pt;
} }


.articleentry {
margin: 2em;
}

@media screen and (max-width: 52em) { @media screen and (max-width: 52em) {
.uhaul_cont { .uhaul_cont {
font-size: 24pt; font-size: 24pt;

+ 28
- 17
templates/main.htm Ver fichero

{% extends 'base.htm' %} {% extends 'base.htm' %}


{% macro render_article_link(desc, date) %} {% macro render_article_link(desc, date) %}
<li>
<a href="{{ desc.url }}">{{ desc.title }}</a>
<form action="/action/flag" method="POST">
<input type="hidden" name="date" value="{{ date }}"/>
<input type="hidden" name="article" value="{{ desc.url }}"/>
<input type="submit" value="Flag False Positive"/>
</form>
</li>
<div class="articleentry row mt-2 mb-2">
<div class="col">
<a href="{{ desc.url }}">{{ desc.title }}</a>
</div>
<div class="articlereport col-md-auto">
<form action="/action/flag" method="POST">
<input type="hidden" name="date" value="{{ date }}"/>
<input type="hidden" name="article" value="{{ desc.url }}"/>
<input class="btn btn-secondary" type="submit" value="Flag False Positive"/>
</form>
</div>
</div>
{% endmacro %} {% endmacro %}


{% block content %} {% block content %}
incident data directly from MassDOT, but that's a lot more work to pull data incident data directly from MassDOT, but that's a lot more work to pull data
from and I'm not sure how quickly it's updated so I'll leave that to someone from and I'm not sure how quickly it's updated so I'll leave that to someone
more dedicated to <a href="https://code.tr3y.io/treyzania/storrowed.boston">work on</a>. more dedicated to <a href="https://code.tr3y.io/treyzania/storrowed.boston">work on</a>.
A common type of false positive that shows up with this is when a news site
publishes an article about Storrow in general rather than a specific event,
so feel free to report those if you want.
</p> </p>


<h1>Articles</h1> <h1>Articles</h1>
{% for d in sb.days %} {% for d in sb.days %}
<div class="day mb-3"> <div class="day mb-3">
<h3>{{ d.date }}</h3> <h3>{{ d.date }}</h3>
<ul>
<div>
{% for l in d.links %} {% for l in d.links %}
{{ render_article_link(l, d.date) }} {{ render_article_link(l, d.date) }}
{% endfor %} {% endfor %}
</ul>
</div>
{% if d.maybe_links|length > 0 %} {% if d.maybe_links|length > 0 %}
<details> <details>
<summary><em>and {{ d.maybe_links|length }} weak match(es)</em></summary> <summary><em>and {{ d.maybe_links|length }} weak match(es)</em></summary>
<ul>
<div>
{% for l in d.maybe_links %} {% for l in d.maybe_links %}
{{ render_article_link(l, d.date) }} {{ render_article_link(l, d.date) }}
{% endfor %} {% endfor %}
</ul>
</div>
</details> </details>
{% endif %} {% endif %}
</div> </div>
<h1>Submit</h1> <h1>Submit</h1>


<div id="submit"> <div id="submit">
Found an article that my shitty code missed? Submit it here!
Found an article that my shitty code missed? Submit it here and it'll
verify and list it!


<form action="/action/submit" method="POST">
<label for="submit_url">Evidence</label>
<input type="url" id="submit_url" name="article" required/>
<input type="submit" value="Submit"/>
<form class="row mt-3" action="/action/submit" method="POST">
<div class="col-auto form-group mb-2">
<input class="form-control" type="url" id="submit_url" name="article" placeholder="Article link" required/>
</div>
<div class="col-auto">
<button class="btn btn-primary" type="submit">Submit</button>
</div>
</form> </form>
</div> </div>
</div> </div>

Cargando…
Cancelar
Guardar