aboutsummaryrefslogtreecommitdiff
path: root/src/constants.rs
diff options
context:
space:
mode:
authorTill Hoeppner2014-11-29 23:07:35 +0100
committerTill Hoeppner2014-11-29 23:07:35 +0100
commit0d159dabf4cd038d0dd690e44ed1d08e26247606 (patch)
treef37228ac3968b89e1da0b28fdd912e4557ffe338 /src/constants.rs
parent44188b8daa93fafcc73764087cc190fc0af384d7 (diff)
downloadsersve-0d159dabf4cd038d0dd690e44ed1d08e26247606.tar.gz
sersve-0d159dabf4cd038d0dd690e44ed1d08e26247606.tar.xz
sersve-0d159dabf4cd038d0dd690e44ed1d08e26247606.zip
Full templating support
Diffstat (limited to 'src/constants.rs')
-rw-r--r--src/constants.rs35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/constants.rs b/src/constants.rs
index 052d508..3f54284 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -1,5 +1,8 @@
-pub const CSS: &'static str =
-r"
+pub const TEMPLATE: &'static str =
+"<!DOCTYPE html>
+<html>
+ <title>{{title}}</title>
+ <style type=\"text/css\">
* {
padding:0;
margin:0;
@@ -75,4 +78,30 @@ tr:hover td {
tr:hover td a {
color: #000;
}
-";
+ </style>
+ <body>
+ <div id=\"container\">
+ <h1>{{title}}</h1>
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{#content}}
+ <tr>
+ <td>
+ <a href=\"/{{url}}\">{{name}}</a>
+ </td>
+ <td>
+ {{size}}
+ </td>
+ </tr>
+ {{/content}}
+ </tbody>
+ </table>
+ </div>
+ </body>
+</html>";