From 00df5d23c35aa1b4bdf9de11622a9530252668fd Mon Sep 17 00:00:00 2001 From: Lincoln de Sousa Date: Mon, 21 Jul 2008 23:41:55 -0300 Subject: [PATCH] adding the new layout proposed by Lucas --- eventos/templates/eventos/speaker-add.html | 2 + .../templates/eventos/speaker-details.html | 2 + eventos/templates/eventos/talk-add.html | 2 + eventos/templates/eventos/talk-details.html | 2 + eventos/templates/eventos/talk-list.html | 1 + media/css/geral.css | 207 ++++++++++++++---- media/css/reset.css | 39 ++++ templates/base.html | 78 +++---- templates/diario/entry_list.html | 2 +- urls.py | 50 ++++- 10 files changed, 305 insertions(+), 80 deletions(-) create mode 100755 media/css/reset.css diff --git a/eventos/templates/eventos/speaker-add.html b/eventos/templates/eventos/speaker-add.html index 8f98678..a6c5a0b 100644 --- a/eventos/templates/eventos/speaker-add.html +++ b/eventos/templates/eventos/speaker-add.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% block content %} +

Cadastrar-se como palestrante

+
{{ uform.as_p }} diff --git a/eventos/templates/eventos/speaker-details.html b/eventos/templates/eventos/speaker-details.html index 48320c4..1f1909f 100644 --- a/eventos/templates/eventos/speaker-details.html +++ b/eventos/templates/eventos/speaker-details.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% block content %} +

Editar dados pessoais

+ {{ form.as_p }} diff --git a/eventos/templates/eventos/talk-add.html b/eventos/templates/eventos/talk-add.html index 333adff..cf256b2 100644 --- a/eventos/templates/eventos/talk-add.html +++ b/eventos/templates/eventos/talk-add.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% block content %} +

Cadastrar trabalho

+ {{ form.as_p }} diff --git a/eventos/templates/eventos/talk-details.html b/eventos/templates/eventos/talk-details.html index 093b991..3a8879b 100644 --- a/eventos/templates/eventos/talk-details.html +++ b/eventos/templates/eventos/talk-details.html @@ -1,6 +1,8 @@ {% extends "base.html" %} {% block content %} +

Detalhes do trabalho

+ {{ form.as_p }} diff --git a/eventos/templates/eventos/talk-list.html b/eventos/templates/eventos/talk-list.html index 8a094e1..ae17a40 100644 --- a/eventos/templates/eventos/talk-list.html +++ b/eventos/templates/eventos/talk-list.html @@ -9,6 +9,7 @@ Título Tipo Evento +   diff --git a/media/css/geral.css b/media/css/geral.css index 57dc4f2..a3457f6 100644 --- a/media/css/geral.css +++ b/media/css/geral.css @@ -1,6 +1,6 @@ /* -*- coding: utf-8 -*- * - * Copyright (C) 2008 Lincoln de Sousa + * Copyright (C) 2008 Lucas Petes da Costa * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -17,68 +17,195 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +@charset "UTF-8"; +/* CSS Document */ + body { - margin: 10px 114px 10px 10px; - font: normal 10pt verdana; +background-color:#FFF; +font-family:Arial, Helvetica, sans-serif; +font-size:small; +margin:0; padding:0; +font-size:12px; +} + +h1 { +padding:35px 0 25px 18px; +} + +div#esquerda { +width:333px; +float:left; +} + +div#direita { +margin-left:333px; +} + +ul#menu { +list-style:none; +text-align:right; +text-transform:uppercase; } -h1.title { - background: url(/imgs/logo.png) no-repeat; - overflow: hidden; - height: 114px; - width: 300px; +ul#menu li { +height:46px; +margin-bottom:-22px; } -h1.title a { - display: block; - padding-top: 114px; +ul#menu li a:hover, ul#menu li a.current { +background:url(/imgs/li_menu.png); +color:#F6D4D4; } -#top { - margin-bottom: 20px; +ul#menu li a { +color:black; +font-weight:bold; +display:block; +height:31px; +padding:15px 21px 0 0; +text-decoration:none; +} + +div#top-right { +height:99px; +background:url(/imgs/el_border_top.png) no-repeat; +padding-left:19px; +} + +div#top-right form { +padding-top:70px; +margin-bottom:-35px; +font-size:13px; +} + +div#top-right input { +font-size:14px; +} + +div#top-right label {padding:0 10px;} + +ul#menu_usuario { +list-style:none; +padding-top:75px; } -#top em { - font-size: 12pt; - margin-left: 114px; +ul#menu_usuario li { +display:inline; +padding-right:5px; +font-size:13px; } -#login-form { - position: absolute; - top: 10px; - right: 114px; +ul#menu_usuario a { +color:#333; +text-decoration:none; +border-bottom:1px solid #f00; } -#login-form h2 { - margin: 0px 0px 10px 0px; +div#content { +border-left:1px solid #777; +background:url(/imgs/h2_left.png) no-repeat; +padding:19px 30px 30px 30px; } -ul#main-menu { - padding: 0px; - list-style: none; - margin-left: 114px; +div#content h2 { +margin-left:-8px; +color:#FFF; +font-size:22px; +font-weight:bold; +background:url(/imgs/h2_right.png) right no-repeat #222; +padding-top:6px; +margin-right:-30px; +margin-bottom:35px; } -ul#main-menu li { - display: inline; - margin-right: 10px; +div#content h2 a { +text-decoration: none; +color: #FFF; } -ul#main-menu li a { - text-decoration: none; - color: #666; +div#content p { +line-height:150%; +margin-top:15px; +text-align:justify; } -ul#main-menu li a:hover { - text-decoration: underline; - color: red; +div#content ul { +list-style:url(/imgs/bullet.gif) inside; +line-height:170%; +margin-top:15px; } -#content h3 a { - text-decoration: none; - color: #cc0000; +div#content ol { +list-style:inside decimal-leading-zero none; +line-height:170%; +margin-top:15px; } -#content { - padding-left: 114px; +/* Forms */ + +input, textarea, select { +color:#222; +border:1px solid #c8c8c8; +font-size:12px; +} + +select { padding:0 0 0 1px;} + +form ul { +list-style:none; +margin:6px 0 10px 0; +clear:none; +float:left; +width:100%; +list-style:none !important; +text-align:left; +} + +form li { +clear:both; +float:left; +padding: 5px 0 5px 0; +width:100%; +background:none; +line-height:normal; +margin:0; +} + +form li div li {float:none;border:none;} +form li div ul {float:none;margin:none;border:0;} +form li div input {margin-right:10px;} + +form label { +float:left; +display:block; +width:170px; +} + +form label.inline { +display:inline !important; +float:none !important; +margin-top:-2px; +width:auto; +padding-right:5px; +} + +form li div { +float:left; +} + +form li div div { margin-left:0 !important; float:none !important; } + +div.button {margin-top:6px; padding-left:170px;} +div.button input, input.button { color:#F6D4D4 !important; font-weight:bold; background: #CA0000; border:2px solid #9F0F0B !important; padding-left:10px; padding-right:10px; } +input.button {font-size:13px !important; margin-left:6px;} +div.button input.imagem { background:none !important; border:0 !important;} + +/* Tabelas */ + +table {margin:auto; width:100%; margin-top:15px;} +th {font-weight:bold; font-size:12px; color:#222; text-transform:uppercase; border-bottom:2px solid #dfdfdf !important;} +th,td { +padding:3px; +border-bottom:1px solid #dfdfdf; } \ No newline at end of file diff --git a/media/css/reset.css b/media/css/reset.css new file mode 100755 index 0000000..cb05582 --- /dev/null +++ b/media/css/reset.css @@ -0,0 +1,39 @@ +/* -------------------------------------------------------------- + + reset.css + * Resets default browser CSS. + + Based on work by Eric Meyer: + * meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ + +-------------------------------------------------------------- */ + +html, body, div, span, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, code, +del, dfn, em, img, q, dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + font-weight: inherit; + font-style: inherit; + font-size: 100%; + font-family: inherit; + vertical-align: baseline; +} + + +body { line-height: 1.5; background: #fff; margin:1.5em 0; } + +/* Tables still need 'cellspacing="0"' in the markup. */ +table { border-collapse: separate; border-spacing: 0; } +caption, th, td { text-align: left; font-weight:400; } + +/* Remove possible quote marks (") from ,
. */ +blockquote:before, blockquote:after, q:before, q:after { content: ""; } +blockquote, q { quotes: "" ""; } + +a img { border: none; } + diff --git a/templates/base.html b/templates/base.html index f043e3f..15e0742 100644 --- a/templates/base.html +++ b/templates/base.html @@ -21,60 +21,62 @@ + Gerenciador de eventos -
-

Gerenciador de eventos

- "Livre para aprimorar" +
+

EMSL - Encontro Mineiro de Software Livre

+
- {% if not user.is_authenticated %} +
+
- -

Autenticação

- -
- - -
-
- -
- - {% endif %} + {% if not user.is_authenticated %} + +
+ + + + + +
- + + {% endif %} +
{% block content %} + {% endblock %}
diff --git a/templates/diario/entry_list.html b/templates/diario/entry_list.html index c38748c..280a382 100644 --- a/templates/diario/entry_list.html +++ b/templates/diario/entry_list.html @@ -3,7 +3,7 @@ {% block content %} {% for entry in entry_list %} -

{{ entry.title }}

+

{{ entry.title }}

{{ entry.body|safe }}

Posted on {{ entry.pub_date|date:"F j, Y" }}

{% endfor %} diff --git a/urls.py b/urls.py index 6a1d60c..22476cb 100644 --- a/urls.py +++ b/urls.py @@ -1,12 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008 Lincoln de Sousa +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. from django.conf.urls.defaults import * from django.conf import settings +from diario.settings import DIARIO_NUM_LATEST +from diario.models import Entry +from contents.models import Menu MEDIA = {'document_root': settings.INSTANCE('media')} +# the only difference between info_dict and info_dict_full is that the +# full version contains all entries and the other has just entries +# without menus. + +hasmenu = [x.entry.id for x in Menu.objects.all()] +info_dict = { + 'queryset': Entry.published_on_site.exclude(id__in=hasmenu), + 'template_object_name': 'entry', + 'extra_context': {'menus': Menu.objects.all()}, +} + +info_dict_full = { + 'queryset': Entry.published_on_site.all(), + 'template_object_name': 'entry', + 'extra_context': {'menus': Menu.objects.all()}, +} + urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), + + url(regex='^$', + view='django.views.generic.list_detail.object_list', + kwargs=dict(info_dict, paginate_by=DIARIO_NUM_LATEST), + name='index'), + + url(regex='^(?P\d{4})/(?P[0-9]{2})/(?P\d{2})/(?P[-\w]+)/$', + view='diario.views.entries.entry_detail', + kwargs=dict(info_dict_full, slug_field='slug', month_format='%m', + date_field='pub_date'), + name='diario-entry'), + (r'^', include('ema.eventos.urls')), - (r'^', include('diario.urls.entries')), # static media (r'^(?Pimgs/.*)$', 'django.views.static.serve', MEDIA), -- 2.20.1