diff --git a/static/style.css b/static/style.css index 5a693d8..6039c12 100644 --- a/static/style.css +++ b/static/style.css @@ -6,9 +6,10 @@ body { div.content { width: 50%; - height: auto; + height: 100%; margin: 0 auto; position: relative; + border: 1px solid var(--bg); } @media screen and (max-width: 1440px) { @@ -45,7 +46,7 @@ progress { } div.left { - border: 2px solid black; + border: 2px solid var(--fg); width: fit-content; height: fit-content; padding: 5px; @@ -55,7 +56,7 @@ div.left { } div.right { - border: 2px solid black; + border: 2px solid var(--fg); width: fit-content; height: fit-content; padding: 5px; @@ -63,3 +64,13 @@ div.right { margin-left: auto; margin-right: 0; } + +div.footer { + position: absolute; + left: 0; + right: 0; + bottom: 5px; + margin-left: auto; + margin-right: auto; + width: 100%; /* Need a specific value to work */ +} diff --git a/templates/index.html b/templates/index.html index 653ef9d..c638dae 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,8 +33,13 @@
🧬 the history of life on Earth, {{ homoSapiens }}

- +
+ diff --git a/year-progress.py b/year-progress.py index 34f052a..165b1d4 100644 --- a/year-progress.py +++ b/year-progress.py @@ -35,7 +35,6 @@ def cartesianToLatLong(x,y,z): return lat, long - def getPercentageLatLong(yearPercent,lat1,long1,lat2,long2): # http://www.geomidpoint.com/calculation.html x1, y1, z1 = latLongToCartesian(lat1,long1) @@ -73,46 +72,46 @@ def abbeyRoad(yearPercent): # 3:27 elif numSeconds <= 441+(3*60+27): return "Maxwell's Silver Hammer" - #3:27 + # 3:27 elif numSeconds <= 648+(3*60+27): return "Oh! Darling" - #2:50 + # 2:50 elif numSeconds <= 855+(2*60+50): return "Octopus's Garden" - #7:47 + # 7:47 elif numSeconds <= 1025+(7*60+47): return "I Want You (She's So Heavy)" - #3:05 + # 3:05 elif numSeconds <= 1492+(3*60+5): return "Here Comes The Sun" - #2:45 + # 2:45 elif numSeconds <= 1677+(2*60+45): return "Because" - #4:02 + # 4:02 elif numSeconds <= 1842+(4*60+2): return "You Never Give Me Your Money" - #2:26 + # 2:26 elif numSeconds <= 2084+(2*60+26): return "Sun King" - #1:06 + # 1:06 elif numSeconds <= 2230+(1*60+6): return "Mean Mr. Mustard" - #1:12 + # 1:12 elif numSeconds <= 2296+(1*60+12): return "Polythene Pam" - #1:58 + # 1:58 elif numSeconds <= 2368+(1*60+58): return "She Came In Through The Bathroom Window" - #1:31 + # 1:31 elif numSeconds <= 2486+(1*60+31): return "Golden Slumbers" - #1:36 + # 1:36 elif numSeconds <= 2577+(1*60+36): return "Carry That Weight" - #2:21 + # 2:21 elif numSeconds <= 2673+(2*60+21): return "The End" - #0:25 + # 0:25 else: return "Her Majesty" @@ -127,7 +126,7 @@ def transatlanticFlight(yearPercent): long2 = -73.780968 lat, long = getPercentageLatLong(yearPercent,lat1,long1,lat2,long2) - return lat, long + return round(lat,2), round(long,2) def getHomoSapiens(yearPercent): totalYears = 4.3e9 @@ -148,7 +147,7 @@ def getTemplate(): yearPercent = delta/totalDays footballMinute = math.floor(yearPercent*90) workDay, workTime = workWeek(yearPercent) - marathonMile = 26.2 - math.floor(yearPercent*26.2) + marathonMile = round(26.2 - math.floor(yearPercent*26.2),2) abbeyRoadSong = abbeyRoad(yearPercent) hobbitChapter = "having an unexpected party" lat, long = transatlanticFlight(yearPercent) @@ -156,9 +155,6 @@ def getTemplate(): return now.year, nowTime, nowDate, round(yearPercent*100,2), footballMinute, workDay, workTime, marathonMile, abbeyRoadSong, hobbitChapter, lat, long, homoSapiens -# Transatlantic flight -# History of the earth - @app.route("/") def index(): year, nowTime, nowDate, yearPercent, footballMinute, workDay, workTime, marathonMile, abbeyRoadSong, hobbitChapter, lat, long, homoSapiens = getTemplate()