[2024-10-12] Adding footer, minor fixes to Python
This commit is contained in:
parent
f1c63d0ecf
commit
7356b00de1
@ -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 */
|
||||
}
|
||||
|
@ -33,8 +33,13 @@
|
||||
<div class="left">
|
||||
🧬 the history of life on Earth, {{ homoSapiens }}
|
||||
</div><br>
|
||||
<footer>
|
||||
</footer>
|
||||
<br>
|
||||
<div class="footer">
|
||||
<a href="mailto:andrew@andrewconl.in">📨 Suggestions?</a> |
|
||||
<a href="https://github.com/andrwcnln/year-progress">🧑💻 Source</a> |
|
||||
<a href="https://concrete.style">🎨 Style</a> |
|
||||
<a href="https://ko-fi.com">☕ Buy me a coffee!</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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)
|
||||
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user