storia: add Icon and Description fields.
This commit is contained in:
+8
-2
@@ -16,16 +16,22 @@
|
||||
{{ if eq .Type "simple" }}
|
||||
<div class="event">
|
||||
<div class="title">
|
||||
{{ if .Icon }}
|
||||
<i class="{{ .Icon }}"></i>
|
||||
{{ end }}
|
||||
{{ .Title }}
|
||||
</div>
|
||||
<div class="date">{{ .Date }}</div>
|
||||
<div class="description">
|
||||
{{ .Description }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if eq .Type "entry-macchinista" }}
|
||||
<div class="event">
|
||||
<div class="title">
|
||||
Ingresso di
|
||||
<i class="fa-solid fa-sign-in"></i>
|
||||
Ingresso di
|
||||
<a href="{{ $.Config.UserPagesBaseUrl }}{{ .Uid }}">{{ .FullName }}</a>
|
||||
</div>
|
||||
<div class="date">{{ .Date }}</div>
|
||||
@@ -34,8 +40,8 @@
|
||||
{{ if eq .Type "exit-macchinista" }}
|
||||
<div class="event">
|
||||
<div class="title">
|
||||
Uscita di
|
||||
<i class="fa-solid fa-sign-out"></i>
|
||||
Uscita di
|
||||
<a href="{{ $.Config.UserPagesBaseUrl }}{{ .Uid }}">{{ .FullName }}</a>
|
||||
</div>
|
||||
<div class="date">{{ .Date }}</div>
|
||||
|
||||
@@ -30,6 +30,9 @@ type GenericEvent struct {
|
||||
|
||||
// Se il tipo è "spacer" questa è la sua dimensione
|
||||
Size int `json:"size"`
|
||||
|
||||
// Icona opzionale per il tipo "simple"
|
||||
Icon string `json:"icon"`
|
||||
}
|
||||
|
||||
type Macchinista struct {
|
||||
|
||||
+4
-3
@@ -32,13 +32,14 @@
|
||||
{
|
||||
"type": "simple",
|
||||
"title": "Nuovo sito del PHC",
|
||||
"description": "TBA",
|
||||
"date": "2022/??"
|
||||
"description": "Featuring: ricerca utenti, dark mode, nuovo logo e molto altro!", "date": "2022/09",
|
||||
"icon": "fa-solid fa-sitemap"
|
||||
},
|
||||
{
|
||||
"type": "simple",
|
||||
"title": "Apertura del PHC",
|
||||
"date": "1994"
|
||||
"date": "1994",
|
||||
"icon": "fa-solid fa-flag-checkered"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user