Skip to content

Commit 2ecc94d

Browse files
Make the scaladoc footer text configurable (#16064)
Among the multiple changes in #15697 the footer text stoped being configurable (defaulting to an EPFL copyright). This PR makes the footer text configurable again. Incidentally, this will also fix the copyright message to show 2022 (notice that the current message says 2021, while [the message defined in the build](https://github.com/lampepfl/dotty/blob/afc6ce4d2135e3532bf28146a7700d2cc4338e90/project/Build.scala#L1887) uses `$currentYear`).
2 parents 16b80fb + 84c12e1 commit 2ecc94d

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,8 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
201201

202202
val (apiNavOpt, docsNavOpt): (Option[(Boolean, Seq[AppliedTag])], Option[(Boolean, Seq[AppliedTag])]) = buildNavigation(link)
203203

204-
def textFooter: String | AppliedTag =
205-
args.projectFooter.fold("") { f =>
206-
span(id := "footer-text")(
207-
raw(f)
208-
)
209-
}
204+
def textFooter: String =
205+
args.projectFooter.getOrElse("")
210206

211207
def quickLinks(mobile: Boolean = false): TagArg =
212208
val className = if mobile then "mobile-menu-item" else "text-button"
@@ -277,13 +273,9 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
277273
),
278274
div(cls := "right-container")(
279275
socialLinks,
280-
div(cls := "text")(
281-
"© 2002-2021 · LAMP/EPFL"
282-
)
276+
div(cls := "text")(textFooter)
283277
),
284-
div(cls := "text-mobile")(
285-
"© 2002-2021 · LAMP/EPFL"
286-
)
278+
div(cls := "text-mobile")(textFooter)
287279
),
288280
div(id := "scaladoc-searchBar"),
289281
div(id := "main")(
@@ -316,13 +308,9 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
316308
a(href := "https://gitter.im/scala/scala") (
317309
button(cls := "icon-button gitter"),
318310
),
319-
div(cls := "text")(
320-
"© 2002-2021 · LAMP/EPFL"
321-
)
311+
div(cls := "text")(textFooter)
322312
),
323-
div(cls := "text-mobile")(
324-
"© 2002-2021 · LAMP/EPFL"
325-
)
313+
div(cls := "text-mobile")(textFooter)
326314
),
327315
),
328316
)

0 commit comments

Comments
 (0)