소스 검색

Added description to main page and basic notices system.

master
Trey Del Bonis 2 년 전
부모
커밋
f664e7bfb7
2개의 변경된 파일33개의 추가작업 그리고 0개의 파일을 삭제
  1. 6
    0
      app.py
  2. 27
    0
      templates/main.htm

+ 6
- 0
app.py 파일 보기

@@ -66,6 +66,12 @@ async def render_main(req: Request):
'num_days': num_days,
'days': converted
},
'notices': [
{
'style': 'primary',
'text': 'There were so many incidents in August 2021 that news sites stopped reporting on it, so there\'s some missing data here.',
}
],
'request': req,
}


+ 27
- 0
templates/main.htm 파일 보기

@@ -24,7 +24,34 @@
</div>

<div id="main" class="container">
<h1>Why?</h1>
<p>
If you're unfamiliar with Boston, there's a
<a href="https://en.wikipedia.org/wiki/Storrow_Drive">road along the Charles river</a>
known for having several low bridges going over it. People seem to have a
lot of problems with it when driving tall trucks, especially movers driving
U-Hauls.
</p>
<p>
I made this website because I thought it was funny. It works by searching
for news articles with certain keywords on Google on each day. This only
works well if the incidents are reported on on news sites/etc, but there are
false-positives (which you can report soon!). There's also a way to request
incident data directly the 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
more dedicated to work on.
</p>

<h1>Articles</h1>

<div id="notices">
{% for n in notices %}
<div class="alert alert-{{ n.style }}">
{{ n.text }}
</div>
{% endfor %}
</div>

<div id="days">
{% for d in sb.days %}
<div class="day mb-3">

Loading…
취소
저장