Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ed4a8d7a88
Fetching contributors…

Cannot retrieve contributors at this time

file 161 lines (141 sloc) 7.251 kb
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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
<html>

<head>

    <link href='http://fonts.googleapis.com/css?family=Dawning+of+a+New+Day|Satisfy' rel='stylesheet' type='text/css'>

    <script type="text/javascript" src="lib/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="lib/jquery-ui-1.8.19.custom.min.js"></script>

    <script type="text/javascript">

        $.fn.windowizer = function () {
            var width = $(this).width();
            var $divs = $(this).children();
            var height = Math.max($(this).height(), $divs.first().height(), $divs.last().height());
            var height = $(this).height();
            $(this).css('position', 'relative');
            $divs.css({
                position: 'absolute',
                top: 0,
                width: width,
                height: height,
                zIndex: 10,
                backgroundColor: '#333'
            });
            var $first = $divs.first();
            var $last = $divs.last();
            $first.css('left',0);
            $last.css('right',0);
            $('img', $first).css('float', 'left');
            $('img', $last).css('float', 'right');

            $divs.each(function () {
                var title = $(this).attr('title');
                if (title) {
                    var $header = $('<div></div>').addClass('header').css(
                            {
                                zIndex: 51,
                                color: 'white',
                                backgroundColor: 'transparent'
                            }
                    );
                    var $screen = $('<div></div>').addClass('screen').css(
                            {
                                zIndex: 50,
                                color: 'white',
                                backgroundColor: 'black',
                                opacity:.3,
                            }
                    );
                    $header.add($screen).text(title).appendTo(this).css({
                        position: 'absolute',
                        top: 0,
                        left: 0,
                        width: width - 80,
                        padding: '0 40px',
                        height:'90px',
                        font: $(this).attr('data-title-font'),
// '-webkit-transform': 'rotate(-90deg)',
                        textAlign: 'left'
                    });
                }
            });
            $('.header,.screen', $last).css('text-align', 'right');



// $last.css('text-align', 'right');

            var $wrapper = $last.wrap('<div></div>').parent();
            $wrapper.css({
                position: 'absolute',
                'border-left': '1px solid black',
                overflow: 'hidden',
                width: '50%',
                height: height,
                right: 0,
                top: 0,
                backgroundColor: 'black'
            });
            var handleWidth = 20;
            var $handle = $('<div></div>').addClass('handle');
            $handle.css({
                position: 'absolute',
                top: 0,
                left: '50%',
                width: handleWidth,
                height: height,
                backgroundColor: 'gray',
                zIndex: 100
            }).prependTo(this);
            $handle.draggable({axis: 'x',
                drag: function (e) {
                    var percent = Math.floor(100 - (e.pageX - handleWidth / 2) / width * 100);
// console.log(e);
                    $wrapper.css('width', '' + percent + '%');
                }
            });

        }

        $(window).on('load', function () {
            $('.window').windowizer();
        });

    </script>
    <style>
        html, body {
            padding: 0;
            margin: 0
        }

        .handle {
            background-image: linear-gradient(left, rgb(153, 185, 255) 13%, rgb(76, 136, 255) 52%, rgb(153, 185, 255) 84%);
            background-image: -o-linear-gradient(left, rgb(153, 185, 255) 13%, rgb(76, 136, 255) 52%, rgb(153, 185, 255) 84%);
            background-image: -moz-linear-gradient(left, rgb(153, 185, 255) 13%, rgb(76, 136, 255) 52%, rgb(153, 185, 255) 84%);
            background-image: -webkit-linear-gradient(left, rgb(153, 185, 255) 13%, rgb(76, 136, 255) 52%, rgb(153, 185, 255) 84%);
            background-image: -ms-linear-gradient(left, rgb(153, 185, 255) 13%, rgb(76, 136, 255) 52%, rgb(153, 185, 255) 84%);

            background-image: -webkit-gradient(linear, left top, right top, color-stop(0.13, rgb(153, 185, 255)), color-stop(0.52, rgb(76, 136, 255)), color-stop(0.84, rgb(153, 185, 255)));
        }
    </style>
</head>

<body>

<div class="window">
    <div title="me" data-title-font="180px/45px 'Dawning of a New Day', cursive">
        <img src="http://farm8.staticflickr.com/7191/6842869242_a2a229d074_z.jpg" width='50%'>
        <img src="http://farm8.staticflickr.com/7180/6842868030_f18b577bef_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7201/6842869758_8d7b6d6b36_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7129/7058207793_f8574e478b_z.jpg" width='33%'>
        <img src="http://farm6.staticflickr.com/5032/6912124736_39dba85091_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7194/6822450766_c91dc8c4da_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7209/6831879954_5e8dd9de13_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7191/7058213089_90ee99e4ff_z.jpg" width='33%'>
        <img src="http://farm6.staticflickr.com/5197/7058218081_3d48e0406e_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7153/6696642261_2b4bbe0d94_n.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7144/6683030619_849980b5f6.jpg" width='25%'>
        <img src="http://farm8.staticflickr.com/7001/6651078581_ffd30df454_z.jpg" width='50%'>
        <img src="http://farm8.staticflickr.com/7259/6920718652_cab4379c41_z.jpg" width='50%'>
    </div>
    <div title="my inspirations" data-title-font="60px/90px 'Satisfy', cursive">
        <img src="http://farm8.staticflickr.com/7119/7016640681_5d3696a806_z.jpg" width='50%'>
        <img src="http://farm8.staticflickr.com/7102/6881766642_32a6b19f4b_z.jpg" width='33%'>
        <img src="http://farm8.staticflickr.com/7238/6916883512_b7b902a6c5.jpg" width='33%'>
        <img src="http://farm7.staticflickr.com/6032/7022832853_bf57d7fd66_z.jpg" width='25%'>
        <img src="http://farm8.staticflickr.com/7086/7023513387_8760a79072_z.jpg" width='25%'>
        <img src="http://modcloth.files.wordpress.com/2012/04/frames.jpg" width='50%'>
        <img src="http://modcloth.files.wordpress.com/2012/04/ff.jpg?w=600&h=410" width='50%'>
        <img src="http://modcloth.files.wordpress.com/2012/04/dailyshirley.jpg" width='50%'>
        <img src="http://modcloth.files.wordpress.com/2012/04/just-married.jpg" width='50%'>
        <img src="http://farm8.staticflickr.com/7126/6893492858_076598f425_z.jpg" width='50%'>
        <img src="http://farm8.staticflickr.com/7276/7034041435_5bd1cb8bbc_z.jpg" width='50%'>
    </div>
</div>


</body>

</html>
Something went wrong with that request. Please try again.