Started including test photos
This commit is contained in:
+9
-4
@@ -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'}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.2 MiB |
@@ -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;
|
||||
}
|
||||
@@ -4,9 +4,15 @@
|
||||
<div class="page">
|
||||
<div class="container">
|
||||
<img class="emwrlogo" src="/static/img/wr_logo.svg"></br>
|
||||
<a class="ccwr_url" href="www.ccwalkandroll.com">www.ccwalkandroll.com</a></br>
|
||||
<a class="ccwr_url" href="https://ccwalkandroll.com/">ccwalkandroll.com</a></br>
|
||||
<img class="icon" src="/static/img/wr_phone.svg">
|
||||
<p>
|
||||
<p>
|
||||
<div class="imgcont">
|
||||
<img class="photo A" src="/static/img/photos/IMG_2658.jpeg">
|
||||
<img class="photo B" src="/static/img/photos/PXL_20251107_163113968.MP_preview_small.jpg">
|
||||
<img class="photo C" src="/static/img/photos/PXL_20260206_163621265.jpg">
|
||||
<img class="photo C" src="/static/img/photos/PXL_20261007_152302439.MP.jpg"><br>
|
||||
</div>
|
||||
If you don't have your tags, ask for one from one of our volunteers to get participation credit!
|
||||
</p>
|
||||
<h1>
|
||||
@@ -46,10 +52,10 @@
|
||||
<div class="row" >
|
||||
<img class="icon" src="/static/img/wr_calendar.svg">
|
||||
{% for ride in rides %}
|
||||
{% if ride > next_ride %}
|
||||
<div class="ride_date ">{{ ride.strftime("%b-%d") }}</div>
|
||||
{% if ride == next_ride %}
|
||||
<div class="widget ride_date active">{{ ride.strftime("%b-%d") }}</div>
|
||||
{% else %}
|
||||
<div class="ride_date active">{{ ride.strftime("%b-%d") }}</div>
|
||||
<div class="widget ride_date">{{ ride.strftime("%b-%d") }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
1979/10/16
|
||||
2026/10/02
|
||||
2026/10/07
|
||||
2026/11/06
|
||||
2026/12/04
|
||||
2027/01/08
|
||||
|
||||
+2
-2
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user