Permalink
Browse files

added file operations code and new location for templates

  • Loading branch information...
1 parent 1a86492 commit ee89091e8ebcc01c2697fbfa5576f17d1c3c79bc @jeyoor committed Feb 22, 2012
@@ -0,0 +1,15 @@
+<!doctype html>
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="/base.css" />
+ </head>
+ <body>
+ <div id="content">
+ Welcome!
+ <ul class="mainlist">
+ <li class="mainlist"> <a class="firstlink" href="somewhere?page">Templ Link 1</a>
+ <input class="delete" type="submit" name="delete" value="TemplDelete" /> </li>
+ </ul>
+ </div>
+ </body>
+</html>
@@ -0,0 +1,70 @@
+<!doctype html> <!-- Using Enlive -->
+<html lang="en">
+ <head>
+ <title></title>
+ <link rel="stylesheet" type="text/css" href="/bootstrap.min.css" />
+ <link rel="stylesheet" type="text/css" href="/base.css" />
+ </head>
+ <body>
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container-fluid">
+ <nav id="topnav" class="nav-collapse">
+ <ul class="nav">
+ <li><a href="/">Home</a></li>
+ </ul>
+ </nav>
+ </div>
+ </div>
+ </div><!-- end topnav -->
+ <div class="container">
+ <header id="banner" class="row">
+ <!-- header -->
+ <h2> <a href="/">Testify</a> </h2>
+ <span id="pagetitle">Page Title</span> <br />
+ <a id="biglink" href="/otherplace">Sample link</a>
+ </header>
+
+ <div class="row">
+ <div class="span8">
+ <header id="main" class="row"></header>
+ <article id="main" class="row">
+ <!-- article -->
+ </article>
+ <footer id="main" class="row"></footer>
+
+ <header id="alt" class="row"></header>
+ <article id="alt" class="row">
+ <footer id="alt" class="row"></footer>
+ <!-- Alternate content that may be omitted -->
+ <!-- altalticle -->
+ </article>
+ </div>
+
+
+ <!-- A plea to web developers:
+
+ Please let your content load before your side-bar navigation!
+ Please make it short and sweet, and put it on the RIGHT: at the
+ end of reading-order. That's right: nav isn't the star of your
+ site: content is!
+ -->
+ <nav id="sidenav" class="span2 offset1 nav-list">
+ <ul class="nav">
+ <!-- sidenav -->
+ </ul>
+ </nav>
+ </div><!-- end row -->
+
+ <!-- debug --><!-- If/when we enable the debug template, it goes here -->
+
+ <footer id="footer" class="row">
+ <hr>
+ <!-- footer -->
+ </footer>
+ <footer id="legal" class="row">
+ <!-- legal -->
+ </footer>
+ </div><!-- end container -->
+ </body>
+</html>
@@ -0,0 +1,17 @@
+[title](content Testify Web App)
+[nav#topnav ul] (append
+<li><a href="/">Pages</a></li>
+ <li><a href="/admin">Admin</a></li>
+ <li><a href="/dashboard">Dashboard</li>
+)
+
+[nav#sidenav] (append
+ <li><a href="/next">Next Page</a></li>
+ <li><a href="/prev">Previous Page</a></li>
+ <li><a href="/page/form">Add a page</a></li>
+)
+
+[header#banner] (content <div style="height: px; background-color: olive; margin: auto;"><h1>Ad Banner</h1></div>)
+
+[footer#legal]
+ (content <p>Copyright &copy; 2012 the Testify Development Team</p>)
@@ -0,0 +1,17 @@
+[title](content Testify Web App)
+[nav#topnav ul] (append
+<li><a href="/">Pages</a></li>
+ <li><a href="/admin">Admin</a></li>
+ <li><a href="/dashboard">Dashboard</li>
+)
+
+[nav#sidenav] (append
+ <li><a href="/next">Next Page</a></li>
+ <li><a href="/prev">Previous Page</a></li>
+ <li><a href="/page/form">Add a page</a></li>
+)
+
+[header#banner] (html-content <div style="height: px; background-color: olive; margin: auto;"><h1>Ad Banner</h1></div>)
+
+[footer#legal]
+ (html-content <p>Copyright &copy; 2012 the Testify Development Team </p>)
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+ <head>
+ </head>
+ <body>
+ <form action="http://localhost:3000/writer" method="POST">
+ <input type="hidden" class="template" value="basico"/>
+ <span class="fieldname">filename? </span> <br />
+ <input class="field" type="TEXT" name="fname" /> <br />
+ <textarea class="field"></textarea><br class="ender" />
+ <input class="submit" type="submit" name="Save" />
+ </form>
+ </body>
+</html>
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="base.css" />
+ </head>
+ <body>
+ <div id="content">
+ Welcome!
+ <ul class="mainlist">
+ <li class="mainlist"> <a class="firstlink" href="somewhere?page">Templ Link 1</a>
+ </ul>
+ </div>
+ </body>
+</html>
@@ -0,0 +1,8 @@
+(ns testify.process.fileops)
+
+;;differentiate cloud foundry & other paths by env variable
+(defn real-dir [relpath]
+ (let [testifydir (. System getenv "TESTIFYDIR") ]
+ (cond (nil? testifydir)
+ (str "/resources/" relpath)
+ :else (str testifydir "/" relpath))))

0 comments on commit ee89091

Please sign in to comment.