diff --git a/app/assets/css/main.sass b/app/assets/css/main.sass
index 7c1a7b7..0cbbd60 100644
--- a/app/assets/css/main.sass
+++ b/app/assets/css/main.sass
@@ -6,7 +6,7 @@
// Make sure the charset is set appropriately
@import foundation/functions
-$row-width: rem-calc(1200)
+$row-width: rem-calc(1000)
$small-range: (0em, 55em)
$medium-range: (55.063em, 64em)
$large-range: (64.063em, 90em)
diff --git a/app/assets/css/modules/_base.sass b/app/assets/css/modules/_base.sass
index 235f69e..b3a2656 100644
--- a/app/assets/css/modules/_base.sass
+++ b/app/assets/css/modules/_base.sass
@@ -2,7 +2,7 @@
body
background: $navy
padding: 0
- margin: 0
+ margin: 0
.fw-wrapper
padding: 60px 0px
@@ -30,6 +30,8 @@ body
background-color: $slate-tt
h1,h2,h3,h4,p,a
color: $white
+ &.white
+ background-color: $white
&.white-ltr
background-color: $white-ltr
&.white-dkr
@@ -76,17 +78,15 @@ body
&.scala
background-color: $scala-red
h1,h2,h3,h4,p,a
- color: $white
+ color: $white
#site-header
background: $white
margin: 0px 0 5px 0
height: 75px
border-top: 5px solid $navy
- position: fixed
display: block
width: 100%
- z-index: 9999
box-shadow: 0 0 8px rgba(black,.5)
&.fw-wrapper
padding: 0
@@ -125,7 +125,7 @@ body
height: 70px
line-height: 70px
padding: 0 30px
- color: navy
+ color: slate-text
border-left: 1px solid $white-dkr
font-weight: bold
font-stretch: condensed
@@ -134,14 +134,14 @@ body
transition: all 150ms ease-in-out
text-transform: uppercase
&:link, &:visited
- color: $navy
+ color: $slate-text
&:hover
background: rgba(#f0f3f6,0.2)
- box-shadow: inset 0 4px 0 $navy,inset 0 0 1px $grey-ltr
+ box-shadow: inset 0 4px 0 $slate-text,inset 0 0 1px $grey-ltr
transition: all 150ms ease-in-out
text-decoration: none
&:active
- color: $navy
+ color: $slate-text
.svg-icon-typesafe-full-color
width: 100px
height: 40px
@@ -151,8 +151,8 @@ body
float: left
.page-title
- min-height: 140px
- padding: 100px 0 20px 0
+ height: 65px
+ padding: 25px 0 20px 0
background: transparent url(../images/conductr-bg-strip.png) repeat-x bottom left
h3
color: $white
@@ -163,7 +163,7 @@ body
font-style: italic
.page-content
- background: $white-ltr
+ background: $white
min-height: 600px
.left-off-canvas-menu
@@ -205,7 +205,7 @@ body
text-decoration: none
&.active
background: $white-dkr
- color: $navy
+ color: $slate-text
padding: 3px 3px 3px 10px
border-radius: $br
&:after
@@ -214,7 +214,7 @@ body
font-weight: 700
float: right
-.in-page-toc
+#sidebar
padding: 0
background: $white
background: linear-gradient(left,0% $white-ltr,5% $white)
@@ -222,58 +222,67 @@ body
border-radius: $br
border: 1px solid $white-dkr
border-bottom: 3px solid $white-dkr
- h3, h3 a
- color: $navy
- &:hover
- text-decoration: none
- color: $blue-text
- &.active
- color: $blue-text
- aside > ul
- padding-top: 14px
- ul
- margin: 0
- padding: 0
- line-height: 2em
- > li
- list-style-type: none
- font-size: 1.4em
- padding-left: 20px
- a
- display: block
- margin-left: -20px
+ #toolbar
+ padding: 1em 20px .5em
+ margin-bottom: 1em
+ border-bottom: 1px solid $white-ltr
+ h3
+ display: inline-block
+ font-weight: 500
+ .versionNumber
+ float: right
+ #toc
+ h3, h3 a
+ color: $slate-text
+ &:hover
+ text-decoration: none
+ color: $blue-text
+ &.active
+ color: $blue-text
+ ul
+ padding-top: 14px
+ margin: 0
+ padding: 0
+ line-height: 2em
+ > li
+ list-style-type: none
+ font-size: 1.4em
padding-left: 20px
- border-bottom: 1px solid $white-ltr
- transition: $anime
- &.active
- border-left: 10px solid $blue
- border-bottom: none
- background: $white-dkr
- font-weight: 700
- transition: $anime
- color: $navy
- &:hover
- background: $white-ltr
- text-decoration: none
+ a
+ display: block
+ margin-left: -20px
+ padding-left: 20px
+ border-bottom: 1px solid $white-ltr
transition: $anime
- > ul li
- font-size: 0.8em
- padding-left: 0
+ &.active
+ border-left: 10px solid $blue
+ border-bottom: none
+ background: $white-ltr
+ font-weight: 700
+ transition: $anime
+ color: $slate-text
+ &:hover
+ background: $white-ltr
+ text-decoration: none
+ transition: $anime
+ > ul li
+ font-size: 0.9em
+ padding-left: 0
#site-footer
color: $white
- .footer-toc aside > ul > li
- border-top: 1px solid $white-dkr
- padding-top: 4px
- margin: 0 0 10px 0
- float: left
- width: 100%
+ .footer-toc a:hover
+ text-decoration: none
+ color: $blue-text
+ .footer-toc h2
+ font-size: 1em
+ font-weight: 700
text-transform: uppercase
- @media only screen and (min-width: $medium)
- width: 29%
- margin-right: 2%
+ margin-bottom: .2rem
> a
- color: white
+ color: $red
+ .footer-toc ul > li > a
+ color: $white
.footer-toc ul
margin: 0
@@ -284,18 +293,6 @@ body
>ul li
padding-left: 0
text-transform: none
- a.active
- background: $white-dkr
- display: inline-block
- padding: 2px 15px 2px 6px
- color: $navy
- border-radius: $br
- &:hover
- text-decoration: none
- &:before
- content: "\203A"
- margin-right: 5px
- font-weight: 700
.logo-copyright
height: 30px
@@ -327,7 +324,7 @@ body
text-decoration: none
.next-prev-nav
- background: $white-dkr
+ background: $white-ltr
padding: 2em
border-radius: $br
p
@@ -364,5 +361,19 @@ body
margin-right: 6px
body .support-detail a:hover
- color: #ffffff
- text-decoration: underline
+ color: $blue
+ text-decoration: none
+
+.section-marker
+ position: absolute
+ width: 1em
+ margin-left: -1em
+ display: block
+ text-decoration: none
+ visibility: hidden
+ text-align: center
+ font-weight: normal
+h1:hover > a, h2:hover > a, h3:hover > a, h4:hover > a, h5:hover > a
+ visibility: visible
+ color: inherit
+ text-decoration: none
diff --git a/app/assets/css/modules/_tables.sass b/app/assets/css/modules/_tables.sass
index 5a60cf7..cd1731a 100644
--- a/app/assets/css/modules/_tables.sass
+++ b/app/assets/css/modules/_tables.sass
@@ -2,7 +2,7 @@
table
color: $navy
thead tr th
- background: $blue
+ background: $navy
color: $white
tr td
color: $navy
\ No newline at end of file
diff --git a/app/assets/css/modules/_type.sass b/app/assets/css/modules/_type.sass
index 0836656..82063ae 100644
--- a/app/assets/css/modules/_type.sass
+++ b/app/assets/css/modules/_type.sass
@@ -6,26 +6,28 @@ body
position: relative
cursor: default
font: 1em $typesafe-fonts
- color: $navy
+ color: $slate-text
font-smoothing: antialiased
+ -webkit-font-smoothing: antialiased
+ -moz-osx-font-smoothing: grayscale
-webkit-font-size-adjust: none
text-rendering: optimizeLegibility
h1
font-family: inherit
- font-size: 2em
+ font-size: 2.6em
font-weight: 300
- color: $navy
+ color: $slate-text
margin-bottom: 0.4em
margin-top: 1.1em
&:first-child
margin-top: 0
h2
font-family: inherit
- font-size: 1.6em
+ font-size: 1.8em
margin-bottom: 0.2em
margin-top: 1.3em
- font-weight: 300
- color: $navy
+ font-weight: 500
+ color: $slate-text
&:first-child
margin-top: 0
h3, .panel h3
@@ -33,7 +35,7 @@ h3, .panel h3
font-size: 1.125em
font-weight: 700
margin-top: 1.3em
- color: $navy
+ color: $slate-text
&:first-child
margin-top: 0
h4
@@ -41,21 +43,21 @@ h4
font-size: 1em
font-weight: 700
margin-top: 1.3em
- color: $navy
+ color: $slate-text
&:first-child
margin-top: 0
h5
font-family: inherit
font-size: 1em
margin-top: 1.3em
- color: $navy
+ color: $slate-text
&:first-child
margin-top: 0
h6
font-family: inherit
font-size: 1em
margin-top: 1.3em
- color: $navy
+ color: $slate-text
&:first-child
margin-top: 0
@@ -63,9 +65,8 @@ p
font-family: inherit
font-size: 1em
line-height: 1.45em
- margin-bottom: 1em
- margin-top: 0em
- color: $navy
+ margin: 1em 0em
+ color: $slate-text
a
font-family: inherit
color: $blue-text
@@ -88,46 +89,52 @@ a
h1 a, h2 a
font-family: inherit
- color: $navy
+ color: $slate-text
text-decoration: none
cursor: pointer
&:link
- color: $navy
+ color: $slate-text
&:visited
- color: $navy
+ color: $slate-text
&:hover
color: $blue-text
text-decoration: none
&:active
- color: $navy
+ color: $slate-text
pre
- padding: 0.125rem 0.3125rem 0.0625rem
- border: 1px solid $white-dkr
- background: $white
- margin: 0 0 30px 0
+ padding: 0.5rem 1rem !important
+ border: 1px solid $grey-code-dkr !important
+ -webkit-border-radius: 5px !important
+ border-radius: 5px !important
+ background: $grey-code !important
+ margin: 0 0 1rem 0 !important
+
+code
+ line-height: 1.45em !important
+ font-family: "Source Code Pro", Consolas, "Liberation Mono", Courier, monospace !important
+ font-size: 0.85em !important
+ padding: 0 !important
pre > code
background: none
border: none
-code
- line-height: 1.45em
- border: 1px solid $white-dkr
- background: $white
- font-family: "Source Code Pro", Consolas, "Liberation Mono", Courier, monospace
- font-size: 0.875em
+p > code
+ border: 1px solid $grey-code-dkr
+ -webkit-border-radius: 3px
+ border-radius: 3px
+ background: $grey-code-ltr
+ padding: 0.0625rem 0.25rem
blockquote
- background: $white
+ background: $grey-code
border-left: 10px solid $red
margin: 1.5em 0
padding: 1em 20px
- quotes: "\201C""\201D""\2018""\2019"
blockquote:before
color: $red
- content: open-quote
font-size: 4em
line-height: 0.1em
margin-right: 0.25em
@@ -135,5 +142,5 @@ blockquote:before
blockquote p
display: inline
- color: $navy
+ color: $slate-text
font-style: italic
diff --git a/app/assets/css/modules/_vars.sass b/app/assets/css/modules/_vars.sass
index 7a01999..8da6b25 100644
--- a/app/assets/css/modules/_vars.sass
+++ b/app/assets/css/modules/_vars.sass
@@ -39,6 +39,9 @@ $grey: #899CA9
$grey-dkr: #6F7F89
$grey-ltr: #8BA1B0
$grey-text: #778a99
+$grey-code-ltr: #FAFAFA
+$grey-code: #F7F7F7
+$grey-code-dkr: #DDDDDD
// GREENS
$green: #69af04
diff --git a/app/controllers/Application.scala b/app/controllers/Application.scala
index 0bf0669..d8e7d04 100644
--- a/app/controllers/Application.scala
+++ b/app/controllers/Application.scala
@@ -7,9 +7,10 @@ import javax.inject.{Named, Inject}
import akka.actor.ActorRef
import akka.pattern.{AskTimeoutException, ask}
-import doc.DocRenderer
+import doc.{DocVersions, DocRenderer}
+import play.api.libs.MimeTypes
import play.api.libs.concurrent.Execution.Implicits.defaultContext
-import play.api.libs.iteratee.Iteratee
+import play.api.libs.iteratee.{Enumerator, Iteratee}
import play.api.mvc._
import play.twirl.api.Html
import settings.Settings
@@ -76,7 +77,17 @@ class Application @Inject() (
private val secret = new SecretKeySpec(settings.play.crypto.secret.getBytes, MacAlgorithm)
- def render(path: String) = Action.async { request =>
+ def renderIndex = Action {
+ Ok(views.html.conductr.index())
+ }
+
+ def renderDocsHome =
+ renderDocs("")
+
+ def renderResources(path: String, version: String) =
+ renderDocs(path)
+
+ def renderDocs(path: String, version: String = DocVersions.Latest) = Action.async { request =>
request.headers.get(HOST) match {
case Some(host) =>
getDocRenderer(host, docRenderers, settings.application.hostAliases) match {
@@ -84,10 +95,11 @@ class Application @Inject() (
docRenderer
.ask(DocRenderer.Render(path))(settings.doc.renderer.timeout)
.map {
- case html: Html => Ok(html)
- case resource: File => Ok.sendFile(resource)
- case DocRenderer.NotFound(rp) => NotFound(s"Cannot find $rp")
- case DocRenderer.NotReady => ServiceUnavailable("Initializing documentation. Please try again in a minute.")
+ case html: Html => Ok(html)
+ case resource: DocRenderer.Resource => renderResource(resource, path)
+ case DocRenderer.Redirect(rp) => Redirect(routes.Application.renderDocs(rp, DocVersions.Latest))
+ case DocRenderer.NotFound(rp) => NotFound(s"Cannot find $rp")
+ case DocRenderer.NotReady => ServiceUnavailable("Initializing documentation. Please try again in a minute.")
}
.recover {
case _: AskTimeoutException => InternalServerError
@@ -100,6 +112,14 @@ class Application @Inject() (
}
}
+ private def renderResource(resource: DocRenderer.Resource, path: String): Result = {
+ val fileName = path.drop(path.lastIndexOf('/') + 1)
+ Result(ResponseHeader(OK, Map[String, String](
+ CONTENT_LENGTH -> resource.size.toString,
+ CONTENT_TYPE -> MimeTypes.forFileName(fileName).getOrElse(BINARY)
+ )), resource.content)
+ }
+
def update() = Action(MacBodyParser(GitHubSignature, secret, MacAlgorithm)) { request =>
request.headers.get(HOST) match {
case Some(host) =>
diff --git a/app/doc/DocRenderer.scala b/app/doc/DocRenderer.scala
index 7d1efad..c06a46f 100644
--- a/app/doc/DocRenderer.scala
+++ b/app/doc/DocRenderer.scala
@@ -1,9 +1,8 @@
package doc
-import java.io.{FileNotFoundException, File, FileOutputStream}
+import java.io.{InputStream, FileNotFoundException, File, FileOutputStream}
import java.net.URI
-import java.nio.file.{Path, Files}
-
+import java.nio.file.{Paths, Path, Files}
import akka.actor.{ActorLogging, Actor, Props}
import akka.cluster.Cluster
import akka.contrib.datareplication.{GCounter, DataReplication}
@@ -13,11 +12,10 @@ import org.apache.commons.compress.archivers.zip.ZipFile
import org.apache.commons.io.{FileUtils, IOUtils}
import play.api.libs.iteratee.{Enumerator, Iteratee}
import play.api.libs.ws.{WSResponseHeaders, WSClient}
-import play.doc.{PlayDoc, FilesystemRepository}
+import play.doc.{PageIndex, PlayDoc, FilesystemRepository}
import play.twirl.api.Html
import spray.caching.{Cache, LruCache}
-import views.html.conductr.{body, index}
-
+import views.html.conductr.body
import scala.collection.immutable
import scala.collection.JavaConverters._
import scala.concurrent.{Future, blocking, ExecutionContext}
@@ -29,6 +27,11 @@ object DocRenderer {
*/
case class Render(path: String)
+ /**
+ * Redirect to a relative documentation path
+ */
+ case class Redirect(path: String)
+
/**
* Path is not found
*/
@@ -52,21 +55,25 @@ object DocRenderer {
*/
case object PropogateGetSite
+ case class Resource(content: Enumerator[Array[Byte]], size: Long)
+
private[doc] sealed trait Entry
private[doc] case class Folder(name: String, documents: immutable.Seq[Entry]) extends Entry
private[doc] case class Document(name: String, ref: URI) extends Entry
- final private val HtmlExt = "html"
final private val SiteUpdateCounter = "SiteUpdateCounter"
+ final private val IndexPath = "Home"
final private val TocFilename = "index.toc"
+ final private val NextText = "Next"
def props(
docArchive: URI,
removeRootSegment: Boolean,
docRoot: Path,
+ docUri: String,
version: String,
wsClient: WSClient): Props =
- Props(new DocRenderer(docArchive, removeRootSegment, docRoot, version, wsClient))
+ Props(new DocRenderer(docArchive, removeRootSegment, docRoot, docUri, version, wsClient))
private[doc] def unzip(input: Enumerator[Array[Byte]], removeRootSegment: Boolean)(implicit ec: ExecutionContext): Future[Path] = {
val archive = Files.createTempFile(null, null)
@@ -94,7 +101,7 @@ object DocRenderer {
try {
import scala.collection.JavaConversions._
for (entry <- zipFile.getEntries if !entry.isDirectory) {
- val path = if (removeRootSegment)
+ val path = if(removeRootSegment)
outputDir.resolve(entry.getName.dropWhile(_ != File.separatorChar).drop(1))
else
outputDir.resolve(entry.getName)
@@ -111,10 +118,10 @@ object DocRenderer {
}
}
- private[doc] def aggregateToc(docDir: Path): Html = {
+ private[doc] def aggregateToc(docDir: Path, docUri: String): Html = {
import HtmlPrettyPrinter._
- val folder = createEntries(docDir, new URI(""), Folder("", List.empty))
+ val folder = createEntries(docDir, new URI(docUri), Folder("", List.empty))
def toDoc(documents: immutable.Seq[Entry]): Doc =
ul(documents.map {
@@ -124,11 +131,18 @@ object DocRenderer {
li(folder.name, toDoc(folder.documents))
})
- val markup = aside(toDoc(folder.documents))
+ val markup = toDoc(folder.documents)
Html(HtmlPrettyPrinter.pretty(markup))
}
+ private def aggregateToolbar(version: String): Html = {
+ import HtmlPrettyPrinter._
+
+ val markup = nav(id = Some("toolbar"), d = h3("Version") <> div(clazz = Some("versionNumber"), d = h3(version)))
+ Html(HtmlPrettyPrinter.pretty(markup))
+ }
+
private def createEntries(docDir: Path, targetUri: URI, folder: Folder): Folder = {
val tocEntryLines = FileUtils.readLines(docDir.resolve(TocFilename).toFile, "UTF-8")
val newDocuments = tocEntryLines.asScala.map { entry =>
@@ -139,14 +153,14 @@ object DocRenderer {
val subTargetUri = new URI(s"$targetUri/$filename")
createEntries(subDocDir, subTargetUri, Folder(name, List.empty))
} else {
- Document(name, new URI(s"$targetUri/$filename.$HtmlExt"))
+ Document(name, new URI(filename))
}
}
folder.copy(documents = folder.documents ++ newDocuments)
}
private def getName(path: String): String =
- path.drop(1).reverse.dropWhile(_ != '.').drop(1).takeWhile(_ != '/').reverse.dropWhile(_ == '/')
+ path.reverse.takeWhile(_ != '/').reverse.dropWhile(_ == '/')
}
/**
@@ -157,6 +171,7 @@ class DocRenderer(
docArchive: URI,
removeRootSegment: Boolean,
docRoot: Path,
+ docUri: String,
version: String,
wsClient: WSClient) extends Actor with ActorLogging {
@@ -186,12 +201,19 @@ class DocRenderer(
log.info(s"Doc retrieved for $docArchive")
val docSources = docDir.resolve(docRoot)
- val toc = aggregateToc(docSources)
+ val toc = aggregateToc(docSources, docUri)
+ val toolbar = aggregateToolbar(version)
val repo = new FilesystemRepository(docSources.toFile)
- val mdRenderer = new PlayDoc(repo, repo, "resources", version)
+ val mdRenderer = new PlayDoc(
+ markdownRepository = repo,
+ codeRepository = repo,
+ resources = "resources",
+ playVersion = version,
+ pageIndex = PageIndex.parseFrom(repo, IndexPath),
+ nextText = NextText)
- context.become(handleSiteRetrieval.orElse(handleRendering(docSources, mdRenderer, toc, LruCache[Html]())))
+ context.become(handleSiteRetrieval.orElse(handleRendering(repo, mdRenderer, toc, toolbar, LruCache[Html]())))
case PropogateGetSite =>
log.info(s"Notifying cluster of change for $docArchive")
@@ -205,28 +227,25 @@ class DocRenderer(
case _ => sender() ! NotReady
}
- private def handleRendering(docSources: Path, mdRenderer: PlayDoc, toc: Html, cache: Cache[Html]): Receive = {
- case Render(path) if path.isEmpty || path == "/" || path == s"Home.$HtmlExt" =>
- cache("/") {
- index(toc)
- }.pipeTo(sender())
+ private def handleRendering(repo: FilesystemRepository, mdRenderer: PlayDoc, toc: Html, toolbar: Html, cache: Cache[Html]): Receive = {
+ case Render("") =>
+ sender() ! Redirect(IndexPath)
- case Render(path) if path.endsWith(HtmlExt)=>
+ case Render(path) if !path.contains(".") =>
cache(path) {
- val mdFilename = getName(path)
- mdRenderer.renderPage(mdFilename) match {
- case Some(renderedPage) => body(Html(renderedPage.html), toc)
- case None => throw new FileNotFoundException(mdFilename)
+ mdRenderer.renderPage(path) match {
+ case Some(renderedPage) => body(Html(renderedPage.html), toolbar, toc)
+ case None => throw new FileNotFoundException(path)
}
}.recover {
case _: FileNotFoundException => NotFound(path)
}.pipeTo(sender())
case Render(path) =>
- val resource = docSources.resolve(path).toFile
- sender() ! (if (resource.exists() && resource.getAbsolutePath.startsWith(docSources.toString))
- resource
- else
- NotFound(path))
+ val resource = repo.handleFile(path) { handle =>
+ Resource(Enumerator.fromStream(handle.is).onDoneEnumerating(handle.close()), handle.size)
+ }
+
+ sender() ! resource.getOrElse(NotFound(path))
}
-}
+}
\ No newline at end of file
diff --git a/app/doc/DocVersions.scala b/app/doc/DocVersions.scala
new file mode 100644
index 0000000..5796365
--- /dev/null
+++ b/app/doc/DocVersions.scala
@@ -0,0 +1,5 @@
+package doc
+
+object DocVersions {
+ val Latest = "1.0.x"
+}
diff --git a/app/doc/HtmlPrettyPrinter.scala b/app/doc/HtmlPrettyPrinter.scala
index 838a6d6..e9ffa77 100644
--- a/app/doc/HtmlPrettyPrinter.scala
+++ b/app/doc/HtmlPrettyPrinter.scala
@@ -10,6 +10,9 @@ object HtmlPrettyPrinter extends PrettyPrinter {
override val defaultIndent = 4
override val defaultWidth = 132
+ def div(d: Doc, id: Option[String] = None, clazz: Option[String] = None): Doc =
+ angles("div" <> parseId(id) <> parseClass(clazz)) <> d <> angles(forwslash <> "div")
+
def aside(d: Doc): Doc =
angles("aside") <@> indent(d) <@> angles(forwslash <> "aside")
@@ -23,4 +26,35 @@ object HtmlPrettyPrinter extends PrettyPrinter {
def a(name: String, ref: URI): Doc =
angles("a" <+> "href" <> "=" <> dquotes(ref.toString)) <> name <> angles(forwslash <> "a")
+
+ def p(d: Doc): Doc =
+ angles(s"p") <> d <> angles(forwslash <> s"p")
+
+ def h1(implicit d: Doc): Doc =
+ h(1)
+
+ def h2(implicit d: Doc): Doc =
+ h(2)
+
+ def h3(implicit d: Doc): Doc =
+ h(3)
+
+ def h4(implicit d: Doc): Doc =
+ h(4)
+
+ def h5(implicit d: Doc): Doc =
+ h(5)
+
+ private def h(level: Int)(implicit d: Doc): Doc =
+ angles(s"h$level") <> d <> angles(forwslash <> s"h$level")
+
+ def nav(d: Doc, id: Option[String] = None, clazz: Option[String] = None): Doc = {
+ angles("nav" <> parseId(id) <> parseClass(clazz)) <> d <> angles(forwslash <> "nav")
+ }
+
+ private def parseId(id: Option[String]): Doc =
+ id map (" id" <> "=" <> dquotes(_)) getOrElse empty
+
+ private def parseClass(clazz: Option[String]): Doc =
+ clazz map (" class" <> "=" <> dquotes(_)) getOrElse empty
}
diff --git a/app/modules/ConductRDocRendererModule.scala b/app/modules/ConductRDocRendererModule.scala
index 0f190c1..dcd807c 100644
--- a/app/modules/ConductRDocRendererModule.scala
+++ b/app/modules/ConductRDocRendererModule.scala
@@ -5,7 +5,7 @@ import java.nio.file.Paths
import javax.inject.{Provider, Inject, Singleton}
import akka.actor.{ActorRef, ActorSystem}
-import doc.DocRenderer
+import doc.{DocVersions, DocRenderer}
import play.api.{Configuration, Environment}
import play.api.inject.Module
import play.api.libs.ws.WSClient
@@ -21,7 +21,8 @@ object ConductRDocRendererModule {
new URI("https://github.com/typesafehub/conductr-doc/archive/master.zip"),
removeRootSegment = true,
Paths.get("src/main/play-doc"),
- "1.0.x",
+ controllers.routes.Application.renderDocsHome().url,
+ DocVersions.Latest,
wsClient), "conductr-doc-renderer")
override def get = renderer
diff --git a/app/views/conductr/body.scala.html b/app/views/conductr/body.scala.html
index f24d2e4..c45137b 100644
--- a/app/views/conductr/body.scala.html
+++ b/app/views/conductr/body.scala.html
@@ -1,15 +1,37 @@
-@(b: Html, toc: Html)
+@(b: Html, toolbar: Html, toc: Html)
-@main("ConductR - A Reactive Application Manager for Operations", toc) {
+@scripts = {
+
+
+
+
+}
+
+@main("ConductR - A Reactive Application Manager for Operations", additionalScripts = Some(scripts)) {
-
+
@b
-
-
diff --git a/app/views/conductr/index.scala.html b/app/views/conductr/index.scala.html
index bc9cb70..c350b71 100644
--- a/app/views/conductr/index.scala.html
+++ b/app/views/conductr/index.scala.html
@@ -1,10 +1,10 @@
-@(toc: Html)
+@()
-@main("ConductR - A Reactive Application Manager for Operations", toc) {
+@main("ConductR - A Reactive Application Manager for Operations") {
-
+
Today’s demands on Operations are simply not met by yesterday’s software architectures and technologies
ConductR is a solution for managing Typesafe Reactive Platform applications across a cluster of machines. ConductR is reactive from the ground up thus enabling operations to provide the resiliency required to unleash the full benefits of the Typesafe Reactive Platform in their organization.
@@ -23,11 +23,6 @@
Today’s demands on Operations are simply not met by yesterday’s software
Warm regards,
The ConductR Team
-
}
diff --git a/app/views/main.scala.html b/app/views/main.scala.html
index 4162bd8..33f2739 100644
--- a/app/views/main.scala.html
+++ b/app/views/main.scala.html
@@ -1,4 +1,4 @@
-@(title: String, toc: Html)(content: Html)
+@(title: String, additionalScripts: Option[Html] = None)(content: Html)
@@ -22,7 +22,6 @@
@@ -50,16 +49,6 @@
@content
-
-
@@ -79,8 +68,9 @@
Commercial Support