Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New light theme for sbt-typelevel-site! #573

Merged
merged 6 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How do I cut a release?

Create a release on GitHub with a v-prefixed, semantically-versioned tag (or, tag a commit locally and push to GitHub). This will start a CI release. Example tags: `v0.4.2`, `v1.2.3`, `v1.0.0-M1`, `v1.2.0-RC2`.
Create a release on GitHub with a v-prefixed, semantically-versioned tag (or, tag a commit locally and push to GitHub). This will start a CI release. Example tags: `v0.4.2`, `v1.2.3`, `v1.0.0-M1`, `v1.2.0-RC2`.

It is also possible to run the release process entirely locally by invoking the `tlRelease` command, assuming that you have correctly configured your PGP keys and Sonatype credentials.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import laika.ast.Span
import laika.ast.TemplateString
import laika.helium.Helium
import laika.helium.config._
import laika.theme.config.Color
import org.typelevel.sbt.TypelevelGitHubPlugin.gitHubUserRepo
import sbt.Def._
import sbt.Keys.licenses
Expand Down Expand Up @@ -55,6 +56,23 @@ object TypelevelSiteSettings {
Favicon.external("https://typelevel.org/img/favicon.png", "32x32", "image/png")
)

// light theme colours
// Tl suffix indicates these are lifted directly from somewhere within the Typelevel site
val redTl = Color.hex("f8293a")
val brightRedTl = Color.hex("fe4559")
val coralTl = Color.hex("f86971")
val pinkTl = Color.hex("ffb4b5")
val whiteTl = Color.hex("ffffff")
val gunmetalTl = Color.hex("21303f")
val platinumTl = Color.hex("e6e8ea") // e2e4e6?
val offWhiteTl = Color.hex("f2f3f4")
// Extra colours to supplement
val lightPink = Color.hex("ffe7e7")
val lightPinkGrey = Color.hex("f7f3f3") // f6f0f0
val slateBlue = Color.hex("335C67")
val lightSlateBlue = Color.hex("ddeaed") // cce0e4
val softYellow = Color.hex("f9f5d9") // f3eab2

val defaults: Initialize[Helium] = setting {
GenericSiteSettings
.defaults
Expand All @@ -75,6 +93,42 @@ object TypelevelSiteSettings {
homeLink = defaultHomeLink,
navLinks = List(chatLink, mastodonLink)
)
.site
.themeColors(
primary = redTl,
secondary = slateBlue,
primaryMedium = coralTl,
primaryLight = lightPinkGrey,
text = gunmetalTl,
background = whiteTl,
bgGradient = (platinumTl, offWhiteTl)
)
.site
.messageColors(
info = slateBlue,
infoLight = lightSlateBlue,
warning = slateBlue,
warningLight = softYellow,
error = slateBlue,
errorLight = lightPink
)
.site
.syntaxHighlightingColors(
base = ColorQuintet(
gunmetalTl,
Color.hex("73a6ad"), // comments
Color.hex("b2adb4"), // ?
pinkTl, // identifier
platinumTl // base colour
),
wheel = ColorQuintet(
Color.hex("8fa1c9"), // substitution, annotation
Color.hex("81e67b"), // keyword, escape-sequence
Color.hex("ffde6d"), // declaration name
Color.hex("759EB8"), // literals
coralTl // type/class name
)
)
}

}