From 7a5ab7cf09da52c850d38c716efbab615ee4d7dd Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Sat, 3 Aug 2024 08:33:58 +0200 Subject: [PATCH] Small CSS changes --- templates/index.html.tmpl | 20 ++++++++------ templates/recipe.html.tmpl | 56 ++++++++++++++++++++------------------ templates/style.css | 22 +++++++++++++++ 3 files changed, 64 insertions(+), 34 deletions(-) diff --git a/templates/index.html.tmpl b/templates/index.html.tmpl index bd9f946..35ad5d9 100644 --- a/templates/index.html.tmpl +++ b/templates/index.html.tmpl @@ -8,14 +8,18 @@ -

{{.title}}

+
+
+

{{.title}}

- {{if ne (len .recipes) 0}} -
    - {{range .recipes}} -
  • {{.Name}}
  • - {{end}} -
- {{end}} + {{if ne (len .recipes) 0}} +
    + {{range .recipes}} +
  • {{.Name}}
  • + {{end}} +
+ {{end}} +
+
diff --git a/templates/recipe.html.tmpl b/templates/recipe.html.tmpl index 1ca5be2..b92b90b 100644 --- a/templates/recipe.html.tmpl +++ b/templates/recipe.html.tmpl @@ -8,35 +8,39 @@ -

{{.name}}

+
+
+

{{.name}}

- {{$recipeImage := recipeImage .path}} - {{if ne $recipeImage ""}} - - {{end}} - - {{if ne (len .recipe.Metadata) 0}} -
    - {{$m := .recipe.Metadata}} - {{$nameKey := .nameKey}} - {{range $k := sortedMetadataKeys $m}} - {{if ne $k $nameKey}} -
  • {{$k}}: {{index $m $k}}
  • + {{$recipeImage := recipeImage .path}} + {{if ne $recipeImage ""}} + {{end}} - {{end}} -
- {{end}} - {{recipeSteps .recipe .path}} - -

{{.ingredientsTitle}}

- -
    - {{range .recipe.Steps}} - {{range .Ingredients}} -
  • {{.Name}} {{if ne .Amount.QuantityRaw ""}}({{.Amount.QuantityRaw}}{{if ne .Amount.Unit ""}} {{.Amount.Unit}}{{end}}){{end}}
  • + {{if ne (len .recipe.Metadata) 0}} +
      + {{$m := .recipe.Metadata}} + {{$nameKey := .nameKey}} + {{range $k := sortedMetadataKeys $m}} + {{if ne $k $nameKey}} +
    • {{$k}}: {{index $m $k}}
    • + {{end}} + {{end}} +
    {{end}} - {{end}} -
+ + {{recipeSteps .recipe .path}} + +

{{.ingredientsTitle}}

+ +
    + {{range .recipe.Steps}} + {{range .Ingredients}} +
  • {{.Name}} {{if ne .Amount.QuantityRaw ""}}({{.Amount.QuantityRaw}}{{if ne .Amount.Unit ""}} {{.Amount.Unit}}{{end}}){{end}}
  • + {{end}} + {{end}} +
+
+
diff --git a/templates/style.css b/templates/style.css index f20ce33..6c1fd47 100644 --- a/templates/style.css +++ b/templates/style.css @@ -1,8 +1,30 @@ body { + font-size: 1.3rem; background-color: lightgrey; font-family: monospace; } +main { + display: flex; + flex-flow: column; + align-items: center; + width: 100%; + height: 100%; +} + +#content { + width: 80%; + display: flex; + flex-flow: column; + align-items: center; + justify-content: center; +} + +img { + max-width: 50%; + max-height: 500px; +} + .ingredient { font-weight: bold; color: green;