sliderimgs

This commit is contained in:
unknown 2011-10-09 11:26:42 -04:00
commit ce1f805b6c
9 changed files with 34 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

@ -10,7 +10,9 @@ $(function(){
$('.selected').removeClass("selected");
$this.addClass("selected");
var project_id = $this.attr("data-id");
// doProjectLoading();
$.getJSON("project_json", {'id': project_id}, function(data) {
location.hash = data.slug;
$('#projectTitle').next().text(data.title);
$('#projectSizeProgram').next().html(nl2br(data.size_program));
$('#projectDesignStatement').next().html(nl2br(data.design_statement));
@ -29,9 +31,21 @@ $(function(){
});
});
$('.projectThumb').eq(0).click();
var hash = location.hash;
if (hash == '') {
$('.projectThumb').eq(0).click();
} else {
var $thumb = $('#thumb_' + hash);
if ($thumb.length > 0) {
$thumb.click();
} else {
$('.projectThumb').eq(0).click();
}
}
});
function getA(image) {
var $a = $('<a />').attr("href", "#");
var $img = $('<img />').attr("src", image.url).appendTo($a);
@ -41,7 +55,7 @@ function getA(image) {
function activateSlides() {
$('#slidesDiv').slides({
preload: true,
preloadImage: 'img/loading.gif',
preloadImage: '/static/images/loading.gif',
pagination: false, //SANJ NOT WORKING
play: 5000,
pause: 4000,

View File

@ -8,7 +8,7 @@
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="keywords" content="Urban Studio, Architecture Firm, Interiors, Commercial, Industrial, Residential, Hospitality, Retail, Pronit Nath, Amisha Nath, Mumbai, India" />
<link rel="shortcut icon" href="/static/images/favicon.ico" />
{% block extra_meta %}
<meta name="title" content="Urban Studio{% block extra_meta_content %} {% endblock %}" />
<meta name="description" content="Urban Studio: An Architecture and Interiors Firm in Mumbai" />

View File

@ -10,11 +10,9 @@
{% block inner_content %}
{% for l in links %}
<p class="orange"><strong>{{ l.title }}</strong></p>
<p class="orange"><strong><a href="{{ l.url }}">{{ l.title }}</a></strong></p>
<br>
<p>{{ l.description }}</p>
<br>
<a href="{{ l.url }}">{{ l.url }}</a>
<br><br><br>
{% endfor %}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% extends 'inner.html' %}
{% load thumbnail %}
{% block title %} | Noteworthy {% endblock %}
@ -32,12 +33,17 @@ height:150px;
{% block inner_content %}
<div class="noteworthy">
<br><br><br>
</div><!--NOTEWORTHY CLOSING -->
{% for n in noteworthy %}
<div class="noteworthy">
<div class="noteworthy">
{% thumbnail n.image "200x150" crop='center' as im %}
<img src="{{ im.url }}" width="200" height="150" alt="" class="imgLinks">
{% endthumbnail %}
<p class="orange"><strong><a href="{{ n.url }}">{{ n.title }}</a></strong></p>
<br>
<p>{{ n.description }}</p>
<br><br><br>
</div><!--NOTEWORTHY CLOSING -->
{% endfor %}

View File

@ -78,7 +78,7 @@
{% load thumbnail %}
{% for p in projects %}
{% thumbnail p.thumb_image "100x100" crop="center" as im %}
<li><img src="{{ im.url }}" data-id="{{ p.id }}" width="100" height="100" class="projectThumb" /></li>
<li><img id="thumb_{{ p.slug }}" src="{{ im.url }}" data-id="{{ p.id }}" width="100" height="100" alt="{{ p.title }}" title="{{ p.title }}" class="projectThumb" /></li>
{% endthumbnail %}
{% endfor %}
</ul>

View File

@ -17,6 +17,9 @@ class Project(models.Model):
# end_date = models.DateField(blank=True)
# location = models.CharField(max_length=255, blank=True)
class Meta:
ordering = ['-id']
def get_info(self):
return {
'id': self.id,

View File

@ -20,7 +20,7 @@ urlpatterns = patterns('',
(r'^noteworthy$', 'urb.views.noteworthy'),
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^favicon.ico$', 'django.views.generic.simple.redirect_to', {'url': '/static/images/favicon.png'}),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)