@@ -208,37 +208,28 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
208208 )
209209 }
210210
211+ def quickLinks (mobile : Boolean = false ): TagArg =
212+ val className = if mobile then " mobile-menu-item" else " text-button"
213+ args.quickLinks.map { quickLink =>
214+ a(href := quickLink.url, cls := className)(quickLink.text)
215+ }
216+
211217 div(id := " " )(
212218 div(id := " header" , cls := " body-small" )(
213219 div(cls := " header-container-left" )(
214- projectLogoElem.toSeq,
215- darkProjectLogoElem.toSeq,
216- span(cls := " project-name h300" )(args.name),
220+ a(href := pathToRoot(link.dri), cls := " logo-container" )(
221+ projectLogoElem.toSeq,
222+ darkProjectLogoElem.toSeq,
223+ span(cls := " project-name h300" )(args.name)
224+ ),
217225 span(onclick := " dropdownHandler(event)" , cls := " text-button with-arrow" , id := " dropdown-trigger" )(
218226 a(args.projectVersion.map(v => div(cls:= " projectVersion" )(v)).toSeq),
219227 ),
220228 div(id := " version-dropdown" , cls := " dropdown-menu" ) ()
221229 ),
222230 div(cls:= " header-container-right" )(
223- button(id := " search-toggle" , cls := " icon-button" ),
224- a(href := " https://www.scala-lang.org/download/" , cls := " text-button" ) (
225- " Download" ,
226- ),
227- a(href := " https://docs.scala-lang.org/" , cls := " text-button" ) (
228- " Documentation" ,
229- ),
230- a(href := " https://index.scala-lang.org" , cls := " text-button" ) (
231- " Libraries" ,
232- ),
233- a(href := " https://www.scala-lang.org/contribute/" , cls := " text-button" ) (
234- " Contribute" ,
235- ),
236- a(href := " https://www.scala-lang.org/contribute/" , cls := " text-button" ) (
237- " Blog" ,
238- ),
239- a(href := " https://www.scala-lang.org/blog/" , cls := " text-button" ) (
240- " Community" ,
241- ),
231+ button(id := " search-toggle" , cls := " icon-button" ),
232+ quickLinks(),
242233 span(id := " theme-toggle" , cls := " icon-button" ),
243234 span(id := " mobile-menu-toggle" , cls := " icon-button hamburger" ),
244235 ),
@@ -253,24 +244,7 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
253244 ),
254245 div(cls := " mobile-menu-container body-medium" )(
255246 input(id := " mobile-scaladoc-searchbar-input" , cls := " scaladoc-searchbar-input" , `type` := " search" , `placeholder`:= " Find anything" ),
256- a(href := " https://www.scala-lang.org/download/" , cls := " mobile-menu-item" ) (
257- " Download" ,
258- ),
259- a(href := " https://docs.scala-lang.org/" , cls := " mobile-menu-item" ) (
260- " Documentation" ,
261- ),
262- a(href := " https://index.scala-lang.org" , cls := " mobile-menu-item" ) (
263- " Libraries" ,
264- ),
265- a(href := " https://www.scala-lang.org/contribute/" , cls := " mobile-menu-item contribute" ) (
266- " Contribute" ,
267- ),
268- a(href := " https://www.scala-lang.org/contribute/" , cls := " mobile-menu-item" ) (
269- " Blog" ,
270- ),
271- a(href := " https://www.scala-lang.org/blog/" , cls := " mobile-menu-item" ) (
272- " Community" ,
273- ),
247+ quickLinks(mobile = true ),
274248 span(id := " mobile-theme-toggle" , cls := " mobile-menu-item mode" ),
275249 )
276250 ),
0 commit comments