Restyle forums a bit

This commit is contained in:
Trever Fischer
2012-04-17 00:22:25 -04:00
parent 90d47a30b1
commit 228ad1cedd
29 changed files with 97 additions and 16 deletions

BIN
static/css/img/admin-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
static/css/img/bg_grass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/css/img/bg_night.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

BIN
static/css/img/books.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
static/css/img/creeper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

BIN
static/css/img/tab-bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

BIN
static/css/img/tab-left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

BIN
static/css/img/torch-on.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

BIN
static/css/img/torch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

View File

@@ -286,7 +286,7 @@ fieldset {
border: 1px solid black;
}
.avatar {
.avatar img {
border: 3px solid black;
}
@@ -301,3 +301,73 @@ fieldset {
.news-item h2 {
float: left;
}
.forum {
vertical-align: middle;
}
.forum a {
color: #f00;
}
.forum a:visited {
color: #f33;
}
.forum .avatar {
float: left;
}
.forum .author-info ul {
list-style: none;
margin-left: 32;
}
.forum td {
vertical-align: middle;
}
.topic .topic-link {
background: url(img/torch-on.png) no-repeat left center;
height: 48px;
padding-left: 48px;
}
.topic .topic-link ul {
list-style: none;
font-size: x-small;
}
.topic .topic-link a {
font-size: large;
}
.forum tr.topic {
border-top: #888 solid 1px;
border-bottom: #aaa solid 1px;
}
.topic .avatar {
float: left;
}
.topic h2 {
margin-left: 42px;
}
.forum-post {
background: url(img/adminium.png);
}
.post {
background-color: #888;
}
.post a {
color: #f33;
}
.post .dateline {
float: right;
font-size: x-small;
}

View File

@@ -1,16 +1,21 @@
{% load mptt_tags %}
{% load minecraft %}
{% if forums %}
<table>
<table class="forum">
<tr class="header">
<th>Name</th>
<th>Topics</th>
<th>Last Post</th>
</tr>
{% for f in forums %}
<tr class="{% cycle 'even' 'odd' %}">
<tr class="{% cycle 'even' 'odd' %} subforum">
<td><a href="{{ f.get_absolute_url }}">{{ f.name }}</a></td>
<td>{{ f.topicCount }}</td>
<td><a href="{{f.latestTopic.get_absolute_url}}">{{f.latestTopic.title}}</a> by {{f.latestTopic.rootPost.user}}</td>
{% if f.latestTopic %}
<td><a href="{{f.latestTopic.get_absolute_url}}">{{f.latestTopic.title}}</a> {% include 'common/user_tile.html' with user=f.latestTopic.lastPost.user %}</td>
{% else %}
<td><em>No posts...</em></td>
{% endif %}
</tr>
{% endfor %}
</table>

View File

@@ -1,18 +1,19 @@
{% load markup %}
{% load minecraft %}
<div class="post">
<a name="reply-{{post.id}}"></a>
<div class="forum-post-user">
<div class="byline">
{%avatar post.user%}
{{post.user}}
</div>
<div class="dateline">
{{post.created}}
</div>
<div class="dateline">
Posted {{post.created}}
</div>
<div class="forum-post-content">
{{post.body|markdown:"safe"}}
<br style="clear:both"/>
<a href="{%url forums.views.reply post.id%}">Reply &raquo;</a>
</div>
</div>
<a href="{%url forums.views.reply post.id%}">Reply</a>

View File

@@ -1,4 +1,5 @@
{% extends "forum_base.html" %}
{% load minecraft %}
{% block breadcrumb %}
<a href="{% url forums.views.index%}">Forums</a>
@@ -12,18 +13,16 @@
<h2>{{ forum.name }}</h2>
<h3>Subforums</h3>
{%include "forums/_forum_table.html" with forums=forum.children.all %}
<table>
<table class="forum">
<tr class="header">
<th>Title</th>
<th>Posted</th>
<th>Latest Activity</th>
<th>Topic</th>
<th>Last Post</th>
</tr>
{% if topics %}
{% for topic in topics %}
<tr class="{%cycle 'even' 'odd' %} {% if topic.sticky %}sticky{% endif %}">
<td><a href="{{topic.get_absolute_url}}">{{ topic.title }}</a></td>
<td>{{ topic.created }} </td>
<td>{{topic.lastPost.created}} by {{ topic.lastPost.user }} </td>
<tr class="{%cycle 'even' 'odd' %} {% if topic.sticky %}sticky{% endif %} topic">
<td class="topic-link"><ul><li><a href="{{topic.get_absolute_url}}">{{ topic.title }}</a></li><li>Started by {{topic.rootPost.user}} on {{topic.created}}</li></ul></td>
<td class="author-info"><div class="avatar">{% avatar topic.lastPost.user 32 %}</div><ul><li>{{topic.lastPost.user}}</li><li>{{topic.created}}</li></ul></td>
</tr>
{% endfor %}
{% else %}

View File

@@ -1,4 +1,5 @@
{% extends "forum_base.html" %}
{% load minecraft %}
{% load mptt_tags %}
{%block title %}{{topic.title}}{%endblock%}
@@ -12,6 +13,11 @@
{%endblock%}
{%block content %}
<div class="topic">
<div class="avatar">{% avatar topic.rootPost.user 32 %}</div>
<h2>{{topic.title}}</h2>
<div class="byline">Started by <span itemprop="author">{{topic.rootPost.user}}</span> {{ topic.created }}</div>
<br style="clear:both;"/>
{% include "forums/_post.html" with post=topic.rootPost %}
</div>
{%endblock%}