api, frontend: use triple square brackets for templating

This commit is contained in:
Adhityaa 2018-06-22 19:39:58 +05:30
parent 7e4fcb20a6
commit 781aeca6bb
7 changed files with 26 additions and 26 deletions

View File

@ -108,7 +108,7 @@ func initStaticRouter(router *mux.Router) error {
return err
}
t, err := template.New(page).Delims("<<<", ">>>").Parse(string(contents))
t, err := template.New(page).Delims("[[[", "]]]").Parse(string(contents))
if err != nil {
logger.Errorf("cannot parse %s%s template: %v", os.Getenv("STATIC"), file, err)
return err

View File

@ -1,12 +1,12 @@
<html>
<head>
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/vue.js"></script>
<script src="<<<.CdnPrefix>>>/js/highlight.js"></script>
<script src="<<<.CdnPrefix>>>/js/chartist.js"></script>
<script src="<<<.CdnPrefix>>>/js/dashboard.js"></script>
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/chartist.css">
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/dashboard.css">
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/vue.js"></script>
<script src="[[[.CdnPrefix]]]/js/highlight.js"></script>
<script src="[[[.CdnPrefix]]]/js/chartist.js"></script>
<script src="[[[.CdnPrefix]]]/js/dashboard.js"></script>
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/chartist.css">
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/dashboard.css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:200,300,400,700" rel="stylesheet">
<title>Commento: Dashboard</title>
</head>

View File

@ -1,9 +1,9 @@
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0">
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/forgot.js"></script>
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/auth.css">
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/forgot.js"></script>
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/auth.css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:200,300,400,700" rel="stylesheet">
<title>Commento: Reset your Password</title>
</head>
@ -29,5 +29,5 @@
</div>
</div>
<<<.Footer>>>
[[[.Footer]]]
</html>

View File

@ -1,9 +1,9 @@
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0">
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/login.js"></script>
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/auth.css">
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/login.js"></script>
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/auth.css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:200,300,400,700" rel="stylesheet">
<title>Commento: Login</title>
</head>
@ -47,5 +47,5 @@
</div>
</div>
<<<.Footer>>>
[[[.Footer]]]
</html>

View File

@ -1,7 +1,7 @@
<html>
<head>
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/logout.js"></script>
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/logout.js"></script>
</head>
<script>

View File

@ -1,9 +1,9 @@
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0">
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/reset.js"></script>
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/auth.css">
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/reset.js"></script>
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/auth.css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:200,300,400,700" rel="stylesheet">
<title>Commento: Reset your Password</title>
</head>
@ -37,5 +37,5 @@
</div>
</div>
<<<.Footer>>>
[[[.Footer]]]
</html>

View File

@ -1,9 +1,9 @@
<html>
<head>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0">
<script src="<<<.CdnPrefix>>>/js/jquery.js"></script>
<script src="<<<.CdnPrefix>>>/js/signup.js"></script>
<link rel="stylesheet" href="<<<.CdnPrefix>>>/css/auth.css">
<script src="[[[.CdnPrefix]]]/js/jquery.js"></script>
<script src="[[[.CdnPrefix]]]/js/signup.js"></script>
<link rel="stylesheet" href="[[[.CdnPrefix]]]/css/auth.css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Source+Sans+Pro:200,300,400,700" rel="stylesheet">
<title>Commento: Signup</title>
</head>
@ -59,5 +59,5 @@
</div>
</div>
<<<.Footer>>>
[[[.Footer]]]
</html>