From 1bf0f8f98c4ff77e42fd9652d339b645f654f628 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 11 Feb 2011 04:34:26 +0530 Subject: [PATCH] added files for front-end testing --- edgware/main/__init__.py | 0 edgware/main/models.py | 3 + edgware/main/tests.py | 23 +++++ edgware/main/views.py | 8 ++ edgware/settings.py | 1 + edgware/static/css/main.css | 130 ++++++++++++++++++++++++++++ edgware/static/css/main/contact.css | 34 ++++++++ edgware/static/css/main/home.css | 19 ++++ edgware/static/js/main.js | 14 +++ edgware/templates/base.html | 4 +- edgware/templates/main/contact.html | 89 +++++++++++++++++++ edgware/templates/main/home.html | 23 +++++ edgware/templates/main_base.html | 62 +++++++++++++ edgware/urls.py | 2 + 14 files changed, 411 insertions(+), 1 deletion(-) create mode 100644 edgware/main/__init__.py create mode 100644 edgware/main/models.py create mode 100644 edgware/main/tests.py create mode 100644 edgware/main/views.py create mode 100644 edgware/static/css/main.css create mode 100644 edgware/static/css/main/contact.css create mode 100644 edgware/static/css/main/home.css create mode 100644 edgware/static/js/main.js create mode 100644 edgware/templates/main/contact.html create mode 100644 edgware/templates/main/home.html create mode 100644 edgware/templates/main_base.html diff --git a/edgware/main/__init__.py b/edgware/main/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/edgware/main/models.py b/edgware/main/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/edgware/main/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/edgware/main/tests.py b/edgware/main/tests.py new file mode 100644 index 0000000..2247054 --- /dev/null +++ b/edgware/main/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/edgware/main/views.py b/edgware/main/views.py new file mode 100644 index 0000000..2bd4dee --- /dev/null +++ b/edgware/main/views.py @@ -0,0 +1,8 @@ +# Create your views here. +from django.shortcuts import render_to_response + +def home(request): + return render_to_response("main/home.html") + +def contact(request): + return render_to_response("main/contact.html") diff --git a/edgware/settings.py b/edgware/settings.py index bea8461..762c859 100644 --- a/edgware/settings.py +++ b/edgware/settings.py @@ -98,6 +98,7 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'files', 'editor', + 'main', 'tagging', 'django_extensions', 'django.contrib.flatpages', diff --git a/edgware/static/css/main.css b/edgware/static/css/main.css new file mode 100644 index 0000000..fcfb788 --- /dev/null +++ b/edgware/static/css/main.css @@ -0,0 +1,130 @@ +body, html { + margin: 0px; + padding: 0px; + font-family: "DejaVu Sans", Arial, Verdana, sans-serif; + width: 100%; + height: 100%; +} + +h1, h2, h3, h4, p { + margin: 0px; + padding: 0px; +} + +#wrapper { + width: 100%; + height: 100%; +} + +ul { + list-style-type: none; +} + +#header { + width: 100%; + height: 100px; + color: #fff; + background: #684923; + position: relative; +} + + +#mainTitle { + position: absolute; + left: 100px; + top: 25px; + width: 200px; +} + +#mainTitle h1 { + font-size: 20px; + font-weight: bold; +} + +#mainTitle h1 a { + color: #fff; + text-decoration: none; +} + +#mainTitle h1 a:hover { + color: #ffff00; +} + +#pageTitle { + position: absolute; + left: 400px; + top: 25px; +} + +#pageTitle h2 { + font-size: 20px; + font-weight: bold; +} + +#intro { + position: absolute; + right: 100px; + top: 30px; +} + +#intro p { + float: left; + width: 200px; + font-size: 11px; +} + +#introPara1 { + margin-right: 15px; +} + +#content { + height: 450px; + overflow-y: auto; +} + +#footer { + position: absolute; + height: 80px; + bottom: 0px; + width: 100%; + background: #684923; +} + +#footer a { + color: #fff; + font-weight: bold; + text-decoration: none; +} + +#footer a:hover { + color: #FFC0CB; +} + +#nav { + width: 80%; + margin-left: auto; + margin-right: auto; + top: 50px; +} + +#footer ul li { + float: left; + margin-right: 30px; +} + +#logo { + position: absolute; + bottom: 10px; + right: 10px; +} + +#logo a { + color: #fff; + font-size: 18px; + font-weight: bold; + text-decoration: none; +} + +#logo a:hover { + color: #000; +} diff --git a/edgware/static/css/main/contact.css b/edgware/static/css/main/contact.css new file mode 100644 index 0000000..721a75d --- /dev/null +++ b/edgware/static/css/main/contact.css @@ -0,0 +1,34 @@ +.centerWrapper { + width: 90%; + margin-left: auto; + margin-right: auto; + padding-top: 15px; + color: #393939; +} + +.centerContent { + float: left; + width: 30%; +} + +h3 { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 24px; +} + +h4 { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 16px; + margin-top: 32px; +} + +.centerContent p { + margin-bottom: 10px; +} + +.middleContent { + margin-left: 20px; + margin-right: 40px; +} diff --git a/edgware/static/css/main/home.css b/edgware/static/css/main/home.css new file mode 100644 index 0000000..2eed294 --- /dev/null +++ b/edgware/static/css/main/home.css @@ -0,0 +1,19 @@ +.centerSentence { + color: #393939; + font-size: 48px; + width: 800px; + height: 350px; + position: relative; + top: 50%; + margin-top: -175px; + margin-left: auto; + margin-right: auto; +} + +.centerSentence a { + color: #393939; +} + +.centerSentence a:hover { + color: #FF00DB; +} diff --git a/edgware/static/js/main.js b/edgware/static/js/main.js new file mode 100644 index 0000000..6c86a36 --- /dev/null +++ b/edgware/static/js/main.js @@ -0,0 +1,14 @@ +$(document).ready(function() { + + $(window).resize(function() { + var headerHeight = $('#header').height(); + var footerHeight = $('#footer').height(); + var contentHeight = $(window).height() - (headerHeight + footerHeight); +// alert(contentHeight); + $('#content').css({'height': contentHeight + "px"}); + }); + + $(window).trigger("resize"); +}); + + diff --git a/edgware/templates/base.html b/edgware/templates/base.html index f8f2181..9d9709f 100644 --- a/edgware/templates/base.html +++ b/edgware/templates/base.html @@ -1,11 +1,13 @@ + + {% block head %} {% endblock %} - {% block content %} + {% block body %} {% endblock %} diff --git a/edgware/templates/main/contact.html b/edgware/templates/main/contact.html new file mode 100644 index 0000000..2db24e1 --- /dev/null +++ b/edgware/templates/main/contact.html @@ -0,0 +1,89 @@ +{% extends 'main_base.html' %} +{% block title %} Contact {% endblock %} +{% block extra_head %} + +{% endblock %} + +{% block pageTitle %} Contact {% endblock %} + +{% block content %} +
+
+

Contact

+

+ For more information come to
+ the Centre for Possible Studies
+ 64 Seymour Street
+ London W1H 5BH
+

+

+ + 44 (0) 20 7298 1535 +

+

+ Opening Hours
+ Wednesday–Saturday 2–5pm +

+

+ Janna Graham, Project Curator
+ jannag@serpentinegallery.org +

+

+ Amal Khalaf, Edgware Road
+ Project Assistant
+ amalk@serpentinegallery.org +

+

+ Google Map goes here. +

+
+
+

About

+

+ C.A.M.P. is a Mumbai based collective that +tests the groundcbetween art and the public. +Working with people involved in the infrastruc- +tures of water, cable tv and the internet C.A.M.P. +have created edgwareroad.org, an open pub- +lishing platform for local research to be +distributed as journals, placemats, pamphlets +and webcasts. their residency is a +collaboration with Gasworks and +the Arts Catalyst. +

+

+

Artists

+ CAMP
+ Susan Hefuna
+ Lamia Joreige
+ Hiwa K
+ no.w.here, with actors Khalid
+ Abdalla & Cressida Trew
+ Marwan Rechmaoui
+ Wael Shawky
+ Rania Stephan
+ Ultra-red + +

+ +
+
+

Partners

+

+ Al Arez, London
+ Arts Catalyst, London
+ Church Street Neighbourhood Centre
+ Cinenova. London
+ Delfina Foundation, London
+ Freqout!, London
+ Gasworks, London
+ Al Shishawi, London
+ St. Marylebone School, London
+ The Showroom Gallery, London
+ Westminster Academy, London
+ XTalk, London +

+
+
+ +{% endblock %} + diff --git a/edgware/templates/main/home.html b/edgware/templates/main/home.html new file mode 100644 index 0000000..d3743e2 --- /dev/null +++ b/edgware/templates/main/home.html @@ -0,0 +1,23 @@ +{% extends 'main_base.html' %} + +{% block title %} + Home +{% endblock %} + +{% block extra_head %} + +{% endblock %} + +{% block pageTitle %} + +{% endblock %} + +{% block content %} +
+ Welcome to the Edgware Road Project. + Here you can create a publication or + browse the archive of past works + created by the artists involved. +
+ +{% endblock %} diff --git a/edgware/templates/main_base.html b/edgware/templates/main_base.html new file mode 100644 index 0000000..5323ffe --- /dev/null +++ b/edgware/templates/main_base.html @@ -0,0 +1,62 @@ +{% extends 'base.html' %} +{% block head %} + + + EdgwareRoad: {% block title %} {% endblock %} + {% block extra_head %} + + {% endblock %} +{% endblock %} + +{% block body %} +
+ +
+ {% block content %} {% endblock %} +
+ + +
+ +{% endblock %} diff --git a/edgware/urls.py b/edgware/urls.py index 6ec2d0c..fcee907 100644 --- a/edgware/urls.py +++ b/edgware/urls.py @@ -10,6 +10,8 @@ admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^edge/', include('edge.foo.urls')), + (r'^sandbox$', 'main.views.home'), + (r'^sandbox/contact$', 'main.views.contact'), (r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}), (r'^robots.txt(?P)$', 'django.views.static.serve', { 'document_root' : "/home/itf/soc/edgware/static/txt/robots.txt" } ), # Uncomment the admin/doc line below and add 'django.contrib.admindocs'