Skip to content

Commit

Permalink
Make author names on works link to author page
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiriVulpes committed Nov 27, 2024
1 parent b788179 commit 4e14daa
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"api.fluff4.me": "^1.0.160",
"api.fluff4.me": "^1.0.161",
"prosemirror-example-setup": "1.2.3",
"prosemirror-markdown": "1.13.1",
"prosemirror-state": "1.4.3",
Expand Down
2 changes: 1 addition & 1 deletion src/ui/component/Work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Work = Component.Builder(async (component, work: WorkData, author?: Author
block.description
.style("work-author-list")
.style.bind(isFlush, "work-author-list--flush")
.append(Component()
.append(Link(`/author/${author.vanity}`)
.style("work-author")
.text.set(author.name))

Expand Down
2 changes: 2 additions & 0 deletions style/component/chapter.chiri
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
%grid
grid-template-columns: auto 1fr auto auto

#after: .link
%grid
%columns-subgrid
%padding-1-4
Expand All @@ -12,6 +13,7 @@
%cursor-pointer
%decoration-none
%colour-inherit
%weight-inherit
#transition: #{transition("background")}

::hover, ::focus:
Expand Down
10 changes: 10 additions & 0 deletions style/component/core/link.chiri
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
.link:
%weight-bold
%colour-blue
text-decoration-color: transparent
#transition: #{transition("color")}, #{transition("text-decoration-color")}

::hover, ::focus:
%decoration-underline
%colour-0
text-decoration-color: $colour-0
$transition-duration: $transition-focus
3 changes: 3 additions & 0 deletions style/component/work.chiri
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
&-timestamp:

&--link:
#after: .link
%decoration-none
%colour-inherit
%weight-inherit
%overflow-hidden
#transition: #{transition("background")}

Expand Down
12 changes: 9 additions & 3 deletions style/var/colour.chiri
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
$colour-blue: #69b3e2
$colour-blue-saturated: #0173ba
$colour-pink: #d94e8f
#do:
#record!string colours = {
blue: "#69b3e2
blue-saturated: "#0173ba
pink: "#d94e8f

#each colours as var name, var colour:
$colour-#{name}: #{colour}
%colour-#{name}: colour: $colour-#{name}

#for var i = 1, i < 100, set i++:
%background-light-a#{i}: background: color-mix(in lch, $light-0, transparent #{100 - i}%)
Expand Down

0 comments on commit 4e14daa

Please sign in to comment.