1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Adding the site theme to git

This commit is contained in:
Chris Cummer
2018-05-08 09:05:19 -07:00
parent ad56b6ea25
commit b55ca47678
46 changed files with 3151 additions and 13 deletions

View File

@@ -8,29 +8,29 @@ type ClockCollection struct {
Clocks []Clock
}
func (clockColl *ClockCollection) Sorted() []Clock {
func (clocks *ClockCollection) Sorted() []Clock {
if "chronological" == Config.UString("wtf.mods.clocks.sort", "alphabetical") {
clockColl.SortedChronologically()
clocks.SortedChronologically()
} else {
clockColl.SortedAlphabetically()
clocks.SortedAlphabetically()
}
return clockColl.Clocks
return clocks.Clocks
}
func (clockColl *ClockCollection) SortedAlphabetically() {
sort.Slice(clockColl.Clocks, func(i, j int) bool {
clock := clockColl.Clocks[i]
other := clockColl.Clocks[j]
func (clocks *ClockCollection) SortedAlphabetically() {
sort.Slice(clocks.Clocks, func(i, j int) bool {
clock := clocks.Clocks[i]
other := clocks.Clocks[j]
return clock.Label < other.Label
})
}
func (clockColl *ClockCollection) SortedChronologically() {
sort.Slice(clockColl.Clocks, func(i, j int) bool {
clock := clockColl.Clocks[i]
other := clockColl.Clocks[j]
func (clocks *ClockCollection) SortedChronologically() {
sort.Slice(clocks.Clocks, func(i, j int) bool {
clock := clocks.Clocks[i]
other := clocks.Clocks[j]
return clock.LocalTime.Before(other.LocalTime)
})