Permalink
Browse files

still learning git... updates...

  • Loading branch information...
alsonkemp committed Nov 17, 2008
1 parent a11b885 commit a8f9a12069f96d6e8960c3c44d5fe9e3e93e6647
Showing with 196 additions and 50,543 deletions.
  1. +0 −6 App/Controllers/About.hs
  2. +0 −1 App/Controllers/Develop.hs
  3. +0 −6 App/Controllers/Download.hs
  4. +12 −2 App/Controllers/Home.hs
  5. +52 −5 App/Layouts/Default.hs
  6. +0 −64 App/Layouts/oldDefault.hs
  7. +0 −21 App/Views/About/Index.hs
  8. +2 −2 App/Views/Develop/Index.hs
  9. +0 −11 App/Views/Download/Index.hs
  10. +1 −1 App/Views/Home/About.hs
  11. +4 −3 App/Views/Home/Index.hs
  12. +0 −7 App/Views/Source.hs
  13. +2 −0 Config/Master.hs
  14. +3 −0 Turbinado/Controller.hs
  15. +64 −34 Turbinado/Environment/CodeStore.hs
  16. +10 −8 Turbinado/Environment/Logger.hs
  17. +5 −0 Turbinado/Environment/Settings.hs
  18. +3 −3 Turbinado/Layout.hs
  19. +5 −12 Turbinado/Server.hs
  20. +12 −9 Turbinado/Server/Handlers/RequestHandler.hs
  21. +1 −1 Turbinado/Server/StaticContent.hs
  22. +0 −7 Turbinado/Stubs/Common.hs
  23. +2 −1 Turbinado/Stubs/Controller.hs
  24. +6 −8 Turbinado/Stubs/Layout.hs
  25. +3 −9 Turbinado/Stubs/View.hs
  26. +8 −12 Turbinado/View.hs
  27. +0 −1 log/log
  28. +0 −45 static/index.html
  29. +0 −35,480 static/js/ext-all-debug.js
  30. +0 −162 static/js/ext-all.js
  31. +0 −5,736 static/js/ext-core-debug.js
  32. +0 −19 static/js/ext-core.js
  33. +0 −10 static/js/extjs/adapter/ext/ext-base.js
  34. +0 −10 static/js/extjs/adapter/jquery/ext-jquery-adapter.js
  35. +0 −3,408 static/js/extjs/adapter/jquery/jquery.js
  36. +0 −1,122 static/js/extjs/adapter/prototype/effects.js
  37. +0 −10 static/js/extjs/adapter/prototype/ext-prototype-adapter.js
  38. +0 −4,221 static/js/extjs/adapter/prototype/prototype.js
  39. +0 −58 static/js/extjs/adapter/prototype/scriptaculous.js
  40. +0 −10 static/js/extjs/adapter/yui/ext-yui-adapter.js
  41. +0 −17 static/js/extjs/adapter/yui/yui-utilities.js
  42. +1 −1 turbinado.cabal
View
@@ -1,6 +0,0 @@
-module About (index) where
-
-index :: Controller ()
-index = return ()
-
-
@@ -1,4 +1,3 @@
-module Develop (index) where
index :: Controller ()
index = return ()
@@ -1,6 +0,0 @@
-module Download (index) where
-
-index :: Controller ()
-index = return ()
-
-
View
@@ -1,6 +1,16 @@
-module Home (index) where
index :: Controller ()
-index = return () :: Controller ()
+index = return ()
+
+about :: Controller ()
+about = return ()
+
+performance :: Controller ()
+performance = return ()
+
+hello :: Controller ()
+hello = do e <- getEnvironment
+ e' <- doIO $ clearLayout e
+ put e'
View
@@ -1,6 +1,53 @@
-module Default (page) where
-
--- This is for XML, so doesn't do anything but insert the page
page :: View XML
-page = insertView
-
+page = <html>
+ <head>
+ <% styleSheet "normalize" "screen" %>
+ <% styleSheet "jsddm" "screen" %>
+ <% styleSheet "turbinado" "screen" %>
+ <% javaScript "jquery" %>
+ <% javaScript "jsddm" %>
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-6158816-1");
+ pageTracker._trackViewview();
+ </script>
+ </head>
+ <body>
+ <table class="wrapper">
+ <tr>
+ <td class="title">
+ <h1>Turbinado</h1>
+ <img class="title-image" src="/images/turbinado.jpg" />
+ <h2>Sugar For</h2>
+ <h2>The Web</h2>
+ </td>
+ <td class="container">
+ <ul id="jsddm">
+ <li><a href="/Home/Index">Home</a>
+ <ul>
+ <li><a href="/Home/About">About</a></li>
+ <li><a href="/Home/Performance">Performance</a></li>
+ </ul>
+ </li>
+ <li><a href="/Tutorial/Index">Tutorial</a>
+ </li>
+ <li><a href="/Develop/Index">Develop</a></li>
+ </ul>
+ <div class="clear"></div>
+ <% breadCrumbs %>
+ <div id="content-block" class="content-block">
+ <% insertView %>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="footer">Turbinado - www.turbinado.org</div>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
View
@@ -1,64 +0,0 @@
-module Default (page) where
-import qualified Network.URI as URI
-import qualified Network.HTTP as HTTP
-
-page :: View XML
-page = <html>
- <head>
- <% styleSheet "extjs/css/ext-all" "screen"%>
- <% styleSheet "turbinado" "screen"%>
-
- <% javaScript "extjs/adapter/ext/ext-base" %>
- <% javaScript "ext-all" %>
- <% googleAnalytics "UA-6158816-1" %>
-
- <script type="text/javascript">
- Ext.onReady(function(){
- var tabs = new Ext.TabPanel({
- renderTo: 'content-block',
- //width:450,
- activeTab: 0,
- frame:true,
- autoHeight: true,
- autoWidth: true,
- layout: 'fit',
- defaults:{autoHeight: true},
- items:[
- {autoLoad: '/Home/Index.xml', title: 'Home'}
- , {autoLoad: '/Develop/Index.xml', title: 'Develop'}
- , {autoLoad: '/Tutorial/Index.xml', title: 'Tutorial'}
- , {autoLoad: '/Code/Index.xml', title: 'Code'}
- ]
- });
- });
- </script>
- </head>
- <body>
- <div class="wrapper">
- <div class="title">
- <h1 style="display: inline">Turbinado</h1>
- <h2 style="display: inline">web sugar</h2>
- </div>
- <hr />
- <div class="container">
- <div id="content-block" class="content-block">
- </div>
- </div>
- <hr id="hr-footer" />
- <div class="footer">
- Footer
- </div>
- </div>
- </body>
- </html>
-
-anchorWithImage :: String -> String -> View XML
-anchorWithImage l i = <a href=l>
- <img src=i height="100" />
- </a>
-
-anchorWithText :: String -> String -> View XML
-anchorWithText l t = <a href=l>
- <% t %>
- </a>
-
View
@@ -1,21 +0,0 @@
-onRender = <div>
- <h2>Features</h2>
- <p>Turbinado gives you all of the benefits of coding in Haskell and adds:</p>
- <ul class="standard-list">
- <li> Automagic recompilation of Layouts, Pages and Controls; </li>
- <li> A database <% anchorTag "http://en.wikipedia.org/wiki/Object-relational_mapping" "ORM" %> to make database interaction (especially with PostgreSQL) joyful; </li>
- <li> A rich set of tags to make designing pages simpler;. </li>
- </ul>
-
- <h2>... On The Backs of Giants ... </h2>
- <p>Turbinado wouldn't be possible without the original work of the following people:</p>
- <ul class="standard-list">
- <li> <% anchorTag "http://www.cs.chalmers.se/~d00nibro/" "Niklas Broberg" %> for Haskell Server Pages, the HSP Runtime, Haskell Source Extensions and Haskell Regular Expressions</li>
- <li> <% anchorTag "http://www.cse.unsw.edu.au/~dons/hs-plugins/" "Don Stewart" %> for hs-plugins </li>
- <li> <% anchorTag "http://www.cs.chalmers.se/~bringert/projects.html" "Bjorn Bringert" %> for HTTP </li>
- <li> <% anchorTag "http://software.complete.org/software/projects/show/hdbc" "John Goerzen" %> for Haskell Database Connectivity.</li>
- <li> <% anchorTag "http://software.complete.org/software/projects/show/hdbc" "John Goerzen" %> for Haskell Database Connectivity.</li>
-
- </ul>
-
- </div>
@@ -3,8 +3,8 @@ page = <div>
<h2>! Windows</h2>
<p>This software doesn't work on Windows. Linux/Unix only at this point.</p>
- <h2>Darcs</h2>
- <p> The <em>darcs</em> repo is at <% anchorTag "http://darcs.turbinado.org" "darcs.turbinado.org" %>. Send commits to maintainer@turbinado.org</p>
+ <h2>Git Repo</h2>
+ <p> The <em>git</em> repo is at <% anchorTag "http://github.com/alsonkemp/turbinado/tree/master" "http://github.com/alsonkemp/turbinado/tree/master" %>. Push patches into the repo.</p>
<h2>Dependencies</h2>
<p>You'll need the following:</p>
@@ -1,11 +0,0 @@
-module Index (page) where
-
-page :: View XML
-page = <div>
- <h2>DANGER WILL ROBINSON</h2>
- <p>Developers only at this point!</p>
- <p>That said, we're looking for help. Interested? Check out the
- <% anchorTag "/Develop" "Development" %> section. Grab the code, look it over and tell us
- how you would improve it.
- </p>
- </div>
View
@@ -3,7 +3,7 @@ page = <div>
<p>Turbinado gives you all of the benefits of coding in Haskell and adds:</p>
<ul class="standard-list">
<li> A fast HTTP server with static- and dynamic-content serving capabilities; </li>
- <li> Views built using a simple HTML-like templating syntax; </li>
+ <li> Views built using a simple HTML-like templating syntax combined with tag-matching to guard against invalid HTML; </li>
<li> Automagic recompilation of Controllers, Layouts and Views; </li>
<li> <span style="font-size:10px; font-style:italic">coming soon</span> A database <% anchorTag "http://en.wikipedia.org/wiki/Object-relational_mapping" "ORM" %> to make database interaction (especially with PostgreSQL) joyful; </li>
<li> A rich set of tags to make designing pages simpler;. </li>
View
@@ -5,9 +5,10 @@ page = <div>
<img src="http://upload.wikimedia.org/wikipedia/en/thumb/0/0e/TurbinadoSugar.jpg/757px-TurbinadoSugar.jpg" width="300" />
</div>
<p><a href="http://en.wikipedia.org/wiki/Turbinado">Turbinado</a> is that yummy, not-so-refined sugar.
- Sounds like Haskell... Sounds like this framework...</p>
- <p>Turbinado is also an easy-to-use web application framework for Haskell.</p>
+ Sounds like Haskell...
+ </p>
+ <p>Turbinado is also an easy-to-use web application framework for Haskell which is fricking <% anchorTag "/Home/Performance" "fast" %>. Naturally, this website is written in Turbinado, so head over to the <% anchorTag "http://github.com/alsonkemp/turbinado/tree/master" "Git repo" %> to see how easy it is to code websites in Turbinado.</p>
<h1>Why?</h1>
- <p>Haskell has no easy-to-use web framework. Turbinado is an effort to build one by lazily stealing the best ideas from <% anchorTag "www.rubyonrails.org" "Ruby On Rails" %>, <% anchorTag "www.asp.net" "ASP.NET" %>, etc.</p>
+ <p>Haskell has no easy-to-use web framework. Turbinado is an effort to build one by lazily stealing the best ideas from <% anchorTag "http://www.rubyonrails.org" "Ruby On Rails" %>, <% anchorTag "http://www.asp.net" "ASP.NET" %>, etc.</p>
</div>
View
@@ -1,7 +0,0 @@
-import System.Time
-
-onRender = <div>
- <pre>
-
- </pre>
- </div>
View
@@ -17,6 +17,8 @@ compileArgs =
, "-fallow-undecidable-instances"
, "-F", "-pgmFtrhsx"
, "-fno-warn-overlapping-patterns"
+ , "-odir " ++ compiledDir
+ , "-hidir " ++ compiledDir
] ++ (map ("-i"++) searchDirs)
mUserPkgConf = [""]
View
@@ -4,13 +4,15 @@ module Turbinado.Controller (
-- limited export from Turbinado.Controller.Monad
Controller,
runController,
+ get, put,
-- * Functions
doIO, catch,
module Turbinado.Environment,
module Turbinado.Environment.CodeStore,
module Turbinado.Environment.Request,
module Turbinado.Environment.Response,
+ module Turbinado.Environment.Settings
) where
import Control.Exception (catchDyn)
@@ -23,6 +25,7 @@ import Prelude hiding (catch)
import Turbinado.Environment
import Turbinado.Environment.Request
import Turbinado.Environment.Response
+import Turbinado.Environment.Settings
import Turbinado.Controller.Monad
import Turbinado.Environment.CodeStore
import Turbinado.Utility.General
Oops, something went wrong.

0 comments on commit a8f9a12

Please sign in to comment.