Code and Quotes

Code

It can be useful to be able to embed code into Phonemos. It support some syntax highlighting.

CSS

1 2 3 .center { display: block; margin: auto; } img { padding-top: 40px; padding-right: 25px; padding-bottom: 40px; padding-left: 25px; } tr:hover { background-color: #ddd; }

Scala

1 2 3 4 5 6 7 8 9 10 11 import java.time.format.{DateTimeFormatter, FormatStyle} import java.time.LocalDate import java.util.Locale._ object FrenchDate { def main(args: Array[String]): Unit = { val now = LocalDate.now val df = DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG).withLocale(FRANCE) println(df.format(now)) } }

Quote

A quote is rather simple, it just add a bar to the left

Long Quote

Java’s class libraries define powerful utility classes, such as LocalDate and DateTimeFormatter. Since Scala interoperates seamlessly with Java, there is no need to implement equivalent classes in the Scala class library; instead, we can import the classes of the corresponding Java packages: