From d5eb7f0fef1e88973c547eaadc6c454ea19bda3a Mon Sep 17 00:00:00 2001 From: Adrien Date: Tue, 11 May 2021 10:12:02 +0200 Subject: [PATCH] Modification de la couleur primaire du site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changement de #4aca62 à #4cae4f afin de correspondre à la couleur de la documentation et diminuer la luminosité générale --- .gitignore | 8 +- ACTUALITE.html | 224 ++--- LICENSE | 40 +- README.md | 12 +- Site-internet.Rproj | 26 +- assets/css/main.css | 24 +- assets/js-old/breakpoints.min.js | 2 +- assets/js-old/browser.min.js | 2 +- assets/js-old/demo.js | 1124 ++++++++++++------------ assets/js-old/jquery.scrollex.min.js | 2 +- assets/js-old/jquery.scrolly.min.js | 2 +- assets/js-old/main.js | 680 +++++++-------- assets/js-old/util.js | 1172 +++++++++++++------------- assets/js/breakpoints.min.js | 2 +- assets/js/browser.min.js | 2 +- assets/js/demo.js | 1124 ++++++++++++------------ assets/js/jquery.scrollex.min.js | 2 +- assets/js/jquery.scrolly.min.js | 2 +- assets/js/main.js | 692 +++++++-------- assets/js/util.js | 1172 +++++++++++++------------- assets/sass/libs/_functions.scss | 178 ++-- assets/sass/libs/_html-grid.scss | 296 +++---- assets/sass/libs/_mixins.scss | 154 ++-- assets/sass/libs/_vars.scss | 126 +-- index.html | 882 +++++++++---------- sitemap.xml | 44 +- 26 files changed, 3997 insertions(+), 3997 deletions(-) diff --git a/.gitignore b/.gitignore index 5b6a065..d44df33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.Rproj.user -.Rhistory -.RData -.Ruserdata +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/ACTUALITE.html b/ACTUALITE.html index ebd2e8a..bd7b410 100644 --- a/ACTUALITE.html +++ b/ACTUALITE.html @@ -1,113 +1,113 @@ - - - - - - - Adrien CHARBONNEAU – Naturaliste écologue - - - - - - - - - - - - - - - - - -
-
-
- -

Mes projets, études, suivis ou intérêts du moment.

-
-
- -
-
-
- Date de mise à jour de la page : 01/05/2021 -
-
- -
-
-
Un peu plus de détails sur mes compétences : - PRÉSENTATION -
-
- -
- - -
-
-
-
- -
-

PROFESSIONNEL

-
    -
  • Chargé d'études ornithologiques (et naturalistes en général) chez Synergis Environnement.
  • - -
-
-
-
- -
-

NATURALISME

-
    -
  • Suivi de la migration pré-nuptiale
  • -
  • Baguage ornithologique
  • -
  • STOC EPS
  • -
  • EPOC - ODF
  • -
-
-
-
- -
-

PROJETS

-
    -
  • Nocturnal Bird Migration
  • -
  • Silent-Cities
  • -
-
-
-
-
-
- - - - - - - - - - - - - + + + + + + + Adrien CHARBONNEAU – Naturaliste écologue + + + + + + + + + + + + + + + + + +
+
+
+ +

Mes projets, études, suivis ou intérêts du moment.

+
+
+ +
+
+
+ Date de mise à jour de la page : 01/05/2021 +
+
+ +
+
+
Un peu plus de détails sur mes compétences : - PRÉSENTATION -
+
+ +
+ + +
+
+
+
+ +
+

PROFESSIONNEL

+
    +
  • Chargé d'études ornithologiques (et naturalistes en général) chez Synergis Environnement.
  • + +
+
+
+
+ +
+

NATURALISME

+
    +
  • Suivi de la migration pré-nuptiale
  • +
  • Baguage ornithologique
  • +
  • STOC EPS
  • +
  • EPOC - ODF
  • +
+
+
+
+ +
+

PROJETS

+
    +
  • Nocturnal Bird Migration
  • +
  • Silent-Cities
  • +
+
+
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE index a58a852..c633462 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,20 @@ -Copyright (c) 2006, 2007 Advanced Micro Devices, Inc. -All rights reserved. - -Redistribution and use in any form of this material and any product thereof including software in source or binary forms, along with any related documentation, with or without modification ("this material"), is permitted provided that the following conditions are met: - - Redistributions of source code of any software must retain the above copyright notice and all terms of this license as part of the code. - - Redistributions in binary form of any software must reproduce the above copyright notice and all terms of this license in any related documentation and/or other materials. - - Neither the names nor trademarks of Advanced Micro Devices, Inc. or any copyright holders or contributors may be used to endorse or promote products derived from this material without specific prior written permission. - - Notice about U.S. Government restricted rights: This material is provided with "RESTRICTED RIGHTS." Use, duplication or disclosure by the U.S. Government is subject to the full extent of restrictions set forth in FAR52.227 and DFARS252.227 et seq., or any successor or applicable regulations. Use of this material by the U.S. Government constitutes acknowledgment of the proprietary rights of Advanced Micro Devices, Inc. and any copyright holders and contributors. - - ANY BREACH OF ANY TERM OF THIS LICENSE SHALL RESULT IN THE IMMEDIATE REVOCATION OF ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL. - -THIS MATERIAL IS PROVIDED BY ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" IN ITS CURRENT CONDITION AND WITHOUT ANY REPRESENTATIONS, GUARANTEE, OR WARRANTY OF ANY KIND OR IN ANY WAY RELATED TO SUPPORT, INDEMNITY, ERROR FREE OR UNINTERRUPTED OPERATION, OR THAT IT IS FREE FROM DEFECTS OR VIRUSES. ALL OBLIGATIONS ARE HEREBY DISCLAIMED - WHETHER EXPRESS, IMPLIED, OR STATUTORY - INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OPERABILITY, QUALITY OF SERVICE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, REVENUE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED OR BASED ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED TO THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE ENTIRE AND AGGREGATE LIABILITY OF ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT EXCEED TEN DOLLARS (US $10.00). ANYONE REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL ACCEPTS THIS ALLOCATION OF RISK AND AGREES TO RELEASE ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS FROM ANY AND ALL LIABILITIES, OBLIGATIONS, CLAIMS, OR DEMANDS IN EXCESS OF TEN DOLLARS (US $10.00). THE FOREGOING ARE ESSENTIAL TERMS OF THIS LICENSE AND, IF ANY OF THESE TERMS ARE CONSTRUED AS UNENFORCEABLE, FAIL IN ESSENTIAL PURPOSE, OR BECOME VOID OR DETRIMENTAL TO ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS FOR ANY REASON, THEN ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL SHALL TERMINATE IMMEDIATELY. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF THIS LICENSE OR ANY AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. - -NOTICE IS HEREBY PROVIDED, AND BY REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL SUCH NOTICE IS ACKNOWLEDGED, THAT THIS MATERIAL MAY BE SUBJECT TO RESTRICTIONS UNDER THE LAWS AND REGULATIONS OF THE UNITED STATES OR OTHER COUNTRIES, WHICH INCLUDE BUT ARE NOT LIMITED TO, U.S. EXPORT CONTROL LAWS SUCH AS THE EXPORT ADMINISTRATION REGULATIONS AND NATIONAL SECURITY CONTROLS AS DEFINED THEREUNDER, AS WELL AS STATE DEPARTMENT CONTROLS UNDER THE U.S. MUNITIONS LIST. THIS MATERIAL MAY NOT BE USED, RELEASED, TRANSFERRED, IMPORTED, EXPORTED AND/OR RE- EXPORTED IN ANY MANNER PROHIBITED UNDER ANY APPLICABLE LAWS, INCLUDING U.S. EXPORT CONTROL LAWS REGARDING SPECIFICALLY DESIGNATED PERSONS, COUNTRIES AND NATIONALS OF COUNTRIES SUBJECT TO NATIONAL SECURITY CONTROLS. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF ANY LICENSE OR AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. - -This license forms the entire agreement regarding the subject matter hereof and supersedes all proposals and prior discussions and writings between the parties with respect thereto. This license does not affect any ownership, rights, title, or interest in, or relating to, this material. No terms of this license can be modified or waived, and no breach of this license can be excused, unless done so in a writing signed by all affected parties. Each term of this license is separately enforceable. If any term of this license is determined to be or becomes unenforceable or illegal, such term shall be reformed to the minimum extent necessary in order for this license to remain in effect in accordance with its terms as modified by such reformation. This license shall be governed by and construed in accordance with the laws of the State of Texas without regard to rules on conflicts of law of any state or jurisdiction or the United Nations Convention on the International Sale of Goods. All disputes arising out of this license shall be subject to the jurisdiction of the federal and state courts in Austin, Texas, and all defenses are hereby waived concerning personal jurisdiction and venue of these courts. +Copyright (c) 2006, 2007 Advanced Micro Devices, Inc. +All rights reserved. + +Redistribution and use in any form of this material and any product thereof including software in source or binary forms, along with any related documentation, with or without modification ("this material"), is permitted provided that the following conditions are met: + + Redistributions of source code of any software must retain the above copyright notice and all terms of this license as part of the code. + + Redistributions in binary form of any software must reproduce the above copyright notice and all terms of this license in any related documentation and/or other materials. + + Neither the names nor trademarks of Advanced Micro Devices, Inc. or any copyright holders or contributors may be used to endorse or promote products derived from this material without specific prior written permission. + + Notice about U.S. Government restricted rights: This material is provided with "RESTRICTED RIGHTS." Use, duplication or disclosure by the U.S. Government is subject to the full extent of restrictions set forth in FAR52.227 and DFARS252.227 et seq., or any successor or applicable regulations. Use of this material by the U.S. Government constitutes acknowledgment of the proprietary rights of Advanced Micro Devices, Inc. and any copyright holders and contributors. + + ANY BREACH OF ANY TERM OF THIS LICENSE SHALL RESULT IN THE IMMEDIATE REVOCATION OF ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL. + +THIS MATERIAL IS PROVIDED BY ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" IN ITS CURRENT CONDITION AND WITHOUT ANY REPRESENTATIONS, GUARANTEE, OR WARRANTY OF ANY KIND OR IN ANY WAY RELATED TO SUPPORT, INDEMNITY, ERROR FREE OR UNINTERRUPTED OPERATION, OR THAT IT IS FREE FROM DEFECTS OR VIRUSES. ALL OBLIGATIONS ARE HEREBY DISCLAIMED - WHETHER EXPRESS, IMPLIED, OR STATUTORY - INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OPERABILITY, QUALITY OF SERVICE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, REVENUE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED OR BASED ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED TO THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE ENTIRE AND AGGREGATE LIABILITY OF ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT EXCEED TEN DOLLARS (US $10.00). ANYONE REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL ACCEPTS THIS ALLOCATION OF RISK AND AGREES TO RELEASE ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS FROM ANY AND ALL LIABILITIES, OBLIGATIONS, CLAIMS, OR DEMANDS IN EXCESS OF TEN DOLLARS (US $10.00). THE FOREGOING ARE ESSENTIAL TERMS OF THIS LICENSE AND, IF ANY OF THESE TERMS ARE CONSTRUED AS UNENFORCEABLE, FAIL IN ESSENTIAL PURPOSE, OR BECOME VOID OR DETRIMENTAL TO ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS FOR ANY REASON, THEN ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL SHALL TERMINATE IMMEDIATELY. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF THIS LICENSE OR ANY AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. + +NOTICE IS HEREBY PROVIDED, AND BY REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL SUCH NOTICE IS ACKNOWLEDGED, THAT THIS MATERIAL MAY BE SUBJECT TO RESTRICTIONS UNDER THE LAWS AND REGULATIONS OF THE UNITED STATES OR OTHER COUNTRIES, WHICH INCLUDE BUT ARE NOT LIMITED TO, U.S. EXPORT CONTROL LAWS SUCH AS THE EXPORT ADMINISTRATION REGULATIONS AND NATIONAL SECURITY CONTROLS AS DEFINED THEREUNDER, AS WELL AS STATE DEPARTMENT CONTROLS UNDER THE U.S. MUNITIONS LIST. THIS MATERIAL MAY NOT BE USED, RELEASED, TRANSFERRED, IMPORTED, EXPORTED AND/OR RE- EXPORTED IN ANY MANNER PROHIBITED UNDER ANY APPLICABLE LAWS, INCLUDING U.S. EXPORT CONTROL LAWS REGARDING SPECIFICALLY DESIGNATED PERSONS, COUNTRIES AND NATIONALS OF COUNTRIES SUBJECT TO NATIONAL SECURITY CONTROLS. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF ANY LICENSE OR AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. + +This license forms the entire agreement regarding the subject matter hereof and supersedes all proposals and prior discussions and writings between the parties with respect thereto. This license does not affect any ownership, rights, title, or interest in, or relating to, this material. No terms of this license can be modified or waived, and no breach of this license can be excused, unless done so in a writing signed by all affected parties. Each term of this license is separately enforceable. If any term of this license is determined to be or becomes unenforceable or illegal, such term shall be reformed to the minimum extent necessary in order for this license to remain in effect in accordance with its terms as modified by such reformation. This license shall be governed by and construed in accordance with the laws of the State of Texas without regard to rules on conflicts of law of any state or jurisdiction or the United Nations Convention on the International Sale of Goods. All disputes arising out of this license shall be subject to the jurisdiction of the federal and state courts in Austin, Texas, and all defenses are hereby waived concerning personal jurisdiction and venue of these courts. diff --git a/README.md b/README.md index 30b45ea..afda1f0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Code du site internet -Dépôt git du site internet https://adriencharbonneau.fr - -### Objectifs : -- **Construire un site internet statique** : son contenu ne variera pas en fonction des lecteurs, il s'agit simplement d'une unique page HTML affichant un contenu statique -- Posséder un **historique de version** (*versionning*) du site +# Code du site internet +Dépôt git du site internet https://adriencharbonneau.fr + +### Objectifs : +- **Construire un site internet statique** : son contenu ne variera pas en fonction des lecteurs, il s'agit simplement d'une unique page HTML affichant un contenu statique +- Posséder un **historique de version** (*versionning*) du site - **Code disponible** afin d'être réutilisé \ No newline at end of file diff --git a/Site-internet.Rproj b/Site-internet.Rproj index 8e3c2eb..3af27f6 100644 --- a/Site-internet.Rproj +++ b/Site-internet.Rproj @@ -1,13 +1,13 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX diff --git a/assets/css/main.css b/assets/css/main.css index 5ca7f1d..bc0f533 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -29,7 +29,7 @@ section, summary, time, mark, audio, video { } .git_color1 { - background-color: #4aca62; + background-color: #4cae4f; /* ancien #4aca62 */ } .blanc { @@ -157,7 +157,7 @@ input, select, textarea { a:hover { border-bottom-color: transparent; - color: #4ACA62 !important; + color: #4cae4f !important; } strong, b { @@ -1826,7 +1826,7 @@ input, select, textarea { } header.major h2 { - color: #4ACA62; + color: #4cae4f; font-size: 3.5em; } @@ -1889,7 +1889,7 @@ input, select, textarea { input[type="email"]:focus, select:focus, textarea:focus { - border-color: #4ACA62; + border-color: #4cae4f; } select { @@ -1994,7 +1994,7 @@ input, select, textarea { input[type="checkbox"]:focus + label:before, input[type="radio"]:focus + label:before { - border-color: #4ACA62; + border-color: #4cae4f; } input[type="checkbox"] + label:before { @@ -2453,7 +2453,7 @@ input, select, textarea { } ul.feature-icons li:before { - background: #4ACA62; + background: #4cae4f; border-radius: 100%; color: #ffffff; display: block; @@ -2669,7 +2669,7 @@ input, select, textarea { input[type="reset"].primary, input[type="button"].primary, .button.primary { - background-color: #4ACA62; + background-color: #4cae4f; color: #ffffff !important; } @@ -2765,7 +2765,7 @@ input, select, textarea { -webkit-justify-content: space-between; -ms-justify-content: space-between; justify-content: space-between; - background: #4ACA62; + background: #4cae4f; color: #d2f2e9; height: 100%; overflow-y: auto; @@ -2874,12 +2874,12 @@ input, select, textarea { #menu a:hover { background: #fff; - color: #4ACA62 !important; + color: #4cae4f !important; } #header > nav ul li a.active { background: #fff; - color: #4ACA62 !important; + color: #4cae4f !important; } #header > nav ul li:first-child { @@ -3147,7 +3147,7 @@ input, select, textarea { } #titleBar .toggle:before { - background: #4ACA62; + background: #4cae4f; color: #ffffff; content: '\f0c9'; display: block; @@ -3936,4 +3936,4 @@ input, select, textarea { .gallery article .image { background-color: rgba(0, 0, 0, 0.125); - } \ No newline at end of file + } diff --git a/assets/js-old/breakpoints.min.js b/assets/js-old/breakpoints.min.js index e20ae89..32419cc 100644 --- a/assets/js-old/breakpoints.min.js +++ b/assets/js-old/breakpoints.min.js @@ -1,2 +1,2 @@ -/* breakpoints.js v1.0 | @ajlkn | MIT licensed */ +/* breakpoints.js v1.0 | @ajlkn | MIT licensed */ var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e0:!!("ontouchstart"in window),e.mobile="wp"==e.os||"android"==e.os||"ios"==e.os||"bb"==e.os}};return e.init(),e}();!function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.browser=n()}(this,function(){return browser}); diff --git a/assets/js-old/demo.js b/assets/js-old/demo.js index efa932a..01ede5a 100644 --- a/assets/js-old/demo.js +++ b/assets/js-old/demo.js @@ -1,563 +1,563 @@ -/* - Story by HTML5 UP - html5up.net | @ajlkn - Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) - - Note: Only needed for demo purposes. Delete for production sites. -*/ - -(function($) { - - var $window = $(window); - - // Styles. - $( - '' - ).appendTo($('head')); - - // Functions. - $.fn.demo_controls = function(styles, userOptions) { - - var $this = $(this), - $styleProperty, $stylePropertyClasses, - $controls, $x, $y, $z, - options, - current, i, j, k, s, n, count; - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).demo_controls(styles, userOptions); - - return $this; - - } - - // Options. - options = $.extend({ - target: null, - palette: true - }, userOptions); - - // Controls. - if (styles) { - - $controls = $( - '' + - '' + - 'style' + - '' + (options.palette ? ', ' : ' ') + - '' + - (options.palette ? - '' + - 'scheme' + - '' + - 'default' + - 'invert' + - ', ' + - '' + - '' + - 'color' + - '' + - 'default' + - 'color1' + - 'color2' + - 'color3' + - 'color4' + - 'color5' + - 'color6' + - 'color7' + - ', ' + - '' - : '') + - '' - ); - - } - else { - - $controls = $( - '' + - (options.palette ? - '' + - 'scheme' + - '' + - 'default' + - 'invert' + - ' and ' + - '' + - '' + - 'color' + - '' + - 'default' + - 'color1' + - 'color2' + - 'color3' + - 'color4' + - 'color5' + - 'color6' + - 'color7' + - '' + - '' - : '') + - '' - ); - - } - - // Target. - switch (options.target) { - - case 'previous': - $this.prev().find('.demo-controls').replaceWith($controls); - break; - - default: - $this.find('.demo-controls').replaceWith($controls); - break; - - } - - // Styles. - if (styles) { - - $styleProperty = $controls.find('.property[data-name="style"]'); - $stylePropertyClasses = $styleProperty.children('.classes'); - - for (i in styles) { - - current = false; - count = Object.keys(styles[i]).length; - n = 1; - - // Add to style property. - $x = $(', ' + i + '') - .appendTo($stylePropertyClasses); - - if ($this.hasClass(i)) { - - $x.addClass('active'); - current = true; - - } - - // Step through properties. - for (j in styles[i]) { - - $x = $( - '' + - (n == count ? 'and ' : '') + - '' + j + '' + - '' + - '' + (n < count ? ', ' : '') + - '' - ).appendTo($controls); - - $y = $x.children('.classes'); - - if (current) - $x.addClass('active'); - - for (k in styles[i][j]) { - - $z = $(', ' + styles[i][j][k].replace('*', '') + '') - .appendTo($y); - - if (styles[i][j][k].substr(-1, 1) == '*') - $z.addClass('default'); - - if (current - && $this.hasClass(k)) - $z.addClass('active'); - - } - - n++; - - } - - } - - } - - // Events. - $controls.on('click', 'a', function(event) { - event.preventDefault(); - }); - - $controls.on('click', '.property.active', function(event) { - - var $property = $(this); - var $classes = $property.find('.classes > *'); - var $current = $classes.filter('.active'); - var $next; - - // Determine next. - if ($current.length == 0 - || $current.index() == $classes.length - 1) - $next = $classes.first(); - else - $next = $current.next(); - - // Turn on animate all. - $this.addClass('demo-animate-all'); - - // Deactivate current. - $current.removeClass('active'); - $this.removeClass($current.data('class')); - - // Activate next. - $next.addClass('active'); - $this.addClass($next.data('class')); - - // Turn off animate all. - setTimeout(function() { - $this.removeClass('demo-animate-all'); - }, 500); - - }); - - $controls.on('click', '.property[data-name="style"]', function(event) { - - var $property = $(this); - var $classes = $property.find('.classes > *'); - var $current = $classes.filter('.active'); - var $next; - - // Determine next. - if ($current.length == 0 - || $current.index() == $classes.length - 1) - $next = $classes.first(); - else - $next = $current.next(); - - // Turn on animate all. - $this.addClass('demo-animate-all'); - - // Deactivate current. - $current.removeClass('active'); - $this.removeClass($current.data('class')); - - $controls.find('.property[data-requires="' + $current.data('class') + '"]') - .removeClass('active'); - - $controls.find('.property[data-requires="' + $current.data('class') + '"] > .classes > .active').each(function() { - - $(this).removeClass('active'); - - if ($(this).data('class') != '-') - $this.removeClass($(this).data('class')); - - }); - - // Activate next. - $next.addClass('active'); - $this.addClass($next.data('class')); - - $controls.find('.property[data-requires="' + $next.data('class') + '"]') - .addClass('active'); - - $controls.find('.property[data-requires="' + $next.data('class') + '"] > .classes > .default').each(function() { - - $(this).addClass('active'); - - if ($(this).data('class') != '-') - $this.addClass($(this).data('class')); - - }); - - // Turn off animate all. - setTimeout(function() { - $this.removeClass('demo-animate-all'); - }, 500); - - }); - - }; - - // Elements. - - // Wrappers. - $('.wrapper').demo_controls(null, { - palette: true - }); - - // Banner. - $('.banner').demo_controls({ - style1: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style2: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-center': 'center*', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left', - 'content-align-center': 'center*', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style3: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style4: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'phone type': { - 'iphone': 'iphone*', - 'android': 'android' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style5: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'content alignment': { - 'content-align-left': 'left', - 'content-align-center': 'center*', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - } - }); - - // Spotlight. - $('.spotlight').demo_controls({ - style1: { - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left*', - 'image-position-center': 'center', - 'image-position-right': 'right' - } - }, - style2: { - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style3: { - 'phone type': { - 'iphone': 'iphone*', - 'android': 'android' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style4: { - 'size': { - '-size': 'normal', - 'fullscreen': 'fullscreen*', - 'halfscreen': 'halfscreen' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-center': 'center', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style5: { - 'size': { - '-size': 'normal', - 'fullscreen': 'fullscreen*', - 'halfscreen': 'halfscreen' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-center': 'center', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - }); - - // Gallery. - $('.gallery').demo_controls({ - style1: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style2: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - }, { - target: 'previous', - palette: false - }); - - // Items. - $('.items').demo_controls({ - style1: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style2: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style3: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - } - }, { - target: 'previous', - palette: false - }); - +/* + Story by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) + + Note: Only needed for demo purposes. Delete for production sites. +*/ + +(function($) { + + var $window = $(window); + + // Styles. + $( + '' + ).appendTo($('head')); + + // Functions. + $.fn.demo_controls = function(styles, userOptions) { + + var $this = $(this), + $styleProperty, $stylePropertyClasses, + $controls, $x, $y, $z, + options, + current, i, j, k, s, n, count; + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).demo_controls(styles, userOptions); + + return $this; + + } + + // Options. + options = $.extend({ + target: null, + palette: true + }, userOptions); + + // Controls. + if (styles) { + + $controls = $( + '' + + '' + + 'style' + + '' + (options.palette ? ', ' : ' ') + + '' + + (options.palette ? + '' + + 'scheme' + + '' + + 'default' + + 'invert' + + ', ' + + '' + + '' + + 'color' + + '' + + 'default' + + 'color1' + + 'color2' + + 'color3' + + 'color4' + + 'color5' + + 'color6' + + 'color7' + + ', ' + + '' + : '') + + '' + ); + + } + else { + + $controls = $( + '' + + (options.palette ? + '' + + 'scheme' + + '' + + 'default' + + 'invert' + + ' and ' + + '' + + '' + + 'color' + + '' + + 'default' + + 'color1' + + 'color2' + + 'color3' + + 'color4' + + 'color5' + + 'color6' + + 'color7' + + '' + + '' + : '') + + '' + ); + + } + + // Target. + switch (options.target) { + + case 'previous': + $this.prev().find('.demo-controls').replaceWith($controls); + break; + + default: + $this.find('.demo-controls').replaceWith($controls); + break; + + } + + // Styles. + if (styles) { + + $styleProperty = $controls.find('.property[data-name="style"]'); + $stylePropertyClasses = $styleProperty.children('.classes'); + + for (i in styles) { + + current = false; + count = Object.keys(styles[i]).length; + n = 1; + + // Add to style property. + $x = $(', ' + i + '') + .appendTo($stylePropertyClasses); + + if ($this.hasClass(i)) { + + $x.addClass('active'); + current = true; + + } + + // Step through properties. + for (j in styles[i]) { + + $x = $( + '' + + (n == count ? 'and ' : '') + + '' + j + '' + + '' + + '' + (n < count ? ', ' : '') + + '' + ).appendTo($controls); + + $y = $x.children('.classes'); + + if (current) + $x.addClass('active'); + + for (k in styles[i][j]) { + + $z = $(', ' + styles[i][j][k].replace('*', '') + '') + .appendTo($y); + + if (styles[i][j][k].substr(-1, 1) == '*') + $z.addClass('default'); + + if (current + && $this.hasClass(k)) + $z.addClass('active'); + + } + + n++; + + } + + } + + } + + // Events. + $controls.on('click', 'a', function(event) { + event.preventDefault(); + }); + + $controls.on('click', '.property.active', function(event) { + + var $property = $(this); + var $classes = $property.find('.classes > *'); + var $current = $classes.filter('.active'); + var $next; + + // Determine next. + if ($current.length == 0 + || $current.index() == $classes.length - 1) + $next = $classes.first(); + else + $next = $current.next(); + + // Turn on animate all. + $this.addClass('demo-animate-all'); + + // Deactivate current. + $current.removeClass('active'); + $this.removeClass($current.data('class')); + + // Activate next. + $next.addClass('active'); + $this.addClass($next.data('class')); + + // Turn off animate all. + setTimeout(function() { + $this.removeClass('demo-animate-all'); + }, 500); + + }); + + $controls.on('click', '.property[data-name="style"]', function(event) { + + var $property = $(this); + var $classes = $property.find('.classes > *'); + var $current = $classes.filter('.active'); + var $next; + + // Determine next. + if ($current.length == 0 + || $current.index() == $classes.length - 1) + $next = $classes.first(); + else + $next = $current.next(); + + // Turn on animate all. + $this.addClass('demo-animate-all'); + + // Deactivate current. + $current.removeClass('active'); + $this.removeClass($current.data('class')); + + $controls.find('.property[data-requires="' + $current.data('class') + '"]') + .removeClass('active'); + + $controls.find('.property[data-requires="' + $current.data('class') + '"] > .classes > .active').each(function() { + + $(this).removeClass('active'); + + if ($(this).data('class') != '-') + $this.removeClass($(this).data('class')); + + }); + + // Activate next. + $next.addClass('active'); + $this.addClass($next.data('class')); + + $controls.find('.property[data-requires="' + $next.data('class') + '"]') + .addClass('active'); + + $controls.find('.property[data-requires="' + $next.data('class') + '"] > .classes > .default').each(function() { + + $(this).addClass('active'); + + if ($(this).data('class') != '-') + $this.addClass($(this).data('class')); + + }); + + // Turn off animate all. + setTimeout(function() { + $this.removeClass('demo-animate-all'); + }, 500); + + }); + + }; + + // Elements. + + // Wrappers. + $('.wrapper').demo_controls(null, { + palette: true + }); + + // Banner. + $('.banner').demo_controls({ + style1: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style2: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-center': 'center*', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left', + 'content-align-center': 'center*', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style3: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style4: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'phone type': { + 'iphone': 'iphone*', + 'android': 'android' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style5: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'content alignment': { + 'content-align-left': 'left', + 'content-align-center': 'center*', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + } + }); + + // Spotlight. + $('.spotlight').demo_controls({ + style1: { + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left*', + 'image-position-center': 'center', + 'image-position-right': 'right' + } + }, + style2: { + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style3: { + 'phone type': { + 'iphone': 'iphone*', + 'android': 'android' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style4: { + 'size': { + '-size': 'normal', + 'fullscreen': 'fullscreen*', + 'halfscreen': 'halfscreen' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-center': 'center', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style5: { + 'size': { + '-size': 'normal', + 'fullscreen': 'fullscreen*', + 'halfscreen': 'halfscreen' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-center': 'center', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + }); + + // Gallery. + $('.gallery').demo_controls({ + style1: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style2: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + }, { + target: 'previous', + palette: false + }); + + // Items. + $('.items').demo_controls({ + style1: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style2: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style3: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + } + }, { + target: 'previous', + palette: false + }); + })(jQuery); \ No newline at end of file diff --git a/assets/js-old/jquery.scrollex.min.js b/assets/js-old/jquery.scrollex.min.js index c511a5c..a4727fe 100644 --- a/assets/js-old/jquery.scrollex.min.js +++ b/assets/js-old/jquery.scrollex.min.js @@ -1,2 +1,2 @@ -/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ +/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ !function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n1){for(o=0;o $window.height()) - $x.css('height', 'auto'); - else - $x.css('height', '100vh'); - - }, 250); - - }).triggerHandler('resize.flexbox-fix'); - - })(); - - // Object fit workaround. - if (!browser.canUse('object-fit')) - (function() { - - $('.banner .image, .spotlight .image').each(function() { - - var $this = $(this), - $img = $this.children('img'), - positionClass = $this.parent().attr('class').match(/image-position-([a-z]+)/); - - // Set image. - $this - .css('background-image', 'url("' + $img.attr('src') + '")') - .css('background-repeat', 'no-repeat') - .css('background-size', 'cover'); - - // Set position. - switch (positionClass.length > 1 ? positionClass[1] : '') { - - case 'left': - $this.css('background-position', 'left'); - break; - - case 'right': - $this.css('background-position', 'right'); - break; - - default: - case 'center': - $this.css('background-position', 'center'); - break; - - } - - // Hide original. - $img.css('opacity', '0'); - - }); - - })(); - - // Smooth scroll. - $('.smooth-scroll').scrolly(); - $('.smooth-scroll-middle').scrolly({ anchor: 'middle' }); - - // Wrapper. - $wrapper.children() - .scrollex({ - top: '30vh', - bottom: '30vh', - initialize: function() { - $(this).addClass('is-inactive'); - }, - terminate: function() { - $(this).removeClass('is-inactive'); - }, - enter: function() { - $(this).removeClass('is-inactive'); - }, - leave: function() { - - var $this = $(this); - - if ($this.hasClass('onscroll-bidirectional')) - $this.addClass('is-inactive'); - - } - }); - - // Items. - $('.items') - .scrollex({ - top: '30vh', - bottom: '30vh', - delay: 50, - initialize: function() { - $(this).addClass('is-inactive'); - }, - terminate: function() { - $(this).removeClass('is-inactive'); - }, - enter: function() { - $(this).removeClass('is-inactive'); - }, - leave: function() { - - var $this = $(this); - - if ($this.hasClass('onscroll-bidirectional')) - $this.addClass('is-inactive'); - - } - }) - .children() - .wrapInner('
'); - - // Gallery. - $('.gallery') - .wrapInner('
') - .prepend(browser.mobile ? '' : '
') - .scrollex({ - top: '30vh', - bottom: '30vh', - delay: 50, - initialize: function() { - $(this).addClass('is-inactive'); - }, - terminate: function() { - $(this).removeClass('is-inactive'); - }, - enter: function() { - $(this).removeClass('is-inactive'); - }, - leave: function() { - - var $this = $(this); - - if ($this.hasClass('onscroll-bidirectional')) - $this.addClass('is-inactive'); - - } - }) - .children('.inner') - //.css('overflow', 'hidden') - .css('overflow-y', browser.mobile ? 'visible' : 'hidden') - .css('overflow-x', browser.mobile ? 'scroll' : 'hidden') - .scrollLeft(0); - - // Style #1. - // ... - - // Style #2. - $('.gallery') - .on('wheel', '.inner', function(event) { - - var $this = $(this), - delta = (event.originalEvent.deltaX * 10); - - // Cap delta. - if (delta > 0) - delta = Math.min(25, delta); - else if (delta < 0) - delta = Math.max(-25, delta); - - // Scroll. - $this.scrollLeft( $this.scrollLeft() + delta ); - - }) - .on('mouseenter', '.forward, .backward', function(event) { - - var $this = $(this), - $inner = $this.siblings('.inner'), - direction = ($this.hasClass('forward') ? 1 : -1); - - // Clear move interval. - clearInterval(this._gallery_moveIntervalId); - - // Start interval. - this._gallery_moveIntervalId = setInterval(function() { - $inner.scrollLeft( $inner.scrollLeft() + (5 * direction) ); - }, 10); - - }) - .on('mouseleave', '.forward, .backward', function(event) { - - // Clear move interval. - clearInterval(this._gallery_moveIntervalId); - - }); - - // Lightbox. - $('.gallery.lightbox') - .on('click', 'a', function(event) { - - var $a = $(this), - $gallery = $a.parents('.gallery'), - $modal = $gallery.children('.modal'), - $modalImg = $modal.find('img'), - href = $a.attr('href'); - - // Not an image? Bail. - if (!href.match(/\.(jpg|gif|png|mp4)$/)) - return; - - // Prevent default. - event.preventDefault(); - event.stopPropagation(); - - // Locked? Bail. - if ($modal[0]._locked) - return; - - // Lock. - $modal[0]._locked = true; - - // Set src. - $modalImg.attr('src', href); - - // Set visible. - $modal.addClass('visible'); - - // Focus. - $modal.focus(); - - // Delay. - setTimeout(function() { - - // Unlock. - $modal[0]._locked = false; - - }, 600); - - }) - .on('click', '.modal', function(event) { - - var $modal = $(this), - $modalImg = $modal.find('img'); - - // Locked? Bail. - if ($modal[0]._locked) - return; - - // Already hidden? Bail. - if (!$modal.hasClass('visible')) - return; - - // Lock. - $modal[0]._locked = true; - - // Clear visible, loaded. - $modal - .removeClass('loaded') - - // Delay. - setTimeout(function() { - - $modal - .removeClass('visible') - - setTimeout(function() { - - // Clear src. - $modalImg.attr('src', ''); - - // Unlock. - $modal[0]._locked = false; - - // Focus. - $body.focus(); - - }, 475); - - }, 125); - - }) - .on('keypress', '.modal', function(event) { - - var $modal = $(this); - - // Escape? Hide modal. - if (event.keyCode == 27) - $modal.trigger('click'); - - }) - .prepend('') - .find('img') - .on('load', function(event) { - - var $modalImg = $(this), - $modal = $modalImg.parents('.modal'); - - setTimeout(function() { - - // No longer visible? Bail. - if (!$modal.hasClass('visible')) - return; - - // Set loaded. - $modal.addClass('loaded'); - - }, 275); - - }); - +/* + Story by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +(function($) { + + var $window = $(window), + $body = $('body'), + $wrapper = $('#wrapper'); + + // Breakpoints. + breakpoints({ + xlarge: [ '1281px', '1680px' ], + large: [ '981px', '1280px' ], + medium: [ '737px', '980px' ], + small: [ '481px', '736px' ], + xsmall: [ '361px', '480px' ], + xxsmall: [ null, '360px' ] + }); + + // Play initial animations on page load. + $window.on('load', function() { + window.setTimeout(function() { + $body.removeClass('is-preload'); + }, 100); + }); + + // Browser fixes. + + // IE: Flexbox min-height bug. + if (browser.name == 'ie') + (function() { + + var flexboxFixTimeoutId; + + $window.on('resize.flexbox-fix', function() { + + var $x = $('.fullscreen'); + + clearTimeout(flexboxFixTimeoutId); + + flexboxFixTimeoutId = setTimeout(function() { + + if ($x.prop('scrollHeight') > $window.height()) + $x.css('height', 'auto'); + else + $x.css('height', '100vh'); + + }, 250); + + }).triggerHandler('resize.flexbox-fix'); + + })(); + + // Object fit workaround. + if (!browser.canUse('object-fit')) + (function() { + + $('.banner .image, .spotlight .image').each(function() { + + var $this = $(this), + $img = $this.children('img'), + positionClass = $this.parent().attr('class').match(/image-position-([a-z]+)/); + + // Set image. + $this + .css('background-image', 'url("' + $img.attr('src') + '")') + .css('background-repeat', 'no-repeat') + .css('background-size', 'cover'); + + // Set position. + switch (positionClass.length > 1 ? positionClass[1] : '') { + + case 'left': + $this.css('background-position', 'left'); + break; + + case 'right': + $this.css('background-position', 'right'); + break; + + default: + case 'center': + $this.css('background-position', 'center'); + break; + + } + + // Hide original. + $img.css('opacity', '0'); + + }); + + })(); + + // Smooth scroll. + $('.smooth-scroll').scrolly(); + $('.smooth-scroll-middle').scrolly({ anchor: 'middle' }); + + // Wrapper. + $wrapper.children() + .scrollex({ + top: '30vh', + bottom: '30vh', + initialize: function() { + $(this).addClass('is-inactive'); + }, + terminate: function() { + $(this).removeClass('is-inactive'); + }, + enter: function() { + $(this).removeClass('is-inactive'); + }, + leave: function() { + + var $this = $(this); + + if ($this.hasClass('onscroll-bidirectional')) + $this.addClass('is-inactive'); + + } + }); + + // Items. + $('.items') + .scrollex({ + top: '30vh', + bottom: '30vh', + delay: 50, + initialize: function() { + $(this).addClass('is-inactive'); + }, + terminate: function() { + $(this).removeClass('is-inactive'); + }, + enter: function() { + $(this).removeClass('is-inactive'); + }, + leave: function() { + + var $this = $(this); + + if ($this.hasClass('onscroll-bidirectional')) + $this.addClass('is-inactive'); + + } + }) + .children() + .wrapInner('
'); + + // Gallery. + $('.gallery') + .wrapInner('
') + .prepend(browser.mobile ? '' : '
') + .scrollex({ + top: '30vh', + bottom: '30vh', + delay: 50, + initialize: function() { + $(this).addClass('is-inactive'); + }, + terminate: function() { + $(this).removeClass('is-inactive'); + }, + enter: function() { + $(this).removeClass('is-inactive'); + }, + leave: function() { + + var $this = $(this); + + if ($this.hasClass('onscroll-bidirectional')) + $this.addClass('is-inactive'); + + } + }) + .children('.inner') + //.css('overflow', 'hidden') + .css('overflow-y', browser.mobile ? 'visible' : 'hidden') + .css('overflow-x', browser.mobile ? 'scroll' : 'hidden') + .scrollLeft(0); + + // Style #1. + // ... + + // Style #2. + $('.gallery') + .on('wheel', '.inner', function(event) { + + var $this = $(this), + delta = (event.originalEvent.deltaX * 10); + + // Cap delta. + if (delta > 0) + delta = Math.min(25, delta); + else if (delta < 0) + delta = Math.max(-25, delta); + + // Scroll. + $this.scrollLeft( $this.scrollLeft() + delta ); + + }) + .on('mouseenter', '.forward, .backward', function(event) { + + var $this = $(this), + $inner = $this.siblings('.inner'), + direction = ($this.hasClass('forward') ? 1 : -1); + + // Clear move interval. + clearInterval(this._gallery_moveIntervalId); + + // Start interval. + this._gallery_moveIntervalId = setInterval(function() { + $inner.scrollLeft( $inner.scrollLeft() + (5 * direction) ); + }, 10); + + }) + .on('mouseleave', '.forward, .backward', function(event) { + + // Clear move interval. + clearInterval(this._gallery_moveIntervalId); + + }); + + // Lightbox. + $('.gallery.lightbox') + .on('click', 'a', function(event) { + + var $a = $(this), + $gallery = $a.parents('.gallery'), + $modal = $gallery.children('.modal'), + $modalImg = $modal.find('img'), + href = $a.attr('href'); + + // Not an image? Bail. + if (!href.match(/\.(jpg|gif|png|mp4)$/)) + return; + + // Prevent default. + event.preventDefault(); + event.stopPropagation(); + + // Locked? Bail. + if ($modal[0]._locked) + return; + + // Lock. + $modal[0]._locked = true; + + // Set src. + $modalImg.attr('src', href); + + // Set visible. + $modal.addClass('visible'); + + // Focus. + $modal.focus(); + + // Delay. + setTimeout(function() { + + // Unlock. + $modal[0]._locked = false; + + }, 600); + + }) + .on('click', '.modal', function(event) { + + var $modal = $(this), + $modalImg = $modal.find('img'); + + // Locked? Bail. + if ($modal[0]._locked) + return; + + // Already hidden? Bail. + if (!$modal.hasClass('visible')) + return; + + // Lock. + $modal[0]._locked = true; + + // Clear visible, loaded. + $modal + .removeClass('loaded') + + // Delay. + setTimeout(function() { + + $modal + .removeClass('visible') + + setTimeout(function() { + + // Clear src. + $modalImg.attr('src', ''); + + // Unlock. + $modal[0]._locked = false; + + // Focus. + $body.focus(); + + }, 475); + + }, 125); + + }) + .on('keypress', '.modal', function(event) { + + var $modal = $(this); + + // Escape? Hide modal. + if (event.keyCode == 27) + $modal.trigger('click'); + + }) + .prepend('') + .find('img') + .on('load', function(event) { + + var $modalImg = $(this), + $modal = $modalImg.parents('.modal'); + + setTimeout(function() { + + // No longer visible? Bail. + if (!$modal.hasClass('visible')) + return; + + // Set loaded. + $modal.addClass('loaded'); + + }, 275); + + }); + })(jQuery); \ No newline at end of file diff --git a/assets/js-old/util.js b/assets/js-old/util.js index ecf7b37..bdb8e9f 100644 --- a/assets/js-old/util.js +++ b/assets/js-old/util.js @@ -1,587 +1,587 @@ -(function($) { - - /** - * Generate an indented list of links from a nav. Meant for use with panel(). - * @return {jQuery} jQuery object. - */ - $.fn.navList = function() { - - var $this = $(this); - $a = $this.find('a'), - b = []; - - $a.each(function() { - - var $this = $(this), - indent = Math.max(0, $this.parents('li').length - 1), - href = $this.attr('href'), - target = $this.attr('target'); - - b.push( - '' + - '' + - $this.text() + - '' - ); - - }); - - return b.join(''); - - }; - - /** - * Panel-ify an element. - * @param {object} userConfig User config. - * @return {jQuery} jQuery object. - */ - $.fn.panel = function(userConfig) { - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).panel(userConfig); - - return $this; - - } - - // Vars. - var $this = $(this), - $body = $('body'), - $window = $(window), - id = $this.attr('id'), - config; - - // Config. - config = $.extend({ - - // Delay. - delay: 0, - - // Hide panel on link click. - hideOnClick: false, - - // Hide panel on escape keypress. - hideOnEscape: false, - - // Hide panel on swipe. - hideOnSwipe: false, - - // Reset scroll position on hide. - resetScroll: false, - - // Reset forms on hide. - resetForms: false, - - // Side of viewport the panel will appear. - side: null, - - // Target element for "class". - target: $this, - - // Class to toggle. - visibleClass: 'visible' - - }, userConfig); - - // Expand "target" if it's not a jQuery object already. - if (typeof config.target != 'jQuery') - config.target = $(config.target); - - // Panel. - - // Methods. - $this._hide = function(event) { - - // Already hidden? Bail. - if (!config.target.hasClass(config.visibleClass)) - return; - - // If an event was provided, cancel it. - if (event) { - - event.preventDefault(); - event.stopPropagation(); - - } - - // Hide. - config.target.removeClass(config.visibleClass); - - // Post-hide stuff. - window.setTimeout(function() { - - // Reset scroll position. - if (config.resetScroll) - $this.scrollTop(0); - - // Reset forms. - if (config.resetForms) - $this.find('form').each(function() { - this.reset(); - }); - - }, config.delay); - - }; - - // Vendor fixes. - $this - .css('-ms-overflow-style', '-ms-autohiding-scrollbar') - .css('-webkit-overflow-scrolling', 'touch'); - - // Hide on click. - if (config.hideOnClick) { - - $this.find('a') - .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); - - $this - .on('click', 'a', function(event) { - - var $a = $(this), - href = $a.attr('href'), - target = $a.attr('target'); - - if (!href || href == '#' || href == '' || href == '#' + id) - return; - - // Cancel original event. - event.preventDefault(); - event.stopPropagation(); - - // Hide panel. - $this._hide(); - - // Redirect to href. - window.setTimeout(function() { - - if (target == '_blank') - window.open(href); - else - window.location.href = href; - - }, config.delay + 10); - - }); - - } - - // Event: Touch stuff. - $this.on('touchstart', function(event) { - - $this.touchPosX = event.originalEvent.touches[0].pageX; - $this.touchPosY = event.originalEvent.touches[0].pageY; - - }) - - $this.on('touchmove', function(event) { - - if ($this.touchPosX === null - || $this.touchPosY === null) - return; - - var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, - diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, - th = $this.outerHeight(), - ts = ($this.get(0).scrollHeight - $this.scrollTop()); - - // Hide on swipe? - if (config.hideOnSwipe) { - - var result = false, - boundary = 20, - delta = 50; - - switch (config.side) { - - case 'left': - result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); - break; - - case 'right': - result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); - break; - - case 'top': - result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); - break; - - case 'bottom': - result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); - break; - - default: - break; - - } - - if (result) { - - $this.touchPosX = null; - $this.touchPosY = null; - $this._hide(); - - return false; - - } - - } - - // Prevent vertical scrolling past the top or bottom. - if (($this.scrollTop() < 0 && diffY < 0) - || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { - - event.preventDefault(); - event.stopPropagation(); - - } - - }); - - // Event: Prevent certain events inside the panel from bubbling. - $this.on('click touchend touchstart touchmove', function(event) { - event.stopPropagation(); - }); - - // Event: Hide panel if a child anchor tag pointing to its ID is clicked. - $this.on('click', 'a[href="#' + id + '"]', function(event) { - - event.preventDefault(); - event.stopPropagation(); - - config.target.removeClass(config.visibleClass); - - }); - - // Body. - - // Event: Hide panel on body click/tap. - $body.on('click touchend', function(event) { - $this._hide(event); - }); - - // Event: Toggle. - $body.on('click', 'a[href="#' + id + '"]', function(event) { - - event.preventDefault(); - event.stopPropagation(); - - config.target.toggleClass(config.visibleClass); - - }); - - // Window. - - // Event: Hide on ESC. - if (config.hideOnEscape) - $window.on('keydown', function(event) { - - if (event.keyCode == 27) - $this._hide(event); - - }); - - return $this; - - }; - - /** - * Apply "placeholder" attribute polyfill to one or more forms. - * @return {jQuery} jQuery object. - */ - $.fn.placeholder = function() { - - // Browser natively supports placeholders? Bail. - if (typeof (document.createElement('input')).placeholder != 'undefined') - return $(this); - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).placeholder(); - - return $this; - - } - - // Vars. - var $this = $(this); - - // Text, TextArea. - $this.find('input[type=text],textarea') - .each(function() { - - var i = $(this); - - if (i.val() == '' - || i.val() == i.attr('placeholder')) - i - .addClass('polyfill-placeholder') - .val(i.attr('placeholder')); - - }) - .on('blur', function() { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - return; - - if (i.val() == '') - i - .addClass('polyfill-placeholder') - .val(i.attr('placeholder')); - - }) - .on('focus', function() { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - return; - - if (i.val() == i.attr('placeholder')) - i - .removeClass('polyfill-placeholder') - .val(''); - - }); - - // Password. - $this.find('input[type=password]') - .each(function() { - - var i = $(this); - var x = $( - $('
') - .append(i.clone()) - .remove() - .html() - .replace(/type="password"/i, 'type="text"') - .replace(/type=password/i, 'type=text') - ); - - if (i.attr('id') != '') - x.attr('id', i.attr('id') + '-polyfill-field'); - - if (i.attr('name') != '') - x.attr('name', i.attr('name') + '-polyfill-field'); - - x.addClass('polyfill-placeholder') - .val(x.attr('placeholder')).insertAfter(i); - - if (i.val() == '') - i.hide(); - else - x.hide(); - - i - .on('blur', function(event) { - - event.preventDefault(); - - var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); - - if (i.val() == '') { - - i.hide(); - x.show(); - - } - - }); - - x - .on('focus', function(event) { - - event.preventDefault(); - - var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); - - x.hide(); - - i - .show() - .focus(); - - }) - .on('keypress', function(event) { - - event.preventDefault(); - x.val(''); - - }); - - }); - - // Events. - $this - .on('submit', function() { - - $this.find('input[type=text],input[type=password],textarea') - .each(function(event) { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - i.attr('name', ''); - - if (i.val() == i.attr('placeholder')) { - - i.removeClass('polyfill-placeholder'); - i.val(''); - - } - - }); - - }) - .on('reset', function(event) { - - event.preventDefault(); - - $this.find('select') - .val($('option:first').val()); - - $this.find('input,textarea') - .each(function() { - - var i = $(this), - x; - - i.removeClass('polyfill-placeholder'); - - switch (this.type) { - - case 'submit': - case 'reset': - break; - - case 'password': - i.val(i.attr('defaultValue')); - - x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); - - if (i.val() == '') { - i.hide(); - x.show(); - } - else { - i.show(); - x.hide(); - } - - break; - - case 'checkbox': - case 'radio': - i.attr('checked', i.attr('defaultValue')); - break; - - case 'text': - case 'textarea': - i.val(i.attr('defaultValue')); - - if (i.val() == '') { - i.addClass('polyfill-placeholder'); - i.val(i.attr('placeholder')); - } - - break; - - default: - i.val(i.attr('defaultValue')); - break; - - } - }); - - }); - - return $this; - - }; - - /** - * Moves elements to/from the first positions of their respective parents. - * @param {jQuery} $elements Elements (or selector) to move. - * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. - */ - $.prioritize = function($elements, condition) { - - var key = '__prioritize'; - - // Expand $elements if it's not already a jQuery object. - if (typeof $elements != 'jQuery') - $elements = $($elements); - - // Step through elements. - $elements.each(function() { - - var $e = $(this), $p, - $parent = $e.parent(); - - // No parent? Bail. - if ($parent.length == 0) - return; - - // Not moved? Move it. - if (!$e.data(key)) { - - // Condition is false? Bail. - if (!condition) - return; - - // Get placeholder (which will serve as our point of reference for when this element needs to move back). - $p = $e.prev(); - - // Couldn't find anything? Means this element's already at the top, so bail. - if ($p.length == 0) - return; - - // Move element to top of parent. - $e.prependTo($parent); - - // Mark element as moved. - $e.data(key, $p); - - } - - // Moved already? - else { - - // Condition is true? Bail. - if (condition) - return; - - $p = $e.data(key); - - // Move element back to its original location (using our placeholder). - $e.insertAfter($p); - - // Unmark element as moved. - $e.removeData(key); - - } - - }); - - }; - +(function($) { + + /** + * Generate an indented list of links from a nav. Meant for use with panel(). + * @return {jQuery} jQuery object. + */ + $.fn.navList = function() { + + var $this = $(this); + $a = $this.find('a'), + b = []; + + $a.each(function() { + + var $this = $(this), + indent = Math.max(0, $this.parents('li').length - 1), + href = $this.attr('href'), + target = $this.attr('target'); + + b.push( + '' + + '' + + $this.text() + + '' + ); + + }); + + return b.join(''); + + }; + + /** + * Panel-ify an element. + * @param {object} userConfig User config. + * @return {jQuery} jQuery object. + */ + $.fn.panel = function(userConfig) { + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).panel(userConfig); + + return $this; + + } + + // Vars. + var $this = $(this), + $body = $('body'), + $window = $(window), + id = $this.attr('id'), + config; + + // Config. + config = $.extend({ + + // Delay. + delay: 0, + + // Hide panel on link click. + hideOnClick: false, + + // Hide panel on escape keypress. + hideOnEscape: false, + + // Hide panel on swipe. + hideOnSwipe: false, + + // Reset scroll position on hide. + resetScroll: false, + + // Reset forms on hide. + resetForms: false, + + // Side of viewport the panel will appear. + side: null, + + // Target element for "class". + target: $this, + + // Class to toggle. + visibleClass: 'visible' + + }, userConfig); + + // Expand "target" if it's not a jQuery object already. + if (typeof config.target != 'jQuery') + config.target = $(config.target); + + // Panel. + + // Methods. + $this._hide = function(event) { + + // Already hidden? Bail. + if (!config.target.hasClass(config.visibleClass)) + return; + + // If an event was provided, cancel it. + if (event) { + + event.preventDefault(); + event.stopPropagation(); + + } + + // Hide. + config.target.removeClass(config.visibleClass); + + // Post-hide stuff. + window.setTimeout(function() { + + // Reset scroll position. + if (config.resetScroll) + $this.scrollTop(0); + + // Reset forms. + if (config.resetForms) + $this.find('form').each(function() { + this.reset(); + }); + + }, config.delay); + + }; + + // Vendor fixes. + $this + .css('-ms-overflow-style', '-ms-autohiding-scrollbar') + .css('-webkit-overflow-scrolling', 'touch'); + + // Hide on click. + if (config.hideOnClick) { + + $this.find('a') + .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); + + $this + .on('click', 'a', function(event) { + + var $a = $(this), + href = $a.attr('href'), + target = $a.attr('target'); + + if (!href || href == '#' || href == '' || href == '#' + id) + return; + + // Cancel original event. + event.preventDefault(); + event.stopPropagation(); + + // Hide panel. + $this._hide(); + + // Redirect to href. + window.setTimeout(function() { + + if (target == '_blank') + window.open(href); + else + window.location.href = href; + + }, config.delay + 10); + + }); + + } + + // Event: Touch stuff. + $this.on('touchstart', function(event) { + + $this.touchPosX = event.originalEvent.touches[0].pageX; + $this.touchPosY = event.originalEvent.touches[0].pageY; + + }) + + $this.on('touchmove', function(event) { + + if ($this.touchPosX === null + || $this.touchPosY === null) + return; + + var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, + diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, + th = $this.outerHeight(), + ts = ($this.get(0).scrollHeight - $this.scrollTop()); + + // Hide on swipe? + if (config.hideOnSwipe) { + + var result = false, + boundary = 20, + delta = 50; + + switch (config.side) { + + case 'left': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); + break; + + case 'right': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); + break; + + case 'top': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); + break; + + case 'bottom': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); + break; + + default: + break; + + } + + if (result) { + + $this.touchPosX = null; + $this.touchPosY = null; + $this._hide(); + + return false; + + } + + } + + // Prevent vertical scrolling past the top or bottom. + if (($this.scrollTop() < 0 && diffY < 0) + || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { + + event.preventDefault(); + event.stopPropagation(); + + } + + }); + + // Event: Prevent certain events inside the panel from bubbling. + $this.on('click touchend touchstart touchmove', function(event) { + event.stopPropagation(); + }); + + // Event: Hide panel if a child anchor tag pointing to its ID is clicked. + $this.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.removeClass(config.visibleClass); + + }); + + // Body. + + // Event: Hide panel on body click/tap. + $body.on('click touchend', function(event) { + $this._hide(event); + }); + + // Event: Toggle. + $body.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.toggleClass(config.visibleClass); + + }); + + // Window. + + // Event: Hide on ESC. + if (config.hideOnEscape) + $window.on('keydown', function(event) { + + if (event.keyCode == 27) + $this._hide(event); + + }); + + return $this; + + }; + + /** + * Apply "placeholder" attribute polyfill to one or more forms. + * @return {jQuery} jQuery object. + */ + $.fn.placeholder = function() { + + // Browser natively supports placeholders? Bail. + if (typeof (document.createElement('input')).placeholder != 'undefined') + return $(this); + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).placeholder(); + + return $this; + + } + + // Vars. + var $this = $(this); + + // Text, TextArea. + $this.find('input[type=text],textarea') + .each(function() { + + var i = $(this); + + if (i.val() == '' + || i.val() == i.attr('placeholder')) + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('blur', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == '') + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('focus', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == i.attr('placeholder')) + i + .removeClass('polyfill-placeholder') + .val(''); + + }); + + // Password. + $this.find('input[type=password]') + .each(function() { + + var i = $(this); + var x = $( + $('
') + .append(i.clone()) + .remove() + .html() + .replace(/type="password"/i, 'type="text"') + .replace(/type=password/i, 'type=text') + ); + + if (i.attr('id') != '') + x.attr('id', i.attr('id') + '-polyfill-field'); + + if (i.attr('name') != '') + x.attr('name', i.attr('name') + '-polyfill-field'); + + x.addClass('polyfill-placeholder') + .val(x.attr('placeholder')).insertAfter(i); + + if (i.val() == '') + i.hide(); + else + x.hide(); + + i + .on('blur', function(event) { + + event.preventDefault(); + + var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + + i.hide(); + x.show(); + + } + + }); + + x + .on('focus', function(event) { + + event.preventDefault(); + + var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); + + x.hide(); + + i + .show() + .focus(); + + }) + .on('keypress', function(event) { + + event.preventDefault(); + x.val(''); + + }); + + }); + + // Events. + $this + .on('submit', function() { + + $this.find('input[type=text],input[type=password],textarea') + .each(function(event) { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + i.attr('name', ''); + + if (i.val() == i.attr('placeholder')) { + + i.removeClass('polyfill-placeholder'); + i.val(''); + + } + + }); + + }) + .on('reset', function(event) { + + event.preventDefault(); + + $this.find('select') + .val($('option:first').val()); + + $this.find('input,textarea') + .each(function() { + + var i = $(this), + x; + + i.removeClass('polyfill-placeholder'); + + switch (this.type) { + + case 'submit': + case 'reset': + break; + + case 'password': + i.val(i.attr('defaultValue')); + + x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + i.hide(); + x.show(); + } + else { + i.show(); + x.hide(); + } + + break; + + case 'checkbox': + case 'radio': + i.attr('checked', i.attr('defaultValue')); + break; + + case 'text': + case 'textarea': + i.val(i.attr('defaultValue')); + + if (i.val() == '') { + i.addClass('polyfill-placeholder'); + i.val(i.attr('placeholder')); + } + + break; + + default: + i.val(i.attr('defaultValue')); + break; + + } + }); + + }); + + return $this; + + }; + + /** + * Moves elements to/from the first positions of their respective parents. + * @param {jQuery} $elements Elements (or selector) to move. + * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. + */ + $.prioritize = function($elements, condition) { + + var key = '__prioritize'; + + // Expand $elements if it's not already a jQuery object. + if (typeof $elements != 'jQuery') + $elements = $($elements); + + // Step through elements. + $elements.each(function() { + + var $e = $(this), $p, + $parent = $e.parent(); + + // No parent? Bail. + if ($parent.length == 0) + return; + + // Not moved? Move it. + if (!$e.data(key)) { + + // Condition is false? Bail. + if (!condition) + return; + + // Get placeholder (which will serve as our point of reference for when this element needs to move back). + $p = $e.prev(); + + // Couldn't find anything? Means this element's already at the top, so bail. + if ($p.length == 0) + return; + + // Move element to top of parent. + $e.prependTo($parent); + + // Mark element as moved. + $e.data(key, $p); + + } + + // Moved already? + else { + + // Condition is true? Bail. + if (condition) + return; + + $p = $e.data(key); + + // Move element back to its original location (using our placeholder). + $e.insertAfter($p); + + // Unmark element as moved. + $e.removeData(key); + + } + + }); + + }; + })(jQuery); \ No newline at end of file diff --git a/assets/js/breakpoints.min.js b/assets/js/breakpoints.min.js index e20ae89..32419cc 100644 --- a/assets/js/breakpoints.min.js +++ b/assets/js/breakpoints.min.js @@ -1,2 +1,2 @@ -/* breakpoints.js v1.0 | @ajlkn | MIT licensed */ +/* breakpoints.js v1.0 | @ajlkn | MIT licensed */ var breakpoints=function(){"use strict";function e(e){t.init(e)}var t={list:null,media:{},events:[],init:function(e){t.list=e,window.addEventListener("resize",t.poll),window.addEventListener("orientationchange",t.poll),window.addEventListener("load",t.poll),window.addEventListener("fullscreenchange",t.poll)},active:function(e){var n,a,s,i,r,d,c;if(!(e in t.media)){if(">="==e.substr(0,2)?(a="gte",n=e.substr(2)):"<="==e.substr(0,2)?(a="lte",n=e.substr(2)):">"==e.substr(0,1)?(a="gt",n=e.substr(1)):"<"==e.substr(0,1)?(a="lt",n=e.substr(1)):"!"==e.substr(0,1)?(a="not",n=e.substr(1)):(a="eq",n=e),n&&n in t.list)if(i=t.list[n],Array.isArray(i)){if(r=parseInt(i[0]),d=parseInt(i[1]),isNaN(r)){if(isNaN(d))return;c=i[1].substr(String(d).length)}else c=i[0].substr(String(r).length);if(isNaN(r))switch(a){case"gte":s="screen";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: -1px)";break;case"not":s="screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (max-width: "+d+c+")"}else if(isNaN(d))switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen";break;case"gt":s="screen and (max-width: -1px)";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+")";break;default:s="screen and (min-width: "+r+c+")"}else switch(a){case"gte":s="screen and (min-width: "+r+c+")";break;case"lte":s="screen and (max-width: "+d+c+")";break;case"gt":s="screen and (min-width: "+(d+1)+c+")";break;case"lt":s="screen and (max-width: "+(r-1)+c+")";break;case"not":s="screen and (max-width: "+(r-1)+c+"), screen and (min-width: "+(d+1)+c+")";break;default:s="screen and (min-width: "+r+c+") and (max-width: "+d+c+")"}}else s="("==i.charAt(0)?"screen and "+i:i;t.media[e]=!!s&&s}return t.media[e]!==!1&&window.matchMedia(t.media[e]).matches},on:function(e,n){t.events.push({query:e,handler:n,state:!1}),t.active(e)&&n()},poll:function(){var e,n;for(e=0;e0:!!("ontouchstart"in window),e.mobile="wp"==e.os||"android"==e.os||"ios"==e.os||"bb"==e.os}};return e.init(),e}();!function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?module.exports=n():e.browser=n()}(this,function(){return browser}); diff --git a/assets/js/demo.js b/assets/js/demo.js index efa932a..01ede5a 100644 --- a/assets/js/demo.js +++ b/assets/js/demo.js @@ -1,563 +1,563 @@ -/* - Story by HTML5 UP - html5up.net | @ajlkn - Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) - - Note: Only needed for demo purposes. Delete for production sites. -*/ - -(function($) { - - var $window = $(window); - - // Styles. - $( - '' - ).appendTo($('head')); - - // Functions. - $.fn.demo_controls = function(styles, userOptions) { - - var $this = $(this), - $styleProperty, $stylePropertyClasses, - $controls, $x, $y, $z, - options, - current, i, j, k, s, n, count; - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).demo_controls(styles, userOptions); - - return $this; - - } - - // Options. - options = $.extend({ - target: null, - palette: true - }, userOptions); - - // Controls. - if (styles) { - - $controls = $( - '' + - '' + - 'style' + - '' + (options.palette ? ', ' : ' ') + - '' + - (options.palette ? - '' + - 'scheme' + - '' + - 'default' + - 'invert' + - ', ' + - '' + - '' + - 'color' + - '' + - 'default' + - 'color1' + - 'color2' + - 'color3' + - 'color4' + - 'color5' + - 'color6' + - 'color7' + - ', ' + - '' - : '') + - '' - ); - - } - else { - - $controls = $( - '' + - (options.palette ? - '' + - 'scheme' + - '' + - 'default' + - 'invert' + - ' and ' + - '' + - '' + - 'color' + - '' + - 'default' + - 'color1' + - 'color2' + - 'color3' + - 'color4' + - 'color5' + - 'color6' + - 'color7' + - '' + - '' - : '') + - '' - ); - - } - - // Target. - switch (options.target) { - - case 'previous': - $this.prev().find('.demo-controls').replaceWith($controls); - break; - - default: - $this.find('.demo-controls').replaceWith($controls); - break; - - } - - // Styles. - if (styles) { - - $styleProperty = $controls.find('.property[data-name="style"]'); - $stylePropertyClasses = $styleProperty.children('.classes'); - - for (i in styles) { - - current = false; - count = Object.keys(styles[i]).length; - n = 1; - - // Add to style property. - $x = $(', ' + i + '') - .appendTo($stylePropertyClasses); - - if ($this.hasClass(i)) { - - $x.addClass('active'); - current = true; - - } - - // Step through properties. - for (j in styles[i]) { - - $x = $( - '' + - (n == count ? 'and ' : '') + - '' + j + '' + - '' + - '' + (n < count ? ', ' : '') + - '' - ).appendTo($controls); - - $y = $x.children('.classes'); - - if (current) - $x.addClass('active'); - - for (k in styles[i][j]) { - - $z = $(', ' + styles[i][j][k].replace('*', '') + '') - .appendTo($y); - - if (styles[i][j][k].substr(-1, 1) == '*') - $z.addClass('default'); - - if (current - && $this.hasClass(k)) - $z.addClass('active'); - - } - - n++; - - } - - } - - } - - // Events. - $controls.on('click', 'a', function(event) { - event.preventDefault(); - }); - - $controls.on('click', '.property.active', function(event) { - - var $property = $(this); - var $classes = $property.find('.classes > *'); - var $current = $classes.filter('.active'); - var $next; - - // Determine next. - if ($current.length == 0 - || $current.index() == $classes.length - 1) - $next = $classes.first(); - else - $next = $current.next(); - - // Turn on animate all. - $this.addClass('demo-animate-all'); - - // Deactivate current. - $current.removeClass('active'); - $this.removeClass($current.data('class')); - - // Activate next. - $next.addClass('active'); - $this.addClass($next.data('class')); - - // Turn off animate all. - setTimeout(function() { - $this.removeClass('demo-animate-all'); - }, 500); - - }); - - $controls.on('click', '.property[data-name="style"]', function(event) { - - var $property = $(this); - var $classes = $property.find('.classes > *'); - var $current = $classes.filter('.active'); - var $next; - - // Determine next. - if ($current.length == 0 - || $current.index() == $classes.length - 1) - $next = $classes.first(); - else - $next = $current.next(); - - // Turn on animate all. - $this.addClass('demo-animate-all'); - - // Deactivate current. - $current.removeClass('active'); - $this.removeClass($current.data('class')); - - $controls.find('.property[data-requires="' + $current.data('class') + '"]') - .removeClass('active'); - - $controls.find('.property[data-requires="' + $current.data('class') + '"] > .classes > .active').each(function() { - - $(this).removeClass('active'); - - if ($(this).data('class') != '-') - $this.removeClass($(this).data('class')); - - }); - - // Activate next. - $next.addClass('active'); - $this.addClass($next.data('class')); - - $controls.find('.property[data-requires="' + $next.data('class') + '"]') - .addClass('active'); - - $controls.find('.property[data-requires="' + $next.data('class') + '"] > .classes > .default').each(function() { - - $(this).addClass('active'); - - if ($(this).data('class') != '-') - $this.addClass($(this).data('class')); - - }); - - // Turn off animate all. - setTimeout(function() { - $this.removeClass('demo-animate-all'); - }, 500); - - }); - - }; - - // Elements. - - // Wrappers. - $('.wrapper').demo_controls(null, { - palette: true - }); - - // Banner. - $('.banner').demo_controls({ - style1: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style2: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-center': 'center*', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left', - 'content-align-center': 'center*', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style3: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style4: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'phone type': { - 'iphone': 'iphone*', - 'android': 'android' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style5: { - 'size': { - '-': 'normal', - 'fullscreen': 'fullscreen*' - }, - 'content alignment': { - 'content-align-left': 'left', - 'content-align-center': 'center*', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - } - }); - - // Spotlight. - $('.spotlight').demo_controls({ - style1: { - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left*', - 'image-position-center': 'center', - 'image-position-right': 'right' - } - }, - style2: { - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style3: { - 'phone type': { - 'iphone': 'iphone*', - 'android': 'android' - }, - 'orientation': { - 'orient-left': 'left', - 'orient-right': 'right*' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style4: { - 'size': { - '-size': 'normal', - 'fullscreen': 'fullscreen*', - 'halfscreen': 'halfscreen' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-center': 'center', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - style5: { - 'size': { - '-size': 'normal', - 'fullscreen': 'fullscreen*', - 'halfscreen': 'halfscreen' - }, - 'orientation': { - 'orient-left': 'left*', - 'orient-center': 'center', - 'orient-right': 'right' - }, - 'content alignment': { - 'content-align-left': 'left*', - 'content-align-center': 'center', - 'content-align-right': 'right' - }, - 'image position': { - 'image-position-left': 'left', - 'image-position-center': 'center*', - 'image-position-right': 'right' - } - }, - }); - - // Gallery. - $('.gallery').demo_controls({ - style1: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style2: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - }, { - target: 'previous', - palette: false - }); - - // Items. - $('.items').demo_controls({ - style1: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style2: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - }, - style3: { - 'size': { - 'small': 'small', - 'medium': 'medium*', - 'big': 'big' - } - } - }, { - target: 'previous', - palette: false - }); - +/* + Story by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) + + Note: Only needed for demo purposes. Delete for production sites. +*/ + +(function($) { + + var $window = $(window); + + // Styles. + $( + '' + ).appendTo($('head')); + + // Functions. + $.fn.demo_controls = function(styles, userOptions) { + + var $this = $(this), + $styleProperty, $stylePropertyClasses, + $controls, $x, $y, $z, + options, + current, i, j, k, s, n, count; + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).demo_controls(styles, userOptions); + + return $this; + + } + + // Options. + options = $.extend({ + target: null, + palette: true + }, userOptions); + + // Controls. + if (styles) { + + $controls = $( + '' + + '' + + 'style' + + '' + (options.palette ? ', ' : ' ') + + '' + + (options.palette ? + '' + + 'scheme' + + '' + + 'default' + + 'invert' + + ', ' + + '' + + '' + + 'color' + + '' + + 'default' + + 'color1' + + 'color2' + + 'color3' + + 'color4' + + 'color5' + + 'color6' + + 'color7' + + ', ' + + '' + : '') + + '' + ); + + } + else { + + $controls = $( + '' + + (options.palette ? + '' + + 'scheme' + + '' + + 'default' + + 'invert' + + ' and ' + + '' + + '' + + 'color' + + '' + + 'default' + + 'color1' + + 'color2' + + 'color3' + + 'color4' + + 'color5' + + 'color6' + + 'color7' + + '' + + '' + : '') + + '' + ); + + } + + // Target. + switch (options.target) { + + case 'previous': + $this.prev().find('.demo-controls').replaceWith($controls); + break; + + default: + $this.find('.demo-controls').replaceWith($controls); + break; + + } + + // Styles. + if (styles) { + + $styleProperty = $controls.find('.property[data-name="style"]'); + $stylePropertyClasses = $styleProperty.children('.classes'); + + for (i in styles) { + + current = false; + count = Object.keys(styles[i]).length; + n = 1; + + // Add to style property. + $x = $(', ' + i + '') + .appendTo($stylePropertyClasses); + + if ($this.hasClass(i)) { + + $x.addClass('active'); + current = true; + + } + + // Step through properties. + for (j in styles[i]) { + + $x = $( + '' + + (n == count ? 'and ' : '') + + '' + j + '' + + '' + + '' + (n < count ? ', ' : '') + + '' + ).appendTo($controls); + + $y = $x.children('.classes'); + + if (current) + $x.addClass('active'); + + for (k in styles[i][j]) { + + $z = $(', ' + styles[i][j][k].replace('*', '') + '') + .appendTo($y); + + if (styles[i][j][k].substr(-1, 1) == '*') + $z.addClass('default'); + + if (current + && $this.hasClass(k)) + $z.addClass('active'); + + } + + n++; + + } + + } + + } + + // Events. + $controls.on('click', 'a', function(event) { + event.preventDefault(); + }); + + $controls.on('click', '.property.active', function(event) { + + var $property = $(this); + var $classes = $property.find('.classes > *'); + var $current = $classes.filter('.active'); + var $next; + + // Determine next. + if ($current.length == 0 + || $current.index() == $classes.length - 1) + $next = $classes.first(); + else + $next = $current.next(); + + // Turn on animate all. + $this.addClass('demo-animate-all'); + + // Deactivate current. + $current.removeClass('active'); + $this.removeClass($current.data('class')); + + // Activate next. + $next.addClass('active'); + $this.addClass($next.data('class')); + + // Turn off animate all. + setTimeout(function() { + $this.removeClass('demo-animate-all'); + }, 500); + + }); + + $controls.on('click', '.property[data-name="style"]', function(event) { + + var $property = $(this); + var $classes = $property.find('.classes > *'); + var $current = $classes.filter('.active'); + var $next; + + // Determine next. + if ($current.length == 0 + || $current.index() == $classes.length - 1) + $next = $classes.first(); + else + $next = $current.next(); + + // Turn on animate all. + $this.addClass('demo-animate-all'); + + // Deactivate current. + $current.removeClass('active'); + $this.removeClass($current.data('class')); + + $controls.find('.property[data-requires="' + $current.data('class') + '"]') + .removeClass('active'); + + $controls.find('.property[data-requires="' + $current.data('class') + '"] > .classes > .active').each(function() { + + $(this).removeClass('active'); + + if ($(this).data('class') != '-') + $this.removeClass($(this).data('class')); + + }); + + // Activate next. + $next.addClass('active'); + $this.addClass($next.data('class')); + + $controls.find('.property[data-requires="' + $next.data('class') + '"]') + .addClass('active'); + + $controls.find('.property[data-requires="' + $next.data('class') + '"] > .classes > .default').each(function() { + + $(this).addClass('active'); + + if ($(this).data('class') != '-') + $this.addClass($(this).data('class')); + + }); + + // Turn off animate all. + setTimeout(function() { + $this.removeClass('demo-animate-all'); + }, 500); + + }); + + }; + + // Elements. + + // Wrappers. + $('.wrapper').demo_controls(null, { + palette: true + }); + + // Banner. + $('.banner').demo_controls({ + style1: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style2: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-center': 'center*', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left', + 'content-align-center': 'center*', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style3: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style4: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'phone type': { + 'iphone': 'iphone*', + 'android': 'android' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style5: { + 'size': { + '-': 'normal', + 'fullscreen': 'fullscreen*' + }, + 'content alignment': { + 'content-align-left': 'left', + 'content-align-center': 'center*', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + } + }); + + // Spotlight. + $('.spotlight').demo_controls({ + style1: { + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left*', + 'image-position-center': 'center', + 'image-position-right': 'right' + } + }, + style2: { + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style3: { + 'phone type': { + 'iphone': 'iphone*', + 'android': 'android' + }, + 'orientation': { + 'orient-left': 'left', + 'orient-right': 'right*' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style4: { + 'size': { + '-size': 'normal', + 'fullscreen': 'fullscreen*', + 'halfscreen': 'halfscreen' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-center': 'center', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + style5: { + 'size': { + '-size': 'normal', + 'fullscreen': 'fullscreen*', + 'halfscreen': 'halfscreen' + }, + 'orientation': { + 'orient-left': 'left*', + 'orient-center': 'center', + 'orient-right': 'right' + }, + 'content alignment': { + 'content-align-left': 'left*', + 'content-align-center': 'center', + 'content-align-right': 'right' + }, + 'image position': { + 'image-position-left': 'left', + 'image-position-center': 'center*', + 'image-position-right': 'right' + } + }, + }); + + // Gallery. + $('.gallery').demo_controls({ + style1: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style2: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + }, { + target: 'previous', + palette: false + }); + + // Items. + $('.items').demo_controls({ + style1: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style2: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + }, + style3: { + 'size': { + 'small': 'small', + 'medium': 'medium*', + 'big': 'big' + } + } + }, { + target: 'previous', + palette: false + }); + })(jQuery); \ No newline at end of file diff --git a/assets/js/jquery.scrollex.min.js b/assets/js/jquery.scrollex.min.js index c511a5c..a4727fe 100644 --- a/assets/js/jquery.scrollex.min.js +++ b/assets/js/jquery.scrollex.min.js @@ -1,2 +1,2 @@ -/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ +/* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ !function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n1){for(o=0;o' + - '' + - '' + $('#logo').html() + '' + - '
' - ) - .appendTo($body); - - // Panel. - $header - .panel({ - delay: 500, - hideOnClick: true, - hideOnSwipe: true, - resetScroll: true, - resetForms: true, - side: 'right', - target: $body, - visibleClass: 'header-visible' - }); - - // Scrolly. - $('.scrolly').scrolly({ - speed: 1000, - offset: function() { - - if (breakpoints.active('<=medium')) - return $titleBar.height(); - - return 0; - - } - }); - // Gallery. - $('.gallery') - .wrapInner('
') - .prepend(browser.mobile ? '' : '
') - .scrollex({ - top: '30vh', - bottom: '30vh', - delay: 50, - initialize: function() { - $(this).addClass('is-inactive'); - }, - terminate: function() { - $(this).removeClass('is-inactive'); - }, - enter: function() { - $(this).removeClass('is-inactive'); - }, - leave: function() { - - var $this = $(this); - - if ($this.hasClass('onscroll-bidirectional')) - $this.addClass('is-inactive'); - - } - }) - .children('.inner') - //.css('overflow', 'hidden') - .css('overflow-y', browser.mobile ? 'visible' : 'hidden') - .css('overflow-x', browser.mobile ? 'scroll' : 'hidden') - .scrollLeft(0); - - // Style #1. - // ... - - // Style #2. - $('.gallery') - .on('wheel', '.inner', function(event) { - - var $this = $(this), - delta = (event.originalEvent.deltaX * 10); - - // Cap delta. - if (delta > 0) - delta = Math.min(25, delta); - else if (delta < 0) - delta = Math.max(-25, delta); - - // Scroll. - $this.scrollLeft( $this.scrollLeft() + delta ); - - }) - .on('mouseenter', '.forward, .backward', function(event) { - - var $this = $(this), - $inner = $this.siblings('.inner'), - direction = ($this.hasClass('forward') ? 1 : -1); - - // Clear move interval. - clearInterval(this._gallery_moveIntervalId); - - // Start interval. - this._gallery_moveIntervalId = setInterval(function() { - $inner.scrollLeft( $inner.scrollLeft() + (5 * direction) ); - }, 10); - - }) - .on('mouseleave', '.forward, .backward', function(event) { - - // Clear move interval. - clearInterval(this._gallery_moveIntervalId); - - }); - - // Lightbox. - $('.gallery.lightbox') - .on('click', 'a', function(event) { - - var $a = $(this), - $gallery = $a.parents('.gallery'), - $modal = $gallery.children('.modal'), - $modalImg = $modal.find('img'), - href = $a.attr('href'); - - // Not an image? Bail. - if (!href.match(/\.(jpg|gif|png|mp4)$/)) - return; - - // Prevent default. - event.preventDefault(); - event.stopPropagation(); - - // Locked? Bail. - if ($modal[0]._locked) - return; - - // Lock. - $modal[0]._locked = true; - - // Set src. - $modalImg.attr('src', href); - - // Set visible. - $modal.addClass('visible'); - - // Focus. - $modal.focus(); - - // Delay. - setTimeout(function() { - - // Unlock. - $modal[0]._locked = false; - - }, 600); - - }) - .on('click', '.modal', function(event) { - - var $modal = $(this), - $modalImg = $modal.find('img'); - - // Locked? Bail. - if ($modal[0]._locked) - return; - - // Already hidden? Bail. - if (!$modal.hasClass('visible')) - return; - - // Lock. - $modal[0]._locked = true; - - // Clear visible, loaded. - $modal - .removeClass('loaded') - - // Delay. - setTimeout(function() { - - $modal - .removeClass('visible') - - setTimeout(function() { - - // Clear src. - $modalImg.attr('src', ''); - - // Unlock. - $modal[0]._locked = false; - - // Focus. - $body.focus(); - - }, 475); - - }, 125); - - }) - .on('keypress', '.modal', function(event) { - - var $modal = $(this); - - // Escape? Hide modal. - if (event.keyCode == 27) - $modal.trigger('click'); - - }) - .prepend('') - .find('img') - .on('load', function(event) { - - var $modalImg = $(this), - $modal = $modalImg.parents('.modal'); - - setTimeout(function() { - - // No longer visible? Bail. - if (!$modal.hasClass('visible')) - return; - - // Set loaded. - $modal.addClass('loaded'); - - }, 275); - - }); - - +/* + Read Only by HTML5 UP + html5up.net | @ajlkn + Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) +*/ + +(function($) { + + var $window = $(window), + $body = $('body'), + $header = $('#header'), + $titleBar = null, + $nav = $('#nav'), + $wrapper = $('#wrapper'); + + // Breakpoints. + breakpoints({ + xlarge: [ '1281px', '1680px' ], + large: [ '1025px', '1280px' ], + medium: [ '737px', '1024px' ], + small: [ '481px', '736px' ], + xsmall: [ null, '480px' ], + }); + + // Play initial animations on page load. + $window.on('load', function() { + window.setTimeout(function() { + $body.removeClass('is-preload'); + }, 100); + }); + + // Tweaks/fixes. + + // Polyfill: Object fit. + if (!browser.canUse('object-fit')) { + + $('.image[data-position]').each(function() { + + var $this = $(this), + $img = $this.children('img'); + + // Apply img as background. + $this + .css('background-image', 'url("' + $img.attr('src') + '")') + .css('background-position', $this.data('position')) + .css('background-size', 'cover') + .css('background-repeat', 'no-repeat'); + + // Hide img. + $img + .css('opacity', '0'); + + }); + + } + + // Header Panel. + + // Nav. + var $nav_a = $nav.find('a'); + + $nav_a + .addClass('scrolly') + .on('click', function() { + + var $this = $(this); + + // External link? Bail. + if ($this.attr('href').charAt(0) != '#') + return; + + // Deactivate all links. + $nav_a.removeClass('active'); + + // Activate link *and* lock it (so Scrollex doesn't try to activate other links as we're scrolling to this one's section). + $this + .addClass('active') + .addClass('active-locked'); + + }) + .each(function() { + + var $this = $(this), + id = $this.attr('href'), + $section = $(id); + + // No section for this link? Bail. + if ($section.length < 1) + return; + + // Scrollex. + $section.scrollex({ + mode: 'middle', + top: '5vh', + bottom: '5vh', + initialize: function() { + + // Deactivate section. + $section.addClass('inactive'); + + }, + enter: function() { + + // Activate section. + $section.removeClass('inactive'); + + // No locked links? Deactivate all links and activate this section's one. + if ($nav_a.filter('.active-locked').length == 0) { + + $nav_a.removeClass('active'); + $this.addClass('active'); + + } + + // Otherwise, if this section's link is the one that's locked, unlock it. + else if ($this.hasClass('active-locked')) + $this.removeClass('active-locked'); + + } + }); + + }); + + // Title Bar. + $titleBar = $( + '
' + + '' + + '' + $('#logo').html() + '' + + '
' + ) + .appendTo($body); + + // Panel. + $header + .panel({ + delay: 500, + hideOnClick: true, + hideOnSwipe: true, + resetScroll: true, + resetForms: true, + side: 'right', + target: $body, + visibleClass: 'header-visible' + }); + + // Scrolly. + $('.scrolly').scrolly({ + speed: 1000, + offset: function() { + + if (breakpoints.active('<=medium')) + return $titleBar.height(); + + return 0; + + } + }); + // Gallery. + $('.gallery') + .wrapInner('
') + .prepend(browser.mobile ? '' : '
') + .scrollex({ + top: '30vh', + bottom: '30vh', + delay: 50, + initialize: function() { + $(this).addClass('is-inactive'); + }, + terminate: function() { + $(this).removeClass('is-inactive'); + }, + enter: function() { + $(this).removeClass('is-inactive'); + }, + leave: function() { + + var $this = $(this); + + if ($this.hasClass('onscroll-bidirectional')) + $this.addClass('is-inactive'); + + } + }) + .children('.inner') + //.css('overflow', 'hidden') + .css('overflow-y', browser.mobile ? 'visible' : 'hidden') + .css('overflow-x', browser.mobile ? 'scroll' : 'hidden') + .scrollLeft(0); + + // Style #1. + // ... + + // Style #2. + $('.gallery') + .on('wheel', '.inner', function(event) { + + var $this = $(this), + delta = (event.originalEvent.deltaX * 10); + + // Cap delta. + if (delta > 0) + delta = Math.min(25, delta); + else if (delta < 0) + delta = Math.max(-25, delta); + + // Scroll. + $this.scrollLeft( $this.scrollLeft() + delta ); + + }) + .on('mouseenter', '.forward, .backward', function(event) { + + var $this = $(this), + $inner = $this.siblings('.inner'), + direction = ($this.hasClass('forward') ? 1 : -1); + + // Clear move interval. + clearInterval(this._gallery_moveIntervalId); + + // Start interval. + this._gallery_moveIntervalId = setInterval(function() { + $inner.scrollLeft( $inner.scrollLeft() + (5 * direction) ); + }, 10); + + }) + .on('mouseleave', '.forward, .backward', function(event) { + + // Clear move interval. + clearInterval(this._gallery_moveIntervalId); + + }); + + // Lightbox. + $('.gallery.lightbox') + .on('click', 'a', function(event) { + + var $a = $(this), + $gallery = $a.parents('.gallery'), + $modal = $gallery.children('.modal'), + $modalImg = $modal.find('img'), + href = $a.attr('href'); + + // Not an image? Bail. + if (!href.match(/\.(jpg|gif|png|mp4)$/)) + return; + + // Prevent default. + event.preventDefault(); + event.stopPropagation(); + + // Locked? Bail. + if ($modal[0]._locked) + return; + + // Lock. + $modal[0]._locked = true; + + // Set src. + $modalImg.attr('src', href); + + // Set visible. + $modal.addClass('visible'); + + // Focus. + $modal.focus(); + + // Delay. + setTimeout(function() { + + // Unlock. + $modal[0]._locked = false; + + }, 600); + + }) + .on('click', '.modal', function(event) { + + var $modal = $(this), + $modalImg = $modal.find('img'); + + // Locked? Bail. + if ($modal[0]._locked) + return; + + // Already hidden? Bail. + if (!$modal.hasClass('visible')) + return; + + // Lock. + $modal[0]._locked = true; + + // Clear visible, loaded. + $modal + .removeClass('loaded') + + // Delay. + setTimeout(function() { + + $modal + .removeClass('visible') + + setTimeout(function() { + + // Clear src. + $modalImg.attr('src', ''); + + // Unlock. + $modal[0]._locked = false; + + // Focus. + $body.focus(); + + }, 475); + + }, 125); + + }) + .on('keypress', '.modal', function(event) { + + var $modal = $(this); + + // Escape? Hide modal. + if (event.keyCode == 27) + $modal.trigger('click'); + + }) + .prepend('') + .find('img') + .on('load', function(event) { + + var $modalImg = $(this), + $modal = $modalImg.parents('.modal'); + + setTimeout(function() { + + // No longer visible? Bail. + if (!$modal.hasClass('visible')) + return; + + // Set loaded. + $modal.addClass('loaded'); + + }, 275); + + }); + + })(jQuery); \ No newline at end of file diff --git a/assets/js/util.js b/assets/js/util.js index ecf7b37..bdb8e9f 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -1,587 +1,587 @@ -(function($) { - - /** - * Generate an indented list of links from a nav. Meant for use with panel(). - * @return {jQuery} jQuery object. - */ - $.fn.navList = function() { - - var $this = $(this); - $a = $this.find('a'), - b = []; - - $a.each(function() { - - var $this = $(this), - indent = Math.max(0, $this.parents('li').length - 1), - href = $this.attr('href'), - target = $this.attr('target'); - - b.push( - '' + - '' + - $this.text() + - '' - ); - - }); - - return b.join(''); - - }; - - /** - * Panel-ify an element. - * @param {object} userConfig User config. - * @return {jQuery} jQuery object. - */ - $.fn.panel = function(userConfig) { - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).panel(userConfig); - - return $this; - - } - - // Vars. - var $this = $(this), - $body = $('body'), - $window = $(window), - id = $this.attr('id'), - config; - - // Config. - config = $.extend({ - - // Delay. - delay: 0, - - // Hide panel on link click. - hideOnClick: false, - - // Hide panel on escape keypress. - hideOnEscape: false, - - // Hide panel on swipe. - hideOnSwipe: false, - - // Reset scroll position on hide. - resetScroll: false, - - // Reset forms on hide. - resetForms: false, - - // Side of viewport the panel will appear. - side: null, - - // Target element for "class". - target: $this, - - // Class to toggle. - visibleClass: 'visible' - - }, userConfig); - - // Expand "target" if it's not a jQuery object already. - if (typeof config.target != 'jQuery') - config.target = $(config.target); - - // Panel. - - // Methods. - $this._hide = function(event) { - - // Already hidden? Bail. - if (!config.target.hasClass(config.visibleClass)) - return; - - // If an event was provided, cancel it. - if (event) { - - event.preventDefault(); - event.stopPropagation(); - - } - - // Hide. - config.target.removeClass(config.visibleClass); - - // Post-hide stuff. - window.setTimeout(function() { - - // Reset scroll position. - if (config.resetScroll) - $this.scrollTop(0); - - // Reset forms. - if (config.resetForms) - $this.find('form').each(function() { - this.reset(); - }); - - }, config.delay); - - }; - - // Vendor fixes. - $this - .css('-ms-overflow-style', '-ms-autohiding-scrollbar') - .css('-webkit-overflow-scrolling', 'touch'); - - // Hide on click. - if (config.hideOnClick) { - - $this.find('a') - .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); - - $this - .on('click', 'a', function(event) { - - var $a = $(this), - href = $a.attr('href'), - target = $a.attr('target'); - - if (!href || href == '#' || href == '' || href == '#' + id) - return; - - // Cancel original event. - event.preventDefault(); - event.stopPropagation(); - - // Hide panel. - $this._hide(); - - // Redirect to href. - window.setTimeout(function() { - - if (target == '_blank') - window.open(href); - else - window.location.href = href; - - }, config.delay + 10); - - }); - - } - - // Event: Touch stuff. - $this.on('touchstart', function(event) { - - $this.touchPosX = event.originalEvent.touches[0].pageX; - $this.touchPosY = event.originalEvent.touches[0].pageY; - - }) - - $this.on('touchmove', function(event) { - - if ($this.touchPosX === null - || $this.touchPosY === null) - return; - - var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, - diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, - th = $this.outerHeight(), - ts = ($this.get(0).scrollHeight - $this.scrollTop()); - - // Hide on swipe? - if (config.hideOnSwipe) { - - var result = false, - boundary = 20, - delta = 50; - - switch (config.side) { - - case 'left': - result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); - break; - - case 'right': - result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); - break; - - case 'top': - result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); - break; - - case 'bottom': - result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); - break; - - default: - break; - - } - - if (result) { - - $this.touchPosX = null; - $this.touchPosY = null; - $this._hide(); - - return false; - - } - - } - - // Prevent vertical scrolling past the top or bottom. - if (($this.scrollTop() < 0 && diffY < 0) - || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { - - event.preventDefault(); - event.stopPropagation(); - - } - - }); - - // Event: Prevent certain events inside the panel from bubbling. - $this.on('click touchend touchstart touchmove', function(event) { - event.stopPropagation(); - }); - - // Event: Hide panel if a child anchor tag pointing to its ID is clicked. - $this.on('click', 'a[href="#' + id + '"]', function(event) { - - event.preventDefault(); - event.stopPropagation(); - - config.target.removeClass(config.visibleClass); - - }); - - // Body. - - // Event: Hide panel on body click/tap. - $body.on('click touchend', function(event) { - $this._hide(event); - }); - - // Event: Toggle. - $body.on('click', 'a[href="#' + id + '"]', function(event) { - - event.preventDefault(); - event.stopPropagation(); - - config.target.toggleClass(config.visibleClass); - - }); - - // Window. - - // Event: Hide on ESC. - if (config.hideOnEscape) - $window.on('keydown', function(event) { - - if (event.keyCode == 27) - $this._hide(event); - - }); - - return $this; - - }; - - /** - * Apply "placeholder" attribute polyfill to one or more forms. - * @return {jQuery} jQuery object. - */ - $.fn.placeholder = function() { - - // Browser natively supports placeholders? Bail. - if (typeof (document.createElement('input')).placeholder != 'undefined') - return $(this); - - // No elements? - if (this.length == 0) - return $this; - - // Multiple elements? - if (this.length > 1) { - - for (var i=0; i < this.length; i++) - $(this[i]).placeholder(); - - return $this; - - } - - // Vars. - var $this = $(this); - - // Text, TextArea. - $this.find('input[type=text],textarea') - .each(function() { - - var i = $(this); - - if (i.val() == '' - || i.val() == i.attr('placeholder')) - i - .addClass('polyfill-placeholder') - .val(i.attr('placeholder')); - - }) - .on('blur', function() { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - return; - - if (i.val() == '') - i - .addClass('polyfill-placeholder') - .val(i.attr('placeholder')); - - }) - .on('focus', function() { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - return; - - if (i.val() == i.attr('placeholder')) - i - .removeClass('polyfill-placeholder') - .val(''); - - }); - - // Password. - $this.find('input[type=password]') - .each(function() { - - var i = $(this); - var x = $( - $('
') - .append(i.clone()) - .remove() - .html() - .replace(/type="password"/i, 'type="text"') - .replace(/type=password/i, 'type=text') - ); - - if (i.attr('id') != '') - x.attr('id', i.attr('id') + '-polyfill-field'); - - if (i.attr('name') != '') - x.attr('name', i.attr('name') + '-polyfill-field'); - - x.addClass('polyfill-placeholder') - .val(x.attr('placeholder')).insertAfter(i); - - if (i.val() == '') - i.hide(); - else - x.hide(); - - i - .on('blur', function(event) { - - event.preventDefault(); - - var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); - - if (i.val() == '') { - - i.hide(); - x.show(); - - } - - }); - - x - .on('focus', function(event) { - - event.preventDefault(); - - var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); - - x.hide(); - - i - .show() - .focus(); - - }) - .on('keypress', function(event) { - - event.preventDefault(); - x.val(''); - - }); - - }); - - // Events. - $this - .on('submit', function() { - - $this.find('input[type=text],input[type=password],textarea') - .each(function(event) { - - var i = $(this); - - if (i.attr('name').match(/-polyfill-field$/)) - i.attr('name', ''); - - if (i.val() == i.attr('placeholder')) { - - i.removeClass('polyfill-placeholder'); - i.val(''); - - } - - }); - - }) - .on('reset', function(event) { - - event.preventDefault(); - - $this.find('select') - .val($('option:first').val()); - - $this.find('input,textarea') - .each(function() { - - var i = $(this), - x; - - i.removeClass('polyfill-placeholder'); - - switch (this.type) { - - case 'submit': - case 'reset': - break; - - case 'password': - i.val(i.attr('defaultValue')); - - x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); - - if (i.val() == '') { - i.hide(); - x.show(); - } - else { - i.show(); - x.hide(); - } - - break; - - case 'checkbox': - case 'radio': - i.attr('checked', i.attr('defaultValue')); - break; - - case 'text': - case 'textarea': - i.val(i.attr('defaultValue')); - - if (i.val() == '') { - i.addClass('polyfill-placeholder'); - i.val(i.attr('placeholder')); - } - - break; - - default: - i.val(i.attr('defaultValue')); - break; - - } - }); - - }); - - return $this; - - }; - - /** - * Moves elements to/from the first positions of their respective parents. - * @param {jQuery} $elements Elements (or selector) to move. - * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. - */ - $.prioritize = function($elements, condition) { - - var key = '__prioritize'; - - // Expand $elements if it's not already a jQuery object. - if (typeof $elements != 'jQuery') - $elements = $($elements); - - // Step through elements. - $elements.each(function() { - - var $e = $(this), $p, - $parent = $e.parent(); - - // No parent? Bail. - if ($parent.length == 0) - return; - - // Not moved? Move it. - if (!$e.data(key)) { - - // Condition is false? Bail. - if (!condition) - return; - - // Get placeholder (which will serve as our point of reference for when this element needs to move back). - $p = $e.prev(); - - // Couldn't find anything? Means this element's already at the top, so bail. - if ($p.length == 0) - return; - - // Move element to top of parent. - $e.prependTo($parent); - - // Mark element as moved. - $e.data(key, $p); - - } - - // Moved already? - else { - - // Condition is true? Bail. - if (condition) - return; - - $p = $e.data(key); - - // Move element back to its original location (using our placeholder). - $e.insertAfter($p); - - // Unmark element as moved. - $e.removeData(key); - - } - - }); - - }; - +(function($) { + + /** + * Generate an indented list of links from a nav. Meant for use with panel(). + * @return {jQuery} jQuery object. + */ + $.fn.navList = function() { + + var $this = $(this); + $a = $this.find('a'), + b = []; + + $a.each(function() { + + var $this = $(this), + indent = Math.max(0, $this.parents('li').length - 1), + href = $this.attr('href'), + target = $this.attr('target'); + + b.push( + '' + + '' + + $this.text() + + '' + ); + + }); + + return b.join(''); + + }; + + /** + * Panel-ify an element. + * @param {object} userConfig User config. + * @return {jQuery} jQuery object. + */ + $.fn.panel = function(userConfig) { + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).panel(userConfig); + + return $this; + + } + + // Vars. + var $this = $(this), + $body = $('body'), + $window = $(window), + id = $this.attr('id'), + config; + + // Config. + config = $.extend({ + + // Delay. + delay: 0, + + // Hide panel on link click. + hideOnClick: false, + + // Hide panel on escape keypress. + hideOnEscape: false, + + // Hide panel on swipe. + hideOnSwipe: false, + + // Reset scroll position on hide. + resetScroll: false, + + // Reset forms on hide. + resetForms: false, + + // Side of viewport the panel will appear. + side: null, + + // Target element for "class". + target: $this, + + // Class to toggle. + visibleClass: 'visible' + + }, userConfig); + + // Expand "target" if it's not a jQuery object already. + if (typeof config.target != 'jQuery') + config.target = $(config.target); + + // Panel. + + // Methods. + $this._hide = function(event) { + + // Already hidden? Bail. + if (!config.target.hasClass(config.visibleClass)) + return; + + // If an event was provided, cancel it. + if (event) { + + event.preventDefault(); + event.stopPropagation(); + + } + + // Hide. + config.target.removeClass(config.visibleClass); + + // Post-hide stuff. + window.setTimeout(function() { + + // Reset scroll position. + if (config.resetScroll) + $this.scrollTop(0); + + // Reset forms. + if (config.resetForms) + $this.find('form').each(function() { + this.reset(); + }); + + }, config.delay); + + }; + + // Vendor fixes. + $this + .css('-ms-overflow-style', '-ms-autohiding-scrollbar') + .css('-webkit-overflow-scrolling', 'touch'); + + // Hide on click. + if (config.hideOnClick) { + + $this.find('a') + .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); + + $this + .on('click', 'a', function(event) { + + var $a = $(this), + href = $a.attr('href'), + target = $a.attr('target'); + + if (!href || href == '#' || href == '' || href == '#' + id) + return; + + // Cancel original event. + event.preventDefault(); + event.stopPropagation(); + + // Hide panel. + $this._hide(); + + // Redirect to href. + window.setTimeout(function() { + + if (target == '_blank') + window.open(href); + else + window.location.href = href; + + }, config.delay + 10); + + }); + + } + + // Event: Touch stuff. + $this.on('touchstart', function(event) { + + $this.touchPosX = event.originalEvent.touches[0].pageX; + $this.touchPosY = event.originalEvent.touches[0].pageY; + + }) + + $this.on('touchmove', function(event) { + + if ($this.touchPosX === null + || $this.touchPosY === null) + return; + + var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, + diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, + th = $this.outerHeight(), + ts = ($this.get(0).scrollHeight - $this.scrollTop()); + + // Hide on swipe? + if (config.hideOnSwipe) { + + var result = false, + boundary = 20, + delta = 50; + + switch (config.side) { + + case 'left': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); + break; + + case 'right': + result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); + break; + + case 'top': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); + break; + + case 'bottom': + result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); + break; + + default: + break; + + } + + if (result) { + + $this.touchPosX = null; + $this.touchPosY = null; + $this._hide(); + + return false; + + } + + } + + // Prevent vertical scrolling past the top or bottom. + if (($this.scrollTop() < 0 && diffY < 0) + || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { + + event.preventDefault(); + event.stopPropagation(); + + } + + }); + + // Event: Prevent certain events inside the panel from bubbling. + $this.on('click touchend touchstart touchmove', function(event) { + event.stopPropagation(); + }); + + // Event: Hide panel if a child anchor tag pointing to its ID is clicked. + $this.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.removeClass(config.visibleClass); + + }); + + // Body. + + // Event: Hide panel on body click/tap. + $body.on('click touchend', function(event) { + $this._hide(event); + }); + + // Event: Toggle. + $body.on('click', 'a[href="#' + id + '"]', function(event) { + + event.preventDefault(); + event.stopPropagation(); + + config.target.toggleClass(config.visibleClass); + + }); + + // Window. + + // Event: Hide on ESC. + if (config.hideOnEscape) + $window.on('keydown', function(event) { + + if (event.keyCode == 27) + $this._hide(event); + + }); + + return $this; + + }; + + /** + * Apply "placeholder" attribute polyfill to one or more forms. + * @return {jQuery} jQuery object. + */ + $.fn.placeholder = function() { + + // Browser natively supports placeholders? Bail. + if (typeof (document.createElement('input')).placeholder != 'undefined') + return $(this); + + // No elements? + if (this.length == 0) + return $this; + + // Multiple elements? + if (this.length > 1) { + + for (var i=0; i < this.length; i++) + $(this[i]).placeholder(); + + return $this; + + } + + // Vars. + var $this = $(this); + + // Text, TextArea. + $this.find('input[type=text],textarea') + .each(function() { + + var i = $(this); + + if (i.val() == '' + || i.val() == i.attr('placeholder')) + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('blur', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == '') + i + .addClass('polyfill-placeholder') + .val(i.attr('placeholder')); + + }) + .on('focus', function() { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + return; + + if (i.val() == i.attr('placeholder')) + i + .removeClass('polyfill-placeholder') + .val(''); + + }); + + // Password. + $this.find('input[type=password]') + .each(function() { + + var i = $(this); + var x = $( + $('
') + .append(i.clone()) + .remove() + .html() + .replace(/type="password"/i, 'type="text"') + .replace(/type=password/i, 'type=text') + ); + + if (i.attr('id') != '') + x.attr('id', i.attr('id') + '-polyfill-field'); + + if (i.attr('name') != '') + x.attr('name', i.attr('name') + '-polyfill-field'); + + x.addClass('polyfill-placeholder') + .val(x.attr('placeholder')).insertAfter(i); + + if (i.val() == '') + i.hide(); + else + x.hide(); + + i + .on('blur', function(event) { + + event.preventDefault(); + + var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + + i.hide(); + x.show(); + + } + + }); + + x + .on('focus', function(event) { + + event.preventDefault(); + + var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']'); + + x.hide(); + + i + .show() + .focus(); + + }) + .on('keypress', function(event) { + + event.preventDefault(); + x.val(''); + + }); + + }); + + // Events. + $this + .on('submit', function() { + + $this.find('input[type=text],input[type=password],textarea') + .each(function(event) { + + var i = $(this); + + if (i.attr('name').match(/-polyfill-field$/)) + i.attr('name', ''); + + if (i.val() == i.attr('placeholder')) { + + i.removeClass('polyfill-placeholder'); + i.val(''); + + } + + }); + + }) + .on('reset', function(event) { + + event.preventDefault(); + + $this.find('select') + .val($('option:first').val()); + + $this.find('input,textarea') + .each(function() { + + var i = $(this), + x; + + i.removeClass('polyfill-placeholder'); + + switch (this.type) { + + case 'submit': + case 'reset': + break; + + case 'password': + i.val(i.attr('defaultValue')); + + x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]'); + + if (i.val() == '') { + i.hide(); + x.show(); + } + else { + i.show(); + x.hide(); + } + + break; + + case 'checkbox': + case 'radio': + i.attr('checked', i.attr('defaultValue')); + break; + + case 'text': + case 'textarea': + i.val(i.attr('defaultValue')); + + if (i.val() == '') { + i.addClass('polyfill-placeholder'); + i.val(i.attr('placeholder')); + } + + break; + + default: + i.val(i.attr('defaultValue')); + break; + + } + }); + + }); + + return $this; + + }; + + /** + * Moves elements to/from the first positions of their respective parents. + * @param {jQuery} $elements Elements (or selector) to move. + * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations. + */ + $.prioritize = function($elements, condition) { + + var key = '__prioritize'; + + // Expand $elements if it's not already a jQuery object. + if (typeof $elements != 'jQuery') + $elements = $($elements); + + // Step through elements. + $elements.each(function() { + + var $e = $(this), $p, + $parent = $e.parent(); + + // No parent? Bail. + if ($parent.length == 0) + return; + + // Not moved? Move it. + if (!$e.data(key)) { + + // Condition is false? Bail. + if (!condition) + return; + + // Get placeholder (which will serve as our point of reference for when this element needs to move back). + $p = $e.prev(); + + // Couldn't find anything? Means this element's already at the top, so bail. + if ($p.length == 0) + return; + + // Move element to top of parent. + $e.prependTo($parent); + + // Mark element as moved. + $e.data(key, $p); + + } + + // Moved already? + else { + + // Condition is true? Bail. + if (condition) + return; + + $p = $e.data(key); + + // Move element back to its original location (using our placeholder). + $e.insertAfter($p); + + // Unmark element as moved. + $e.removeData(key); + + } + + }); + + }; + })(jQuery); \ No newline at end of file diff --git a/assets/sass/libs/_functions.scss b/assets/sass/libs/_functions.scss index b367524..f563aab 100644 --- a/assets/sass/libs/_functions.scss +++ b/assets/sass/libs/_functions.scss @@ -1,90 +1,90 @@ -/// Removes a specific item from a list. -/// @author Hugo Giraudel -/// @param {list} $list List. -/// @param {integer} $index Index. -/// @return {list} Updated list. -@function remove-nth($list, $index) { - - $result: null; - - @if type-of($index) != number { - @warn "$index: #{quote($index)} is not a number for `remove-nth`."; - } - @else if $index == 0 { - @warn "List index 0 must be a non-zero integer for `remove-nth`."; - } - @else if abs($index) > length($list) { - @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`."; - } - @else { - - $result: (); - $index: if($index < 0, length($list) + $index + 1, $index); - - @for $i from 1 through length($list) { - - @if $i != $index { - $result: append($result, nth($list, $i)); - } - - } - - } - - @return $result; - -} - -/// Gets a value from a map. -/// @author Hugo Giraudel -/// @param {map} $map Map. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function val($map, $keys...) { - - @if nth($keys, 1) == null { - $keys: remove-nth($keys, 1); - } - - @each $key in $keys { - $map: map-get($map, $key); - } - - @return $map; - -} - -/// Gets a duration value. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function _duration($keys...) { - @return val($duration, $keys...); -} - -/// Gets a font value. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function _font($keys...) { - @return val($font, $keys...); -} - -/// Gets a misc value. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function _misc($keys...) { - @return val($misc, $keys...); -} - -/// Gets a palette value. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function _palette($keys...) { - @return val($palette, $keys...); -} - -/// Gets a size value. -/// @param {string} $keys Key(s). -/// @return {string} Value. -@function _size($keys...) { - @return val($size, $keys...); +/// Removes a specific item from a list. +/// @author Hugo Giraudel +/// @param {list} $list List. +/// @param {integer} $index Index. +/// @return {list} Updated list. +@function remove-nth($list, $index) { + + $result: null; + + @if type-of($index) != number { + @warn "$index: #{quote($index)} is not a number for `remove-nth`."; + } + @else if $index == 0 { + @warn "List index 0 must be a non-zero integer for `remove-nth`."; + } + @else if abs($index) > length($list) { + @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`."; + } + @else { + + $result: (); + $index: if($index < 0, length($list) + $index + 1, $index); + + @for $i from 1 through length($list) { + + @if $i != $index { + $result: append($result, nth($list, $i)); + } + + } + + } + + @return $result; + +} + +/// Gets a value from a map. +/// @author Hugo Giraudel +/// @param {map} $map Map. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function val($map, $keys...) { + + @if nth($keys, 1) == null { + $keys: remove-nth($keys, 1); + } + + @each $key in $keys { + $map: map-get($map, $key); + } + + @return $map; + +} + +/// Gets a duration value. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function _duration($keys...) { + @return val($duration, $keys...); +} + +/// Gets a font value. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function _font($keys...) { + @return val($font, $keys...); +} + +/// Gets a misc value. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function _misc($keys...) { + @return val($misc, $keys...); +} + +/// Gets a palette value. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function _palette($keys...) { + @return val($palette, $keys...); +} + +/// Gets a size value. +/// @param {string} $keys Key(s). +/// @return {string} Value. +@function _size($keys...) { + @return val($size, $keys...); } \ No newline at end of file diff --git a/assets/sass/libs/_html-grid.scss b/assets/sass/libs/_html-grid.scss index 3c08069..7438a8c 100644 --- a/assets/sass/libs/_html-grid.scss +++ b/assets/sass/libs/_html-grid.scss @@ -1,149 +1,149 @@ -// html-grid.scss v1.0 | @ajlkn | MIT licensed */ - -// Mixins. - - /// Initializes the current element as an HTML grid. - /// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually). - /// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list). - @mixin html-grid($gutters: 1.5em, $suffix: '') { - - // Initialize. - $cols: 12; - $multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00; - $unit: 100% / $cols; - - // Suffixes. - $suffixes: null; - - @if (type-of($suffix) == 'list') { - $suffixes: $suffix; - } - @else { - $suffixes: ($suffix); - } - - // Gutters. - $guttersCols: null; - $guttersRows: null; - - @if (type-of($gutters) == 'list') { - - $guttersCols: nth($gutters, 1); - $guttersRows: nth($gutters, 2); - - } - @else { - - $guttersCols: $gutters; - $guttersRows: 0; - - } - - // Row. - display: flex; - flex-wrap: wrap; - box-sizing: border-box; - align-items: stretch; - - // Columns. - > * { - box-sizing: border-box; - } - - // Gutters. - &.gtr-uniform { - > * { - > :last-child { - margin-bottom: 0; - } - } - } - - // Alignment. - &.aln-left { - justify-content: flex-start; - } - - &.aln-center { - justify-content: center; - } - - &.aln-right { - justify-content: flex-end; - } - - &.aln-top { - align-items: flex-start; - } - - &.aln-middle { - align-items: center; - } - - &.aln-bottom { - align-items: flex-end; - } - - // Step through suffixes. - @each $suffix in $suffixes { - - // Suffix. - @if ($suffix != '') { - $suffix: '-' + $suffix; - } - @else { - $suffix: ''; - } - - // Row. - - // Important. - > .imp#{$suffix} { - order: -1; - } - - // Columns, offsets. - @for $i from 1 through $cols { - > .col-#{$i}#{$suffix} { - width: $unit * $i; - } - - > .off-#{$i}#{$suffix} { - margin-left: $unit * $i; - } - } - - // Step through multipliers. - @each $multiplier in $multipliers { - - // Gutters. - $class: null; - - @if ($multiplier != 1) { - $class: '.gtr-' + ($multiplier * 100); - } - - &#{$class} { - margin-top: ($guttersRows * $multiplier * -1); - margin-left: ($guttersCols * $multiplier * -1); - - > * { - padding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier); - } - - // Uniform. - &.gtr-uniform { - margin-top: $guttersCols * $multiplier * -1; - - > * { - padding-top: $guttersCols * $multiplier; - } - } - - } - - } - - } - +// html-grid.scss v1.0 | @ajlkn | MIT licensed */ + +// Mixins. + + /// Initializes the current element as an HTML grid. + /// @param {mixed} $gutters Gutters (either a single number to set both column/row gutters, or a list to set them individually). + /// @param {mixed} $suffix Column class suffix (optional; either a single suffix or a list). + @mixin html-grid($gutters: 1.5em, $suffix: '') { + + // Initialize. + $cols: 12; + $multipliers: 0, 0.25, 0.5, 1, 1.50, 2.00; + $unit: 100% / $cols; + + // Suffixes. + $suffixes: null; + + @if (type-of($suffix) == 'list') { + $suffixes: $suffix; + } + @else { + $suffixes: ($suffix); + } + + // Gutters. + $guttersCols: null; + $guttersRows: null; + + @if (type-of($gutters) == 'list') { + + $guttersCols: nth($gutters, 1); + $guttersRows: nth($gutters, 2); + + } + @else { + + $guttersCols: $gutters; + $guttersRows: 0; + + } + + // Row. + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + align-items: stretch; + + // Columns. + > * { + box-sizing: border-box; + } + + // Gutters. + &.gtr-uniform { + > * { + > :last-child { + margin-bottom: 0; + } + } + } + + // Alignment. + &.aln-left { + justify-content: flex-start; + } + + &.aln-center { + justify-content: center; + } + + &.aln-right { + justify-content: flex-end; + } + + &.aln-top { + align-items: flex-start; + } + + &.aln-middle { + align-items: center; + } + + &.aln-bottom { + align-items: flex-end; + } + + // Step through suffixes. + @each $suffix in $suffixes { + + // Suffix. + @if ($suffix != '') { + $suffix: '-' + $suffix; + } + @else { + $suffix: ''; + } + + // Row. + + // Important. + > .imp#{$suffix} { + order: -1; + } + + // Columns, offsets. + @for $i from 1 through $cols { + > .col-#{$i}#{$suffix} { + width: $unit * $i; + } + + > .off-#{$i}#{$suffix} { + margin-left: $unit * $i; + } + } + + // Step through multipliers. + @each $multiplier in $multipliers { + + // Gutters. + $class: null; + + @if ($multiplier != 1) { + $class: '.gtr-' + ($multiplier * 100); + } + + &#{$class} { + margin-top: ($guttersRows * $multiplier * -1); + margin-left: ($guttersCols * $multiplier * -1); + + > * { + padding: ($guttersRows * $multiplier) 0 0 ($guttersCols * $multiplier); + } + + // Uniform. + &.gtr-uniform { + margin-top: $guttersCols * $multiplier * -1; + + > * { + padding-top: $guttersCols * $multiplier; + } + } + + } + + } + + } + } \ No newline at end of file diff --git a/assets/sass/libs/_mixins.scss b/assets/sass/libs/_mixins.scss index 8187463..a331483 100644 --- a/assets/sass/libs/_mixins.scss +++ b/assets/sass/libs/_mixins.scss @@ -1,78 +1,78 @@ -/// Makes an element's :before pseudoelement a FontAwesome icon. -/// @param {string} $content Optional content value to use. -/// @param {string} $category Optional category to use. -/// @param {string} $where Optional pseudoelement to target (before or after). -@mixin icon($content: false, $category: regular, $where: before) { - - text-decoration: none; - - &:#{$where} { - - @if $content { - content: $content; - } - - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - display: inline-block; - font-style: normal; - font-variant: normal; - text-rendering: auto; - line-height: 1; - text-transform: none !important; - - @if ($category == brands) { - font-family: 'Font Awesome 5 Brands'; - } - @elseif ($category == solid) { - font-family: 'Font Awesome 5 Free'; - font-weight: 900; - } - @else { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; - } - - } - -} - -/// Applies padding to an element, taking the current element-margin value into account. -/// @param {mixed} $tb Top/bottom padding. -/// @param {mixed} $lr Left/right padding. -/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left) -/// @param {bool} $important If true, adds !important. -@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) { - - @if $important { - $important: '!important'; - } - - $x: 0.1em; - - @if unit(_size(element-margin)) == 'rem' { - $x: 0.1rem; - } - - padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important}; - -} - -/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp). -/// @param {string} $svg SVG data URL. -/// @return {string} Encoded SVG data URL. -@function svg-url($svg) { - - $svg: str-replace($svg, '"', '\''); - $svg: str-replace($svg, '%', '%25'); - $svg: str-replace($svg, '<', '%3C'); - $svg: str-replace($svg, '>', '%3E'); - $svg: str-replace($svg, '&', '%26'); - $svg: str-replace($svg, '#', '%23'); - $svg: str-replace($svg, '{', '%7B'); - $svg: str-replace($svg, '}', '%7D'); - $svg: str-replace($svg, ';', '%3B'); - - @return url("data:image/svg+xml;charset=utf8,#{$svg}"); - +/// Makes an element's :before pseudoelement a FontAwesome icon. +/// @param {string} $content Optional content value to use. +/// @param {string} $category Optional category to use. +/// @param {string} $where Optional pseudoelement to target (before or after). +@mixin icon($content: false, $category: regular, $where: before) { + + text-decoration: none; + + &:#{$where} { + + @if $content { + content: $content; + } + + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; + text-transform: none !important; + + @if ($category == brands) { + font-family: 'Font Awesome 5 Brands'; + } + @elseif ($category == solid) { + font-family: 'Font Awesome 5 Free'; + font-weight: 900; + } + @else { + font-family: 'Font Awesome 5 Free'; + font-weight: 400; + } + + } + +} + +/// Applies padding to an element, taking the current element-margin value into account. +/// @param {mixed} $tb Top/bottom padding. +/// @param {mixed} $lr Left/right padding. +/// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left) +/// @param {bool} $important If true, adds !important. +@mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) { + + @if $important { + $important: '!important'; + } + + $x: 0.1em; + + @if unit(_size(element-margin)) == 'rem' { + $x: 0.1rem; + } + + padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important}; + +} + +/// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp). +/// @param {string} $svg SVG data URL. +/// @return {string} Encoded SVG data URL. +@function svg-url($svg) { + + $svg: str-replace($svg, '"', '\''); + $svg: str-replace($svg, '%', '%25'); + $svg: str-replace($svg, '<', '%3C'); + $svg: str-replace($svg, '>', '%3E'); + $svg: str-replace($svg, '&', '%26'); + $svg: str-replace($svg, '#', '%23'); + $svg: str-replace($svg, '{', '%7B'); + $svg: str-replace($svg, '}', '%7D'); + $svg: str-replace($svg, ';', '%3B'); + + @return url("data:image/svg+xml;charset=utf8,#{$svg}"); + } \ No newline at end of file diff --git a/assets/sass/libs/_vars.scss b/assets/sass/libs/_vars.scss index 55d6382..5c2d8e6 100644 --- a/assets/sass/libs/_vars.scss +++ b/assets/sass/libs/_vars.scss @@ -1,64 +1,64 @@ -// Misc. - $misc: ( - z-index-base: 10000, - header-side: 'right' - ); - -// Duration. - $duration: ( - header: 0.5s, - transition: 0.2s - ); - -// Size. - $size: ( - border-radius: 5px, - border-width: 2px, - element-height: 2.75em, - element-margin: 2.25em, - container-width: 45em - ); - -// Font. - $font: ( - family: ('Lato', sans-serif), - family-fixed: ('Source Code Pro', monospace), - weight: 400, - weight-bold: 700 - ); - -// Palette. - $palette: ( - bg: #fff, - fg: #888, - fg-bold: #777, - fg-light: #aaa, - border: #f4f4f4, - border-bg: #fafafa, - border2: #e4e4e4, - border2-bg: #f4f4f4, - border3: #e0e0e0, - border3-bg: #eaeaea, - - accent1: ( - bg: #4acaa8, - fg-bold: #ffffff, - fg: mix(#4acaa8, #ffffff, 25%), - fg-light: mix(#4acaa8, #ffffff, 40%) - ), - - accent2: ( - bg: #989898, - fg-bold: #ffffff, - fg: mix(#989898, #ffffff, 25%), - fg-light: mix(#989898, #ffffff, 40%) - ), - - header: ( - bg: #4acaa8, - fg-bold: #ffffff, - fg: mix(#4acaa8, #ffffff, 25%), - fg-light: mix(#4acaa8, #ffffff, 40%), - border: mix(#4acaa8, #ffffff, 90%) - ) +// Misc. + $misc: ( + z-index-base: 10000, + header-side: 'right' + ); + +// Duration. + $duration: ( + header: 0.5s, + transition: 0.2s + ); + +// Size. + $size: ( + border-radius: 5px, + border-width: 2px, + element-height: 2.75em, + element-margin: 2.25em, + container-width: 45em + ); + +// Font. + $font: ( + family: ('Lato', sans-serif), + family-fixed: ('Source Code Pro', monospace), + weight: 400, + weight-bold: 700 + ); + +// Palette. + $palette: ( + bg: #fff, + fg: #888, + fg-bold: #777, + fg-light: #aaa, + border: #f4f4f4, + border-bg: #fafafa, + border2: #e4e4e4, + border2-bg: #f4f4f4, + border3: #e0e0e0, + border3-bg: #eaeaea, + + accent1: ( + bg: #4acaa8, + fg-bold: #ffffff, + fg: mix(#4acaa8, #ffffff, 25%), + fg-light: mix(#4acaa8, #ffffff, 40%) + ), + + accent2: ( + bg: #989898, + fg-bold: #ffffff, + fg: mix(#989898, #ffffff, 25%), + fg-light: mix(#989898, #ffffff, 40%) + ), + + header: ( + bg: #4acaa8, + fg-bold: #ffffff, + fg: mix(#4acaa8, #ffffff, 25%), + fg-light: mix(#4acaa8, #ffffff, 40%), + border: mix(#4acaa8, #ffffff, 90%) + ) ); \ No newline at end of file diff --git a/index.html b/index.html index 8701ac6..2027e0d 100644 --- a/index.html +++ b/index.html @@ -1,442 +1,442 @@ - - - - - - - Adrien CHARBONNEAU – Naturaliste écologue - - - - - - - - - - - - - - - - - - - - - -
- - -
- - -
-
- -
-
-
-

Présentation

-

Bonjour et bienvenue sur mon site !

-
-
- Adrien CHARBONNEAU
- 24 ans
- 69100 - Villeurbanne, Rhône - France -
-

Cette page est, comme vous l'aurez compris, complémentaire à mon Curriculum Vitae (que vous pourrez retrouver ci-dessous).
- Elle vous présente divers liens et informations utiles à ma présentation. Vous retrouverez notamment la liste de mes compétences professionnelles.
-

Que fais-je en ce moment ? Pour le savoir rendez-vous ici : - ACTUALITÉ -

- N’hésitez pas à me contacter, que ce soit pour une question, une compétence ou une demande de précision sur une expérience professionnelle, en utilisant mon adresse courriel ci-dessous :
-

-

– CURRICULUM VITAE –

-
-
- - - - - -
-
-

Publications

-

Mes différentes publications et écrits scientifiques majeurs qui ont jalonnés mon Master en Biodiversité, Écologie et Évolution.

-
-
- -
-

Compétition entre deux espèces de Geckos sur l’île de Porquerolles (2019-2020)

-

(Bientôt disponible) - La Tarente de Maurétanie (Tarentola mauritanica) est, sur l'île de Porquerolles (83), une espèce importée par l'homme. Le Gecko indigène de l'île et occupant la même niche écologique que cette dernière est l'Hémidactyle verruqueux (Hemidactylus turcicus). Il est supposé qu'une compétition réside entre les deux espèces.

-
-
-
- -
-

Caractérisation du territoire de reproduction de la Pie-grièche méridionale (2019)

-

La superficie du territoire de reproduction de la Pie-grièche méridionale (Lanius meridionalis) étant très peu connu, cette étude souhaite apporter des précisions quant à cela.

-
-
-
- -
-

Étude du lien entre communautés d’Orthoptères et hauteur de végétation par différentes méthodes d’échantillonnage dans la vallée de l’Ubaye (2018-2019)

-

Sujet de l'école de terrain 2018. Dans le Parc National du Mercantour, la hauteur de végétation a-t-elle une importance dans la répartition des communautés d'Orthoptères ?

-
-
-
-
-
- - - -
-
-

Supports de stage

-

De nombreuses données et annexes sont disponible durant un stage. Elles sont regroupées par stage :

-
-
- -
-

Support de stage de Master 2 : Impact de la lumière artificielle et de la structure du paysage sur la biodiversité en période nocturne (2020)

-

Il est admis que la lumière artificielle a des effets néfastes sur la biodiversité. Qu'en est-il en addition à la structure paysagère et au sein du Parc Naturel Régional des Baronnies provençales ?

-
-
-
- -
-

Support de stage de Master 1 : Caractérisation du territoire de reproduction de la Pie-grièche méridionale (2019)

-

Dans un but de mesures de gestion de la garrigue et de précision du protocole d'échantillonnage du Plan National d'Actions sur les Pie-grièches (ici la Pie-grièche méridionale), la surface du territoire de reproduction de l'espèce est une information clé.

-
-
-
-
-
- - -
-
-

Compétences

-

Mes compétences sont présentées dans la liste ci-dessous, vous y trouverez les références du matériel et des ressources technologiques (ex : logiciel) que je maîtrise. N’hésitez pas, comme précisé précédemment, à me questionner (ou demander un avis) sur une compétence, méthode ou matériel utilisé, j’y répondrai avec plaisir.
- Dans les parties concernant le matériel, un astérisque (*) signifie que je possède le matériel cité. Pour les identifications acoustiques, le matériel est cité dans la section “acoustique”.

- -
-
-
-
Compétences naturalistes
- Suivi ornithologique et entomologique (odonates) dans la Tarentaise (73) -
-
    -
  • Ornithologie

    Identification visuelle, en main (formation de baguage) et acoustique.

  • -
  • Entomologie

    (Lépidoptères, Odonates, Orthoptères) - Identification visuelle, en main (capture au filet, prospection au "drap" nocturne) et acoustique.

  • -
  • Mammalogie

    (Chiroptères, Macro/Méso/Micro-mammifères) - Identification visuelle et auditive - Télémétrie / Analyse de pelote de réjection.

  • -
  • Herpétologie

    Identification visuelle, en main (plaque à reptiles, "seau" à amphibiens) et acoustique.

  • -
  • Botanique généraliste

    Identification des familles et utilisation des flores (Flora Gallica / Flore Méd' / Flores forestières...) - Détermination des habitats - Loupe de botanique, mise en herbier et photographie.

  • -
-
-
-
-
Compétences en méthodologie et en démarche scientifique
- Radiopistage de Pie-grièche méridionale (Lanius meridionalis) dans les Garrigues de Lançon (13) -
-
    -
  • Bases théoriques de l'écologie

    -

      -
    • Évolution
    • -
    • Conservation
    • -
    • Gestion de la biodiversité
    • -
    • Bio/Éco-acoustique
    • -
    • Paysage
    • -
    -

  • -
  • Mise en place de protocole / étude pilote

  • -
  • Application de protocole/stratégie d'échantillonnage
  • -
  • Analyse de données

    (voir Modélisation et Cartographie ci-dessous)

  • -
  • Rédaction de rapports d'étude/articles scientifiques

    Introduction, Matériel et Méthode, Résultats, Discussion/Conclusion

  • -
  • Rédaction de rapports d'inventaires/prédiagnostics/Volet Naturel d'Étude d'Impact
  • -
-
-
- - - -
-
Compétences en analyses spatiales et en cartographie
- Tirage aléatoire de positions sur le territoire de la France métropolitaine -
-
    -
  • QGIS

    SAGA, GRASS, Modéleur graphique

  • -
  • ARCGIS (bases)
  • -
  • R / packages

      -
    • Cartographie : rgdal ; rgeos ; gridExtra ; raster ; RSAGA ; maptools ; spatstat ; cartography ; sf ; sp
    • -
    • Acoustique : tuneR ; seewave ; soundecology ; pumilioR
    • -
    • Écologie du paysage : spatialEco ; landscapemetrics ; landscapetools
    • -
    • Domaine vital d'espèce : adehabitatHR
    • -

  • -
-
-
- -
-
Compétences acoustiques et audionaturalistes
- AudioMoth durant le stage de M2 -
-
    -
  • Prise de son

      -
    • Song Meter Acoustic Recorder (SM4 Acoustic)
    • -
    • AudioMoth (version 1.1.0 et 1.2.0) *
    • -
    • Song Meter SM4BAT-FS Ultrasonic Recorder (SM4 bat)
    • -
    • Enregistreur ZOOM H5 * (couplé à des microphones Primo EM172 et une parabole)
    • -
    • PETTERSSON D240x
    • -
    • Echo Meter Touch 2 Pro
    • -
    • Magenta Bat 5 Detector *
    • - -

  • -
  • Analyse acoustique

    Identification des espèces, calcul des indices acoustiques,...

      -
    • Audacity
    • -
    • Syrinx
    • -
    • Kaléidoscope
    • -
    • Batexplorer
    • -
    • Raven Lite
    • -
    • R / packages : tuneR ; seewave ; soundecology ; pumilioR
    • - -

  • -
-
-
-

- Sonogramme partiel d’un Coucou geai (Clamator glandarius) en migration nocturne – © Adrien CHARBONNEAU - - -

-
-
Les autres compétences et intérêts
- Lac du Lauzanier - Mercantour (04) -
-
    -
  • Astronomie/Météorologie
  • -
  • Randonnée

    Très bonne condition physique et très bonnes connaissances des milieux fréquentés

  • -
  • Informatique

      -
    • Connaissances des systèmes d’exploitations Windows/MacOS/Distributions Linux – Maintenance de ces derniers
    • -
    • Création de site internet : HTML / CSS / PHP
    • -
    • Base de données MySQL
    • -
    • Language de programmation : R, JavaScript, C++, Python, Bash (shell), Git (Dépôt personnel / Framagit / Github)
    • -
    • Gestion/Montage de vidéo et photographies
    • -
    • Connaissances en sécurité informatique
    • -

  • -
  • Électronique et "bricolage"

      -
    • Utilisation et programmation de Raspberry Pi/Arduino : Récepteur ADS-B / Serveur web / Routeur wifi / Projet de station météo, d'enregistreur passif (type SM4 / AudioMoth) et de caméra pour nichoir.
    • -
    • Montage d’ordinateur fixe et portable / connaissance du matériel
    • -
    • “Touche à tout” : bricolage divers (ex : nichoirs, parabole, modélisme,…)
    • -

  • -
  • Communication

      -
    • Public : Prise de contact, oral, conférence, animation ...
    • -
    • Réseaux sociaux : Facebook; Twitter, Instagram, Blog,...
    • -

  • -
-
-
- -
- -
-
- - - -
- - - - -
- - - - - - - - - - + + + + + + + Adrien CHARBONNEAU – Naturaliste écologue + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ +
+
+
+

Présentation

+

Bonjour et bienvenue sur mon site !

+
+
+ Adrien CHARBONNEAU
+ 24 ans
+ 69100 - Villeurbanne, Rhône - France +
+

Cette page est, comme vous l'aurez compris, complémentaire à mon Curriculum Vitae (que vous pourrez retrouver ci-dessous).
+ Elle vous présente divers liens et informations utiles à ma présentation. Vous retrouverez notamment la liste de mes compétences professionnelles.
+

Que fais-je en ce moment ? Pour le savoir rendez-vous ici : - ACTUALITÉ -

+ N’hésitez pas à me contacter, que ce soit pour une question, une compétence ou une demande de précision sur une expérience professionnelle, en utilisant mon adresse courriel ci-dessous :
+

+

– CURRICULUM VITAE –

+
+
+ + + + + +
+
+

Publications

+

Mes différentes publications et écrits scientifiques majeurs qui ont jalonnés mon Master en Biodiversité, Écologie et Évolution.

+
+
+ +
+

Compétition entre deux espèces de Geckos sur l’île de Porquerolles (2019-2020)

+

(Bientôt disponible) - La Tarente de Maurétanie (Tarentola mauritanica) est, sur l'île de Porquerolles (83), une espèce importée par l'homme. Le Gecko indigène de l'île et occupant la même niche écologique que cette dernière est l'Hémidactyle verruqueux (Hemidactylus turcicus). Il est supposé qu'une compétition réside entre les deux espèces.

+
+
+
+ +
+

Caractérisation du territoire de reproduction de la Pie-grièche méridionale (2019)

+

La superficie du territoire de reproduction de la Pie-grièche méridionale (Lanius meridionalis) étant très peu connu, cette étude souhaite apporter des précisions quant à cela.

+
+
+
+ +
+

Étude du lien entre communautés d’Orthoptères et hauteur de végétation par différentes méthodes d’échantillonnage dans la vallée de l’Ubaye (2018-2019)

+

Sujet de l'école de terrain 2018. Dans le Parc National du Mercantour, la hauteur de végétation a-t-elle une importance dans la répartition des communautés d'Orthoptères ?

+
+
+
+
+
+ + + +
+
+

Supports de stage

+

De nombreuses données et annexes sont disponible durant un stage. Elles sont regroupées par stage :

+
+
+ +
+

Support de stage de Master 2 : Impact de la lumière artificielle et de la structure du paysage sur la biodiversité en période nocturne (2020)

+

Il est admis que la lumière artificielle a des effets néfastes sur la biodiversité. Qu'en est-il en addition à la structure paysagère et au sein du Parc Naturel Régional des Baronnies provençales ?

+
+
+
+ +
+

Support de stage de Master 1 : Caractérisation du territoire de reproduction de la Pie-grièche méridionale (2019)

+

Dans un but de mesures de gestion de la garrigue et de précision du protocole d'échantillonnage du Plan National d'Actions sur les Pie-grièches (ici la Pie-grièche méridionale), la surface du territoire de reproduction de l'espèce est une information clé.

+
+
+
+
+
+ + +
+
+

Compétences

+

Mes compétences sont présentées dans la liste ci-dessous, vous y trouverez les références du matériel et des ressources technologiques (ex : logiciel) que je maîtrise. N’hésitez pas, comme précisé précédemment, à me questionner (ou demander un avis) sur une compétence, méthode ou matériel utilisé, j’y répondrai avec plaisir.
+ Dans les parties concernant le matériel, un astérisque (*) signifie que je possède le matériel cité. Pour les identifications acoustiques, le matériel est cité dans la section “acoustique”.

+ +
+
+
+
Compétences naturalistes
+ Suivi ornithologique et entomologique (odonates) dans la Tarentaise (73) +
+
    +
  • Ornithologie

    Identification visuelle, en main (formation de baguage) et acoustique.

  • +
  • Entomologie

    (Lépidoptères, Odonates, Orthoptères) - Identification visuelle, en main (capture au filet, prospection au "drap" nocturne) et acoustique.

  • +
  • Mammalogie

    (Chiroptères, Macro/Méso/Micro-mammifères) - Identification visuelle et auditive - Télémétrie / Analyse de pelote de réjection.

  • +
  • Herpétologie

    Identification visuelle, en main (plaque à reptiles, "seau" à amphibiens) et acoustique.

  • +
  • Botanique généraliste

    Identification des familles et utilisation des flores (Flora Gallica / Flore Méd' / Flores forestières...) - Détermination des habitats - Loupe de botanique, mise en herbier et photographie.

  • +
+
+
+
+
Compétences en méthodologie et en démarche scientifique
+ Radiopistage de Pie-grièche méridionale (Lanius meridionalis) dans les Garrigues de Lançon (13) +
+
    +
  • Bases théoriques de l'écologie

    +

      +
    • Évolution
    • +
    • Conservation
    • +
    • Gestion de la biodiversité
    • +
    • Bio/Éco-acoustique
    • +
    • Paysage
    • +
    +

  • +
  • Mise en place de protocole / étude pilote

  • +
  • Application de protocole/stratégie d'échantillonnage
  • +
  • Analyse de données

    (voir Modélisation et Cartographie ci-dessous)

  • +
  • Rédaction de rapports d'étude/articles scientifiques

    Introduction, Matériel et Méthode, Résultats, Discussion/Conclusion

  • +
  • Rédaction de rapports d'inventaires/prédiagnostics/Volet Naturel d'Étude d'Impact
  • +
+
+
+ + + +
+
Compétences en analyses spatiales et en cartographie
+ Tirage aléatoire de positions sur le territoire de la France métropolitaine +
+
    +
  • QGIS

    SAGA, GRASS, Modéleur graphique

  • +
  • ARCGIS (bases)
  • +
  • R / packages

      +
    • Cartographie : rgdal ; rgeos ; gridExtra ; raster ; RSAGA ; maptools ; spatstat ; cartography ; sf ; sp
    • +
    • Acoustique : tuneR ; seewave ; soundecology ; pumilioR
    • +
    • Écologie du paysage : spatialEco ; landscapemetrics ; landscapetools
    • +
    • Domaine vital d'espèce : adehabitatHR
    • +

  • +
+
+
+ +
+
Compétences acoustiques et audionaturalistes
+ AudioMoth durant le stage de M2 +
+
    +
  • Prise de son

      +
    • Song Meter Acoustic Recorder (SM4 Acoustic)
    • +
    • AudioMoth (version 1.1.0 et 1.2.0) *
    • +
    • Song Meter SM4BAT-FS Ultrasonic Recorder (SM4 bat)
    • +
    • Enregistreur ZOOM H5 * (couplé à des microphones Primo EM172 et une parabole)
    • +
    • PETTERSSON D240x
    • +
    • Echo Meter Touch 2 Pro
    • +
    • Magenta Bat 5 Detector *
    • + +

  • +
  • Analyse acoustique

    Identification des espèces, calcul des indices acoustiques,...

      +
    • Audacity
    • +
    • Syrinx
    • +
    • Kaléidoscope
    • +
    • Batexplorer
    • +
    • Raven Lite
    • +
    • R / packages : tuneR ; seewave ; soundecology ; pumilioR
    • + +

  • +
+
+
+

+ Sonogramme partiel d’un Coucou geai (Clamator glandarius) en migration nocturne – © Adrien CHARBONNEAU + + +

+
+
Les autres compétences et intérêts
+ Lac du Lauzanier - Mercantour (04) +
+
    +
  • Astronomie/Météorologie
  • +
  • Randonnée

    Très bonne condition physique et très bonnes connaissances des milieux fréquentés

  • +
  • Informatique

      +
    • Connaissances des systèmes d’exploitations Windows/MacOS/Distributions Linux – Maintenance de ces derniers
    • +
    • Création de site internet : HTML / CSS / PHP
    • +
    • Base de données MySQL
    • +
    • Language de programmation : R, JavaScript, C++, Python, Bash (shell), Git (Dépôt personnel / Framagit / Github)
    • +
    • Gestion/Montage de vidéo et photographies
    • +
    • Connaissances en sécurité informatique
    • +

  • +
  • Électronique et "bricolage"

      +
    • Utilisation et programmation de Raspberry Pi/Arduino : Récepteur ADS-B / Serveur web / Routeur wifi / Projet de station météo, d'enregistreur passif (type SM4 / AudioMoth) et de caméra pour nichoir.
    • +
    • Montage d’ordinateur fixe et portable / connaissance du matériel
    • +
    • “Touche à tout” : bricolage divers (ex : nichoirs, parabole, modélisme,…)
    • +

  • +
  • Communication

      +
    • Public : Prise de contact, oral, conférence, animation ...
    • +
    • Réseaux sociaux : Facebook; Twitter, Instagram, Blog,...
    • +

  • +
+
+
+ +
+ +
+
+ + + +
+ + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 5ea0dc0..f0b72f9 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,23 +1,23 @@ - - - - - https://adriencharbonneau.fr/ - - - https://adriencharbonneau.fr/docs/CV_Adrien_CHARBONNEAU.pdf - - - https://adriencharbonneau.fr/ACTUALITE.html - - - https://adriencharbonneau.fr/docs/PGM.pdf - - - https://adriencharbonneau.fr/docs/ORTHOPTERES.pdf - + + + + + https://adriencharbonneau.fr/ + + + https://adriencharbonneau.fr/docs/CV_Adrien_CHARBONNEAU.pdf + + + https://adriencharbonneau.fr/ACTUALITE.html + + + https://adriencharbonneau.fr/docs/PGM.pdf + + + https://adriencharbonneau.fr/docs/ORTHOPTERES.pdf + \ No newline at end of file