vegashacker / lawnelephant

the web app about nothing.

This URL has Read+Write access

lawnelephant / templates.ss
100644 56 lines (46 sloc) 1.88 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#lang scheme/base
 
(require (planet "leftparen.scm" ("vegashacker" "leftparen.plt" 4 (= 1)))
         (planet "util.scm" ("vegashacker" "leftparen.plt" 4 (= 1)))
         )
 
(provide
  base-design
  li-a
  goog-analytics
  standard-footer
  )
 
 
 
(define (base-design #:title (title "lawnelephant"))
  (design
   #:js '("http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"
          "scripts/init.js")
   #:css '("http://yui.yahooapis.com/combo?2.6.0/build/reset-fonts-grids/reset-fonts-grids.css&2.6.0/build/base/base-min.css&2.6.0/build/tabview/assets/skins/sam/tabview.css"
           "/css/main.css")
   #:title title))
 
(define goog-analytics
  "
<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\">
try {
var pageTracker = _gat._getTracker(\"UA-7294827-1\");
pageTracker._trackPageview();
} catch(err) {}</script>
")
 
(define (li-a link name)
  `(li (a ((href ,link)) ,name)))
 
 
(define standard-footer
  `(div
     (ul ((class "simple"))
         (li "features:")
         ,(li-a "/popular" "popular")
         ,(li-a "/newest" "newest")
         ,(li-a "/completed" "completed"))
     (ul ((class "simple"))
       ,(li-a "http://blog.lawnelephant.com/post/74637624/introducing-lawnelephant-com" "about")
       ,(li-a "http://blog.lawnelephant.com" "blog")
       ,(li-a "http://github.com/vegashacker/lawnelephant/tree/master" "source code")
       ,(li-a "mailto:ask@lawnelephant.com" "ask@lawnelephant.com")
       ;; XXX goog analytics really needs to be just before the closing body tag, but I
       ;; don't know how to put it there just yet
      ,(raw-str goog-analytics))))