css styling for contact.html

This commit is contained in:
Karen 2011-10-13 16:35:32 +05:30
parent 4f23c724be
commit 036fdc60f6
9 changed files with 251 additions and 179 deletions

View File

@ -1,39 +1,39 @@
# Create your views here.
from django.shortcuts import render_to_response
from models import *
from settings import TWITTER_ID
import twitter
from django.template import RequestContext
from django import forms
from django.forms.widgets import Textarea
class ContactForm(forms.Form):
email = forms.EmailField()
name = forms.CharField(max_length=255)
message = forms.CharField(widget=Textarea(attrs={'cols': 80, 'rows': 20}))
'''
class Meta:
widgets = {
'message': Textarea(attrs={'cols': 80, 'rows': 20})
}
'''
def index(request):
try:
tApi = twitter.Api()
statuses = tApi.GetUserTimeline(TWITTER_ID)
except:
statuses = []
boxes = SliderBox.objects.all()
return render_to_response("noel/index.html", RequestContext(request, {
'tweets': statuses[0:5],
'boxes': boxes
}))
def contact(request):
# form = ContactForm()
return render_to_response("registration/contact.html", RequestContext(request, {
'form': ContactForm()
}))
# Create your views here.
from django.shortcuts import render_to_response
from models import *
from settings import TWITTER_ID
import twitter
from django.template import RequestContext
from django import forms
from django.forms.widgets import Textarea
class ContactForm(forms.Form):
email = forms.EmailField()
name = forms.CharField(max_length=255)
message = forms.CharField(widget=Textarea(attrs={'cols': 10, 'rows': 6}))
'''
class Meta:
widgets = {
'message': Textarea(attrs={'cols': 80, 'rows': 20})
}
'''
def index(request):
try:
tApi = twitter.Api()
statuses = tApi.GetUserTimeline(TWITTER_ID)
except:
statuses = []
boxes = SliderBox.objects.all()
return render_to_response("noel/index.html", RequestContext(request, {
'tweets': statuses[0:5],
'boxes': boxes
}))
def contact(request):
# form = ContactForm()
return render_to_response("registration/contact.html", RequestContext(request, {
'form': ContactForm()
}))

View File

@ -36,12 +36,6 @@ margin:10px;}
{background-color:#f7d76c;
padding:0px 2px 1px 1px;}
.orange
{color:#f7bd00;
font-weight:bold;
margin-bottom:8px;
}
.noListTitle a
{color:#f7bd00;
font-weight:bold;

View File

@ -11,7 +11,6 @@ position:relative;
#leftColumn
{width:296px;
height:620px; /*SANJ to change height in JS according to screen*/
background-color:#FFF;
margin-top:-8px; /*had to give this because of shadow*/
margin-bottom:20px;
@ -417,11 +416,16 @@ z-index:1001;} /*must have the highest z-index, just more than the lightbox*/
width:960px;
min-height:500px;
background-color:#FFF;
-moz-border-radius:12px;
-webkit-border-radius:12px;
border-radius:12px;
margin-top:-8px;
margin-bottom:20px;
margin:0 auto;
border-top:1px solid #d3d3d3;
border-bottom:1px solid #d3d3d3;
-moz-box-shadow:2px 3px 20px #252425;
-webkit-box-shadow:2px 3px 20px #252425;
box-shadow:2px 3px 20px #252425;}

View File

@ -29,6 +29,12 @@ color:#8a8a8a;}
{font-weight:bold;
color:#f7bd00;}
.orange
{color:#f7bd00;
font-weight:bold;
margin-bottom:8px;
}
#search
{width:114px;
position:absolute;

View File

@ -1,50 +1,103 @@
#wooden
{width:100%;
height:680px;
background:url(/static/images/noel/wooden1.jpg) repeat;
display:table;
overflow:hidden;
position:relative;}
#regContent
{width:450px;
background-color:#FFF;
position:absolute;
right:0px;
left:0px;
display: table-cell; vertical-align: middle;margin:0 auto;
padding:30px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
border-radius:20px;
-moz-box-shadow:2px 3px 20px #252425;
-webkit-box-shadow:2px 3px 20px #252425;
box-shadow: 2px 3px 20px #252425;
margin-top:100px;}
table
{margin:0 auto;
margin-bottom:8px;}
th
{color:#8A8A8A;
font-weight:bold;}
.registerLink:link, .registerLink:visited, .registerLink:active
{text-decoration:none;
font-size:12px;
color:#8A8A8A;
font-weight:bold;
display:block;
padding-left:92px;
padding-bottom:12px;}
.registerLink:hover
{color:#F7BD00;
font-weight:bold;}
#wooden
{width:100%;
height:680px;
background:url(/static/images/noel/wooden1.jpg) repeat;
display:table;
overflow:hidden;
position:relative;
border-top:1px solid #d3d3d3;
border-bottom:1px solid #d3d3d3;
-moz-box-shadow:2px 3px 20px #252425;
-webkit-box-shadow:2px 3px 20px #252425;
box-shadow:2px 3px 20px #252425;}
#regContent
{width:450px;
background-color:#FFF;
position:absolute;
right:0px;
left:0px;
display: table-cell; vertical-align: middle;margin:0 auto;
padding:30px;
-moz-border-radius:20px;
-webkit-border-radius:20px;
border-radius:20px;
-moz-box-shadow:2px 3px 20px #252425;
-webkit-box-shadow:2px 3px 20px #252425;
box-shadow: 2px 3px 20px #252425;
margin-top:100px;
font-family:'Century Gothic', Arial, Helvetica, 'DejaVu Sans', sans-serif;
font-size:15px;
color:#737373;}
#notMember
{font-size:24px;
padding-bottom:18px;
text-align:center;}
.orangeForm
{color:#f7bd00;}
table
{margin:0 auto;
margin-bottom:8px;
font-weight:600;
}
.registerLink:link, .registerLink:visited, .registerLink:active
{text-decoration:none;
font-size:12px;
color:#8A8A8A;
font-weight:bold;
display:block;
padding-left:92px;
padding-bottom:12px;}
.registerLink:hover
{color:#F7BD00;
font-weight:bold;}
.errorlist
{font-size:12px;
color:#FF8400;}
#formItf input[type=text], #formItf input[type=password], #formItf textarea {
border:1px solid #e3e3e3;
padding:2px 2px 2px 4px;
width:200px;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
-moz-box-shadow:inset 2px 2px 6px #d7d7d7;
-webkit-box-shadow:inset 2px 2px 6px #d7d7d7;
box-shadow:inset 2px 2px 6px #d7d7d7;
margin-bottom:10px;}
#formItf textarea{
vertical-align:text-top;
}
#formItf input:focus
{outline:none;
border:1px solid #999;}
#formItf input[type=submit]
{background-color:#f7bd00;
color:#FFF;
font-size:14px;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
padding:3px 24px;
border:1px solid transparent;
margin-top:10px;}
#alreadyUser
{font-size:12px;
margin-left:70px;
}

View File

@ -1 +1,11 @@
boo
{% extends 'registration/register_base.html' %}
{% block reg_content %}
<form action="" method="POST" id="formItf">
<table>
{{ form.as_table }}
</table>
</form>
{% endblock %}

View File

@ -1,16 +1,16 @@
{% extends "noel/base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/register.css" />
{% endblock %}
{% block content %}
<div id="wooden">
<div id="regContent">
{% block reg_content %}
{% endblock %}
</div>
</div>
{% endblock %}
{% extends "noel/base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/register.css" />
{% endblock %}
{% block content %}
<div id="wooden">
<div id="regContent">
{% block reg_content %}
{% endblock %}
</div>
</div>
{% endblock %}

View File

@ -1,15 +1,18 @@
{% extends 'registration/register_base.html' %}
{% block reg_content %}
<form action="" method="POST">
<table>
{{ form.as_table }}
{% csrf_token %}
<tr>
<td colspan="2"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
{% endblock %}
{% extends 'registration/register_base.html' %}
{% block reg_content %}
<p id="notMember">Not a member? <span class="orangeForm">Register here.</span></p>
<form action="" method="POST" id="formItf">
<table>
{{ form.as_table }}
{% csrf_token %}
<tr>
<td colspan="2"><span id="alreadyUser">Already a user? <span class="orangeForm">Click here. </span></span><input type="submit" value="Submit" /></td>
</tr>
</table>
</form>
{% endblock %}

View File

@ -1,51 +1,53 @@
{% extends 'noel/base.html' %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/noel/inner.css" type="text/css" />
<link rel="stylesheet" href="/static/css/noel/inner-details.css" type="text/css" />
{% endblock %}
{% block content %}
<div id="searchContainer">
<div id="searchContent">
<h2>Search</h2>
<form method="get" action="." id="searchItf">
<table>
{{ form.as_table }}
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" value="Search">
</td>
</tr>
</table>
{% if query %}
<h3>Results</h3>
{% for result in page.object_list %}
<p>
<a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a>
</p>
{% empty %}
<p>No results found.</p>
{% endfor %}
{% if page.has_previous or page.has_next %}
<div>
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% else %}
{# Show some example queries to run, maybe query syntax, something else? #}
{% endif %}
</form>
</div><!-- SEARCH CONTENT CLOSING -->
</div><!-- SEARCH CONTAINER CLOSING -->
{% endblock %}
{% extends 'noel/base.html' %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/noel/inner.css" type="text/css" />
{% endblock %}
{% block content %}
<div id="centerInner">
<div id="searchContainer">
<div id="searchContent">
<h2>Search</h2>
<form method="get" action="." id="searchItf">
<table>
{{ form.as_table }}
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" value="Search">
</td>
</tr>
</table>
{% if query %}
<h3>Results</h3>
{% for result in page.object_list %}
<p>
<a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a>
</p>
{% empty %}
<p>No results found.</p>
{% endfor %}
{% if page.has_previous or page.has_next %}
<div>
{% if page.has_previous %}<a href="?q={{ query }}&amp;page={{ page.previous_page_number }}">{% endif %}&laquo; Previous{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}<a href="?q={{ query }}&amp;page={{ page.next_page_number }}">{% endif %}Next &raquo;{% if page.has_next %}</a>{% endif %}
</div>
{% endif %}
{% else %}
{# Show some example queries to run, maybe query syntax, something else? #}
{% endif %}
</form>
</div><!-- SEARCH CONTENT CLOSING -->
</div><!-- SEARCH CONTAINER CLOSING -->
</div><!-- CENTER INNER -->
{% endblock %}