{% load staticfiles %}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="format-detection" content="telephone=no,email=no,address=no">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <title>图集</title>

    <link href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.css" rel="stylesheet">
    <link href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/default-skin/default-skin.css" rel="stylesheet">

    <style>
        .halfscreen {
            width: 49%;
            box-sizing: border-box;
        }

        .halfscreen > img {
            width: 100%;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div>
    <div id="photos">
        <div id="left" class="halfscreen" style="float: left;">
            <img src="https://placekitten.com/600/400" data-idx="0">
            <img src="https://placekitten.com/1200/900" data-idx="2">
        </div>
        <div id="right" class="halfscreen" style="float: right;">
            <img src="https://placekitten.com/1200/900" data-idx="1">
            <img src="https://placekitten.com/600/400" data-idx="3">
        </div>
    </div>
</div>
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe.
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides.
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js"></script>
<script>
    $(function () {
        var pswpElement = document.querySelectorAll('.pswp')[0];
        // build items array
        var items = [
            {
                src: 'https://placekitten.com/600/400',
                w: 600,
                h: 400,
                a: 1,
                b: 2,
            },
            {
                src: 'https://placekitten.com/1200/900',
                w: 1200,
                h: 900,
                a: 1,
                b: 2,
            },
            {
                src: 'https://placekitten.com/1200/900',
                w: 1200,
                h: 900,
                a: 1,
                b: 2,
            },
            {
                src: 'https://placekitten.com/600/400',
                w: 600,
                h: 400,
                a: 1,
                b: 2,
            },

        ];
        // define options (if needed)
        var options = {
            // optionName: 'option value'
            // for example:
            loop: true,
            index: 1, // start at first slide
            // Tap on sliding area should close gallery'
            tapToClose: true,
        };
        // Initializes and opens PhotoSwipe
        $('#photos img').click(function () {
            options['index'] = parseInt($(this).attr('data-idx'));
            var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
            gallery.init();
        })
    })
</script>
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript" src="{% static 'pai2/js/jswe-0.0.4.js' %}"></script>
<script>
    V.initWxData({
        imgUrl: "http://pai.ai/static/pai2/img/paiai_96_96.png",
        link: 'http://pai.ai/w/o?r=http%3A%2F%2Fpai.ai%2Fp%2Floginqr',
        desc: "授权登录",
        title: "授权登录",
        timeLine: ""
    }, true);
    V.hideOptionMenu();
</script>
</body>
</html>