Skip to content

Commit

Permalink
Dark theme logo
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperFKorban committed Jul 5, 2021
1 parent 49870ea commit 430071b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions scaladoc/resources/dotty_res/images/scaladoc_logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion scaladoc/resources/dotty_res/styles/scalastyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,20 @@ th {
margin-left: -16px;
}

.theme-dark .scaladoc_logo {
display: none;
}

.scaladoc_logo_dark {
display: none;
}

.theme-dark .scaladoc_logo_dark {
width: 116px;
margin-left: -16px;
display: block;
}

/* Navigation */
#sideMenu2 {
overflow: auto;
Expand Down Expand Up @@ -491,7 +505,7 @@ footer {
border-top: 1px solid var(--border-light);
font-size: 14px;
}
.theme-dark footer img {
.theme-dark footer .social-icon {
/* "Poor man's dark mode" for images.
* This works great with black images,
* and just-okay with colored images.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
src := resolveRoot(link.dri, "images/scaladoc_logo.svg"),
alt := "scaladoc",
cls := "scaladoc_logo"
),
img(
src := resolveRoot(link.dri, "images/scaladoc_logo_dark.svg"),
alt := "scaladoc",
cls := "scaladoc_logo_dark"
)
)
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
dottyRes("fonts/dotty-icons.woff"),
dottyRes("fonts/dotty-icons.ttf"),
dottyRes("images/scaladoc_logo.svg"),
dottyRes("images/scaladoc_logo_dark.svg"),
dottyRes("images/class.svg"),
dottyRes("images/class_comp.svg"),
dottyRes("images/object.svg"),
Expand Down

0 comments on commit 430071b

Please sign in to comment.