mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-08 17:08:04 +02:00
Style preference tab for user (#467)
This commit is contained in:
@ -186,6 +186,10 @@ func (s *Server) setFuncMap() {
|
||||
}
|
||||
return str
|
||||
},
|
||||
"hexToRgb": func(hex string) string {
|
||||
h, _ := strconv.ParseUint(strings.TrimPrefix(hex, "#"), 16, 32)
|
||||
return fmt.Sprintf("%d, %d, %d,", (h>>16)&0xFF, (h>>8)&0xFF, h&0xFF)
|
||||
},
|
||||
}
|
||||
|
||||
t := template.Must(template.New("t").Funcs(fm).ParseFS(templates.Files, "*/*.html"))
|
||||
|
Reference in New Issue
Block a user