diff options
Diffstat (limited to 'ihatemoney')
29 files changed, 1137 insertions, 23 deletions
diff --git a/ihatemoney/static/css/main.css b/ihatemoney/static/css/main.css index 7d91c38..ec1481b 100644 --- a/ihatemoney/static/css/main.css +++ b/ihatemoney/static/css/main.css @@ -50,16 +50,28 @@ body { font-size: 2.4em; } -#header .tryout { - margin-right: 10em; +#header .tryout, #header .showcase { color: #fff; background-color: #414141; border-color: #414141; + margin-left: 3px; + margin-right: 3px; } -#header .tryout:hover { +#header .tryout:hover, #header .showcase:hover { background-color: #606060; border-color: #606060; + cursor: pointer; +} + +#header .showcaseimg { + width: 55px; +} + +#header .shareimg { + width: 80px; + margin-left: 5px; + margin-bottom: 8px; } #header .additional-content { @@ -168,10 +180,10 @@ body { border: 0; } -.empty-bill .hand-holding-heart svg { +.empty-bill .billimg svg { fill: lightgray; - height: 5em; - width: 5em; + height: 6em; + width: 4em; } .invites textarea { @@ -535,11 +547,17 @@ tr:hover .extra-info { width: 1.2em; /* protection for IE11 */ } +.icon.high svg { + height: 2em; + margin-top: -0.2em; + margin-bottom: -0.2em; +} + .download-project .icon svg { fill: white; } -.icon.plus svg { +.icon.before-text svg { margin-right: 3px; } footer .icon svg { @@ -562,6 +580,10 @@ footer .icon svg { width: 200px; } +.hiddenpswp { + display: none; +} + #history_warnings { margin-top: 30px; } diff --git a/ihatemoney/static/images/bill.svg b/ihatemoney/static/images/bill.svg new file mode 100644 index 0000000..7272fa2 --- /dev/null +++ b/ihatemoney/static/images/bill.svg @@ -0,0 +1,88 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<svg version="1.0" xmlns="http://www.w3.org/2000/svg" + width="220.000000pt" height="328.000000pt" viewBox="0 0 220.000000 328.000000" + preserveAspectRatio="xMidYMid meet"> +<metadata> +Created by potrace 1.14, written by Peter Selinger 2001-2017 +</metadata> +<g transform="translate(0.000000,328.000000) scale(0.100000,-0.100000)" +stroke="none"> +<path d="M1615 3199 c-44 -4 -253 -10 -465 -13 -436 -8 -481 -11 -510 -34 -18 +-15 -19 -21 -9 -50 8 -23 9 -83 5 -195 -9 -214 -9 -221 -56 -622 -16 -143 -50 +-387 -54 -393 -2 -4 -7 -35 -10 -68 -3 -33 -12 -92 -20 -130 -8 -38 -22 -114 +-31 -170 -8 -55 -19 -114 -24 -130 -5 -16 -12 -54 -16 -84 -5 -48 -34 -179 +-80 -360 -13 -53 -46 -147 -118 -335 -37 -97 -126 -271 -163 -320 -15 -20 -21 +-39 -18 -53 14 -51 147 -94 334 -107 52 -4 113 -9 135 -10 314 -26 428 -37 +470 -45 90 -17 201 -15 220 3 11 11 33 17 66 17 45 0 50 -2 44 -19 -13 -43 48 +-28 67 16 7 15 19 32 26 37 8 4 37 56 64 115 27 58 54 114 59 123 5 10 9 23 9 +29 0 6 15 44 34 84 19 39 38 85 42 101 4 16 13 38 20 49 6 11 15 31 19 45 4 +14 17 54 30 90 26 76 75 229 99 315 20 69 91 296 107 340 31 89 116 469 140 +625 5 36 18 110 28 165 45 235 68 435 68 575 0 14 1 102 2 195 1 94 2 177 1 +186 0 13 -15 18 -67 24 -95 10 -352 13 -448 4z m437 -77 c24 -24 16 -465 -11 +-605 -5 -29 -15 -83 -21 -122 -6 -38 -24 -142 -41 -230 -92 -482 -124 -616 +-214 -895 -26 -80 -51 -161 -55 -180 -4 -19 -18 -66 -30 -105 -12 -38 -28 -90 +-35 -115 -22 -74 -81 -230 -115 -305 -18 -38 -38 -88 -44 -110 -7 -22 -41 +-100 -76 -173 l-64 -133 -68 7 c-42 4 -91 2 -126 -6 -48 -10 -82 -9 -193 4 +-74 9 -181 18 -239 21 -155 8 -303 26 -320 40 -8 7 -55 16 -105 19 -97 8 -155 +22 -155 38 0 16 70 116 85 122 9 3 15 19 15 40 0 20 9 55 19 78 70 159 91 213 +111 288 13 47 29 99 37 117 7 17 18 53 23 80 5 26 15 66 21 88 23 85 90 437 +109 569 11 77 23 149 25 160 9 37 44 324 75 611 16 154 34 319 40 366 5 47 10 +137 10 201 l0 116 29 5 c17 4 166 7 333 9 167 1 368 5 448 9 247 10 517 6 532 +-9z"/> +<path d="M1149 3023 c-5 -41 6 -111 18 -125 18 -20 42 -24 44 -8 1 6 3 15 4 +20 1 6 3 13 4 18 1 4 5 1 10 -7 5 -8 16 -11 30 -6 16 5 21 14 21 39 0 47 -22 +64 -49 37 -19 -19 -21 -19 -21 -3 0 10 -5 23 -12 30 -13 13 -47 16 -49 5z"/> +<path d="M1406 3021 c-7 -10 7 -61 25 -89 10 -16 24 -22 51 -22 20 0 40 -5 43 +-10 12 -19 25 1 25 39 0 20 -6 45 -13 55 -18 24 -51 17 -55 -12 -5 -31 -20 +-28 -28 6 -9 35 -35 54 -48 33z"/> +<path d="M1318 2995 c-10 -22 -8 -30 9 -53 29 -39 48 -35 47 10 -1 37 -17 68 +-35 68 -5 0 -15 -11 -21 -25z"/> +<path d="M1315 2790 c-14 -43 53 -107 69 -65 8 21 23 19 29 -5 12 -47 61 -11 +51 38 -8 38 -36 50 -69 28 -22 -15 -24 -14 -30 4 -8 26 -42 26 -50 0z"/> +<path d="M1230 2775 c-11 -21 -10 -28 5 -51 14 -22 19 -24 30 -13 15 17 8 89 +-9 89 -7 0 -19 -11 -26 -25z"/> +<path d="M1146 2765 c-33 -31 -37 -98 -7 -115 29 -15 31 -14 31 34 0 25 5 48 +10 51 12 8 13 42 1 49 -5 3 -20 -5 -35 -19z"/> +<path d="M1665 2550 c-34 -21 -60 -54 -105 -130 -54 -92 -33 -202 50 -258 41 +-27 76 -24 127 10 43 30 57 62 37 83 -14 13 -18 13 -40 -1 -13 -9 -24 -20 -24 +-24 0 -14 -58 -22 -79 -10 -34 18 -24 37 25 49 39 10 44 14 39 32 -4 13 0 28 +10 40 24 26 4 49 -41 49 -19 0 -34 3 -34 6 0 20 67 97 96 109 38 16 44 39 15 +55 -28 14 -42 12 -76 -10z"/> +<path d="M1120 2394 l-50 -46 -35 31 c-20 17 -44 31 -55 31 -21 0 -50 -25 -50 +-44 0 -13 -31 -46 -44 -46 -3 0 -11 11 -16 25 -11 29 -36 43 -51 28 -15 -15 7 +-95 32 -115 33 -28 59 -22 100 22 21 22 41 40 46 40 4 0 19 -9 33 -20 41 -32 +81 -26 134 21 42 37 49 40 64 27 57 -48 152 -40 152 13 0 21 -7 23 -62 20 -27 +-2 -47 5 -79 28 -23 17 -48 31 -56 31 -8 0 -36 -21 -63 -46z"/> +<path d="M1166 1961 c-10 -11 -30 -24 -45 -31 -24 -10 -35 -8 -67 9 -46 25 +-60 26 -106 6 -22 -8 -50 -12 -72 -8 -29 4 -36 2 -36 -11 0 -22 34 -54 64 -62 +14 -3 48 2 75 11 49 16 52 16 77 -4 36 -28 77 -26 134 6 45 25 52 26 84 15 42 +-15 86 -7 86 17 0 19 -18 29 -96 54 -66 22 -77 21 -98 -2z"/> +<path d="M1577 1930 c-18 -22 -39 -59 -46 -82 -7 -24 -19 -50 -25 -58 -7 -8 +-18 -39 -24 -68 -11 -47 -10 -57 7 -90 46 -89 121 -122 185 -82 45 27 65 56 +59 81 -7 26 -25 24 -55 -5 -30 -30 -70 -41 -97 -26 -40 21 -24 48 30 53 41 4 +59 20 52 46 -5 21 -9 22 -66 16 -43 -5 -58 -4 -53 4 4 6 19 11 34 11 53 0 101 +13 107 27 9 26 -15 43 -61 43 -46 0 -58 17 -31 44 6 8 19 23 27 35 16 24 41 +27 70 9 21 -14 25 -12 34 18 10 34 -24 64 -72 64 -35 0 -45 -6 -75 -40z"/> +<path d="M835 1524 c-27 -9 -68 -18 -90 -22 -43 -8 -57 -31 -34 -59 10 -11 24 +-14 58 -9 24 3 50 11 56 16 7 6 35 13 62 16 38 5 56 2 86 -15 47 -26 60 -26 +108 1 28 15 39 28 39 45 0 19 -5 23 -30 23 -17 0 -38 -5 -48 -11 -13 -8 -30 +-6 -70 10 -61 24 -70 25 -137 5z"/> +<path d="M985 1012 c-11 -2 -27 -9 -35 -16 -54 -41 -76 -44 -131 -16 -39 20 +-40 20 -82 2 -50 -22 -77 -63 -57 -87 16 -19 46 -20 53 -1 3 8 19 22 36 30 27 +14 31 14 46 0 24 -24 101 -31 123 -11 34 31 64 35 98 15 34 -20 148 -42 171 +-34 11 5 9 12 -8 36 -19 24 -30 30 -62 30 -39 0 -107 25 -107 40 0 11 -22 17 +-45 12z"/> +<path d="M613 717 c-63 -15 -68 -19 -53 -47 11 -21 16 -22 69 -15 31 5 81 8 +111 7 30 0 80 -1 110 -2 76 -2 157 4 164 11 4 3 2 19 -4 34 -10 26 -12 27 -58 +20 -56 -9 -121 -10 -217 -2 -41 4 -92 1 -122 -6z"/> +<path d="M1154 649 c-20 -10 -65 -79 -94 -146 -8 -18 -19 -32 -25 -32 -31 4 +-45 -3 -45 -20 0 -11 5 -23 10 -26 15 -10 12 -35 -5 -35 -21 0 -19 -24 5 -45 +11 -10 31 -37 45 -61 61 -105 172 -117 219 -25 14 27 14 31 0 46 -14 14 -19 +13 -50 -15 -19 -16 -46 -30 -59 -30 -28 0 -65 32 -65 55 0 16 5 19 53 29 15 4 +27 11 27 17 0 19 -28 39 -57 40 -23 0 -17 4 29 22 31 13 60 26 64 30 14 13 +-19 37 -52 37 -40 0 -41 6 -11 51 26 39 49 47 84 28 20 -11 26 -11 33 1 36 57 +-38 111 -106 79z"/> +</g> +</svg> diff --git a/ihatemoney/static/images/hand-holding-heart.svg b/ihatemoney/static/images/hand-holding-heart.svg deleted file mode 100644 index 65ee45e..0000000 --- a/ihatemoney/static/images/hand-holding-heart.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M275.3 250.5c7 7.4 18.4 7.4 25.5 0l108.9-114.2c31.6-33.2 29.8-88.2-5.6-118.8-30.8-26.7-76.7-21.9-104.9 7.7L288 36.9l-11.1-11.6C248.7-4.4 202.8-9.2 172 17.5c-35.3 30.6-37.2 85.6-5.6 118.8l108.9 114.2zm290 77.6c-11.8-10.7-30.2-10-42.6 0L430.3 402c-11.3 9.1-25.4 14-40 14H272c-8.8 0-16-7.2-16-16s7.2-16 16-16h78.3c15.9 0 30.7-10.9 33.3-26.6 3.3-20-12.1-37.4-31.6-37.4H192c-27 0-53.1 9.3-74.1 26.3L71.4 384H16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16h356.8c14.5 0 28.6-4.9 40-14L564 377c15.2-12.1 16.4-35.3 1.3-48.9z"/></svg>
\ No newline at end of file diff --git a/ihatemoney/static/images/indicate.svg b/ihatemoney/static/images/indicate.svg new file mode 100644 index 0000000..1d6caae --- /dev/null +++ b/ihatemoney/static/images/indicate.svg @@ -0,0 +1,88 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<svg version="1.0" xmlns="http://www.w3.org/2000/svg" + width="294.000000pt" height="424.000000pt" viewBox="0 0 294.000000 424.000000" + preserveAspectRatio="xMidYMid meet"> +<metadata> +Created by potrace 1.14, written by Peter Selinger 2001-2017 +</metadata> +<g transform="translate(0.000000,424.000000) scale(0.100000,-0.100000)" +fill="#000000" stroke="none"> +<path d="M2108 4146 c-8 -7 -22 -40 -32 -73 -17 -57 -83 -151 -173 -246 -34 +-36 -40 -38 -75 -33 -22 4 -68 24 -102 46 -63 40 -89 47 -114 31 -27 -17 29 +-71 73 -71 8 0 15 -4 15 -9 0 -4 20 -16 45 -25 58 -22 62 -32 26 -50 -16 -9 +-50 -47 -75 -85 l-46 -69 0 -90 c0 -50 5 -114 11 -143 15 -71 63 -163 104 +-201 19 -17 35 -39 35 -49 0 -29 32 -39 125 -39 71 0 94 4 133 24 56 29 112 +87 131 136 7 19 16 42 20 50 4 8 9 58 11 110 4 143 4 143 16 147 7 2 18 -2 26 +-9 30 -28 55 -37 67 -25 6 6 11 18 11 27 0 18 -30 50 -46 50 -6 0 -22 13 -37 +28 l-27 29 16 54 c9 30 27 79 40 110 13 31 24 62 24 69 0 7 13 32 29 55 32 48 +32 80 -2 91 -11 3 -58 44 -103 90 -85 85 -102 95 -126 70z m110 -145 c28 -27 +52 -54 52 -60 0 -7 -7 -26 -16 -43 l-16 -31 -44 47 c-33 37 -48 46 -64 41 -26 +-8 -26 9 0 42 11 14 20 32 20 39 0 23 12 16 68 -35z m-129 -102 c-11 -7 -12 +-12 -1 -29 18 -30 15 -40 -14 -40 -17 0 -28 -6 -31 -20 -4 -14 -14 -20 -34 +-20 -33 0 -36 6 -11 29 9 9 35 38 57 65 23 29 41 44 43 36 3 -7 -2 -16 -9 -21z +m80 -260 c-7 -4 -20 -2 -31 4 -21 14 -24 27 -5 27 7 0 19 10 27 23 15 22 15 +22 18 -12 2 -19 -2 -37 -9 -42z m-192 12 c40 -17 82 -35 93 -41 23 -12 53 -72 +65 -129 6 -29 5 -33 -9 -28 -13 5 -16 -1 -16 -31 0 -29 -8 -46 -38 -78 -52 +-59 -192 -124 -265 -124 -36 0 -39 3 -58 46 -40 89 -36 184 12 291 10 24 19 +46 19 50 0 9 100 72 115 73 6 0 42 -13 82 -29z m143 -413 c-12 -24 -31 -53 +-42 -65 -22 -24 -105 -60 -114 -50 -10 10 59 84 117 127 29 22 54 38 57 35 2 +-2 -6 -23 -18 -47z"/> +<path d="M1927 3573 c-4 -3 -7 -15 -7 -25 0 -17 -1 -17 -20 2 -11 11 -32 20 +-46 20 l-26 0 4 -112 c4 -122 17 -161 53 -156 17 3 19 9 16 47 -2 29 1 41 8 +37 6 -4 11 -12 11 -18 0 -12 47 -58 59 -58 14 0 21 43 9 57 -6 8 -10 49 -9 99 +2 85 -7 114 -34 114 -6 0 -15 -3 -18 -7z m-20 -140 c-2 -16 -4 -3 -4 27 0 30 +2 43 4 28 2 -16 2 -40 0 -55z"/> +<path d="M218 2923 c-57 -62 -117 -250 -119 -379 -2 -58 2 -88 12 -100 12 -15 +14 -15 20 7 4 13 7 42 8 63 1 44 58 218 97 298 15 29 38 63 53 75 21 18 24 25 +15 40 -18 29 -56 28 -86 -4z"/> +<path d="M348 2858 c-47 -68 -63 -110 -96 -238 -27 -109 -35 -236 -15 -248 6 +-4 13 -18 14 -31 2 -14 9 -26 15 -28 7 -2 11 25 11 84 -1 87 4 107 55 258 25 +72 70 154 98 180 25 22 26 44 3 61 -31 23 -49 15 -85 -38z"/> +<path d="M1970 2889 c-69 -19 -106 -41 -139 -85 -18 -24 -38 -44 -44 -44 -5 0 +-35 -12 -66 -26 -30 -15 -87 -31 -126 -36 -83 -12 -190 -30 -375 -63 -74 -14 +-174 -25 -222 -25 -63 0 -91 -4 -102 -15 -19 -19 -62 -19 -69 -1 -10 25 -86 +39 -201 38 -118 -2 -136 -9 -136 -51 0 -34 35 -68 87 -86 36 -12 38 -16 44 +-62 12 -89 72 -190 133 -222 42 -23 98 8 137 75 17 30 32 66 35 81 2 16 9 52 +15 80 6 29 8 61 5 71 -5 16 1 18 51 20 104 4 291 32 417 61 44 11 112 22 150 +26 38 4 94 13 124 21 30 8 57 13 59 11 2 -3 -6 -31 -19 -63 -12 -33 -31 -95 +-43 -139 -20 -74 -23 -80 -46 -78 -163 15 -335 37 -379 49 -30 9 -88 24 -129 +35 -91 25 -125 22 -129 -9 -5 -31 15 -52 47 -52 15 0 74 -13 132 -29 111 -31 +183 -44 349 -61 58 -7 107 -13 109 -15 2 -2 -4 -48 -12 -102 -9 -54 -18 -120 +-22 -148 -3 -27 -15 -97 -25 -155 -24 -130 -39 -348 -28 -415 5 -27 6 -74 3 +-102 -8 -69 0 -93 31 -93 17 0 31 -10 45 -34 25 -42 104 -84 172 -92 67 -7 +418 41 579 80 35 8 60 10 66 4 14 -14 51 12 57 42 12 62 26 332 20 402 -6 70 +-5 78 16 99 12 12 37 23 57 25 18 2 39 7 46 12 6 6 27 13 46 17 40 8 90 50 90 +76 0 9 -8 26 -17 38 -16 19 -22 20 -53 11 -59 -17 -200 -11 -200 9 0 8 27 35 +144 143 172 158 216 210 216 252 0 27 -75 113 -118 136 -13 6 -61 38 -105 69 +-133 94 -248 149 -287 136 -15 -5 -25 3 -44 33 -76 120 -222 184 -346 151z +m189 -99 c61 -30 124 -113 154 -200 82 -241 146 -750 133 -1060 -9 -215 -3 +-201 -89 -224 -71 -18 -223 -45 -386 -67 -103 -14 -211 -8 -245 15 -51 33 -96 +167 -103 306 -5 106 0 142 73 575 25 150 23 145 50 145 20 0 24 5 24 29 0 17 +-6 31 -16 35 -18 7 -18 7 16 131 28 103 99 252 137 288 37 35 71 45 151 46 44 +1 74 -5 101 -19z m341 -205 c49 -25 192 -120 253 -167 22 -18 37 -38 37 -51 0 +-19 -159 -182 -218 -224 -26 -18 -44 -10 -21 10 22 18 53 93 46 112 -4 8 -19 +20 -34 26 -15 6 -48 21 -73 33 -43 21 -46 25 -61 86 -54 215 -46 235 71 175z +m-1650 -103 c0 -10 5 -23 11 -29 13 -13 5 -43 -11 -43 -5 0 -10 12 -10 26 0 +14 -5 34 -10 45 -8 15 -7 19 5 19 8 0 15 -8 15 -18z m-70 -77 c0 -8 -10 -25 +-22 -37 l-23 -23 -3 23 c-2 13 -1 30 2 38 7 19 46 18 46 -1z m1730 -167 c0 +-16 -20 -48 -30 -48 -6 0 -10 15 -10 34 0 29 3 33 20 29 11 -3 20 -10 20 -15z +m14 -141 c-7 -19 -34 -31 -34 -15 0 10 32 39 38 34 1 -2 0 -10 -4 -19z"/> +<path d="M1924 1135 c-18 -13 -19 -29 -17 -289 2 -152 5 -294 8 -317 9 -71 42 +-91 68 -41 12 25 12 40 0 107 -14 87 -20 414 -8 486 6 41 5 48 -12 58 -15 8 +-25 7 -39 -4z"/> +<path d="M2117 1133 c-23 -22 26 -662 54 -715 5 -10 20 -18 34 -18 28 0 35 25 +22 85 -19 96 -36 244 -47 430 -7 110 -17 206 -23 213 -10 13 -30 16 -40 5z"/> +<path d="M1730 501 c-109 -35 -229 -145 -216 -197 9 -33 75 -63 140 -64 51 0 +126 18 126 30 0 4 15 10 32 14 18 4 50 18 70 31 21 14 41 25 46 25 5 0 17 9 +28 21 18 21 18 21 -9 41 -15 11 -27 25 -27 32 0 7 -12 24 -28 39 -21 20 -41 +28 -82 31 -30 3 -66 2 -80 -3z m92 -49 c9 -4 26 -19 38 -34 l21 -28 -88 -41 +c-66 -31 -102 -41 -143 -43 -46 -1 -55 2 -58 17 -5 25 47 70 123 107 61 31 77 +34 107 22z"/> +<path d="M2276 413 c-4 -5 -22 -39 -40 -78 -78 -166 -244 -289 -254 -188 -3 +28 5 40 60 93 47 46 76 64 116 76 52 16 64 32 38 53 -24 20 -77 -1 -150 -59 +-77 -61 -136 -132 -136 -166 0 -32 54 -91 90 -99 47 -10 111 26 192 107 78 78 +114 136 124 199 8 48 -16 85 -40 62z"/> +</g> +</svg> diff --git a/ihatemoney/static/images/read.svg b/ihatemoney/static/images/read.svg new file mode 100644 index 0000000..e35bf59 --- /dev/null +++ b/ihatemoney/static/images/read.svg @@ -0,0 +1,55 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<svg version="1.0" xmlns="http://www.w3.org/2000/svg" + width="122.000000pt" height="203.000000pt" viewBox="0 0 122.000000 203.000000" + preserveAspectRatio="xMidYMid meet"> +<metadata> +Created by potrace 1.14, written by Peter Selinger 2001-2017 +</metadata> +<g transform="translate(0.000000,203.000000) scale(0.100000,-0.100000)" +stroke="none"> +<path d="M646 1999 c-15 -12 -49 -65 -74 -118 l-47 -96 -63 -3 c-69 -3 -75 +-12 -41 -56 12 -15 30 -26 44 -26 34 0 37 -12 14 -56 -35 -68 -13 -188 46 +-247 27 -27 28 -28 9 -42 -10 -8 -31 -15 -45 -15 -16 0 -32 -9 -40 -21 -10 +-15 -37 -26 -99 -39 -114 -24 -147 -37 -199 -76 -128 -98 -172 -288 -93 -401 +17 -25 20 -54 26 -253 4 -124 11 -262 14 -307 4 -45 4 -94 0 -108 -5 -19 -1 +-32 15 -50 22 -24 23 -24 127 -15 116 10 178 1 218 -30 51 -40 85 -13 40 31 +-50 48 -127 73 -234 77 l-101 4 -7 77 c-15 180 -19 321 -8 321 6 0 14 -4 17 +-10 9 -15 42 -12 59 6 9 8 16 30 16 48 0 19 6 39 14 45 14 12 10 51 -5 51 -5 +0 -9 6 -9 14 0 8 -23 34 -50 57 -43 37 -51 47 -48 73 3 31 3 31 58 29 30 -2 +80 -13 110 -26 85 -36 160 -76 160 -87 0 -6 8 -10 19 -10 10 0 25 -7 32 -16 +16 -19 81 -14 107 9 22 19 122 53 231 78 47 11 96 27 108 35 12 8 40 14 62 14 +30 0 44 6 55 22 40 57 3 79 -96 55 -144 -34 -264 -70 -301 -88 -21 -11 -41 +-18 -44 -15 -10 10 9 27 55 47 26 12 74 34 107 50 33 16 85 33 115 39 30 6 61 +17 70 26 13 14 12 17 -10 35 -19 17 -33 19 -66 14 l-42 -6 -4 53 c-3 29 -3 56 +-1 60 10 20 206 -113 239 -161 34 -50 33 -126 -2 -187 -26 -45 -54 -58 -54 +-26 0 23 -19 42 -42 42 -18 0 -23 -14 -19 -63 3 -34 -19 -71 -66 -114 l-36 +-31 14 -46 c13 -44 15 -46 51 -46 l38 0 0 -57 c-1 -32 -9 -98 -19 -148 -15 +-80 -20 -91 -42 -97 -65 -19 -218 -71 -249 -85 -28 -13 -87 -48 -119 -70 -2 +-2 1 -14 7 -28 15 -32 52 -33 95 -2 18 13 57 32 87 44 30 11 89 33 130 49 41 +16 77 29 80 30 62 13 71 25 45 54 -14 15 -14 20 -1 45 14 28 29 105 41 216 6 +53 8 57 36 63 34 7 52 41 43 85 -8 38 11 95 49 148 61 86 44 214 -40 294 -43 +41 -183 139 -198 139 -8 0 -69 44 -73 53 -2 4 -11 7 -21 7 -15 0 -91 68 -91 +81 0 4 20 19 45 35 63 39 89 94 83 177 -2 34 -11 76 -20 94 -18 35 -14 47 11 +34 25 -13 112 2 125 21 16 26 -28 68 -70 68 -34 0 -44 16 -44 71 0 15 -7 32 +-15 39 -8 7 -15 18 -15 24 0 22 -50 80 -83 98 -44 23 -89 22 -121 -3z m138 +-95 c11 -28 6 -62 -9 -68 -12 -4 -15 4 -15 39 0 45 12 60 24 29z m-114 -120 +c0 -2 -11 -4 -25 -4 -28 0 -30 5 -13 42 l13 26 12 -30 c7 -17 13 -32 13 -34z +m98 -100 c38 -11 55 -144 27 -201 -24 -49 -60 -66 -137 -67 -61 -1 -70 2 -95 +27 -24 23 -28 35 -27 80 1 54 29 121 62 149 9 8 35 16 57 17 21 1 41 4 44 6 4 +4 38 -1 69 -11z m-38 -419 c33 -30 71 -120 77 -182 l5 -59 -43 -19 c-88 -39 +-205 -126 -222 -165 -5 -11 -8 -12 -13 -2 -17 37 -88 112 -128 136 -25 15 -46 +28 -46 29 0 1 11 33 25 70 31 88 82 166 112 173 13 4 40 15 61 26 47 25 141 +21 172 -7z m-380 -85 c0 -6 -9 -28 -19 -48 -11 -21 -22 -54 -26 -74 l-7 -36 +-65 -4 c-69 -4 -86 -17 -76 -55 5 -21 2 -23 -31 -23 -54 0 -51 17 23 141 12 +20 39 48 60 62 57 38 141 59 141 37z m-50 -255 c0 -18 -1 -18 -36 0 l-29 15 +33 0 c22 0 32 -5 32 -15z m120 -32 c28 -20 69 -64 70 -76 0 -4 -23 8 -51 28 +-28 19 -55 35 -60 35 -5 0 -9 7 -9 15 0 20 20 19 50 -2z"/> +<path d="M636 1662 c-14 -23 -18 -117 -6 -153 16 -46 29 -46 46 2 10 30 13 32 +20 14 4 -11 14 -26 22 -34 23 -24 37 4 37 76 l0 67 -50 18 c-57 20 -62 21 -69 +10z"/> +<path d="M457 463 c5 -265 11 -305 47 -311 17 -4 18 8 14 261 -3 244 -5 267 +-22 286 -42 47 -44 36 -39 -236z"/> +</g> +</svg> diff --git a/ihatemoney/static/images/share.svg b/ihatemoney/static/images/share.svg new file mode 100644 index 0000000..cfdc9fe --- /dev/null +++ b/ihatemoney/static/images/share.svg @@ -0,0 +1,108 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<svg version="1.0" xmlns="http://www.w3.org/2000/svg" + width="213.000000pt" height="257.000000pt" viewBox="0 0 213.000000 257.000000" + preserveAspectRatio="xMidYMid meet"> +<metadata> +Created by potrace 1.14, written by Peter Selinger 2001-2017 +</metadata> +<g transform="translate(0.000000,257.000000) scale(0.100000,-0.100000)" +stroke="none"> +<path d="M830 2486 c-40 -41 -58 -94 -67 -197 -6 -76 -6 -77 26 -108 17 -17 +31 -33 31 -36 0 -3 -11 -10 -25 -15 -14 -5 -25 -14 -25 -19 0 -19 40 -32 75 +-25 20 3 41 2 48 -4 6 -5 38 -13 70 -17 52 -7 60 -5 92 19 36 28 46 62 20 72 +-9 4 -23 -4 -36 -20 -15 -19 -30 -26 -55 -26 -40 0 -43 12 -9 34 28 19 33 51 +9 60 -21 8 -21 8 -36 -7 -7 -7 -26 -18 -43 -25 -26 -12 -31 -11 -42 4 -18 25 +-16 32 10 39 45 14 77 30 82 44 14 36 -51 55 -89 26 -29 -22 -36 -19 -36 15 0 +45 29 122 57 152 55 58 -1 92 -57 34z"/> +<path d="M1133 2130 c-18 -10 -40 -34 -50 -52 -33 -63 -64 -143 -67 -177 -2 +-19 -11 -38 -20 -43 -22 -12 -20 -21 8 -55 14 -16 28 -41 31 -55 4 -14 27 -45 +51 -69 39 -39 50 -44 89 -44 56 0 88 26 63 51 -12 12 -20 14 -36 5 -11 -6 -29 +-11 -39 -11 -20 0 -83 58 -83 77 0 6 18 14 39 18 27 4 41 12 44 26 7 26 -26 +43 -69 34 -31 -5 -34 -4 -34 18 l0 24 66 -15 c36 -8 67 -12 69 -10 2 2 2 13 +-1 25 -4 16 -19 25 -56 33 -58 14 -68 31 -43 74 59 101 106 130 138 84 14 -20 +18 -21 26 -8 16 23 13 35 -15 64 -32 31 -67 33 -111 6z"/> +<path d="M1407 1846 c-44 -16 -67 -34 -67 -52 0 -7 16 -43 36 -79 31 -57 39 +-65 65 -65 22 0 32 7 44 31 31 60 83 52 155 -22 55 -57 130 -189 130 -230 0 +-5 -13 -6 -30 -2 -27 5 -30 3 -30 -19 0 -30 79 -108 109 -108 21 0 51 25 51 +41 0 6 7 17 15 25 32 32 10 81 -39 87 -26 3 -32 11 -53 67 -32 85 -106 183 +-170 226 -48 32 -52 37 -46 64 5 25 2 31 -21 40 -37 14 -103 12 -149 -4z"/> +<path d="M758 1826 c-22 -14 -40 -40 -54 -75 -12 -29 -27 -57 -34 -61 -8 -5 +-9 -16 -4 -31 4 -13 7 -32 5 -41 -4 -28 40 -118 68 -137 63 -43 135 -44 168 +-2 27 35 -2 67 -35 39 -26 -23 -59 -28 -79 -12 -16 12 -16 15 -3 24 8 6 27 13 +42 16 37 9 52 28 34 43 -8 7 -23 12 -33 11 -10 0 -36 -2 -58 -3 -30 -1 -40 2 +-40 13 0 11 17 17 65 22 59 7 90 23 90 49 0 12 -41 17 -97 12 l-55 -6 27 41 +c15 23 34 42 41 42 16 0 37 37 31 54 -9 24 -46 25 -79 2z"/> +<path d="M462 1777 c-12 -13 -22 -29 -22 -35 0 -6 -13 -18 -29 -26 -57 -30 +-231 -223 -231 -256 0 -8 -13 -10 -39 -5 -34 6 -41 3 -51 -15 -14 -26 -4 -94 +16 -114 17 -18 18 -38 3 -53 -16 -16 16 -67 38 -59 8 3 18 6 23 6 4 0 13 13 +20 29 14 35 48 68 75 73 30 5 25 40 -8 56 -24 12 -27 18 -22 43 4 16 16 41 28 +56 60 72 131 142 161 158 l34 18 25 -26 c36 -40 57 -34 95 24 45 69 52 111 21 +133 -36 25 -111 21 -137 -7z m88 -57 c0 -5 -4 -10 -10 -10 -5 0 -10 5 -10 10 +0 6 5 10 10 10 6 0 10 -4 10 -10z"/> +<path d="M348 1313 c-14 -16 -31 -38 -37 -50 -23 -44 -6 -264 25 -340 52 -123 +152 -170 216 -101 16 17 36 44 44 59 16 31 28 197 15 214 -5 5 -11 26 -15 45 +-26 144 -176 249 -248 173z m133 -74 c61 -63 83 -128 77 -234 -3 -60 -8 -78 +-31 -108 -15 -19 -36 -39 -48 -42 -30 -10 -73 36 -93 99 -20 61 -24 242 -7 +259 6 6 11 20 11 32 0 21 17 45 33 45 4 0 30 -23 58 -51z"/> +<path d="M405 1179 c-14 -22 -18 -168 -5 -184 19 -23 40 -18 40 10 0 18 7 26 +25 31 23 6 25 10 25 70 0 43 -4 66 -12 68 -41 13 -68 15 -73 5z"/> +<path d="M1146 1213 c-41 -36 -56 -57 -61 -84 -9 -51 28 -143 80 -198 38 -40 +47 -45 96 -48 50 -4 57 -2 101 32 71 55 79 99 41 215 -25 79 -91 130 -167 130 +-27 0 -47 -11 -90 -47z m164 -35 c48 -52 64 -137 34 -184 -18 -27 -63 -54 -89 +-54 -19 0 -75 53 -75 71 0 8 6 5 14 -6 8 -11 20 -16 29 -12 13 5 15 17 12 59 +-4 44 -3 48 4 19 18 -66 48 -100 65 -72 7 11 -20 141 -33 154 -12 12 -31 1 +-31 -19 0 -17 -12 -18 -28 -2 -19 19 -34 -4 -34 -56 -1 -25 -5 -46 -10 -46 -4 +0 -8 24 -8 53 0 44 5 58 29 85 37 40 89 44 121 10z"/> +<path d="M1606 1122 c-3 -6 -19 -13 -35 -17 -49 -11 -66 -39 -65 -109 0 -33 6 +-71 12 -83 14 -26 0 -40 -18 -18 -19 23 -43 18 -65 -12 -53 -71 -50 -69 -87 +-54 -78 32 -118 27 -165 -19 -31 -31 -33 -31 -55 -14 -27 20 -62 90 -79 154 +-16 66 -59 115 -113 130 -59 16 -89 8 -122 -36 -16 -20 -38 -40 -51 -45 -21 +-8 -23 -15 -23 -73 0 -45 4 -67 16 -76 8 -8 21 -27 28 -45 15 -34 69 -85 92 +-85 18 0 18 -14 -1 -30 -33 -27 -106 -144 -124 -197 l-19 -57 -11 40 c-16 56 +-14 62 24 133 41 76 53 125 35 146 -21 25 -29 18 -64 -57 l-32 -73 -25 42 +c-37 65 -108 82 -170 40 -31 -21 -72 -71 -82 -100 -6 -18 -41 4 -106 64 -30 +27 -62 54 -72 60 -22 12 -62 12 -57 0 8 -22 118 -129 160 -156 l47 -30 1 -126 +c0 -163 18 -339 36 -360 21 -23 143 -18 228 11 65 22 69 23 82 6 22 -30 48 +-16 54 29 4 33 9 40 25 37 87 -12 189 -13 234 -2 46 11 51 15 51 40 0 22 5 28 +23 28 12 0 78 5 147 11 69 5 138 7 154 4 26 -5 28 -8 23 -44 -8 -64 0 -67 148 +-59 103 5 137 3 163 -8 31 -14 34 -13 58 9 24 22 26 29 23 104 -4 87 10 122 +56 148 67 36 165 108 165 121 0 23 -19 29 -43 13 -47 -30 -139 -78 -143 -75 +-2 3 -1 42 3 88 5 69 9 84 25 88 13 3 18 14 18 37 0 18 3 35 8 37 4 2 16 20 +26 40 10 21 39 61 62 89 48 55 52 70 28 89 -13 11 -23 5 -69 -40 -29 -29 -61 +-68 -71 -86 -23 -42 -34 -43 -56 -3 -11 18 -35 37 -58 47 -42 18 -49 32 -27 +54 36 36 45 188 12 188 -8 0 -22 11 -31 25 -17 25 -26 30 -85 40 -21 4 -39 3 +-43 -3z m79 -72 c29 -32 27 -116 -3 -157 -27 -38 -53 -42 -82 -11 -25 27 -26 +50 -2 46 18 -3 18 1 6 73 -5 31 -2 39 17 53 31 21 42 20 64 -4z m-732 -60 c37 +-39 41 -52 37 -100 -3 -34 -18 -61 -49 -87 -36 -31 -66 -29 -91 7 l-21 30 35 +0 c41 0 40 -1 25 37 -6 15 -12 54 -14 85 -2 57 -2 58 35 67 3 0 22 -17 43 -39z +m-119 -102 c4 -17 2 -28 -4 -28 -5 0 -10 9 -10 19 0 11 -3 28 -6 38 -5 12 -4 +15 3 8 6 -5 13 -22 17 -37z m804 -84 c20 -4 44 -12 52 -19 8 -7 30 -16 48 -20 +26 -5 37 -15 48 -40 19 -47 28 -133 19 -200 -5 -47 -10 -58 -31 -66 -18 -6 +-33 -5 -54 6 -16 8 -46 15 -66 15 l-38 0 41 30 c41 30 66 70 77 126 6 26 1 37 +-41 84 -49 54 -93 80 -138 80 -14 0 -25 5 -25 11 0 7 12 9 35 5 19 -3 52 -9 +73 -12z m-548 -39 c33 -34 33 -35 20 -75 -15 -44 -29 -50 -48 -20 -6 11 -30 +29 -52 40 l-40 20 38 35 c20 19 39 35 43 35 3 0 20 -16 39 -35z m236 -2 c8 +-10 21 -31 29 -48 18 -38 65 -311 65 -380 l0 -52 -146 -8 c-80 -4 -148 -4 +-152 0 -3 3 -8 51 -10 105 -4 96 -4 100 17 100 18 0 21 6 21 38 1 44 28 144 +53 189 34 64 95 91 123 56z m298 -54 c36 -43 42 -73 19 -111 -27 -47 -42 -47 +-36 1 8 55 -3 90 -32 103 -32 14 -51 -1 -59 -47 -10 -52 1 -83 32 -87 30 -4 +43 -28 14 -28 -11 0 -34 13 -51 29 -38 36 -42 85 -10 125 42 53 87 58 123 15z +m-1007 -99 c22 -43 36 -103 69 -290 8 -47 19 -100 25 -118 8 -24 8 -37 0 -46 +-16 -19 -130 -46 -194 -46 l-54 0 -6 68 c-9 86 -9 290 0 320 4 16 11 22 23 19 +20 -5 50 9 50 24 0 5 -11 14 -25 19 -33 13 -32 25 10 67 46 46 73 42 102 -17z +m395 9 c24 -48 40 -164 42 -299 l1 -115 -100 -3 c-55 -1 -118 1 -139 5 -36 8 +-40 12 -52 58 -7 28 -16 75 -20 105 l-7 55 21 -19 c18 -15 24 -16 37 -6 8 7 +15 18 15 25 0 51 100 208 144 225 30 12 39 8 58 -31z m479 -115 c10 -9 36 -18 +58 -21 47 -6 51 -15 16 -31 -28 -13 -33 -43 -11 -61 11 -10 21 -9 46 4 17 9 +47 15 67 13 30 -2 39 -9 55 -40 22 -42 44 -159 35 -183 -5 -11 -12 -13 -24 -7 +-10 5 -57 7 -105 5 -71 -3 -88 -1 -88 11 0 7 -7 17 -16 20 -11 4 -14 13 -10 +28 3 14 -1 30 -13 43 -14 15 -20 42 -24 109 -3 54 -10 91 -17 96 -7 4 -9 13 +-6 19 10 15 16 14 37 -5z"/> +<path d="M1647 1033 c-9 -14 -11 -78 -3 -99 5 -16 12 -20 26 -17 16 4 20 14 +20 48 0 24 -3 50 -6 59 -6 17 -29 22 -37 9z"/> +<path d="M897 974 c-21 -22 10 -114 39 -114 19 0 29 27 16 43 -6 6 -12 25 -14 +42 -3 28 -25 44 -41 29z"/> +</g> +</svg> diff --git a/ihatemoney/static/photoswipe/default-skin/default-skin.css b/ihatemoney/static/photoswipe/default-skin/default-skin.css new file mode 100644 index 0000000..c961632 --- /dev/null +++ b/ihatemoney/static/photoswipe/default-skin/default-skin.css @@ -0,0 +1,482 @@ +/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + + Contents: + + 1. Buttons + 2. Share modal and links + 3. Index indicator ("1 of X" counter) + 4. Caption + 5. Loading indicator + 6. Additional styles (root element, top bar, idle state, hidden state, etc.) + +*/ +/* + + 1. Buttons + + */ +/* <button> css reset */ +.pswp__button { + width: 44px; + height: 44px; + position: relative; + background: none; + cursor: pointer; + overflow: visible; + -webkit-appearance: none; + display: block; + border: 0; + padding: 0; + margin: 0; + float: right; + opacity: 0.75; + -webkit-transition: opacity 0.2s; + transition: opacity 0.2s; + -webkit-box-shadow: none; + box-shadow: none; } + .pswp__button:focus, .pswp__button:hover { + opacity: 1; } + .pswp__button:active { + outline: none; + opacity: 0.9; } + .pswp__button::-moz-focus-inner { + padding: 0; + border: 0; } + +/* pswp__ui--over-close class it added when mouse is over element that should close gallery */ +.pswp__ui--over-close .pswp__button--close { + opacity: 1; } + +.pswp__button, +.pswp__button--arrow--left:before, +.pswp__button--arrow--right:before { + background: url(default-skin.png) 0 0 no-repeat; + background-size: 264px 88px; + width: 44px; + height: 44px; } + +@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) { + /* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */ + .pswp--svg .pswp__button, + .pswp--svg .pswp__button--arrow--left:before, + .pswp--svg .pswp__button--arrow--right:before { + background-image: url(default-skin.svg); } + .pswp--svg .pswp__button--arrow--left, + .pswp--svg .pswp__button--arrow--right { + background: none; } } + +.pswp__button--close { + background-position: 0 -44px; } + +.pswp__button--share { + background-position: -44px -44px; } + +.pswp__button--fs { + display: none; } + +.pswp--supports-fs .pswp__button--fs { + display: block; } + +.pswp--fs .pswp__button--fs { + background-position: -44px 0; } + +.pswp__button--zoom { + display: none; + background-position: -88px 0; } + +.pswp--zoom-allowed .pswp__button--zoom { + display: block; } + +.pswp--zoomed-in .pswp__button--zoom { + background-position: -132px 0; } + +/* no arrows on touch screens */ +.pswp--touch .pswp__button--arrow--left, +.pswp--touch .pswp__button--arrow--right { + visibility: hidden; } + +/* + Arrow buttons hit area + (icon is added to :before pseudo-element) +*/ +.pswp__button--arrow--left, +.pswp__button--arrow--right { + background: none; + top: 50%; + margin-top: -50px; + width: 70px; + height: 100px; + position: absolute; } + +.pswp__button--arrow--left { + left: 0; } + +.pswp__button--arrow--right { + right: 0; } + +.pswp__button--arrow--left:before, +.pswp__button--arrow--right:before { + content: ''; + top: 35px; + background-color: rgba(0, 0, 0, 0.3); + height: 30px; + width: 32px; + position: absolute; } + +.pswp__button--arrow--left:before { + left: 6px; + background-position: -138px -44px; } + +.pswp__button--arrow--right:before { + right: 6px; + background-position: -94px -44px; } + +/* + + 2. Share modal/popup and links + + */ +.pswp__counter, +.pswp__share-modal { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + +.pswp__share-modal { + display: block; + background: rgba(0, 0, 0, 0.5); + width: 100%; + height: 100%; + top: 0; + left: 0; + padding: 10px; + position: absolute; + z-index: 1600; + opacity: 0; + -webkit-transition: opacity 0.25s ease-out; + transition: opacity 0.25s ease-out; + -webkit-backface-visibility: hidden; + will-change: opacity; } + +.pswp__share-modal--hidden { + display: none; } + +.pswp__share-tooltip { + z-index: 1620; + position: absolute; + background: #FFF; + top: 56px; + border-radius: 2px; + display: block; + width: auto; + right: 44px; + -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25); + -webkit-transform: translateY(6px); + -ms-transform: translateY(6px); + transform: translateY(6px); + -webkit-transition: -webkit-transform 0.25s; + transition: transform 0.25s; + -webkit-backface-visibility: hidden; + will-change: transform; } + .pswp__share-tooltip a { + display: block; + padding: 8px 12px; + color: #000; + text-decoration: none; + font-size: 14px; + line-height: 18px; } + .pswp__share-tooltip a:hover { + text-decoration: none; + color: #000; } + .pswp__share-tooltip a:first-child { + /* round corners on the first/last list item */ + border-radius: 2px 2px 0 0; } + .pswp__share-tooltip a:last-child { + border-radius: 0 0 2px 2px; } + +.pswp__share-modal--fade-in { + opacity: 1; } + .pswp__share-modal--fade-in .pswp__share-tooltip { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); } + +/* increase size of share links on touch devices */ +.pswp--touch .pswp__share-tooltip a { + padding: 16px 12px; } + +a.pswp__share--facebook:before { + content: ''; + display: block; + width: 0; + height: 0; + position: absolute; + top: -12px; + right: 15px; + border: 6px solid transparent; + border-bottom-color: #FFF; + -webkit-pointer-events: none; + -moz-pointer-events: none; + pointer-events: none; } + +a.pswp__share--facebook:hover { + background: #3E5C9A; + color: #FFF; } + a.pswp__share--facebook:hover:before { + border-bottom-color: #3E5C9A; } + +a.pswp__share--twitter:hover { + background: #55ACEE; + color: #FFF; } + +a.pswp__share--pinterest:hover { + background: #CCC; + color: #CE272D; } + +a.pswp__share--download:hover { + background: #DDD; } + +/* + + 3. Index indicator ("1 of X" counter) + + */ +.pswp__counter { + position: absolute; + left: 0; + top: 0; + height: 44px; + font-size: 13px; + line-height: 44px; + color: #FFF; + opacity: 0.75; + padding: 0 10px; } + +/* + + 4. Caption + + */ +.pswp__caption { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + min-height: 44px; } + .pswp__caption small { + font-size: 11px; + color: #BBB; } + +.pswp__caption__center { + text-align: left; + max-width: 420px; + margin: 0 auto; + font-size: 13px; + padding: 10px; + line-height: 20px; + color: #CCC; } + +.pswp__caption--empty { + display: none; } + +/* Fake caption element, used to calculate height of next/prev image */ +.pswp__caption--fake { + visibility: hidden; } + +/* + + 5. Loading indicator (preloader) + + You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR + + */ +.pswp__preloader { + width: 44px; + height: 44px; + position: absolute; + top: 0; + left: 50%; + margin-left: -22px; + opacity: 0; + -webkit-transition: opacity 0.25s ease-out; + transition: opacity 0.25s ease-out; + will-change: opacity; + direction: ltr; } + +.pswp__preloader__icn { + width: 20px; + height: 20px; + margin: 12px; } + +.pswp__preloader--active { + opacity: 1; } + .pswp__preloader--active .pswp__preloader__icn { + /* We use .gif in browsers that don't support CSS animation */ + background: url(preloader.gif) 0 0 no-repeat; } + +.pswp--css_animation .pswp__preloader--active { + opacity: 1; } + .pswp--css_animation .pswp__preloader--active .pswp__preloader__icn { + -webkit-animation: clockwise 500ms linear infinite; + animation: clockwise 500ms linear infinite; } + .pswp--css_animation .pswp__preloader--active .pswp__preloader__donut { + -webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; + animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; } + +.pswp--css_animation .pswp__preloader__icn { + background: none; + opacity: 0.75; + width: 14px; + height: 14px; + position: absolute; + left: 15px; + top: 15px; + margin: 0; } + +.pswp--css_animation .pswp__preloader__cut { + /* + The idea of animating inner circle is based on Polymer ("material") loading indicator + by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html + */ + position: relative; + width: 7px; + height: 14px; + overflow: hidden; } + +.pswp--css_animation .pswp__preloader__donut { + -webkit-box-sizing: border-box; + box-sizing: border-box; + width: 14px; + height: 14px; + border: 2px solid #FFF; + border-radius: 50%; + border-left-color: transparent; + border-bottom-color: transparent; + position: absolute; + top: 0; + left: 0; + background: none; + margin: 0; } + +@media screen and (max-width: 1024px) { + .pswp__preloader { + position: relative; + left: auto; + top: auto; + margin: 0; + float: right; } } + +@-webkit-keyframes clockwise { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@keyframes clockwise { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); } + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); } } + +@-webkit-keyframes donut-rotate { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); } + 50% { + -webkit-transform: rotate(-140deg); + transform: rotate(-140deg); } + 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +@keyframes donut-rotate { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); } + 50% { + -webkit-transform: rotate(-140deg); + transform: rotate(-140deg); } + 100% { + -webkit-transform: rotate(0); + transform: rotate(0); } } + +/* + + 6. Additional styles + + */ +/* root element of UI */ +.pswp__ui { + -webkit-font-smoothing: auto; + visibility: visible; + opacity: 1; + z-index: 1550; } + +/* top black bar with buttons and "1 of X" indicator */ +.pswp__top-bar { + position: absolute; + left: 0; + top: 0; + height: 44px; + width: 100%; } + +.pswp__caption, +.pswp__top-bar, +.pswp--has_mouse .pswp__button--arrow--left, +.pswp--has_mouse .pswp__button--arrow--right { + -webkit-backface-visibility: hidden; + will-change: opacity; + -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); + transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +/* pswp--has_mouse class is added only when two subsequent mousemove events occur */ +.pswp--has_mouse .pswp__button--arrow--left, +.pswp--has_mouse .pswp__button--arrow--right { + visibility: visible; } + +.pswp__top-bar, +.pswp__caption { + background-color: rgba(0, 0, 0, 0.5); } + +/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */ +.pswp__ui--fit .pswp__top-bar, +.pswp__ui--fit .pswp__caption { + background-color: rgba(0, 0, 0, 0.3); } + +/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */ +.pswp__ui--idle .pswp__top-bar { + opacity: 0; } + +.pswp__ui--idle .pswp__button--arrow--left, +.pswp__ui--idle .pswp__button--arrow--right { + opacity: 0; } + +/* + pswp__ui--hidden class is added when controls are hidden + e.g. when user taps to toggle visibility of controls +*/ +.pswp__ui--hidden .pswp__top-bar, +.pswp__ui--hidden .pswp__caption, +.pswp__ui--hidden .pswp__button--arrow--left, +.pswp__ui--hidden .pswp__button--arrow--right { + /* Force paint & create composition layer for controls. */ + opacity: 0.001; } + +/* pswp__ui--one-slide class is added when there is just one item in gallery */ +.pswp__ui--one-slide .pswp__button--arrow--left, +.pswp__ui--one-slide .pswp__button--arrow--right, +.pswp__ui--one-slide .pswp__counter { + display: none; } + +.pswp__element--disabled { + display: none !important; } + +.pswp--minimal--dark .pswp__top-bar { + background: none; } diff --git a/ihatemoney/static/photoswipe/default-skin/default-skin.png b/ihatemoney/static/photoswipe/default-skin/default-skin.png Binary files differnew file mode 100644 index 0000000..441c502 --- /dev/null +++ b/ihatemoney/static/photoswipe/default-skin/default-skin.png diff --git a/ihatemoney/static/photoswipe/default-skin/default-skin.svg b/ihatemoney/static/photoswipe/default-skin/default-skin.svg new file mode 100644 index 0000000..9d5f0c6 --- /dev/null +++ b/ihatemoney/static/photoswipe/default-skin/default-skin.svg @@ -0,0 +1 @@ +<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
\ No newline at end of file diff --git a/ihatemoney/static/photoswipe/default-skin/preloader.gif b/ihatemoney/static/photoswipe/default-skin/preloader.gif Binary files differnew file mode 100644 index 0000000..b8faa69 --- /dev/null +++ b/ihatemoney/static/photoswipe/default-skin/preloader.gif diff --git a/ihatemoney/static/photoswipe/photoswipe-ui-default.min.js b/ihatemoney/static/photoswipe/photoswipe-ui-default.min.js new file mode 100644 index 0000000..ab7bedc --- /dev/null +++ b/ihatemoney/static/photoswipe/photoswipe-ui-default.min.js @@ -0,0 +1,4 @@ +/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08 +* http://photoswipe.com +* Copyright (c) 2019 Dmitry Semenov; */ +!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g<S.length;g++)c=S[g],c.onTap&&f.indexOf("pswp__"+c.name)>-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g<q.shareButtons.length;g++)a=q.shareButtons[g],c=q.getImageURLForShare(a),d=q.getPageURLForShare(a),e=q.getTextForShare(a),b=a.url.replace("{{url}}",encodeURIComponent(d)).replace("{{image_url}}",encodeURIComponent(c)).replace("{{raw_image_url}}",c).replace("{{text}}",encodeURIComponent(e)),f+='<a href="'+b+'" target="_blank" class="pswp__share--'+a.id+'"'+(a.download?"download":"")+">"+a.label+"</a>",q.parseShareButtonOut&&(f=q.parseShareButtonOut(a,f));i.children[0].innerHTML=f,i.children[0].onclick=G},I=function(a){for(var c=0;c<q.closeElClasses.length;c++)if(b.hasClass(a,"pswp__"+q.closeElClasses[c]))return!0},J=0,K=function(){clearTimeout(u),J=0,k&&v.setIdle(!1)},L=function(a){a=a?a:window.event;var b=a.relatedTarget||a.toElement;b&&"HTML"!==b.nodeName||(clearTimeout(u),u=setTimeout(function(){v.setIdle(!0)},q.timeToIdleOutside))},M=function(){q.fullscreenEl&&!b.features.isOldAndroid&&(c||(c=v.getFullscreenAPI()),c?(b.bind(document,c.eventK,v.updateFullscreen),v.updateFullscreen(),b.addClass(a.template,"pswp--supports-fs")):b.removeClass(a.template,"pswp--supports-fs"))},N=function(){q.preloaderEl&&(O(!0),l("beforeChange",function(){clearTimeout(o),o=setTimeout(function(){a.currItem&&a.currItem.loading?(!a.allowProgressiveImg()||a.currItem.img&&!a.currItem.img.naturalWidth)&&O(!1):O(!0)},q.loadingIndicatorDelay)}),l("imageLoadComplete",function(b,c){a.currItem===c&&O(!0)}))},O=function(a){n!==a&&(C(m,"preloader--active",!a),n=a)},P=function(a){var c=a.vGap;if(B()){var g=q.barsSize;if(q.captionEl&&"auto"===g.bottom)if(f||(f=b.createEl("pswp__caption pswp__caption--fake"),f.appendChild(b.createEl("pswp__caption__center")),d.insertBefore(f,e),b.addClass(d,"pswp__ui--fit")),q.addCaptionHTMLFn(a,f,!0)){var h=f.clientHeight;c.bottom=parseInt(h,10)||44}else c.bottom=g.top;else c.bottom="auto"===g.bottom?0:g.bottom;c.top=g.top}else c.top=c.bottom=0},Q=function(){q.timeToIdle&&l("mouseUsed",function(){b.bind(document,"mousemove",K),b.bind(document,"mouseout",L),t=setInterval(function(){J++,2===J&&v.setIdle(!0)},q.timeToIdle/2)})},R=function(){l("onVerticalDrag",function(a){x&&a<.95?v.hideControls():!x&&a>=.95&&v.showControls()});var a;l("onPinchClose",function(b){x&&b<.9?(v.hideControls(),a=!0):a&&!x&&b>.9&&v.showControls()}),l("zoomGestureEnded",function(){a=!1,a&&!x&&v.showControls()})},S=[{name:"caption",option:"captionEl",onInit:function(a){e=a}},{name:"share-modal",option:"shareEl",onInit:function(a){i=a},onTap:function(){F()}},{name:"button--share",option:"shareEl",onInit:function(a){h=a},onTap:function(){F()}},{name:"button--zoom",option:"zoomEl",onTap:a.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(a){g=a}},{name:"button--close",option:"closeEl",onTap:a.close},{name:"button--arrow--left",option:"arrowEl",onTap:a.prev},{name:"button--arrow--right",option:"arrowEl",onTap:a.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){c.isFullscreen()?c.exit():c.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(a){m=a}}],T=function(){var a,c,e,f=function(d){if(d)for(var f=d.length,g=0;g<f;g++){a=d[g],c=a.className;for(var h=0;h<S.length;h++)e=S[h],c.indexOf("pswp__"+e.name)>-1&&(q[e.option]?(b.removeClass(a,"pswp__element--disabled"),e.onInit&&e.onInit(a)):b.addClass(a,"pswp__element--disabled"))}};f(d.children);var g=b.getChildByClass(d,"pswp__top-bar");g&&f(g.children)};v.init=function(){b.extend(a.options,z,!0),q=a.options,d=b.getChildByClass(a.scrollWrap,"pswp__ui"),l=a.listen,R(),l("beforeChange",v.update),l("doubleTap",function(b){var c=a.currItem.initialZoomLevel;a.getZoomLevel()!==c?a.zoomTo(c,b,333):a.zoomTo(q.getDoubleTapZoom(!1,a.currItem),b,333)}),l("preventDragEvent",function(a,b,c){var d=a.target||a.srcElement;d&&d.getAttribute("class")&&a.type.indexOf("mouse")>-1&&(d.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(d.tagName))&&(c.prevent=!1)}),l("bindEvents",function(){b.bind(d,"pswpTap click",A),b.bind(a.scrollWrap,"pswpTap",v.onGlobalTap),a.likelyTouchDevice||b.bind(a.scrollWrap,"mouseover",v.onMouseOver)}),l("unbindEvents",function(){y||F(),t&&clearInterval(t),b.unbind(document,"mouseout",L),b.unbind(document,"mousemove",K),b.unbind(d,"pswpTap click",A),b.unbind(a.scrollWrap,"pswpTap",v.onGlobalTap),b.unbind(a.scrollWrap,"mouseover",v.onMouseOver),c&&(b.unbind(document,c.eventK,v.updateFullscreen),c.isFullscreen()&&(q.hideAnimationDuration=0,c.exit()),c=null)}),l("destroy",function(){q.captionEl&&(f&&d.removeChild(f),b.removeClass(e,"pswp__caption--empty")),i&&(i.children[0].onclick=null),b.removeClass(d,"pswp__ui--over-close"),b.addClass(d,"pswp__ui--hidden"),v.setIdle(!1)}),q.showAnimationDuration||b.removeClass(d,"pswp__ui--hidden"),l("initialZoomIn",function(){q.showAnimationDuration&&b.removeClass(d,"pswp__ui--hidden")}),l("initialZoomOut",function(){b.addClass(d,"pswp__ui--hidden")}),l("parseVerticalMargin",P),T(),q.shareEl&&h&&i&&(y=!0),D(),Q(),M(),N()},v.setIdle=function(a){k=a,C(d,"ui--idle",a)},v.update=function(){x&&a.currItem?(v.updateIndexIndicator(),q.captionEl&&(q.addCaptionHTMLFn(a.currItem,e),C(e,"caption--empty",!a.currItem.title)),w=!0):w=!1,y||F(),D()},v.updateFullscreen=function(d){d&&setTimeout(function(){a.setScrollOffset(0,b.getScrollY())},50),b[(c.isFullscreen()?"add":"remove")+"Class"](a.template,"pswp--fs")},v.updateIndexIndicator=function(){q.counterEl&&(g.innerHTML=a.getCurrentIndex()+1+q.indexIndicatorSep+q.getNumItemsFn())},v.onGlobalTap=function(c){c=c||window.event;var d=c.target||c.srcElement;if(!r)if(c.detail&&"mouse"===c.detail.pointerType){if(I(d))return void a.close();b.hasClass(d,"pswp__img")&&(1===a.getZoomLevel()&&a.getZoomLevel()<=a.currItem.fitRatio?q.clickToCloseNonZoomable&&a.close():a.toggleDesktopZoom(c.detail.releasePoint))}else if(q.tapToToggleControls&&(x?v.hideControls():v.showControls()),q.tapToClose&&(b.hasClass(d,"pswp__img")||I(d)))return void a.close()},v.onMouseOver=function(a){a=a||window.event;var b=a.target||a.srcElement;C(d,"ui--over-close",I(b))},v.hideControls=function(){b.addClass(d,"pswp__ui--hidden"),x=!1},v.showControls=function(){x=!0,w||v.update(),b.removeClass(d,"pswp__ui--hidden")},v.supportsFullscreen=function(){var a=document;return!!(a.exitFullscreen||a.mozCancelFullScreen||a.webkitExitFullscreen||a.msExitFullscreen)},v.getFullscreenAPI=function(){var b,c=document.documentElement,d="fullscreenchange";return c.requestFullscreen?b={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:d}:c.mozRequestFullScreen?b={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+d}:c.webkitRequestFullscreen?b={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+d}:c.msRequestFullscreen&&(b={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),b&&(b.enter=function(){return j=q.closeOnScroll,q.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?a.template[this.enterK]():void a.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},b.exit=function(){return q.closeOnScroll=j,document[this.exitK]()},b.isFullscreen=function(){return document[this.elementK]}),b}};return a});
\ No newline at end of file diff --git a/ihatemoney/static/photoswipe/photoswipe.css b/ihatemoney/static/photoswipe/photoswipe.css new file mode 100644 index 0000000..0ca0f80 --- /dev/null +++ b/ihatemoney/static/photoswipe/photoswipe.css @@ -0,0 +1,179 @@ +/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + Styles for basic PhotoSwipe functionality (sliding area, open/close transitions) +*/ +/* pswp = photoswipe */ +.pswp { + display: none; + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + overflow: hidden; + -ms-touch-action: none; + touch-action: none; + z-index: 1500; + -webkit-text-size-adjust: 100%; + /* create separate layer, to avoid paint on window.onscroll in webkit/blink */ + -webkit-backface-visibility: hidden; + outline: none; } + .pswp * { + -webkit-box-sizing: border-box; + box-sizing: border-box; } + .pswp img { + max-width: none; } + +/* style is added when JS option showHideOpacity is set to true */ +.pswp--animate_opacity { + /* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */ + opacity: 0.001; + will-change: opacity; + /* for open/close transition */ + -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); + transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp--open { + display: block; } + +.pswp--zoom-allowed .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; } + +.pswp--zoomed-in .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; } + +.pswp--dragging .pswp__img { + /* autoprefixer: off */ + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; } + +/* + Background is added as a separate element. + As animating opacity is much faster than animating rgba() background-color. +*/ +.pswp__bg { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #000; + opacity: 0; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + will-change: opacity; } + +.pswp__scroll-wrap { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; } + +.pswp__container, +.pswp__zoom-wrap { + -ms-touch-action: none; + touch-action: none; + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; } + +/* Prevent selection and tap highlights */ +.pswp__container, +.pswp__img { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; } + +.pswp__zoom-wrap { + position: absolute; + width: 100%; + -webkit-transform-origin: left top; + -ms-transform-origin: left top; + transform-origin: left top; + /* for open/close transition */ + -webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1); + transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp__bg { + will-change: opacity; + /* for open/close transition */ + -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); + transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); } + +.pswp--animated-in .pswp__bg, +.pswp--animated-in .pswp__zoom-wrap { + -webkit-transition: none; + transition: none; } + +.pswp__container, +.pswp__zoom-wrap { + -webkit-backface-visibility: hidden; } + +.pswp__item { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; } + +.pswp__img { + position: absolute; + width: auto; + height: auto; + top: 0; + left: 0; } + +/* + stretched thumbnail or div placeholder element (see below) + style is added to avoid flickering in webkit/blink when layers overlap +*/ +.pswp__img--placeholder { + -webkit-backface-visibility: hidden; } + +/* + div element that matches size of large image + large image loads on top of it +*/ +.pswp__img--placeholder--blank { + background: #222; } + +.pswp--ie .pswp__img { + width: 100% !important; + height: auto !important; + left: 0; + top: 0; } + +/* + Error message appears when image is not loaded + (JS option errorMsg controls markup) +*/ +.pswp__error-msg { + position: absolute; + left: 0; + top: 50%; + width: 100%; + text-align: center; + font-size: 14px; + line-height: 16px; + margin-top: -8px; + color: #CCC; } + +.pswp__error-msg a { + color: #CCC; + text-decoration: underline; } diff --git a/ihatemoney/static/photoswipe/photoswipe.min.js b/ihatemoney/static/photoswipe/photoswipe.min.js new file mode 100644 index 0000000..0370861 --- /dev/null +++ b/ihatemoney/static/photoswipe/photoswipe.min.js @@ -0,0 +1,4 @@ +/*! PhotoSwipe - v4.1.3 - 2019-01-08 +* http://photoswipe.com +* Copyright (c) 2019 Dmitry Semenov; */ +!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f<b.length;f++)b[f]&&a[e](b[f],c,!1)},isArray:function(a){return a instanceof Array},createEl:function(a,b){var c=document.createElement(b||"div");return a&&(c.className=a),c},getScrollY:function(){var a=window.pageYOffset;return void 0!==a?a:document.documentElement.scrollTop},unbind:function(a,b,c){e.bind(a,b,c,!0)},removeClass:function(a,b){var c=new RegExp("(\\s|^)"+b+"(\\s|$)");a.className=a.className.replace(c," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(a,b){e.hasClass(a,b)||(a.className+=(a.className?" ":"")+b)},hasClass:function(a,b){return a.className&&new RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className)},getChildByClass:function(a,b){for(var c=a.firstChild;c;){if(e.hasClass(c,b))return c;c=c.nextSibling}},arraySearch:function(a,b,c){for(var d=a.length;d--;)if(a[d][c]===b)return d;return-1},extend:function(a,b,c){for(var d in b)if(b.hasOwnProperty(d)){if(c&&a.hasOwnProperty(d))continue;a[d]=b[d]}},easing:{sine:{out:function(a){return Math.sin(a*(Math.PI/2))},inOut:function(a){return-(Math.cos(Math.PI*a)-1)/2}},cubic:{out:function(a){return--a*a*a+1}}},detectFeatures:function(){if(e.features)return e.features;var a=e.createEl(),b=a.style,c="",d={};if(d.oldIE=document.all&&!document.addEventListener,d.touch="ontouchstart"in window,window.requestAnimationFrame&&(d.raf=window.requestAnimationFrame,d.caf=window.cancelAnimationFrame),d.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!d.pointerEvent){var f=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var g=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);g&&g.length>0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;h<b.length;h++)if(e=b[h])if("object"==typeof c&&c.handleEvent){if(d){if(!c["oldIE"+e])return!1}else c["oldIE"+e]=g;a[f]("on"+e,c["oldIE"+e])}else a[f]("on"+e,c)});var f=this,g=25,h=3,i={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(a){return"A"===a.tagName},getDoubleTapZoom:function(a,b){return a?1:b.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};e.extend(i,d);var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma=function(){return{x:0,y:0}},na=ma(),oa=ma(),pa=ma(),qa={},ra=0,sa={},ta=ma(),ua=0,va=!0,wa=[],xa={},ya=!1,za=function(a,b){e.extend(f,b.publicMethods),wa.push(a)},Aa=function(a){var b=ac();return a>b-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;d<b.length;d++)b[d].apply(f,c)}},Ea=function(){return(new Date).getTime()},Fa=function(a){ja=a,f.bg.style.opacity=a*i.bgOpacity},Ga=function(a,b,c,d,e){(!ya||e&&e!==f.currItem)&&(d/=e?e.fitRatio:f.currItem.fitRatio),a[E]=u+b+"px, "+c+"px"+v+" scale("+d+")"},Ha=function(a){ea&&(a&&(s>f.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Oa=null,Pa=function(){Oa&&(e.unbind(document,"mousemove",Pa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Da("mouseUsed")),Oa=setTimeout(function(){Oa=null},100)},Qa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Pa),e.bind(window,"resize scroll orientationchange",f),Da("bindEvents")},Ra=function(){e.unbind(window,"resize scroll orientationchange",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Pa),N.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),clearTimeout(O),Da("unbindEvents")},Sa=function(a,b){var c=ic(f.currItem,qa,a);return b&&(da=c),c},Ta=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ua=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Va=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=La(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]<b.max[a]&&(c[a]=b.max[a],!0))},Wa=function(){if(E){var b=N.perspective&&!G;return u="translate"+(b?"3d(":"("),void(v=N.perspective?", 0px)":")")}E="left",e.addClass(a,"pswp--ie"),Ja=function(a,b){b.left=a+"px"},Ia=function(a){var b=a.fitRatio>1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ha=function(){if(ea){var a=ea,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=pa.x+"px",a.top=pa.y+"px"}}},Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Ya=function(a){a&&(Y||X||fa||T)&&(a.preventDefault(),a.stopPropagation())},Za=function(){f.setScrollOffset(0,e.getScrollY())},$a={},_a=0,ab=function(a){$a[a]&&($a[a].raf&&I($a[a].raf),_a--,delete $a[a])},bb=function(a){$a[a]&&ab(a),$a[a]||(_a++,$a[a]={})},cb=function(){for(var a in $a)$a.hasOwnProperty(a)&&ab(a)},db=function(a,b,c,d,e,f,g){var h,i=Ea();bb(a);var j=function(){if($a[a]){if(h=Ea()-i,h>=d)return ab(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),$a[a].raf=H(j)}};j()},eb={shout:Da,listen:Ca,viewportSize:qa,options:i,isMainScrollAnimating:function(){return fa},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return aa},setScrollOffset:function(a,b){sa.x=a,M=sa.y=b,Da("updateScrollOffset",sa)},applyZoomPan:function(a,b,c,d){pa.x=b,pa.y=c,s=a,Ha(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Wa(),r={resize:f.updateSize,orientationchange:function(){clearTimeout(O),O=setTimeout(function(){qa.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Za,keydown:Xa,click:Ya};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c<wa.length;c++)f["init"+wa[c]]();if(b){var g=f.ui=new b(f,e);g.init()}Da("firstUpdate"),m=m||i.index||0,(isNaN(m)||m<0||m>=ac())&&(m=0),f.currItem=_b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(va=!1),a.setAttribute("aria-hidden","false"),i.modal&&(va?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Da("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ua=null,c=0;c<h;c++)Ja((c+o)*ta.x,y[c].el.style);L||e.bind(f.scrollWrap,q,f),Ca("initialZoomInEnd",function(){f.setContent(y[0],m-1),f.setContent(y[2],m+1),y[0].el.style.display=y[2].el.style.display="block",i.focus&&a.focus(),Qa()}),f.setContent(y[1],m),f.updateCurrItem(),Da("afterInit"),va||(w=setInterval(function(){_a||V||aa||s!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),e.addClass(a,"pswp--visible")}},close:function(){j&&(j=!1,k=!0,Da("close"),Ra(),cc(f.currItem,null,!0,f.destroy))},destroy:function(){Da("destroy"),Xb&&clearTimeout(Xb),a.setAttribute("aria-hidden","true"),a.className=J,w&&clearInterval(w),e.unbind(f.scrollWrap,q,f),e.unbind(window,"scroll",f),zb(),cb(),Ba=null},panTo:function(a,b,c){c||(a>da.min.x?a=da.min.x:a<da.max.x&&(a=da.max.x),b>da.min.y?b=da.min.y:b<da.max.y&&(b=da.max.y)),pa.x=a,pa.y=b,Ha()},handleEvent:function(a){a=a||window.event,r[a.type]&&r[a.type](a)},goTo:function(a){a=Aa(a);var b=a-m;ua=b,m=a,f.currItem=_b(m),ra-=b,Ka(ta.x*ra),cb(),fa=!1,f.updateCurrItem()},next:function(){f.goTo(m+1)},prev:function(){f.goTo(m-1)},updateCurrZoomItem:function(a){if(a&&Da("beforeChange",0),y[1].el.children.length){var b=y[1].el.children[0];ea=e.hasClass(b,"pswp__zoom-wrap")?b.style:null}else ea=null;da=f.currItem.bounds,t=s=f.currItem.initialZoomLevel,pa.x=da.center.x,pa.y=da.center.y,a&&Da("afterChange")},invalidateCurrItems:function(){x=!0;for(var a=0;a<h;a++)y[a].item&&(y[a].item.needsUpdate=!0)},updateCurrItem:function(a){if(0!==ua){var b,c=Math.abs(ua);if(!(a&&c<2)){f.currItem=_b(m),ya=!1,Da("beforeChange",ua),c>=h&&(o+=ua+(ua>0?-h:h),c=h);for(var d=0;d<c;d++)ua>0?(b=y.shift(),y[h-1]=b,o++,Ja((o+2)*ta.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ja(o*ta.x,b.el.style),f.setContent(b,m+c-d-1-1));if(ea&&1===Math.abs(ua)){var e=_b(z);e.initialZoomLevel!==s&&(ic(e,qa),mc(e),Ia(e))}ua=0,f.updateCurrZoomItem(),z=m,Da("afterChange")}}},updateSize:function(b){if(!va&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&xa.x===window.innerWidth&&xa.y===window.innerHeight)return;xa.x=window.innerWidth,xa.y=window.innerHeight,a.style.height=xa.y+"px"}if(qa.x=f.scrollWrap.clientWidth,qa.y=f.scrollWrap.clientHeight,Za(),ta.x=qa.x+Math.round(qa.x*i.spacing),ta.y=qa.y,Ka(ta.x*ra),Da("beforeResize"),void 0!==o){for(var d,g,j,k=0;k<h;k++)d=y[k],Ja((k+o)*ta.x,d.el.style),j=m+k-1,i.loop&&ac()>2&&(j=Aa(j)),g=_b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):d.index===-1&&j>=0&&f.setContent(d,j),g&&g.container&&(ic(g,qa),mc(g),Ia(g));x=!1}t=s=f.currItem.initialZoomLevel,da=f.currItem.bounds,da&&(pa.x=da.center.x,pa.y=da.center.y,Ha(!0)),Da("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,ub.x=Math.abs(b.x)-pa.x,ub.y=Math.abs(b.y)-pa.y,Ma(oa,pa));var g=Sa(a,!1),h={};Va("x",g,h,a),Va("y",g,h,a);var i=s,j={x:pa.x,y:pa.y};Na(h);var k=function(b){1===b?(s=a,pa.x=h.x,pa.y=h.y):(s=(a-i)*b+i,pa.x=(h.x-j.x)*b+j.x,pa.y=(h.y-j.y)*b+j.y),f&&f(b),Ha(1===b)};c?db("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},fb=30,gb=10,hb={},ib={},jb={},kb={},lb={},mb=[],nb={},ob=[],pb={},qb=0,rb=ma(),sb=0,tb=ma(),ub=ma(),vb=ma(),wb=function(a,b){return a.x===b.x&&a.y===b.y},xb=function(a,b){return Math.abs(a.x-b.x)<g&&Math.abs(a.y-b.y)<g},yb=function(a,b){return pb.x=Math.abs(a.x-b.x),pb.y=Math.abs(a.y-b.y),Math.sqrt(pb.x*pb.x+pb.y*pb.y)},zb=function(){Z&&(I(Z),Z=null)},Ab=function(){V&&(Z=H(Ab),Qb())},Bb=function(){return!("fit"===i.scaleMode&&s===f.currItem.initialZoomLevel)},Cb=function(a,b){return!(!a||a===document)&&(!(a.getAttribute("class")&&a.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(b(a)?a:Cb(a.parentNode,b)))},Db={},Eb=function(a,b){return Db.prevent=!Cb(a.target,i.isClickableElement),Da("preventDragEvent",a,b,Db),Db.prevent},Fb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Gb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Hb=function(a,b,c){if(a-Q>50){var d=ob.length>2?ob.shift():{};d.x=b,d.y=c,ob.push(d),Q=a}},Ib=function(){var a=pa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qa.y/2))},Jb={},Kb={},Lb=[],Mb=function(a){for(;Lb.length>0;)Lb.pop();return F?(la=0,mb.forEach(function(a){0===la?Lb[0]=a:1===la&&(Lb[1]=a),la++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Lb[0]=Fb(a.touches[0],Jb),a.touches.length>1&&(Lb[1]=Fb(a.touches[1],Kb))):(Jb.x=a.pageX,Jb.y=a.pageY,Jb.id="",Lb[0]=Jb),Lb},Nb=function(a,b){var c,d,e,g,h=0,j=pa[a]+b[a],k=b[a]>0,l=tb.x+b.x,m=tb.x-nb.x;return c=j>da.min[a]||j<da.max[a]?i.panEndFriction:1,j=pa[a]+b[a]*c,!i.allowPanToNext&&s!==f.currItem.initialZoomLevel||(ea?"h"!==ga||"x"!==a||X||(k?(j>da.min[a]&&(c=i.panEndFriction,h=da.min[a]-j,d=da.min[a]-oa[a]),(d<=0||m<0)&&ac()>1?(g=l,m<0&&l>nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j)):(j<da.max[a]&&(c=i.panEndFriction,h=j-da.max[a],d=oa[a]-da.max[a]),(d<=0||m>0)&&ac()>1?(g=l,m>0&&l<nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j))):g=l,"x"!==a)?void(fa||$||s>f.currItem.fitRatio&&(pa[a]+=b[a]*c)):(void 0!==g&&(Ka(g,!0),$=g!==nb.x),da.min.x!==da.max.x&&(void 0!==e?pa.x=e:$||(pa.x+=b.x*c)),void 0!==g)},Ob=function(a){if(!("mousedown"===a.type&&a.button>0)){if($b)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Eb(a,!0)&&a.preventDefault(),Da("pointerDown"),F){var b=e.arraySearch(mb,a.pointerId,"id");b<0&&(b=mb.length),mb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Mb(a),d=c.length;_=null,cb(),V&&1!==d||(V=ha=!0,e.bind(window,p,f),S=ka=ia=T=$=Y=W=X=!1,ga=null,Da("firstTouchStart",c),Ma(oa,pa),na.x=na.y=0,Ma(kb,c[0]),Ma(lb,kb),nb.x=ta.x*ra,ob=[{x:kb.x,y:kb.y}],Q=P=Ea(),Sa(s,!0),zb(),Ab()),!aa&&d>1&&!fa&&!$&&(t=s,X=!1,aa=W=!0,na.y=na.x=0,Ma(oa,pa),Ma(hb,c[0]),Ma(ib,c[1]),Gb(hb,ib,vb),ub.x=Math.abs(vb.x)-pa.x,ub.y=Math.abs(vb.y)-pa.y,ba=ca=yb(hb,ib))}}},Pb=function(a){if(a.preventDefault(),F){var b=e.arraySearch(mb,a.pointerId,"id");if(b>-1){var c=mb[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Mb(a);if(ga||Y||aa)_=d;else if(tb.x!==ta.x*ra)ga="h";else{var f=Math.abs(d[0].x-kb.x)-Math.abs(d[0].y-kb.y);Math.abs(f)>=gb&&(ga=f>0?"h":"v",_=d)}}},Qb=function(){if(_){var a=_.length;if(0!==a)if(Ma(hb,_[0]),jb.x=hb.x-kb.x,jb.y=hb.y-kb.y,aa&&a>1){if(kb.x=hb.x,kb.y=hb.y,!jb.x&&!jb.y&&wb(_[1],ib))return;Ma(ib,_[1]),X||(X=!0,Da("zoomGestureStarted"));var b=yb(hb,ib),c=Vb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ka=!0);var d=1,e=Ta(),g=Ua();if(c<e)if(i.pinchToClose&&!ka&&t<=f.currItem.initialZoomLevel){var h=e-c,j=1-h/(e/1.2);Fa(j),Da("onPinchClose",j),ia=!0}else d=(e-c)/e,d>1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);d<0&&(d=0),ba=b,Gb(hb,ib,rb),na.x+=rb.x-vb.x,na.y+=rb.y-vb.y,Ma(vb,rb),pa.x=La("x",c),pa.y=La("y",c),S=c>s,s=c,Ha()}else{if(!ga)return;if(ha&&(ha=!1,Math.abs(jb.x)>=gb&&(jb.x-=_[0].x-lb.x),Math.abs(jb.y)>=gb&&(jb.y-=_[0].y-lb.y)),kb.x=hb.x,kb.y=hb.y,0===jb.x&&0===jb.y)return;if("v"===ga&&i.closeOnVerticalDrag&&!Bb()){na.y+=jb.y,pa.y+=jb.y;var k=Ib();return T=!0,Da("onVerticalDrag",k),Fa(k),void Ha()}Hb(Ea(),hb.x,hb.y),Y=!0,da=f.currItem.bounds;var l=Nb("x",jb);l||(Nb("y",jb),Na(pa),Ha())}}},Rb=function(a){if(N.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Da("pointerUp"),Eb(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(mb,a.pointerId,"id");if(c>-1)if(b=mb.splice(c,1)[0],navigator.msPointerEnabled){var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}else b.type=a.pointerType||"mouse"}var g,h=Mb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return _=null,!0;1===j&&Ma(lb,h[0]),0!==j||ga||fa||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Da("touchRelease",a,b));var k=-1;if(0===j&&(V=!1,e.unbind(window,p,f),zb(),aa?k=0:sb!==-1&&(k=Ea()-sb)),sb=1===j?Ea():-1,g=k!==-1&&k<150?"zoom":"swipe",aa&&j<2&&(aa=!1,1===j&&(g="zoomPointerUp"),Da("zoomGestureEnded")),_=null,Y||X||fa||T)if(cb(),R||(R=Sb()),R.calculateSwipeSpeed("x"),T){var l=Ib();if(l<i.verticalDragRange)f.close();else{var m=pa.y,n=ja;db("verticalDrag",0,1,300,e.easing.cubic.out,function(a){pa.y=(f.currItem.initialPosition.y-m)*a+m,Fa((1-n)*a+n),Ha()}),Da("onVerticalDrag",1)}}else{if(($||fa)&&0===j){var o=Ub(g,R);if(o)return;g="zoomPointerUp"}if(!fa)return"swipe"!==g?void Wb():void(!$&&s>f.currItem.fitRatio&&Tb(R))}},Sb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){ob.length>1?(a=Ea()-Q+50,b=ob[ob.length-2][d]):(a=Ea()-P,b=lb[d]),c.lastFlickOffset[d]=kb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pa[a]>da.min[a]?c.backAnimDestination[a]=da.min[a]:pa[a]<da.max[a]&&(c.backAnimDestination[a]=da.max[a]),void 0!==c.backAnimDestination[a]&&(c.slowDownRatio[a]=.7,c.slowDownRatioReverse[a]=1-c.slowDownRatio[a],c.speedDecelerationRatioAbs[a]<.05&&(c.lastFlickSpeed[a]=0,c.backAnimStarted[a]=!0,db("bounceZoomPan"+a,pa[a],c.backAnimDestination[a],b||300,e.easing.sine.out,function(b){pa[a]=b,Ha()}))))},calculateAnimOffset:function(a){c.backAnimStarted[a]||(c.speedDecelerationRatio[a]=c.speedDecelerationRatio[a]*(c.slowDownRatio[a]+c.slowDownRatioReverse[a]-c.slowDownRatioReverse[a]*c.timeDiff/10),c.speedDecelerationRatioAbs[a]=Math.abs(c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]),c.distanceOffset[a]=c.lastFlickSpeed[a]*c.speedDecelerationRatio[a]*c.timeDiff,pa[a]+=c.distanceOffset[a])},panAnimLoop:function(){if($a.zoomPan&&($a.zoomPan.raf=H(c.panAnimLoop),c.now=Ea(),c.timeDiff=c.now-c.lastNow,c.lastNow=c.now,c.calculateAnimOffset("x"),c.calculateAnimOffset("y"),Ha(),c.calculateOverBoundsAnimOffset("x"),c.calculateOverBoundsAnimOffset("y"),c.speedDecelerationRatioAbs.x<.05&&c.speedDecelerationRatioAbs.y<.05))return pa.x=Math.round(pa.x),pa.y=Math.round(pa.y),Ha(),void ab("zoomPan")}};return c},Tb=function(a){return a.calculateSwipeSpeed("y"),da=f.currItem.bounds,a.backAnimDestination={},a.backAnimStarted={},Math.abs(a.lastFlickSpeed.x)<=.05&&Math.abs(a.lastFlickSpeed.y)<=.05?(a.speedDecelerationRatioAbs.x=a.speedDecelerationRatioAbs.y=0,a.calculateOverBoundsAnimOffset("x"),a.calculateOverBoundsAnimOffset("y"),!0):(bb("zoomPan"),a.lastNow=Ea(),void a.panAnimLoop())},Ub=function(a,b){var c;fa||(qb=m);var d;if("swipe"===a){var g=kb.x-lb.x,h=b.lastFlickDist.x<10;g>fb&&(h||b.lastFlickOffset.x>20)?d=-1:g<-fb&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,m<0?(m=i.loop?ac()-1:0,j=!0):m>=ac()&&(m=i.loop?0:ac()-1,j=!0),j&&!i.loop||(ua+=d,ra-=d,c=!0));var k,l=ta.x*ra,n=Math.abs(l-tb.x);return c||l>tb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,qb===m&&(c=!1),fa=!0,Da("mainScrollAnimStart"),db("mainScroll",tb.x,l,k,e.easing.cubic.out,Ka,function(){cb(),fa=!1,qb=-1,(c||qb!==m)&&f.updateCurrItem(),Da("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Vb=function(a){return 1/ca*a*t},Wb=function(){var a=s,b=Ta(),c=Ua();s<b?a=b:s>c&&(a=c);var d,g=1,h=ja;return ia&&!S&&!ka&&s<b?(f.close(),!0):(ia&&(d=function(a){Fa((g-h)*a+h)}),f.zoomTo(a,0,200,e.easing.cubic.out,d),!0)};za("Gestures",{publicMethods:{initGestures:function(){var a=function(a,b,c,d,e){A=a+b,B=a+c,C=a+d,D=e?a+e:""};F=N.pointerEvent,F&&N.touch&&(N.touch=!1),F?navigator.msPointerEnabled?a("MSPointer","Down","Move","Up","Cancel"):a("pointer","down","move","up","cancel"):N.touch?(a("touch","start","move","end","cancel"),G=!0):a("mouse","down","move","up"),p=B+" "+C+" "+D,q=A,F&&!G&&(G=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Ob,r[B]=Pb,r[C]=Rb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Xb,Yb,Zb,$b,_b,ac,bc,cc=function(b,c,d,g){Xb&&clearTimeout(Xb),$b=!0,Zb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){ab("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Fa(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Da("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),$b=!1};if(!j||!h||void 0===h.x)return Da("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),a.style.opacity=d?0:1,Fa(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pa.x=h.x,pa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ha()),bb("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Xb=setTimeout(function(){if(Da("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pa.x,y:pa.y},l=s,m=ja,n=function(b){1===b?(s=f,pa.x=h.x,pa.y=h.y-M):(s=(f-l)*b+l,pa.x=(h.x-i.x)*b+i.x,pa.y=(h.y-M-i.y)*b+i.y),Ha(),g?a.style.opacity=1-b:Fa(m-b*m)};c?db("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Xb=setTimeout(k,j+20))}else s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),Fa(1),g?a.style.opacity=1:Fa(1),Xb=setTimeout(k,j+20)},d?25:90)};n()},dc={},ec=[],fc={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yb.length}},gc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},hc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((dc.x-b)/2),d.center.y=Math.round((dc.y-c)/2)+a.vGap.top,d.max.x=b>dc.x?Math.round(dc.x-b):d.center.x,d.max.y=c>dc.y?Math.round(dc.y-c)+a.vGap.top:d.center.y,d.min.x=b>dc.x?0:d.center.x,d.min.y=c>dc.y?a.vGap.top:d.center.y},ic=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Da("parseVerticalMargin",a)),dc.x=b.x,dc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=dc.x/a.w,f=dc.y/a.h;a.fitRatio=e<f?e:f;var g=i.scaleMode;"orig"===g?c=1:"fit"===g&&(c=a.fitRatio),c>1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=gc())}if(!c)return;return hc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=gc(),a.initialPosition=a.bounds.center,a.bounds},jc=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,mc(b,d,b===f.currItem&&ya),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},kc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},lc=function(a,b){if(a.src&&a.loadError&&a.container)return b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0},mc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},nc=function(){if(ec.length){for(var a,b=0;b<ec.length;b++)a=ec[b],a.holder.index===a.index&&jc(a.index,a.item,a.baseDiv,a.img,!1,a.clearPlaceholder);ec=[]}};za("Controller",{publicMethods:{lazyLoadItem:function(a){a=Aa(a);var b=_b(a);b&&(!b.loaded&&!b.loading||x)&&(Da("gettingData",a,b),b.src&&kc(b))},initController:function(){e.extend(i,fc,!0),f.items=Yb=c,_b=f.getItemAt,ac=i.getNumItemsFn,bc=i.loop,ac()<3&&(i.loop=!1),Ca("beforeChange",function(a){var b,c=i.preload,d=null===a||a>=0,e=Math.min(c[0],ac()),g=Math.min(c[1],ac());for(b=1;b<=(d?g:e);b++)f.lazyLoadItem(m+b);for(b=1;b<=(d?e:g);b++)f.lazyLoadItem(m-b)}),Ca("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ca("mainScrollAnimComplete",nc),Ca("initialZoomInEnd",nc),Ca("destroy",function(){for(var a,b=0;b<Yb.length;b++)a=Yb[b],a.container&&(a.container=null),a.placeholder&&(a.placeholder=null),a.img&&(a.img=null),a.preloader&&(a.preloader=null),a.loadError&&(a.loaded=a.loadError=!1);ec=null})},getItemAt:function(a){return a>=0&&(void 0!==Yb[a]&&Yb[a])},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=Aa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Da("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),lc(g),ic(g,qa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,mc(g,d),jc(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(lc(c,!0))return c.loadComplete=c.img=null,ic(c,qa),Ia(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!$b&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(fa||$b)?ec.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):jc(b,c,h,c.img,fa||$b,!0)}c.loadComplete=null,c.img=null,Da("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),mc(g,l),h.appendChild(l),g.placeholder=l}g.loading||kc(g),f.allowProgressiveImg()&&(!Zb&&N.transform?ec.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):jc(b,g,h,g.img,!0,!0))}Zb||b!==m?Ia(g):(ea=h.style,cc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var oc,pc={},qc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};za("Tap",{publicMethods:{initTap:function(){Ca("firstTouchStart",f.onTapStart),Ca("touchRelease",f.onTapRelease),Ca("destroy",function(){pc={},oc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(oc),oc=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!_a){var c=b;if(oc&&(clearTimeout(oc),oc=null,xb(c,pc)))return void Da("doubleTap",c);if("mouse"===b.type)return void qc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void qc(a,b);Ma(pc,c),oc=setTimeout(function(){qc(a,b),oc=null},300)}}}});var rc;za("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ca("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){rc={};var c="wheel mousewheel DOMMouseScroll";Ca("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ca("unbindEvents",function(){rc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),s<1?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ca("resize",g),Ca("afterChange",g),Ca("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ca("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||_a||V?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),rc.x=0,"deltaX"in a)1===a.deltaMode?(rc.x=18*a.deltaX,rc.y=18*a.deltaY):(rc.x=a.deltaX,rc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(rc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?rc.y=-.16*a.wheelDeltaY:rc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;rc.y=a.detail}Sa(s,!0);var b=pa.x-rc.x,c=pa.y-rc.y;(i.modal||b<=da.min.x&&b>=da.max.x&&c<=da.min.y&&c>=da.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:qa.x/2+sa.x,y:qa.y/2+sa.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec={history:!0,galleryUID:1},Fc=function(){return Cc.hash.substring(1)},Gc=function(){sc&&clearTimeout(sc),uc&&clearTimeout(uc)},Hc=function(){var a=Fc(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c<d.length;c++)if(d[c]){var e=d[c].split("=");e.length<2||(b[e[0]]=e[1])}if(i.galleryPIDs){var f=b.pid;for(b.pid=0,c=0;c<Yb.length;c++)if(Yb[c].pid===f){b.pid=c;break}}else b.pid=parseInt(b.pid,10)-1;return b.pid<0&&(b.pid=0),b},Ic=function(){if(uc&&clearTimeout(uc),_a||V)return void(uc=setTimeout(Ic,500));vc?clearTimeout(tc):vc=!0;var a=m+1,b=_b(m);b.hasOwnProperty("pid")&&(a=b.pid);var c=yc+"&gid="+i.galleryUID+"&pid="+a;zc||Cc.hash.indexOf(c)===-1&&(Bc=!0);var d=Cc.href.split("#")[0]+"#"+c;Dc?"#"+c!==window.location.hash&&history[zc?"replaceState":"pushState"]("",document.title,d):zc?Cc.replace(d):Cc.hash=c,zc=!0,tc=setTimeout(function(){vc=!1},60)};za("History",{publicMethods:{initHistory:function(){if(e.extend(i,Ec,!0),i.history){Cc=window.location,Bc=!1,Ac=!1,zc=!1,yc=Fc(),Dc="pushState"in history,yc.indexOf("gid=")>-1&&(yc=yc.split("&gid=")[0],yc=yc.split("?gid=")[0]),Ca("afterChange",f.updateURL),Ca("unbindEvents",function(){e.unbind(window,"hashchange",f.onHashChange)});var a=function(){xc=!0,Ac||(Bc?history.back():yc?Cc.hash=yc:Dc?history.pushState("",document.title,Cc.pathname+Cc.search):Cc.hash=""),Gc()};Ca("unbindEvents",function(){l&&a()}),Ca("destroy",function(){xc||a()}),Ca("firstUpdate",function(){m=Hc().pid});var b=yc.indexOf("pid=");b>-1&&(yc=yc.substring(0,b),"&"===yc.slice(-1)&&(yc=yc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Fc()===yc?(Ac=!0,void f.close()):void(vc||(wc=!0,f.goTo(Hc().pid),wc=!1))},updateURL:function(){Gc(),wc||(zc?sc=setTimeout(Ic,800):Ic())}}}),e.extend(f,eb)};return a});
\ No newline at end of file diff --git a/ihatemoney/static/showcase/1.jpg b/ihatemoney/static/showcase/1.jpg Binary files differnew file mode 100644 index 0000000..f0206c7 --- /dev/null +++ b/ihatemoney/static/showcase/1.jpg diff --git a/ihatemoney/static/showcase/2.jpg b/ihatemoney/static/showcase/2.jpg Binary files differnew file mode 100644 index 0000000..5d0b710 --- /dev/null +++ b/ihatemoney/static/showcase/2.jpg diff --git a/ihatemoney/static/showcase/3.jpg b/ihatemoney/static/showcase/3.jpg Binary files differnew file mode 100644 index 0000000..33d6328 --- /dev/null +++ b/ihatemoney/static/showcase/3.jpg diff --git a/ihatemoney/static/showcase/4.jpg b/ihatemoney/static/showcase/4.jpg Binary files differnew file mode 100644 index 0000000..3476a2c --- /dev/null +++ b/ihatemoney/static/showcase/4.jpg diff --git a/ihatemoney/static/showcase/5.jpg b/ihatemoney/static/showcase/5.jpg Binary files differnew file mode 100644 index 0000000..6f8631f --- /dev/null +++ b/ihatemoney/static/showcase/5.jpg diff --git a/ihatemoney/static/showcase/6.jpg b/ihatemoney/static/showcase/6.jpg Binary files differnew file mode 100644 index 0000000..828d9cb --- /dev/null +++ b/ihatemoney/static/showcase/6.jpg diff --git a/ihatemoney/static/showcase/7.jpg b/ihatemoney/static/showcase/7.jpg Binary files differnew file mode 100644 index 0000000..b670983 --- /dev/null +++ b/ihatemoney/static/showcase/7.jpg diff --git a/ihatemoney/static/showcase/8.jpg b/ihatemoney/static/showcase/8.jpg Binary files differnew file mode 100644 index 0000000..63293c1 --- /dev/null +++ b/ihatemoney/static/showcase/8.jpg diff --git a/ihatemoney/static/showcase/9.jpg b/ihatemoney/static/showcase/9.jpg Binary files differnew file mode 100644 index 0000000..ec41b02 --- /dev/null +++ b/ihatemoney/static/showcase/9.jpg diff --git a/ihatemoney/static/showcase/showcase.png b/ihatemoney/static/showcase/showcase.png Binary files differnew file mode 100644 index 0000000..8fff0a8 --- /dev/null +++ b/ihatemoney/static/showcase/showcase.png diff --git a/ihatemoney/templates/edit_project.html b/ihatemoney/templates/edit_project.html index b7861c5..478b7b4 100644 --- a/ihatemoney/templates/edit_project.html +++ b/ihatemoney/templates/edit_project.html @@ -48,11 +48,11 @@ <span class="mb-1">{{ _('Bill items') }}</span> <span> <a href="{{ url_for('.export_project', file='bills', format='json') }}" download class="badge badge-secondary"> - <i class="icon plus">{{ static_include("images/file-alt.svg") | safe }}</i> + <i class="icon before-text">{{ static_include("images/file-alt.svg") | safe }}</i> JSON </a> <a href="{{ url_for('.export_project', file='bills', format='csv') }}" download class="badge badge-secondary"> - <i class="icon plus">{{ static_include("images/file-csv-solid.svg") | safe }}</i> + <i class="icon before-text">{{ static_include("images/file-csv-solid.svg") | safe }}</i> CSV </a> </span> @@ -64,11 +64,11 @@ <span class="mb-1">{{ _('Settle plans') }}</span> <span> <a href="{{ url_for('.export_project', file='transactions', format='json') }}" download class="badge badge-secondary"> - <i class="icon plus">{{ static_include("images/file-alt.svg") | safe }}</i> + <i class="icon before-text">{{ static_include("images/file-alt.svg") | safe }}</i> JSON </a> <a href="{{ url_for('.export_project', file='transactions', format='csv') }}" download class="badge badge-secondary"> - <i class="icon plus">{{ static_include("images/file-csv-solid.svg") | safe }}</i> + <i class="icon before-text">{{ static_include("images/file-csv-solid.svg") | safe }}</i> CSV </a> </span> diff --git a/ihatemoney/templates/history.html b/ihatemoney/templates/history.html index a9a9a4d..9cf66a7 100644 --- a/ihatemoney/templates/history.html +++ b/ihatemoney/templates/history.html @@ -249,7 +249,7 @@ <div class="py-3 d-flex justify-content-center empty-bill"> <div class="card d-inline-flex p-2"> <div class="card-body text-center text-muted"> - <i class="icon icon-white hand-holding-heart">{{ static_include("images/hand-holding-heart.svg") | safe }}</i> + <i class="icon icon-white billimg">{{ static_include("images/bill.svg") | safe }}</i> <h3>{{ _('Nothing to list')}}</h3> <p> {{ _("Someone probably cleared the project history.") }} diff --git a/ihatemoney/templates/home.html b/ihatemoney/templates/home.html index bac8abe..4af6a80 100644 --- a/ihatemoney/templates/home.html +++ b/ihatemoney/templates/home.html @@ -9,14 +9,23 @@ {{ _("Try out the demo") }} </a> {% endif %} + {% if g.lang == 'fr' %} + ou <a class="showcase btn" onclick="javascript:showGallery(); return false;">Voir la BD explicative</a> + <img class="showcaseimg" src="{{ url_for("static", filename='images/indicate.svg') }}" /> + {% endif %} </div> <div class="col-xs-12 col-sm-4"> - <p class="additional-content"> - {{ _("You're sharing a house?") }}<br /> - {{ _("Going on holidays with friends?") }}<br /> - {{ _("Simply sharing money with others?") }} <br /> - <strong>{{ _("We can help!") }}</strong> - </p> + <table class="additional-content"><tr> + <td> + {{ _("You're sharing a house?") }}<br /> + {{ _("Going on holidays with friends?") }}<br /> + {{ _("Simply sharing money with others?") }} <br /> + <strong>{{ _("We can help!") }}</strong> + </td> + <td> + <img class="shareimg" src="{{ url_for("static", filename='images/share.svg') }}" /> + </td> + </tr></table> </div> </header> <main class="row home"> diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 35d2797..6204ad5 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -16,6 +16,7 @@ <link rel=stylesheet type=text/css href="{{ url_for("static", filename='css/datatables.min.css') }}"> <script src="{{ url_for("static", filename="js/datatables.min.js") }}"></script> {%- endif %} + {% block head %}{% endblock %} <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ @@ -32,6 +33,7 @@ </script> </head> <body class="d-flex flex-column h-100"> + {% if g.lang == 'fr' %}{% include "showcase.html" %}{% endif %} <nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> @@ -85,7 +87,7 @@ <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarProjectsLinks"> <li> <a class="dropdown-item" href="{{ url_for("main.create_project") }}"> - <i class="icon plus">{{ static_include("images/plus.svg") | safe }}</i> + <i class="icon before-text">{{ static_include("images/plus.svg") | safe }}</i> {{ _("Start a new project") }} </a> </li> diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html index 95088eb..be55c19 100644 --- a/ihatemoney/templates/list_bills.html +++ b/ihatemoney/templates/list_bills.html @@ -69,8 +69,14 @@ </div> </div> <div class="identifier"> + {% if g.lang == 'fr' %} + <a class="btn btn-secondary btn-block" href="" onclick="javascript:showGallery(); return false;"> + <i class="icon icon-white high before-text">{{ static_include("images/read.svg") | safe }}</i> + Voir la BD explicative + </a> + {% endif %} <a class="btn btn-secondary btn-block" href="{{ url_for('.invite') }}"> - <i class="icon icon-white paper-plane">{{ static_include("images/paper-plane.svg") | safe }}</i> + <i class="icon icon-white high before-text">{{ static_include("images/paper-plane.svg") | safe }}</i> {{ _("Invite people") }} </a> </div> @@ -79,7 +85,7 @@ {% block content %} <span id="new-bill" class="float-right" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}> <a href="{{ url_for('.add_bill') }}" class="btn btn-primary float-right {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="false" data-target="#bill-form"> - <i class="icon icon-white plus">{{ static_include("images/plus.svg") | safe }}</i> + <i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i> {{ _("Add a new bill") }} </a> </span> @@ -180,7 +186,7 @@ <div class="py-3 d-flex justify-content-center empty-bill"> <div class="card d-inline-flex p-2"> <div class="card-body text-center text-muted"> - <i class="icon icon-white hand-holding-heart">{{ static_include("images/hand-holding-heart.svg") | safe }}</i> + <i class="icon icon-white billimg">{{ static_include("images/bill.svg") | safe }}</i> <h3>{{ _('No bills')}}</h3> <p> {{ _("Nothing to list yet.")}}<br /> diff --git a/ihatemoney/templates/showcase.html b/ihatemoney/templates/showcase.html new file mode 100644 index 0000000..cd9a371 --- /dev/null +++ b/ihatemoney/templates/showcase.html @@ -0,0 +1,67 @@ +<div id="pswp" class="hiddenpswp" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="pswp__bg"></div> + <div class="pswp__scroll-wrap"> + <div class="pswp__container"> + <div class="pswp__item"></div> + <div class="pswp__item"></div> + <div class="pswp__item"></div> + </div> + <div class="pswp__ui pswp__ui--hidden"> + <div class="pswp__top-bar"> + <div class="pswp__counter"></div> + <button class="pswp__button pswp__button--close" title="Fermer (Esc)"></button> + <div class="pswp__preloader"> + <div class="pswp__preloader__icn"> + <div class="pswp__preloader__cut"> + <div class="pswp__preloader__donut"></div> + </div> + </div> + </div> + </div> + + <button class="pswp__button pswp__button--arrow--left" title="Suivant (flèche droite)"> + </button> + + <button class="pswp__button pswp__button--arrow--right" title="Précédent (flèche gauche)"> + </button> + + <div class="pswp__caption"> + <div class="pswp__caption__center"></div> + </div> + </div> + </div> +</div> +<script type="text/javascript"> +var pswpElement = document.getElementById('pswp'); +var items = JSON.parse('[{"h": 2450, "src": "/static/showcase/1.jpg", "w": 2450}, {"h": 2509, "src": "/static/showcase/2.jpg", "w": 2221}, {"h": 2536, "src": "/static/showcase/3.jpg", "w": 2101}, {"h": 2722, "src": "/static/showcase/4.jpg", "w": 2348}, {"h": 2745, "src": "/static/showcase/5.jpg", "w": 1804}, {"h": 3307, "src": "/static/showcase/6.jpg", "w": 2897}, {"h": 2321, "src": "/static/showcase/7.jpg", "w": 2239}, {"h": 2470, "src": "/static/showcase/8.jpg", "w": 2419}, {"h": 3307, "src": "/static/showcase/9.jpg", "w": 2602}]'); +var options = { + index: 0, + loop: false, +}; + +function showGallery(){ + + /* the CSS and JS for photoswipe is loaded dynamically + * so that they are not loaded if the gallery is not open */ + + $('head').append('<link rel="stylesheet" type="text/css" href="{{ url_for("static", filename="photoswipe/default-skin/default-skin.css") }}">'); + $('head').append('<link rel="stylesheet" type="text/css" href="{{ url_for("static", filename="photoswipe/photoswipe.css") }}">'); + + var script = document.createElement("script"); + script.type = "text/javascript"; + script.src = "{{ url_for('static', filename='photoswipe/photoswipe.min.js')}}"; + script.onload = function(){ + var script2 = document.createElement("script"); + script2.type = "text/javascript"; + script2.src = "{{ url_for('static', filename='photoswipe/photoswipe-ui-default.min.js')}}"; + script2.onload = function(){ + pswpElement.className="pswp"; + var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options); + gallery.init(); + }; + document.body.appendChild(script2); + }; + document.body.appendChild(script); +} + +</script> |
