diff --git a/app/routes.py b/app/routes.py index 8bd9da1..abe726b 100644 --- a/app/routes.py +++ b/app/routes.py @@ -3,20 +3,25 @@ from datetime import date from flask import render_template from app import app +def get_rides(): + rides_file = open( getcwd() + sep + "data/rides.txt") + rides = [ date.strptime( ride_date_str ,"%Y/%m/%d") for ride_date_str in rides_file.read().split("\n") ] + return rides + def get_next_ride_date( rides_list ): rides_list.sort() active_rides = [] for ride_date in rides_list: if ride_date > date.today(): active_rides.append( ride_date ) - return active_rides[0] - + next_ride = active_rides[0] + return next_ride @app.route('/') @app.route('/index') def index(): - rides_file = open( getcwd() + sep + "data/rides.txt") - rides = [ date.strptime( ride_date_str ,"%Y/%m/%d") for ride_date_str in rides_file.read().split("\n") ] + + rides = get_rides() next_ride = get_next_ride_date(rides) user = {'username': 'Jorge'} diff --git a/app/static/img/photos/IMG_2658.jpeg b/app/static/img/photos/IMG_2658.jpeg new file mode 100644 index 0000000..f580c23 Binary files /dev/null and b/app/static/img/photos/IMG_2658.jpeg differ diff --git a/app/static/img/photos/PXL_20251107_163113968.MP_preview_small.jpg b/app/static/img/photos/PXL_20251107_163113968.MP_preview_small.jpg new file mode 100644 index 0000000..903e336 Binary files /dev/null and b/app/static/img/photos/PXL_20251107_163113968.MP_preview_small.jpg differ diff --git a/app/static/img/photos/PXL_20260206_163621265.jpg b/app/static/img/photos/PXL_20260206_163621265.jpg new file mode 100644 index 0000000..aceb8f0 Binary files /dev/null and b/app/static/img/photos/PXL_20260206_163621265.jpg differ diff --git a/app/static/img/photos/PXL_20261007_152302439.MP.jpg b/app/static/img/photos/PXL_20261007_152302439.MP.jpg new file mode 100644 index 0000000..e332b06 Binary files /dev/null and b/app/static/img/photos/PXL_20261007_152302439.MP.jpg differ diff --git a/app/static/style.css b/app/static/style.css index 850e7eb..70443da 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -11,6 +11,7 @@ --wr-red:#d52311; --wr-white:#ffffff; --wr-yellow:#e8d55d; + --wr-border-radius: 1em; } @font-face { font-family: abelRegular; /* set name */ @@ -46,6 +47,9 @@ body{ } .ride_date.active{ color: #390747; + background-color: #ffffff; + padding: .5em; + border-radius: .25em; } h1,h3{ color: var(--wr-yellow); @@ -72,6 +76,7 @@ img.icon{ max-width: 100%; max-height: 3em; float: left; + border-radius: 0em; } img.emwrlogo{ max-width: 100%; @@ -80,7 +85,26 @@ img.emwrlogo{ img.map{ max-width: 100%; max-height: 50em; + border-radius: var(--wr-border-radius); + } + +img.photo{ + padding: .25em; + height: 12em; + object-fit: cover; + border-radius: var(--wr-border-radius); +} +img.photo.A{ + width: 12em; +} +img.photo.B{ + width: 18em; +} +img.photo.C{ + width: 8em; +} + div.page{ display: flex; justify-content: center; @@ -100,3 +124,18 @@ div.next_ride_reminder{ bottom: 1em; right: 1em; } + +.widget{ + background-color: #14253d; + height: 1em; +} +.widget:before { + content: url('./img/wr_clock.svg'); + max-height: 1em; + max-width: 1em; +} +.widget:after { + content: url('./img/wr_clock.svg'); + max-height: 1em; + max-width: 1em; +} \ No newline at end of file diff --git a/app/templates/index.html b/app/templates/index.html index ec8717f..95ae2a3 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -4,9 +4,15 @@

- www.ccwalkandroll.com
+ ccwalkandroll.com
-

+

+

+ + + +
+
If you don't have your tags, ask for one from one of our volunteers to get participation credit!

@@ -46,10 +52,10 @@
{% for ride in rides %} - {% if ride > next_ride %} -
{{ ride.strftime("%b-%d") }}
+ {% if ride == next_ride %} +
{{ ride.strftime("%b-%d") }}
{% else %} -
{{ ride.strftime("%b-%d") }}
+
{{ ride.strftime("%b-%d") }}
{% endif %} {% endfor %}
diff --git a/data/rides.txt b/data/rides.txt index daed629..d8d193c 100644 --- a/data/rides.txt +++ b/data/rides.txt @@ -1,5 +1,4 @@ -1979/10/16 -2026/10/02 +2026/10/07 2026/11/06 2026/12/04 2027/01/08 diff --git a/docker-compose.yml b/docker-compose.yml index f4ff29d..299a183 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,9 +3,9 @@ version: "2" services: emwr_flask: container_name: emwr_flask - image: emwr:latest + image: emwr:docker restart: always networks: - default ports: - - "5005:5000/udp" + - "5005:5000"