Skip to content

Commit

Permalink
Added ability to add multiple next links (lagom#456)
Browse files Browse the repository at this point in the history
Fixes lagom#437.
  • Loading branch information
jroper authored and ignasi35 committed Feb 13, 2017
1 parent 8319022 commit 54ab27d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/manual/java/gettingstarted/index.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Installation:Installing Lagom
GettingStarted:Getting started with Lagom
GettingStartedMaven:Getting started with Lagom in Maven
GettingStarted:Getting started with Lagom;next=GettingStartedMaven,GettingStartedSbt
GettingStartedMaven:Getting started with Lagom in Maven;next=IDEs
GettingStartedSbt:Getting started with Lagom in Sbt
IDEs:Import a Lagom build in your IDE
2 changes: 1 addition & 1 deletion docs/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lazy val plugins = (project in file(".")).dependsOn(dev)
lazy val dev = ProjectRef(Path.fileProperty("user.dir").getParentFile, "sbt-plugin")

resolvers += Resolver.typesafeIvyRepo("releases")
addSbtPlugin("com.lightbend.markdown" % "sbt-lightbend-markdown" % "1.4.2")
addSbtPlugin("com.lightbend.markdown" % "sbt-lightbend-markdown" % "1.5.0")

// Needed for bintray configuration code samples
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
Expand Down
2 changes: 1 addition & 1 deletion docs/theme/src/main/public/all-styles-concat.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/theme/src/main/scala/lagom/LagomMarkdownTheme.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object LagomMarkdownTheme extends MarkdownTheme {
sidebar: Option[Html], breadcrumbs: Option[Html], apiDocs: Seq[(String, String)], sourceUrl: Option[String]): Html =
html.documentation(projectName, title, home, content, sidebar, breadcrumbs, apiDocs, sourceUrl)

override def renderNextLink(toc: TocTree): Html = html.nextLink(toc)
override def renderNextLinks(nextLinks: List[TocTree]): Html = html.nextLinks(nextLinks)

override def renderSidebar(hierarchy: List[Toc]): Html = html.sidebar(hierarchy)

Expand Down
9 changes: 0 additions & 9 deletions docs/theme/src/main/twirl/lagom/nextLink.scala.html

This file was deleted.

23 changes: 23 additions & 0 deletions docs/theme/src/main/twirl/lagom/nextLinks.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*@
@(nextLinks: Seq[play.doc.TocTree])

@if(nextLinks.nonEmpty) {
@if(nextLinks.tail.nonEmpty) {
<nav class="next-links">
<strong>Next:</strong>
<ul>
@for(link <- nextLinks) {
<li><a href="@{link.page}.html">@link.title</a></li>
}
</ul>
</nav>
} else {
@for(link <- nextLinks) {
<nav class="next-link">
<a href="@{link.page}.html"><strong>Next: </strong> @link.title</a>
</nav>
}
}
}

0 comments on commit 54ab27d

Please sign in to comment.