Skip to content

Commit

Permalink
Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
brett-smith committed Oct 7, 2023
1 parent 5455966 commit 362386b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,21 @@ public class Example1 {
""").
bundle(Example1.class).
include("cssImports", TemplateModel.ofContent("<link src=\"styles.css\"/>")).
variable("time", Example1::formatTime).
variable("answer", () -> 2 + 2).
variable("weather", "Sunny").
i18n("i18n1", "key1").
i18n("i18n2", "key2", Math.random()).
condition("am", () -> Calendar.getInstance().get(Calendar.HOUR_OF_DAY) > 11).
list("menu", content ->
Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri").stream().map(day ->
TemplateModel.ofContent(content).
variable("day", day).
variable("link", () -> "/warp-to>day=" + day).
condition("friday", () -> day.equals("Fri"))
).toList()
)));
variable("time", Example1::formatTime).
variable("answer", () -> 2 + 2).
variable("weather", "Sunny").
i18n("i18n1", "key1").
i18n("i18n2", "key2", Math.random()).
condition("am", () -> Calendar.getInstance().get(Calendar.HOUR_OF_DAY) > 11).
list("menu", content ->
Arrays.asList("Mon", "Tue", "Wed", "Thu", "Fri").stream().map(day ->
TemplateModel.ofContent(content).
variable("day", day).
variable("link", () -> "/warp-to>day=" + day).
condition("friday", () -> day.equals("Fri"))
).toList()
))
);
}

private static String formatTime() {
Expand Down

0 comments on commit 362386b

Please sign in to comment.