Permalink
Browse files

basic style

  • Loading branch information...
1 parent 121f4bd commit 9f89661c4def27a2c901f7df505f2b213248bd56 @kennethlove committed Sep 14, 2010
View
No changes.
View
44 public/media/css/style.css 100755 → 100644
@@ -73,9 +73,51 @@ button { width: auto; overflow: visible; }
/* Primary Styles
- Author:
+ Author: Kenneth Love
*/
+header {
+ background:lightblue;
+ margin-bottom:10px;
+ padding:5px 10px 0;
+ -webkit-box-shadow:0 2px 5px #999;
+}
+ header h1 {
+ font:28px/1.5 Helvetica, Arial, sans-serif;
+ padding-bottom:5px;
+ }
+ header p {
+ font-style:italic;
+ padding-bottom:5px;
+ }
+
+#main {
+ margin-left:10px;
+}
+ #main article {
+ padding:0 10px;
+ }
+ #main aside {
+ background-color:beige;
+ float:right;
+ padding:10px;
+ -webkit-box-shadow:2px 2px 5px #999;
+ }
+ ol.dates { list-style:none;margin-left:0; }
+ #main nav {
+ clear:both;
+ font-size:10px;
+ margin-top:10px;
+ text-align:center;
+ }
+
+footer {
+ font-size:10px;
+ margin:10px;
+ text-align:center;
+ text-transform:uppercase;
+}
+
View
@@ -69,7 +69,7 @@
)
MIDDLEWARE_CLASSES = (
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
+ #'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -4,14 +4,23 @@
{% block header %}
<h1>{{ blog.name }}</h1>
+{{ blog.description|linebreaks }}
{% endblock %}
{% block main %}
-{{ blog.description|linebreaks }}
<section>
- <h2>Recent Posts</h2>
{% if latest|length %}
- <p>Showing {{ latest|length }} posts of {{ blog.posts.get_visible|length }} total.</p>
+ <aside>
+ <ol class="dates">
+ {% for year in date_list %}
+ <li>
+ <a href="{% url year blog.slug year|date:"Y" %}">
+ {{ year|date:"Y" }}</a>
+ </li>
+ {% endfor %}
+ </ol>
+ </aside>
+ <h2>Recent Posts</h2>
<ul>
{% for post in latest %}
<li>
@@ -21,18 +30,13 @@
</li>
{% endfor %}
</ul>
- <nav>
- <ol>
- {% for year in date_list %}
- <li><a href="{% url year blog.slug year|date:"Y" %}">{{ year|date:"Y" }}</a></li>
- {% endfor %}
- </ol>
- </nav>
{% else %}
<p>Sorry, no posts yet. Check back soon.</p>
{% endif %}
</section>
-<a href="{% url home %}">Back to blog list</a>
+<nav>
+ <a href="{% url home %}">Back to blog list</a>
+</nav>
{% endblock %}
{% block footer %}
@@ -4,11 +4,25 @@
{% block header %}
<h1>{{ blog.name }}</h1>
+{{ blog.description|linebreaks }}
{% endblock %}
{% block main %}
-{{ blog.description|linebreaks }}
<section>
+ <aside>
+ <ol class="dates">
+ <li>
+ <a href="{% url month blog.slug previous_month|date:"Y" previous_month|date:"m" %}">
+ {{ previous_month|date:"N" }}</a>
+ </li>
+ {% if next_month %}
+ <li>
+ <a href="{% url month blog.slug next_month|date:"Y" next_month|date:"m" %}">
+ {{ next_month|date:"N" }}</a>
+ </li>
+ {% endif %}
+ </ol>
+ </aside>
<h2>Posts for {{ month|date:"N, Y" }}</h2>
<ul>
{% for post in object_list %}
@@ -19,16 +33,10 @@
</li>
{% endfor %}
</ul>
- <nav>
- <a href="{% url month blog.slug previous_month|date:"Y" previous_month|date:"m" %}">
- {{ previous_month|date:"N" }}</a>
- {% if next_month %}
- <a href="{% url month blog.slug next_month|date:"Y" next_month|date:"m" %}">
- {{ next_month|date:"N" }}</a>
- {% endif %}
- </nav>
</section>
-<a href="{{ blog.get_absolute_url }}">Back to post list</a>
+<nav>
+ <a href="{{ blog.get_absolute_url }}">Back to post list</a>
+</nav>
{% endblock %}
{% block footer %}
@@ -4,11 +4,20 @@
{% block header %}
<h1>{{ blog.name }}</h1>
+{{ blog.description|linebreaks }}
{% endblock %}
{% block main %}
-{{ blog.description|linebreaks }}
<section>
+ <aside>
+ <ol class="dates">
+ {% 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 %}
@@ -19,17 +28,10 @@
</li>
{% endfor %}
</ul>
- <nav>
- <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>
- </nav>
</section>
-<a href="{{ blog.get_absolute_url }}">Back to post list</a>
+<nav>
+ <a href="{{ blog.get_absolute_url }}">Back to post list</a>
+</nav>
{% endblock %}
{% block footer %}
@@ -5,27 +5,31 @@
{% endblock %}
{% block header %}
-<h1>{{ object.title }}</h1>
+<h1>{{ object.blog.name }}</h1>
{% endblock %}
{% block main %}
-{{ object.body|linebreaks }}
-<aside>
- {{ object.publish_at }}
- <ul>
- {% for tag in object.tags.all %}
- <li>{{ tag }}</li>
- {% endfor %}
- </ul>
- <a href="{{ object.blog.get_absolute_url }}">Back to post list</a>
-</aside>
+<article>
+ <aside>
+ {{ object.publish_at }}
+ <ul>
+ {% for tag in object.tags.all %}
+ <li>{{ tag }}</li>
+ {% endfor %}
+ </ul>
+ </aside>
+ <h1>{{ object.title }}</h1>
+ {{ 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 %}
+ <a href="{{ object.blog.get_absolute_url }}">Back to post
+ list</a>
{% with object.get_next_by_publish_at as next %}
{% if next and next.is_visible %}
<a href="{{ next.get_absolute_url }}">
View
0 tumblog/templates/index.html 100644 → 100755
No changes.
View
@@ -1,60 +1,59 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
- <meta charset="utf-8">
- <!--[if IE]><![endif]-->
-
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>{% block page_title %}Stairs{% endblock %}</title>
- <meta name="description" content="">
- <meta name="author" content="">
- <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
- <link rel="shortcut icon" href="/favicon.ico">
- <link rel="apple-touch-icon" href="/apple-touch-icon.png">
- <link rel="stylesheet" href="/site_media/css/style.css?v=1">
- <link rel="stylesheet" media="handheld" href="/site_media/css/handheld.css?v=1">
- <script src="/site_media/js/modernizr-1.5.min.js"></script>
-
+ <meta charset="utf-8">
+ <!--[if IE]><![endif]-->
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>{% block page_title %}Stairs{% endblock %}</title>
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
+ <link rel="shortcut icon" href="/favicon.ico">
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
+ <link rel="stylesheet" href="/site_media/css/style.css?v=1">
+ <link rel="stylesheet" media="handheld" href="/site_media/css/handheld.css?v=1">
+ <script src="/site_media/js/modernizr-1.5.min.js"></script>
+ {% block styles %}{% endblock %}
</head>
<!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
<!--[if IE 7 ]> <body class="ie7"> <![endif]-->
<!--[if IE 8 ]> <body class="ie8"> <![endif]-->
<!--[if IE 9 ]> <body class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
- <div id="container">
- <header>
- {% block header %}{% endblock %}
- </header>
-
- <div id="main">
- {% block main %}{% endblock %}
- </div>
-
- <footer>
- {% block footer %}{% endblock %}
- </footer>
- </div> <!-- end of #container -->
+ <div id="container">
+ <header>
+ {% block header %}Stairs!{% endblock %}
+ </header>
+
+ <div id="main">
+ {% block main %}{% endblock %}
+ </div>
+
+ <footer>
+ {% block footer %}{% endblock %}
+ </footer>
+ </div> <!-- end of #container -->
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script>!window.jQuery && document.write('<script src="/site_media/js/jquery-1.4.2.min.js"><\/script>')</script>
- <script src="/site_media/js/plugins.js?v=1"></script>
- <script src="/site_media/js/script.js?v=1"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+ <script>!window.jQuery && document.write('<script src="/site_media/js/jquery-1.4.2.min.js"><\/script>')</script>
+ <script src="/site_media/js/plugins.js?v=1"></script>
+ <script src="/site_media/js/script.js?v=1"></script>
- <!--[if lt IE 7 ]>
- <script src="js/dd_belatedpng.js?v=1"></script>
- <![endif]-->
+ <!--[if lt IE 7 ]>
+ <script src="js/dd_belatedpng.js?v=1"></script>
+ <![endif]-->
- <script src="/site_media/js/profiling/yahoo-profiling.min.js?v=1"></script>
- <script src="/site_media/js/profiling/config.js?v=1"></script>
+ <script src="/site_media/js/profiling/yahoo-profiling.min.js?v=1"></script>
+ <script src="/site_media/js/profiling/config.js?v=1"></script>
- <script>
- var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
- (function(d, t) {
- var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
- g.async = true; g.src = '//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g, s);
- })(document, 'script');
- </script>
-
+ <script>
+ var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
+ (function(d, t) {
+ var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
+ g.async = true; g.src = '//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g, s);
+ })(document, 'script');
+ </script>
+ {% block scripts %}{% endblock %}
</body>
</html>

0 comments on commit 9f89661

Please sign in to comment.