bda181ee54
* Add themeToggle handler to router.go * Create themeToggle/router.go & ThemeToggle.go * Add link to /dark in footer, remove display = none on toggle dark mode * Remove JS that ordered toggle dark mode link to show as it is now constantly visible * Rollback to fix errors * Add some comments * Create redirectUrl variable & set it's content then use it to redirect user * Remove useless log * Remove usage of fmt * Add redirect get parameter to toggle link * Add another url for toggleTheme * wooo * Update base.jet.html * Update base.jet.html
8 lignes
207 o
Go
8 lignes
207 o
Go
package themeToggleController
|
|
|
|
import "github.com/NyaaPantsu/nyaa/controllers/router"
|
|
|
|
func init() {
|
|
router.Get().Any("/dark", toggleThemeHandler)
|
|
router.Get().Any("/dark/*redirect", toggleThemeHandler)
|
|
}
|