]> git.parisson.com Git - django-postman.git/commitdiff
Added a CSS example
authorPatrick Samson <pk.samson@gmail.com>
Wed, 15 Aug 2012 10:46:52 +0000 (12:46 +0200)
committerPatrick Samson <pk.samson@gmail.com>
Wed, 15 Aug 2012 10:46:52 +0000 (12:46 +0200)
CHANGELOG
docs/quickstart.rst
docs/views.rst
postman/static/postman/css/postman.css [new file with mode: 0644]
postman/templates/postman/base.html

index d024c1303da71c4ce154e827036d126c8a014b25..20e02598e75bcab05c55f132906508103756a1c8 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ Django Postman changelog
 Version 2.0.0, August 2012
 --------------------------
 * Add an API.
+* Add a CSS example, for view.html.
 * Rename the extra context variables passed to the notifier app to avoid name clash:
        pm_message and pm_action
 * More adjustments for Django 1.4.
index 320066bb3090e71aef0393a9f3cbcac4d03724bf..e0c8f4f468a02242e3d6babc4d8d8ebafefe233d 100644 (file)
@@ -179,17 +179,25 @@ in which some blocks are expected:
 * content: in <html><body>, to put the page contents\r
 * postman_menu: in <html><body>, to put a navigation menu\r
 \r
+.. _static files:\r
+\r
 Static Files\r
 ~~~~~~~~~~~~\r
+\r
 A CSS file is provided with the application, for the Admin site: :file:`postman/css/admin.css`.\r
 It is not obligatory but makes the display more confortable.\r
 \r
-The file is provided under :file:`postman/static/`.\r
+A basic CSS file is provided to style the views: :file:`postman/css/postman.css`.\r
+You may use it as a starting point to make your own design.\r
+\r
+These files are provided under :file:`postman/static/`.\r
+\r
+See also :ref:`styles` for the stylesheets of views.\r
 \r
 For Django 1.3+, just follow the instructions related to the staticfiles app.\r
 \r
 For Django 1.2:\r
-       It's up to you to make it visible to the URL resolver.\r
+       It's up to you to make the files visible to the URL resolver.\r
 \r
        For example:\r
 \r
@@ -200,8 +208,6 @@ For Django 1.2:
                ('^' + settings.MEDIA_URL.strip('/') + r'/(?P<path>postman/.*)$', 'django.views.static.serve',\r
                        {'document_root': os.path.join(imp.find_module('postman')[1], 'medias')}),\r
 \r
-See also :ref:`styles` for the stylesheets of views.\r
-\r
 Examples\r
 --------\r
 \r
index c9811250997a20b0126655c8961910877f5aca83..f1b445419867c6015ee893340f4d06651abf3adf 100644 (file)
@@ -14,6 +14,8 @@ Here is a sample of some CSS rules, usable for :file:`postman/views.html`::
     .pm_message.pm_pending .pm_header  { background-color: #FFC; }\r
     .pm_message.pm_rejected .pm_header { background-color: #FDD; }\r
 \r
+These rules are provided with the application, as an example, in a static file (See :ref:`static files`).\r
+\r
 forms\r
 -----\r
 \r
diff --git a/postman/static/postman/css/postman.css b/postman/static/postman/css/postman.css
new file mode 100644 (file)
index 0000000..62b1f39
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+       This is a basic stylesheet for the django-postman application.
+       Called from templates/postman/base.html.
+       Make your own design in <settings.STATIC_ROOT>/postman/css/postman.css
+*/
+.pm_message.pm_deleted {
+ text-decoration: line-through;
+}
+.pm_message.pm_deleted .pm_body{
+ display: none;
+}
+.pm_message.pm_archived {
+ font-style: italic;
+ color: grey;
+}
+.pm_message.pm_unread .pm_subject {
+ font-weight: bolder;
+}
+.pm_message.pm_pending .pm_header {
+ background-color: #FFC;
+}
+.pm_message.pm_rejected .pm_header {
+ background-color: #FDD;
+}
index 061cf3d7ccdc5e385f02d88b4f2eb8abef97d60c..36332119f2215f96e84a2927a0d8d823d9027186 100644 (file)
@@ -2,12 +2,18 @@
 {% load url from future %}
 {% load i18n %}{% load postman_tags %}
 {% block title %}{% trans "Messaging" %}{% endblock %}
+{% block extrahead %}{{ block.super }}
+<link type="text/css" media="all" rel="stylesheet" href="
+{# dj v1.4 #}{% load static %}{% static 'postman/css/postman.css' %}
+{# dj v1.3 #}{# {{ STATIC_URL }}postman/css/postman.css #}
+{# dj v1.2 #}{# {{ MEDIA_URL }}postman/css/postman.css #}
+" />{% endblock %}
 {% block postman_menu %}
 <ul id="postman_menu">{% postman_unread as unread_count %}
- <li><a href="{% url 'postman_inbox' %} ">&raquo;&nbsp;{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
- <li><a href="{% url 'postman_sent' %} ">&raquo;&nbsp;{% trans "Sent Messages" %}</a></li>
- <li><a href="{% url 'postman_write' %} ">&raquo;&nbsp;{% trans "Write" %}</a></li>
- <li><a href="{% url 'postman_archives' %} ">&raquo;&nbsp;{% trans "Archives" %}</a></li>
- <li><a href="{% url 'postman_trash' %} ">&raquo;&nbsp;{% trans "Trash" %}</a></li>
+ <li><a href="{% url 'postman_inbox' %}">&raquo;&nbsp;{% trans "Inbox" %}{% if unread_count %} <strong>({{ unread_count }})</strong>{% endif %}</a></li>
+ <li><a href="{% url 'postman_sent' %}">&raquo;&nbsp;{% trans "Sent Messages" %}</a></li>
+ <li><a href="{% url 'postman_write' %}">&raquo;&nbsp;{% trans "Write" %}</a></li>
+ <li><a href="{% url 'postman_archives' %}">&raquo;&nbsp;{% trans "Archives" %}</a></li>
+ <li><a href="{% url 'postman_trash' %}">&raquo;&nbsp;{% trans "Trash" %}</a></li>
 </ul>
 {% endblock %}
\ No newline at end of file