Lesekabinett & Startseite

This commit is contained in:
Simon Martens
2025-03-02 00:27:16 +01:00
parent 6e286857d5
commit 0a86833a9f
56 changed files with 771 additions and 445 deletions

View File

@@ -8,6 +8,8 @@ import (
"golang.org/x/text/language"
)
// INFO: Functions that implement sorting of which sqlite is not capable of.
func Sort_Series_Title(series []*Series) {
collator := collate.New(language.German)
slices.SortFunc(series, func(i, j *Series) int {
@@ -55,3 +57,10 @@ func Sort_Contents_Numbering(contents []*Content) {
return datatypes.CompareFloat(i.Numbering(), j.Numbering())
})
}
func Sort_Places_Name(places []*Place) {
collator := collate.New(language.German)
slices.SortFunc(places, func(i, j *Place) int {
return collator.CompareString(i.Name(), j.Name())
})
}