@@ -85,24 +85,51 @@ Site Title: %s
}),
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
- rTime := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint("Reading Time: ", postReadTime, " minutes"))
- rTime.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
- rTime.Alignment = text.Middle
- return rTime.Layout(gtx)
- }),
-
- layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
- pDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint("Published: ", postDate))
- pDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
- pDate.Alignment = text.Middle
- return pDate.Layout(gtx)
- }),
-
- layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
- eDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint("Edited: ", dateEdited))
- eDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
- eDate.Alignment = text.Middle
- return eDate.Layout(gtx)
+ layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ rTime := material.Label(th, unit.Sp(float32(*flagMetaSize)), "Reading Time: ")
+ rTime.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
+ rTime.Alignment = text.Middle
+ return rTime.Layout(gtx)
+ }),
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ rTime := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint(postReadTime, " minutes"))
+ rTime.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Normal}
+ rTime.Alignment = text.Middle
+ return rTime.Layout(gtx)
+ }),
+ )
+
+ layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ pDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), "Published: ")
+ pDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
+ pDate.Alignment = text.Middle
+ return pDate.Layout(gtx)
+ }),
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ pDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint(postDate))
+ pDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
+ pDate.Alignment = text.Middle
+ return pDate.Layout(gtx)
+ }),
+ )
+
+ layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ eDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), "Edited: ")
+ eDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
+ eDate.Alignment = text.Middle
+ return eDate.Layout(gtx)
+ }),
+ layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
+ eDate := material.Label(th, unit.Sp(float32(*flagMetaSize)), fmt.Sprint(dateEdited))
+ eDate.Font = text.Font{Typeface: "Primary font", Variant: "", Style: text.Regular, Weight: text.Bold}
+ eDate.Alignment = text.Middle
+ return eDate.Layout(gtx)
+ }),
+ )
+ return layout.Dimensions{}
}),
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {