From d854ef3a6a1fdd5dbe21498d41fa02fb8b72bcff Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sun, 1 Sep 2019 16:39:17 +0900 Subject: [PATCH] Use footer elements --- mixins/AMV.pixy | 4 ++-- mixins/Quote.pixy | 2 +- mixins/SoundTrack.pixy | 4 ++-- pages/anime/anime.pixy | 2 +- pages/charge/charge.pixy | 2 +- pages/companies/popular.pixy | 2 +- pages/editor/editor.pixy | 2 +- pages/editor/filteranime/filteranime.pixy | 2 +- pages/episode/episode.pixy | 2 +- pages/frontpage/frontpage.pixy | 2 +- pages/inventory/inventory.pixy | 2 +- pages/notifications/notifications.pixy | 2 +- pages/profile/stats.pixy | 2 +- pages/quote/quote.pixy | 2 +- pages/settings/accounts.pixy | 2 +- pages/settings/info.pixy | 2 +- pages/settings/notifications.pixy | 2 +- pages/settings/personal.pixy | 2 +- pages/shop/shop.pixy | 2 +- pages/soundtrack/soundtrack.pixy | 2 +- pages/statistics/statistics.pixy | 2 +- pages/users/editors.pixy | 2 +- pages/users/users.pixy | 4 ++-- pages/welcome/welcome.pixy | 6 +++--- styles/footer.scarlet | 4 +--- 25 files changed, 30 insertions(+), 32 deletions(-) diff --git a/mixins/AMV.pixy b/mixins/AMV.pixy index 27052f8e..c4b700c2 100644 --- a/mixins/AMV.pixy +++ b/mixins/AMV.pixy @@ -19,7 +19,7 @@ component AMVVideo(amv *arn.AMV) VideoControls(amv.ID, amv.Info.Duration) component AMVFooter(amv *arn.AMV, user *arn.User) - .amv-footer + footer.amv-footer if amv.Title.ByUser(user) == "" a(href=amv.Link() + "/edit") untitled else @@ -30,7 +30,7 @@ component AMVFooter(amv *arn.AMV, user *arn.User) a(href=amv.Creator().Link())= amv.Creator().Nick + " " component AMVMiniFooter(amv *arn.AMV, user *arn.User) - .amv-footer + footer.amv-footer if amv.Title.ByUser(user) == "" a(href=amv.Link() + "/edit") untitled else diff --git a/mixins/Quote.pixy b/mixins/Quote.pixy index 55c96e10..f3cb3b11 100644 --- a/mixins/Quote.pixy +++ b/mixins/Quote.pixy @@ -34,7 +34,7 @@ component QuoteTextPreview(quote *arn.Quote) blockquote!= utils.RenderQuoteText(utils.CutLongDescription(quote.Text.English)) component QuoteFooter(quote *arn.Quote) - .quote-footer + footer.quote-footer span posted span.utc-date.no-tip(data-date=quote.Created) span by diff --git a/mixins/SoundTrack.pixy b/mixins/SoundTrack.pixy index 1473c9b3..bd3732dd 100644 --- a/mixins/SoundTrack.pixy +++ b/mixins/SoundTrack.pixy @@ -33,7 +33,7 @@ component SoundTrackMedia(track *arn.SoundTrack) ExternalMedia(track.Media[0]) component SoundTrackFooter(track *arn.SoundTrack, user *arn.User) - .soundtrack-footer + footer.soundtrack-footer if track.Title.ByUser(user) == "" a(href=track.Link() + "/edit") untitled else @@ -44,7 +44,7 @@ component SoundTrackFooter(track *arn.SoundTrack, user *arn.User) a(href=track.Creator().Link())= track.Creator().Nick + " " component SoundTrackMiniFooter(track *arn.SoundTrack, user *arn.User) - .soundtrack-footer + footer.soundtrack-footer if track.Title.ByUser(user) == "" a(href=track.Link() + "/edit") untitled else diff --git a/pages/anime/anime.pixy b/pages/anime/anime.pixy index 8dbfed58..8903cdff 100644 --- a/pages/anime/anime.pixy +++ b/pages/anime/anime.pixy @@ -21,7 +21,7 @@ component AnimeMainColumn(anime *arn.Anime, listItem *arn.AnimeListItem, tracks p.anime-summary.mountable(data-mountable-type="header")= anime.Summary .anime-summary-footer-container - .anime-summary-footer + footer.anime-summary-footer AnimeGenres(anime) AnimeActions(anime, listItem, user) diff --git a/pages/charge/charge.pixy b/pages/charge/charge.pixy index b60a9f0f..f5d3e23e 100644 --- a/pages/charge/charge.pixy +++ b/pages/charge/charge.pixy @@ -29,4 +29,4 @@ component Charge(user *arn.User) Icon("diamond") span 12000 - .footer.mountable Different currencies will automatically be converted. \ No newline at end of file + footer.footer.mountable Different currencies will automatically be converted. \ No newline at end of file diff --git a/pages/companies/popular.pixy b/pages/companies/popular.pixy index 250e1238..4f44a310 100644 --- a/pages/companies/popular.pixy +++ b/pages/companies/popular.pixy @@ -19,7 +19,7 @@ component PopularCompaniesScrollable(companies []*arn.Company, companyToAnime ma .popular-company-body.popular-company-description!= markdown.Render(company.Description) - .popular-company-footer + footer.popular-company-footer .company-anime each anime in utils.MaxAnime(companyToAnime[company.ID], 12) CompanyAnimeNoTip(anime, user) diff --git a/pages/editor/editor.pixy b/pages/editor/editor.pixy index d470f931..e6a5839b 100644 --- a/pages/editor/editor.pixy +++ b/pages/editor/editor.pixy @@ -30,7 +30,7 @@ component Editor(url string, score int, scoreTitle string, scoreTypes map[string p Companies p.editor-score= stringutils.Plural(scoreTypes["Company"], "contribution") - .footer.mountable + footer.footer.mountable a.footer-element(href="/editor/mal/diff/anime" + user.Settings().Editor.Filter.Suffix()) MALdiff a.footer-element(href="/editor/kitsu/new/anime") Kitsu a.footer-element(href="/editor/jobs") Jobs diff --git a/pages/editor/filteranime/filteranime.pixy b/pages/editor/filteranime/filteranime.pixy index 87ca2b38..21a5bf47 100644 --- a/pages/editor/filteranime/filteranime.pixy +++ b/pages/editor/filteranime/filteranime.pixy @@ -1,7 +1,7 @@ component AnimeEditorListFull(title string, missing []*arn.Anime, count int, pageURI string, generateSearchLink func(*arn.Anime) string, user *arn.User) EditorTabs(pageURI, user) h1.editor-list-page-title.mountable= title - .footer.editor-list-entry-count.mountable= strconv.Itoa(count) + " anime" + footer.footer.editor-list-entry-count.mountable= strconv.Itoa(count) + " anime" AnimeEditorList(missing, pageURI, generateSearchLink) component AnimeEditorList(animes []*arn.Anime, pageURI string, generateSearchLink func(*arn.Anime) string) diff --git a/pages/episode/episode.pixy b/pages/episode/episode.pixy index b139575d..d145570d 100644 --- a/pages/episode/episode.pixy +++ b/pages/episode/episode.pixy @@ -37,5 +37,5 @@ component Episode(anime *arn.Anime, episode *arn.Episode, episodeIndex int, uplo p.episode-view-airing-date span.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman() - .footer + footer.footer p Make sure to support the anime you're watching by buying officially released Blu-rays and merchandise. \ No newline at end of file diff --git a/pages/frontpage/frontpage.pixy b/pages/frontpage/frontpage.pixy index 773ee02e..83a947e0 100644 --- a/pages/frontpage/frontpage.pixy +++ b/pages/frontpage/frontpage.pixy @@ -12,5 +12,5 @@ component FrontPage source(src="https://arn.sfo2.cdn.digitaloceanspaces.com/videos/others/violet.webm", type="video/webm") component Footer - .footer.mountable + footer.footer.mountable SocialMediaLinks \ No newline at end of file diff --git a/pages/inventory/inventory.pixy b/pages/inventory/inventory.pixy index b910462e..9afe9424 100644 --- a/pages/inventory/inventory.pixy +++ b/pages/inventory/inventory.pixy @@ -14,5 +14,5 @@ component Inventory(inventory *arn.Inventory, viewUser *arn.User, user *arn.User if slot.Quantity > 1 .inventory-slot-quantity= slot.Quantity - .footer.mountable + footer.footer.mountable p You can consume items by double-clicking them. \ No newline at end of file diff --git a/pages/notifications/notifications.pixy b/pages/notifications/notifications.pixy index b7e94655..39a8da23 100644 --- a/pages/notifications/notifications.pixy +++ b/pages/notifications/notifications.pixy @@ -31,7 +31,7 @@ component Notification(notification *arn.Notification) .notification-info h3.notification-title= notification.Title - .notification-footer + footer.notification-footer p.notification-text= notification.Message .notification-date.utc-date(data-date=notification.Created) diff --git a/pages/profile/stats.pixy b/pages/profile/stats.pixy index 6126c27e..dac47b8a 100644 --- a/pages/profile/stats.pixy +++ b/pages/profile/stats.pixy @@ -9,7 +9,7 @@ //- span= pie.Title //- PieChart(pie.Slices) -//- .footer.mountable +//- footer.footer.mountable //- span= viewUser.Nick + " spent " //- span= int(stats.AnimeWatchingTime / time.Hour / 24) //- span days watching anime. \ No newline at end of file diff --git a/pages/quote/quote.pixy b/pages/quote/quote.pixy index 8765f776..cdf3bcee 100644 --- a/pages/quote/quote.pixy +++ b/pages/quote/quote.pixy @@ -17,7 +17,7 @@ component QuoteMainColumn(quote *arn.Quote, user *arn.User) h3.widget-title Comments Comments(quote, user) - .footer.mountable + footer.footer.mountable if quote.EditedBy != "" span Edited span.utc-date(data-date=quote.Edited) diff --git a/pages/settings/accounts.pixy b/pages/settings/accounts.pixy index 88f0734f..4b8821bd 100644 --- a/pages/settings/accounts.pixy +++ b/pages/settings/accounts.pixy @@ -86,4 +86,4 @@ component SettingsAccounts(user *arn.User) Icon("refresh") span Sync - .footer Reserved for upcoming features. \ No newline at end of file + footer.footer Reserved for upcoming features. \ No newline at end of file diff --git a/pages/settings/info.pixy b/pages/settings/info.pixy index 370212be..9050ad54 100644 --- a/pages/settings/info.pixy +++ b/pages/settings/info.pixy @@ -22,6 +22,6 @@ component SettingsInfo(user *arn.User) InputBool("Privacy.ShowAge", user.Settings().Privacy.ShowAge, "Show age", "Shows your age on the profile page") InputBool("Privacy.ShowLocation", user.Settings().Privacy.ShowLocation, "Show location", "Shows your location on the profile page") - .footer + footer.footer p Can only be made visible to logged in members. \ No newline at end of file diff --git a/pages/settings/notifications.pixy b/pages/settings/notifications.pixy index 4cbb901d..85f819d5 100644 --- a/pages/settings/notifications.pixy +++ b/pages/settings/notifications.pixy @@ -27,7 +27,7 @@ component SettingsNotifications(user *arn.User) Icon("paper-plane") span Send test notification - .footer + footer.footer p(title="This setting is not account bound, instead it is bound to your browser.") You can customize this setting on every device you own. .widget.mountable(data-api="/api/settings/" + user.ID) diff --git a/pages/settings/personal.pixy b/pages/settings/personal.pixy index 8b7c17dc..1d5444a5 100644 --- a/pages/settings/personal.pixy +++ b/pages/settings/personal.pixy @@ -30,7 +30,7 @@ component SettingsPersonal(user *arn.User) img.profile-cover.cover-input-preview.lazy(data-src=user.CoverLink("small"), data-webp="true", alt="Cover image") if !user.IsPro() - .footer + footer.footer p PRO account required. component AvatarInput(user *arn.User) diff --git a/pages/shop/shop.pixy b/pages/shop/shop.pixy index 56344e5b..5a1b7e53 100644 --- a/pages/shop/shop.pixy +++ b/pages/shop/shop.pixy @@ -7,7 +7,7 @@ component Shop(items []*arn.ShopItem, itemPopularity map[string]int, user *arn.U each item in items ShopItem(item, itemPopularity[item.ID]) - #pro-benefits-footer.buttons.mountable + footer#pro-benefits-footer.buttons.mountable button.pro-benefits-button.action(data-action="toggleFade", data-trigger="click", data-element-id="pro-benefits") RawIcon("question-circle") p View benefits of PRO accounts diff --git a/pages/soundtrack/soundtrack.pixy b/pages/soundtrack/soundtrack.pixy index 20921257..03f87cac 100644 --- a/pages/soundtrack/soundtrack.pixy +++ b/pages/soundtrack/soundtrack.pixy @@ -61,7 +61,7 @@ component SoundTrackPage(track *arn.SoundTrack, user *arn.User) h3.widget-title Comments Comments(track, user) - .footer.mountable + footer.footer.mountable if track.EditedBy != "" span Edited span.utc-date(data-date=track.Edited) diff --git a/pages/statistics/statistics.pixy b/pages/statistics/statistics.pixy index bc5d8c17..64ef7bdb 100644 --- a/pages/statistics/statistics.pixy +++ b/pages/statistics/statistics.pixy @@ -9,7 +9,7 @@ component Statistics(pieCharts []*arn.PieChart) h3.widget-title= pie.Title PieChart(pie.Slices) - .footer + footer.footer p Data is collected for statistical purposes only. We respect user privacy and we will never display or sell critical data to 3rd party services. component StatisticsHeader diff --git a/pages/users/editors.pixy b/pages/users/editors.pixy index d06dde32..381f897d 100644 --- a/pages/users/editors.pixy +++ b/pages/users/editors.pixy @@ -6,5 +6,5 @@ component EditorRankingList(users []*arn.User, idToScore map[string]int, url str each user in users UserCard(user, fmt.Sprintf("%s points", humanize.Comma(int64(idToScore[user.ID])))) - .footer.mountable + footer.footer.mountable p Score is generated from new data submissions and data fixes. \ No newline at end of file diff --git a/pages/users/users.pixy b/pages/users/users.pixy index aed200fd..756650d9 100644 --- a/pages/users/users.pixy +++ b/pages/users/users.pixy @@ -24,7 +24,7 @@ component ProUsers(users []*arn.User, url string) each user in users UserCard(user, "until " + user.ProExpires[:10]) - .footer.mountable + footer.footer.mountable p We are thankful to everyone supporting the site! component UserLists(groups []*utils.UserList, url string) @@ -39,7 +39,7 @@ component UserLists(groups []*utils.UserList, url string) UserCard(user, stringutils.Capitalize(user.Role)) component StaffRecruitment - .footer.mountable + footer.footer.mountable p a(href="https://github.com/animenotifier/notify.moe#installation", target="_blank", rel="noopener") Interested in contributing code? br diff --git a/pages/welcome/welcome.pixy b/pages/welcome/welcome.pixy index 5d463833..fafa75d9 100644 --- a/pages/welcome/welcome.pixy +++ b/pages/welcome/welcome.pixy @@ -12,7 +12,7 @@ component Welcome(user *arn.User) //- [^\\W\\s\\d]{1,24}[A-Za-z]{1} InputText("Nick", user.CleanNick(), "Nick", "Your username on notify.moe", 25) - .footer.mountable + footer.footer.mountable p Only letters and underscore. else if !user.HasAvatar() p.welcome-text.mountable Add an avatar so people can recognize you. @@ -20,7 +20,7 @@ component Welcome(user *arn.User) .mountable(data-api="/api/user/" + user.ID) AvatarInput(user) - .footer.mountable + footer.footer.mountable p Recommended size: 560x560 (minimum: 280x280) else if user.Introduction == "" p.welcome-text.mountable Write a little introduction for your profile. @@ -28,7 +28,7 @@ component Welcome(user *arn.User) .mountable(data-api="/api/user/" + user.ID) InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us a little bit about yourself", 2000) - .footer.mountable + footer.footer.mountable p Markdown allowed. else p.welcome-text.mountable You're ready to start using Anime Notifier! diff --git a/styles/footer.scarlet b/styles/footer.scarlet index cd5faee8..b93b3dda 100644 --- a/styles/footer.scarlet +++ b/styles/footer.scarlet @@ -1,6 +1,4 @@ .footer - horizontal-wrap - justify-content center text-align center font-size 0.8rem opacity 0.7 @@ -13,7 +11,7 @@ opacity 0.7 !important .footer-element - horizontal + display inline-flex align-items center :after