Permalink
Browse files

new css, new base templates

  • Loading branch information...
1 parent d6cb8d1 commit 12d395f3d999ccecc41d8ab0d55c89348b335b9b @florentin committed Dec 22, 2011
@@ -1,23 +1,34 @@
-{% extends "layouts/classic.html" %}
-{% load i18n %}
+{% extends "layouts/classic.html" %}{% load i18n %}
-{% block head_title %}Welcome{% endblock %}
+{% block messages %}{% if messages %}
+ <div id="message" class="center">
+ {% for message in messages %}
+ <div class="alert-message warning">{{ message }}</div>
+ {% endfor %}
+ </div>
+{% endif %}{% endblock messages %}
-{% block head_meta_base %}
-<meta name="description" content="" />
-<meta name="keywords" content="" />
-<link href="{{ STATIC_URL }}images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
+{% block head %}
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link href="{{ STATIC_URL }}images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
+ {# <link href="{% url rss %}" rel="alternate" type="application/rss+xml" title="Welcome" /> #}
+ <meta name="description" content="" />
+ <meta name="keywords" content="" />
+
+ {% block head_css %}
+ <link href="http://yui.yahooapis.com/combo?3.4.1/build/cssreset/reset-min.css&3.4.1/build/cssfonts/fonts-min.css&3.4.1/build/cssgrids/grids-min.css&3.4.1/build/cssbase/base-min.css" rel="stylesheet" type="text/css"/>
+ {% endblock head_css %}
-{% if debug %}
+ {% block head_less %}
<link href="{{ STATIC_URL }}css/base.less" rel="stylesheet/less" type="text/css" />
- <script src="{{ STATIC_URL }}js/less-1.1.3.min.js" type="text/javascript"></script>
-{% else %}
- <link href="{{ STATIC_URL }}css/base.css" rel="stylesheet" type="text/css" />
-{% endif %}
-
-{# <link href="{% url rss %}" rel="alternate" type="application/rss+xml" title="Welcome" /> #}
-{% block head_meta %}{% endblock %}
-{% endblock %}
+ {% endblock head_less %}
+
+ {% block head_js %}
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
+ <script src="{{ STATIC_URL }}less/less-1.1.5.min.js" type="text/javascript"></script>
+ {% endblock head_js %}
+
+{% endblock head %}
{% block header %}
<div id="header" class="yui3-g mt">
@@ -27,44 +38,30 @@
{% endblock %}
</div>
</div>
-{% endblock %}
-
-{% block menu %}
-<div id="menu" class="yui3-g mt">
- <div class="yui3-u-1 box_menu">
+<div id="nav" class="yui3-g mt">
+ <div class="yui3-u-1 box_nav">
<a href="{% url home %}">Home</a>
</div>
</div>
{% endblock %}
{% block content_base %}
<div id="content" class="yui3-g mt">
- {% if messages %}
- <div class="yui3-u-1">
- <ul id="messages">
- {% for message in messages %}
- <li id="message_{{ forloop.counter }}"{% if message.tags %} class="{{ message.tags }}"{% endif %}>
- {{ message }}
- </li>
- {% endfor %}
- </ul>
- </div>
- {% endif %}
<div class="yui3-u-1 box_content">
{% block content %}{% endblock %}
</div>
</div>
{% endblock %}
-{% block footer %}
+{% block footer_base %}
<div id="footer" class="yui3-g mt">
<div class="yui3-u-1 box_footer">
- Copyright
+ {% block footer %}Copyright &copy;2012{% endblock footer %}
</div>
</div>
{% endblock %}
{% block closure_base %}
-{% include "blocks/analytics.html" %}
-{% block closure %}{% endblock %}
+ {% include "blocks/analytics.html" %}
+ {% block closure %}{% endblock %}
{% endblock %}
@@ -1,17 +1,14 @@
-{% load i18n %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+{% block doctype %}<!DOCTYPE html>{% endblock doctype %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ LANGUAGE_CODE|default:'en' }}" lang="{{ LANGUAGE_CODE|default:'en' }}">
<head>
- <title>{% block head_title %}{% endblock %}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
- <link href="http://yui.yahooapis.com/combo?3.4.1/build/cssreset/reset-min.css&3.4.1/build/cssfonts/fonts-min.css&3.4.1/build/cssgrids/grids-min.css&3.4.1/build/cssbase/base-min.css" rel="stylesheet" type="text/css"/>
- {% block head_meta_base %}{% block head_meta %}{% endblock %}{% endblock %}
+ <title>{% block head_title_text %}Welcome{% endblock %}</title>
+ {% block head %}{% endblock head %}
</head>
<body {% block body_attr %}{% endblock %}>
- {% block header_base %}{% block header %}{% endblock %}{% endblock %}
- {% block menu_base %}{% block menu %}{% endblock %}{% endblock %}
- {% block content_base %}{% block content %}{% endblock %}{% endblock %}
- {% block footer_base %}{% block footer %}{% endblock %}{% endblock %}
- {% block closure_base %}{% block closure %}{% endblock %}{% endblock %}
+ {% block messages_base %}{% block messages %}{% endblock messages %}{% endblock messages_base %}
+ {% block header_base %}{% block header %}{% endblock header %}{% endblock header_base %}
+ {% block content_base %}{% block content %}{% endblock content %}{% endblock content_base %}
+ {% block footer_base %}{% block footer %}{% endblock footer %}{% endblock footer_base %}
+ {% block closure_base %}{% block closure %}{% endblock closure %}{% endblock closure_base %}
</body>
</html>
@@ -1,10 +1,5 @@
{% extends "base.html" %}{% load i18n %}
{% block content %}
-<div class="yui3-g">
- <div class="yui3-u-1">
- <h1>Hello</h1>
- <p>This is HOME!</p>
- </div>
-</div>
+ <h1>Hello and Welcome</h1>
{% endblock %}
View
@@ -16,8 +16,8 @@
url(r"^$", direct_to_template, {"template": "pages/home.html"}, name="home"),
url(r'^robots\.txt$', direct_to_template,
{'template': 'robots.txt', 'mimetype': 'text/plain'}),
- url(r'^googlexxx.html$', direct_to_template,
- {'template': 'googlexxx.html', 'mimetype': 'text/html'}),
+ url(r'^google.html$', direct_to_template,
+ {'template': 'google.html', 'mimetype': 'text/html'}),
)
# --- Staticfiles urls ---
View
@@ -1,23 +1,4 @@
-@body-color: #FFF;
-@anchor-color: #000;
-@font-color: #000;
-@font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
-
-@header-color: #2D9B27;
-@menu-color: #6EE768;
-@content-color: #0ACF00;
-@footer-color: #2D9B27;
-@footer-text-color: #FFF;
-
-@heading-family: Rockwell, Georgia, Palatino Linotype, Palatino, "Times New Roman", Times, serif;
-@heading-color: #000;
-
-@corner-size: 5px;
-@shadow-color: #DEDEDE;
-@bg-color: #FFF;
-
-@border-color: #2BA025;
-@border-size: 1px;
+@import "conf.less";
html {
body {
@@ -28,97 +9,17 @@ html {
color: @font-color;
}
}
-a {
- color: @anchor-color;
- text-decoration: none;
-}
-h1, h2, h3, h4, h5, h6 {
- font-family: @heading-family;
- color: @heading-color;
- margin: 0.5em 0;
-}
-h1 {
- font-size: 190%;
-}
-h2 {
- font-size: 160%;
-}
-h3 {
- font-size: 130%;
-}
-blockquote {
- font-style:italic;
- background:#eee;
- padding:.4em 1em .7em 1em;
- margin:.7em 0;
- border:1px solid #dedede;
-}
-code {
- font-size:1.1em;
- font-family:"Bitstream Vera Sans Mono", Monaco, "Lucida Console", monospace;
-}
-hr {
- border:1px solid #ccc;
- margin: 0px;
-}
-pre {
- overflow:auto; width:500px;
- padding:1em 1.5em;
- margin:1em 0;
- font-size:1.2em;
- white-space:pre-wrap; /* css3 */
-}
-dl {}
-dt {
- font-weight:bold;
-}
-dd {
- padding-left:1em;
-}
-/* ------ TABLES ------ /*
-table {
- margin:.5em 0;
-}
-table th {
- color:#000;
-}
-table td, table th {
- padding:.5em .7em;
-}
-table th {
- background:#ddd; text-transform:uppercase; border-bottom:1px transparent;
-}
-table td {
- background:#ccc;
-}
-table tr.even td {
- background:#bbb;
-}
-table tr:hover td {
- background:#ccc;
-}
+@import "basics.less";
+@import "tables.less";
+@import "forms.less";
-/* ------ FORMS ------ */
-fieldset {padding:1.2em; border:1px dashed #a8ef9d;}
-legend {padding:.2em .8em; font-size:1.2em; text-transform:capitalize;}
-input, textarea, select {font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; margin:.2em 0; color:#222; font-size:1em; border:1px solid #ddd;}
-input, textarea {padding:.3em;}
-input.radio, input.checkbox {padding:2px;}
-form label {font-weight:bold; display:block;}
-input[type="text"], input[type="password"], textarea {
- width: 22em;
-}
-p {
- margin-bottom: 0px;
-}
-#header, #menu, #content, #footer {
+#header, #nav, #content, #footer {
width: 980px;
margin-left: auto;
margin-right: auto;
}
-/* ------ BOXES ------ */
.shadows {
-moz-box-shadow: 0px 0px 3px @shadow-color;
-webkit-box-shadow: 0px 0px 3px @shadow-color;
@@ -163,27 +64,4 @@ p {
text-align: right;
}
-/* ------------------------ */
-.box {
- .corners;
- .borders;
- padding: 5px;
-}
-
-.box_header {
- .box;
- background-color: @header-color;
-}
-.box_menu {
- .box;
- background-color: @menu-color;
-}
-.box_content {
- .box;
- background-color: @content-color;
-}
-.box_footer {
- .box;
- background-color: @footer-color;
- color: @footer-text-color;
-}
+@import "boxes.less";
View
@@ -0,0 +1,50 @@
+a {
+ color: @anchor-color;
+ text-decoration: none;
+}
+h1, h2, h3, h4, h5, h6 {
+ font-family: @heading-family;
+ color: @heading-color;
+ margin: 0.5em 0;
+}
+h1 {
+ font-size: 190%;
+}
+h2 {
+ font-size: 160%;
+}
+h3 {
+ font-size: 130%;
+}
+blockquote {
+ font-style:italic;
+ background:#eee;
+ padding:.4em 1em .7em 1em;
+ margin:.7em 0;
+ border:1px solid #dedede;
+}
+code {
+ font-size:1.1em;
+ font-family:"Bitstream Vera Sans Mono", Monaco, "Lucida Console", monospace;
+}
+hr {
+ border:1px solid #ccc;
+ margin: 0px;
+}
+pre {
+ overflow:auto; width:500px;
+ padding:1em 1.5em;
+ margin:1em 0;
+ font-size:1.2em;
+ white-space:pre-wrap; /* css3 */
+}
+dl {}
+dt {
+ font-weight:bold;
+}
+dd {
+ padding-left:1em;
+}
+p {
+ margin-bottom: 0px;
+}
View
@@ -0,0 +1,23 @@
+.box {
+ .corners;
+ .borders;
+ padding: 5px;
+}
+
+.box_header {
+ .box;
+ background-color: @header-color;
+}
+.box_nav {
+ .box;
+ background-color: @menu-color;
+}
+.box_content {
+ .box;
+ background-color: @content-color;
+}
+.box_footer {
+ .box;
+ background-color: @footer-color;
+ color: @footer-text-color;
+}
Oops, something went wrong.

0 comments on commit 12d395f

Please sign in to comment.