Changeset 38:5386a7c8c14d
- Timestamp:
- 08/24/08 11:56:21 (3 months ago)
- Author:
- Jeffrey Gelens <jeffrey@…>
- Branch:
- default
- Message:
-
Layout update
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r17
|
r38
|
|
| 1 | | import blog.admin |
| 2 | 1 | import blog.signals |
-
|
r37
|
r38
|
|
| 16 | 16 | search_fields = ('title','body') |
| 17 | 17 | |
| 18 | | #admin.site.register(models.Link) |
| 19 | | #admin.site.register(models.Article, ArticleOptions) |
| | 18 | admin.site.register(models.Link) |
| | 19 | admin.site.register(models.Article, ArticleOptions) |
-
|
r37
|
r38
|
|
| 4 | 4 | from django.forms.widgets import * |
| 5 | 5 | |
| | 6 | LINK_CHOICES = ( |
| | 7 | ('B', 'Blogroll'), |
| | 8 | ('G', 'General links'), |
| | 9 | ('A', 'Articles'), |
| | 10 | ) |
| | 11 | |
| 6 | 12 | class Link(models.Model): |
| 7 | 13 | name = models.CharField(max_length=50, core=True) |
| 8 | 14 | url = models.URLField() |
| 9 | | kind = models.CharField(max_length=1, choices = (('B', 'Blogroll'), ('G', 'General links'))) |
| | 15 | kind = models.CharField(max_length=1, choices=LINK_CHOICES) |
| 10 | 16 | |
| 11 | 17 | def __unicode__(self): |
-
|
r37
|
r38
|
|
| 1 | 1 | from django.conf import settings |
| 2 | 2 | from django.db.models import signals |
| 3 | | from django.dispatch import Signal |
| 4 | 3 | from django.contrib.comments.models import FreeComment |
| 5 | 4 | from django.contrib.sites.models import Site |
| … |
… |
|
| 47 | 46 | instance.is_public = False |
| 48 | 47 | |
| 49 | | Signal().connect(moderate_comments, sender=FreeComment) |
| | 48 | signals.post_save.connect(moderate_comments, sender=FreeComment) |
-
|
r37
|
r38
|
|
| 4 | 4 | USE_I18N = False |
| 5 | 5 | USE_ETAGS = True |
| 6 | | DEFAULT_CONTENT_TYPE="application/xhtml+xml" |
| | 6 | #DEFAULT_CONTENT_TYPE="application/xhtml+xml" |
| 7 | 7 | DJANGO_ROOT = os.path.abspath(os.path.dirname(__file__)) |
| 8 | 8 | |
-
|
r35
|
r38
|
|
| 14 | 14 | min-width: 800px; |
| 15 | 15 | max-width: 1000px; |
| | 16 | -moz-border-radius: 10px; |
| | 17 | -webkit-border-radius: 10px; |
| 16 | 18 | } |
| 17 | 19 | |
| 18 | 20 | /* General settings */ |
| | 21 | hr { color: #ffa63a; height: 1px; background-color: #ffa63a; border: 0; } |
| 19 | 22 | img { border: 0px; } |
| 20 | 23 | p { text-align: justify; line-height: 150%; } |
| 21 | | a { text-decoration: none; color: #3e5fa7; } |
| 22 | | a:hover { color: #738EC9; text-shadow: #738EC9 2px 2px 10px; } |
| | 24 | a { |
| | 25 | text-decoration: none; |
| | 26 | color: #3e5fa7; |
| | 27 | -webkit-transition: 0.25s color ease-in; |
| | 28 | } |
| | 29 | a:hover { color: #ffa63a; } |
| 23 | 30 | ul { padding: 0; margin: 0; } |
| 24 | 31 | li { color: #a1a5a9; } |
| 25 | 32 | div { padding: 0; margin: 0; } |
| 26 | 33 | table { border: 0; } |
| | 34 | h1, h2 { color: #353633; } |
| 27 | 35 | td, th { |
| 28 | 36 | border: 0; |
| … |
… |
|
| 38 | 46 | height: 74px; |
| 39 | 47 | border-bottom: 1px solid #000000; |
| 40 | | background: url(/static/images/headerbg.png) repeat-x top left; |
| 41 | | overflow: hidden; |
| | 48 | background: url(/static/images/headerbg.png) repeat-x top right; |
| | 49 | overflow: hidden; |
| | 50 | -moz-border-radius-topleft: 10px; |
| | 51 | -webkit-border-top-left-radius: 10px; |
| | 52 | -moz-border-radius-topright: 10px; |
| | 53 | -webkit-border-top-right-radius: 10px; |
| 42 | 54 | } |
| 43 | 55 | |
| … |
… |
|
| 53 | 65 | } |
| 54 | 66 | |
| 55 | | #menu a { color: #ffffff; } |
| 56 | | #menu a:hover { color: #3E5FA7; } |
| | 67 | #menu a { |
| | 68 | color: #ffffff; |
| | 69 | -webkit-transition: 0.4s color ease-in; |
| | 70 | } |
| | 71 | #menu a:hover { color: #3e5Fa7; } |
| 57 | 72 | #menu ul { padding-top: 50px; } |
| 58 | 73 | #menu ul li { |
| … |
… |
|
| 136 | 151 | |
| 137 | 152 | .article { margin-bottom: 25px; } |
| 138 | | .article hr { color: #ffa63a; height: 1px; background-color: #ffa63a; border: 0; } |
| 139 | 153 | .article p img { border: 1px solid #ffa63a; padding: 1px; } |
| 140 | 154 | .article ul { padding-left: 20px; } |
| … |
… |
|
| 146 | 160 | font-size: 12px; |
| 147 | 161 | line-height: 150%; |
| | 162 | color: #484946; |
| 148 | 163 | font-family: "Lucida Grande", Geneva, Arial, Verdana, sans-serif; |
| 149 | 164 | } |
| … |
… |
|
| 151 | 166 | .entry-title { margin: 0; } |
| 152 | 167 | .entry-title, .entry-title a { |
| 153 | | color: #000000; |
| 154 | | letter-spacing: -0.1em; |
| 155 | | font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; |
| 156 | | text-shadow: #666 2px 2px 10px; |
| 157 | | } |
| 158 | | .entry-title a:hover { text-shadow: #738EC9 2px 2px 10px; text-decoration: underline; } |
| 159 | | .published, .comments { border: 0; font-style: oblique; color: #999999; } |
| | 168 | color: #353633; |
| | 169 | -webkit-transition: 0.4s color ease-in; |
| | 170 | } |
| | 171 | .entry-title a:hover { color: #3e5Fa7; } |
| | 172 | .published, .comments { border: 0; font-size: 0.8em; font-style: oblique; color: #999999; } |
| 160 | 173 | .flatpage-title a { |
| 161 | 174 | text-decoration: underline; |
| … |
… |
|
| 167 | 180 | .comment-title { |
| 168 | 181 | display: inline; |
| 169 | | text-shadow: #666 2px 2px 10px; |
| 170 | 182 | padding: 10px; |
| 171 | 183 | padding-left: 5px; |
| 172 | 184 | padding-bottom: 0; |
| 173 | 185 | text-transform: capitalize; |
| | 186 | color: #353633; |
| 174 | 187 | } |
| 175 | 188 | |
-
|
r32
|
r38
|
|
| 26 | 26 | <div id="logo"> |
| 27 | 27 | <a href="/" title="Back to homepage"> |
| 28 | | <img src="/static/images/logo.png" alt="Back to main page" /> |
| | 28 | <img src="/static/images/logo_corner.png" alt="Back to main page" /> |
| 29 | 29 | </a> |
| 30 | 30 | </div> |
-
|
r30
|
r38
|
|
| 13 | 13 | <p> |
| 14 | 14 | <small class="greyout"> |
| 15 | | {% ifequal topic "life" %} |
| | 15 | {% ifequal topic "life" %} |
| 16 | 16 | Show only articles about <a href="/blog/tech">technology</a> |
| 17 | 17 | or <a href="/blog">all</a> articles. |
| … |
… |
|
| 28 | 28 | </p> |
| 29 | 29 | |
| | 30 | <hr /> |
| 30 | 31 | {% for article in articles %} |
| 31 | 32 | {% get_free_comment_count for blog.article article.id as comment_count %} |
-
|
r35
|
r38
|
|
| 11 | 11 | {% load humanize %} |
| 12 | 12 | <div class="hentry article"> |
| | 13 | <hr /> |
| 13 | 14 | <abbr class="published" title="{{ article.pub_date|date:"Y-m-d\Th:i:sO" }}">{{ article.pub_date|naturalday|capfirst }}</abbr> |
| 14 | 15 | <h2 class="entry-title"><a class="rel-bookmark" href="{{ article.get_absolute_url }}">{{ article.title }}</a></h2> |
| … |
… |
|
| 20 | 21 | {{ article.body|restructuredtext }} |
| 21 | 22 | {% endifequal %} |
| | 23 | <hr /> |
| 22 | 24 | </div> |
| 23 | 25 | |
-
|
r36
|
r38
|
|
| 22 | 22 | {% latest_comments %} |
| 23 | 23 | |
| | 24 | <h2>Articles</h2> |
| | 25 | {% show_links "A" %} |
| | 26 | |
| 24 | 27 | <h2>Links</h2> |
| 25 | 28 | {% show_links "G" %} |
-
|
r26
|
r38
|
|
| 5 | 5 | <h1><a id="contact-me" name="contact-me">Contact Jeffrey</a></h1> |
| 6 | 6 | <p class="contact-form"> |
| | 7 | <table> |
| 7 | 8 | <form action="/contact" method="post"> |
| 8 | 9 | <tr><th><label for="id_name">Name:</label></th><td><input type="text" name="name" id="id_name" /></td></tr> |
| … |
… |
|
| 12 | 13 | <tr><th> </th><td><input type="submit" value="Send" /></td></tr> |
| 13 | 14 | </form> |
| | 15 | </table> |
| 14 | 16 | </p> |
| 15 | 17 | </div> |