Daniel Hemmingsen avatar Daniel Hemmingsen committed 46bc093

Big update... Added Blog, design fixes, TypeKit. Etc.

Comments (0)

Files changed (26)

Binary file added.

Add a comment to this file

demenza_site/blog/__init__.py

Empty file added.

demenza_site/blog/admin.py

+from django.contrib import admin
+
+from blog.models import Blog, Post
+
+class BlogAdmin(admin.ModelAdmin):
+    prepopulated_fields = {"slug": ("name",)}
+    list_display = ('active', 'name', 'description', 'user')
+    list_display_links = ('name',)
+    list_editable = ('active',)
+    list_filter = ('modified', 'created', 'active')
+    date_hierarchy = 'created'
+    search_fields = ['name', 'description', 'user__username']
+
+class PostAdmin(admin.ModelAdmin):
+    prepopulated_fields = {"slug": ("title",)}
+    list_display = ('active', 'title', 'excerpt', 'publish_at',)
+    list_display_links = ('title',)
+    list_editable = ('active',)
+    list_filter = ('publish_at', 'modified', 'created', 'active')
+    date_hierarchy = 'publish_at'
+    search_fields = ['title', 'excerpt', 'body', 'blog__name', 'blog__user__username']
+    fieldsets = (
+        (None, {
+            'fields': ('title', 'blog'),
+        }),
+        ('Publication', {
+            'fields': ('active', 'publish_at'),
+            'description': "Control <strong>whether</strong> and <strong>when</strong> a post is visible to the world.",
+        }),
+        ('Content', {
+            'fields': ('excerpt', 'body', 'tags'),
+        }),
+        ('Optional', {
+            'fields': ('slug',),
+            'classes': ('collapse',),
+        })
+    )
+
+admin.site.register(Blog, BlogAdmin)
+admin.site.register(Post, PostAdmin)

demenza_site/blog/migrations/0001_blog_initial.py

+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        
+        # Adding model 'Blog'
+        db.create_table('blog_blog', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+            ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+            ('active', self.gf('django.db.models.fields.BooleanField')(default=False)),
+            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
+            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
+            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
+            ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='blogs', to=orm['auth.User'])),
+        ))
+        db.send_create_signal('blog', ['Blog'])
+
+        # Adding model 'Post'
+        db.create_table('blog_post', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+            ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+            ('active', self.gf('django.db.models.fields.BooleanField')(default=False)),
+            ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
+            ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)),
+            ('excerpt', self.gf('django.db.models.fields.TextField')(blank=True)),
+            ('body', self.gf('django.db.models.fields.TextField')()),
+            ('publish_at', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2011, 6, 9, 23, 20, 20, 723534))),
+            ('blog', self.gf('django.db.models.fields.related.ForeignKey')(related_name='posts', to=orm['blog.Blog'])),
+        ))
+        db.send_create_signal('blog', ['Post'])
+
+
+    def backwards(self, orm):
+        
+        # Deleting model 'Blog'
+        db.delete_table('blog_blog')
+
+        # Deleting model 'Post'
+        db.delete_table('blog_post')
+
+
+    models = {
+        'auth.group': {
+            'Meta': {'object_name': 'Group'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+        },
+        'auth.permission': {
+            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+        },
+        'auth.user': {
+            'Meta': {'object_name': 'User'},
+            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+        },
+        'blog.blog': {
+            'Meta': {'object_name': 'Blog'},
+            'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
+            'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'blogs'", 'to': "orm['auth.User']"})
+        },
+        'blog.post': {
+            'Meta': {'ordering': "['publish_at', '-modified', '-created']", 'object_name': 'Post'},
+            'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+            'blog': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'posts'", 'to': "orm['blog.Blog']"}),
+            'body': ('django.db.models.fields.TextField', [], {}),
+            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+            'excerpt': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+            'publish_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2011, 6, 9, 23, 20, 20, 723534)'}),
+            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+        },
+        'contenttypes.contenttype': {
+            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+        }
+    }
+
+    complete_apps = ['blog']
Add a comment to this file

demenza_site/blog/migrations/__init__.py

Empty file added.

demenza_site/blog/models.py

+import datetime
+
+from django.db import models
+from django.contrib.auth.models import User
+
+from taggit.managers import TaggableManager
+
+class PostManager(models.Manager):
+    def get_visible(self):
+        return self.get_query_set().filter(publish_at__lte=datetime.datetime.now(), active=True)
+
+class TimeStampedActivate(models.Model):
+    created = models.DateTimeField(auto_now_add=True)
+    modified = models.DateTimeField(auto_now=True)
+    active = models.BooleanField(default=False,
+                                 help_text="Controls whether or not this item is visible to the world.")
+
+    class Meta:
+        abstract = True
+
+class Blog(TimeStampedActivate):
+    """
+    A blog belonging to a user.
+    Blogs have multiple posts and one user can have many blogs.
+
+    >>> b = Blog()
+    >>> b.name = 'Foo Blog'
+    >>> b.user = User.objects.create(username='foo', password='test')
+    >>> b.slug = 'foo-blog'
+    >>> b.save()
+    >>> print b
+    Foo Blog
+    >>> print b.user.username
+    foo
+    """
+    name = models.CharField(max_length=255,
+                            help_text="Name of your blog. 255 characters limit.")
+    slug = models.SlugField()
+    description = models.TextField(blank=True,
+                                   help_text="Describe your blog.")
+    user = models.ForeignKey(User, related_name="blogs")
+
+    def __unicode__(self):
+        return self.name
+
+    @models.permalink
+    def get_absolute_url(self):
+        return ('blog', (), {
+            'slug': self.slug
+        })
+
+class Post(TimeStampedActivate):
+    """
+    Post which belongs to a blog.
+
+    >>> b = Blog.objects.get(id=1)
+    >>> p = Post()
+    >>> p.title = "A Test Post"
+    >>> p.blog = b
+    >>> p.body = "Just a small test"
+    >>> p.slug = "a-test-post"
+    >>> p.save()
+    >>> print p.blog.name
+    Foo Blog
+    >>> print p.active
+    False
+    """
+    title = models.CharField(max_length=255,
+                             help_text="Title of the post.")
+    slug = models.SlugField()
+    excerpt = models.TextField(blank=True,
+                               help_text="Small teaser. (Optional)")
+    body = models.TextField()
+    publish_at = models.DateTimeField(default=datetime.datetime.now(),
+                                      help_text="Date and time post should become visible.")
+    blog = models.ForeignKey(Blog, related_name="posts")
+    tags = TaggableManager()
+    objects = PostManager()
+
+    def __unicode__(self):
+        return self.title
+
+    def is_visible(self):
+        """
+        Checks posts for visibility.
+        I.e: If scheduled to show next year, do not show this item.
+        """
+        if self.active and self.publish_at <= datetime.datetime.now():
+            return True
+        return False
+
+    @models.permalink
+    def get_absolute_url(self):
+        return ('post', (), {
+            'blog': self.blog.slug,
+            'slug': self.slug
+        })
+
+    class Meta:
+        ordering = ['publish_at', '-modified', '-created']

demenza_site/blog/views.py

+from django.views.generic import list_detail, date_based
+
+from blog.models import Blog, Post
+
+def blog(request, slug):
+    posts_blog = Blog.objects.get(slug=slug)
+    queryset = Post.objects.get_visible().filter(blog__slug=slug)
+
+    return date_based.archive_index(request, queryset, date_field="publish_at",
+                                    num_latest=5,
+                                    extra_context={ 'blog': posts_blog })
+
+def year(request, slug, y):
+    posts_blog = Blog.objects.get(slug=slug)
+    queryset = Post.objects.get_visible().filter(blog__slug=slug)
+
+    return date_based.archive_year(request, y, queryset, date_field="publish_at",
+                                   make_object_list=True,
+                                   extra_context={ 'blog': posts_blog })
+
+def month(request, slug, y, m):
+    posts_blog = Blog.objects.get(slug=slug)
+    queryset = Post.objects.get_visible().filter(blog__slug=slug)
+
+    return date_based.archive_month(request, y, m, queryset, date_field="publish_at",
+                                   month_format="%m",
+                                   extra_context={ 'blog': posts_blog })
+
+
+def post(request, blog, slug):
+
+    queryset = Post.objects.get_visible().filter(blog__slug=blog)
+
+    return list_detail.object_detail(request, queryset, slug=slug)
Add a comment to this file

demenza_site/portfolio/__init__.py

Empty file added.

demenza_site/portfolio/models.py

+from django.db import models
+
+# Create your models here.

demenza_site/portfolio/tests.py

+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+    def test_basic_addition(self):
+        """
+        Tests that 1 + 1 always equals 2.
+        """
+        self.assertEqual(1 + 1, 2)

demenza_site/portfolio/views.py

+# Create your views here.

demenza_site/settings.py

     # 'django.contrib.admindocs',
 
     # Third party apps
-    'south',
+    'south', #Django Schemamigraiton tool
+    'taggit', #Django-Taggit by Alex
     # Apps
-    'polls',
+    'polls', #Pools App
+    'blog', #Blog App
 )
+
+try:
+    from local_settings import *
+except ImportError:
+    pass
+
 # A sample logging configuration. The only tangible logging
 # performed by this configuration is to send an email to
 # the site admins on every HTTP 500 error.

demenza_site/urls.py

 from django.conf.urls.defaults import patterns, include, url
 from django.views.generic.simple import direct_to_template
 
+from django.views.generic import list_detail
+
 # Uncomment the next two lines to enable the admin:
 from django.contrib import admin
 admin.autodiscover()
 
+from blog.models import Blog
+
+blog_info = {
+    "queryset": Blog.objects.filter(active=True),
+}
+
 urlpatterns = patterns('',
 
+    url(r'^admin/', include(admin.site.urls)),
+
     # Uncomment the admin/doc line below to enable admin documentation:
     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
         'template': 'pages/about.html'
     }),
 
+    #url(r'^$', list_detail.object_list, blog_info, name="home"),
+    #url(r'^blog/(?P<slug>[-\w]+)/$', 'blog.views.blog', name="blog"),
+    #url(r'^blog/(?P<slug>[-\w]+)/(?P<y>\d{4})/$', 'blog.views.year', name="year"),
+    #url(r'^blog/(?P<slug>[-\w]+)/(?P<y>\d{4})/(?P<m>\d{2})/$', 'blog.views.month', name="month"),
+    #url(r'^blog/(?P<blog>[-\w]+)/post/(?P<slug>[-\w]+)/$', 'blog.views.post', name="post"),
+
+    url(r'^$', list_detail.object_list, blog_info, name="home"),
+    url(r'^(?P<slug>[-\w]+)/$', 'blog.views.blog', name="blog"),
+    url(r'^(?P<slug>[-\w]+)/(?P<y>\d{4})/$', 'blog.views.year', name="year"),
+    url(r'^(?P<slug>[-\w]+)/(?P<y>\d{4})/(?P<m>\d{2})/$', 'blog.views.month', name="month"),
+    url(r'^(?P<blog>[-\w]+)/post/(?P<slug>[-\w]+)/$', 'blog.views.post', name="post"),
+
     (r'^polls/$', 'polls.views.index'),
     (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
     (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),

templates/blog/base.html

+{% extends "layouts/base.html" %}
+
+{% block sidebar%}
+{{ block.super }}
+<header>
+    <h2>The Post Archive</h2>
+</header>
+
+<ol>
+    {% for year in date_list %}
+        <li><a href="{% url year blog.slug year|date:"Y" %}">{{ year|date:"Y" }}</a></li>
+    {% endfor %}
+</ol>
+{% endblock %}

templates/blog/blog_list.html

+{% extends "layouts/site_base.html" %}
+
+{% block page_title %}Pick a blog! | {{ block.super }}{% endblock %}
+
+{% block header %}
+    <h1>Select a blog below to view its posts.</h1>
+{% endblock %}
+
+{% block main %}
+{% if object_list %}
+    <ul>
+        {% for blog in object_list %}
+        <li>
+            <a href="{{ blog.get_absolute_url }}">{{ blog }}</a>
+        </li>
+        {% endfor %}
+    </ul>
+{% endif %}
+{% endblock %}

templates/blog/post_archive.html

+{% extends "blog/base.html" %}
+
+{% block main %}
+<section>
+<header>
+    <h2>Recent Posts</h2>
+</header>
+    {% if latest|length %}
+    {% for post in latest %}
+    <header>
+        <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
+        Posted {{ post.publish_at|date }} by {{ blog.user.get_full_name }}
+    </header>
+        <p>{{ post.excerpt|linebreaks }}</p>
+    {% endfor %}
+    {% else %}
+        <p>Sorry, there a no posts yet. Check back soon.</p>
+    {% endif %}
+</section>
+{% endblock %}

templates/blog/post_archive_month.html

+{% extends "blog/base.html" %}
+
+{% block page_title %}
+    {{ month|date:"F" }} | {{ block.super }}
+{% endblock %}
+
+{% block main %}
+
+<section>
+    <aside>
+        <ol class="dates">
+            <li>
+                <a href="{% url month blog.slug previous_month|date:"Y" previous_month|date:"m" %}">
+                    {{ previous_month|date:"F" }}</a>
+            </li>
+            {% if next_month %}
+            <li>
+                <a href="{% url month blog.slug next_month|date:"Y" next_month|date:"m" %}">
+                    {{ next_month|date:"F" }}</a>
+            </li>
+            {% endif %}
+        </ol>
+    </aside>
+
+    <h2>Posts for {{ month|date:"N, Y" }}</h2>
+    <ul>
+        {% for post in object_list %}
+        <li>
+            <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
+            {{ post.publish_at|date }}
+            {{ post.excerpt|linebreaks }}
+        </li>
+        {% endfor %}
+    </ul>
+</section>
+{% endblock %}

templates/blog/post_archive_year.html

+{% extends "blog/base.html" %}
+
+{% block page_title %}
+    {{ year }} | {{ block.super }}
+{% endblock %}
+
+{% block main %}
+<section>
+    <aside>
+        <ol>
+            {% for month in date_list %}
+                <li><a href="{% url month blog.slug month|date:"Y" month|date:"m" %}">{{ month|date:"N" }}</a></li>
+            {% endfor %}
+        </ol>
+    </aside>
+    <h2>Posts for {{ year }}</h2>
+    <ul>
+        {% for post in object_list %}
+        <li>
+            <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
+            {{ post.publish_at|date }}
+            {{ post.excerpt|linebreaks }}
+        </li>
+        {% endfor %}
+    </ul>
+</section>
+{% endblock %}

templates/blog/post_detail.html

+{% extends "blog/base.html" %}
+
+{% block page_title %}
+    {{ object.title }} |
+        {% with object.blog as blog %}
+            {{ block.super }}
+        {% endwith %}
+{% endblock %}
+
+{% block main %}
+<section>
+<header>
+    <h3>{{ object.title }}</h3>
+</header>
+<article>
+        Posted {{ object.publish_at }} by {{ object.blog.user.get_full_name }}
+        <br />
+        Tags: 
+            {% for tag in object.tags.all %}
+                {{ tag }},
+            {% endfor %}
+        <br /><br />
+    {{ object.body|linebreaks }}
+</article>
+<nav>
+    {% with object.get_previous_by_publish_at as prev %}
+        {% if prev and prev.is_visible %}
+            <a href="{{ prev.get_absolute_url }}">&lt; {{ prev }}</a>
+        {% endif %}
+    {% endwith %}
+    {% with object.get_next_by_publish_at as next %}
+        {% if next and next.is_visible %}
+        <a href="{{ next.get_absolute_url }}"> {{ next }} &gt;</a>
+        {% endif %}
+    {% endwith %}
+</nav>
+</section>
+{% endblock %}

templates/layouts/base.html

 {% extends 'layouts/site_base.html' %}
 
 {% block site_desc %}Because I can!{% endblock %}
-{% block site_author %}Daniel Hemmingsen{% endblock %}
+
+{% block site_author %}{{ blog.user.get_full_name }}{% endblock %}
 
 {% block page_title %}Demenza.me | Because I can!{% endblock %}
 
-{% block navigation %}<a class="first" href="/">Home</a><a href="#">Middle</a><a href="#">Middle</a><a href="#">Middle</a><a class="last" href="/about/">About</a>{% endblock %}
+{% block header %}
+    <h1>Demenza.me</h1>
+    <p>Because I can!</p>
+{% endblock %}
 
-{% block header %}<h1>Demenza.me</h1><p>Because I can!</p>{% endblock %}
+{% block navigation %}
+<ul>
+    <li><a href="/">Home</a></li>
+    <li><a href="/blog/">Blog</a></li>
+    <!--<li><a href="#">Portfolio</a></li>-->
+    <li><a href="/about/">About</a></li>
+</ul>
+{% endblock %}
 
-{% block sidebar%}<h1>Connect</h1><p><a href="#">Github</a></p><p><a href="#">LinkedIN</a></p><p><a href="#">Forrst</a></p><p><a href="#">Dribbble</a></p>{% endblock %}
+{% block sidebar%}
+<header>
+    <h2>Twitter-Twat</h2>
+</header>
+
+{% endblock %}
 
 {% block footer %}All rights reserverd &copy; 2011 Daniel Hemmingsen{% endblock %}

templates/layouts/css/style.css

 .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
 
 
-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
+::-moz-selection{ background: #82909f; color:#fff; text-shadow: none; }
+::selection { background:#82909f; color:#fff; text-shadow: none; }
 a:link { -webkit-tap-highlight-color: #FF5E99; }
 button {  width: auto; overflow: visible; }
 .ie7 img { -ms-interpolation-mode: bicubic; }
  * Author: 
  */
 
+header, footer, aside, nav, article {
+    display: block;
+}
+
 body {
+    margin: 0 auto;
+    width: 940px;
     background-image: url('/static/img/bgtexture.png');
 }
 
-.clearFix {
-    float: none;
-    clear: both;
+h1, h2 {
+    font-family: "lobster-1", "lobster-2", "helvetica";
+    color: #fff;
+    line-height: 44px;
+    padding: 22px 0;
+}
+
+h1 {
+    font-size: 36px;
+}
+
+h2 {
+    font-size: 28px;
+}
+
+h3, h3 a {
+    font-family: "ff-cocon-web-pro-1","ff-cocon-web-pro-2", helvetica;
+    color: #fff;
+    font-size: 24px;
+}
+
+p {
+    color: #ccc;
+    padding-bottom: 22px;
 }
 
 a {
-    font-family: "droid-serif-1", "droid-serif-2", "arial";
     color: #999;
     text-decoration: none;
 
 }
 
 #container {
-    margin: 0 auto;
-    width: 800px;
+    width: 820px;
 }
 
-header {
-    text-align: center;
-    padding: 5px 10px;
-    height: 50px;
-    margin: 25px 0;
+#content {
+    position: relative;
+    margin-top: 66px;
+    display: table;
 }
 
-header h1 {
-    font-family: "lobster-1", "lobster-2", "helvetica";
-    color: #fff;
-    font-size: 34px;
-    text-shadow: 0 0 5px #000;
-    /*-webkit-text-stroke: 1px #777;*/
+#mainContent {
+    display: table-cell;
+    width: 520px;
+    padding-right: 22px;
 }
 
-header p {
-    font-family: "droid-serif-1", "droid-serif-2", "arial";
-    font-size: 16px;
-    color: #999;
+aside {
+    display: table-cell;
+    width: 300px;
 }
 
 nav {
+    background: black;
+    position: absolute;
+    left: 0;
     width: 100%;
-    text-align: center;
-    display: inline-block;
-    _display: inline;           /* IE is so dumb */
-    zoom:1;                     /* it is really really dumb */
 }
 
-nav .first {
-    -webkit-border-bottom-left-radius: 5px;
-    -webkit-border-top-left-radius: 5px;
-    color: #ececec;
+nav ul {
+    margin: 0 auto;
+    width: 940px;
+    list-style: none;
 }
 
-nav .last {
-    -webkit-border-bottom-right-radius: 5px;
-    -webkit-border-top-right-radius: 5px;
-    color: #ececec;
-}
-
-nav a {
-    font-family: "droid-serif-1", "droid-serif-2", "helvetica";
-    color: #ececec;
-    padding: 5px;
-    text-decoration: none;
-    text-transform: uppercase;
-    background-color: #373737;
-    -webkit-box-shadow: 0 5px 0 #777;
-}
-
-nav a:hover {
-    color: #373737;
-    background-color: #e7e7e7;
-}
-
-#wrapper {
-    -webkit-box-shadow: 0 0 10px #000;
-    -webkit-border-radius: 5px;
-    background-color: #fff;
-}
-
-#main {
-    margin: 20px 0;
-    padding: 5px 10px;
-    width: 560px;
+nav ul li {
     float: left;
 }
 
-#main h1 {
-    font-family: "lobster-1", "lobster-2", "helvetica";
-    font-size: 18px;
+nav ul li a {  
+    display: block;
+    margin-right: 20px;
+    width: 100px;
+    font-size: 14px;
+    line-height: 44px;
+    text-decoration: none;
+    color: #777;
 }
 
-#main p {
-    font-family: "droid-serif-1", "droid-serif-2", "arial";
-    padding: 5px 10px;
+nav ul li a:hover {
+    color: #fff;
 }
 
-#main img {
-    margin: 5px;
-    max-width: 250px;
-    -webkit-border-radius: 10px;
-    -moz-border-radius: 10px;
-    border-radius: 10px;
-    -webkit-box-shadow: 0 0 5px #000;
+nav ul li.selected a {
+    color: #fff;
 }
 
-#sidebar {
-    margin: 20px 0;
-    padding: 5px 10px;
-    width: 200px;
-    float: right;
+aside section {
+    margin: 22px 0 0 22px;
+    padding: 11px 22px;
+    background: url("images/sidebar_section_background.png") repeat-x;
+    -moz-border-radius: 11px;
+    -webkit-border-radius: 11px;
 }
 
-#sidebar h1 {
-    font-family: "lobster-1", "lobster-2", "helvetica";
-    font-size: 18px;
+aside section ul {
+    margin: 0 0 0 22px;
+    list-style: none;
 }
 
-#sidebar p {
-    padding: 0 10px;
+aside section ul li a {
+    display: block;
+    text-decoration: none;
+    color: #000;
+}
+
+aside section ul li a:hover {
+    text-decoration: underline;
 }
 
 footer {
+    font-family: "droid-serif-1", "droid-serif-2", "arial";
     text-align: center;
     text-transform: lowercase;
-    padding: 5px 0;
+    padding: 15px 0;
 }
 
+footer {
+    position: absolute;
+    left: 0;
+    width: 100%;
+    background: #222;
+}
 
 
 
Add a comment to this file

templates/layouts/img/test1.png

Old
Old image
New
New image
Add a comment to this file

templates/layouts/img/test2.png

Old
Old image
New
New image

templates/layouts/site_base.html

     <link rel="stylesheet" href="/static/css/style.css?v=2">
     <script src="/static/js/libs/modernizr-1.7.min.js"></script>
 
-    <!-- REMOVED TYPEKIT FOR NOW -->
+    <!-- TypeKit Fonts -->
+    <script type="text/javascript" src="http://use.typekit.com/ucw1lah.js"></script>
+    <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
 
 </head>
 
 <body>
 
-  <div id="container">
+<!--<div id="container">-->
     <header>
         {% block header %}{% endblock %}
     </header>
-        <div id="nav">
-            <nav>
-                {% block navigation %}{% endblock %}
-            </nav>
-        </div>
-            <div id="wrapper">
-                <div id="main" role="main">
-                    {% block main %}{% endblock %}
-                </div>
-                <div id="sidebar" role="sidebar">
-                    {% block sidebar %}{% endblock %}
-                </div>
-                    <div class="clearFix"></div>    
-            </div>
-            <footer>
-                {% block footer%}{% endblock %}
-            </footer>
-  </div> <!-- eo #container -->
+    <nav>
+        {% block navigation %}{% endblock %}
+    </nav>
+<div id="content">
+    <div id="mainContent">
+        <section>
+            {% block main %}{% endblock %}
+        </section>
+    </div>
+    <aside>
+        <section>
+            {% block sidebar %}{% endblock %}
+        </section>
+    </aside>
+</div>
+    <footer>
+        {% block footer%}{% endblock %}
+    </footer>
+<!--</div>--> <!-- eo #container -->
 
 
   <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>

templates/pages/about.html

 {% block page_title %}{{ block.super }} | About{% endblock %}
 
 {% block main %}
-    <h1>About</h1>
+<header>
+    <h2>About</h2>
+</header>
     <p>
         Nineteen year old lad, with a passion for the interwebs. Coding and making graphics is what I do on a daily basis. Love to explore and learn something. It isn't unreal, that I stay up some nights and explore the interwebs for some answers.
     </p>
         You can also check me out on LinkedIN!
     </p>
 
-    <h1>Check me out!</h1>
+<header>
+    <h2>Check me out!</h2>
+</header>
     <p>
         <a href="http://www.linkedin.com/in/demenza">You can also check me out on LinkedIN!</a>
     </p>

templates/pages/index.html

 {% block page_title %}{{ block.super }} | Home{% endblock %}
 
 {% block main %}
-    <h1>Welcome</h1>
-
+<header>
+    <h2>Welcome</h2>
+</header>
     <p>
         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
     </p>
         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br />
         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
     </p>
-
-    <img src="/static/img/test1.png" />
-    <img src="/static/img/test2.png" />
 {% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.