Better blog detail pages

master
Nick Sergeant 2012-06-06 00:53:02 -04:00
parent ee8860a953
commit 020ede3a15
5 changed files with 78 additions and 62 deletions

View File

@ -14,6 +14,23 @@
window.blog_post = true; window.blog_post = true;
{% endblock %} {% endblock %}
{% block header %}
<header class="main">
<div class="inner group">
<h1>
<a href="/">
{% if blog_user.username == 'nick' %}
Nick Sergeant
{% elif blog_user.username == 'blog' %}
Snipt Blog
{% else %}
{{ blog_user.username }}
{% endif %}
</a>
</h1>
</div>
</header>
{% endblock %}
{% block sub-header %} {% block sub-header %}
<header class="sub"> <header class="sub">
<div class="inner group"> <div class="inner group">
@ -29,7 +46,6 @@
</header> </header>
{% endblock %} {% endblock %}
{% block aside %} {% block aside %}
{% if not detail %}
<aside class="main"> <aside class="main">
{% if sidebar %} {% if sidebar %}
<section class="sidebar"> <section class="sidebar">
@ -57,23 +73,4 @@
</ul> </ul>
</nav> </nav>
</aside> </aside>
{% endif %}
{% endblock %}
{% block header %}
<header class="main">
<div class="inner group">
<h1>
<a href="/">
{% if blog_user.username == 'nick' %}
Nick Sergeant
{% elif blog_user.username == 'blog' %}
Snipt Blog
{% else %}
{{ blog_user.username }}
{% endif %}
</a>
</h1>
</div>
</header>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% extends "blogs/themes/default/base.html" %} {% extends "blogs/themes/default/base.html" %}
{% block html-class %}detail blog-site blog-detail{% endblock %} {% block html-class %}blog-site blog-detail{% endblock %}
{% block body-class %}detail blog-site blog-detail{% endblock %} {% block body-class %}blog-site blog-detail{% endblock %}
{% block js %} {% block js %}
{{ block.super }} {{ block.super }}

View File

@ -41,11 +41,16 @@ def blog_post(request, username_or_custom_slug):
slug=username_or_custom_slug, slug=username_or_custom_slug,
) )
sidebar = get_object_or_None(Snipt,
user=request.blog_user,
title='Blog Sidebar')
context = { context = {
'blog_user': request.blog_user, 'blog_user': request.blog_user,
'detail': True, 'detail': True,
'has_snipts': True, 'has_snipts': True,
'public': True, 'public': True,
'sidebar': sidebar,
'snipt': snipt, 'snipt': snipt,
} }

View File

@ -1,5 +1,5 @@
body.blog-site article.snipt div.group div.container { body.blog-site article.snipt div.group div.container {
width: 708px; width: 718px;
} }
body.blog-site article.snipt div.group div.container header { body.blog-site article.snipt div.group div.container header {
min-height: 0; min-height: 0;
@ -78,12 +78,21 @@ body.blog-site header.sub div.inner {
z-index: 51; z-index: 51;
} }
body.blog-detail section.main div.inner {
width: 718px;
}
body.blog-detail section.main div.inner section.snipts article.snipt {
margin-bottom: 0;
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container { body.blog-detail section.main div.inner section.snipts article.snipt div.container {
width: 939px; width: 100%;
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container section.code {
height: auto;
} }
body.blog-detail div#disqus_thread { body.blog-detail div#disqus_thread {
width: 925px; width: 704px;
} }
body.blog-detail header.sub div.inner ul.bcrumb { body.blog-detail div#disqus_thread #dsq-content {
width: 923px; margin-top: -38px;
} }

View File

@ -4,7 +4,7 @@ body.blog-site {
article.snipt { article.snipt {
div.group { div.group {
div.container { div.container {
width: 708px; width: 718px;
header { header {
min-height: 0; min-height: 0;
@ -114,23 +114,28 @@ body.blog-site {
body.blog-detail { body.blog-detail {
section.main { section.main {
div.inner { div.inner {
width: 718px;
section.snipts { section.snipts {
article.snipt { article.snipt {
margin-bottom: 0;
div.container { div.container {
width: 939px; width: 100%;
section.code {
height: auto;
}
} }
} }
} }
} }
} }
div#disqus_thread { div#disqus_thread {
width: 925px; width: 704px;
}
header.sub { #dsq-content {
div.inner { margin-top: -38px;
ul.bcrumb {
width: 923px;
}
} }
} }
} }