best routing, static files embedding

This commit is contained in:
Henrique Dias
2015-09-13 12:14:18 +01:00
parent 6cdc145809
commit 8eeeb3870f
13 changed files with 921 additions and 67 deletions

5
templates/edit.tmpl Normal file
View File

@@ -0,0 +1,5 @@
{{#HEADER#}}
<textarea>{{ .Body.Var1 }}</textarea>
{{#FOOTER#}}

View File

@@ -1,7 +0,0 @@
{{ define "Head" }}
{{ template "head" }}
{{ end }}
{{define "Body"}}
{{ .Content }}
{{ end }}

5
templates/footer.tmpl Normal file
View File

@@ -0,0 +1,5 @@
<footer>
</footer>
</body>
</html>

View File

@@ -1,10 +0,0 @@
<!DOCTYPE html>
<html class="no-js" lang="en_UK">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Title }}</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="">
</head>

13
templates/header.tmpl Normal file
View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#fff">
<title>{{ .Title }}</title>
<link rel="stylesheet" href="/admin/assets/css/normalize.css">
<link rel="stylesheet" href="/admin/assets/css/main.css">
</head>
<body>