Skip to content

Commit

Permalink
Add author notes label
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiriVulpes committed Jan 30, 2025
1 parent 659f80a commit 8e1fb1f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 15 deletions.
4 changes: 3 additions & 1 deletion lang/en-nz.quilt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ profile: Profile
chapters: Chapters
settings: Settings
account-settings: Account Settings
notes: Notes

## action
login-or-signup: Log In or Sign Up
Expand All @@ -41,7 +42,7 @@ name/label: Name
vanity/label: Vanity
description/label: Description
body/label: Body
notes/label: Notes
notes/label=shared/term/notes
tags/label: Tags
tags/placeholder: Type to filter tag suggestions...
tags/suggestion/add-as-custom: Add custom tag:
Expand Down Expand Up @@ -194,6 +195,7 @@ action/label/love=shared/action/love
action/label/edit=shared/action/edit
action/label/delete=shared/action/delete
tags/label: This chapter contains:
notes/label=shared/term/notes

# notification
comment-chapter: {TRIGGERED_BY} has commented on {CHAPTER} of {WORK}
Expand Down
8 changes: 7 additions & 1 deletion src/ui/view/ChapterView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ export default ViewDefinition({
Component()
.style('view-type-chapter-block-notes', 'view-type-chapter-block-notes-before')
.setMarkdownContent(TextBody.resolve(chapter.notes_before, chapter.mentions))
.prepend(chapter.notes_before && Component()
.style('view-type-chapter-block-notes-label')
.text.use('chapter/notes/label'))
.append((chapter.global_tags?.length || chapter.custom_tags?.length) && Component()
.style('view-type-chapter-block-tags-title')
.style('view-type-chapter-block-notes-label', 'view-type-chapter-block-tags-title')
.text.use('chapter/tags/label'))
.append(Tags()
.set(chapter as TagsState)
Expand All @@ -83,6 +86,9 @@ export default ViewDefinition({
Component()
.style('view-type-chapter-block-notes', 'view-type-chapter-block-notes-after')
.setMarkdownContent(TextBody.resolve(chapter.notes_after, chapter.mentions))
.prepend(chapter.notes_after && Component()
.style('view-type-chapter-block-notes-label')
.text.use('chapter/notes/label'))
.appendTo(slot)
})

Expand Down
31 changes: 18 additions & 13 deletions style/view/type/chapter.chiri
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,6 @@
#after: .paginator-content, .paginator-content--has-header
%padding-top-0

&-tags:
%block
%unmargin-top-3

&-title:
%block
%uppercase
%margin-bottom-1
%font-0
%bold
%colour-6
letter-spacing: .05em

&-notes:
%padding-3
%padding-top-0
Expand All @@ -46,6 +33,24 @@
&-after:
%margin-bottom-3

&-label:
%block
%uppercase
%unmargin-bottom-2
%margin-top-2
%font-0
%bold
%colour-6
letter-spacing: .05em

&-tags:
%block
%unmargin-top-3

&-title:
#after: .view-type-chapter-block-notes-label
%margin-bottom-2

&-body:
%padding-top-3
%padding-bottom-4
Expand Down

0 comments on commit 8e1fb1f

Please sign in to comment.