Permalink
Browse files

tweaks

  • Loading branch information...
Li Haoyi
Li Haoyi committed Feb 26, 2016
1 parent 9190bc9 commit 60722660f0f0d2d6345edd7fcd853bf59d0e684c
@@ -125,16 +125,16 @@ def googleAnalytics: Frag = script(raw(
""".stripMargin
))
def forceHttps: Frag = script(raw(
"""if (window.location.protocol == "http:")
| window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
"""if (window.location.protocol == "https:")
| window.location.href = "http:" + window.location.href.substring(window.location.protocol.length);
""".stripMargin
))
def metadata(dates: Seq[(String, LocalDate)]) = div(
color := "#999",
marginBottom := 20,
"Posted ",
for ((sha, date) <- dates.lastOption) yield a(
date.toString, href := s"https://github.com/lihaoyi/site/commit/$sha"
date.toString, href := s"https://github.com/lihaoyi/blog/commit/$sha"
)
)
def mainContent(posts: Seq[(String, String, String, Seq[(String, LocalDate)])]) = pageChrome(
@@ -168,7 +168,7 @@ def postContent(name: String, rawHtmlContent: String, dates: Seq[(String, LocalD
color := "rgb(158, 167, 174)",
"Updated ",
for((sha, date) <- dates.drop(1)) yield a(
date.toString, " ", href := s"https://github.com/lihaoyi/site/commit/$sha"
date.toString, " ", href := s"https://github.com/lihaoyi/blog/commit/$sha"
)
)
@@ -5,7 +5,7 @@ arbitrary length, you can also name things using operators, or in many cases
not names things at all using language features like `apply` or the `_`
placeholder parameter.
Howver, the fact that code ends up "too concise" is itself one of the most
However, the fact that code ends up "too concise" is itself one of the most
common complaints leveled against the Scala programming language. How can we
pick the right balance of verbosity and conciseness, at the right times, to
ensure future maintainers of our software do not end up hating us?
@@ -0,0 +1,2 @@
-------------------------------------------------------------------------------
Oops, something went wrong.

0 comments on commit 6072266

Please sign in to comment.