Dualcoding con @bachoseven per la pagina "/storia" più qualche miglioria
parent
e3b71962e5
commit
b2a9355d1d
@ -1,16 +1,25 @@
|
||||
module git.phc.dm.unipi.it/phc/website
|
||||
|
||||
go 1.13
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/alecthomas/chroma v0.9.4
|
||||
github.com/gofiber/fiber/v2 v2.34.0
|
||||
github.com/gofiber/redirect/v2 v2.1.23
|
||||
github.com/joho/godotenv v1.4.0
|
||||
github.com/klauspost/compress v1.15.6 // indirect
|
||||
github.com/litao91/goldmark-mathjax v0.0.0-20210217064022-a43cf739a50f
|
||||
github.com/yuin/goldmark v1.4.4
|
||||
github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/andybalholm/brotli v1.0.4 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/klauspost/compress v1.15.6 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasthttp v1.37.0 // indirect
|
||||
github.com/valyala/tcplisten v1.0.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220602145555-4a0574d9293f // indirect
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
|
||||
)
|
||||
|
@ -1,22 +1,44 @@
|
||||
[
|
||||
"macchinisti":
|
||||
{
|
||||
"macchinisti": [
|
||||
{
|
||||
"nome": "Francesco Minnocci",
|
||||
"uid": "minnocci",
|
||||
"date": "2022/02",
|
||||
"type": "entry"
|
||||
"fullName": "Francesco Minnocci",
|
||||
"entryDate": "2022/02"
|
||||
},
|
||||
{
|
||||
"uid": "manicastri",
|
||||
"fullName": "Francesco Manicastri",
|
||||
"entryDate": "2022/05"
|
||||
},
|
||||
{
|
||||
"uid": "delucreziis",
|
||||
"fullName": "Antonio De Lucreziis",
|
||||
"entryDate": "2019/??"
|
||||
},
|
||||
{
|
||||
"nome": "Francesco Caporali",
|
||||
"uid": "caporali",
|
||||
"date": "201?/??",
|
||||
"type": "exit"
|
||||
"fullName": "Francesco Caporali",
|
||||
"entryDate": "2018/??",
|
||||
"exitDate": "2022/03"
|
||||
},
|
||||
{
|
||||
"uid": "dachille",
|
||||
"fullName": "Letizia D'Achille",
|
||||
"entryDate": "2018/??",
|
||||
"exitDate": "2022/03"
|
||||
}
|
||||
},
|
||||
"eventi":
|
||||
],
|
||||
"eventi": [
|
||||
{
|
||||
"type": "simple",
|
||||
"title": "Nuovo sito del PHC",
|
||||
"description": "TBA",
|
||||
"date": "2022/??"
|
||||
},
|
||||
{
|
||||
"type": "simple",
|
||||
"title": "Apertura del PHC",
|
||||
"date": "1992"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
type Numeric interface {
|
||||
constraints.Float | constraints.Integer
|
||||
}
|
||||
|
||||
func Abs[T Numeric](a T) T {
|
||||
if a < 0 {
|
||||
return -a
|
||||
}
|
||||
|
||||
return a
|
||||
}
|
Loading…
Reference in New Issue