aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/views')
-rw-r--r--src/main/resources/views/files.rocker.html2
-rw-r--r--src/main/resources/views/fileview.rocker.html18
-rw-r--r--src/main/resources/views/layout.rocker.html15
3 files changed, 21 insertions, 14 deletions
diff --git a/src/main/resources/views/files.rocker.html b/src/main/resources/views/files.rocker.html
index 45a009f..097918a 100644
--- a/src/main/resources/views/files.rocker.html
+++ b/src/main/resources/views/files.rocker.html
@@ -1,5 +1,7 @@
@import java.util.ArrayList
@args (ArrayList files)
+@layout.template(files.size() + " Files") -> {
@for (String file : files) {
<a href="@file">@file</a><br>
}
+}
diff --git a/src/main/resources/views/fileview.rocker.html b/src/main/resources/views/fileview.rocker.html
index 250f34f..03a7418 100644
--- a/src/main/resources/views/fileview.rocker.html
+++ b/src/main/resources/views/fileview.rocker.html
@@ -1,15 +1,5 @@
-@args (String content)
+@args (String content, String filename)
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
- name="viewport">
- <meta content="ie=edge" http-equiv="X-UA-Compatible">
- <title>Fileview</title>
-</head>
-<body>
- @content
-</body>
-</html>
+@layout.template("File " + filename) -> {
+@content
+}
diff --git a/src/main/resources/views/layout.rocker.html b/src/main/resources/views/layout.rocker.html
new file mode 100644
index 0000000..583c723
--- /dev/null
+++ b/src/main/resources/views/layout.rocker.html
@@ -0,0 +1,15 @@
+@args (String title, RockerBody content)
+
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
+ name="viewport">
+ <meta content="ie=edge" http-equiv="X-UA-Compatible">
+ <title>@title</title>
+</head>
+<body>
+@content
+</body>
+</html>