summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2013-06-03 17:46:53 -0700
committerJesse Morgan <jesse@jesterpm.net>2013-06-03 17:46:53 -0700
commitf771e74c3867c2e16d0c9d5187a2e115345b9048 (patch)
tree1b7970cd47c5051e7b6a876153ef33971338c8fe
parent736448b60c4a61c9eae62efe7a191a8f13c18b55 (diff)
Adding a content root variable to the templates.
The content root is used to specify the location of the static content. It is currently hard-coded to my desktop, but it will be updated after a config system is introduced.
-rw-r--r--src/templates/macros/common-page.ftl6
-rw-r--r--src/templates/macros/common.ftl2
-rw-r--r--src/templates/macros/noticebox.ftl2
-rw-r--r--src/templates/templates/nav.ftl2
4 files changed, 7 insertions, 5 deletions
diff --git a/src/templates/macros/common-page.ftl b/src/templates/macros/common-page.ftl
index eaef04f..560fa48 100644
--- a/src/templates/macros/common-page.ftl
+++ b/src/templates/macros/common-page.ftl
@@ -4,9 +4,9 @@
<head>
<title>Grow Process</title>
- <link rel="stylesheet" href="../style.css" />
- <script src="../scripts/jquery.min.js"></script>
- <script src="..//scripts/growth.js"></script>
+ <link rel="stylesheet" href="${contentroot}/style.css" />
+ <script src="${contentroot}/scripts/jquery.min.js"></script>
+ <script src="${contentroot}/scripts/growth.js"></script>
</head>
<body>
<div id="notfooter">
diff --git a/src/templates/macros/common.ftl b/src/templates/macros/common.ftl
index 7e8a2d5..ab0d769 100644
--- a/src/templates/macros/common.ftl
+++ b/src/templates/macros/common.ftl
@@ -1,2 +1,4 @@
<#include "content.ftl">
<#include "noticebox.ftl">
+
+<#assign contentroot = "http://localhost/~jesterpm/growcontent">
diff --git a/src/templates/macros/noticebox.ftl b/src/templates/macros/noticebox.ftl
index e1d75a5..43c36c3 100644
--- a/src/templates/macros/noticebox.ftl
+++ b/src/templates/macros/noticebox.ftl
@@ -1,7 +1,7 @@
<#macro noticebox>
<div id="middlebar">
<div id="noticebox">
- <img class="icon" src="../images/noticeicon.png">
+ <img class="icon" src="${contentroot}/images/noticeicon.png">
<p>
<#nested>
</p>
diff --git a/src/templates/templates/nav.ftl b/src/templates/templates/nav.ftl
index 285fbde..ae9517c 100644
--- a/src/templates/templates/nav.ftl
+++ b/src/templates/templates/nav.ftl
@@ -7,7 +7,7 @@
</#macro>
<header>
- <h1><img src="../images/logo.png"> Grow Process</h1>
+ <h1><img src="${contentroot}/images/logo.png"> Grow Process</h1>
<nav class="primary">
<ul>