Login to Continue
10 |It will take less than 2 minutes
11 | 12 |Sorry, we couldn't find this page.
13 | {% if request.user.is_authenticated %} 14 | Back To Dashboard 15 | {% else %} 16 | Back To Home 17 | {% endif %} 18 |Thanks for contacting us! We will check your message within a few minutes.
'); 16 | } else { 17 | alert('status: ' + statusText + '\n\nSomething is wrong here'); 18 | } 19 | } 20 | 21 | function showRequestContact(formData, jqForm, options2) { 22 | var form = jqForm[0]; 23 | var validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i; 24 | 25 | if (!form.name.value) { 26 | jQuery('#output-contact').html('Thanks for contacting us! We will check your message within a few minutes.
'); 16 | } else { 17 | alert('status: ' + statusText + '\n\nSomething is wrong here'); 18 | } 19 | } 20 | 21 | function showRequestContact(formData, jqForm, options2) { 22 | var form = jqForm[0]; 23 | var validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i; 24 | 25 | if (!form.name.value) { 26 | jQuery('#output-contact').html('x
'; 27 | head.appendChild(div.childNodes[1]); 28 | } 29 | 30 | if ( options ) { 31 | $.extend( settings, options ); 32 | } 33 | 34 | return this.each(function(){ 35 | var selectors = [ 36 | 'iframe[src*="player.vimeo.com"]', 37 | 'iframe[src*="youtube.com"]', 38 | 'iframe[src*="youtube-nocookie.com"]', 39 | 'iframe[src*="kickstarter.com"][src*="video.html"]', 40 | 'object', 41 | 'embed' 42 | ]; 43 | 44 | if (settings.customSelector) { 45 | selectors.push(settings.customSelector); 46 | } 47 | 48 | var ignoreList = '.fitvidsignore'; 49 | 50 | if(settings.ignore) { 51 | ignoreList = ignoreList + ', ' + settings.ignore; 52 | } 53 | 54 | var $allVideos = $(this).find(selectors.join(',')); 55 | $allVideos = $allVideos.not('object object'); // SwfObj conflict patch 56 | $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. 57 | 58 | $allVideos.each(function(){ 59 | var $this = $(this); 60 | if($this.parents(ignoreList).length > 0) { 61 | return; // Disable FitVids on this video. 62 | } 63 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 64 | if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) 65 | { 66 | $this.attr('height', 9); 67 | $this.attr('width', 16); 68 | } 69 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 70 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 71 | aspectRatio = height / width; 72 | if(!$this.attr('name')){ 73 | var videoName = 'fitvid' + $.fn.fitVids._count; 74 | $this.attr('name', videoName); 75 | $.fn.fitVids._count++; 76 | } 77 | $this.wrap('').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); 78 | $this.removeAttr('height').removeAttr('width'); 79 | }); 80 | }); 81 | }; 82 | 83 | // Internal counter for unique video names. 84 | $.fn.fitVids._count = 0; 85 | 86 | // Works with either jQuery or Zepto 87 | })( window.jQuery || window.Zepto ); 88 | -------------------------------------------------------------------------------- /staticfiles/glr/js/fitvids.js: -------------------------------------------------------------------------------- 1 | /*jshint browser:true */ 2 | /*! 3 | * FitVids 1.1 4 | * 5 | * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 6 | * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 7 | * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 8 | * 9 | */ 10 | 11 | ;(function( $ ){ 12 | 13 | 'use strict'; 14 | 15 | $.fn.fitVids = function( options ) { 16 | var settings = { 17 | customSelector: null, 18 | ignore: null 19 | }; 20 | 21 | if(!document.getElementById('fit-vids-style')) { 22 | // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js 23 | var head = document.head || document.getElementsByTagName('head')[0]; 24 | var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; 25 | var div = document.createElement("div"); 26 | div.innerHTML = 'x
'; 27 | head.appendChild(div.childNodes[1]); 28 | } 29 | 30 | if ( options ) { 31 | $.extend( settings, options ); 32 | } 33 | 34 | return this.each(function(){ 35 | var selectors = [ 36 | 'iframe[src*="player.vimeo.com"]', 37 | 'iframe[src*="youtube.com"]', 38 | 'iframe[src*="youtube-nocookie.com"]', 39 | 'iframe[src*="kickstarter.com"][src*="video.html"]', 40 | 'object', 41 | 'embed' 42 | ]; 43 | 44 | if (settings.customSelector) { 45 | selectors.push(settings.customSelector); 46 | } 47 | 48 | var ignoreList = '.fitvidsignore'; 49 | 50 | if(settings.ignore) { 51 | ignoreList = ignoreList + ', ' + settings.ignore; 52 | } 53 | 54 | var $allVideos = $(this).find(selectors.join(',')); 55 | $allVideos = $allVideos.not('object object'); // SwfObj conflict patch 56 | $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. 57 | 58 | $allVideos.each(function(){ 59 | var $this = $(this); 60 | if($this.parents(ignoreList).length > 0) { 61 | return; // Disable FitVids on this video. 62 | } 63 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 64 | if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) 65 | { 66 | $this.attr('height', 9); 67 | $this.attr('width', 16); 68 | } 69 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 70 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 71 | aspectRatio = height / width; 72 | if(!$this.attr('name')){ 73 | var videoName = 'fitvid' + $.fn.fitVids._count; 74 | $this.attr('name', videoName); 75 | $.fn.fitVids._count++; 76 | } 77 | $this.wrap('').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); 78 | $this.removeAttr('height').removeAttr('width'); 79 | }); 80 | }); 81 | }; 82 | 83 | // Internal counter for unique video names. 84 | $.fn.fitVids._count = 0; 85 | 86 | // Works with either jQuery or Zepto 87 | })( window.jQuery || window.Zepto ); 88 | -------------------------------------------------------------------------------- /staticfiles/admin/js/SelectBox.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | { 3 | const SelectBox = { 4 | cache: {}, 5 | init: function(id) { 6 | const box = document.getElementById(id); 7 | SelectBox.cache[id] = []; 8 | const cache = SelectBox.cache[id]; 9 | for (const node of box.options) { 10 | cache.push({value: node.value, text: node.text, displayed: 1}); 11 | } 12 | }, 13 | redisplay: function(id) { 14 | // Repopulate HTML select box from cache 15 | const box = document.getElementById(id); 16 | const scroll_value_from_top = box.scrollTop; 17 | box.innerHTML = ''; 18 | for (const node of SelectBox.cache[id]) { 19 | if (node.displayed) { 20 | const new_option = new Option(node.text, node.value, false, false); 21 | // Shows a tooltip when hovering over the option 22 | new_option.title = node.text; 23 | box.appendChild(new_option); 24 | } 25 | } 26 | box.scrollTop = scroll_value_from_top; 27 | }, 28 | filter: function(id, text) { 29 | // Redisplay the HTML select box, displaying only the choices containing ALL 30 | // the words in text. (It's an AND search.) 31 | const tokens = text.toLowerCase().split(/\s+/); 32 | for (const node of SelectBox.cache[id]) { 33 | node.displayed = 1; 34 | const node_text = node.text.toLowerCase(); 35 | for (const token of tokens) { 36 | if (!node_text.includes(token)) { 37 | node.displayed = 0; 38 | break; // Once the first token isn't found we're done 39 | } 40 | } 41 | } 42 | SelectBox.redisplay(id); 43 | }, 44 | get_hidden_node_count(id) { 45 | const cache = SelectBox.cache[id] || []; 46 | return cache.filter(node => node.displayed === 0).length; 47 | }, 48 | delete_from_cache: function(id, value) { 49 | let delete_index = null; 50 | const cache = SelectBox.cache[id]; 51 | for (const [i, node] of cache.entries()) { 52 | if (node.value === value) { 53 | delete_index = i; 54 | break; 55 | } 56 | } 57 | cache.splice(delete_index, 1); 58 | }, 59 | add_to_cache: function(id, option) { 60 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 61 | }, 62 | cache_contains: function(id, value) { 63 | // Check if an item is contained in the cache 64 | for (const node of SelectBox.cache[id]) { 65 | if (node.value === value) { 66 | return true; 67 | } 68 | } 69 | return false; 70 | }, 71 | move: function(from, to) { 72 | const from_box = document.getElementById(from); 73 | for (const option of from_box.options) { 74 | const option_value = option.value; 75 | if (option.selected && SelectBox.cache_contains(from, option_value)) { 76 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 77 | SelectBox.delete_from_cache(from, option_value); 78 | } 79 | } 80 | SelectBox.redisplay(from); 81 | SelectBox.redisplay(to); 82 | }, 83 | move_all: function(from, to) { 84 | const from_box = document.getElementById(from); 85 | for (const option of from_box.options) { 86 | const option_value = option.value; 87 | if (SelectBox.cache_contains(from, option_value)) { 88 | SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1}); 89 | SelectBox.delete_from_cache(from, option_value); 90 | } 91 | } 92 | SelectBox.redisplay(from); 93 | SelectBox.redisplay(to); 94 | }, 95 | sort: function(id) { 96 | SelectBox.cache[id].sort(function(a, b) { 97 | a = a.text.toLowerCase(); 98 | b = b.text.toLowerCase(); 99 | if (a > b) { 100 | return 1; 101 | } 102 | if (a < b) { 103 | return -1; 104 | } 105 | return 0; 106 | } ); 107 | }, 108 | select_all: function(id) { 109 | const box = document.getElementById(id); 110 | for (const option of box.options) { 111 | option.selected = true; 112 | } 113 | } 114 | }; 115 | window.SelectBox = SelectBox; 116 | } 117 | -------------------------------------------------------------------------------- /static/glr/js/init.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: matchthemes.com 3 | * 4 | */ 5 | 6 | (function($) { 7 | "use strict"; 8 | 9 | // home slider 10 | $('.home-slider').owlCarousel({ 11 | items:1, 12 | loop:true, 13 | autoplay:true, 14 | autoplayTimeout:7000, 15 | autoplayHoverPause:true, 16 | animateOut: 'fadeOut', 17 | dots:false, 18 | nav:true, 19 | navText:'' 20 | }); 21 | 22 | $('.portfolio-slider-4items').owlCarousel({ 23 | loop:true, 24 | autoplay:true, 25 | autoplayTimeout:6000, 26 | margin: 30, 27 | dots:false, 28 | nav:true, 29 | navText:'', 30 | responsive:{ 0: { items: 1 }, 31 | 568: { items: 2 }, 32 | 1024: { items: 3 }, 33 | 34 | } 35 | }); 36 | 37 | $('.testimonial-slider').owlCarousel({ 38 | items:1, 39 | loop:true, 40 | autoHeight: true, 41 | autoplay: true, 42 | autoplayTimeout:8000, 43 | animateOut: 'fadeOut' 44 | }); 45 | 46 | //mobile menu 47 | $('.nav-button').on('click', function(e){ 48 | 49 | e.preventDefault(); 50 | 51 | $('.mobile-menu-holder, .menu-mask').addClass('is-active'); 52 | $('body').addClass('has-active-menu'); 53 | 54 | }); 55 | 56 | $('.exit-mobile, .menu-mask').on('click', function(e){ 57 | 58 | e.preventDefault(); 59 | 60 | $('.mobile-menu-holder, .menu-mask').removeClass('is-active'); 61 | $('body').removeClass('has-active-menu'); 62 | 63 | }); 64 | 65 | $('.menu-mobile > li.menu-item-has-children > a').on('click', function(e){ 66 | 67 | e.preventDefault(); 68 | e.stopPropagation(); 69 | 70 | if ( $(this).parent().hasClass('menu-open') ) 71 | 72 | $(this).parent().removeClass('menu-open'); 73 | 74 | else { 75 | 76 | $(this).parent().addClass('menu-open'); 77 | 78 | } 79 | 80 | }); 81 | 82 | // end mobile menu 83 | 84 | // menu edge screen turn left 85 | 86 | $(".menu-nav li").on('mouseenter mouseleave', function (e) { 87 | if ($('ul', this).length) { 88 | var elm = $('.sub-menu', this); 89 | var off = elm.offset(); 90 | var l = off.left; 91 | var w = elm.width(); 92 | var docW = $(window).width(); 93 | 94 | var isEntirelyVisible = (l + w <= docW); 95 | 96 | if (!isEntirelyVisible) { 97 | $(this).addClass('edge'); 98 | } else { 99 | $(this).removeClass('edge'); 100 | } 101 | } 102 | }); 103 | 104 | 105 | $(window).on('load', function() { 106 | 107 | //masonry 108 | var blogItems = $('.layout-masonry'); 109 | var portfolioItems = $('.portfolio-layout-masonry'); 110 | var portfolioItems2 = $('.portfolio-layout-masonry2'); 111 | var portfolioItems4 = $('.grid-v4-masonry'); 112 | 113 | blogItems.isotope({ 114 | itemSelector : '.blog-item-masonry', 115 | layoutMode : 'masonry', 116 | 117 | }); 118 | 119 | portfolioItems.isotope({ 120 | itemSelector : '.item-portfolio', 121 | layoutMode : 'masonry', 122 | 123 | }); 124 | 125 | portfolioItems2.isotope({ 126 | itemSelector : '.grid-item-style', 127 | layoutMode : 'fitRows', 128 | }); 129 | 130 | 131 | portfolioItems4.isotope({ 132 | itemSelector : '.grid-item-v4', 133 | percentPosition: true, 134 | layoutMode: 'masonry', 135 | masonry: { 136 | columnWidth: '.grid-item-v4-init' 137 | } 138 | }); 139 | 140 | 141 | // filter items when filter link is clicked 142 | if ($('.portfolio-filter a').length){ 143 | $('.portfolio-filter a').on('click', function(){ 144 | $('.portfolio-filter .current').removeClass('current'); 145 | $(this).addClass('current'); 146 | 147 | var selector = $(this).attr('data-filter'); 148 | portfolioItems.isotope({ filter: selector }); 149 | portfolioItems2.isotope({ filter: selector }); 150 | return false; 151 | }); 152 | } 153 | 154 | }); //window.load 155 | 156 | $(window).on('scroll', function() { 157 | if ($(document).scrollTop() > 1 ) { 158 | $('.main-header').addClass('nav-fixed-top'); 159 | } else { 160 | $('.main-header').removeClass('nav-fixed-top'); 161 | } 162 | 163 | }); 164 | 165 | 166 | //gallery 167 | 168 | $('.gallery-post a').simpleLightbox({ 169 | heightRatio: 1, 170 | widthRatio: 0.8 171 | 172 | }); 173 | 174 | 175 | // faq 176 | $('.faq-section').hide(); 177 | $('.faq-title').on('click',function(){ 178 | 179 | if( $(this).next().is(':hidden') ) { 180 | 181 | $(this).toggleClass('active').next().slideDown(); 182 | } else { 183 | $(this).removeClass('active').next().slideUp(); 184 | } 185 | return false; 186 | }); 187 | 188 | 189 | //fluid width videos 190 | 191 | $(".single-post-content, .custom-page-template, .post-video").fitVids({customSelector: "iframe[src^='https://w.soundcloud.com']"}); 192 | 193 | 194 | //scroll up button 195 | 196 | $(".scrollup").hide(); 197 | $(window).on('scroll', function() { 198 | if ($(this).scrollTop() > 400) { 199 | $('.scrollup').fadeIn(); 200 | } else { 201 | $('.scrollup').fadeOut(); 202 | } 203 | }); 204 | 205 | $("a.scrolltop[href^='#']").on('click', function(e) { 206 | e.preventDefault(); 207 | var hash = this.hash; 208 | $('html, body').stop().animate({scrollTop:0}, 1000, 'easeOutExpo'); 209 | 210 | }); 211 | 212 | })(jQuery); -------------------------------------------------------------------------------- /staticfiles/glr/js/init.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: matchthemes.com 3 | * 4 | */ 5 | 6 | (function($) { 7 | "use strict"; 8 | 9 | // home slider 10 | $('.home-slider').owlCarousel({ 11 | items:1, 12 | loop:true, 13 | autoplay:true, 14 | autoplayTimeout:7000, 15 | autoplayHoverPause:true, 16 | animateOut: 'fadeOut', 17 | dots:false, 18 | nav:true, 19 | navText:'' 20 | }); 21 | 22 | $('.portfolio-slider-4items').owlCarousel({ 23 | loop:true, 24 | autoplay:true, 25 | autoplayTimeout:6000, 26 | margin: 30, 27 | dots:false, 28 | nav:true, 29 | navText:'', 30 | responsive:{ 0: { items: 1 }, 31 | 568: { items: 2 }, 32 | 1024: { items: 3 }, 33 | 34 | } 35 | }); 36 | 37 | $('.testimonial-slider').owlCarousel({ 38 | items:1, 39 | loop:true, 40 | autoHeight: true, 41 | autoplay: true, 42 | autoplayTimeout:8000, 43 | animateOut: 'fadeOut' 44 | }); 45 | 46 | //mobile menu 47 | $('.nav-button').on('click', function(e){ 48 | 49 | e.preventDefault(); 50 | 51 | $('.mobile-menu-holder, .menu-mask').addClass('is-active'); 52 | $('body').addClass('has-active-menu'); 53 | 54 | }); 55 | 56 | $('.exit-mobile, .menu-mask').on('click', function(e){ 57 | 58 | e.preventDefault(); 59 | 60 | $('.mobile-menu-holder, .menu-mask').removeClass('is-active'); 61 | $('body').removeClass('has-active-menu'); 62 | 63 | }); 64 | 65 | $('.menu-mobile > li.menu-item-has-children > a').on('click', function(e){ 66 | 67 | e.preventDefault(); 68 | e.stopPropagation(); 69 | 70 | if ( $(this).parent().hasClass('menu-open') ) 71 | 72 | $(this).parent().removeClass('menu-open'); 73 | 74 | else { 75 | 76 | $(this).parent().addClass('menu-open'); 77 | 78 | } 79 | 80 | }); 81 | 82 | // end mobile menu 83 | 84 | // menu edge screen turn left 85 | 86 | $(".menu-nav li").on('mouseenter mouseleave', function (e) { 87 | if ($('ul', this).length) { 88 | var elm = $('.sub-menu', this); 89 | var off = elm.offset(); 90 | var l = off.left; 91 | var w = elm.width(); 92 | var docW = $(window).width(); 93 | 94 | var isEntirelyVisible = (l + w <= docW); 95 | 96 | if (!isEntirelyVisible) { 97 | $(this).addClass('edge'); 98 | } else { 99 | $(this).removeClass('edge'); 100 | } 101 | } 102 | }); 103 | 104 | 105 | $(window).on('load', function() { 106 | 107 | //masonry 108 | var blogItems = $('.layout-masonry'); 109 | var portfolioItems = $('.portfolio-layout-masonry'); 110 | var portfolioItems2 = $('.portfolio-layout-masonry2'); 111 | var portfolioItems4 = $('.grid-v4-masonry'); 112 | 113 | blogItems.isotope({ 114 | itemSelector : '.blog-item-masonry', 115 | layoutMode : 'masonry', 116 | 117 | }); 118 | 119 | portfolioItems.isotope({ 120 | itemSelector : '.item-portfolio', 121 | layoutMode : 'masonry', 122 | 123 | }); 124 | 125 | portfolioItems2.isotope({ 126 | itemSelector : '.grid-item-style', 127 | layoutMode : 'fitRows', 128 | }); 129 | 130 | 131 | portfolioItems4.isotope({ 132 | itemSelector : '.grid-item-v4', 133 | percentPosition: true, 134 | layoutMode: 'masonry', 135 | masonry: { 136 | columnWidth: '.grid-item-v4-init' 137 | } 138 | }); 139 | 140 | 141 | // filter items when filter link is clicked 142 | if ($('.portfolio-filter a').length){ 143 | $('.portfolio-filter a').on('click', function(){ 144 | $('.portfolio-filter .current').removeClass('current'); 145 | $(this).addClass('current'); 146 | 147 | var selector = $(this).attr('data-filter'); 148 | portfolioItems.isotope({ filter: selector }); 149 | portfolioItems2.isotope({ filter: selector }); 150 | return false; 151 | }); 152 | } 153 | 154 | }); //window.load 155 | 156 | $(window).on('scroll', function() { 157 | if ($(document).scrollTop() > 1 ) { 158 | $('.main-header').addClass('nav-fixed-top'); 159 | } else { 160 | $('.main-header').removeClass('nav-fixed-top'); 161 | } 162 | 163 | }); 164 | 165 | 166 | //gallery 167 | 168 | $('.gallery-post a').simpleLightbox({ 169 | heightRatio: 1, 170 | widthRatio: 0.8 171 | 172 | }); 173 | 174 | 175 | // faq 176 | $('.faq-section').hide(); 177 | $('.faq-title').on('click',function(){ 178 | 179 | if( $(this).next().is(':hidden') ) { 180 | 181 | $(this).toggleClass('active').next().slideDown(); 182 | } else { 183 | $(this).removeClass('active').next().slideUp(); 184 | } 185 | return false; 186 | }); 187 | 188 | 189 | //fluid width videos 190 | 191 | $(".single-post-content, .custom-page-template, .post-video").fitVids({customSelector: "iframe[src^='https://w.soundcloud.com']"}); 192 | 193 | 194 | //scroll up button 195 | 196 | $(".scrollup").hide(); 197 | $(window).on('scroll', function() { 198 | if ($(this).scrollTop() > 400) { 199 | $('.scrollup').fadeIn(); 200 | } else { 201 | $('.scrollup').fadeOut(); 202 | } 203 | }); 204 | 205 | $("a.scrolltop[href^='#']").on('click', function(e) { 206 | e.preventDefault(); 207 | var hash = this.hash; 208 | $('html, body').stop().animate({scrollTop:0}, 1000, 'easeOutExpo'); 209 | 210 | }); 211 | 212 | })(jQuery); -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 |
4 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
37 |