Browse Source

adding a new exercise section

master
jk 3 years ago
parent
commit
a832b2cdf1
  1. 9
      config.toml
  2. 4
      content/exercise.md
  3. 11
      data/workouts/230221.yaml
  4. 11
      data/workouts/250221.yaml
  5. 16
      layouts/exercise/single.html
  6. BIN
      static/images/workouts/fitotrack-workout_1614086080.jpg
  7. BIN
      static/images/workouts/fitotrack-workout_1614086080_thumb.jpg
  8. BIN
      static/images/workouts/fitotrack-workout_1614259085.jpg
  9. BIN
      static/images/workouts/fitotrack-workout_1614259085_thumb.jpg
  10. 18
      themes/nipponalba/layouts/index.html
  11. 54
      themes/nipponalba/static/css/style.css

9
config.toml

@ -108,11 +108,14 @@ weight = 700
url = "/resume/"
[[languages.en.menu.main]]
name = "Feeds"
name = "Exercise"
weight = 800
url = "/feeds/"
url = "/exercise/"
[[languages.en.menu.main]]
name = "Feeds"
weight = 900
url = "/feeds/"
[languages.jp]
weight = 10
languageName = "日本語"

4
content/exercise.md

@ -0,0 +1,4 @@
---
title: "Exercise"
type: exercise
---

11
data/workouts/230221.yaml

@ -0,0 +1,11 @@
---
type: "cycling"
date: 2021-02-23T12:40:19.837Z
comment: "Day 2 - very wet and very windy. I wanted to do a 2nd circuit but thought better of it."
distance: "3.56 km"
duration: "00:15:53"
pace: "4:27 min/km"
calories: "195 kcal"
image: '/images/workouts/fitotrack-workout_1614086080.jpg'
thumb: '/images/workouts/fitotrack-workout_1614086080_thumb.jpg'
---

11
data/workouts/250221.yaml

@ -0,0 +1,11 @@
---
type: "cycling"
date: 2021-02-25T12:32:56.442Z
comment: "Day three, tougher on my legs than expected. Very windy."
distance: "3.47 km"
duration: "00:14:47"
pace: "4:15 min/km"
calories: "201 kcal"
image: "/images/workouts/fitotrack-workout_1614259085.jpg"
thumb: "/images/workouts/fitotrack-workout_1614259085_thumb.jpg"
---

16
layouts/exercise/single.html

@ -0,0 +1,16 @@
{{ define "main" }}
<section class="exercise">
{{ range sort .Site.Data.workouts "date" "desc"}}
<section class="exercise_grid">
<span class="type"><b>Type</b><br/>{{ .type | humanize }}</span>
<span class="exdate"><b>Date</b><br/>{{ dateFormat "2 Jan 2006" .date }}</span>
<span class="comment"><b>Comment</b><br/>{{ .comment | humanize }}</span>
<span class="image"><b>Image</b><br/><a href="{{ .image }}" class="u-url"><img src="{{ .thumb }}" title="{{ .comment }}" alt="route map of outdoor exercise from fitotrack app" /></a></span>
<span class="distance"><b>Distance</b><br/>{{ .distance }}</span>
<span class="duration"><b>Duration</b><br/>{{ .duration }}</span>
<span class="pace"><b>Pace</b><br/>{{ .pace }}</span>
<span class="calories"><b>Calories burned</b><br/>{{ .calories }}</span>
</section>
{{ end }}
</section>
{{ end }}

BIN
static/images/workouts/fitotrack-workout_1614086080.jpg

After

Width: 600  |  Height: 992  |  Size: 192 KiB

BIN
static/images/workouts/fitotrack-workout_1614086080_thumb.jpg

After

Width: 100  |  Height: 165  |  Size: 21 KiB

BIN
static/images/workouts/fitotrack-workout_1614259085.jpg

After

Width: 600  |  Height: 992  |  Size: 192 KiB

BIN
static/images/workouts/fitotrack-workout_1614259085_thumb.jpg

After

Width: 100  |  Height: 165  |  Size: 20 KiB

18
themes/nipponalba/layouts/index.html

@ -51,9 +51,25 @@
<b><i class="fa fa-calendar" aria-hidden="true"></i> Planning: <a href="https://www.beeradvocate.com/beer/profile/12142/52084/" class="u-url" target="_blank" title="Currently planning: 80/-">Williams Bros 80/- (sort of)</a></b> for my next brew, will be a variation on a previous recipe with a grain adjustment.<br/><br/>
<b><i class="fa fa-book" aria-hidden="true" target="_blank"></i> Reading: <a href="https://www.taylorfrancis.com/books/handbook-brewing-graham-stewart-inge-russell-anne-anstruther/e/10.1201/9781351228336" class="u-url" title="Currently reading: Handbook of Brewing">Handbook of Brewing</a></b> by Graham G. Stewart, Inge Russel and Anne Anstruther.<br/><br/>
<b><i class="fa fa-television" aria-hidden="true"></i> Watching: <a href="https://en.wikipedia.org/wiki/Borgen_(TV_series)" class="u-url" target="_blank" title="now watching: Borgen">Borgen</a></b> a Danish political drama.<br/><br/>
<b><i class="fa fa-gamepad" aria-hidden="true"></i> Playing: <a href="https://www.valheimgame.com/" class="u-url" target="_blank" title="Currently playing: Valheim">Valheim</a></b> a Viking inspired survival game.</section><br/><br/>
<b><i class="fa fa-gamepad" aria-hidden="true"></i> Playing: <a href="https://www.valheimgame.com/" class="u-url" target="_blank" title="Currently playing: Valheim">Valheim</a></b> a Viking inspired survival game.</section>
<h2>Latest Workout</h2>
<section class="index_exercise">
{{ range first 1 (sort .Site.Data.workouts "date" "desc")}}
<section class="exercise_grid">
<span class="type"><b>Type</b><br/>{{ .type | humanize }}</span>
<span class="exdate"><b>Date</b><br/>{{ dateFormat "2 Jan 2006" .date }}</span>
<span class="comment"><b>Comment</b><br/>{{ .comment | humanize }}</span>
<span class="image"><b>Image</b><br/><a href="{{ .image }}" class="u-url"><img src="{{ .thumb }}" title="{{ .comment }}" alt="route map of outdoor exercise from fitotrack app" /></a></span>
<span class="distance"><b>Distance</b><br/>{{ .distance }}</span>
<span class="duration"><b>Duration</b><br/>{{ .duration }}</span>
<span class="pace"><b>Pace</b><br/>{{ .pace }}</span>
<span class="calories"><b>Calories burned</b><br/>{{ .calories }}</span>
</section>
{{ end }}
</section><br/><br/>
<a href="https://brid.gy/publish/mastodon"></a>
</section>
</section>
{{ end }}

54
themes/nipponalba/static/css/style.css

@ -308,7 +308,7 @@ nav li i{
margin:0;
padding-left:10px;
}
nav > li:nth-child(9) {
nav > li:nth-child(10) {
margin-left: auto;
padding-right:5px;
display:none;
@ -334,7 +334,7 @@ main{
grid-template-rows: auto;
}
.about .h-feed, .archive, .stream, .post, .bookmarks, #response, .response, .resume{
.about .h-feed, .archive, .stream, .post, .bookmarks, #response, .response, .resume, .exercise{
grid-column: 1;
vertical-align:top;
width: 99%;
@ -984,6 +984,50 @@ hr{
font-weight:bolder;
}
.index_exercise{
width: 95%;
}
.exercise_grid{
max-width: 96%;
display:grid;
grid-template-columns: 15% 20% 25% 20% auto;
grid-template-rows: 100px 90px;
border: 1px solid var(--border-colour);
border-radius:15px;
margin: 0 auto;
padding: 10px;
margin-bottom: 20px;
}
.exercise_grid .type, .exercise_grid .distance{
grid-column: 1;
}
.exercise_grid .exdate, .exercise_grid .duration{
grid-column: 2;
}
.exercise_grid .pace{
grid-column: 3;
}
.exercise_grid .comment{
grid-column-start: 3;
grid-column-end: span 2;
width: 100%;
}
.exercise_grid .calories{
grid-column: 4;
}
.exercise_grid .image{
grid-column: 5;
text-align: center;
}
.exercise_grid .type, .exercise_grid .exdate, .exercise_grid .comment{
grid-row: 1;
}
.exercise_grid .image{
grid-row: 1 / 2;
}
.exercise_grid .distance, .exercise_grid .duration, .exercise_grid .pace, .exercise_grid .calories{
grid-row: 2;
}
@media screen and (max-width: 960px) {
#page-top {
width: 95%;
@ -1011,7 +1055,7 @@ hr{
main{
display:block;
}
#Blogs{
#Blogs, #Exercise{
display:none;
}
@ -1026,7 +1070,7 @@ article img{
.post{
margin-top:20px;
}
.post_content, .index_content{
.post_content, .index_content, .index_exercise{
width: 95%;
}
.photo .index_content{
@ -1085,7 +1129,7 @@ nav{
padding:10px 6px;
height: 30px;
}
.index-article, .index-photo, .index-current, .list-article, .list-blog, .list-category, .index_content{
.index-article, .index-photo, .index-current, .list-article, .list-blog, .list-category, .index_content, .index_exercise{
width:100%;
margin-bottom:10px;
}

Loading…
Cancel
Save