From 4b29603d79cc1f79c66786684f27ec9abfbaa825 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 17 Oct 2011 01:34:04 +0200 Subject: Initial commit --- .gitignore | 5 ++ __init__.py | 0 blog/__init__.py | 0 blog/admin.py | 4 ++ blog/models.py | 33 ++++++++++++ blog/tests.py | 23 +++++++++ blog/urls.py | 9 ++++ blog/views.py | 55 ++++++++++++++++++++ links/__init__.py | 0 links/admin.py | 4 ++ links/models.py | 35 +++++++++++++ links/tests.py | 16 ++++++ links/urls.py | 5 ++ links/views.py | 12 +++++ local_settings.py.example | 15 ++++++ main/__init__.py | 0 main/admin.py | 4 ++ main/models.py | 24 +++++++++ main/signals.py | 0 main/tests.py | 23 +++++++++ main/urls.py | 4 ++ main/views.py | 13 +++++ manage.py | 11 ++++ projects/__init__.py | 0 projects/admin.py | 6 +++ projects/models.py | 59 ++++++++++++++++++++++ projects/urls.py | 13 +++++ projects/views.py | 24 +++++++++ settings.py | 91 ++++++++++++++++++++++++++++++++++ templates/admin/login.html | 50 +++++++++++++++++++ templates/base.html | 44 ++++++++++++++++ templates/blog/base.html | 5 ++ templates/blog/posts.html | 42 ++++++++++++++++ templates/blog/tags.html | 19 +++++++ templates/home.html | 88 ++++++++++++++++++++++++++++++++ templates/links/links.html | 20 ++++++++ templates/projects/base.html | 3 ++ templates/projects/project_detail.html | 52 +++++++++++++++++++ templates/projects/project_list.html | 20 ++++++++ urls.py | 19 +++++++ 40 files changed, 850 insertions(+) create mode 100644 .gitignore create mode 100644 __init__.py create mode 100644 blog/__init__.py create mode 100644 blog/admin.py create mode 100644 blog/models.py create mode 100644 blog/tests.py create mode 100644 blog/urls.py create mode 100644 blog/views.py create mode 100644 links/__init__.py create mode 100644 links/admin.py create mode 100644 links/models.py create mode 100644 links/tests.py create mode 100644 links/urls.py create mode 100644 links/views.py create mode 100644 local_settings.py.example create mode 100644 main/__init__.py create mode 100644 main/admin.py create mode 100644 main/models.py create mode 100644 main/signals.py create mode 100644 main/tests.py create mode 100644 main/urls.py create mode 100644 main/views.py create mode 100644 manage.py create mode 100644 projects/__init__.py create mode 100644 projects/admin.py create mode 100644 projects/models.py create mode 100644 projects/urls.py create mode 100644 projects/views.py create mode 100644 settings.py create mode 100644 templates/admin/login.html create mode 100644 templates/base.html create mode 100644 templates/blog/base.html create mode 100644 templates/blog/posts.html create mode 100644 templates/blog/tags.html create mode 100644 templates/home.html create mode 100644 templates/links/links.html create mode 100644 templates/projects/base.html create mode 100644 templates/projects/project_detail.html create mode 100644 templates/projects/project_list.html create mode 100644 urls.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db82c7d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pyc +local_settings.py +static +.toudou +test.db diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blog/__init__.py b/blog/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blog/admin.py b/blog/admin.py new file mode 100644 index 0000000..ca32d1f --- /dev/null +++ b/blog/admin.py @@ -0,0 +1,4 @@ +from blog.models import Post +from django.contrib import admin + +admin.site.register(Post) diff --git a/blog/models.py b/blog/models.py new file mode 100644 index 0000000..126ba57 --- /dev/null +++ b/blog/models.py @@ -0,0 +1,33 @@ +from django.db import models +from main.models import Tag, Activity +from django.db.models.signals import post_save, post_delete + +class Post(models.Model): + subject = models.CharField(max_length=500) + body = models.TextField() + tags = models.ManyToManyField(Tag, null=True, blank=True) + postdate = models.DateTimeField(auto_now=True) + + def __unicode__(self): + return self.subject + +def post_saved_callback(sender, **kwargs): + if kwargs['created']: + acttype = 'add' + else: + acttype = 'edit' + + a = Activity(actcategory='blog', + actdescription=kwargs["instance"].subject, + acttype = acttype, + objpk = kwargs["instance"].pk) + a.save() + +def post_deleted_callback(sender, **kwargs): + a = Activity(actcategory='blog', + actdescription=kwargs["instance"].subject, + acttype = 'delete') + a.save() + +post_save.connect(post_saved_callback, sender=Post) +post_delete.connect(post_deleted_callback, sender=Post) diff --git a/blog/tests.py b/blog/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/blog/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these 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.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/blog/urls.py b/blog/urls.py new file mode 100644 index 0000000..c4137ed --- /dev/null +++ b/blog/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('blog.views', + (r'^$', 'index'), + (r'^(?P\d+)/$', 'index'), + (r'^post/(?P\d+)/$', 'post'), + (r'^tags/$', 'tags'), + (r'^tag/(?P[\w_]+)/$', 'tag'), +) diff --git a/blog/views.py b/blog/views.py new file mode 100644 index 0000000..06a4aba --- /dev/null +++ b/blog/views.py @@ -0,0 +1,55 @@ +# Create your views here. +from django.http import HttpResponse +from django.shortcuts import render_to_response +from django.template import Context, loader +from django.views.generic.simple import direct_to_template +from blog.models import Post, Tag + +def index(request, page=0): + item_count = 7 + + page = int(page) + start_num = (page * item_count) + end_num = start_num + item_count + + post_list = Post.objects.all().order_by("-postdate")[start_num:end_num] + + has_previous = page > 0 + has_next = end_num < Post.objects.all().count() + + c = { + 'postlist': post_list, + 'has_next': has_next, + 'has_previous': has_previous, + 'next_page': page + 1, + 'previous_page': page - 1 + } + + return direct_to_template(request, "blog/posts.html", c) + +def post(request, post_id): + post = Post.objects.filter(pk=post_id) + t = loader.get_template("blog/posts.html") + c = Context({ + 'postlist': post, + }) + + return HttpResponse(t.render(c)) + +def tags(request): + tag_list = Tag.objects.all() + t = loader.get_template("blog/tags.html") + c = Context({ + 'taglist': tag_list, + }) + + return HttpResponse(t.render(c)) + +def tag(request, tag_name): + post_list = Post.objects.filter(tags__name=tag_name) + t = loader.get_template("blog/posts.html") + c = Context({ + 'postlist': post_list, + }) + + return HttpResponse(t.render(c)) diff --git a/links/__init__.py b/links/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/links/admin.py b/links/admin.py new file mode 100644 index 0000000..29b8674 --- /dev/null +++ b/links/admin.py @@ -0,0 +1,4 @@ +from links.models import Bookmark +from django.contrib import admin + +admin.site.register(Bookmark) diff --git a/links/models.py b/links/models.py new file mode 100644 index 0000000..50319a2 --- /dev/null +++ b/links/models.py @@ -0,0 +1,35 @@ +from django.db import models +from main.models import Tag, Activity +from django.db.models.signals import post_save, post_delete + +class Bookmark(models.Model): + url = models.URLField(primary_key=True, max_length=255) + date = models.DateTimeField(auto_now_add=True) + name = models.CharField(max_length=255) + description = models.TextField() +# tags = models.ManyToManyField(Tag, null=True, blank=True) + priority = models.IntegerField(null=True, blank=True) + + def __unicode__(self): + return self.name + +def bookmark_saved_callback(sender, **kwargs): + if kwargs['created']: + acttype = 'add' + else: + acttype = 'edit' + + a = Activity(actcategory='link', + actdescription=kwargs["instance"].name, + acttype = acttype, + objpk = kwargs["instance"].pk) + a.save() + +def bookmark_deleted_callback(sender, **kwargs): + a = Activity(actcategory='link', + actdescription=kwargs["instance"].name, + acttype = 'delete') + a.save() + +post_save.connect(bookmark_saved_callback, sender=Bookmark) +post_delete.connect(bookmark_deleted_callback, sender=Bookmark) diff --git a/links/tests.py b/links/tests.py new file mode 100644 index 0000000..501deb7 --- /dev/null +++ b/links/tests.py @@ -0,0 +1,16 @@ +""" +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) diff --git a/links/urls.py b/links/urls.py new file mode 100644 index 0000000..25d8cc8 --- /dev/null +++ b/links/urls.py @@ -0,0 +1,5 @@ +from django.conf.urls.defaults import patterns + +urlpatterns = patterns('links.views', + (r'^$', 'index'), +) diff --git a/links/views.py b/links/views.py new file mode 100644 index 0000000..fe0d89d --- /dev/null +++ b/links/views.py @@ -0,0 +1,12 @@ +from links.models import Bookmark +from django.http import HttpResponse +from django.template import Context, loader + +def index(request): + bookmark_list = Bookmark.objects.all().order_by("-date")[:100] + t = loader.get_template("links/links.html") + c = Context({ + 'bookmarklist': bookmark_list, + }) + + return HttpResponse(t.render(c)) diff --git a/local_settings.py.example b/local_settings.py.example new file mode 100644 index 0000000..6a166a7 --- /dev/null +++ b/local_settings.py.example @@ -0,0 +1,15 @@ +DEBUG = False + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': '', # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} + +# Make this unique, and don't share it with anybody. +SECRET_KEY = '00000000000000000000000000000000000000000000000000' diff --git a/main/__init__.py b/main/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/admin.py b/main/admin.py new file mode 100644 index 0000000..093f769 --- /dev/null +++ b/main/admin.py @@ -0,0 +1,4 @@ +from main.models import Tag +from django.contrib import admin + +admin.site.register(Tag) diff --git a/main/models.py b/main/models.py new file mode 100644 index 0000000..8ecddec --- /dev/null +++ b/main/models.py @@ -0,0 +1,24 @@ +from django.db import models + +class Tag(models.Model): + name = models.CharField(primary_key=True, max_length=200) + + def __unicode__(self): + return self.name + +class Activity(models.Model): + ACTCATEGORY_CHOICES = ( + ('blog', 'Blog post'), + ('project', 'Project page'), + ('link', 'Link'), + ) + ACTTYPE_CHOICES = ( + ('add', 'Add'), + ('edit', 'Edit'), + ('delete', 'Delete'), + ) + date = models.DateTimeField(auto_now=True) + actcategory = models.CharField(max_length=100, choices=ACTCATEGORY_CHOICES) + actdescription = models.CharField(max_length=500) + acttype = models.CharField(max_length=6) + objpk = models.CharField(max_length=300, null=True) diff --git a/main/signals.py b/main/signals.py new file mode 100644 index 0000000..e69de29 diff --git a/main/tests.py b/main/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/main/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these 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.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/main/urls.py b/main/urls.py new file mode 100644 index 0000000..9f861b5 --- /dev/null +++ b/main/urls.py @@ -0,0 +1,4 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('main.views', + (r'^$', 'index')) diff --git a/main/views.py b/main/views.py new file mode 100644 index 0000000..91e20dd --- /dev/null +++ b/main/views.py @@ -0,0 +1,13 @@ +from django.http import HttpResponse +from django.shortcuts import render_to_response +from django.template import Context, loader +from main.models import Activity + +def index(request): + activity_list = Activity.objects.all().order_by("-date")[:5] + t = loader.get_template("home.html") + c = Context({ + "activitylist": activity_list, + }) + + return HttpResponse(t.render(c)) diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..6a43c99 --- /dev/null +++ b/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python2 +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/projects/__init__.py b/projects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/projects/admin.py b/projects/admin.py new file mode 100644 index 0000000..b5ec7d4 --- /dev/null +++ b/projects/admin.py @@ -0,0 +1,6 @@ +from projects.models import Project, Language, Screenshot +from django.contrib import admin + +admin.site.register(Project) +admin.site.register(Language) +admin.site.register(Screenshot) diff --git a/projects/models.py b/projects/models.py new file mode 100644 index 0000000..4b2b49a --- /dev/null +++ b/projects/models.py @@ -0,0 +1,59 @@ +from django.db import models +from main.models import Tag, Activity +from django.db.models.signals import post_save, post_delete + +class Language(models.Model): + name = models.CharField(max_length=100) + + def __unicode__(self): + return self.name + +class Screenshot(models.Model): + url = models.URLField(max_length=255) + description = models.CharField(max_length=300) + + def __unicode__(self): + return self.description + +class Project(models.Model): + STATUS_CHOICES = ( + ('active', "Active"), + ('onhold', "On Hold"), + ('dropped', "Dropped"), + ) + + slug = models.SlugField(max_length=255, primary_key=True) + name = models.CharField(max_length=300) + status = models.CharField(max_length=8, choices=STATUS_CHOICES) + tagline = models.CharField(max_length=140, null=True, blank=True) + languages = models.ManyToManyField(Language, null=True, blank=True) + source_url = models.URLField(max_length=255, null=True, blank=True) + bugtracker_url = models.URLField(max_length=255, null=True, blank=True) + wiki_url = models.URLField(max_length=255, null=True, blank=True) + description = models.TextField() + screenshots = models.ForeignKey(Screenshot, null=True, blank=True) +# tags = models.ManyToManyField(Tag, null=True, blank=True) + + def __unicode__(self): + return self.name + +def project_saved_callback(sender, **kwargs): + if kwargs['created']: + acttype = 'add' + else: + acttype = 'edit' + + a = Activity(actcategory='project', + actdescription=kwargs["instance"].name, + acttype = acttype, + objpk = kwargs["instance"].pk) + a.save() + +def project_deleted_callback(sender, **kwargs): + a = Activity(actcategory='project', + actdescription=kwargs["instance"].name, + acttype = 'delete') + a.save() + +post_save.connect(project_saved_callback, sender=Project) +post_delete.connect(project_deleted_callback, sender=Project) diff --git a/projects/urls.py b/projects/urls.py new file mode 100644 index 0000000..053ab5b --- /dev/null +++ b/projects/urls.py @@ -0,0 +1,13 @@ +from django.conf.urls.defaults import * +from projects.models import Project, Language + +project_info_dict = { + 'queryset': Project.objects.all(), +} + +urlpatterns = patterns('', + (r'^$', + 'django.views.generic.list_detail.object_list', + project_info_dict), + (r'^(?P[\w-]+)/$', 'projects.views.project'), +) diff --git a/projects/views.py b/projects/views.py new file mode 100644 index 0000000..ad46ebd --- /dev/null +++ b/projects/views.py @@ -0,0 +1,24 @@ +from django.http import HttpResponse +from django.template import Context, loader +from projects.models import Project + +def project(request, object_id): + project = Project.objects.get(pk=object_id) + stats_dict = { + "Status": project.get_status_display(), + "Languages": ", ".join([language.name for language in project.languages.all()]), + } + links_dict = { + "Source": project.source_url, + "Bugtracker": project.bugtracker_url, + "Wiki": project.wiki_url, + } + + t = loader.get_template("projects/project_detail.html") + c = Context({ + "object": project, + "stats": stats_dict, + "links": links_dict, + }) + + return HttpResponse(t.render(c)) diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..2ef7e8f --- /dev/null +++ b/settings.py @@ -0,0 +1,91 @@ +# Django settings for website project. +import os, sys +from local_settings import * + +DEPLOY_PATH = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, DEPLOY_PATH) + +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + ('Tom Willemsen', 'ryuslash@gmail.com'), +) + +MANAGERS = ADMINS + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# On Unix systems, a value of None will cause Django to use the same +# timezone as the operating system. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'Europe/Brussels' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale +USE_L10N = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/media/' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', +) + +ROOT_URLCONF = 'urls' + +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. + '%s/templates' % DEPLOY_PATH, +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + # Uncomment the next line to enable the admin: + 'django.contrib.admin', + # Uncomment the next line to enable admin documentation: + # 'django.contrib.admindocs', + 'main', + 'blog', + 'projects', + 'links', +) diff --git a/templates/admin/login.html b/templates/admin/login.html new file mode 100644 index 0000000..eba271f --- /dev/null +++ b/templates/admin/login.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block extrastyle %}{% load adminmedia %}{{ block.super }}{% endblock %} + +{% block bodyclass %}login{% endblock %} + +{% block nav-global %}{% endblock %} + +{% block content_title %}{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} +{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %} +

+{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} +

+{% endif %} + +{% if form.non_field_errors or form.this_is_the_login_form.errors %} +{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} +

+ {{ error }} +

+{% endfor %} +{% endif %} + +
+
{% csrf_token %} +
+ {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %} + {{ form.username }} +
+
+ {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %} + {{ form.password }} + + +
+
+ +
+
+ + +
+{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..e910a76 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,44 @@ + + + + + + ryuslash | {% block subtitle %}linux and coding{% endblock %} + + {% block extrastyle %}{% endblock %} + + +
+ +
+
+ +
+ {% block content %} + {% endblock %} +
+
+
+ +
+ + diff --git a/templates/blog/base.html b/templates/blog/base.html new file mode 100644 index 0000000..2eadc88 --- /dev/null +++ b/templates/blog/base.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block subtitle %} + blog +{% endblock %} diff --git a/templates/blog/posts.html b/templates/blog/posts.html new file mode 100644 index 0000000..d9bc72d --- /dev/null +++ b/templates/blog/posts.html @@ -0,0 +1,42 @@ + + +{% extends "blog/base.html" %} + +{% block content %} + {% if postlist %} + {% for post in postlist %} +
+ + {% autoescape off %} + {{ post.body|linebreaksbr }} + {% endautoescape %} + +
+ {% endfor %} + + + {% else %} + Yeah I know, I'm boring. + {% endif %} +{% endblock %} diff --git a/templates/blog/tags.html b/templates/blog/tags.html new file mode 100644 index 0000000..a180634 --- /dev/null +++ b/templates/blog/tags.html @@ -0,0 +1,19 @@ + + +{% extends "blog/base.html" %} + +{% block subtitle %} + blog/tags +{% endblock %} + +{% block content %} +
    + {% for tag in taglist %} +
  • + {{ tag.name }} +
  • + {% empty %} + Sorry, no tags here. + {% endfor %} +
+{% endblock %} diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..a34a0d8 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,88 @@ +{% extends "base.html" %} + +{% block content %} + This will, hopefully, eventually, become my website. + Rejoice! +

+ Some places you can already find me: +

    +
  • + Gitorious + - This is where I host most of my projects. +
  • +
  • + Github + - Sometimes I host projects here as well, but I prefer + Gitorious. +
  • +
  • + Stack Overflow + - Don't really do much there, but I did just get my + first reputation points. +
    + + profile for slash at Stack Overflow, Q&A
+                    for professional and enthusiast
+                    programmers + +
  • +
+

+ + {% for activity in activitylist %} + + {% endfor %} +{% endblock %} diff --git a/templates/links/links.html b/templates/links/links.html new file mode 100644 index 0000000..b911d80 --- /dev/null +++ b/templates/links/links.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block subtitle %} + links +{% endblock %} + +{% block content %} +
+
+ links +
+ {% if bookmarklist %} + {% for link in bookmarklist %} + {{ link.name }}
+ {% endfor %} + {% else %} + No links, no where... + {% endif %} +
+{% endblock %} diff --git a/templates/projects/base.html b/templates/projects/base.html new file mode 100644 index 0000000..d3654cc --- /dev/null +++ b/templates/projects/base.html @@ -0,0 +1,3 @@ + + +{% extends "base.html" %} diff --git a/templates/projects/project_detail.html b/templates/projects/project_detail.html new file mode 100644 index 0000000..1c19f4f --- /dev/null +++ b/templates/projects/project_detail.html @@ -0,0 +1,52 @@ + + +{% extends "projects/base.html" %} + +{% block subtitle %} + projects/{{ object.name }} +{% endblock %} + +{% block content %} +
+
+ {{ object.name }} + {{ object.tagline }} +
+ + +

+ {% autoescape off %} + {{ object.description|linebreaksbr }} + {% endautoescape %} +

+
+ +
+
+ Stats +
+ {% for key, value in stats.items %} + {% if value %} + {{ key }}: {{ value }}
+ {% endif %} + {% endfor %} +
+ +
+
+ Links +
+ {% for key, value in links.items %} + {% if value %} + {{ key }}
+ {% endif %} + {% endfor %} +
+ + {% if object.screenshots %} +

+ Screenshots here +

+ {% endif %} + +{% endblock %} diff --git a/templates/projects/project_list.html b/templates/projects/project_list.html new file mode 100644 index 0000000..1ab750c --- /dev/null +++ b/templates/projects/project_list.html @@ -0,0 +1,20 @@ + + +{% extends "projects/base.html" %} + +{% block subtitle %} + projects +{% endblock %} + +{% block content %} + {% if object_list %} +
+ {% for project in object_list %} +
{{ project.name }}
+
{{ project.tagline }}
+ {% endfor %} +
+ {% else %} + Well, you know me, I'm lazy. Got nothing going on. + {% endif %} +{% endblock %} diff --git a/urls.py b/urls.py new file mode 100644 index 0000000..1c46129 --- /dev/null +++ b/urls.py @@ -0,0 +1,19 @@ +from django.conf.urls.defaults import * +from settings import DEPLOY_PATH, DEBUG + +# Uncomment the next two lines to enable the admin: +from django.contrib import admin +admin.autodiscover() + +urlpatterns = patterns('', + (r'^blog/', include("blog.urls")), + (r'^projects/', include("projects.urls")), + (r'^links/', include("links.urls")), + (r'^admin/', include(admin.site.urls)), + (r'^', include("main.urls")), +) + +if DEBUG: + urlpatterns += patterns('', + (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': '%s/static' % DEPLOY_PATH}) +) -- cgit v1.2.3-54-g00ecf From 825d57a222b068d73fe85ad89e3f141b08b27f28 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 17 Oct 2011 02:12:10 +0200 Subject: Add static files --- .gitignore | 1 - static/css/login.css | 13 ++++ static/css/main.css | 200 ++++++++++++++++++++++++++++++++++++++++++++++++ static/img/logo.png | Bin 0 -> 15931 bytes static/img/logo_big.png | Bin 0 -> 71796 bytes 5 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 static/css/login.css create mode 100644 static/css/main.css create mode 100644 static/img/logo.png create mode 100644 static/img/logo_big.png diff --git a/.gitignore b/.gitignore index db82c7d..04e93be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ *.pyc local_settings.py -static .toudou test.db diff --git a/static/css/login.css b/static/css/login.css new file mode 100644 index 0000000..a9ab3ed --- /dev/null +++ b/static/css/login.css @@ -0,0 +1,13 @@ +.form-row label { + float: left; + width: 9em; +} + +p.errornote { + margin: 0; + color: #CC0000; +} + +.errorlist { + color: #CC0000; +} diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..1dc5183 --- /dev/null +++ b/static/css/main.css @@ -0,0 +1,200 @@ +* { + border : 0; + margin : 0; + padding : 0; +} + +a { + color : #FFC000; + text-decoration : none; +} + +a:hover { + text-decoration : underline; +} + +a:visited { + color : #FF8A00; +} + +body { + background-color : #000000; + color : #000000; + font-family : sans, sans-serif; + padding-left : 10px; +} + +dd { + margin-left: 40px; +} + +p { + margin : 1em 0px; +} + +ul { + margin : 1em 0; + padding-left : 40px; +} + +#body { + background-color : #777; +} + +#container { + margin : 20px auto; + width : 700px; +} + +#container #footer { + background-color : #0C191C; + color : #EEEEEC; + font-size : 10px; + padding-left : 5px; +} + +#container #header { + border-top-left-radius : 30px; + border-top-right-radius : 30px; + -moz-border-radius-topleft : 30px; + -moz-border-radius-topright : 30px; +} + +#content { + margin-left : 100px; + padding-bottom : 1px; + padding-left : 20px; + padding-right : 20px; +} + +#content .container { + color : #EEEEEC; +} + +#content .container .header { + background-color : transparent; + padding-bottom : 5px; + padding-left : 0; + padding-top : 5px; +} + +#content .container .header a { + color : inherit; + text-decoration : none; +} + +#content .container .header span.tagline { + color: #EEEEEC; + font-size: 12px; +} + +#content .container .header span.title { + background-color : #2E3436; + left : -5px; + padding : 5px; + position : relative; + top : -5px; +} + +#header { + background-color : #252A2B; +} + +#logo { + float : left; + height : 100px; + margin : -13px 20px 23px 5px; + width : 100px; +} + +#ryu { + color : #F57900; +} + +#slash { + position: relative; + top: 5px; +} + +#menu { + margin-left : -5px; + float : left; + width : 100px; +} + +#menu a { + color : #FFC000; + text-decoration : none; +} + +#title { + color : #EEEEEC; + height : 100px; + line-height : 100px; +} + +#title sup { + font-size : 11px; + position : relative; + top : 5px; +} + +.activity_even { + background-color : #2E3436; +} + +.activity_even, .activity_uneven { + border-bottom : 1px solid #444444; + color : #EEEEEC; + font-size : 12px; + margin: 0 20px; + padding : 2px 0 2px 5px; +} + +.activity_last { + border-bottom : none; +} + +.activity_uneven { + background-color : #0C191C; +} + +.container { + background-color : #0C191C; + border : 1px solid #2E3436; + margin-bottom : 20px; + padding : 2px 5px; + padding-left : 10px; +} + +.clear { + clear : both; +} + +.clearleft { + clear : left; +} + +.container .header { + background-color : #2E3436; + color : #F57900; + font-weight : bold; + margin : -2px -5px 0 -10px; + padding-left : 5px; +} + +.container .footer { + background-color : #2E3436; + color : #0C191C; + font-size : 10px; + margin : 0 -5px -2px -10px; + padding-left : 5px; +} + +.navigation a { + color : #FFC000; +} + +.navigation a.next { + float : right; +} diff --git a/static/img/logo.png b/static/img/logo.png new file mode 100644 index 0000000..a451578 Binary files /dev/null and b/static/img/logo.png differ diff --git a/static/img/logo_big.png b/static/img/logo_big.png new file mode 100644 index 0000000..d6ac0d9 Binary files /dev/null and b/static/img/logo_big.png differ -- cgit v1.2.3-54-g00ecf From 62cc00f06250478a40cf75439a33f871c6e85057 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 17 Oct 2011 02:29:21 +0200 Subject: Update home page --- templates/home.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/home.html b/templates/home.html index a34a0d8..e5c2fed 100644 --- a/templates/home.html +++ b/templates/home.html @@ -7,13 +7,12 @@ Some places you can already find me:
  • - Gitorious - - This is where I host most of my projects. + Diaspora* - I'm here + all the time.
  • - Github - - Sometimes I host projects here as well, but I prefer - Gitorious. + Identi.ca - Don't post + much, but I'm usually there.
  • Stack Overflow -- cgit v1.2.3-54-g00ecf From d7f99435105fd28e730427c0e494c9607d3803a3 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Mon, 17 Oct 2011 02:57:42 +0200 Subject: Removed links module --- links/__init__.py | 0 links/admin.py | 4 ---- links/models.py | 35 ----------------------------------- links/tests.py | 16 ---------------- links/urls.py | 5 ----- links/views.py | 12 ------------ settings.py | 1 - templates/base.html | 1 - templates/links/links.html | 20 -------------------- urls.py | 1 - 10 files changed, 95 deletions(-) delete mode 100644 links/__init__.py delete mode 100644 links/admin.py delete mode 100644 links/models.py delete mode 100644 links/tests.py delete mode 100644 links/urls.py delete mode 100644 links/views.py delete mode 100644 templates/links/links.html diff --git a/links/__init__.py b/links/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/links/admin.py b/links/admin.py deleted file mode 100644 index 29b8674..0000000 --- a/links/admin.py +++ /dev/null @@ -1,4 +0,0 @@ -from links.models import Bookmark -from django.contrib import admin - -admin.site.register(Bookmark) diff --git a/links/models.py b/links/models.py deleted file mode 100644 index 50319a2..0000000 --- a/links/models.py +++ /dev/null @@ -1,35 +0,0 @@ -from django.db import models -from main.models import Tag, Activity -from django.db.models.signals import post_save, post_delete - -class Bookmark(models.Model): - url = models.URLField(primary_key=True, max_length=255) - date = models.DateTimeField(auto_now_add=True) - name = models.CharField(max_length=255) - description = models.TextField() -# tags = models.ManyToManyField(Tag, null=True, blank=True) - priority = models.IntegerField(null=True, blank=True) - - def __unicode__(self): - return self.name - -def bookmark_saved_callback(sender, **kwargs): - if kwargs['created']: - acttype = 'add' - else: - acttype = 'edit' - - a = Activity(actcategory='link', - actdescription=kwargs["instance"].name, - acttype = acttype, - objpk = kwargs["instance"].pk) - a.save() - -def bookmark_deleted_callback(sender, **kwargs): - a = Activity(actcategory='link', - actdescription=kwargs["instance"].name, - acttype = 'delete') - a.save() - -post_save.connect(bookmark_saved_callback, sender=Bookmark) -post_delete.connect(bookmark_deleted_callback, sender=Bookmark) diff --git a/links/tests.py b/links/tests.py deleted file mode 100644 index 501deb7..0000000 --- a/links/tests.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -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) diff --git a/links/urls.py b/links/urls.py deleted file mode 100644 index 25d8cc8..0000000 --- a/links/urls.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.conf.urls.defaults import patterns - -urlpatterns = patterns('links.views', - (r'^$', 'index'), -) diff --git a/links/views.py b/links/views.py deleted file mode 100644 index fe0d89d..0000000 --- a/links/views.py +++ /dev/null @@ -1,12 +0,0 @@ -from links.models import Bookmark -from django.http import HttpResponse -from django.template import Context, loader - -def index(request): - bookmark_list = Bookmark.objects.all().order_by("-date")[:100] - t = loader.get_template("links/links.html") - c = Context({ - 'bookmarklist': bookmark_list, - }) - - return HttpResponse(t.render(c)) diff --git a/settings.py b/settings.py index 2ef7e8f..5a6641e 100644 --- a/settings.py +++ b/settings.py @@ -87,5 +87,4 @@ INSTALLED_APPS = ( 'main', 'blog', 'projects', - 'links', ) diff --git a/templates/base.html b/templates/base.html index e910a76..01ec076 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,6 @@ home
    blog
    projects
    - links {% block submenu %}{% endblock %} diff --git a/templates/links/links.html b/templates/links/links.html deleted file mode 100644 index b911d80..0000000 --- a/templates/links/links.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} - -{% block subtitle %} - links -{% endblock %} - -{% block content %} -
    -
    - links -
    - {% if bookmarklist %} - {% for link in bookmarklist %} - {{ link.name }}
    - {% endfor %} - {% else %} - No links, no where... - {% endif %} -
    -{% endblock %} diff --git a/urls.py b/urls.py index 1c46129..a5e253d 100644 --- a/urls.py +++ b/urls.py @@ -8,7 +8,6 @@ admin.autodiscover() urlpatterns = patterns('', (r'^blog/', include("blog.urls")), (r'^projects/', include("projects.urls")), - (r'^links/', include("links.urls")), (r'^admin/', include(admin.site.urls)), (r'^', include("main.urls")), ) -- cgit v1.2.3-54-g00ecf From e533b3b82e254e2c22ed40a570b5e8b31a1f126b Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 29 Oct 2011 01:37:55 +0200 Subject: First try at an ATOM feed --- blog/urls.py | 1 + blog/views.py | 8 ++++++++ templates/blog/base.html | 14 ++++++++++++++ templates/blog/rss.xml | 25 +++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 templates/blog/rss.xml diff --git a/blog/urls.py b/blog/urls.py index c4137ed..a21c56a 100644 --- a/blog/urls.py +++ b/blog/urls.py @@ -6,4 +6,5 @@ urlpatterns = patterns('blog.views', (r'^post/(?P\d+)/$', 'post'), (r'^tags/$', 'tags'), (r'^tag/(?P[\w_]+)/$', 'tag'), + (r'^atom/$', 'atom'), ) diff --git a/blog/views.py b/blog/views.py index 06a4aba..92ac55e 100644 --- a/blog/views.py +++ b/blog/views.py @@ -27,6 +27,14 @@ def index(request, page=0): return direct_to_template(request, "blog/posts.html", c) +def atom(request): + post_list = Post.objects.all().order_by("-postdate")[0:15] + c = { + 'postlist': post_list, + } + + return direct_to_template(request, "blog/rss.xml", c) + def post(request, post_id): post = Post.objects.filter(pk=post_id) t = loader.get_template("blog/posts.html") diff --git a/templates/blog/base.html b/templates/blog/base.html index 2eadc88..e5caf88 100644 --- a/templates/blog/base.html +++ b/templates/blog/base.html @@ -3,3 +3,17 @@ {% block subtitle %} blog {% endblock %} + +{% block extrastyle %} + +{% endblock %} + +{% block submenu %} +
    +
    + blog +
    + feed +
    +{% endblock %} diff --git a/templates/blog/rss.xml b/templates/blog/rss.xml new file mode 100644 index 0000000..9cc6df3 --- /dev/null +++ b/templates/blog/rss.xml @@ -0,0 +1,25 @@ + + + ryuslash.org + + + http://ryuslash.org/blog/ + + Tom Willemsen + + 2011-10-29T23:16:00+01:00 + + {% for post in postlist %} + + {{ post.subject }} + + http://ryuslash.org/blog/post/{{ post.pk }}/ + {{ post.postdate|date:"c" }} + +
    + {{ post.body|linebreaksbr }} +
    +
    +
    + {% endfor %} +
    -- cgit v1.2.3-54-g00ecf From 3ec79710ca046b2c172eb77679eb5e2983460a1a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 4 Nov 2011 22:10:49 +0100 Subject: Render html pages in templates/html_pages --- pages/__init__.py | 0 pages/models.py | 3 +++ pages/urls.py | 5 +++++ pages/views.py | 18 ++++++++++++++++++ templates/pages/index.html | 5 +++++ urls.py | 4 ++++ 6 files changed, 35 insertions(+) create mode 100644 pages/__init__.py create mode 100644 pages/models.py create mode 100644 pages/urls.py create mode 100644 pages/views.py create mode 100644 templates/pages/index.html diff --git a/pages/__init__.py b/pages/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/models.py b/pages/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/pages/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/pages/urls.py b/pages/urls.py new file mode 100644 index 0000000..1c0cf82 --- /dev/null +++ b/pages/urls.py @@ -0,0 +1,5 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('pages.views', + (r'^(?P.+)/$', 'index'), +) diff --git a/pages/views.py b/pages/views.py new file mode 100644 index 0000000..2f902a6 --- /dev/null +++ b/pages/views.py @@ -0,0 +1,18 @@ +import os.path + +from django.http import Http404 +from django.views.generic.simple import direct_to_template + +from settings import DEPLOY_PATH + +def index(request, page): + + template = 'html_pages/%s/index.html' % page + if not os.path.exists('%s/templates/%s' % (DEPLOY_PATH, template): + raise Http404 + + c = { + "page": template, + } + + return direct_to_template(request, "pages/index.html", c) diff --git a/templates/pages/index.html b/templates/pages/index.html new file mode 100644 index 0000000..18988f9 --- /dev/null +++ b/templates/pages/index.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +{% include page %} +{% endblock %} diff --git a/urls.py b/urls.py index a5e253d..3b24bf7 100644 --- a/urls.py +++ b/urls.py @@ -15,4 +15,8 @@ urlpatterns = patterns('', if DEBUG: urlpatterns += patterns('', (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': '%s/static' % DEPLOY_PATH}) + ) + +urlpatterns += patterns('', + (r'^', include("pages.urls")) ) -- cgit v1.2.3-54-g00ecf From 7e3102b7603142078578b0b8dd1690a24e4d7bcd Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 00:29:30 +0100 Subject: Fix syntax errors --- pages/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/views.py b/pages/views.py index 2f902a6..7a44701 100644 --- a/pages/views.py +++ b/pages/views.py @@ -8,7 +8,7 @@ from settings import DEPLOY_PATH def index(request, page): template = 'html_pages/%s/index.html' % page - if not os.path.exists('%s/templates/%s' % (DEPLOY_PATH, template): + if not os.path.exists('%s/templates/%s' % (DEPLOY_PATH, template)): raise Http404 c = { -- cgit v1.2.3-54-g00ecf From 3ae51caab712c4c60072f01cd8ce2e09c28300be Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 00:31:22 +0100 Subject: Add pages to installed apps --- settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/settings.py b/settings.py index 5a6641e..50e4d11 100644 --- a/settings.py +++ b/settings.py @@ -87,4 +87,5 @@ INSTALLED_APPS = ( 'main', 'blog', 'projects', + 'pages', ) -- cgit v1.2.3-54-g00ecf From fc51d7160df5ce97bfeba64a5af8efe2962223dd Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 00:33:33 +0100 Subject: Add parse_markdown command --- local_settings.py.example | 1 + pages/management/__init__.py | 0 pages/management/commands/__init__.py | 0 pages/management/commands/parse_markdown.py | 31 +++++++++++++++++++++++++++++ templates/.gitignore | 1 + 5 files changed, 33 insertions(+) create mode 100644 pages/management/__init__.py create mode 100644 pages/management/commands/__init__.py create mode 100644 pages/management/commands/parse_markdown.py create mode 100644 templates/.gitignore diff --git a/local_settings.py.example b/local_settings.py.example index 6a166a7..fe6c1aa 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -1,4 +1,5 @@ DEBUG = False +MARKDOWN_PATH = '' DATABASES = { 'default': { diff --git a/pages/management/__init__.py b/pages/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/management/commands/__init__.py b/pages/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py new file mode 100644 index 0000000..8c193df --- /dev/null +++ b/pages/management/commands/parse_markdown.py @@ -0,0 +1,31 @@ +import os +import markdown + +from django.core.management.base import BaseCommand, CommandError + +from settings import MARKDOWN_PATH, DEPLOY_PATH + +class Command(BaseCommand): + help = 'Parse markdown files in %s' % MARKDOWN_PATH + + def handle(self, *args, **options): + for root, dirs, files in os.walk(MARKDOWN_PATH): + for file in files: + subdir = root.replace(MARKDOWN_PATH, "") + mdfile = '%s/%s' % (root, file) + mdname = '%s/%s' % (subdir, os.path.splitext(file)[0]) + htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) + htmlfile = '%s/index.html' % htmlpath + + if os.path.exists(mdfile) and not os.path.exists(htmlfile) \ + or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile): + + if not os.path.exists(htmlpath): + os.makedirs(htmlpath) + + md = markdown.Markdown() + print 'Converting ', mdname, '-->', htmlfile, + wikiExtension = 'wikilinks(base_url=%s/)' % subdir + markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", extensions=[wikiExtension]) + print ' ... succeeded' + diff --git a/templates/.gitignore b/templates/.gitignore new file mode 100644 index 0000000..c46f106 --- /dev/null +++ b/templates/.gitignore @@ -0,0 +1 @@ +html_pages -- cgit v1.2.3-54-g00ecf From f426a2f8efd7b91219e28514976a11ec55e4bf28 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 02:17:51 +0100 Subject: Only parse mdwn files --- pages/management/commands/parse_markdown.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 8c193df..105b004 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -13,11 +13,13 @@ class Command(BaseCommand): for file in files: subdir = root.replace(MARKDOWN_PATH, "") mdfile = '%s/%s' % (root, file) - mdname = '%s/%s' % (subdir, os.path.splitext(file)[0]) + mdtuple = os.path.splitext(file) + mdname = '%s/%s' % (subdir, mdtuple[0]) htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) htmlfile = '%s/index.html' % htmlpath - if os.path.exists(mdfile) and not os.path.exists(htmlfile) \ + if mdtuple[1] == '.mdwn' \ + and os.path.exists(mdfile) and not os.path.exists(htmlfile) \ or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile): if not os.path.exists(htmlpath): @@ -26,6 +28,8 @@ class Command(BaseCommand): md = markdown.Markdown() print 'Converting ', mdname, '-->', htmlfile, wikiExtension = 'wikilinks(base_url=%s/)' % subdir - markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", extensions=[wikiExtension]) + markdown.markdownFromFile(input=mdfile, output=htmlfile, + encoding="utf-8", + extensions=[wikiExtension]) print ' ... succeeded' -- cgit v1.2.3-54-g00ecf From 186d47fe849e03766427557a14ea1cd44c2c5623 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 02:23:26 +0100 Subject: Only check time if it exists --- pages/management/commands/parse_markdown.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 105b004..500087a 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -18,9 +18,9 @@ class Command(BaseCommand): htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) htmlfile = '%s/index.html' % htmlpath - if mdtuple[1] == '.mdwn' \ - and os.path.exists(mdfile) and not os.path.exists(htmlfile) \ - or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile): + if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ + and (not os.path.exists(htmlfile) \ + or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): if not os.path.exists(htmlpath): os.makedirs(htmlpath) @@ -28,8 +28,7 @@ class Command(BaseCommand): md = markdown.Markdown() print 'Converting ', mdname, '-->', htmlfile, wikiExtension = 'wikilinks(base_url=%s/)' % subdir - markdown.markdownFromFile(input=mdfile, output=htmlfile, - encoding="utf-8", + markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", extensions=[wikiExtension]) print ' ... succeeded' -- cgit v1.2.3-54-g00ecf From 0e14ef7f7c336d138c31a83845039cbea8dce4af Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 02:50:21 +0100 Subject: Add some verbosity --- pages/management/commands/parse_markdown.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 500087a..38fc7ea 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -18,6 +18,13 @@ class Command(BaseCommand): htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) htmlfile = '%s/index.html' % htmlpath + if options['verbosity'] == '3': + print 'Subdir: ', subdir + print 'Mdfile: ', mdfile + print 'Mdtuple: ', mdtuple + print 'Htmlpath: ', htmlpath + print 'Htmlfile: ', htmlfile + if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ and (not os.path.exists(htmlfile) \ or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): -- cgit v1.2.3-54-g00ecf From 528737be805c61ee3ccda767c98920ec5e14f928 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 03:50:48 +0100 Subject: Skip .git dir --- pages/management/commands/parse_markdown.py | 59 +++++++++++++++-------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 38fc7ea..4b2e774 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -5,37 +5,40 @@ from django.core.management.base import BaseCommand, CommandError from settings import MARKDOWN_PATH, DEPLOY_PATH +ignore_dir = '.git' + class Command(BaseCommand): help = 'Parse markdown files in %s' % MARKDOWN_PATH def handle(self, *args, **options): for root, dirs, files in os.walk(MARKDOWN_PATH): - for file in files: - subdir = root.replace(MARKDOWN_PATH, "") - mdfile = '%s/%s' % (root, file) - mdtuple = os.path.splitext(file) - mdname = '%s/%s' % (subdir, mdtuple[0]) - htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) - htmlfile = '%s/index.html' % htmlpath - - if options['verbosity'] == '3': - print 'Subdir: ', subdir - print 'Mdfile: ', mdfile - print 'Mdtuple: ', mdtuple - print 'Htmlpath: ', htmlpath - print 'Htmlfile: ', htmlfile - - if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ - and (not os.path.exists(htmlfile) \ - or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): - - if not os.path.exists(htmlpath): - os.makedirs(htmlpath) - - md = markdown.Markdown() - print 'Converting ', mdname, '-->', htmlfile, - wikiExtension = 'wikilinks(base_url=%s/)' % subdir - markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", - extensions=[wikiExtension]) - print ' ... succeeded' + if ignore_dir not in root: + for file in files: + subdir = root.replace(MARKDOWN_PATH, "") + mdfile = '%s/%s' % (root, file) + mdtuple = os.path.splitext(file) + mdname = '%s/%s' % (subdir, mdtuple[0]) + htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) + htmlfile = '%s/index.html' % htmlpath + + if options['verbosity'] == '3': + print 'Subdir: ', subdir + print 'Mdfile: ', mdfile + print 'Mdtuple: ', mdtuple + print 'Htmlpath: ', htmlpath + print 'Htmlfile: ', htmlfile + + if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ + and (not os.path.exists(htmlfile) \ + or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): + + if not os.path.exists(htmlpath): + os.makedirs(htmlpath) + + md = markdown.Markdown() + print 'Converting ', mdname, '-->', htmlfile, + wikiExtension = 'wikilinks(base_url=%s/)' % subdir + markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", + extensions=[wikiExtension]) + print ' ... succeeded' -- cgit v1.2.3-54-g00ecf From 39f711d813c0300ca523d2726e5fd34496d0df08 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 13:06:58 +0100 Subject: Don't ignore any directories after all --- pages/management/commands/parse_markdown.py | 59 ++++++++++++++--------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 4b2e774..38fc7ea 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -5,40 +5,37 @@ from django.core.management.base import BaseCommand, CommandError from settings import MARKDOWN_PATH, DEPLOY_PATH -ignore_dir = '.git' - class Command(BaseCommand): help = 'Parse markdown files in %s' % MARKDOWN_PATH def handle(self, *args, **options): for root, dirs, files in os.walk(MARKDOWN_PATH): - if ignore_dir not in root: - for file in files: - subdir = root.replace(MARKDOWN_PATH, "") - mdfile = '%s/%s' % (root, file) - mdtuple = os.path.splitext(file) - mdname = '%s/%s' % (subdir, mdtuple[0]) - htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) - htmlfile = '%s/index.html' % htmlpath - - if options['verbosity'] == '3': - print 'Subdir: ', subdir - print 'Mdfile: ', mdfile - print 'Mdtuple: ', mdtuple - print 'Htmlpath: ', htmlpath - print 'Htmlfile: ', htmlfile - - if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ - and (not os.path.exists(htmlfile) \ - or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): - - if not os.path.exists(htmlpath): - os.makedirs(htmlpath) - - md = markdown.Markdown() - print 'Converting ', mdname, '-->', htmlfile, - wikiExtension = 'wikilinks(base_url=%s/)' % subdir - markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", - extensions=[wikiExtension]) - print ' ... succeeded' + for file in files: + subdir = root.replace(MARKDOWN_PATH, "") + mdfile = '%s/%s' % (root, file) + mdtuple = os.path.splitext(file) + mdname = '%s/%s' % (subdir, mdtuple[0]) + htmlpath = '%s/templates/html_pages/%s' % (DEPLOY_PATH, mdname) + htmlfile = '%s/index.html' % htmlpath + + if options['verbosity'] == '3': + print 'Subdir: ', subdir + print 'Mdfile: ', mdfile + print 'Mdtuple: ', mdtuple + print 'Htmlpath: ', htmlpath + print 'Htmlfile: ', htmlfile + + if mdtuple[1] == '.mdwn' and os.path.exists(mdfile) \ + and (not os.path.exists(htmlfile) \ + or os.path.getmtime(mdfile) > os.path.getmtime(htmlfile)): + + if not os.path.exists(htmlpath): + os.makedirs(htmlpath) + + md = markdown.Markdown() + print 'Converting ', mdname, '-->', htmlfile, + wikiExtension = 'wikilinks(base_url=%s/)' % subdir + markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", + extensions=[wikiExtension]) + print ' ... succeeded' -- cgit v1.2.3-54-g00ecf From 1766db73d97fe0b4e806bfc8e9e68d7400b4c935 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 13:55:14 +0100 Subject: Remove projects, is being handled by html_pages now --- projects/__init__.py | 0 projects/admin.py | 6 ------ projects/models.py | 59 ---------------------------------------------------- projects/urls.py | 13 ------------ projects/views.py | 24 --------------------- settings.py | 1 - templates/base.html | 2 +- urls.py | 1 - 8 files changed, 1 insertion(+), 105 deletions(-) delete mode 100644 projects/__init__.py delete mode 100644 projects/admin.py delete mode 100644 projects/models.py delete mode 100644 projects/urls.py delete mode 100644 projects/views.py diff --git a/projects/__init__.py b/projects/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/projects/admin.py b/projects/admin.py deleted file mode 100644 index b5ec7d4..0000000 --- a/projects/admin.py +++ /dev/null @@ -1,6 +0,0 @@ -from projects.models import Project, Language, Screenshot -from django.contrib import admin - -admin.site.register(Project) -admin.site.register(Language) -admin.site.register(Screenshot) diff --git a/projects/models.py b/projects/models.py deleted file mode 100644 index 4b2b49a..0000000 --- a/projects/models.py +++ /dev/null @@ -1,59 +0,0 @@ -from django.db import models -from main.models import Tag, Activity -from django.db.models.signals import post_save, post_delete - -class Language(models.Model): - name = models.CharField(max_length=100) - - def __unicode__(self): - return self.name - -class Screenshot(models.Model): - url = models.URLField(max_length=255) - description = models.CharField(max_length=300) - - def __unicode__(self): - return self.description - -class Project(models.Model): - STATUS_CHOICES = ( - ('active', "Active"), - ('onhold', "On Hold"), - ('dropped', "Dropped"), - ) - - slug = models.SlugField(max_length=255, primary_key=True) - name = models.CharField(max_length=300) - status = models.CharField(max_length=8, choices=STATUS_CHOICES) - tagline = models.CharField(max_length=140, null=True, blank=True) - languages = models.ManyToManyField(Language, null=True, blank=True) - source_url = models.URLField(max_length=255, null=True, blank=True) - bugtracker_url = models.URLField(max_length=255, null=True, blank=True) - wiki_url = models.URLField(max_length=255, null=True, blank=True) - description = models.TextField() - screenshots = models.ForeignKey(Screenshot, null=True, blank=True) -# tags = models.ManyToManyField(Tag, null=True, blank=True) - - def __unicode__(self): - return self.name - -def project_saved_callback(sender, **kwargs): - if kwargs['created']: - acttype = 'add' - else: - acttype = 'edit' - - a = Activity(actcategory='project', - actdescription=kwargs["instance"].name, - acttype = acttype, - objpk = kwargs["instance"].pk) - a.save() - -def project_deleted_callback(sender, **kwargs): - a = Activity(actcategory='project', - actdescription=kwargs["instance"].name, - acttype = 'delete') - a.save() - -post_save.connect(project_saved_callback, sender=Project) -post_delete.connect(project_deleted_callback, sender=Project) diff --git a/projects/urls.py b/projects/urls.py deleted file mode 100644 index 053ab5b..0000000 --- a/projects/urls.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.conf.urls.defaults import * -from projects.models import Project, Language - -project_info_dict = { - 'queryset': Project.objects.all(), -} - -urlpatterns = patterns('', - (r'^$', - 'django.views.generic.list_detail.object_list', - project_info_dict), - (r'^(?P[\w-]+)/$', 'projects.views.project'), -) diff --git a/projects/views.py b/projects/views.py deleted file mode 100644 index ad46ebd..0000000 --- a/projects/views.py +++ /dev/null @@ -1,24 +0,0 @@ -from django.http import HttpResponse -from django.template import Context, loader -from projects.models import Project - -def project(request, object_id): - project = Project.objects.get(pk=object_id) - stats_dict = { - "Status": project.get_status_display(), - "Languages": ", ".join([language.name for language in project.languages.all()]), - } - links_dict = { - "Source": project.source_url, - "Bugtracker": project.bugtracker_url, - "Wiki": project.wiki_url, - } - - t = loader.get_template("projects/project_detail.html") - c = Context({ - "object": project, - "stats": stats_dict, - "links": links_dict, - }) - - return HttpResponse(t.render(c)) diff --git a/settings.py b/settings.py index 50e4d11..f19b8e3 100644 --- a/settings.py +++ b/settings.py @@ -86,6 +86,5 @@ INSTALLED_APPS = ( # 'django.contrib.admindocs', 'main', 'blog', - 'projects', 'pages', ) diff --git a/templates/base.html b/templates/base.html index 01ec076..3c15623 100644 --- a/templates/base.html +++ b/templates/base.html @@ -24,7 +24,7 @@ home
    blog
    - projects
    + projects
    {% block submenu %}{% endblock %} diff --git a/urls.py b/urls.py index 3b24bf7..26aa007 100644 --- a/urls.py +++ b/urls.py @@ -7,7 +7,6 @@ admin.autodiscover() urlpatterns = patterns('', (r'^blog/', include("blog.urls")), - (r'^projects/', include("projects.urls")), (r'^admin/', include(admin.site.urls)), (r'^', include("main.urls")), ) -- cgit v1.2.3-54-g00ecf From cee353fd4118e330c903fc4482a5c460aacbe65a Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 14:58:57 +0100 Subject: Add def_list extension --- pages/management/commands/parse_markdown.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/management/commands/parse_markdown.py b/pages/management/commands/parse_markdown.py index 38fc7ea..23ad2ec 100644 --- a/pages/management/commands/parse_markdown.py +++ b/pages/management/commands/parse_markdown.py @@ -34,8 +34,9 @@ class Command(BaseCommand): md = markdown.Markdown() print 'Converting ', mdname, '-->', htmlfile, - wikiExtension = 'wikilinks(base_url=%s/)' % subdir + wikilinks = 'wikilinks(base_url=%s/)' % subdir + def_list = 'def_list' markdown.markdownFromFile(input=mdfile, output=htmlfile, encoding="utf-8", - extensions=[wikiExtension]) + extensions=[wikilinks, def_list]) print ' ... succeeded' -- cgit v1.2.3-54-g00ecf From 9c5a7e1198f98eaf9240779b945e2192eaa66f9d Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 5 Nov 2011 16:37:37 +0100 Subject: Style updates for markdown --- static/css/main.css | 4 ++++ templates/pages/index.html | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/static/css/main.css b/static/css/main.css index 1dc5183..96869c0 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -191,6 +191,10 @@ ul { padding-left : 5px; } +.markdown h3 { + margin: 1em 0; +} + .navigation a { color : #FFC000; } diff --git a/templates/pages/index.html b/templates/pages/index.html index 18988f9..0f295e7 100644 --- a/templates/pages/index.html +++ b/templates/pages/index.html @@ -1,5 +1,8 @@ {% extends "base.html" %} {% block content %} -{% include page %} +
    + {% include page %} +
    +
    {% endblock %} -- cgit v1.2.3-54-g00ecf From 322a7fb204ac4c9d7b034a6a7d6e45eaf24706c6 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 9 Dec 2011 13:01:16 +0100 Subject: Show hacker emblem --- static/css/main.css | 4 ++++ static/img/hacker.png | Bin 0 -> 399 bytes templates/base.html | 52 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 static/img/hacker.png diff --git a/static/css/main.css b/static/css/main.css index 96869c0..17453e2 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -191,6 +191,10 @@ ul { padding-left : 5px; } +.emblems { + text-align: right; +} + .markdown h3 { margin: 1em 0; } diff --git a/static/img/hacker.png b/static/img/hacker.png new file mode 100644 index 0000000..5a2e185 Binary files /dev/null and b/static/img/hacker.png differ diff --git a/templates/base.html b/templates/base.html index 3c15623..6c451a8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,33 +10,43 @@
    +
    -
    - + + +
    -- cgit v1.2.3-54-g00ecf From ee74f485af6e6c1821b990635921804d98fedb86 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 9 Dec 2011 16:59:24 +0100 Subject: Update layout --- static/css/main.css | 41 +++++++++++++++++++++++------------------ templates/base.html | 33 +++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index 17453e2..cb37520 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -20,8 +20,7 @@ a:visited { body { background-color : #000000; color : #000000; - font-family : sans, sans-serif; - padding-left : 10px; + font-family : "DejaVu Sans", sans, sans-serif; } dd { @@ -42,7 +41,7 @@ ul { } #container { - margin : 20px auto; + margin : 0 auto 0 auto; width : 700px; } @@ -50,21 +49,14 @@ ul { background-color : #0C191C; color : #EEEEEC; font-size : 10px; - padding-left : 5px; -} - -#container #header { - border-top-left-radius : 30px; - border-top-right-radius : 30px; - -moz-border-radius-topleft : 30px; - -moz-border-radius-topright : 30px; + padding : 5px; + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; } #content { margin-left : 100px; - padding-bottom : 1px; - padding-left : 20px; - padding-right : 20px; + padding: 5px 20px 1px 20px; } #content .container { @@ -100,26 +92,37 @@ ul { background-color : #252A2B; } +#subheader { + background-color: #0c181b; + color: #fff; + text-align: right; + font-size: 12px; + padding: 5px; +} + #logo { float : left; height : 100px; - margin : -13px 20px 23px 5px; + margin : 0 20px 23px 0; width : 100px; } #ryu { color : #F57900; + position: relative; + top: -3px; } #slash { position: relative; - top: 5px; + top: 3px; } #menu { margin-left : -5px; float : left; width : 100px; + clear: left; } #menu a { @@ -129,8 +132,8 @@ ul { #title { color : #EEEEEC; - height : 100px; - line-height : 100px; + height : 50px; + line-height : 50px; } #title sup { @@ -193,6 +196,8 @@ ul { .emblems { text-align: right; + float: right; + margin-top: -2px; } .markdown h3 { diff --git a/templates/base.html b/templates/base.html index 6c451a8..9222fb2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,16 +8,20 @@ {% block extrastyle %}{% endblock %} -
    - + + +
    + This might just be my website. +
    +
    -
    + -- cgit v1.2.3-54-g00ecf From 1bd58d39d968f8eee13ef076a2a5c78f60eb92de Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 9 Dec 2011 17:02:41 +0100 Subject: Show django emblem --- static/img/django.gif | Bin 0 -> 962 bytes templates/base.html | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 static/img/django.gif diff --git a/static/img/django.gif b/static/img/django.gif new file mode 100644 index 0000000..a0548a6 Binary files /dev/null and b/static/img/django.gif differ diff --git a/templates/base.html b/templates/base.html index 9222fb2..c90a588 100644 --- a/templates/base.html +++ b/templates/base.html @@ -47,6 +47,10 @@ Created by Tom Willemsen
    + + django emblem + + hacker emblem -- cgit v1.2.3-54-g00ecf From 60b436532e5857d3e1ff79a9ba64942085906d79 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 9 Dec 2011 17:10:44 +0100 Subject: Style/whitespace changes --- static/css/login.css | 2 +- static/css/main.css | 178 +++++++++++++++++++++++++-------------------------- templates/base.html | 7 +- 3 files changed, 93 insertions(+), 94 deletions(-) diff --git a/static/css/login.css b/static/css/login.css index a9ab3ed..4b4dd1d 100644 --- a/static/css/login.css +++ b/static/css/login.css @@ -5,7 +5,7 @@ p.errornote { margin: 0; - color: #CC0000; + color: #CC0000; } .errorlist { diff --git a/static/css/main.css b/static/css/main.css index cb37520..8ca8ab3 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,26 +1,26 @@ * { - border : 0; - margin : 0; - padding : 0; + border: 0; + margin: 0; + padding: 0; } a { - color : #FFC000; - text-decoration : none; + color: #FFC000; + text-decoration: none; } a:hover { - text-decoration : underline; + text-decoration: underline; } a:visited { - color : #FF8A00; + color: #FF8A00; } body { - background-color : #000000; - color : #000000; - font-family : "DejaVu Sans", sans, sans-serif; + background-color: #000000; + color: #000000; + font-family: "DejaVu Sans", sans, sans-serif; } dd { @@ -28,175 +28,175 @@ dd { } p { - margin : 1em 0px; + margin: 1em 0px; } ul { - margin : 1em 0; - padding-left : 40px; + margin: 1em 0; + padding-left: 40px; } #body { - background-color : #777; + background-color: #777; } #container { - margin : 0 auto 0 auto; - width : 700px; + margin: 0 auto 0 auto; + width: 700px; } #container #footer { - background-color : #0C191C; - color : #EEEEEC; - font-size : 10px; - padding : 5px; - border-bottom-left-radius: 5px; + background-color: #0C191C; + color: #EEEEEC; + font-size: 10px; + padding: 5px; + border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } #content { - margin-left : 100px; - padding: 5px 20px 1px 20px; + margin-left: 100px; + padding: 5px 20px 1px 20px; } #content .container { - color : #EEEEEC; + color: #EEEEEC; } #content .container .header { - background-color : transparent; - padding-bottom : 5px; - padding-left : 0; - padding-top : 5px; + background-color: transparent; + padding-bottom: 5px; + padding-left: 0; + padding-top: 5px; } #content .container .header a { - color : inherit; - text-decoration : none; + color: inherit; + text-decoration: none; } #content .container .header span.tagline { - color: #EEEEEC; + color: #EEEEEC; font-size: 12px; } #content .container .header span.title { - background-color : #2E3436; - left : -5px; - padding : 5px; - position : relative; - top : -5px; + background-color: #2E3436; + left: -5px; + padding: 5px; + position: relative; + top: -5px; } #header { - background-color : #252A2B; + background-color: #252A2B; } #subheader { background-color: #0c181b; - color: #fff; - text-align: right; - font-size: 12px; - padding: 5px; + color: #fff; + text-align: right; + font-size: 12px; + padding: 5px; } #logo { - float : left; - height : 100px; - margin : 0 20px 23px 0; - width : 100px; + float: left; + height: 100px; + margin: 0 20px 23px 0; + width: 100px; } #ryu { - color : #F57900; + color: #F57900; position: relative; - top: -3px; + top: -3px; } #slash { - position: relative; - top: 3px; + position: relative; + top: 3px; } #menu { - margin-left : -5px; - float : left; - width : 100px; - clear: left; + margin-left: -5px; + float: left; + width: 100px; + clear: left; } #menu a { - color : #FFC000; - text-decoration : none; + color: #FFC000; + text-decoration: none; } #title { - color : #EEEEEC; - height : 50px; - line-height : 50px; + color: #EEEEEC; + height: 50px; + line-height: 50px; } #title sup { - font-size : 11px; - position : relative; - top : 5px; + font-size: 11px; + position: relative; + top: 5px; } .activity_even { - background-color : #2E3436; + background-color: #2E3436; } .activity_even, .activity_uneven { - border-bottom : 1px solid #444444; - color : #EEEEEC; - font-size : 12px; - margin: 0 20px; - padding : 2px 0 2px 5px; + border-bottom: 1px solid #444444; + color: #EEEEEC; + font-size: 12px; + margin: 0 20px; + padding: 2px 0 2px 5px; } .activity_last { - border-bottom : none; + border-bottom: none; } .activity_uneven { - background-color : #0C191C; + background-color: #0C191C; } .container { - background-color : #0C191C; - border : 1px solid #2E3436; - margin-bottom : 20px; - padding : 2px 5px; - padding-left : 10px; + background-color: #0C191C; + border: 1px solid #2E3436; + margin-bottom: 20px; + padding: 2px 5px; + padding-left: 10px; } .clear { - clear : both; + clear: both; } .clearleft { - clear : left; + clear: left; } .container .header { - background-color : #2E3436; - color : #F57900; - font-weight : bold; - margin : -2px -5px 0 -10px; - padding-left : 5px; + background-color: #2E3436; + color: #F57900; + font-weight: bold; + margin: -2px -5px 0 -10px; + padding-left: 5px; } .container .footer { - background-color : #2E3436; - color : #0C191C; - font-size : 10px; - margin : 0 -5px -2px -10px; - padding-left : 5px; + background-color: #2E3436; + color: #0C191C; + font-size: 10px; + margin: 0 -5px -2px -10px; + padding-left: 5px; } .emblems { text-align: right; - float: right; + float: right; margin-top: -2px; } @@ -205,9 +205,9 @@ ul { } .navigation a { - color : #FFC000; + color: #FFC000; } .navigation a.next { - float : right; + float: right; } diff --git a/templates/base.html b/templates/base.html index c90a588..c6d6c26 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,6 +10,7 @@