Cleanup
This commit is contained in:
parent
d40d4a576a
commit
10ef00a810
@ -27,10 +27,10 @@ var jobs = map[string]time.Duration{
|
|||||||
"forum-activity": 1 * time.Minute,
|
"forum-activity": 1 * time.Minute,
|
||||||
"anime-ratings": 10 * time.Minute,
|
"anime-ratings": 10 * time.Minute,
|
||||||
"airing-anime": 10 * time.Minute,
|
"airing-anime": 10 * time.Minute,
|
||||||
|
"popular-anime": 20 * time.Minute,
|
||||||
"avatars": 30 * time.Minute,
|
"avatars": 30 * time.Minute,
|
||||||
"refresh-track-titles": 10 * time.Hour,
|
"refresh-track-titles": 10 * time.Hour,
|
||||||
"sync-anime": 12 * time.Hour,
|
"sync-anime": 12 * time.Hour,
|
||||||
"popular-anime": 12 * time.Hour,
|
|
||||||
"search-index": 12 * time.Hour,
|
"search-index": 12 * time.Hour,
|
||||||
}
|
}
|
||||||
|
|
4
main.go
4
main.go
@ -16,13 +16,13 @@ import (
|
|||||||
"github.com/animenotifier/notify.moe/pages/dashboard"
|
"github.com/animenotifier/notify.moe/pages/dashboard"
|
||||||
"github.com/animenotifier/notify.moe/pages/editanime"
|
"github.com/animenotifier/notify.moe/pages/editanime"
|
||||||
"github.com/animenotifier/notify.moe/pages/embed"
|
"github.com/animenotifier/notify.moe/pages/embed"
|
||||||
|
"github.com/animenotifier/notify.moe/pages/explore"
|
||||||
"github.com/animenotifier/notify.moe/pages/forum"
|
"github.com/animenotifier/notify.moe/pages/forum"
|
||||||
"github.com/animenotifier/notify.moe/pages/forums"
|
"github.com/animenotifier/notify.moe/pages/forums"
|
||||||
"github.com/animenotifier/notify.moe/pages/login"
|
"github.com/animenotifier/notify.moe/pages/login"
|
||||||
"github.com/animenotifier/notify.moe/pages/music"
|
"github.com/animenotifier/notify.moe/pages/music"
|
||||||
"github.com/animenotifier/notify.moe/pages/newsoundtrack"
|
"github.com/animenotifier/notify.moe/pages/newsoundtrack"
|
||||||
"github.com/animenotifier/notify.moe/pages/newthread"
|
"github.com/animenotifier/notify.moe/pages/newthread"
|
||||||
"github.com/animenotifier/notify.moe/pages/popularanime"
|
|
||||||
"github.com/animenotifier/notify.moe/pages/posts"
|
"github.com/animenotifier/notify.moe/pages/posts"
|
||||||
"github.com/animenotifier/notify.moe/pages/profile"
|
"github.com/animenotifier/notify.moe/pages/profile"
|
||||||
"github.com/animenotifier/notify.moe/pages/search"
|
"github.com/animenotifier/notify.moe/pages/search"
|
||||||
@ -57,7 +57,7 @@ func configure(app *aero.Application) *aero.Application {
|
|||||||
|
|
||||||
// Ajax routes
|
// Ajax routes
|
||||||
app.Ajax("/", dashboard.Get)
|
app.Ajax("/", dashboard.Get)
|
||||||
app.Ajax("/anime", popularanime.Get)
|
app.Ajax("/anime", explore.Get)
|
||||||
app.Ajax("/anime/:id", anime.Get)
|
app.Ajax("/anime/:id", anime.Get)
|
||||||
app.Ajax("/anime/:id/edit", editanime.Get)
|
app.Ajax("/anime/:id/edit", editanime.Get)
|
||||||
app.Ajax("/forum", forums.Get)
|
app.Ajax("/forum", forums.Get)
|
||||||
|
@ -15,7 +15,7 @@ component LoggedOutMenu
|
|||||||
.extra-navigation
|
.extra-navigation
|
||||||
NavigationButton("Users", "/users", "globe")
|
NavigationButton("Users", "/users", "globe")
|
||||||
|
|
||||||
NavigationButton("Airing", "/airing", "th")
|
NavigationButton("Anime", "/anime", "th")
|
||||||
NavigationButton("Login", "/login", "sign-in")
|
NavigationButton("Login", "/login", "sign-in")
|
||||||
|
|
||||||
component LoggedInMenu(user *arn.User)
|
component LoggedInMenu(user *arn.User)
|
||||||
@ -34,7 +34,7 @@ component LoggedInMenu(user *arn.User)
|
|||||||
NavigationButton("Users", "/users", "globe")
|
NavigationButton("Users", "/users", "globe")
|
||||||
|
|
||||||
.extra-navigation
|
.extra-navigation
|
||||||
NavigationButton("Airing", "/airing", "th")
|
NavigationButton("Anime", "/anime", "th")
|
||||||
|
|
||||||
NavigationButton("Settings", "/settings", "cog")
|
NavigationButton("Settings", "/settings", "cog")
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package popularanime
|
package explore
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -16,5 +16,5 @@ func Get(ctx *aero.Context) string {
|
|||||||
return ctx.Error(http.StatusInternalServerError, "Error fetching popular anime", err)
|
return ctx.Error(http.StatusInternalServerError, "Error fetching popular anime", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx.HTML(components.PopularAnime(animeList))
|
return ctx.HTML(components.ExploreAnime(nil, nil, animeList))
|
||||||
}
|
}
|
9
pages/explore/explore.pixy
Normal file
9
pages/explore/explore.pixy
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
component ExploreAnime(overall []*arn.Anime, story []*arn.Anime, airing []*arn.Anime)
|
||||||
|
h2 Highest Rating
|
||||||
|
AnimeGrid(overall)
|
||||||
|
|
||||||
|
h2 Best Story
|
||||||
|
AnimeGrid(story)
|
||||||
|
|
||||||
|
h2 Currently Airing
|
||||||
|
AnimeGrid(airing)
|
@ -1,16 +0,0 @@
|
|||||||
component OldPopularAnime(popularAnime []*arn.Anime, titleCount int, animeCount int)
|
|
||||||
//- h2 Anime
|
|
||||||
|
|
||||||
//- #search-container
|
|
||||||
//- input#search(type="text", placeholder="Search...", onkeyup="$.searchAnime();", onfocus="this.select();", disabled="disabled", data-count=titleCount, data-anime-count=animeCount)
|
|
||||||
|
|
||||||
//- #search-results-container
|
|
||||||
//- #search-results
|
|
||||||
|
|
||||||
//- if popularAnime != nil
|
|
||||||
//- h3.popular-title Popular
|
|
||||||
|
|
||||||
//- .popular-anime-list
|
|
||||||
//- each anime in popularAnime
|
|
||||||
//- a.popular-anime.ajax(href="/anime/" + toString(anime.ID), title=anime.Title.Romaji + " (" + arn.Plural(anime.Watching(), "user") + " watching)")
|
|
||||||
//- img.anime-image.popular-anime-image(src=anime.Image, alt=anime.Title.Romaji)
|
|
@ -1,19 +0,0 @@
|
|||||||
// .popular-title
|
|
||||||
// text-align center
|
|
||||||
|
|
||||||
// .popular-anime-list
|
|
||||||
// display flex
|
|
||||||
// flex-flow row wrap
|
|
||||||
// justify-content center
|
|
||||||
|
|
||||||
// .popular-anime
|
|
||||||
// padding 0.5em
|
|
||||||
// display block
|
|
||||||
|
|
||||||
// .popular-anime-image
|
|
||||||
// width 100px !important
|
|
||||||
// height 141px !important
|
|
||||||
// border-radius 3px
|
|
||||||
// object-fit cover
|
|
||||||
// default-transition
|
|
||||||
// shadow-up
|
|
@ -1,6 +0,0 @@
|
|||||||
component PopularAnime(animeList []*arn.Anime)
|
|
||||||
h2 Top 3
|
|
||||||
AnimeGrid(animeList[:3])
|
|
||||||
|
|
||||||
h2 Popular
|
|
||||||
AnimeGrid(animeList[3:])
|
|
Loading…
Reference in New Issue
Block a user