├── README.md ├── css └── component.css ├── fonts ├── icomoon.dev.svg ├── icomoon.eot ├── icomoon.svg ├── icomoon.ttf ├── icomoon.woff └── license.txt ├── images ├── 1.jpg ├── 2.jpg ├── 3.jpg └── 4.jpg ├── index.html └── js ├── boxlayout.js └── modernizr.custom.js /README.md: -------------------------------------------------------------------------------- 1 | 2 | FullscreenLayoutPageTransitions 3 | ========= 4 | 5 | This responsive layout is based on an initial grid of four boxes. Once a box is clicked, it gets resized to fullscreen and the other boxes scale down and fade out. In the work section we experiment with another transition which is to show a panel by making it appear from the bottom while scaling the current one down. To see it in action, open the work section and click on one of the portfolio items and navigate through them. 6 | 7 | [article on Codrops](http://tympanus.net/codrops/?p=14783) 8 | 9 | [demo](http://tympanus.net/Development/FullscreenLayoutPageTransitions) 10 | 11 | Licensed under the MIT License -------------------------------------------------------------------------------- /css/component.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Lato:300,400,700); 2 | 3 | @font-face { 4 | font-family: 'icomoon'; 5 | src:url('../fonts/icomoon.eot'); 6 | src:url('../fonts/icomoon.eot?#iefix') format('embedded-opentype'), 7 | url('../fonts/icomoon.woff') format('woff'), 8 | url('../fonts/icomoon.ttf') format('truetype'), 9 | url('../fonts/icomoon.svg#icomoon') format('svg'); 10 | font-weight: normal; 11 | font-style: normal; 12 | } 13 | 14 | body, html { font-size: 100%; padding: 0; margin: 0; height: 100%;} 15 | 16 | *, 17 | *:after, 18 | *:before { 19 | -webkit-box-sizing: border-box; 20 | -moz-box-sizing: border-box; 21 | box-sizing: border-box; 22 | } 23 | 24 | body { 25 | font-family: 'Lato', Calibri, Arial, sans-serif; 26 | color: #f2ede3; 27 | background: #333; 28 | font-size: 0.9em; 29 | font-weight: 300; 30 | } 31 | 32 | a { 33 | color: #f0f0f0; 34 | text-decoration: none; 35 | font-weight: 700; 36 | letter-spacing: 2px; 37 | padding: 0 5px; 38 | text-transform: uppercase; 39 | font-size: 80%; 40 | } 41 | 42 | a:hover { 43 | color: #fff; 44 | } 45 | 46 | .container { height: 100%; } 47 | 48 | .bl-main { 49 | position: absolute; 50 | width: 100%; 51 | height: 100%; 52 | overflow: hidden; 53 | } 54 | 55 | .bl-main > section { 56 | position: absolute; 57 | width: 50%; 58 | height: 50%; 59 | } 60 | 61 | .bl-main > section:first-child { 62 | top: 0; 63 | left: 0; 64 | background: #F06060; 65 | } 66 | 67 | .bl-main > section:nth-child(2) { 68 | top: 0; 69 | left: 50%; 70 | background: #FA987D; 71 | } 72 | 73 | .bl-main > section:nth-child(3) { 74 | top: 50%; 75 | left: 0; 76 | background: #72CCA7; 77 | } 78 | 79 | .bl-main > section:nth-child(4) { 80 | top: 50%; 81 | left: 50%; 82 | background: #10A296; 83 | } 84 | 85 | .bl-box { 86 | position: relative; 87 | width: 100%; 88 | height: 100%; 89 | cursor: pointer; 90 | opacity: 1; 91 | /* Centering with flexbox */ 92 | display: -webkit-box; 93 | display: -moz-box; 94 | display: -ms-flexbox; 95 | display: -webkit-flex; 96 | display: flex; 97 | -webkit-flex-direction: row; 98 | -ms-flex-direction: row; 99 | flex-direction: row; 100 | -webkit-flex-wrap: wrap; 101 | -ms-flex-wrap: wrap; 102 | flex-wrap: wrap; 103 | -webkit-box-pack: center; 104 | -moz-box-pack: center; 105 | -webkit-justify-content: center; 106 | -ms-flex-pack: center; 107 | justify-content: center; 108 | -webkit-box-align: center; 109 | -moz-box-align: center; 110 | -webkit-align-items: center; 111 | -ms-flex-align: center; 112 | align-items: center; 113 | } 114 | 115 | .bl-box h2 { 116 | text-align: center; 117 | margin: 0; 118 | padding: 20px; 119 | width: 100%; 120 | font-size: 1.8em; 121 | letter-spacing: 2px; 122 | font-weight: 700; 123 | text-transform: uppercase; 124 | } 125 | 126 | .bl-icon { 127 | font-family: 'icomoon'; 128 | speak: none; 129 | font-style: normal; 130 | font-weight: normal; 131 | font-variant: normal; 132 | text-transform: none; 133 | line-height: 1; 134 | cursor: pointer; 135 | -webkit-font-smoothing: antialiased; 136 | } 137 | 138 | .bl-icon:before { 139 | display: block; 140 | font-size: 2em; 141 | margin-bottom: 10px; 142 | } 143 | 144 | .bl-icon-about:before { 145 | content: "\e000"; 146 | } 147 | 148 | .bl-icon-works:before { 149 | content: "\e001"; 150 | } 151 | 152 | .bl-icon-blog:before { 153 | content: "\e002"; 154 | } 155 | 156 | .bl-icon-contact:before { 157 | content: "\e003"; 158 | } 159 | 160 | .bl-main > section .bl-icon-close { 161 | position: absolute; 162 | top: 20px; 163 | right: 20px; 164 | cursor: pointer; 165 | z-index: 100; 166 | opacity: 0; 167 | pointer-events: none; 168 | } 169 | 170 | .bl-icon-close:before { 171 | content: "\e005"; 172 | } 173 | 174 | .bl-content, 175 | div.bl-panel-items > div > div { 176 | opacity: 0; 177 | pointer-events: none; 178 | position: absolute; 179 | top: 60px; 180 | left: 30px; 181 | right: 30px; 182 | bottom: 30px; 183 | padding: 0 20px; 184 | overflow: hidden; 185 | overflow-y: auto; 186 | -webkit-overflow-scrolling: touch; 187 | } 188 | 189 | /* Custom content */ 190 | 191 | .bl-content p { 192 | margin: 0 auto; 193 | padding-bottom: 15px; 194 | font-size: 1.7em; 195 | line-height: 1.8; 196 | } 197 | 198 | .bl-content h2 { 199 | font-size: 3em; 200 | font-weight: 300; 201 | margin: 0 0 20px 0; 202 | } 203 | 204 | .bl-content article { 205 | padding: 20px 40px 20px 0px; 206 | } 207 | 208 | .bl-content article h3 { 209 | font-weight: 700; 210 | letter-spacing: 2px; 211 | text-transform: uppercase; 212 | margin: 0 0 10px 0; 213 | padding-top: 20px; 214 | font-size: 1.4em; 215 | } 216 | 217 | .bl-content article a { 218 | color: rgba(0,0,0,0.2); 219 | } 220 | 221 | .bl-content > ul { 222 | list-style: none; 223 | padding: 0; 224 | margin: 0; 225 | } 226 | 227 | .bl-content > ul li { 228 | display: inline-block; 229 | width: 20%; 230 | margin: 1%; 231 | } 232 | 233 | .bl-content > ul li a { 234 | display: block; 235 | padding: 0; 236 | border: 8px solid rgba(0,0,0,0.1); 237 | } 238 | 239 | .bl-content > ul li a img { 240 | display: block; 241 | max-width: 100%; 242 | } 243 | 244 | /* Panel Items */ 245 | 246 | div.bl-panel-items, 247 | div.bl-panel-items > div { 248 | width: 100%; 249 | height: 100%; 250 | top: 0; 251 | left: 0; 252 | position: absolute; 253 | } 254 | 255 | div.bl-panel-items > div > div { 256 | width: 60%; 257 | margin: 0 auto; 258 | opacity: 1; 259 | bottom: 90px; 260 | top: 90px; 261 | pointer-events: auto; 262 | } 263 | 264 | div.bl-panel-items > div > div h3 { 265 | font-size: 2.4em; 266 | font-weight: 300; 267 | margin: 0 0 20px 0; 268 | } 269 | 270 | div.bl-panel-items > div > div p { 271 | font-size: 1.3em; 272 | } 273 | 274 | div.bl-panel-items > div > div img { 275 | float: left; 276 | margin: 0 20px 20px 0; 277 | max-width: 100%; 278 | } 279 | 280 | div.bl-panel-items { 281 | top: 100%; 282 | z-index: 9999; 283 | } 284 | 285 | div.bl-panel-items > div { 286 | background: #3ba5db; 287 | z-index: 0; 288 | opacity: 0; 289 | -webkit-transform: translateY(0); 290 | -webkit-transition: -webkit-transform 0.5s ease-in-out, opacity 0s linear 0.5s; 291 | -moz-transform: translateY(0); 292 | -moz-transition: -moz-transform 0.5s ease-in-out, opacity 0s linear 0.5s; 293 | transform: translateY(0); 294 | transition: transform 0.5s ease-in-out, opacity 0s linear 0.5s; 295 | -ms-transform: translateY(0); 296 | } 297 | 298 | div.bl-panel-items nav { 299 | position: absolute; 300 | z-index: 9999; 301 | width: 216px; 302 | left: 50%; 303 | top: 0px; 304 | margin-left: -108px; 305 | opacity: 0; 306 | -webkit-transition: opacity 0.2s ease-in-out 0.5s; 307 | -moz-transition: opacity 0.2s ease-in-out 0.5s; 308 | transition: opacity 0.2s ease-in-out 0.5s; 309 | } 310 | 311 | div.bl-panel-items.bl-panel-items-show nav span { 312 | float: left; 313 | margin: 5px; 314 | } 315 | 316 | div.bl-panel-items nav span.bl-next-work { 317 | font-weight: 700; 318 | letter-spacing: 2px; 319 | display: block; 320 | text-transform: uppercase; 321 | line-height: 2em; 322 | cursor: pointer; 323 | margin-right: 2em; 324 | } 325 | 326 | div.bl-panel-items.bl-panel-items-show nav { 327 | opacity: 1; 328 | top: -70px; 329 | } 330 | 331 | div.bl-panel-items > div.bl-show-work { 332 | z-index: 1000; 333 | opacity: 1; 334 | -webkit-transform: translateY(-100%); 335 | -webkit-transition: -webkit-transform 0.5s ease-in-out; 336 | -moz-transform: translateY(-100%); 337 | -moz-transition: -moz-transform 0.5s ease-in-out; 338 | transform: translateY(-100%); 339 | transition: transform 0.5s ease-in-out; 340 | -ms-transform: translateY(-100%); 341 | } 342 | 343 | div.bl-panel-items > div.bl-hide-current-work { 344 | opacity: 0; 345 | -webkit-transition: -webkit-transform 0.5s ease-in-out, opacity 0.5s ease-in-out; 346 | -webkit-transform: translateY(-100%) scale(0.5); 347 | -moz-transition: -moz-transform 0.5s ease-in-out, opacity 0.5s ease-in-out; 348 | -moz-transform: translateY(-100%) scale(0.5); 349 | transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; 350 | transform: translateY(-100%) scale(0.5); 351 | -ms-transform: translateY(-100%) scale(0.5); 352 | z-index: 0; 353 | } 354 | 355 | /* Transition classes and properties */ 356 | /* Separated for a better overview and control */ 357 | 358 | .bl-main > section { 359 | -webkit-transition: all 0.5s ease-in-out; 360 | -moz-transition: all 0.5s ease-in-out; 361 | transition: all 0.5s ease-in-out; 362 | } 363 | 364 | .bl-main > section.bl-expand { 365 | width: 100%; 366 | height: 100%; 367 | top: 0; 368 | left: 0; 369 | } 370 | 371 | .bl-main > section.bl-expand-top { 372 | z-index: 100; 373 | } 374 | 375 | .bl-main > section:first-child.bl-expand { 376 | background: #EE4444; 377 | } 378 | .bl-main > section:nth-child(2).bl-expand { 379 | background: #F98262; 380 | } 381 | .bl-main > section:nth-child(3).bl-expand { 382 | background: #4BBE8E; 383 | } 384 | .bl-main > section:nth-child(4).bl-expand { 385 | background: #0D8278; 386 | } 387 | 388 | .bl-main.bl-expand-item > section:not(.bl-expand), 389 | .bl-main.bl-expand-item > section.bl-scale-down { 390 | -webkit-transform: scale(0.5); 391 | -moz-transform: scale(0.5); 392 | -ms-transform: scale(0.5); 393 | transform: scale(0.5); 394 | opacity: 0; 395 | } 396 | 397 | .bl-box { 398 | -webkit-transition: opacity 0.2s linear 0.5s; 399 | -moz-transition: opacity 0.2s linear 0.5s; 400 | transition: opacity 0.2s linear 0.5s; 401 | } 402 | 403 | section.bl-expand .bl-box { 404 | opacity: 0; 405 | -webkit-transition: opacity 0s linear; 406 | -moz-transition: opacity 0s linear; 407 | transition: opacity 0s linear; 408 | } 409 | 410 | .bl-box h2 { 411 | -webkit-transition: all 0.2s ease-in-out; 412 | -moz-transition: all 0.2s ease-in-out; 413 | transition: all 0.2s ease-in-out; 414 | } 415 | 416 | .no-touch section:not(.bl-expand) .bl-box:hover h2 { 417 | -webkit-transform: translateY(-15px); 418 | -moz-transform: translateY(-15px); 419 | -ms-transform: translateY(-15px); 420 | transform: translateY(-15px); 421 | } 422 | 423 | .bl-content, 424 | .bl-icon-close { 425 | -webkit-transition: opacity 0.1s linear 0s; 426 | -moz-transition: opacity 0.1s linear 0s; 427 | transition: opacity 0.1s linear 0s; 428 | } 429 | 430 | section.bl-expand .bl-content, 431 | section.bl-expand .bl-icon-close { 432 | pointer-events: auto; 433 | opacity: 1; 434 | -webkit-transition: opacity 0.3s linear 0.5s; 435 | -moz-transition: opacity 0.3s linear 0.5s; 436 | transition: opacity 0.3s linear 0.5s; 437 | } 438 | 439 | @media screen and (max-width: 46.5em) { 440 | .bl-content, 441 | .bl-box { 442 | font-size: 75%; 443 | } 444 | 445 | .bl-expand .bl-box { 446 | height: 130px; 447 | } 448 | 449 | .bl-content > ul li { 450 | width: 40%; 451 | } 452 | } 453 | -------------------------------------------------------------------------------- /fonts/icomoon.dev.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG font generated by IcoMoon. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 22 | 27 | 28 | 31 | 34 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/fonts/icomoon.eot -------------------------------------------------------------------------------- /fonts/icomoon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG font generated by IcoMoon. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 22 | 27 | 28 | 31 | 34 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/fonts/icomoon.ttf -------------------------------------------------------------------------------- /fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/fonts/icomoon.woff -------------------------------------------------------------------------------- /fonts/license.txt: -------------------------------------------------------------------------------- 1 | Icon Set: IcoMoon - Free -- http://keyamoon.com/icomoon/ 2 | License: CC BY 3.0 -- http://creativecommons.org/licenses/by/3.0/ -------------------------------------------------------------------------------- /images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/images/1.jpg -------------------------------------------------------------------------------- /images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/images/2.jpg -------------------------------------------------------------------------------- /images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/images/3.jpg -------------------------------------------------------------------------------- /images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codrops/FullscreenLayoutPageTransitions/1dfb62faf91a9f548240438622161d407db6c05f/images/4.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Fullscreen Layout with Page Transitions 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 |
20 |

About

21 |
22 |
23 |

About this layout

24 |

This responsive layout is based on an initial grid of four boxes. Once a box is clicked, it gets resized to fullscreen and the other boxes scale down and fade out. In the work section we experiment with another transition which is to show a panel by making it appear from the bottom while scaling the current one down. To see it in action, open the work section and click on one of the portfolio items and navigate through them.

25 |

26 | « Previous Demo | 27 | Back to the Codrops Article 28 |

29 |
30 | 31 |
32 |
33 |
34 |

Works

35 |
36 |
37 |

My Works

38 |

Mung bean maize dandelion sea lettuce catsear bunya nuts ricebean tatsoi caulie horseradish pea.

39 |
    40 |
  • 41 |
  • 42 |
  • 43 |
  • 44 |
45 |

Illustrations by Isaac Montemayor

46 |
47 | 48 |
49 |
50 |
51 |

Blog

52 |
53 |
54 |

My Musings

55 |
56 |

Being a Freelance Designer

57 |

Stumptown helvetica cardigan, odd future seitan tattooed flannel. Kale chips direct trade cray beard. 8-bit etsy butcher post-ironic blog lo-fi mcsweeney's, sustainable pickled umami flexitarian DIY ethical plaid trust fund. Wolf cred organic, terry richardson aesthetic four loko occupy vegan chillwave readymade deep... Read more

58 |
59 |
60 |

Working with Photoshop

61 |

Cosby sweater odd future gluten-free actually dreamcatcher. Fixie cray vice sriracha disrupt, lo-fi pitchfork mcsweeney's swag YOLO meh chambray etsy. Keytar sriracha fanny pack church-key hashtag vice blog. 3 wolf moon VHS helvetica, raw denim deep v shoreditch seitan twee... Read more

62 |
63 |
64 |

Making use of Icon Fonts

65 |

Locavore irony gastropub chillwave, butcher meggings flexitarian pinterest master cleanse godard. Intelligentsia pop-up neutra, williamsburg gastropub godard pinterest swag deep v umami lomo. Butcher next level 90's wolf bushwick, narwhal photo booth YOLO kale chips whatever small batch. Meh viral ethical hella cardigan portland, street art mlkshk meggings mixtape kale chips cliche messenger bag pitchfork... Read more

66 |
67 |
68 |

Being a Freelance Designer

69 |

Stumptown helvetica cardigan, odd future seitan tattooed flannel. Kale chips direct trade cray beard. 8-bit etsy butcher post-ironic blog lo-fi mcsweeney's, sustainable pickled umami flexitarian DIY ethical plaid trust fund. Wolf cred organic, terry richardson aesthetic four loko occupy vegan chillwave readymade deep... Read more

70 |
71 |
72 |

Working with Photoshop

73 |

Cosby sweater odd future gluten-free actually dreamcatcher. Fixie cray vice sriracha disrupt, lo-fi pitchfork mcsweeney's swag YOLO meh chambray etsy. Keytar sriracha fanny pack church-key hashtag vice blog. 3 wolf moon VHS helvetica, raw denim deep v shoreditch seitan twee... Read more

74 |
75 |
76 |

Making use of Icon Fonts

77 |

Locavore irony gastropub chillwave, butcher meggings flexitarian pinterest master cleanse godard. Intelligentsia pop-up neutra, williamsburg gastropub godard pinterest swag deep v umami lomo. Butcher next level 90's wolf bushwick, narwhal photo booth YOLO kale chips whatever small batch. Meh viral ethical hella cardigan portland, street art mlkshk meggings mixtape kale chips cliche messenger bag pitchfork... Read more

78 |
79 |
80 | 81 |
82 |
83 |
84 |

Contact

85 |
86 |
87 |

Get in touch

88 |

Pinterest semiotics single-origin coffee craft beer thundercats irony, tumblr bushwick intelligentsia pickled. Narwhal mustache godard master cleanse street art, occupy ugh selfies put a bird on it cray salvia four loko gluten-free shoreditch. Occupy american apparel freegan cliche. Mustache trust fund 8-bit jean shorts mumblecore thundercats. Pour-over small batch forage cray, banjo post-ironic flannel keffiyeh cred ethnic semiotics next level tousled fashion axe. Sustainable cardigan keytar fap bushwick bespoke.

89 |
90 | 91 |
92 | 93 |
94 |
95 |
96 | 97 |

Fixie bespoke

98 |

Iphone artisan direct trade ethical Austin. Fixie bespoke banh mi ugh, deep v vinyl hashtag. Tumblr gentrify keffiyeh pop-up iphone twee biodiesel. Occupy american apparel freegan cliche. Mustache trust fund 8-bit jean shorts mumblecore thundercats. Pour-over small batch forage cray, banjo post-ironic flannel keffiyeh cred ethnic semiotics next level tousled fashion axe. Sustainable cardigan keytar fap bushwick bespoke.

99 |
100 |
101 |
102 |
103 | 104 |

Chillwave mustache

105 |

Squid vinyl scenester literally pug, hashtag tofu try-hard typewriter polaroid craft beer mlkshk cardigan photo booth PBR. Chillwave 90's gentrify american apparel carles disrupt. Pinterest semiotics single-origin coffee craft beer thundercats irony, tumblr bushwick intelligentsia pickled. Narwhal mustache godard master cleanse street art, occupy ugh selfies put a bird on it cray salvia four loko gluten-free shoreditch.

106 |
107 |
108 |
109 |
110 | 111 |

Austin hella

112 |

Ethical cray wayfarers leggings vice, seitan banksy small batch ethnic master cleanse. Pug chillwave etsy, scenester meh occupy blue bottle tousled blog tonx pinterest selvage mixtape swag cosby sweater. Synth tousled direct trade, hella Austin craft beer ugh chambray.

113 |
114 |
115 |
116 |
117 | 118 |

Brooklyn dreamcatcher

119 |

Fashion axe 90's pug fap. Blog wayfarers brooklyn dreamcatcher, bicycle rights retro YOLO. Wes anderson lomo 90's food truck 3 wolf moon, twee jean shorts. Iphone small batch twee wolf yr before they sold out. Brooklyn echo park cred, portland pug selvage flannel seitan tousled mcsweeney's.

120 |
121 |
122 | 126 |
127 |
128 |
129 | 130 | 131 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /js/boxlayout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * boxlayout.js v1.0.0 3 | * http://www.codrops.com 4 | * 5 | * Licensed under the MIT license. 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * 8 | * Copyright 2013, Codrops 9 | * http://www.codrops.com 10 | */ 11 | var Boxlayout = (function() { 12 | 13 | var $el = $( '#bl-main' ), 14 | $sections = $el.children( 'section' ), 15 | // works section 16 | $sectionWork = $( '#bl-work-section' ), 17 | // work items 18 | $workItems = $( '#bl-work-items > li' ), 19 | // work panels 20 | $workPanelsContainer = $( '#bl-panel-work-items' ), 21 | $workPanels = $workPanelsContainer.children( 'div' ), 22 | totalWorkPanels = $workPanels.length, 23 | // navigating the work panels 24 | $nextWorkItem = $workPanelsContainer.find( 'nav > span.bl-next-work' ), 25 | // if currently navigating the work items 26 | isAnimating = false, 27 | // close work panel trigger 28 | $closeWorkItem = $workPanelsContainer.find( 'nav > span.bl-icon-close' ), 29 | transEndEventNames = { 30 | 'WebkitTransition' : 'webkitTransitionEnd', 31 | 'MozTransition' : 'transitionend', 32 | 'OTransition' : 'oTransitionEnd', 33 | 'msTransition' : 'MSTransitionEnd', 34 | 'transition' : 'transitionend' 35 | }, 36 | // transition end event name 37 | transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ], 38 | // support css transitions 39 | supportTransitions = Modernizr.csstransitions; 40 | 41 | function init() { 42 | initEvents(); 43 | } 44 | 45 | function initEvents() { 46 | 47 | $sections.each( function() { 48 | 49 | var $section = $( this ); 50 | 51 | // expand the clicked section and scale down the others 52 | $section.on( 'click', function() { 53 | 54 | if( !$section.data( 'open' ) ) { 55 | $section.data( 'open', true ).addClass( 'bl-expand bl-expand-top' ); 56 | $el.addClass( 'bl-expand-item' ); 57 | } 58 | 59 | } ).find( 'span.bl-icon-close' ).on( 'click', function() { 60 | 61 | // close the expanded section and scale up the others 62 | $section.data( 'open', false ).removeClass( 'bl-expand' ).on( transEndEventName, function( event ) { 63 | if( !$( event.target ).is( 'section' ) ) return false; 64 | $( this ).off( transEndEventName ).removeClass( 'bl-expand-top' ); 65 | } ); 66 | 67 | if( !supportTransitions ) { 68 | $section.removeClass( 'bl-expand-top' ); 69 | } 70 | 71 | $el.removeClass( 'bl-expand-item' ); 72 | 73 | return false; 74 | 75 | } ); 76 | 77 | } ); 78 | 79 | // clicking on a work item: the current section scales down and the respective work panel slides up 80 | $workItems.on( 'click', function( event ) { 81 | 82 | // scale down main section 83 | $sectionWork.addClass( 'bl-scale-down' ); 84 | 85 | // show panel for this work item 86 | $workPanelsContainer.addClass( 'bl-panel-items-show' ); 87 | 88 | var $panel = $workPanelsContainer.find("[data-panel='" + $( this ).data( 'panel' ) + "']"); 89 | currentWorkPanel = $panel.index(); 90 | $panel.addClass( 'bl-show-work' ); 91 | 92 | return false; 93 | 94 | } ); 95 | 96 | // navigating the work items: current work panel scales down and the next work panel slides up 97 | $nextWorkItem.on( 'click', function( event ) { 98 | 99 | if( isAnimating ) { 100 | return false; 101 | } 102 | isAnimating = true; 103 | 104 | var $currentPanel = $workPanels.eq( currentWorkPanel ); 105 | currentWorkPanel = currentWorkPanel < totalWorkPanels - 1 ? currentWorkPanel + 1 : 0; 106 | var $nextPanel = $workPanels.eq( currentWorkPanel ); 107 | 108 | $currentPanel.removeClass( 'bl-show-work' ).addClass( 'bl-hide-current-work' ).on( transEndEventName, function( event ) { 109 | if( !$( event.target ).is( 'div' ) ) return false; 110 | $( this ).off( transEndEventName ).removeClass( 'bl-hide-current-work' ); 111 | isAnimating = false; 112 | } ); 113 | 114 | if( !supportTransitions ) { 115 | $currentPanel.removeClass( 'bl-hide-current-work' ); 116 | isAnimating = false; 117 | } 118 | 119 | $nextPanel.addClass( 'bl-show-work' ); 120 | 121 | return false; 122 | 123 | } ); 124 | 125 | // clicking the work panels close button: the current work panel slides down and the section scales up again 126 | $closeWorkItem.on( 'click', function( event ) { 127 | 128 | // scale up main section 129 | $sectionWork.removeClass( 'bl-scale-down' ); 130 | $workPanelsContainer.removeClass( 'bl-panel-items-show' ); 131 | $workPanels.eq( currentWorkPanel ).removeClass( 'bl-show-work' ); 132 | 133 | return false; 134 | 135 | } ); 136 | 137 | } 138 | 139 | return { init : init }; 140 | 141 | })(); -------------------------------------------------------------------------------- /js/modernizr.custom.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-cssanimations-csstransitions-touch-shiv-cssclasses-prefixed-teststyles-testprop-testallprops-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.cssanimations=function(){return F("animationName")},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f