├── .vercelignore ├── 1.PNG ├── 2.PNG ├── 3.PNG ├── 4.PNG ├── static ├── favicon.ico ├── images │ ├── myphoto.jpg │ ├── photo.png │ └── myphoto1.jpg ├── resources │ └── assets │ │ ├── images │ │ ├── bg.jpg │ │ ├── g3.jpg │ │ └── g5.jpg │ │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ │ └── js │ │ ├── customjs1.js │ │ ├── customjs4.js │ │ ├── theme-change.js │ │ ├── customjs5.js │ │ ├── customjs3.js │ │ ├── script.js │ │ ├── customjs2.js │ │ ├── jquery.countup.js │ │ ├── jquery.waypoints.min.js │ │ ├── jquery.quicksand.js │ │ ├── jquery.magnific-popup.min.js │ │ ├── jquery.prettyPhoto.js │ │ └── bootstrap.min.js └── api │ └── data.json ├── app.html ├── package.json ├── .gitignore ├── README.md ├── nuxt.config.js ├── pages ├── projects.vue ├── contact.vue ├── index.vue └── myself.vue ├── layouts └── default.vue └── components └── Tutorial.vue /.vercelignore: -------------------------------------------------------------------------------- 1 | README.md 2 | .nuxt 3 | node_modules 4 | *.log 5 | -------------------------------------------------------------------------------- /1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/1.PNG -------------------------------------------------------------------------------- /2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/2.PNG -------------------------------------------------------------------------------- /3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/3.PNG -------------------------------------------------------------------------------- /4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/4.PNG -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/images/myphoto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/images/myphoto.jpg -------------------------------------------------------------------------------- /static/images/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/images/photo.png -------------------------------------------------------------------------------- /static/images/myphoto1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/images/myphoto1.jpg -------------------------------------------------------------------------------- /static/resources/assets/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/images/bg.jpg -------------------------------------------------------------------------------- /static/resources/assets/images/g3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/images/g3.jpg -------------------------------------------------------------------------------- /static/resources/assets/images/g5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/images/g5.jpg -------------------------------------------------------------------------------- /static/resources/assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/resources/assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/resources/assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/resources/assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/resources/assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js/HEAD/static/resources/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ HEAD }} 5 | 6 | 7 | 8 | {{ APP }} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxtjs", 3 | "version": "1.0.0", 4 | "description": "My astonishing Nuxt App", 5 | "author": "msweeneydev", 6 | "private": true, 7 | "scripts": { 8 | "dev": "nuxt", 9 | "build": "nuxt generate", 10 | "start": "nuxt start" 11 | }, 12 | "dependencies": { 13 | "core-js": "^3.15.0", 14 | "nuxt": "^2.15.7" 15 | }, 16 | "devDependencies": {} 17 | } 18 | -------------------------------------------------------------------------------- /static/resources/assets/js/customjs1.js: -------------------------------------------------------------------------------- 1 | // When the user scrolls down 20px from the top of the document, show the button 2 | window.onscroll = function () { 3 | scrollFunction() 4 | }; 5 | 6 | function scrollFunction() { 7 | if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 8 | document.getElementById("movetop").style.display = "block"; 9 | } else { 10 | document.getElementById("movetop").style.display = "none"; 11 | } 12 | } 13 | 14 | // When the user clicks on the button, scroll to the top of the document 15 | function topFunction() { 16 | document.body.scrollTop = 0; 17 | document.documentElement.scrollTop = 0; 18 | } 19 | -------------------------------------------------------------------------------- /static/resources/assets/js/customjs4.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | $('.popup-with-zoom-anim').magnificPopup({ 3 | type: 'inline', 4 | 5 | fixedContentPos: false, 6 | fixedBgPos: true, 7 | 8 | overflowY: 'auto', 9 | 10 | closeBtnInside: true, 11 | preloader: false, 12 | 13 | midClick: true, 14 | removalDelay: 300, 15 | mainClass: 'my-mfp-zoom-in' 16 | }); 17 | 18 | $('.popup-with-move-anim').magnificPopup({ 19 | type: 'inline', 20 | 21 | fixedContentPos: false, 22 | fixedBgPos: true, 23 | 24 | overflowY: 'auto', 25 | 26 | closeBtnInside: true, 27 | preloader: false, 28 | 29 | midClick: true, 30 | removalDelay: 300, 31 | mainClass: 'my-mfp-slide-bottom' 32 | }); 33 | }); -------------------------------------------------------------------------------- /static/resources/assets/js/theme-change.js: -------------------------------------------------------------------------------- 1 | const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]'); 2 | const currentTheme = localStorage.getItem('theme'); 3 | 4 | if (currentTheme) { 5 | document.documentElement.setAttribute('data-theme', currentTheme); 6 | 7 | if (currentTheme === 'dark') { 8 | toggleSwitch.checked = true; 9 | } 10 | } 11 | 12 | function switchTheme(e) { 13 | if (e.target.checked) { 14 | document.documentElement.setAttribute('data-theme', 'dark'); 15 | localStorage.setItem('theme', 'dark'); 16 | } 17 | else { document.documentElement.setAttribute('data-theme', 'light'); 18 | localStorage.setItem('theme', 'light'); 19 | } 20 | } 21 | 22 | toggleSwitch.addEventListener('change', switchTheme, false); -------------------------------------------------------------------------------- /static/resources/assets/js/customjs5.js: -------------------------------------------------------------------------------- 1 | 2 | $('.counter').countUp(); 3 | 4 | $(function () { 5 | $('.navbar-toggler').click(function () { 6 | $('body').toggleClass('noscroll'); 7 | }) 8 | }); 9 | 10 | $(window).on("scroll", function () { 11 | var scroll = $(window).scrollTop(); 12 | 13 | if (scroll >= 80) { 14 | $("#site-header").addClass("nav-fixed"); 15 | } else { 16 | $("#site-header").removeClass("nav-fixed"); 17 | } 18 | }); 19 | 20 | //Main navigation Active Class Add Remove 21 | $(".navbar-toggler").on("click", function () { 22 | $("header").toggleClass("active"); 23 | }); 24 | $(document).on("ready", function () { 25 | if ($(window).width() > 991) { 26 | $("header").removeClass("active"); 27 | } 28 | $(window).on("resize", function () { 29 | if ($(window).width() > 991) { 30 | $("header").removeClass("active"); 31 | } 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /static/resources/assets/js/customjs3.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | $('.owl-two').owlCarousel({ 3 | loop: true, 4 | margin: 30, 5 | nav: false, 6 | responsiveClass: true, 7 | autoplay: false, 8 | autoplayTimeout: 5000, 9 | autoplaySpeed: 1000, 10 | autoplayHoverPause: false, 11 | responsive: { 12 | 0: { 13 | items: 1, 14 | nav: false 15 | }, 16 | 480: { 17 | items: 1, 18 | nav: false 19 | }, 20 | 700: { 21 | items: 1, 22 | nav: false 23 | }, 24 | 1090: { 25 | items: 3, 26 | nav: false 27 | } 28 | } 29 | }) 30 | }) 31 | 32 | $(document).ready(function () { 33 | $("#owl-demo1").owlCarousel({ 34 | loop: true, 35 | margin: 20, 36 | nav: false, 37 | responsiveClass: true, 38 | responsive: { 39 | 0: { 40 | items: 1, 41 | nav: false 42 | }, 43 | 736: { 44 | items: 1, 45 | nav: false 46 | }, 47 | 1000: { 48 | items: 2, 49 | nav: false, 50 | loop: false 51 | } 52 | } 53 | }) 54 | }) -------------------------------------------------------------------------------- /static/resources/assets/js/script.js: -------------------------------------------------------------------------------- 1 | jQuery.noConflict(); 2 | jQuery(document).ready(function($){ 3 | 4 | 5 | function lightboxPhoto() { 6 | 7 | jQuery("a[data-gal^='prettyPhoto']").prettyPhoto({ 8 | animationSpeed:'fast', 9 | slideshow:5000, 10 | theme:'light_rounded', 11 | show_title:false, 12 | overlay_gallery: false 13 | }); 14 | 15 | } 16 | 17 | if(jQuery().prettyPhoto) { 18 | 19 | lightboxPhoto(); 20 | 21 | } 22 | 23 | 24 | if (jQuery().quicksand) { 25 | 26 | // Clone applications to get a second collection 27 | var $data = $(".portfolio-area").clone(); 28 | 29 | //NOTE: Only filter on the main portfolio page, not on the subcategory pages 30 | $('.portfolio-categ li').click(function(e) { 31 | $(".filter li").removeClass("active"); 32 | // Use the last category class as the category to filter by. This means that multiple categories are not supported (yet) 33 | var filterClass=$(this).attr('class').split(' ').slice(-1)[0]; 34 | 35 | if (filterClass == 'all') { 36 | var $filteredData = $data.find('.portfolio-item2'); 37 | } else { 38 | var $filteredData = $data.find('.portfolio-item2[data-type=' + filterClass + ']'); 39 | } 40 | $(".portfolio-area").quicksand($filteredData, { 41 | duration: 600, 42 | adjustHeight: 'auto' 43 | }, function () { 44 | 45 | lightboxPhoto(); 46 | }); 47 | $(this).addClass("active"); 48 | return false; 49 | }); 50 | 51 | }//if quicksand 52 | 53 | }); -------------------------------------------------------------------------------- /static/resources/assets/js/customjs2.js: -------------------------------------------------------------------------------- 1 | const typedTextSpan = document.querySelector(".typed-text"); 2 | const cursorSpan = document.querySelector(".cursor"); 3 | 4 | const textArray = ["UI/UX Designer", "Freelancer", "Web developer"]; 5 | const typingDelay = 200; 6 | const erasingDelay = 10; 7 | const newTextDelay = 100; // Delay between current and next text 8 | let textArrayIndex = 0; 9 | let charIndex = 0; 10 | 11 | function type() { 12 | if (charIndex < textArray[textArrayIndex].length) { 13 | if (!cursorSpan.classList.contains("typing")) cursorSpan.classList.add("typing"); 14 | typedTextSpan.textContent += textArray[textArrayIndex].charAt(charIndex); 15 | charIndex++; 16 | setTimeout(type, typingDelay); 17 | } else { 18 | cursorSpan.classList.remove("typing"); 19 | setTimeout(erase, newTextDelay); 20 | } 21 | } 22 | 23 | function erase() { 24 | if (charIndex > 0) { 25 | // add class 'typing' if there's none 26 | if (!cursorSpan.classList.contains("typing")) { 27 | cursorSpan.classList.add("typing"); 28 | } 29 | typedTextSpan.textContent = textArray[textArrayIndex].substring(0, 0); 30 | charIndex--; 31 | setTimeout(erase, erasingDelay); 32 | } else { 33 | cursorSpan.classList.remove("typing"); 34 | textArrayIndex++; 35 | if (textArrayIndex >= textArray.length) textArrayIndex = 0; 36 | setTimeout(type, typingDelay); 37 | } 38 | } 39 | 40 | document.addEventListener("DOMContentLoaded", function () { // On DOM Load initiate the effect 41 | if (textArray.length) setTimeout(type, newTextDelay + 250); 42 | }); -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Node template 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # Bower dependency directory (https://bower.io/) 29 | bower_components 30 | 31 | # node-waf configuration 32 | .lock-wscript 33 | 34 | # Compiled binary addons (https://nodejs.org/api/addons.html) 35 | build/Release 36 | 37 | # Dependency directories 38 | node_modules/ 39 | jspm_packages/ 40 | 41 | # TypeScript v1 declaration files 42 | typings/ 43 | 44 | # Optional npm cache directory 45 | .npm 46 | 47 | # Optional eslint cache 48 | .eslintcache 49 | 50 | # Optional REPL history 51 | .node_repl_history 52 | 53 | # Output of 'npm pack' 54 | *.tgz 55 | 56 | # Yarn Integrity file 57 | .yarn-integrity 58 | 59 | # dotenv environment variables file 60 | .env 61 | .env.build 62 | 63 | # parcel-bundler cache (https://parceljs.org/) 64 | .cache 65 | 66 | # next.js build output 67 | .next 68 | 69 | # nuxt.js build output 70 | .nuxt 71 | 72 | # Nuxt generate 73 | dist 74 | 75 | # vuepress build output 76 | .vuepress/dist 77 | 78 | # Serverless directories 79 | .serverless 80 | 81 | # IDE / Editor 82 | .idea 83 | 84 | # Service worker 85 | sw.* 86 | 87 | # macOS 88 | .DS_Store 89 | 90 | # Vim swap files 91 | *.swp 92 | 93 | # Vercel 94 | .vercel 95 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Protfolio for developer using NUXT JS 2 | 3 | This portfolio starter pack is made using NUXT. The data on the portfolio is directly linked to a JSON file. Any changes to the portfolio can be made in the JSON file. The changes will then be reflected on to the portfolio. 4 | This allows you to customize your own personal portfolio that can be used for applying to jobs or other personal uses. 5 | 6 | ![Nuxt JS Portfolio for developer](1.PNG?raw=true "Nuxt JS Portfolio for developer") 7 | It has Dark mode enabled 8 | ![Nuxt JS Portfolio for developer](2.PNG?raw=true "Nuxt JS Portfolio for developer") 9 | ### LIVE DEMO 10 | 11 | ### How Install 12 | 13 | You can simply run the project by following process 14 | ```shell 15 | $ git clone https://github.com/Baizidmdashadzzaman/protfolio-for-developer-using-nuxt-js.git 16 | ``` 17 | ```shell 18 | $ cd protfolio-for-developer-using-nuxt-js 19 | ``` 20 | ```shell 21 | $ npm install 22 | ``` 23 | ```shell 24 | $ npm run dev 25 | ``` 26 | After that you can edit the data.json file located in static/api/data.json 27 | ![Nuxt JS Portfolio for developer](4.PNG?raw=true "Nuxt JS Portfolio for developer") 28 | fill up you infomation and enjoy. 29 | ## Deploy Your Own 30 | 31 | Deploy your own Nuxt.js project with Vercel. 32 | 33 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/nuxtjs&template=nuxtjs) 34 | 35 | ```shell 36 | upload the project in your github account 37 | ``` 38 | ```shell 39 | create vercel account 40 | ``` 41 | ```shell 42 | create new project linked & your gitgub repository 43 | ``` 44 | ```shell 45 | you are ready to go 46 | ``` 47 | 48 | 49 | -------------------------------------------------------------------------------- /nuxt.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // Target: https://go.nuxtjs.dev/config-target 3 | target: 'static', 4 | 5 | // Global App headers: https://go.nuxtjs.dev/config-head 6 | head: { 7 | title: 'Asadzaman : Programmer/Developer/Engineer', 8 | meta: [ 9 | { charset: 'utf-8' }, 10 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 11 | { 12 | hid: 'description', 13 | name: 'description', 14 | content: 'This is an awesome description of my Nuxt app', 15 | }, 16 | ], 17 | link: [ 18 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, 19 | { rel: "stylesheet", href: "http://fonts.googleapis.com/css2?family=Jost:wght@300;400;600&display=swap"}, 20 | { rel: "stylesheet", href: "/resources/assets/css/style-starter.css"}, 21 | 22 | ], 23 | script: [ 24 | { src: "/resources/assets/js/customjs1.js", body: true }, 25 | { src: "/resources/assets/js/theme-change.js", body: true }, 26 | { src: "/resources/assets/js/jquery-3.3.1.min.js", body: true }, 27 | { src: "/resources/assets/js/customjs2.js", body: true }, 28 | { src: "/resources/assets/js/owl.carousel.js", body: true }, 29 | { src: "/resources/assets/js/customjs3.js", body: true }, 30 | { src: "/resources/assets/js/jquery.magnific-popup.min.js", body: true }, 31 | { src: "/resources/assets/js/customjs4.js", body: true }, 32 | { src: "/resources/assets/js/jquery.waypoints.min.js", body: true }, 33 | { src: "/resources/assets/js/jquery.countup.js", body: true }, 34 | { src: "/resources/assets/js/customjs5.js", body: true }, 35 | { src: "/resources/assets/js/bootstrap.min.js", body: true }, 36 | 37 | ], 38 | }, 39 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins 40 | plugins: [], 41 | 42 | // Auto import components: https://go.nuxtjs.dev/config-components 43 | components: true, 44 | 45 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules 46 | buildModules: [], 47 | 48 | // Modules: https://go.nuxtjs.dev/config-modules 49 | modules: [] 50 | }; 51 | -------------------------------------------------------------------------------- /static/resources/assets/js/jquery.countup.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.countup.js 1.0.3 3 | * 4 | * Copyright 2016, Adrián Guerra Marrero http://agmstudio.io @AGMStudio_io 5 | * Released under the MIT License 6 | * 7 | * Date: Oct 27, 2016 8 | */ 9 | (function( $ ){ 10 | "use strict"; 11 | 12 | $.fn.countUp = function( options ) { 13 | 14 | // Defaults 15 | var settings = $.extend({ 16 | 'time': 2000, 17 | 'delay': 10 18 | }, options); 19 | 20 | return this.each(function(){ 21 | 22 | // Store the object 23 | var $this = $(this); 24 | var $settings = settings; 25 | 26 | var counterUpper = function() { 27 | if(!$this.data('counterupTo')) { 28 | $this.data('counterupTo',$this.text()); 29 | } 30 | var time = parseInt($this.data("counter-time")) > 0 ? parseInt($this.data("counter-time")) : $settings.time; 31 | var delay = parseInt($this.data("counter-delay")) > 0 ? parseInt($this.data("counter-delay")) : $settings.delay; 32 | var divisions = time / delay; 33 | var num = $this.data('counterupTo'); 34 | var nums = [num]; 35 | var isComma = /[0-9]+,[0-9]+/.test(num); 36 | num = num.replace(/,/g, ''); 37 | var isInt = /^[0-9]+$/.test(num); 38 | var isFloat = /^[0-9]+\.[0-9]+$/.test(num); 39 | var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; 40 | 41 | // Generate list of incremental numbers to display 42 | for (var i = divisions; i >= 1; i--) { 43 | 44 | // Preserve as int if input was int 45 | var newNum = parseInt(Math.round(num / divisions * i)); 46 | 47 | // Preserve float if input was float 48 | if (isFloat) { 49 | newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); 50 | } 51 | 52 | // Preserve commas if input had commas 53 | if (isComma) { 54 | while (/(\d+)(\d{3})/.test(newNum.toString())) { 55 | newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); 56 | } 57 | } 58 | 59 | nums.unshift(newNum); 60 | } 61 | 62 | $this.data('counterup-nums', nums); 63 | $this.text('0'); 64 | 65 | // Updates the number until we're done 66 | var f = function() { 67 | $this.text($this.data('counterup-nums').shift()); 68 | if ($this.data('counterup-nums').length) { 69 | setTimeout($this.data('counterup-func'),delay); 70 | } else { 71 | delete $this.data('counterup-nums'); 72 | $this.data('counterup-nums', null); 73 | $this.data('counterup-func', null); 74 | } 75 | }; 76 | $this.data('counterup-func', f); 77 | 78 | // Start the count up 79 | setTimeout($this.data('counterup-func'),delay); 80 | }; 81 | 82 | // Perform counts when the element gets into view 83 | $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true }); 84 | }); 85 | 86 | }; 87 | 88 | })( jQuery ); 89 | -------------------------------------------------------------------------------- /pages/projects.vue: -------------------------------------------------------------------------------- 1 | 80 | 81 | 106 | -------------------------------------------------------------------------------- /layouts/default.vue: -------------------------------------------------------------------------------- 1 | 87 | -------------------------------------------------------------------------------- /components/Tutorial.vue: -------------------------------------------------------------------------------- 1 | 2 | 50 | -------------------------------------------------------------------------------- /pages/contact.vue: -------------------------------------------------------------------------------- 1 | 75 | 76 | 101 | -------------------------------------------------------------------------------- /static/resources/assets/js/jquery.waypoints.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Waypoints - 4.0.0 3 | Copyright © 2011-2015 Caleb Troughton 4 | Licensed under the MIT license. 5 | https://github.com/imakewebthings/waypoints/blob/master/licenses.txt 6 | */ 7 | !function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); -------------------------------------------------------------------------------- /pages/index.vue: -------------------------------------------------------------------------------- 1 | 203 | 204 | -------------------------------------------------------------------------------- /static/api/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": { 3 | "name": "Baizid MD Ashadzzaman", 4 | "shortname": "Zaman", 5 | "occupation": "Developer / Programmer / Engineer", 6 | "description": "Eat, sleep, code, repeat.", 7 | "yearofexperience": "05", 8 | "age": "25", 9 | "designation": "Software engineer", 10 | "image": "/images/photo.png", 11 | "fullimage": "/images/myphoto1.jpg", 12 | "bio": "Hi there! I have been very passionate about computers and programming since my university life. I dream to be an expert software engineer so that I can build professional and useful software that has business value. I am looking for a junior software engineer position in a reputed software company that can help me to achieve my goal.", 13 | "contactmessage": "Get in touch with me to to build any software for your business.!", 14 | "email": "baizid.md.ashadzzaman@gmail.com", 15 | "phone": "+88 01862420119", 16 | "mapaddress": "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3690.6698920746726!2d91.8166201143615!3d22.328320947520915!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x30acd8b3c659a4fb%3A0xcf4c00425d483eb6!2s12%20Quarter%20Ln%2C%20Chittagong!5e0!3m2!1sen!2sbd!4v1631249930628!5m2!1sen!2sbd", 17 | "address": { 18 | "street": "Pahartoli 12 quater", 19 | "city": "Chittagong", 20 | "state": "Bangladesh", 21 | "zip": "4202" 22 | }, 23 | "quotes1": { 24 | "sectiontitle": "My resume", 25 | "title": "I Would Love to make your Ideas real", 26 | "description": "I love graphic design and photography and have been working on my portfolio since 2016. You can download my resume in order to learn the details of my professional life as a designer and photographer. Contact me and we will discuss your projects!" 27 | }, 28 | "quotes2": { 29 | "sectiontitle": "", 30 | "title": "I can give your business a new creative start right away! Hire me for your Awesome project", 31 | "description": "Lorem ipsum, dolor sit amet consectetur adipisicing elit. At, corrupti odit? At iure facere, porro repellat officia quas, dolores magnam assumenda soluta odit harum voluptate inventore ipsa maiores fugiat accusamus eos nulla. Iure voluptatibus explicabo officia." 32 | }, 33 | "workabout": { 34 | "completedproject": "100", 35 | "inprogressproject": "20", 36 | "awardrecived": "15", 37 | "happyclinet": "100" 38 | }, 39 | "resumedownload": "https://drive.google.com/file/d/1HuLXxOB6dL58AcupKZ9qhRr7739EXLML/view", 40 | "social": [{ 41 | "name": "youtube", 42 | "url": "https://www.youtube.com/channel/UCGP5kbtnscx5uTN5suCZfMA?view_as=subscriber", 43 | "className": "fa fa-youtube" 44 | }, 45 | { 46 | "name": "facebook", 47 | "url": "https://www.facebook.com/asadzaman0167", 48 | "className": "fa fa-facebook" 49 | }, 50 | { 51 | "name": "linkedin", 52 | "url": "https://www.linkedin.com/in/zamanasad/", 53 | "className": "fa fa-linkedin" 54 | }, 55 | { 56 | "name": "instagram", 57 | "url": "https://www.instagram.com/iamasadzaman/", 58 | "className": "fa fa-instagram" 59 | }, 60 | { 61 | "name": "github", 62 | "url": "https://github.com/Baizidmdashadzzaman", 63 | "className": "fa fa-github" 64 | } 65 | ] 66 | }, 67 | "resume": { 68 | "skillmessage": "My Programming Language Proficiency", 69 | "education": [{ 70 | "school": "International Islamic University Chittagong.", 71 | "degree": "Bachelor's Degree, Computer Science", 72 | "graduated": "July 2018", 73 | "description": "Graduated with First Class Honours" 74 | }], 75 | "work": [{ 76 | "company": "Scandicsoft", 77 | "title": "Software engineer", 78 | "years": "Jan 2018 - Present", 79 | "description": "Developing some userfriendly and best software." 80 | }], 81 | "skillssectiontitle":"Motivated by the Desire to achieve Success", 82 | "skillssectiondescription":"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Dolorem, odit! Perspiciatis et consequuntur non, modi quo mollitia labore laborum voluptas quia officiis fugit soluta molestias quaerat sapiente sunt. ", 83 | "skills": [{ 84 | "name": "Php", 85 | "level": "90%" 86 | }, 87 | { 88 | "name": "Python", 89 | "level": "60%" 90 | }, 91 | { 92 | "name": "Vue", 93 | "level": "70%" 94 | }, 95 | { 96 | "name": "React", 97 | "level": "50%" 98 | }, 99 | { 100 | "name": "Web Development", 101 | "level": "95%" 102 | } 103 | ] 104 | }, 105 | "portfolio": { 106 | "projects": [{ 107 | "no":"01", 108 | "title": "RMS with AR", 109 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set.", 110 | "url": "https://www.youtube.com/watch?v=0feY896TmH4" 111 | }, 112 | { 113 | "no":"02", 114 | "title": "Prothom alo clone", 115 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set.", 116 | "url": "https://www.youtube.com/watch?v=7pRx_hiXxwg&t=30s" 117 | }, 118 | { 119 | "no":"03", 120 | "title": "Chaldal Clone", 121 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set.", 122 | "url": "https://www.youtube.com/watch?v=PDvlbujWmIs&t=3s" 123 | } 124 | ] 125 | }, 126 | "testimonials": { 127 | "testimonials": [{ 128 | "text": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Velit beatae laudantium voluptate rem ullam dolore nisi voluptatibus esse quasi, doloribus tempora. Dolores molestias adipisci dolor sit amet!.", 129 | "clientname": "John wilson", 130 | "clientaddress": "Seattle, Washington" 131 | }, 132 | { 133 | "text": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Velit beatae laudantium voluptate rem ullam dolore nisi voluptatibus esse quasi, doloribus tempora. Dolores molestias adipisci dolor sit amet!.", 134 | "clientname": "David haris", 135 | "clientaddress": "London, England" 136 | } 137 | ] 138 | }, 139 | "services": { 140 | "services": [ 141 | { 142 | "no": "01", 143 | "title": "UI/UX Design", 144 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set." 145 | }, 146 | { 147 | "no": "02", 148 | "title": "Web Design", 149 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set." 150 | }, 151 | { 152 | "no": "03", 153 | "title": "Web Development", 154 | "description": "Lorem ipsum dolor sit amet sed consectetur adipisicing elit. doloret quas saepe autem, dolor set." 155 | } 156 | ] 157 | }, 158 | "awwards": { 159 | "awwards": [ 160 | { 161 | "title": "Website of the day", 162 | "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi reiciendis labore quisquam suscipit qui veritatis. voluptas quia officiis fugit soluta sunt" 163 | }, 164 | { 165 | "title": "Awards Site Of The Day", 166 | "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi reiciendis labore quisquam suscipit qui veritatis. voluptas quia officiis fugit soluta sunt" 167 | }, 168 | { 169 | "title": "Honorable mention award", 170 | "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi reiciendis labore quisquam suscipit qui veritatis. voluptas quia officiis fugit soluta sunt" 171 | }, 172 | { 173 | "title": "Designer of the Company", 174 | "description": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi reiciendis labore quisquam suscipit qui veritatis. voluptas quia officiis fugit soluta sunt" 175 | } 176 | ] 177 | } 178 | } -------------------------------------------------------------------------------- /pages/myself.vue: -------------------------------------------------------------------------------- 1 | 227 | 228 | 253 | -------------------------------------------------------------------------------- /static/resources/assets/js/jquery.quicksand.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Quicksand 1.2.2 4 | 5 | Reorder and filter items with a nice shuffling animation. 6 | 7 | Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com 8 | Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos. 9 | 10 | Dual licensed under the MIT and GPL version 2 licenses. 11 | http://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt 12 | http://github.com/jquery/jquery/blob/master/GPL-LICENSE.txt 13 | 14 | Project site: http://razorjack.net/quicksand 15 | Github site: http://github.com/razorjack/quicksand 16 | 17 | */ 18 | 19 | (function ($) { 20 | $.fn.quicksand = function (collection, customOptions) { 21 | var options = { 22 | duration: 750, 23 | easing: 'swing', 24 | attribute: 'data-id', // attribute to recognize same items within source and dest 25 | adjustHeight: 'auto', // 'dynamic' animates height during shuffling (slow), 'auto' adjusts it before or after the animation, false leaves height constant 26 | useScaling: true, // disable it if you're not using scaling effect or want to improve performance 27 | enhancement: function(c) {}, // Visual enhacement (eg. font replacement) function for cloned elements 28 | selector: '> *', 29 | dx: 0, 30 | dy: 0 31 | }; 32 | $.extend(options, customOptions); 33 | 34 | if ($.browser.msie || (typeof($.fn.scale) == 'undefined')) { 35 | // Got IE and want scaling effect? Kiss my ass. 36 | options.useScaling = false; 37 | } 38 | 39 | var callbackFunction; 40 | if (typeof(arguments[1]) == 'function') { 41 | var callbackFunction = arguments[1]; 42 | } else if (typeof(arguments[2] == 'function')) { 43 | var callbackFunction = arguments[2]; 44 | } 45 | 46 | 47 | return this.each(function (i) { 48 | var val; 49 | var animationQueue = []; // used to store all the animation params before starting the animation; solves initial animation slowdowns 50 | var $collection = $(collection).clone(); // destination (target) collection 51 | var $sourceParent = $(this); // source, the visible container of source collection 52 | var sourceHeight = $(this).css('height'); // used to keep height and document flow during the animation 53 | 54 | var destHeight; 55 | var adjustHeightOnCallback = false; 56 | 57 | var offset = $($sourceParent).offset(); // offset of visible container, used in animation calculations 58 | var offsets = []; // coordinates of every source collection item 59 | 60 | var $source = $(this).find(options.selector); // source collection items 61 | 62 | // Replace the collection and quit if IE6 63 | if ($.browser.msie && $.browser.version.substr(0,1)<7) { 64 | $sourceParent.html('').append($collection); 65 | return; 66 | } 67 | 68 | // Gets called when any animation is finished 69 | var postCallbackPerformed = 0; // prevents the function from being called more than one time 70 | var postCallback = function () { 71 | 72 | if (!postCallbackPerformed) { 73 | postCallbackPerformed = 1; 74 | 75 | // hack: 76 | // used to be: $sourceParent.html($dest.html()); // put target HTML into visible source container 77 | // but new webkit builds cause flickering when replacing the collections 78 | $toDelete = $sourceParent.find('> *'); 79 | $sourceParent.prepend($dest.find('> *')); 80 | $toDelete.remove(); 81 | 82 | if (adjustHeightOnCallback) { 83 | $sourceParent.css('height', destHeight); 84 | } 85 | options.enhancement($sourceParent); // Perform custom visual enhancements on a newly replaced collection 86 | if (typeof callbackFunction == 'function') { 87 | callbackFunction.call(this); 88 | } 89 | } 90 | }; 91 | 92 | // Position: relative situations 93 | var $correctionParent = $sourceParent.offsetParent(); 94 | var correctionOffset = $correctionParent.offset(); 95 | if ($correctionParent.css('position') == 'relative') { 96 | if ($correctionParent.get(0).nodeName.toLowerCase() == 'body') { 97 | 98 | } else { 99 | correctionOffset.top += (parseFloat($correctionParent.css('border-top-width')) || 0); 100 | correctionOffset.left +=( parseFloat($correctionParent.css('border-left-width')) || 0); 101 | } 102 | } else { 103 | correctionOffset.top -= (parseFloat($correctionParent.css('border-top-width')) || 0); 104 | correctionOffset.left -= (parseFloat($correctionParent.css('border-left-width')) || 0); 105 | correctionOffset.top -= (parseFloat($correctionParent.css('margin-top')) || 0); 106 | correctionOffset.left -= (parseFloat($correctionParent.css('margin-left')) || 0); 107 | } 108 | 109 | // perform custom corrections from options (use when Quicksand fails to detect proper correction) 110 | if (isNaN(correctionOffset.left)) { 111 | correctionOffset.left = 0; 112 | } 113 | if (isNaN(correctionOffset.top)) { 114 | correctionOffset.top = 0; 115 | } 116 | 117 | correctionOffset.left -= options.dx; 118 | correctionOffset.top -= options.dy; 119 | 120 | // keeps nodes after source container, holding their position 121 | $sourceParent.css('height', $(this).height()); 122 | 123 | // get positions of source collections 124 | $source.each(function (i) { 125 | offsets[i] = $(this).offset(); 126 | }); 127 | 128 | // stops previous animations on source container 129 | $(this).stop(); 130 | var dx = 0; var dy = 0; 131 | $source.each(function (i) { 132 | $(this).stop(); // stop animation of collection items 133 | var rawObj = $(this).get(0); 134 | if (rawObj.style.position == 'absolute') { 135 | dx = -options.dx; 136 | dy = -options.dy; 137 | } else { 138 | dx = options.dx; 139 | dy = options.dy; 140 | } 141 | 142 | rawObj.style.position = 'absolute'; 143 | rawObj.style.margin = '0'; 144 | 145 | rawObj.style.top = (offsets[i].top - parseFloat(rawObj.style.marginTop) - correctionOffset.top + dy) + 'px'; 146 | rawObj.style.left = (offsets[i].left - parseFloat(rawObj.style.marginLeft) - correctionOffset.left + dx) + 'px'; 147 | }); 148 | 149 | // create temporary container with destination collection 150 | var $dest = $($sourceParent).clone(); 151 | var rawDest = $dest.get(0); 152 | rawDest.innerHTML = ''; 153 | rawDest.setAttribute('id', ''); 154 | rawDest.style.height = 'auto'; 155 | rawDest.style.width = $sourceParent.width() + 'px'; 156 | $dest.append($collection); 157 | // insert node into HTML 158 | // Note that the node is under visible source container in the exactly same position 159 | // The browser render all the items without showing them (opacity: 0.0) 160 | // No offset calculations are needed, the browser just extracts position from underlayered destination items 161 | // and sets animation to destination positions. 162 | $dest.insertBefore($sourceParent); 163 | $dest.css('opacity', 0.0); 164 | rawDest.style.zIndex = -1; 165 | 166 | rawDest.style.margin = '0'; 167 | rawDest.style.position = 'absolute'; 168 | rawDest.style.top = offset.top - correctionOffset.top + 'px'; 169 | rawDest.style.left = offset.left - correctionOffset.left + 'px'; 170 | 171 | 172 | 173 | 174 | 175 | if (options.adjustHeight === 'dynamic') { 176 | // If destination container has different height than source container 177 | // the height can be animated, adjusting it to destination height 178 | $sourceParent.animate({height: $dest.height()}, options.duration, options.easing); 179 | } else if (options.adjustHeight === 'auto') { 180 | destHeight = $dest.height(); 181 | if (parseFloat(sourceHeight) < parseFloat(destHeight)) { 182 | // Adjust the height now so that the items don't move out of the container 183 | $sourceParent.css('height', destHeight); 184 | } else { 185 | // Adjust later, on callback 186 | adjustHeightOnCallback = true; 187 | } 188 | } 189 | 190 | // Now it's time to do shuffling animation 191 | // First of all, we need to identify same elements within source and destination collections 192 | $source.each(function (i) { 193 | var destElement = []; 194 | if (typeof(options.attribute) == 'function') { 195 | 196 | val = options.attribute($(this)); 197 | $collection.each(function() { 198 | if (options.attribute(this) == val) { 199 | destElement = $(this); 200 | return false; 201 | } 202 | }); 203 | } else { 204 | destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); 205 | } 206 | if (destElement.length) { 207 | // The item is both in source and destination collections 208 | // It it's under different position, let's move it 209 | if (!options.useScaling) { 210 | animationQueue.push( 211 | { 212 | element: $(this), 213 | animation: 214 | {top: destElement.offset().top - correctionOffset.top, 215 | left: destElement.offset().left - correctionOffset.left, 216 | opacity: 1.0 217 | } 218 | }); 219 | 220 | } else { 221 | animationQueue.push({ 222 | element: $(this), 223 | animation: {top: destElement.offset().top - correctionOffset.top, 224 | left: destElement.offset().left - correctionOffset.left, 225 | opacity: 1.0, 226 | scale: '1.0' 227 | } 228 | }); 229 | 230 | } 231 | } else { 232 | // The item from source collection is not present in destination collections 233 | // Let's remove it 234 | if (!options.useScaling) { 235 | animationQueue.push({element: $(this), 236 | animation: {opacity: '0.0'}}); 237 | } else { 238 | animationQueue.push({element: $(this), animation: {opacity: '0.0', 239 | scale: '0.0'}}); 240 | } 241 | } 242 | }); 243 | 244 | $collection.each(function (i) { 245 | // Grab all items from target collection not present in visible source collection 246 | 247 | var sourceElement = []; 248 | var destElement = []; 249 | if (typeof(options.attribute) == 'function') { 250 | val = options.attribute($(this)); 251 | $source.each(function() { 252 | if (options.attribute(this) == val) { 253 | sourceElement = $(this); 254 | return false; 255 | } 256 | }); 257 | 258 | $collection.each(function() { 259 | if (options.attribute(this) == val) { 260 | destElement = $(this); 261 | return false; 262 | } 263 | }); 264 | } else { 265 | sourceElement = $source.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); 266 | destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']'); 267 | } 268 | 269 | var animationOptions; 270 | if (sourceElement.length === 0) { 271 | // No such element in source collection... 272 | if (!options.useScaling) { 273 | animationOptions = { 274 | opacity: '1.0' 275 | }; 276 | } else { 277 | animationOptions = { 278 | opacity: '1.0', 279 | scale: '1.0' 280 | }; 281 | } 282 | // Let's create it 283 | d = destElement.clone(); 284 | var rawDestElement = d.get(0); 285 | rawDestElement.style.position = 'absolute'; 286 | rawDestElement.style.margin = '0'; 287 | rawDestElement.style.top = destElement.offset().top - correctionOffset.top + 'px'; 288 | rawDestElement.style.left = destElement.offset().left - correctionOffset.left + 'px'; 289 | d.css('opacity', 0.0); // IE 290 | if (options.useScaling) { 291 | d.css('transform', 'scale(0.0)'); 292 | } 293 | d.appendTo($sourceParent); 294 | 295 | animationQueue.push({element: $(d), 296 | animation: animationOptions}); 297 | } 298 | }); 299 | 300 | $dest.remove(); 301 | options.enhancement($sourceParent); // Perform custom visual enhancements during the animation 302 | for (i = 0; i < animationQueue.length; i++) { 303 | animationQueue[i].element.animate(animationQueue[i].animation, options.duration, options.easing, postCallback); 304 | } 305 | }); 306 | }; 307 | })(jQuery); -------------------------------------------------------------------------------- /static/resources/assets/js/jquery.magnific-popup.min.js: -------------------------------------------------------------------------------- 1 | /*! Magnific Popup - v1.1.0 - 2016-02-20 2 | * http://dimsemenov.com/plugins/magnific-popup/ 3 | * Copyright (c) 2016 Dmitry Semenov; */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("
");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); -------------------------------------------------------------------------------- /static/resources/assets/js/jquery.prettyPhoto.js: -------------------------------------------------------------------------------- 1 | /* ------------------------------------------------------------------------ 2 | * Class: prettyPhoto 3 | * Use: Lightbox clone for jQuery 4 | * Author: Stephane Caron (http://www.no-margin-for-errors.com) 5 | * Version: 3.0.1 6 | * ------------------------------------------------------------------------- */ 7 | 8 | (function ($) { 9 | $.prettyPhoto = { 10 | version: '3.0' 11 | }; 12 | $.fn.prettyPhoto = function (pp_settings) { 13 | pp_settings = jQuery.extend({ 14 | animation_speed: 'fast', 15 | slideshow: false, 16 | autoplay_slideshow: false, 17 | opacity: 0.80, 18 | show_title: true, 19 | allow_resize: true, 20 | default_width: 500, 21 | default_height: 344, 22 | counter_separator_label: '/', 23 | theme: 'facebook', 24 | hideflash: false, 25 | wmode: 'opaque', 26 | autoplay: true, 27 | modal: false, 28 | overlay_gallery: true, 29 | keyboard_shortcuts: true, 30 | changepicturecallback: function () {}, 31 | callback: function () {}, 32 | markup: '
\ 33 |
 
\ 34 |
\ 35 |
\ 36 |
\ 37 |
\ 38 |
\ 39 |
\ 40 |
\ 41 |
\ 42 |
\ 43 |
\ 44 |
\ 45 | Expand \ 46 |
\ 47 | next \ 48 | previous \ 49 |
\ 50 |
\ 51 |
\ 52 |

\ 53 | Close \ 54 |
\ 55 | Previous \ 56 |

0/0

\ 57 | Next \ 58 |
\ 59 |
\ 60 |
\ 61 |
\ 62 |
\ 63 |
\ 64 |
\ 65 |
\ 66 |
\ 67 |
\ 68 |
\ 69 |
\ 70 |
\ 71 |
', 72 | gallery_markup: '', 79 | image_markup: '', 80 | flash_markup: '', 81 | quicktime_markup: '', 82 | iframe_markup: '', 83 | inline_markup: '
{content}
', 84 | custom_markup: '' 85 | }, pp_settings); 86 | var matchedObjects = this, 87 | percentBased = false, 88 | correctSizes, pp_open, pp_contentHeight, pp_contentWidth, pp_containerHeight, pp_containerWidth, windowHeight = $(window).height(), 89 | windowWidth = $(window).width(), 90 | pp_slideshow; 91 | doresize = true, scroll_pos = _get_scroll(); 92 | $(window).unbind('resize').resize(function () { 93 | _center_overlay(); 94 | _resize_overlay(); 95 | }); 96 | if (pp_settings.keyboard_shortcuts) { 97 | $(document).unbind('keydown').keydown(function (e) { 98 | if (typeof $pp_pic_holder != 'undefined') { 99 | if ($pp_pic_holder.is(':visible')) { 100 | switch (e.keyCode) { 101 | case 37: 102 | $.prettyPhoto.changePage('previous'); 103 | break; 104 | case 39: 105 | $.prettyPhoto.changePage('next'); 106 | break; 107 | case 27: 108 | if (!settings.modal) 109 | $.prettyPhoto.close(); 110 | break; 111 | }; 112 | return false; 113 | }; 114 | }; 115 | }); 116 | } 117 | $.prettyPhoto.initialize = function () { 118 | settings = pp_settings; 119 | if ($.browser.msie && parseInt($.browser.version) == 6) settings.theme = "light_square"; 120 | _buildOverlay(this); 121 | if (settings.allow_resize) 122 | $(window).scroll(function () { 123 | _center_overlay(); 124 | }); 125 | _center_overlay(); 126 | set_position = jQuery.inArray($(this).attr('href'), pp_images); 127 | $.prettyPhoto.open(); 128 | return false; 129 | } 130 | $.prettyPhoto.open = function (event) { 131 | if (typeof settings == "undefined") { 132 | settings = pp_settings; 133 | if ($.browser.msie && $.browser.version == 6) settings.theme = "light_square"; 134 | _buildOverlay(event.target); 135 | pp_images = $.makeArray(arguments[0]); 136 | pp_titles = (arguments[1]) ? $.makeArray(arguments[1]) : $.makeArray(""); 137 | pp_descriptions = (arguments[2]) ? $.makeArray(arguments[2]) : $.makeArray(""); 138 | isSet = (pp_images.length > 1) ? true : false; 139 | set_position = 0; 140 | } 141 | if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'hidden'); 142 | if (settings.hideflash) $('object,embed').css('visibility', 'hidden'); 143 | _checkPosition($(pp_images).size()); 144 | $('.pp_loaderIcon').show(); 145 | if ($ppt.is(':hidden')) $ppt.css('opacity', 0).show(); 146 | $pp_overlay.show().fadeTo(settings.animation_speed, settings.opacity); 147 | $pp_pic_holder.find('.currentTextHolder').text((set_position + 1) + settings.counter_separator_label + $(pp_images).size()); 148 | $pp_pic_holder.find('.pp_description').show().html(unescape(pp_descriptions[set_position])); 149 | (settings.show_title && pp_titles[set_position] != "" && typeof pp_titles[set_position] != "undefined") ? $ppt.html(unescape(pp_titles[set_position])): $ppt.html(' '); 150 | movie_width = (parseFloat(grab_param('width', pp_images[set_position]))) ? grab_param('width', pp_images[set_position]) : settings.default_width.toString(); 151 | movie_height = (parseFloat(grab_param('height', pp_images[set_position]))) ? grab_param('height', pp_images[set_position]) : settings.default_height.toString(); 152 | if (movie_width.indexOf('%') != -1 || movie_height.indexOf('%') != -1) { 153 | movie_height = parseFloat(($(window).height() * parseFloat(movie_height) / 100) - 150); 154 | movie_width = parseFloat(($(window).width() * parseFloat(movie_width) / 100) - 150); 155 | percentBased = true; 156 | } else { 157 | percentBased = false; 158 | } 159 | $pp_pic_holder.fadeIn(function () { 160 | imgPreloader = ""; 161 | switch (_getFileType(pp_images[set_position])) { 162 | case 'image': 163 | imgPreloader = new Image(); 164 | nextImage = new Image(); 165 | if (isSet && set_position > $(pp_images).size()) nextImage.src = pp_images[set_position + 1]; 166 | prevImage = new Image(); 167 | if (isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; 168 | $pp_pic_holder.find('#pp_full_res')[0].innerHTML = settings.image_markup; 169 | $pp_pic_holder.find('#fullResImage').attr('src', pp_images[set_position]); 170 | imgPreloader.onload = function () { 171 | correctSizes = _fitToViewport(imgPreloader.width, imgPreloader.height); 172 | _showContent(); 173 | }; 174 | imgPreloader.onerror = function () { 175 | alert('Image cannot be loaded. Make sure the path is correct and image exist.'); 176 | $.prettyPhoto.close(); 177 | }; 178 | imgPreloader.src = pp_images[set_position]; 179 | break; 180 | case 'youtube': 181 | correctSizes = _fitToViewport(movie_width, movie_height); 182 | movie = 'http://www.youtube.com/v/' + grab_param('v', pp_images[set_position]); 183 | if (settings.autoplay) movie += "&autoplay=1"; 184 | toInject = settings.flash_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, movie); 185 | break; 186 | case 'vimeo': 187 | correctSizes = _fitToViewport(movie_width, movie_height); 188 | movie_id = pp_images[set_position]; 189 | var regExp = /http:\/\/(www\.)?vimeo.com\/(\d+)/; 190 | var match = movie_id.match(regExp); 191 | movie = 'http://player.vimeo.com/video/' + match[2] + '?title=0&byline=0&portrait=0'; 192 | if (settings.autoplay) movie += "&autoplay=1;"; 193 | vimeo_width = correctSizes['width'] + '/embed/?moog_width=' + correctSizes['width']; 194 | toInject = settings.iframe_markup.replace(/{width}/g, vimeo_width).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, movie); 195 | break; 196 | case 'quicktime': 197 | correctSizes = _fitToViewport(movie_width, movie_height); 198 | correctSizes['height'] += 15; 199 | correctSizes['contentHeight'] += 15; 200 | correctSizes['containerHeight'] += 15; 201 | toInject = settings.quicktime_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, pp_images[set_position]).replace(/{autoplay}/g, settings.autoplay); 202 | break; 203 | case 'flash': 204 | correctSizes = _fitToViewport(movie_width, movie_height); 205 | flash_vars = pp_images[set_position]; 206 | flash_vars = flash_vars.substring(pp_images[set_position].indexOf('flashvars') + 10, pp_images[set_position].length); 207 | filename = pp_images[set_position]; 208 | filename = filename.substring(0, filename.indexOf('?')); 209 | toInject = settings.flash_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{wmode}/g, settings.wmode).replace(/{path}/g, filename + '?' + flash_vars); 210 | break; 211 | case 'iframe': 212 | correctSizes = _fitToViewport(movie_width, movie_height); 213 | frame_url = pp_images[set_position]; 214 | frame_url = frame_url.substr(0, frame_url.indexOf('iframe') - 1); 215 | toInject = settings.iframe_markup.replace(/{width}/g, correctSizes['width']).replace(/{height}/g, correctSizes['height']).replace(/{path}/g, frame_url); 216 | break; 217 | case 'custom': 218 | correctSizes = _fitToViewport(movie_width, movie_height); 219 | toInject = settings.custom_markup; 220 | break; 221 | case 'inline': 222 | myClone = $(pp_images[set_position]).clone().css({ 223 | 'width': settings.default_width 224 | }).wrapInner('
').appendTo($('body')); 225 | correctSizes = _fitToViewport($(myClone).width(), $(myClone).height()); 226 | $(myClone).remove(); 227 | toInject = settings.inline_markup.replace(/{content}/g, $(pp_images[set_position]).html()); 228 | break; 229 | }; 230 | if (!imgPreloader) { 231 | $pp_pic_holder.find('#pp_full_res')[0].innerHTML = toInject; 232 | _showContent(); 233 | }; 234 | }); 235 | return false; 236 | }; 237 | $.prettyPhoto.changePage = function (direction) { 238 | currentGalleryPage = 0; 239 | if (direction == 'previous') { 240 | set_position--; 241 | if (set_position < 0) { 242 | set_position = 0; 243 | return; 244 | }; 245 | } else if (direction == 'next') { 246 | set_position++; 247 | if (set_position > $(pp_images).size() - 1) { 248 | set_position = 0; 249 | } 250 | } else { 251 | set_position = direction; 252 | }; 253 | if (!doresize) doresize = true; 254 | $('.pp_contract').removeClass('pp_contract').addClass('pp_expand'); 255 | _hideContent(function () { 256 | $.prettyPhoto.open(); 257 | }); 258 | }; 259 | $.prettyPhoto.changeGalleryPage = function (direction) { 260 | if (direction == 'next') { 261 | currentGalleryPage++; 262 | if (currentGalleryPage > totalPage) { 263 | currentGalleryPage = 0; 264 | }; 265 | } else if (direction == 'previous') { 266 | currentGalleryPage--; 267 | if (currentGalleryPage < 0) { 268 | currentGalleryPage = totalPage; 269 | }; 270 | } else { 271 | currentGalleryPage = direction; 272 | }; 273 | itemsToSlide = (currentGalleryPage == totalPage) ? pp_images.length - ((totalPage) * itemsPerPage) : itemsPerPage; 274 | $pp_pic_holder.find('.pp_gallery li').each(function (i) { 275 | $(this).animate({ 276 | 'left': (i * itemWidth) - ((itemsToSlide * itemWidth) * currentGalleryPage) 277 | }); 278 | }); 279 | }; 280 | $.prettyPhoto.startSlideshow = function () { 281 | if (typeof pp_slideshow == 'undefined') { 282 | $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function () { 283 | $.prettyPhoto.stopSlideshow(); 284 | return false; 285 | }); 286 | pp_slideshow = setInterval($.prettyPhoto.startSlideshow, settings.slideshow); 287 | } else { 288 | $.prettyPhoto.changePage('next'); 289 | }; 290 | } 291 | $.prettyPhoto.stopSlideshow = function () { 292 | $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function () { 293 | $.prettyPhoto.startSlideshow(); 294 | return false; 295 | }); 296 | clearInterval(pp_slideshow); 297 | pp_slideshow = undefined; 298 | } 299 | $.prettyPhoto.close = function () { 300 | clearInterval(pp_slideshow); 301 | $pp_pic_holder.stop().find('object,embed').css('visibility', 'hidden'); 302 | $('div.pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed, function () { 303 | $(this).remove(); 304 | }); 305 | $pp_overlay.fadeOut(settings.animation_speed, function () { 306 | if ($.browser.msie && $.browser.version == 6) $('select').css('visibility', 'visible'); 307 | if (settings.hideflash) $('object,embed').css('visibility', 'visible'); 308 | $(this).remove(); 309 | $(window).unbind('scroll'); 310 | settings.callback(); 311 | doresize = true; 312 | pp_open = false; 313 | delete settings; 314 | }); 315 | }; 316 | _showContent = function () { 317 | $('.pp_loaderIcon').hide(); 318 | $ppt.fadeTo(settings.animation_speed, 1); 319 | projectedTop = scroll_pos['scrollTop'] + ((windowHeight / 2) - (correctSizes['containerHeight'] / 2)); 320 | if (projectedTop < 0) projectedTop = 0; 321 | $pp_pic_holder.find('.pp_content').animate({ 322 | 'height': correctSizes['contentHeight'] 323 | }, settings.animation_speed); 324 | $pp_pic_holder.animate({ 325 | 'top': projectedTop, 326 | 'left': (windowWidth / 2) - (correctSizes['containerWidth'] / 2), 327 | 'width': correctSizes['containerWidth'] 328 | }, settings.animation_speed, function () { 329 | $pp_pic_holder.find('.pp_hoverContainer,#fullResImage').height(correctSizes['height']).width(correctSizes['width']); 330 | $pp_pic_holder.find('.pp_fade').fadeIn(settings.animation_speed); 331 | if (isSet && _getFileType(pp_images[set_position]) == "image") { 332 | $pp_pic_holder.find('.pp_hoverContainer').show(); 333 | } else { 334 | $pp_pic_holder.find('.pp_hoverContainer').hide(); 335 | } 336 | if (correctSizes['resized']) $('a.pp_expand,a.pp_contract').fadeIn(settings.animation_speed); 337 | if (settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.prettyPhoto.startSlideshow(); 338 | settings.changepicturecallback(); 339 | pp_open = true; 340 | }); 341 | _insert_gallery(); 342 | }; 343 | 344 | function _hideContent(callback) { 345 | $pp_pic_holder.find('#pp_full_res object,#pp_full_res embed').css('visibility', 'hidden'); 346 | $pp_pic_holder.find('.pp_fade').fadeOut(settings.animation_speed, function () { 347 | $('.pp_loaderIcon').show(); 348 | callback(); 349 | }); 350 | }; 351 | 352 | function _checkPosition(setCount) { 353 | if (set_position == setCount - 1) { 354 | $pp_pic_holder.find('a.pp_next').css('visibility', 'hidden'); 355 | $pp_pic_holder.find('a.pp_next').addClass('disabled').unbind('click'); 356 | } else { 357 | $pp_pic_holder.find('a.pp_next').css('visibility', 'visible'); 358 | $pp_pic_holder.find('a.pp_next.disabled').removeClass('disabled').bind('click', function () { 359 | $.prettyPhoto.changePage('next'); 360 | return false; 361 | }); 362 | }; 363 | if (set_position == 0) { 364 | $pp_pic_holder.find('a.pp_previous').css('visibility', 'hidden').addClass('disabled').unbind('click'); 365 | } else { 366 | $pp_pic_holder.find('a.pp_previous.disabled').css('visibility', 'visible').removeClass('disabled').bind('click', function () { 367 | $.prettyPhoto.changePage('previous'); 368 | return false; 369 | }); 370 | }; 371 | (setCount > 1) ? $('.pp_nav').show(): $('.pp_nav').hide(); 372 | }; 373 | 374 | function _fitToViewport(width, height) { 375 | resized = false; 376 | _getDimensions(width, height); 377 | imageWidth = width, imageHeight = height; 378 | if (((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) { 379 | resized = true, fitting = false; 380 | while (!fitting) { 381 | if ((pp_containerWidth > windowWidth)) { 382 | imageWidth = (windowWidth - 200); 383 | imageHeight = (height / width) * imageWidth; 384 | } else if ((pp_containerHeight > windowHeight)) { 385 | imageHeight = (windowHeight - 200); 386 | imageWidth = (width / height) * imageHeight; 387 | } else { 388 | fitting = true; 389 | }; 390 | pp_containerHeight = imageHeight, pp_containerWidth = imageWidth; 391 | }; 392 | _getDimensions(imageWidth, imageHeight); 393 | }; 394 | return { 395 | width: Math.floor(imageWidth), 396 | height: Math.floor(imageHeight), 397 | containerHeight: Math.floor(pp_containerHeight), 398 | containerWidth: Math.floor(pp_containerWidth) + 40, 399 | contentHeight: Math.floor(pp_contentHeight), 400 | contentWidth: Math.floor(pp_contentWidth), 401 | resized: resized 402 | }; 403 | }; 404 | 405 | function _getDimensions(width, height) { 406 | width = parseFloat(width); 407 | height = parseFloat(height); 408 | $pp_details = $pp_pic_holder.find('.pp_details'); 409 | $pp_details.width(width); 410 | detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom')); 411 | $pp_details = $pp_details.clone().appendTo($('body')).css({ 412 | 'position': 'absolute', 413 | 'top': -10000 414 | }); 415 | detailsHeight += $pp_details.height(); 416 | detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; 417 | if ($.browser.msie && $.browser.version == 7) detailsHeight += 8; 418 | $pp_details.remove(); 419 | pp_contentHeight = height + detailsHeight; 420 | pp_contentWidth = width; 421 | pp_containerHeight = pp_contentHeight + $ppt.height() + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height(); 422 | pp_containerWidth = width; 423 | } 424 | 425 | function _getFileType(itemSrc) { 426 | if (itemSrc.match(/youtube\.com\/watch/i)) { 427 | return 'youtube'; 428 | } else if (itemSrc.match(/vimeo\.com/i)) { 429 | return 'vimeo'; 430 | } else if (itemSrc.indexOf('.mov') != -1) { 431 | return 'quicktime'; 432 | } else if (itemSrc.indexOf('.swf') != -1) { 433 | return 'flash'; 434 | } else if (itemSrc.indexOf('iframe') != -1) { 435 | return 'iframe'; 436 | } else if (itemSrc.indexOf('custom') != -1) { 437 | return 'custom'; 438 | } else if (itemSrc.substr(0, 1) == '#') { 439 | return 'inline'; 440 | } else { 441 | return 'image'; 442 | }; 443 | }; 444 | 445 | function _center_overlay() { 446 | if (doresize && typeof $pp_pic_holder != 'undefined') { 447 | scroll_pos = _get_scroll(); 448 | titleHeight = $ppt.height(), contentHeight = $pp_pic_holder.height(), contentwidth = $pp_pic_holder.width(); 449 | projectedTop = (windowHeight / 2) + scroll_pos['scrollTop'] - (contentHeight / 2); 450 | $pp_pic_holder.css({ 451 | 'top': projectedTop, 452 | 'left': (windowWidth / 2) + scroll_pos['scrollLeft'] - (contentwidth / 2) 453 | }); 454 | }; 455 | }; 456 | 457 | function _get_scroll() { 458 | if (self.pageYOffset) { 459 | return { 460 | scrollTop: self.pageYOffset, 461 | scrollLeft: self.pageXOffset 462 | }; 463 | } else if (document.documentElement && document.documentElement.scrollTop) { 464 | return { 465 | scrollTop: document.documentElement.scrollTop, 466 | scrollLeft: document.documentElement.scrollLeft 467 | }; 468 | } else if (document.body) { 469 | return { 470 | scrollTop: document.body.scrollTop, 471 | scrollLeft: document.body.scrollLeft 472 | }; 473 | }; 474 | }; 475 | 476 | function _resize_overlay() { 477 | windowHeight = $(window).height(), windowWidth = $(window).width(); 478 | if (typeof $pp_overlay != "undefined") $pp_overlay.height($(document).height()); 479 | }; 480 | 481 | function _insert_gallery() { 482 | if (isSet && settings.overlay_gallery && _getFileType(pp_images[set_position]) == "image") { 483 | itemWidth = 52 + 5; 484 | navWidth = (settings.theme == "facebook") ? 58 : 38; 485 | itemsPerPage = Math.floor((correctSizes['containerWidth'] - 100 - navWidth) / itemWidth); 486 | itemsPerPage = (itemsPerPage < pp_images.length) ? itemsPerPage : pp_images.length; 487 | totalPage = Math.ceil(pp_images.length / itemsPerPage) - 1; 488 | if (totalPage == 0) { 489 | navWidth = 0; 490 | $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').hide(); 491 | } else { 492 | $pp_pic_holder.find('.pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous').show(); 493 | }; 494 | galleryWidth = itemsPerPage * itemWidth + navWidth; 495 | $pp_pic_holder.find('.pp_gallery').width(galleryWidth).css('margin-left', -(galleryWidth / 2)); 496 | $pp_pic_holder.find('.pp_gallery ul').width(itemsPerPage * itemWidth).find('li.selected').removeClass('selected'); 497 | goToPage = (Math.floor(set_position / itemsPerPage) <= totalPage) ? Math.floor(set_position / itemsPerPage) : totalPage; 498 | if (itemsPerPage) { 499 | $pp_pic_holder.find('.pp_gallery').hide().show().removeClass('disabled'); 500 | } else { 501 | $pp_pic_holder.find('.pp_gallery').hide().addClass('disabled'); 502 | } 503 | $.prettyPhoto.changeGalleryPage(goToPage); 504 | $pp_pic_holder.find('.pp_gallery ul li:eq(' + set_position + ')').addClass('selected'); 505 | } else { 506 | $pp_pic_holder.find('.pp_content').unbind('mouseenter mouseleave'); 507 | $pp_pic_holder.find('.pp_gallery').hide(); 508 | } 509 | } 510 | 511 | function _buildOverlay(caller) { 512 | theRel = $(caller).attr('data-gal'); 513 | galleryRegExp = /\[(?:.*)\]/; 514 | isSet = (galleryRegExp.exec(theRel)) ? true : false; 515 | pp_images = (isSet) ? jQuery.map(matchedObjects, function (n, i) { 516 | if ($(n).attr('data-gal').indexOf(theRel) != -1) return $(n).attr('href'); 517 | }) : $.makeArray($(caller).attr('href')); 518 | pp_titles = (isSet) ? jQuery.map(matchedObjects, function (n, i) { 519 | if ($(n).attr('data-gal').indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; 520 | }) : $.makeArray($(caller).find('img').attr('alt')); 521 | pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function (n, i) { 522 | if ($(n).attr('data-gal').indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; 523 | }) : $.makeArray($(caller).attr('title')); 524 | $('body').append(settings.markup); 525 | $pp_pic_holder = $('.pp_pic_holder'), $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); 526 | if (isSet && settings.overlay_gallery) { 527 | currentGalleryPage = 0; 528 | toInject = ""; 529 | for (var i = 0; i < pp_images.length; i++) { 530 | var regex = new RegExp("(.*?)\.(jpg|jpeg|png|gif)$"); 531 | var results = regex.exec(pp_images[i]); 532 | if (!results) { 533 | classname = 'default'; 534 | } else { 535 | classname = ''; 536 | } 537 | toInject += "
  • "; 538 | }; 539 | toInject = settings.gallery_markup.replace(/{gallery}/g, toInject); 540 | $pp_pic_holder.find('#pp_full_res').after(toInject); 541 | $pp_pic_holder.find('.pp_gallery .pp_arrow_next').click(function () { 542 | $.prettyPhoto.changeGalleryPage('next'); 543 | $.prettyPhoto.stopSlideshow(); 544 | return false; 545 | }); 546 | $pp_pic_holder.find('.pp_gallery .pp_arrow_previous').click(function () { 547 | $.prettyPhoto.changeGalleryPage('previous'); 548 | $.prettyPhoto.stopSlideshow(); 549 | return false; 550 | }); 551 | $pp_pic_holder.find('.pp_content').hover(function () { 552 | $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeIn(); 553 | }, function () { 554 | $pp_pic_holder.find('.pp_gallery:not(.disabled)').fadeOut(); 555 | }); 556 | itemWidth = 52 + 5; 557 | $pp_pic_holder.find('.pp_gallery ul li').each(function (i) { 558 | $(this).css({ 559 | 'position': 'absolute', 560 | 'left': i * itemWidth 561 | }); 562 | $(this).find('a').unbind('click').click(function () { 563 | $.prettyPhoto.changePage(i); 564 | $.prettyPhoto.stopSlideshow(); 565 | return false; 566 | }); 567 | }); 568 | }; 569 | if (settings.slideshow) { 570 | $pp_pic_holder.find('.pp_nav').prepend('Play') 571 | $pp_pic_holder.find('.pp_nav .pp_play').click(function () { 572 | $.prettyPhoto.startSlideshow(); 573 | return false; 574 | }); 575 | } 576 | $pp_pic_holder.attr('class', 'pp_pic_holder ' + settings.theme); 577 | $pp_overlay.css({ 578 | 'opacity': 0, 579 | 'height': $(document).height(), 580 | 'width': $(document).width() 581 | }).bind('click', function () { 582 | if (!settings.modal) $.prettyPhoto.close(); 583 | }); 584 | $('a.pp_close').bind('click', function () { 585 | $.prettyPhoto.close(); 586 | return false; 587 | }); 588 | $('a.pp_expand').bind('click', function (e) { 589 | if ($(this).hasClass('pp_expand')) { 590 | $(this).removeClass('pp_expand').addClass('pp_contract'); 591 | doresize = false; 592 | } else { 593 | $(this).removeClass('pp_contract').addClass('pp_expand'); 594 | doresize = true; 595 | }; 596 | _hideContent(function () { 597 | $.prettyPhoto.open(); 598 | }); 599 | return false; 600 | }); 601 | $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click', function () { 602 | $.prettyPhoto.changePage('previous'); 603 | $.prettyPhoto.stopSlideshow(); 604 | return false; 605 | }); 606 | $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click', function () { 607 | $.prettyPhoto.changePage('next'); 608 | $.prettyPhoto.stopSlideshow(); 609 | return false; 610 | }); 611 | _center_overlay(); 612 | }; 613 | return this.unbind('click').click($.prettyPhoto.initialize); 614 | }; 615 | 616 | function grab_param(name, url) { 617 | name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); 618 | var regexS = "[\\?&]" + name + "=([^&#]*)"; 619 | var regex = new RegExp(regexS); 620 | var results = regex.exec(url); 621 | return (results == null) ? "" : results[1]; 622 | } 623 | })(jQuery); -------------------------------------------------------------------------------- /static/resources/assets/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t=t||self).bootstrap={},t.jQuery,t.Popper)}(this,function(t,g,u){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
    ',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Ee},je="show",He="out",Re={HIDE:"hide"+De,HIDDEN:"hidden"+De,SHOW:"show"+De,SHOWN:"shown"+De,INSERTED:"inserted"+De,CLICK:"click"+De,FOCUSIN:"focusin"+De,FOCUSOUT:"focusout"+De,MOUSEENTER:"mouseenter"+De,MOUSELEAVE:"mouseleave"+De},xe="fade",Fe="show",Ue=".tooltip-inner",We=".arrow",qe="hover",Me="focus",Ke="click",Qe="manual",Be=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(xe);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:We},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===He&&e._leave(null,e)};if(g(this.tip).hasClass(xe)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==je&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Fe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ke]=!1,this._activeTrigger[Me]=!1,this._activeTrigger[qe]=!1,g(this.tip).hasClass(xe)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ae+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Ue)),this.getTitle()),g(t).removeClass(xe+" "+Fe)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=Se(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return Pe[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Qe){var e=t===qe?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===qe?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Me:qe]=!0),g(e.getTipElement()).hasClass(Fe)||e._hoverState===je?e._hoverState=je:(clearTimeout(e._timeout),e._hoverState=je,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===je&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Me:qe]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===He&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=g(this.element).data();return Object.keys(e).forEach(function(t){-1!==Oe.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(be,t,this.constructor.DefaultType),t.sanitize&&(t.template=Se(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ne);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(xe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ie),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ie,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Le}},{key:"NAME",get:function(){return be}},{key:"DATA_KEY",get:function(){return Ie}},{key:"Event",get:function(){return Re}},{key:"EVENT_KEY",get:function(){return De}},{key:"DefaultType",get:function(){return ke}}]),i}();g.fn[be]=Be._jQueryInterface,g.fn[be].Constructor=Be,g.fn[be].noConflict=function(){return g.fn[be]=we,Be._jQueryInterface};var Ve="popover",Ye="bs.popover",ze="."+Ye,Xe=g.fn[Ve],$e="bs-popover",Ge=new RegExp("(^|\\s)"+$e+"\\S+","g"),Je=l({},Be.Default,{placement:"right",trigger:"click",content:"",template:''}),Ze=l({},Be.DefaultType,{content:"(string|element|function)"}),tn="fade",en="show",nn=".popover-header",on=".popover-body",rn={HIDE:"hide"+ze,HIDDEN:"hidden"+ze,SHOW:"show"+ze,SHOWN:"shown"+ze,INSERTED:"inserted"+ze,CLICK:"click"+ze,FOCUSIN:"focusin"+ze,FOCUSOUT:"focusout"+ze,MOUSEENTER:"mouseenter"+ze,MOUSELEAVE:"mouseleave"+ze},sn=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass($e+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(nn),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(on),e),t.removeClass(tn+" "+en)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ge);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t