Commits

Sergio Berlotto  committed 2c4a11d

Galeria

  • Participants
  • Parent commits 3b57505

Comments (0)

Files changed (5)

+.pyc
+django-filebrowser==3.3.0

File templates/menubar.html

 <li><a href="/">Início</a></li>
 <li><a href="/blog">Blog</a> 
-<li><a href="/fotos">Fotos</a></li>
-<li><a href="/blog/gallery/list">Fotoss</a></li> 
+<!--li><a href="/fotos">Fotos</a></li-->
+<li><a href="/blog/gallery/list">Fotos</a></li> 
 <li>
  <a href="/livro">Livro</a>
  <div style="width: 250px;">

File templates/website/gallery.html

+{% extends "_base.html" %}
+<!-- start main content -->
+{% block content %}
+{% if gallerias %}
+<div class="postbox">
+<div id="story-name-{{ gallery.id }}" class="span-6 first">
+  <p class="story_name"><h2>{{ gallery.title }}</h2></p>
+  <hr />
+</div>
+<div id="story-body-{{ gallery.id }}" class="span-18 last">
+  {{ gallery.body|safe }}
+  <br>
+  <br>
+       {% for photo in gallery.photo_set.all %}
+       
+       <a href="{{ MEDIA_URL }}{{ photo.image }}" class='fancybox' rel='grupo{{ gallery.id }}' title='{{ photo.title }}'> 
+       <img src="{{ photo.image.thumb_url }}" alt="" title="{{ photo.title }}" />
+       <span class='photo_desc'>{{photo.caption}}</span>
+       </a>
+       
+       {% if forloop.last %}
+        </p>
+       {% endif %}
+     {% endfor %}
+  <hr />
+  <div class="small">Created {{ gallery.created|date:"m/d/y @ h:iA T" }} by {{ gallery.owner }}</div>
+  <div class="story_cat"><u>Categories</u>:
+   {% for x in gallery.category.all %}<a href="{{ x.get_absolute_url }}">{{ x }}</a> {% endfor %}
+  </div>
+  <!-- start tags -->
+  <div class="tags"><u>Tags</u>: {% for tag in gallery.get_tags %}
+   <a href="/tags/{{ tag }}">{{ tag }}</a>
+  {% endfor %}</div>
+  <!-- end tags -->
+  <hr />
+  <!-- start comments -->
+{% if gallery.enable_comments %}
+</div>
+</div>
+{% load get_setting %}
+{% get_setting "DJANGO_COMMENTS" "django_comments" %}
+  {% if django_comments %}
+    {% load comments %}
+    {% get_comment_list for gallery as post_comments %}
+    {% for comment in post_comments %}
+      {{ comment }}
+    {% endfor %}
+    {% render_comment_form for posts %} 
+  {% else %}
+    {% load disqus_tags %}
+    {% disqus_show_comments %}
+  {% endif %}
+{% endif %}
+  <!-- end comments -->
+<script type="text/javascript">
+	$(document).ready(function() {
+$(".fancybox").fancybox({
+    closeBtn        : false,
+        buttons : {
+            position: 'top'
+            },
+    helpers:  {
+        title : {
+            type : 'float'
+        },
+        overlay : {
+            css : {
+                'background-color' : '#fff'
+            }
+        }
+    }
+});
+	});
+</script>
+{% endif %}
+{% endblock %}
+<!-- end main content -->
+

File templates/website/gallery_list.html

+{% extends "_base.html" %}
+{% load navbar %}
+<!-- start main content -->
+{% block content %}
+<div id="main-blog">
+    <h1>Galeria: {{galeria.title}}</h1>
+    <h3>{{galeria.description}}</h3>
+    <p>Fotos:{{galeria.photos}}, Vídeos:{{galeria.videos}}</p>
+    {% for foto in fotos %}
+
+		 <div class="gallery-img">
+			<a href="{{ foto.normal }}" class='fancybox' rel='grupo{{ galeria.id }}' ><img src="{{ foto.thumb }}"
+			alt="{{ foto.title }}" title='{{ foto.title|safe }}' /></a>
+			<div class='gallery-img-desc'>{{ foto.title|safe }}</div>
+		 </div>
+		 
+    {% endfor %}
+    <!-- start pagination -->
+</div>
+{% endblock %}
+<!-- end main content -->
+
+<script type="text/javascript">
+	$(document).ready(function() {
+		$(".fancybox").fancybox({
+		    closeBtn        : false,
+		        buttons : {
+		            position: 'top'
+		            },
+		    helpers:  {
+		        title : {
+		            type : 'float'
+		        },
+		        overlay : {
+		            css : {
+		                'background-color' : '#fff'
+		            }
+		        }
+		    }
+		});
+	});
+</script>
+
+{% block side %}
+<div id="sidebar-blog">
+	{% sidebar %}
+</div>
+{% endblock %}