diff --git a/pages/dashboard/dashboard.go b/pages/dashboard/dashboard.go deleted file mode 100644 index c9e18a60..00000000 --- a/pages/dashboard/dashboard.go +++ /dev/null @@ -1,97 +0,0 @@ -package dashboard - -// import ( -// "net/http" -// "sort" - -// "github.com/aerogo/aero" -// "github.com/aerogo/flow" -// "github.com/animenotifier/arn" -// "github.com/animenotifier/notify.moe/components" -// "github.com/animenotifier/notify.moe/utils" -// ) - -// const maxForumActivity = 5 -// const maxFollowing = 5 -// const maxSoundTracks = 5 -// const maxScheduleItems = 5 - -// // Get the dashboard. -// func Get(ctx *aero.Context) string { -// var forumActivity []arn.Postable -// var followingList []*arn.User -// var soundTracks []*arn.SoundTrack -// var upcomingEpisodes []*arn.UpcomingEpisode - -// user := utils.GetUser(ctx) - -// if user == nil { -// return ctx.Error(http.StatusUnauthorized, "Not logged in") -// } - -// flow.Parallel(func() { -// posts := arn.AllPosts() -// threads := arn.AllThreads() - -// arn.SortPostsLatestFirst(posts) -// arn.SortThreadsLatestFirst(threads) - -// posts = arn.FilterPostsWithUniqueThreads(posts, maxForumActivity) - -// postPostables := arn.ToPostables(posts) -// threadPostables := arn.ToPostables(threads) - -// allPostables := append(postPostables, threadPostables...) - -// arn.SortPostablesLatestFirst(allPostables) -// forumActivity = arn.FilterPostablesWithUniqueThreads(allPostables, maxForumActivity) -// }, func() { -// animeList, err := arn.GetAnimeList(user.ID) - -// if err != nil { -// return -// } - -// animeList = animeList.Watching() -// animeList.Lock() - -// for _, item := range animeList.Items { -// futureEpisodes := item.Anime().UpcomingEpisodes() - -// if len(futureEpisodes) == 0 { -// continue -// } - -// upcomingEpisodes = append(upcomingEpisodes, futureEpisodes...) -// } - -// animeList.Unlock() - -// sort.Slice(upcomingEpisodes, func(i, j int) bool { -// return upcomingEpisodes[i].Episode.AiringDate.Start < upcomingEpisodes[j].Episode.AiringDate.Start -// }) - -// if len(upcomingEpisodes) >= maxScheduleItems { -// upcomingEpisodes = upcomingEpisodes[:maxScheduleItems] -// } -// }, func() { -// soundTracks = arn.FilterSoundTracks(func(track *arn.SoundTrack) bool { -// return !track.IsDraft && len(track.Media) > 0 -// }) - -// arn.SortSoundTracksLatestFirst(soundTracks) - -// if len(soundTracks) > maxSoundTracks { -// soundTracks = soundTracks[:maxSoundTracks] -// } -// }, func() { -// followingList = user.Follows().Users() -// arn.SortUsersLastSeen(followingList) - -// if len(followingList) > maxFollowing { -// followingList = followingList[:maxFollowing] -// } -// }) - -// return ctx.HTML(components.Dashboard(upcomingEpisodes, forumActivity, soundTracks, followingList, user)) -// } diff --git a/pages/dashboard/dashboard.pixy b/pages/dashboard/dashboard.pixy deleted file mode 100644 index 71cd9539..00000000 --- a/pages/dashboard/dashboard.pixy +++ /dev/null @@ -1,101 +0,0 @@ -component Dashboard(schedule []*arn.UpcomingEpisode, posts []arn.Postable, soundTracks []*arn.SoundTrack, following []*arn.User, user *arn.User) - //- h1.page-title Dashboard - - //- .dashboard - //- .widget.mountable - //- h3.widget-title Schedule - - //- for i := 0; i <= 4; i++ - //- if i < len(schedule) - //- .widget-ui-element - //- .widget-ui-element-text - //- a.schedule-item-link(href=schedule[i].Anime.Link()) - //- Icon("calendar-o") - //- .schedule-item-title= schedule[i].Anime.Title.ByUser(user) - //- .spacer - //- .schedule-item-date.utc-airing-date(data-start-date=schedule[i].Episode.AiringDate.Start, data-end-date=schedule[i].Episode.AiringDate.End, data-episode-number=schedule[i].Episode.Number) - //- else - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("calendar-o") - //- span ... - - //- .widget.mountable - //- h3.widget-title Forums - - //- each post in posts - //- a.widget-ui-element(href=post.Thread().Link()) - //- .widget-ui-element-text - //- Icon(arn.GetForumIcon(post.Thread().Tags[0])) - //- span= post.Thread().Title - - //- .widget.mountable - //- h3.widget-title Artworks - - //- for i := 1; i <= 5; i++ - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("paint-brush") - //- span ... - - //- .widget.mountable - //- h3.widget-title Soundtracks - - //- for i := 0; i <= 4; i++ - //- if i < len(soundTracks) - //- a.widget-ui-element(href=soundTracks[i].Link()) - //- .widget-ui-element-text - //- Icon("music") - //- if soundTracks[i].Title == "" - //- span untitled - //- else - //- span= soundTracks[i].Title - //- else - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("music") - //- span ... - - //- .widget.mountable - //- h3.widget-title AMVs - - //- for i := 1; i <= 5; i++ - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("video-camera") - //- span ... - - //- .widget.mountable - //- h3.widget-title Reviews - - //- for i := 1; i <= 5; i++ - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("book") - //- span ... - - //- .widget.mountable - //- h3.widget-title Groups - - //- for i := 1; i <= 5; i++ - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("group") - //- span ... - - //- .widget.mountable - //- h3.widget-title Contacts - - //- for i := 0; i <= 4; i++ - //- if i < len(following) - //- a.widget-ui-element(href="/+" + following[i].Nick) - //- .widget-ui-element-text - //- Icon("address-card") - //- span= following[i].Nick - //- else - //- .widget-ui-element - //- .widget-ui-element-text - //- Icon("address-card") - //- span ... - - //- Footer \ No newline at end of file diff --git a/pages/dashboard/dashboard.scarlet b/pages/dashboard/dashboard.scarlet deleted file mode 100644 index db14eb90..00000000 --- a/pages/dashboard/dashboard.scarlet +++ /dev/null @@ -1,20 +0,0 @@ -// .schedule-item-link, -// .schedule-item-title -// clip-long-text - -// .schedule-item-link -// horizontal -// align-items center - -// .schedule-item-date -// text-align right - -.footer-element - :after - content " | " - color text-color - opacity 0.5 - - :last-child - :after - display none \ No newline at end of file diff --git a/styles/footer.scarlet b/styles/footer.scarlet index 85cb6d6b..315336ee 100644 --- a/styles/footer.scarlet +++ b/styles/footer.scarlet @@ -8,4 +8,14 @@ opacity 0 !important &.mounted - opacity 0.7 !important \ No newline at end of file + opacity 0.7 !important + +.footer-element + :after + content " | " + color text-color + opacity 0.5 + + :last-child + :after + display none \ No newline at end of file