From 128b9e845cde07420944a0ca183db17f589d881b Mon Sep 17 00:00:00 2001 From: Josh Marcus Date: Fri, 27 Jul 2012 15:46:23 -0400 Subject: [PATCH] Add pamflet.arrow configuration option for next page icon. This commit adds a new template.properties configuration option "pamflet.arrow" which allows the user to set the string used for the next page icon. The string (e.g. ">") is used as the next page icon on the right side of the page and is flipped horizontally to create the previous page icon (e.g. "<"). --- docs/template.properties | 3 ++- library/src/main/scala/printer.scala | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/template.properties b/docs/template.properties index cabda946..ee8d14bb 100644 --- a/docs/template.properties +++ b/docs/template.properties @@ -1,4 +1,5 @@ version=0.4.0 vrsn=040 scala=2.9.1 -github=n8han/pamflet \ No newline at end of file +github=n8han/pamflet +pamflet.arrow=> diff --git a/library/src/main/scala/printer.scala b/library/src/main/scala/printer.scala index 515a13d2..e6bcd8d5 100644 --- a/library/src/main/scala/printer.scala +++ b/library/src/main/scala/printer.scala @@ -93,7 +93,9 @@ case class Printer(contents: Contents, manifest: Option[String]) { } val (prev, next) = lastnext(contents.pages, None) val bigScreen = "screen and (min-device-width: 800px), projection" - + + val arrow = page.template.get("pamflet.arrow") getOrElse "❧" + val html = { "%s — %s".format(contents.title, page.name) } @@ -138,13 +140,13 @@ case class Printer(contents: Contents, manifest: Option[String]) { { prev.map { p => }.toSeq ++ next.map { n => }.toSeq }