Gallerific template for django-photologue

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
                <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.galleriffic.js"></script>
                <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.opacityrollover.js"></script>
                <!-- We only want the thunbnails to display when javascript is disabled -->
                <script type="text/javascript">
                        document.write('<style>.noscript { display: none; }</style>');
                </script>
                <h1>Media</h1>
                                <!-- Start Advanced Gallery Html Containers -->
                                <div id="gallery" class="content">
                                        <div id="controls" class="controls"></div>
                                        <div class="slideshow-container">
                                                <div id="loading" class="loader"></div>
                                                <div id="slideshow" class="slideshow"></div>
                                        </div>
                                        <div id="caption" class="caption-container"></div>
                                </div>
                                <div id="thumbs" class="navigation">
                                        <ul class="thumbs noscript">
                                                {% for photo in gallery.public %}
                                                <li>
                                                <a class="thumb" name="{{ photo.title }}" title="{{ photo.title }}" href="{{ photo.get_display_url }}"><img src="{{ photo.get_thumbnail_url }}" alt="{{ photo.title }}"/></a>
                                                <div class="caption">
                                                                <div class="download">
                                                                        <a href="{{ photo.get_large_url }}">Download Original</a>
                                                                </div>
                                                                <div class="image-title">{{ photo.title }}</div>
                                                                <div class="image-desc">Test{{ photo.caption }}</div>
                                                        </div>
                                                </li>
                                                {% endfor %}
                                        </ul>
                                </div>
                                <div style="clear: both;"></div>
                <script type="text/javascript">
                        jQuery(document).ready(function($) {
                                // We only want these styles applied when javascript is enabled
                                $('div.navigation').css({'width' : '250px', 'float' : 'left'});
                                $('div.content').css('display', 'block');

                                // Initially set opacity on thumbs and add
                                // additional styling for hover effect on thumbs
                                var onMouseOutOpacity = 0.67;
                                $('#thumbs ul.thumbs li').opacityrollover({
                                        mouseOutOpacity:   onMouseOutOpacity,
                                        mouseOverOpacity:  1.0,
                                        fadeSpeed:         'fast',
                                        exemptionSelector: '.selected'
                                });

                                // Initialize Advanced Galleriffic Gallery
                                var gallery = $('#thumbs').galleriffic({
                                        delay:                     2500,
                                        numThumbs:                 4,
                                        preloadAhead:              10,
                                        enableTopPager:            true,
                                        enableBottomPager:         true,
                                        maxPagesToShow:            7,
                                        imageContainerSel:         '#slideshow',
                                        controlsContainerSel:      '#controls',
                                        captionContainerSel:       '#caption',
                                        loadingContainerSel:       '#loading',
                                        renderSSControls:          true,
                                        renderNavControls:         true,
                                        playLinkText:              'Play Slideshow',
                                        pauseLinkText:             'Pause Slideshow',
                                        prevLinkText:              '&lsaquo; Previous Photo',
                                        nextLinkText:              'Next Photo &rsaquo;',
                                        nextPageLinkText:          'Next &rsaquo;',
                                        prevPageLinkText:          '&lsaquo; Prev',
                                        enableHistory:             false,
                                        autoStart:                 false,
                                        syncTransitions:           true,
                                        defaultTransitionDuration: 900,
                                        onSlideChange:             function(prevIndex, nextIndex) {
                                                // 'this' refers to the gallery, which is an extension of $('#thumbs')
                                                this.find('ul.thumbs').children()
                                                        .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
                                                        .eq(nextIndex).fadeTo('fast', 1.0);
                                        },
                                        onPageTransitionOut:       function(callback) {
                                                this.fadeTo('fast', 0.0, callback);
                                        },
                                        onPageTransitionIn:        function() {
                                                this.fadeTo('fast', 1.0);
                                        }
                                });
                        });
                </script> 

More like this

  1. Flow player template for django-cms file plugin by justhamade 4 years, 2 months ago
  2. Media RSS generation for Photologue by ltvolks 4 years, 9 months ago
  3. When you can't return a response object, throw it by motiejus 2 years, 7 months ago
  4. Using Django Generics with Jinja2 by rmt 5 years, 4 months ago
  5. Allow template tags in a Flatpage's content by kylefox 5 years, 9 months ago

Comments

(Forgotten your password?)