public
Description: minimalist blog app using Google App Engine
Homepage: http://teh.appspot.com
Clone URL: git://github.com/btbytes/teh.git
adding blueprintcss
btbytes (author)
Sat May 03 22:15:46 -0700 2008
commit  261238a64f0ac6a7115502afbd512850786a44e5
tree    01297b83216e762b19dd97de6268148d8cb8aa14
parent  d428f76f0ad8e6d85320fc35239383ff9ff266e0
...
30
31
32
 
33
34
35
...
125
126
127
128
129
130
131
132
 
 
 
 
 
 
133
134
135
...
157
158
159
 
160
161
162
...
165
166
167
168
 
169
170
171
172
173
...
30
31
32
33
34
35
36
...
126
127
128
 
 
 
 
 
129
130
131
132
133
134
135
136
137
...
159
160
161
162
163
164
165
...
168
169
170
 
171
172
 
173
174
175
0
@@ -30,6 +30,7 @@ class Entry(db.Model):
0
     excerpt = db.TextProperty()
0
     tags = db.ListProperty(db.Category)
0
     static = db.BooleanProperty()
0
+ comments = db.BooleanProperty()
0
     
0
     def url(self):
0
         if self.static == False: return '/entry/'+self.slug
0
@@ -125,11 +126,12 @@ class NewEntryHandler(TehRequestHandler):
0
         body = self.request.get("body")
0
         markdown = self.request.get("markup")
0
         st = self.request.get("static")
0
- if st == '1':
0
- static = True
0
- else:
0
- static = False
0
-
0
+ cm = self.request.get("comments")
0
+ if st == '1': static = True
0
+ else: static = False
0
+ if cm == '1': comments = True
0
+ else: comments = False
0
+
0
         tags = self.request.get("tags")
0
         tags = tags.split(' ')
0
         if len(tags) == 0:
0
@@ -157,6 +159,7 @@ class NewEntryHandler(TehRequestHandler):
0
                 excerpt=excerpt,
0
                 tags=tags,
0
                 static=static,
0
+ comments=comments,
0
             )
0
         else:
0
             entry.title = title
0
@@ -165,9 +168,8 @@ class NewEntryHandler(TehRequestHandler):
0
             entry.excerpt = excerpt
0
             entry.static = static
0
             entry.tags = tags
0
-
0
+ entry.comments = comments
0
         entry.put()
0
-
0
         if static:
0
             self.redirect('/'+entry.slug)
0
         else:
...
56
57
58
59
60
61
62
63
64
65
66
...
102
103
104
105
106
107
108
...
111
112
113
114
 
 
 
 
 
115
116
117
...
173
174
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
177
...
56
57
58
 
 
 
 
 
59
60
61
...
97
98
99
 
100
101
102
...
105
106
107
 
108
109
110
111
112
113
114
115
...
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
0
@@ -56,11 +56,6 @@ form {
0
   top: 15px;
0
 }
0
 
0
-#logo a span{
0
- font-size:1.5em;
0
- color:#fff;
0
- text-decoration:none;
0
-}
0
 
0
 #feed {
0
   position: absolute;
0
@@ -102,7 +97,6 @@ form {
0
 .full .entry h1 {
0
   font-size: 20pt;
0
 }
0
-
0
 .full .entry h1 a,
0
 .full .entry h1 a:visited,
0
 .full .entry h2 a,
0
@@ -111,7 +105,11 @@ form {
0
   text-decoration: none;
0
   color: #222222;
0
 }
0
-
0
+/*
0
+h1 a, h1 a:visited, h2 a, h2 a:visited{
0
+ text-decoration:none;
0
+ color:#222222;
0
+}*/
0
 .full .entry .date {
0
   margin-top: 0.25em;
0
 }
0
@@ -173,4 +171,18 @@ ul {
0
 
0
 ul li {
0
   margin-bottom: 0.3em;
0
+}
0
+
0
+/* tech custom */
0
+
0
+#sitetitle{
0
+ font-size:1.5em;
0
+ color:#fff;
0
+ text-decoration:none;
0
+
0
+}
0
+.entry h1 a,
0
+.entry h1 a:visited{
0
+ text-decoration:none;
0
+ color: #222222;
0
 }
0
\ No newline at end of file
...
8
9
10
 
11
12
13
...
17
18
19
20
21
22
23
 
 
24
25
26
...
39
40
41
42
43
 
44
45
46
47
48
49
 
50
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
53
54
 
55
56
57
 
 
58
59
60
...
8
9
10
11
12
13
14
...
18
19
20
 
 
 
 
21
22
23
24
25
...
38
39
40
 
 
41
42
43
44
45
46
 
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 
68
69
 
 
70
71
72
73
74
0
@@ -8,6 +8,7 @@
0
   {% endblock %}
0
 </title>
0
 {% block css %}
0
+ <link href="/static/css/blueprint/screen.css" rel="stylesheet" type="text/css"/>
0
   <link href="/static/css/base.css" rel="stylesheet" type="text/css"/>
0
 {% endblock %}
0
 
0
@@ -17,10 +18,8 @@
0
 <body>
0
 <div id="header">
0
   <div id="logo">
0
- <a href="/">
0
- <!-- img src="/static/images/logo.png" alt="Teh blog"/ -->
0
- <span>{{config.title}}</span>
0
- </a>
0
+ <a href="/" id="sitetitle">
0
+ {{config.title}}</a>
0
   </div><!-- logo -->
0
   <div id="feed"><a href="http://teh.appspot.com/feed">
0
     <img src="/static/images/feed.png" alt="Subscribe to this blog"/></a>
0
@@ -39,22 +38,37 @@
0
 </div><!-- header -->
0
 
0
 <div id="body">
0
-<div class="full">
0
-
0
+<div class="full container">
0
 {% if message %}
0
   {% block message %}
0
     {{message}}
0
   {% endblock %}
0
 {% endif %}
0
-
0
+<div class="span-15 prepend-1 colborder">
0
 {% block content %}
0
 {% endblock %}
0
+</div>
0
+<div class="span-7 last">
0
+ <ul>
0
+ <li><a href="/about">About</a></li>
0
+ <li><a href="/docs">Documentation</a></li>
0
+ <li><a href="/feed">Blog Feed</a></li>
0
+ </ul>
0
+<h3>Meta</h3>
0
+<p><small>Login required</small></p>
0
+<ul>
0
+<li><a href="/new">New Entry</li>
0
+<li><a href="/config">Blog Config</li>
0
+</ul>
0
+
0
+</div>
0
+
0
 </div><!-- full -->
0
 
0
-<div><a href="/entries">All posts</a></div>
0
+<div class="container"><a href="/entries">All posts</a></div>
0
 </div><!-- body -->
0
-
0
-<div id="footer">
0
+<hr>
0
+<div id="footer" class="container">
0
   &copy;2008 Teh blog - <a href="/about">About Teh</a> - <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons License</a>
0
   {% block extrafooter %}
0
     
...
1
 
2
3
 
4
...
1
2
3
 
4
5
0
@@ -1,4 +1,5 @@
0
 {% extends "page.html" %}
0
+
0
 {% block date %}
0
-<div class="date">{{entry.published.date}}</div>
0
+ <div class="date">{{entry.published.date|date:"d M Y" }}</div>
0
 {% endblock %}
...
2
3
4
5
6
 
 
7
8
9
 
 
 
10
11
12
13
14
 
15
16
17
18
19
 
20
21
22
...
33
34
35
36
 
 
37
38
...
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
...
38
39
40
 
41
42
43
44
0
@@ -2,21 +2,26 @@
0
 {% block content %}
0
 {% for entry in entries %}
0
   <div class="entry">
0
- <h2><a href="{{entry.url}}">{{entry.title}}</a></h2>
0
- <div class="date">{{entry.published.date}}</div>
0
+ <h1><a href="{{entry.url}}">{{entry.title}}</a></h1>
0
+ <div class="date">{{entry.published.date|date:"d M Y" }}</div>
0
     <div class="body">
0
       {{entry.body_html}}
0
     </div><!-- body -->
0
+ {% if entry.comment %}
0
+
0
+
0
     {% if config.disqus %}
0
       <div class="entrycomment">
0
         <a href="{{entry.url}}#disqus_thread">Comments</a>
0
       </div><!-- entrycomment -->
0
     {% endif %}
0
+ {% endif %}
0
     </div><!-- entry -->
0
 {% endfor %}
0
 {% endblock %}
0
 
0
 {% block extrafooter %}
0
+{% if entry.comments %}
0
 {% if config.disqus %}
0
   <script type="text/javascript">
0
   //<![CDATA[
0
@@ -33,5 +38,6 @@
0
   //]]>
0
   </script>
0
 
0
- {% endif %}
0
+{% endif %}
0
+{% endif %}
0
 {% endblock %}
0
\ No newline at end of file
...
123
124
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
127
128
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
0
@@ -123,6 +123,26 @@ Static page
0
 <p class="instruct " id="instruct112"><small>Use this option to create "About", "Contact" etc., pages. </small></p>
0
 </li>
0
 
0
+<li class=" " id="fo5li113" >
0
+<label class="desc" id="title113">
0
+Allow comments
0
+</label>
0
+<span>
0
+<input id="Field113"
0
+ name="comments"
0
+ class="field checkbox" type="checkbox"
0
+{% if entry.comments %}
0
+ checked="True"
0
+{% endif %}
0
+{% if not entry %}
0
+ checked="True"
0
+{% endif %}
0
+ value="1"
0
+ tabindex="6" />
0
+<label class="choice" for="static">Allow users to enter comments on this page.</label>
0
+</span>
0
+</li>
0
+
0
 <li class="buttons">
0
 <input id="saveForm" class="btTxt" type="submit" tabindex="5" value="Submit" />
0
 </li>
...
4
5
6
7
8
 
 
9
 
10
11
12
...
24
25
26
 
 
27
28
29
 
 
30
31
...
4
5
6
 
 
7
8
9
10
11
12
13
...
25
26
27
28
29
30
31
32
33
34
35
36
0
@@ -4,9 +4,10 @@
0
 {% endblock %}
0
 {% block content %}
0
 <div class="entry">
0
-<h1><a href="{{entry.url}}">{{entry.title}}</a></h1>
0
-{% block date %}{% endblock %}
0
+ <h1><a href="{{entry.url}}">{{entry.title}}</a></h1>
0
+ {% block date %}{% endblock %}
0
 <div class="body">
0
+
0
   {{entry.body_html}}
0
 <div class="tags">
0
   {% for tag in entry.tags %}
0
@@ -24,7 +25,11 @@
0
 {% endblock %}
0
 
0
 {% block extrafooter %}
0
+{% if entry.comments %}
0
+
0
   {% if config.disqus %}
0
     <script type="text/javascript" src="http://disqus.com/forums/{{config.disqus}}/embed.js"></script>
0
   {% endif %}
0
+{% endif %}
0
+
0
 {% endblock %}
0
\ No newline at end of file

Comments

    No one has commented yet.