Improved page titles
This commit is contained in:
parent
7efeddab55
commit
fb7d2fa24c
@ -1,7 +1,7 @@
|
|||||||
component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn.Anime)
|
component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn.Anime)
|
||||||
.widgets.mountable
|
.widgets.mountable
|
||||||
.widget.anime-list-item-view(data-api="/api/animelist/" + viewUser.ID + "/update/" + anime.ID)
|
.widget.anime-list-item-view(data-api="/api/animelist/" + viewUser.ID + "/update/" + anime.ID)
|
||||||
h2= anime.Title.Canonical
|
h1= anime.Title.Canonical
|
||||||
|
|
||||||
InputNumber("Episodes", float64(item.Episodes), "Episodes", "Number of episodes you watched", "0", arn.EpisodeCountMax(anime.EpisodeCount), "1")
|
InputNumber("Episodes", float64(item.Episodes), "Episodes", "Number of episodes you watched", "0", arn.EpisodeCountMax(anime.EpisodeCount), "1")
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component EditAnime(anime *arn.Anime)
|
component EditAnime(anime *arn.Anime)
|
||||||
h2= anime.Title.Canonical
|
h1= anime.Title.Canonical
|
||||||
|
|
||||||
.widgets
|
.widgets
|
||||||
.widget(data-api="/api/anime/" + anime.ID)
|
.widget(data-api="/api/anime/" + anime.ID)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Forum(tag string, threads []*arn.Thread, threadsPerPage int)
|
component Forum(tag string, threads []*arn.Thread, threadsPerPage int)
|
||||||
h2.page-title Forum
|
h1.page-title Forum
|
||||||
ForumTags
|
ForumTags
|
||||||
.forum
|
.forum
|
||||||
ThreadList(threads)
|
ThreadList(threads)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
component Forums
|
|
||||||
h2.forum-header Forum
|
|
||||||
ForumTags
|
|
@ -1,5 +1,5 @@
|
|||||||
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
||||||
h2= "anilist.co Import (" + user.Accounts.AniList.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "anilist.co Import (" + user.Accounts.AniList.Nick + ", " + toString(len(matches)) + " anime)"
|
||||||
|
|
||||||
table.import-list
|
table.import-list
|
||||||
thead
|
thead
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Music(tracks []*arn.SoundTrack)
|
component Music(tracks []*arn.SoundTrack)
|
||||||
h2 Soundtracks
|
h1 Soundtracks
|
||||||
|
|
||||||
.music-buttons
|
.music-buttons
|
||||||
a.button.ajax(href="/new/soundtrack")
|
a.button.ajax(href="/new/soundtrack")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
component Thread(thread *arn.Thread, posts []*arn.Post, user *arn.User)
|
||||||
h2.thread-title= thread.Title
|
h1.thread-title= thread.Title
|
||||||
|
|
||||||
#thread.thread(data-id=thread.ID)
|
#thread.thread(data-id=thread.ID)
|
||||||
.posts
|
.posts
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Track(track *arn.SoundTrack)
|
component Track(track *arn.SoundTrack)
|
||||||
h2= track.Media[0].Title
|
h1= track.Media[0].Title
|
||||||
|
|
||||||
.sound-tracks
|
.sound-tracks
|
||||||
SoundTrackAllMedia(track)
|
SoundTrackAllMedia(track)
|
@ -8,6 +8,7 @@ import * as actions from "./Actions"
|
|||||||
export class AnimeNotifier {
|
export class AnimeNotifier {
|
||||||
app: Application
|
app: Application
|
||||||
user: HTMLElement
|
user: HTMLElement
|
||||||
|
title: string
|
||||||
visibilityObserver: IntersectionObserver
|
visibilityObserver: IntersectionObserver
|
||||||
|
|
||||||
imageFound: MutationQueue
|
imageFound: MutationQueue
|
||||||
@ -17,6 +18,7 @@ export class AnimeNotifier {
|
|||||||
constructor(app: Application) {
|
constructor(app: Application) {
|
||||||
this.app = app
|
this.app = app
|
||||||
this.user = null
|
this.user = null
|
||||||
|
this.title = "Anime Notifier"
|
||||||
|
|
||||||
this.imageFound = new MutationQueue(elem => elem.classList.add("image-found"))
|
this.imageFound = new MutationQueue(elem => elem.classList.add("image-found"))
|
||||||
this.imageNotFound = new MutationQueue(elem => elem.classList.add("image-not-found"))
|
this.imageNotFound = new MutationQueue(elem => elem.classList.add("image-not-found"))
|
||||||
@ -96,6 +98,16 @@ export class AnimeNotifier {
|
|||||||
Promise.resolve().then(() => this.displayLocalDates()),
|
Promise.resolve().then(() => this.displayLocalDates()),
|
||||||
Promise.resolve().then(() => this.setSelectBoxValue()),
|
Promise.resolve().then(() => this.setSelectBoxValue()),
|
||||||
Promise.resolve().then(() => this.assignActions())
|
Promise.resolve().then(() => this.assignActions())
|
||||||
|
|
||||||
|
let headers = document.getElementsByTagName("h1")
|
||||||
|
|
||||||
|
if(this.app.currentPath === "/" || headers.length === 0) {
|
||||||
|
if(document.title !== this.title) {
|
||||||
|
document.title = this.title
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
document.title = headers[0].innerText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onIdle() {
|
onIdle() {
|
||||||
|
@ -23,24 +23,20 @@ post-content-padding-y = 0.75rem
|
|||||||
padding 0.75rem 1rem
|
padding 0.75rem 1rem
|
||||||
position relative
|
position relative
|
||||||
|
|
||||||
|
h1, h2, h3
|
||||||
|
font-weight normal
|
||||||
|
text-align left
|
||||||
|
line-height 1.5em
|
||||||
|
margin typography-margin 0
|
||||||
|
|
||||||
h1
|
h1
|
||||||
font-size 1.5rem
|
font-size 1.5rem
|
||||||
line-height 1.5em
|
|
||||||
text-align left
|
|
||||||
margin typography-margin 0
|
|
||||||
|
|
||||||
h2
|
h2
|
||||||
font-size 1.3rem
|
font-size 1.3rem
|
||||||
line-height 1.5em
|
|
||||||
font-weight normal
|
|
||||||
text-align left
|
|
||||||
margin typography-margin 0
|
|
||||||
|
|
||||||
h3
|
h3
|
||||||
font-size 1.1rem
|
font-size 1.1rem
|
||||||
line-height 1.5em
|
|
||||||
font-weight normal
|
|
||||||
text-align left
|
|
||||||
|
|
||||||
:hover
|
:hover
|
||||||
.post-toolbar
|
.post-toolbar
|
||||||
|
Loading…
Reference in New Issue
Block a user