Download this file
| 1 | // Package credits renders dependency notices without JavaScript. Applications |
| 2 | // supply the page title in their active locale and the original notice text. |
| 3 | package credits |
| 4 | |
| 5 | import "embed" |
| 6 | |
| 7 | //go:embed templates/*.html |
| 8 | var templateFS embed.FS |
| 9 | |
| 10 | //go:embed credits.css |
| 11 | var stylesheet []byte |
| 12 | |
| 13 | func Templates() embed.FS { return templateFS } |
| 14 | func CSS() []byte { return append([]byte(nil), stylesheet...) } |
| 15 | |
| 16 | type Notice struct{ Name, Text string } |
| 17 | type Component struct { |
| 18 | Name, Version, SourceURL string |
| 19 | Notices []Notice |
| 20 | } |
| 21 | type PageData struct { |
| 22 | Title string |
| 23 | MissingNoticeLabel string |
| 24 | Components []Component |
| 25 | } |
| 26 | |