]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/templates/news/roll.html
misc: run manage.py with python3
[panikweb.git] / panikweb_templates / templates / news / roll.html
index 414e78d8f0766c6e56668d2a958372a6a7be4161..8f33e2f839b6aa109d5089648de9dba2366e85ef 100644 (file)
@@ -1,32 +1,36 @@
-{% load thumbnails %}{% load i18n %}
+{% load thumbnail i18n paniktags %}
 <div id="newsRoll">
        <div class="newsRoll center cf">
                <ul id="ticker" class="custom bigNews marged" style="height:300px;overflow:hidden;">
-                       {% for content in news %}
+                       {% for focus in news %}
                                <li 
-                    id="newsRollId-{{ content.slug }}"
+                    id="newsRollId-{{ focus.id }}"
                     class="">
                                        <a 
-                        style="max-width:100%;height:300px;background: no-repeat 50% 50% url('{{ content.image|thumbnail:'800x600' }}');" 
-                        class="block news relative" 
-                        href="{% url 'newsitem-view' slug=content.slug %}">
-                                               {% if content.category %}
+                   {% thumbnail focus.content_image "500x375" crop="50% 25%" as im %}
+                        style="max-width:100%;height:300px;background: no-repeat 50% 50% url('{{im.url}}');"
+                       {% endthumbnail %}
+                        class="block news relative"
+                       href="{{ focus|get_focus_url }}">
+                                               {% if focus.content_category_title %}
                                                        <div class="label labels absolute">
-                                                               <span class="item inBlock">{{ content.category.title }}</span>
+                                                               <span class="item inBlock">{{ focus.content_category_title }}</span>
                                                        </div>  
                                                {% endif %}
 
-                                               <div class="title"><div>{{ content.title }}</div></div>
+                                               <div class="title"><div>{{ focus.focus_title }}</div></div>
                                        </a>
                                </li>
                        {% endfor %}
                </ul>
         <div class="marged">
                    <ul class="custom distributed by3 padded" id="roller">
-                           {% for content in news|slice:'0:3' %}
+                           {% for focus in news %}
                                    <li style="width:30%;" class="num-{{ forloop.counter }} padded">
-                                           <button class="inBlock" data-about="#newsRollId-{{ content.slug }}">
-                                                   <img style="width:95%;" src="{{ content.image|thumbnail:'160x120' }}" />
+                                           <button class="inBlock" data-about="#newsRollId-{{ focus.id }}">
+                                                   {% thumbnail focus.content_image "160x120" crop="50% 25%" as im %}
+                                                   <img alt="" style="width:95%;" src="{{im.url}}" />
+                                                   {% endthumbnail %}
                                            </button>
                                    </li>
                            {% endfor %}