From 2d7f9e855a102ad4a3a477f060b9992caacaa279 Mon Sep 17 00:00:00 2001
From: Sanj
Date: Fri, 7 Oct 2011 02:55:56 +0530
Subject: [PATCH] todos 1-6
---
urbstudio/static/js/pronit.js | 22 ++++++++++++++++++++
urbstudio/templates/links.html | 15 +++++---------
urbstudio/templates/noteworthy.html | 31 ++++++++++-------------------
urbstudio/templates/projects.html | 9 +++++++--
urbstudio/urb/views.py | 8 ++++++--
5 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/urbstudio/static/js/pronit.js b/urbstudio/static/js/pronit.js
index 918affa..0b8482a 100755
--- a/urbstudio/static/js/pronit.js
+++ b/urbstudio/static/js/pronit.js
@@ -1,5 +1,27 @@
$(document).ready(function() {
$('#logo').fadeIn(4000);
+
+ $(window).resize(function() {
+ var width = $(this).width();
+ var $names = $('#names');
+ if (width < 1024) {
+ if ($names.is(":visible")) {
+ $('#names').hide();
+ }
+ } else {
+ if (!$names.is(":visible")) {
+ $('#names').show();
+ }
+ }
+ });
+
+ highlightMenuSelected();
});
+function highlightMenuSelected() {
+ var thisPage = window.location.pathname.substring(1);
+ $('#menu a[href=' + thisPage + ']').addClass("menuSelected");
+}
+
+
diff --git a/urbstudio/templates/links.html b/urbstudio/templates/links.html
index 9e359c0..229bf81 100755
--- a/urbstudio/templates/links.html
+++ b/urbstudio/templates/links.html
@@ -9,18 +9,13 @@
{% endblock %}
{% block inner_content %}
-
Title
+ {% for l in links %}
+ {{ l.title }}
- This is dummy text about a beautiful architectural website.
+ {{ l.description }}
- www.link.com
-
-
- Title
-
- This is dummy text about a beautiful architectural website.
-
- www.link.com
+ {{ l.url }}
+ {% endfor %}
{% endblock %}
diff --git a/urbstudio/templates/noteworthy.html b/urbstudio/templates/noteworthy.html
index 9afd985..7fa20c8 100755
--- a/urbstudio/templates/noteworthy.html
+++ b/urbstudio/templates/noteworthy.html
@@ -43,27 +43,18 @@ height:150px;
Read more
-
-
-
-
Title
-
-
This is dummy text about a beautiful architectural website.
-
-
Read more
-
-
-
-
-
-
Title
-
-
This is dummy text about a beautiful architectural website.
-
-
Read more
-
-
+ {% for n in noteworthy %}
+
+
+
{{ n.title }}
+
+
{{ n.description }}
+
+
{{ n.url }}
+
+
+ {% endfor %}
{% endblock %}
diff --git a/urbstudio/templates/projects.html b/urbstudio/templates/projects.html
index 6742ff9..b3714fa 100755
--- a/urbstudio/templates/projects.html
+++ b/urbstudio/templates/projects.html
@@ -39,7 +39,12 @@
$('#projectTitle').next().text(data.title);
$('#projectSizeProgram').next().html(nl2br(data.size_program));
$('#projectDesignStatement').next().html(nl2br(data.design_statement));
- $('#projectExtraText').next().html(nl2br(data.extra_text));
+ if (data.extra_text == '') {
+ $('#projectExtraText').hide();
+ $('#projectExtraText').next().hide();
+ } else {
+ $('#projectExtraText').show().next().html(nl2br(data.extra_text)).show();
+ }
});
});
@@ -116,4 +121,4 @@
{% endthumbnail %}
{% endfor %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/urbstudio/urb/views.py b/urbstudio/urb/views.py
index fdbbbac..3c14a07 100755
--- a/urbstudio/urb/views.py
+++ b/urbstudio/urb/views.py
@@ -29,7 +29,11 @@ def contact(request):
return render_to_response("contact.html", {})
def links(request):
- return render_to_response("links.html", {})
+ return render_to_response("links.html", {
+ 'links': Link.objects.all()
+ })
def noteworthy(request):
- return render_to_response("noteworthy.html", {})
+ return render_to_response("noteworthy.html", {
+ 'noteworthy': Noteworthy.objects.all()
+ })