You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.htm 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {% extends 'base.htm' %}
  2. {% macro render_article_link(desc, date) %}
  3. <div class="articleentry mt-2 mb-2">
  4. <div class="row">
  5. <div class="col">
  6. <div>
  7. <span class="badge">{{ desc.domain }}</span>
  8. </div>
  9. <div>
  10. <a href="{{ desc.url }}">{{ desc.title }}</a>
  11. </div>
  12. </div>
  13. <div class="articlereport col-md-auto">
  14. <form action="/action/flag" method="POST">
  15. <input type="hidden" name="date" value="{{ date }}"/>
  16. <input type="hidden" name="article" value="{{ desc.url }}"/>
  17. <input class="btn btn-secondary" type="submit" value="Flag False Positive"/>
  18. </form>
  19. </div>
  20. </div>
  21. </div>
  22. {% endmacro %}
  23. {% block content %}
  24. <div class="uhaul_cont">
  25. <div>
  26. It has been
  27. </div>
  28. <div class="uhaul_main">
  29. <div class="uhaul_num">
  30. {{ sb.num_days }}
  31. </div>
  32. <div class="uhaul_days">
  33. days
  34. </div>
  35. </div>
  36. <div class="uhaul_footer">
  37. since Storrow Dr. was in the news
  38. </div>
  39. </div>
  40. <div id="main" class="container">
  41. <h1>Why?</h1>
  42. <p>
  43. If you're unfamiliar with Boston, there's a
  44. <a href="https://en.wikipedia.org/wiki/Storrow_Drive">road along the Charles river</a>
  45. known for having several low bridges going over it. People seem to have a
  46. lot of problems with it when driving tall trucks, especially movers driving
  47. U-Hauls.
  48. </p>
  49. <p>
  50. I made this website because I thought it was funny. It works by searching
  51. for news articles with certain keywords on Google on each day. This only
  52. works well if the incidents are reported on on news sites/etc, but there are
  53. false-positives (which you can report!). There's also a way to request
  54. incident data directly from MassDOT, but that's a lot more work to pull data
  55. from and I'm not sure how quickly it's updated so I'll leave that to someone
  56. more dedicated to <a href="https://code.tr3y.io/treyzania/storrowed.boston">work on</a>.
  57. A common type of false positive that shows up with this is when a news site
  58. publishes an article about Storrow in general rather than a specific event,
  59. so feel free to report those if you want.
  60. </p>
  61. <h1>Articles</h1>
  62. <div id="notices">
  63. {% for n in notices %}
  64. <div class="alert alert-{{ n.style }}">
  65. {{ n.text }}
  66. </div>
  67. {% endfor %}
  68. </div>
  69. <div id="days">
  70. {% for d in sb.days %}
  71. <div class="day mb-3">
  72. <h3>{{ d.date }}</h3>
  73. <div>
  74. {% for l in d.links %}
  75. {{ render_article_link(l, d.date) }}
  76. {% endfor %}
  77. </div>
  78. {% if d.maybe_links|length > 0 %}
  79. <details>
  80. <summary><em>and {{ d.maybe_links|length }} weak match(es)</em></summary>
  81. <div>
  82. {% for l in d.maybe_links %}
  83. {{ render_article_link(l, d.date) }}
  84. {% endfor %}
  85. </div>
  86. </details>
  87. {% endif %}
  88. </div>
  89. {% endfor %}
  90. </div>
  91. <h1>Submit</h1>
  92. <div id="submit">
  93. Found an article that my shitty code missed? Submit it here and it'll
  94. verify and list it!
  95. <form class="row mt-3" action="/action/submit" method="POST">
  96. <div class="col-auto form-group mb-2">
  97. <input class="form-control" type="url" id="submit_url" name="article" placeholder="Article link" required/>
  98. </div>
  99. <div class="col-auto">
  100. <button class="btn btn-primary" type="submit">Submit</button>
  101. </div>
  102. </form>
  103. </div>
  104. </div>
  105. {% endblock %}