Changeset 38:5386a7c8c14d

Show
Ignore:
Timestamp:
08/24/08 11:56:21 (3 months ago)
Author:
Jeffrey Gelens <jeffrey@…>
Branch:
default
Message:

Layout update

Files:
11 modified

Legend:

Unmodified
Added
Removed
  • blog/__init__.py

    r17 r38  
    1 import blog.admin 
    21import blog.signals 
  • blog/admin.py

    r37 r38  
    1616    search_fields = ('title','body') 
    1717 
    18 #admin.site.register(models.Link) 
    19 #admin.site.register(models.Article, ArticleOptions) 
     18admin.site.register(models.Link) 
     19admin.site.register(models.Article, ArticleOptions) 
  • blog/models.py

    r37 r38  
    44from django.forms.widgets import * 
    55 
     6LINK_CHOICES = ( 
     7        ('B', 'Blogroll'), 
     8        ('G', 'General links'), 
     9        ('A', 'Articles'), 
     10) 
     11 
    612class Link(models.Model): 
    713    name = models.CharField(max_length=50, core=True) 
    814    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) 
    1016 
    1117    def __unicode__(self): 
  • blog/signals.py

    r37 r38  
    11from django.conf import settings 
    22from django.db.models import signals 
    3 from django.dispatch import Signal 
    43from django.contrib.comments.models import FreeComment 
    54from django.contrib.sites.models import Site 
     
    4746                    instance.is_public = False 
    4847 
    49 Signal().connect(moderate_comments, sender=FreeComment) 
     48signals.post_save.connect(moderate_comments, sender=FreeComment) 
  • settings.py

    r37 r38  
    44USE_I18N = False 
    55USE_ETAGS = True 
    6 DEFAULT_CONTENT_TYPE="application/xhtml+xml" 
     6#DEFAULT_CONTENT_TYPE="application/xhtml+xml" 
    77DJANGO_ROOT = os.path.abspath(os.path.dirname(__file__)) 
    88 
  • static/css/screen.css

    r35 r38  
    1414    min-width: 800px; 
    1515    max-width: 1000px; 
     16    -moz-border-radius: 10px; 
     17    -webkit-border-radius: 10px;  
    1618} 
    1719 
    1820/* General settings */ 
     21hr { color: #ffa63a; height: 1px; background-color: #ffa63a; border: 0; } 
    1922img { border: 0px; } 
    2023p { text-align: justify; line-height: 150%; } 
    21 a { text-decoration: none; color: #3e5fa7; } 
    22 a:hover { color: #738EC9; text-shadow: #738EC9 2px 2px 10px; } 
     24a {  
     25    text-decoration: none; 
     26    color: #3e5fa7; 
     27    -webkit-transition: 0.25s color ease-in; 
     28} 
     29a:hover { color: #ffa63a; } 
    2330ul { padding: 0; margin: 0; } 
    2431li { color: #a1a5a9; } 
    2532div { padding: 0; margin: 0; } 
    2633table { border: 0; } 
     34h1, h2 { color: #353633; } 
    2735td, th { 
    2836    border: 0; 
     
    3846    height: 74px; 
    3947    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; 
    4254} 
    4355 
     
    5365} 
    5466 
    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; } 
    5772#menu ul { padding-top: 50px; } 
    5873#menu ul li { 
     
    136151 
    137152.article { margin-bottom: 25px; }  
    138 .article hr { color: #ffa63a; height: 1px; background-color: #ffa63a; border: 0; } 
    139153.article p img { border: 1px solid #ffa63a; padding: 1px; } 
    140154.article ul { padding-left: 20px; } 
     
    146160    font-size: 12px; 
    147161    line-height: 150%; 
     162    color: #484946; 
    148163    font-family: "Lucida Grande", Geneva, Arial, Verdana, sans-serif; 
    149164} 
     
    151166.entry-title { margin: 0; } 
    152167.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; } 
    160173.flatpage-title a { 
    161174    text-decoration: underline; 
     
    167180.comment-title {  
    168181    display: inline; 
    169     text-shadow: #666 2px 2px 10px; 
    170182    padding: 10px; 
    171183    padding-left: 5px; 
    172184    padding-bottom: 0; 
    173185    text-transform: capitalize; 
     186    color: #353633; 
    174187} 
    175188 
  • templates/base.html

    r32 r38  
    2626    <div id="logo"> 
    2727      <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" /> 
    2929      </a> 
    3030    </div> 
  • templates/blog/index.html

    r30 r38  
    1313  <p> 
    1414    <small class="greyout"> 
    15     {% ifequal topic "life" %} 
     15  {% ifequal topic "life" %} 
    1616    Show only articles about <a href="/blog/tech">technology</a> 
    1717    or <a href="/blog">all</a> articles. 
     
    2828  </p> 
    2929 
     30    <hr /> 
    3031{% for article in articles  %} 
    3132  {% get_free_comment_count for blog.article article.id as comment_count %} 
  • templates/blog/single_article.html

    r35 r38  
    1111{% load humanize %} 
    1212  <div class="hentry article"> 
     13    <hr /> 
    1314    <abbr class="published" title="{{ article.pub_date|date:"Y-m-d\Th:i:sO" }}">{{ article.pub_date|naturalday|capfirst }}</abbr> 
    1415    <h2 class="entry-title"><a class="rel-bookmark" href="{{ article.get_absolute_url }}">{{ article.title }}</a></h2> 
     
    2021     {{ article.body|restructuredtext }} 
    2122    {% endifequal %} 
     23    <hr /> 
    2224  </div> 
    2325 
  • templates/blog_base.html

    r36 r38  
    2222      {% latest_comments %} 
    2323 
     24      <h2>Articles</h2> 
     25      {% show_links "A" %} 
     26 
    2427      <h2>Links</h2> 
    2528      {% show_links "G" %} 
  • templates/contact_form.html

    r26 r38  
    55  <h1><a id="contact-me" name="contact-me">Contact Jeffrey</a></h1> 
    66  <p class="contact-form"> 
     7  <table> 
    78    <form action="/contact" method="post"> 
    89      <tr><th><label for="id_name">Name:</label></th><td><input type="text" name="name" id="id_name" /></td></tr> 
     
    1213      <tr><th>&nbsp;</th><td><input type="submit" value="Send" /></td></tr> 
    1314    </form> 
     15  </table> 
    1416  </p> 
    1517  </div>