Commits

bcabezas  committed 8cae6d2

thumnails with fixed dimensions. todo: set dimensions on plugin

  • Participants
  • Parent commits 8b581a3

Comments (0)

Files changed (3)

File cmsplugin_nivoslider/models.py

         return "%s"  % name
     
     def thumb(self):
-        thumbnail_options = dict(size=(80, 80), crop=True)
+        thumbnail_options = dict(size=(92, 37), crop=True)
         url =  get_thumbnailer(self.image).get_thumbnail(thumbnail_options).url
         return '<img src="%s">' % url
     thumb.allow_tags = True
     thumb.short_description = 'Image'    
     
-    def url(self):
-        """href para templates que lo necesiten. Imagen a 1024"""    
-        thumbnail_options = dict(size=(1024, 800), crop=False)
-        url =  get_thumbnailer(self.image).get_thumbnail(thumbnail_options).url
-        return url
-    
     
 class SliderAlbum(models.Model):
     """Image gallery for slider"""

File cmsplugin_nivoslider/static/nivo/img/loading.gif

Added
New image

File cmsplugin_nivoslider/templates/nivo/slider.html

-{% load i18n sekizai_tags  %}
+{% load i18n sekizai_tags thumbnail  %}
 
 <div class="slider-wrapper theme-orman">
     <div class="logo"></div>
     <div id="slider" class="nivoSlider">
         {% for img in images %}
-            <img src="{{img.url}}" alt="{{img.name}}" title="{{img.description}}" />
+            <img src="{% thumbnail img.image 928x378 crop %}" alt="{{img.name}}" title="{{img.description}}" />
         {% endfor %}
     </div>
 </div> <!-- end slider-wrapper -->