diff --git a/astroid.xml b/astroid.xml index 249728d5..a58455c8 100644 --- a/astroid.xml +++ b/astroid.xml @@ -4,7 +4,7 @@ astroid Astroid Framework Team November 2023 - 3.0.3 + 3.0.4 https://astroidframe.work/ Copyright (C) 2023 TemPlaza, Inc. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt diff --git a/astroid_framework.xml b/astroid_framework.xml index c3abc8c9..3c89894a 100644 --- a/astroid_framework.xml +++ b/astroid_framework.xml @@ -1,13 +1,13 @@ Astroid Framework - 3.0.3 + 3.0.4 https://astroidframe.work/ astroid library 0 - https://github.com/templaza/astroid-framework/releases/download/v3.0.3/astroid-framework-3.0.3.zip + https://github.com/templaza/astroid-framework/releases/download/v3.0.4/astroid-framework-3.0.4.zip stable diff --git a/css/animate.min.css b/css/animate.min.css new file mode 100644 index 00000000..7ee96bd0 --- /dev/null +++ b/css/animate.min.css @@ -0,0 +1,11 @@ +@charset "UTF-8"; + +/*! + * animate.css -http://daneden.me/animate + * Version - 3.7.0 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2018 Daniel Eden + */ + +@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translateZ(0);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;-webkit-transform-origin:center bottom;animation-name:bounce;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes pulse{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes rubberBand{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{0%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-name:headShake;-webkit-animation-timing-function:ease-in-out;animation-name:headShake;animation-timing-function:ease-in-out}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}to{-webkit-transform:rotate(0deg);transform:rotate(0deg)}}.swing{-webkit-animation-name:swing;-webkit-transform-origin:top center;animation-name:swing;transform-origin:top center}@-webkit-keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes tada{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate(-3deg);transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(3deg);transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate(-3deg);transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{-webkit-transform:scaleX(1);transform:scaleX(1)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate(-5deg);transform:translate3d(-25%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate(3deg);transform:translate3d(20%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate(-3deg);transform:translate3d(-15%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate(2deg);transform:translate3d(10%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate(-1deg);transform:translate3d(-5%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translateZ(0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;-webkit-transform-origin:center;animation-name:jello;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.heartBeat{-webkit-animation-duration:1.3s;-webkit-animation-name:heartBeat;-webkit-animation-timing-function:ease-in-out;animation-duration:1.3s;animation-name:heartBeat;animation-timing-function:ease-in-out}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{-webkit-transform:scale3d(1.03,1.03,1.03);opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{-webkit-transform:scaleX(1);opacity:1;transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{-webkit-transform:scale3d(1.03,1.03,1.03);opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{-webkit-transform:scaleX(1);opacity:1;transform:scaleX(1)}}.bounceIn{-webkit-animation-duration:.75s;-webkit-animation-name:bounceIn;animation-duration:.75s;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(0,-3000px,0);opacity:0;transform:translate3d(0,-3000px,0)}60%{-webkit-transform:translate3d(0,25px,0);opacity:1;transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(0,-3000px,0);opacity:0;transform:translate3d(0,-3000px,0)}60%{-webkit-transform:translate3d(0,25px,0);opacity:1;transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(-3000px,0,0);opacity:0;transform:translate3d(-3000px,0,0)}60%{-webkit-transform:translate3d(25px,0,0);opacity:1;transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(-3000px,0,0);opacity:0;transform:translate3d(-3000px,0,0)}60%{-webkit-transform:translate3d(25px,0,0);opacity:1;transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(3000px,0,0);opacity:0;transform:translate3d(3000px,0,0)}60%{-webkit-transform:translate3d(-25px,0,0);opacity:1;transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(3000px,0,0);opacity:0;transform:translate3d(3000px,0,0)}60%{-webkit-transform:translate3d(-25px,0,0);opacity:1;transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(0,3000px,0);opacity:0;transform:translate3d(0,3000px,0)}60%{-webkit-transform:translate3d(0,-20px,0);opacity:1;transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:translate3d(0,3000px,0);opacity:0;transform:translate3d(0,3000px,0)}60%{-webkit-transform:translate3d(0,-20px,0);opacity:1;transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{-webkit-transform:scale3d(1.1,1.1,1.1);opacity:1;transform:scale3d(1.1,1.1,1.1)}to{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{-webkit-transform:scale3d(1.1,1.1,1.1);opacity:1;transform:scale3d(1.1,1.1,1.1)}to{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-duration:.75s;-webkit-animation-name:bounceOut;animation-duration:.75s;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{-webkit-transform:translate3d(0,-20px,0);opacity:1;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{-webkit-transform:translate3d(0,-20px,0);opacity:1;transform:translate3d(0,-20px,0)}to{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{-webkit-transform:translate3d(20px,0,0);opacity:1;transform:translate3d(20px,0,0)}to{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{-webkit-transform:translate3d(20px,0,0);opacity:1;transform:translate3d(20px,0,0)}to{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{-webkit-transform:translate3d(-20px,0,0);opacity:1;transform:translate3d(-20px,0,0)}to{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{-webkit-transform:translate3d(-20px,0,0);opacity:1;transform:translate3d(-20px,0,0)}to{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{-webkit-transform:translate3d(0,20px,0);opacity:1;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{-webkit-transform:translate3d(0,20px,0);opacity:1;transform:translate3d(0,20px,0)}to{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{-webkit-transform:translate3d(0,-100%,0);opacity:0;transform:translate3d(0,-100%,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInDown{0%{-webkit-transform:translate3d(0,-100%,0);opacity:0;transform:translate3d(0,-100%,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInDownBig{0%{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{-webkit-transform:translate3d(-100%,0,0);opacity:0;transform:translate3d(-100%,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInLeft{0%{-webkit-transform:translate3d(-100%,0,0);opacity:0;transform:translate3d(-100%,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{-webkit-transform:translate3d(100%,0,0);opacity:0;transform:translate3d(100%,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInRight{0%{-webkit-transform:translate3d(100%,0,0);opacity:0;transform:translate3d(100%,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInRightBig{0%{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{-webkit-transform:translate3d(0,100%,0);opacity:0;transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInUp{0%{-webkit-transform:translate3d(0,100%,0);opacity:0;transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes fadeInUpBig{0%{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{-webkit-transform:translate3d(0,100%,0);opacity:0;transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{-webkit-transform:translate3d(0,100%,0);opacity:0;transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{-webkit-transform:translate3d(0,2000px,0);opacity:0;transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0);opacity:0;transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0);opacity:0;transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{-webkit-transform:translate3d(-2000px,0,0);opacity:0;transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0);opacity:0;transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0);opacity:0;transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{-webkit-transform:translate3d(2000px,0,0);opacity:0;transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{-webkit-transform:translate3d(0,-100%,0);opacity:0;transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{-webkit-transform:translate3d(0,-100%,0);opacity:0;transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{-webkit-transform:translate3d(0,-2000px,0);opacity:0;transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-animation-timing-function:ease-out;-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);animation-timing-function:ease-out;transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn)}40%{-webkit-animation-timing-function:ease-out;-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);animation-timing-function:ease-out;transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg)}50%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);animation-timing-function:ease-in;transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg)}80%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);animation-timing-function:ease-in;transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg)}to{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);animation-timing-function:ease-in;transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg)}}@keyframes flip{0%{-webkit-animation-timing-function:ease-out;-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);animation-timing-function:ease-out;transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn)}40%{-webkit-animation-timing-function:ease-out;-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);animation-timing-function:ease-out;transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg)}50%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);animation-timing-function:ease-in;transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg)}80%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);animation-timing-function:ease-in;transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg)}to{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);animation-timing-function:ease-in;transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg)}}.animated.flip{-webkit-animation-name:flip;-webkit-backface-visibility:visible;animation-name:flip;backface-visibility:visible}@-webkit-keyframes flipInX{0%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in;transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);opacity:1;transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in;transform:perspective(400px) rotateX(-20deg)}60%{-webkit-transform:perspective(400px) rotateX(10deg);opacity:1;transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-animation-name:flipInX;-webkit-backface-visibility:visible!important;animation-name:flipInX;backface-visibility:visible!important}@-webkit-keyframes flipInY{0%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateY(90deg);animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateY(90deg)}40%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateY(-20deg);animation-timing-function:ease-in;transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);opacity:1;transform:perspective(400px) rotateY(10deg)}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateY(90deg);animation-timing-function:ease-in;opacity:0;transform:perspective(400px) rotateY(90deg)}40%{-webkit-animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateY(-20deg);animation-timing-function:ease-in;transform:perspective(400px) rotateY(-20deg)}60%{-webkit-transform:perspective(400px) rotateY(10deg);opacity:1;transform:perspective(400px) rotateY(10deg)}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{-webkit-animation-name:flipInY;-webkit-backface-visibility:visible!important;animation-name:flipInY;backface-visibility:visible!important}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);opacity:1;transform:perspective(400px) rotateX(-20deg)}to{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0;transform:perspective(400px) rotateX(90deg)}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateX(-20deg);opacity:1;transform:perspective(400px) rotateX(-20deg)}to{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0;transform:perspective(400px) rotateX(90deg)}}.flipOutX{-webkit-animation-duration:.75s;-webkit-animation-name:flipOutX;-webkit-backface-visibility:visible!important;animation-duration:.75s;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);opacity:1;transform:perspective(400px) rotateY(-15deg)}to{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0;transform:perspective(400px) rotateY(90deg)}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotateY(-15deg);opacity:1;transform:perspective(400px) rotateY(-15deg)}to{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0;transform:perspective(400px) rotateY(90deg)}}.flipOutY{-webkit-animation-duration:.75s;-webkit-animation-name:flipOutY;-webkit-backface-visibility:visible!important;animation-duration:.75s;animation-name:flipOutY;backface-visibility:visible!important}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);opacity:0;transform:translate3d(100%,0,0) skewX(-30deg)}60%{-webkit-transform:skewX(20deg);opacity:1;transform:skewX(20deg)}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes lightSpeedIn{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);opacity:0;transform:translate3d(100%,0,0) skewX(-30deg)}60%{-webkit-transform:skewX(20deg);opacity:1;transform:skewX(20deg)}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-name:lightSpeedIn;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);opacity:0;transform:translate3d(100%,0,0) skewX(30deg)}}@keyframes lightSpeedOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);opacity:0;transform:translate3d(100%,0,0) skewX(30deg)}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-name:lightSpeedOut;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);-webkit-transform-origin:center;opacity:0;transform:rotate(-200deg);transform-origin:center}to{-webkit-transform:translateZ(0);-webkit-transform-origin:center;opacity:1;transform:translateZ(0);transform-origin:center}}@keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);-webkit-transform-origin:center;opacity:0;transform:rotate(-200deg);transform-origin:center}to{-webkit-transform:translateZ(0);-webkit-transform-origin:center;opacity:1;transform:translateZ(0);transform-origin:center}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(-45deg);transform-origin:left bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:left bottom;opacity:1;transform:translateZ(0);transform-origin:left bottom}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(-45deg);transform-origin:left bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:left bottom;opacity:1;transform:translateZ(0);transform-origin:left bottom}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(45deg);transform-origin:right bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:right bottom;opacity:1;transform:translateZ(0);transform-origin:right bottom}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate(45deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(45deg);transform-origin:right bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:right bottom;opacity:1;transform:translateZ(0);transform-origin:right bottom}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(45deg);transform-origin:left bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:left bottom;opacity:1;transform:translateZ(0);transform-origin:left bottom}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate(45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(45deg);transform-origin:left bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:left bottom;opacity:1;transform:translateZ(0);transform-origin:left bottom}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(-90deg);transform-origin:right bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:right bottom;opacity:1;transform:translateZ(0);transform-origin:right bottom}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(-90deg);transform-origin:right bottom}to{-webkit-transform:translateZ(0);-webkit-transform-origin:right bottom;opacity:1;transform:translateZ(0);transform-origin:right bottom}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center;opacity:1;transform-origin:center}to{-webkit-transform:rotate(200deg);-webkit-transform-origin:center;opacity:0;transform:rotate(200deg);transform-origin:center}}@keyframes rotateOut{0%{-webkit-transform-origin:center;opacity:1;transform-origin:center}to{-webkit-transform:rotate(200deg);-webkit-transform-origin:center;opacity:0;transform:rotate(200deg);transform-origin:center}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;opacity:1;transform-origin:left bottom}to{-webkit-transform:rotate(45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(45deg);transform-origin:left bottom}}@keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;opacity:1;transform-origin:left bottom}to{-webkit-transform:rotate(45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(45deg);transform-origin:left bottom}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;opacity:1;transform-origin:right bottom}to{-webkit-transform:rotate(-45deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(-45deg);transform-origin:right bottom}}@keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;opacity:1;transform-origin:right bottom}to{-webkit-transform:rotate(-45deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(-45deg);transform-origin:right bottom}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;opacity:1;transform-origin:left bottom}to{-webkit-transform:rotate(-45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(-45deg);transform-origin:left bottom}}@keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;opacity:1;transform-origin:left bottom}to{-webkit-transform:rotate(-45deg);-webkit-transform-origin:left bottom;opacity:0;transform:rotate(-45deg);transform-origin:left bottom}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;opacity:1;transform-origin:right bottom}to{-webkit-transform:rotate(90deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(90deg);transform-origin:right bottom}}@keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;opacity:1;transform-origin:right bottom}to{-webkit-transform:rotate(90deg);-webkit-transform-origin:right bottom;opacity:0;transform:rotate(90deg);transform-origin:right bottom}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;-webkit-transform-origin:top left;animation-timing-function:ease-in-out;transform-origin:top left}20%,60%{-webkit-animation-timing-function:ease-in-out;-webkit-transform:rotate(80deg);-webkit-transform-origin:top left;animation-timing-function:ease-in-out;transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-animation-timing-function:ease-in-out;-webkit-transform:rotate(60deg);-webkit-transform-origin:top left;animation-timing-function:ease-in-out;opacity:1;transform:rotate(60deg);transform-origin:top left}to{-webkit-transform:translate3d(0,700px,0);opacity:0;transform:translate3d(0,700px,0)}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;-webkit-transform-origin:top left;animation-timing-function:ease-in-out;transform-origin:top left}20%,60%{-webkit-animation-timing-function:ease-in-out;-webkit-transform:rotate(80deg);-webkit-transform-origin:top left;animation-timing-function:ease-in-out;transform:rotate(80deg);transform-origin:top left}40%,80%{-webkit-animation-timing-function:ease-in-out;-webkit-transform:rotate(60deg);-webkit-transform-origin:top left;animation-timing-function:ease-in-out;opacity:1;transform:rotate(60deg);transform-origin:top left}to{-webkit-transform:translate3d(0,700px,0);opacity:0;transform:translate3d(0,700px,0)}}.hinge{-webkit-animation-duration:2s;-webkit-animation-name:hinge;animation-duration:2s;animation-name:hinge}@-webkit-keyframes jackInTheBox{0%{-webkit-transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{-webkit-transform:scale(1);opacity:1;transform:scale(1)}}@keyframes jackInTheBox{0%{-webkit-transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{-webkit-transform:scale(1);opacity:1;transform:scale(1)}}.jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);opacity:0;transform:translate3d(-100%,0,0) rotate(-120deg)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}@keyframes rollIn{0%{-webkit-transform:translate3d(-100%,0,0) rotate(-120deg);opacity:0;transform:translate3d(-100%,0,0) rotate(-120deg)}to{-webkit-transform:translateZ(0);opacity:1;transform:translateZ(0)}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) rotate(120deg);opacity:0;transform:translate3d(100%,0,0) rotate(120deg)}}@keyframes rollOut{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) rotate(120deg);opacity:0;transform:translate3d(100%,0,0) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0)}}@keyframes zoomInDown{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(10px,0,0)}}@keyframes zoomInLeft{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(10px,0,0)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(1000px,0,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(-10px,0,0)}}@keyframes zoomInRight{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(1000px,0,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(-10px,0,0)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,1000px,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0)}}@keyframes zoomInUp{0%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,1000px,0)}60%{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{-webkit-transform:scale3d(.3,.3,.3);opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0)}to{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform-origin:center bottom}}@keyframes zoomOutDown{40%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0)}to{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform-origin:center bottom}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);opacity:1;transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{-webkit-transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;opacity:0;transform:scale(.1) translate3d(-2000px,0,0);transform-origin:left center}}@keyframes zoomOutLeft{40%{-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);opacity:1;transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{-webkit-transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;opacity:0;transform:scale(.1) translate3d(-2000px,0,0);transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);opacity:1;transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{-webkit-transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;opacity:0;transform:scale(.1) translate3d(2000px,0,0);transform-origin:right center}}@keyframes zoomOutRight{40%{-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);opacity:1;transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{-webkit-transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;opacity:0;transform:scale(.1) translate3d(2000px,0,0);transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0)}to{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform-origin:center bottom}}@keyframes zoomOutUp{40%{-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19);opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0)}to{-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;animation-timing-function:cubic-bezier(.175,.885,.32,1);opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform-origin:center bottom}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:hidden}}@keyframes slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:hidden}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:hidden}}@keyframes slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:hidden}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:hidden}}@keyframes slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:hidden}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:hidden}}@keyframes slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:hidden}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.animated{-webkit-animation-duration:1s;-webkit-animation-fill-mode:both;animation-duration:1s;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.delay-1s{-webkit-animation-delay:1s;animation-delay:1s}.animated.delay-2s{-webkit-animation-delay:2s;animation-delay:2s}.animated.delay-3s{-webkit-animation-delay:3s;animation-delay:3s}.animated.delay-4s{-webkit-animation-delay:4s;animation-delay:4s}.animated.delay-5s{-webkit-animation-delay:5s;animation-delay:5s}.animated.fast{-webkit-animation-duration:.8s;animation-duration:.8s}.animated.faster{-webkit-animation-duration:.5s;animation-duration:.5s}.animated.slow{-webkit-animation-duration:2s;animation-duration:2s}.animated.slower{-webkit-animation-duration:3s;animation-duration:3s}@media (prefers-reduced-motion){.animated{-webkit-animation:unset!important;-webkit-transition:none!important;animation:unset!important;transition:none!important}} \ No newline at end of file diff --git a/framework/html/com_content/article/default.php b/framework/html/com_content/article/default.php new file mode 100644 index 00000000..d0216a66 --- /dev/null +++ b/framework/html/com_content/article/default.php @@ -0,0 +1,155 @@ +item); + +// Create shortcuts to some parameters. +$params = $this->item->params; +$canEdit = $params->get('access-edit'); +$user = $this->getCurrentUser(); +$info = $params->get('info_block_position', 0); +$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1'; + +// Check if associations are implemented. If they are, define the parameter. +$assocParam = (Associations::isEnabled() && $params->get('show_associations')); +$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); +$isNotPublishedYet = $this->item->publish_up > $currentDate; +$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate; +?> +
+ + params->get('show_page_heading')) : ?> + + item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) { + echo $this->item->pagination; + } + ?> + + get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') + || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?> + + render('above-title'); ?> + get('show_title')) : ?> + + + + + $params, 'item' => $this->item]); ?> + + + + item->event->afterDisplayTitle; ?> + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'above']); ?> + + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tagLayout = new FileLayout('joomla.content.tags'); ?> + item->tagLayout->render($this->item->tags->itemTags); ?> + + + + item->event->beforeDisplayContent; ?> + + get('urls_position', 0) === 0) : ?> + loadTemplate('links'); ?> + + + get('access-view')) : ?> + item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) : + echo $this->item->pagination; + endif; + ?> + item->toc)) : + echo $this->item->toc; + endif; ?> + item); ?> + render('before-content'); ?> +
+ item->text; ?> +
+ render('after-content'); ?> + + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'below']); ?> + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tagLayout = new FileLayout('joomla.content.tags'); ?> + item->tagLayout->render($this->item->tags->itemTags); ?> + + + + item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) : + echo $this->item->pagination; + ?> + + + get('urls_position', 0) === 1) : ?> + loadTemplate('links'); ?> + + + get('show_noauth') == true && $user->get('guest')) : ?> + item); ?> + item->introtext); ?> + + get('show_readmore') && $this->item->fulltext != null) : ?> + getMenu(); ?> + getActive(); ?> + id; ?> + + setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?> + $this->item, 'params' => $params, 'link' => $link]); ?> + + + item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) : + echo $this->item->pagination; + ?> + + renderSocialShare(); ?> + renderAuthorInfo(); ?> + renderComments(); ?> + renderRelatedPosts(); ?> + + item->event->afterDisplayContent; ?> +
\ No newline at end of file diff --git a/framework/html/com_content/article/default_links.php b/framework/html/com_content/article/default_links.php new file mode 100644 index 00000000..7a9cbda3 --- /dev/null +++ b/framework/html/com_content/article/default_links.php @@ -0,0 +1,91 @@ +item->urls); + +// Create shortcuts to some parameters. +$params = $this->item->params; +if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) : +?> + + \ No newline at end of file diff --git a/framework/html/com_content/category/blog.php b/framework/html/com_content/category/blog.php new file mode 100644 index 00000000..cf15d31c --- /dev/null +++ b/framework/html/com_content/category/blog.php @@ -0,0 +1,140 @@ +category->text = $this->category->description; +$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]); +$this->category->description = $this->category->text; + +$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]); +$afterDisplayTitle = trim(implode("\n", $results)); + +$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]); +$beforeDisplayContent = trim(implode("\n", $results)); + +$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]); +$afterDisplayContent = trim(implode("\n", $results)); + +$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1'; + +?> +
+ params->get('show_page_heading')) : ?> + + + + params->get('show_category_title', 1)) : ?> + <> + category->title; ?> + > + + + + params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?> + category->tagLayout = new FileLayout('joomla.content.tags'); ?> + category->tagLayout->render($this->category->tags->itemTags); ?> + + + params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?> +
+ params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> + $this->category->getParams()->get('image'), + 'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'), + ] + ); ?> + + + params->get('show_description') && $this->category->description) : ?> + category->description, '', 'com_content.category'); ?> + + +
+ + + lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?> + params->get('show_no_articles', 1)) : ?> +
+ + +
+ + + + lead_items)) : ?> + + + + intro_items)) : ?> + params->get('blog_class', ''); ?> + params->get('num_columns') > 1) : ?> + params->get('num_columns'); ?> + + + + + link_items)) : ?> +
+ loadTemplate('links'); ?> +
+ + + maxLevel != 0 && !empty($this->children[$this->category->id])) : ?> + + + params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?> + + +
\ No newline at end of file diff --git a/framework/html/com_content/category/blog_item.php b/framework/html/com_content/category/blog_item.php new file mode 100644 index 00000000..73d5404f --- /dev/null +++ b/framework/html/com_content/category/blog_item.php @@ -0,0 +1,128 @@ +item, true); + +$template = Astroid\Framework::getTemplate(); +$document = Astroid\Framework::getDocument(); + +// Create shortcuts to some parameters. +$params = $this->item->params; +$canEdit = $params->get('access-edit'); +$info = $params->get('info_block_position', 0); +$images = json_decode($this->item->images); + +// Check if associations are implemented. If they are, define the parameter. +$assocParam = (Associations::isEnabled() && $params->get('show_associations')); + +$tpl_params = $template->getParams(); + +// Post Format +$post_attribs = new Registry(json_decode($this->item->attribs)); +$post_format = $post_attribs->get('post_format', 'standard'); + +$info_block_layout = ASTROID_JOOMLA_VERSION > 3 ? 'joomla.content.info_block' : 'joomla.content.info_block.block'; + +$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); +$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate) + || ($this->item->publish_down < $currentDate && $this->item->publish_down !== null); + +?> +
+ +
+ + + getImage(); + if ((!empty($images->image_intro)) && $post_format == 'standard') { + echo LayoutHelper::render('joomla.content.intro_image', $this->item); + } else if (is_string($image) && !empty($image)) { + echo '
'; + $document->include('blog.modules.image', ['image' => $image, 'title' => $this->item->title, 'item' => $this->item]); + echo '
'; + } else { + echo LayoutHelper::render('joomla.content.post_formats.post_' . $post_format, array('params' => $post_attribs, 'item' => $this->item)); + } + ?> +
+ renderPostTypeIcon(); ?> + renderArticleBadge(); ?> + + + $params, 'item' => $this->item]); ?> + + + + get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') + || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?> + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'above')); ?> + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tags->itemTags); ?> + + +
+ item); ?> +
+ + get('show_intro')) : ?> + + item->event->afterDisplayTitle; ?> + + + + item->event->beforeDisplayContent; ?> +
+ item->introtext; ?> +
+ + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'below')); ?> + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tags->itemTags); ?> + + + + item->event->beforeDisplayContent; ?> + get('show_readmore') && $this->item->readmore) : + if ($params->get('access-view')) : + $link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + else : + $menu = Factory::getApplication()->getMenu(); + $active = $menu->getActive(); + $itemId = $active->id; + $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); + $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); + endif; ?> + + $this->item, 'params' => $params, 'link' => $link]); ?> + +
+ +
+ + + item->event->afterDisplayContent; ?> +
\ No newline at end of file diff --git a/framework/html/com_content/category/blog_links.php b/framework/html/com_content/category/blog_links.php new file mode 100644 index 00000000..6e2764d2 --- /dev/null +++ b/framework/html/com_content/category/blog_links.php @@ -0,0 +1,24 @@ + +

+
    + link_items as &$item) : ?> +
  • + title; ?> +
  • + +
\ No newline at end of file diff --git a/framework/html/com_content/featured/default.php b/framework/html/com_content/featured/default.php new file mode 100644 index 00000000..f35ce497 --- /dev/null +++ b/framework/html/com_content/featured/default.php @@ -0,0 +1,65 @@ + +
+ params->get('show_page_heading') != 0) : ?> + + + lead_items)) : ?> +
+ lead_items as &$item) : ?> +
+ item = & $item; + echo $this->loadTemplate('item'); + ?> +
+ +
+ + + intro_items)) : ?> + params->get('blog_class', ''); ?> + params->get('num_columns') > 1) : ?> + params->get('num_columns'); ?> + +
+ intro_items as $key => &$item) : ?> +
+ item = & $item; + echo $this->loadTemplate('item'); + ?> +
+ +
+ + + link_items)) : ?> +
+ loadTemplate('links'); ?> +
+ + + params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?> +
+ params->def('show_pagination_results', 1)) : ?> +

+ pagination->getPagesCounter(); ?> +

+ + pagination->getPagesLinks(); ?> +
+ +
\ No newline at end of file diff --git a/framework/html/com_content/featured/default_item.php b/framework/html/com_content/featured/default_item.php new file mode 100644 index 00000000..86907dff --- /dev/null +++ b/framework/html/com_content/featured/default_item.php @@ -0,0 +1,128 @@ +item, true); + +$template = Astroid\Framework::getTemplate(); +$document = Astroid\Framework::getDocument(); + +// Create shortcuts to some parameters. +$params = $this->item->params; +$canEdit = $params->get('access-edit'); +$info = $params->get('info_block_position', 0); +$images = json_decode($this->item->images); + +// Check if associations are implemented. If they are, define the parameter. +$assocParam = (Associations::isEnabled() && $params->get('show_associations')); + +$tpl_params = $template->getParams(); + +// Post Format +$post_attribs = new Registry(json_decode($this->item->attribs)); +$post_format = $post_attribs->get('post_format', 'standard'); + +$info_block_layout = ASTROID_JOOMLA_VERSION > 3 ? 'joomla.content.info_block' : 'joomla.content.info_block.block'; + +$currentDate = Factory::getDate()->format('Y-m-d H:i:s'); +$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate) + || ($this->item->publish_down < $currentDate && $this->item->publish_down !== null); + +?> +
+ +
+ + + getImage(); + if ((!empty($images->image_intro)) && $post_format == 'standard') { + echo LayoutHelper::render('joomla.content.intro_image', $this->item); + } else if (is_string($image) && !empty($image)) { + echo '
'; + $document->include('blog.modules.image', ['image' => $image, 'title' => $this->item->title, 'item' => $this->item]); + echo '
'; + } else { + echo LayoutHelper::render('joomla.content.post_formats.post_' . $post_format, array('params' => $post_attribs, 'item' => $this->item)); + } + ?> +
+ renderPostTypeIcon(); ?> + renderArticleBadge(); ?> + + + $params, 'item' => $this->item]); ?> + + + + get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') + || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?> + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'above')); ?> + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tags->itemTags); ?> + + +
+ item); ?> +
+ + get('show_intro')) : ?> + + item->event->afterDisplayTitle; ?> + + + + item->event->beforeDisplayContent; ?> +
+ item->introtext; ?> +
+ + + + $this->item, 'params' => $params, 'astroidArticle' => $astroidArticle, 'position' => 'below')); ?> + + get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?> + item->tags->itemTags); ?> + + + + item->event->beforeDisplayContent; ?> + get('show_readmore') && $this->item->readmore) : + if ($params->get('access-view')) : + $link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); + else : + $menu = Factory::getApplication()->getMenu(); + $active = $menu->getActive(); + $itemId = $active->id; + $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); + $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); + endif; ?> + + $this->item, 'params' => $params, 'link' => $link]); ?> + +
+ +
+ + + item->event->afterDisplayContent; ?> +
\ No newline at end of file diff --git a/framework/html/com_content/featured/default_links.php b/framework/html/com_content/featured/default_links.php new file mode 100644 index 00000000..6e2764d2 --- /dev/null +++ b/framework/html/com_content/featured/default_links.php @@ -0,0 +1,24 @@ + +

+
    + link_items as &$item) : ?> +
  • + title; ?> +
  • + +
\ No newline at end of file diff --git a/framework/library/astroid/Element/BaseElement.php b/framework/library/astroid/Element/BaseElement.php index b11acc9b..b6a8868a 100644 --- a/framework/library/astroid/Element/BaseElement.php +++ b/framework/library/astroid/Element/BaseElement.php @@ -262,8 +262,11 @@ protected function _animation() if (empty($animation)) { return; } - $document = Framework::getDocument(); - $document->addStyleSheet('css/animate.min.css'); + + $app = Factory::getApplication(); + $wa = $app->getDocument()->getWebAssetManager(); + $wa->registerAndUseStyle('astroid.animate', 'astroid/animate.min.css'); + $this->addAttribute('style', 'visibility: hidden;'); $this->addAttribute('data-animation', $animation); diff --git a/framework/library/astroid/Helper.php b/framework/library/astroid/Helper.php index cde3df76..20b1dcc7 100644 --- a/framework/library/astroid/Helper.php +++ b/framework/library/astroid/Helper.php @@ -26,7 +26,7 @@ class Helper { public static function loadLanguage($extension, $client = 'site') { - $lang = Factory::getLanguage(); + $lang = Factory::getApplication()->getLanguage(); $lang->load($extension, ($client == 'site' ? JPATH_SITE : JPATH_ADMINISTRATOR)); } @@ -359,8 +359,7 @@ public static function getAllAstroidElements() public static function getPositions() { - $template = Framework::getTemplate(); - $templateXML = \JPATH_SITE . '/templates/' . $template->template . '/templateDetails.xml'; + $templateXML = \JPATH_SITE . '/templates/' . ASTROID_TEMPLATE_NAME . '/templateDetails.xml'; $template = simplexml_load_file($templateXML); $positions = []; foreach ($template->positions[0] as $position) { @@ -372,17 +371,26 @@ public static function getPositions() public static function getModuleStyles() { - $template = Framework::getTemplate(); - $styles = Folder::files(\JPATH_SITE . '/templates/' . $template->template . '/html/layouts/chromes', '.php'); - $options = array(); - if (count($styles)) { - foreach ($styles as $style) { - $tmp = new \stdClass(); - $tmp->value = basename($style,".php"); - $tmp->text = basename($style,".php"); - $options[] = $tmp; + $template_name = ASTROID_TEMPLATE_NAME; + $options = array(); + $isChildTemplate = self::isChildTemplate($template_name); + + if ($isChildTemplate && isset($isChildTemplate['isChild']) && $isChildTemplate['isChild']) { + $template_name = $isChildTemplate['parent']; + } + + if (file_exists(\JPATH_SITE . '/templates/' . $template_name . '/html/layouts/chromes')) { + $styles = Folder::files(\JPATH_SITE . '/templates/' . $template_name . '/html/layouts/chromes', '.php'); + if (count($styles)) { + foreach ($styles as $style) { + $tmp = new \stdClass(); + $tmp->value = basename($style,".php"); + $tmp->text = basename($style,".php"); + $options[] = $tmp; + } } } + $systems = Folder::files(\JPATH_SITE . '/layouts/chromes', '.php'); foreach ($systems as $system) { $tmp = new \stdClass(); diff --git a/framework/library/astroid/Helper/Constants.php b/framework/library/astroid/Helper/Constants.php index 42d85b14..2d05973b 100644 --- a/framework/library/astroid/Helper/Constants.php +++ b/framework/library/astroid/Helper/Constants.php @@ -13,7 +13,7 @@ class Constants { - public static $astroid_version = '3.0.3'; + public static $astroid_version = '3.0.4'; public static $fontawesome_version = '6.4.2'; public static $animatecss_version = '3.7.0'; public static $forum_link = 'https://github.com/templaza/astroid-framework/issues'; diff --git a/framework/library/astroid/Helper/Overrides.php b/framework/library/astroid/Helper/Overrides.php index f9fca800..c3a9bdd6 100644 --- a/framework/library/astroid/Helper/Overrides.php +++ b/framework/library/astroid/Helper/Overrides.php @@ -8,10 +8,7 @@ */ namespace Astroid\Helper; - -use Astroid\Framework; use Joomla\Filesystem\Folder; -use Joomla\Filesystem\File; defined('_JEXEC') or die; @@ -19,6 +16,70 @@ class Overrides { public static $rename = []; + private static function generateExtensionPath(string $path) : string { + if (empty($path)) { + return ''; + } + + $path = explode('/', trim($path, '/')); + + $version = JVERSION; + $extension = $path[0]; + + if (\strpos($extension, 'com_') === 0) { + if ($version < 4) { + \array_splice($path, 1, 0, ['views']); + \array_splice($path, 3, 0, ['tmpl']); + } + else { + \array_splice($path, 1, 0, ['tmpl']); + } + return JPATH_ROOT . '/components/' . \implode('/', $path); + } + + elseif (\strpos($extension, 'mod_') === 0) { + \array_splice($path, 1, 0, ['tmpl']); + return JPATH_ROOT . '/modules/' . \implode('/', $path); + } + + elseif (\strpos($extension, 'plg_') === 0) { + $pluginPath = \explode('_', $extension); + \array_splice($pluginPath, 0, 1); + \array_push($pluginPath, 'tmpl'); + + \array_splice($path, 0, 1, $pluginPath); + return JPATH_ROOT . '/plugins/' . \implode('/', $path); + } + elseif ($extension === 'layouts') { + return JPATH_ROOT . '/' . \implode('/', $path); + } + + return \implode('/', $path); + } + + public static function getHTMLTemplate(): string { + $backtrace = \debug_backtrace(); + $callPath = $backtrace[0]['file'] ?? ''; + $htmlTemplatePath = JPATH_ROOT . '/templates/'.ASTROID_TEMPLATE_NAME.'/html'; + $htmlAstroidPath = JPATH_LIBRARIES . '/astroid/framework/html'; + + if (\strpos($callPath, $htmlTemplatePath) === 0) { + $relativePath = \substr($callPath, \strlen($htmlTemplatePath)); + } + + if (empty($relativePath)) { + return self::generateExtensionPath(\substr($callPath, stripos($callPath, '/html/') + 5)); + } + + $astroidOverridePath = $htmlAstroidPath . $relativePath; + + if (\file_exists($astroidOverridePath)) { + return $astroidOverridePath; + } + + return self::generateExtensionPath($relativePath); + } + public static function fix() { self::rename(); diff --git a/framework/library/astroid/Template.php b/framework/library/astroid/Template.php index 6175062c..1ae6f0f0 100644 --- a/framework/library/astroid/Template.php +++ b/framework/library/astroid/Template.php @@ -29,18 +29,19 @@ class Template public function __construct() { - $menu = Factory::getApplication()->getMenu()->getActive(); + $app = Factory::getApplication(); + $menu = $app->getMenu()->getActive(); $template_id = isset($menu->template_style_id) ? $menu->template_style_id : 0; if (!empty($template_id)) { $jtemplate = $this->_getById($template_id); } else { - $jtemplate = Factory::getApplication()->getTemplate(true); + $jtemplate = $app->getTemplate(true); } $this->template = $jtemplate->template; - $this->language = Factory::getLanguage()->getTag(); - $this->direction = Factory::getLanguage()->isRtl() ? 'rtl' : 'ltr'; + $this->language = $app->getLanguage()->getTag(); + $this->direction = $app->getLanguage()->isRtl() ? 'rtl' : 'ltr'; $this->params = $jtemplate->params; $this->title = ''; @@ -48,7 +49,6 @@ public function __construct() if (Framework::isSite()) { $this->_set($jtemplate->id); } else if (Framework::isAdmin()) { - $app = Factory::getApplication(); $option = $app->input->get('option', ''); $view = $app->input->get('view', ''); $layout = $app->input->get('layout', ''); @@ -69,7 +69,7 @@ public function __construct() } if (Framework::isSite()) { - $preset = Factory::getApplication()->input->get('preset', ''); + $preset = $app->input->get('preset', ''); if (!empty($preset)) { $this->setPreset($preset); } diff --git a/framework/template.php b/framework/template.php index ce37e1be..47fb1c68 100644 --- a/framework/template.php +++ b/framework/template.php @@ -7,1133 +7,5 @@ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later */ defined('_JEXEC') or die; -jimport('astroid.framework.helper'); -jimport('astroid.framework.element'); -class AstroidFrameworkTemplate -{ - - public $template; - public $params; - public $language; - public $title = ""; - public $version = ""; - public $astroidVersion = ""; - public $direction; - protected $logs; - protected $debug = false; - public $cssFile = true; - public $_styles = ['desktop' => [], 'tablet' => [], 'mobile' => []]; - public $_js = []; - public $mods = array(); - public $modules = array(); - public static $astroidTemplatePath = JPATH_LIBRARIES . '/astroid/framework/template'; - - public function __construct($template) - { - Astroid\Framework::getReporter('Auditor')->backtrace(debug_backtrace()); - if (!defined('ASTROID_TEMPLATE_NAME')) { - define('ASTROID_TEMPLATE_NAME', $template->template); - } - $this->template = $template->template; - if (isset($template->title)) { - $this->title = $template->title; - } - $this->presets = $this->getPresets(); - if (isset($template->id)) { - $this->params = $this->getTemplateParams($template->id); - } else { - $this->params = $this->getTemplateParams(); - } - $language = JFactory::getApplication()->getLanguage(); - $this->language = $language->getTag(); - $this->direction = $language->isRtl() ? 'rtl' : 'ltr'; - $this->version = $this->templateVersion(); - $this->astroidVersion = AstroidFrameworkHelper::frameworkVersion(); - $this->initAgent(); - $this->addMeta(); - $this->inspect(); - } - - public function templateVersion() - { - $xml = Astroid\Helper::getXML(JPATH_SITE . "/templates/{$this->template}/templateDetails.xml"); - $version = (string) $xml->version; - return $version; - } - - public function addMeta() - { - - $app = JFactory::getApplication(); - $itemid = $app->input->get('Itemid', '', 'INT'); - - $menu = $app->getMenu(); - $item = $menu->getItem($itemid); - - if (empty($item)) { - return; - } - $params = new JRegistry(); - $params->loadString($item->params); - - $enabled = $params->get('astroid_opengraph_menuitem', 0); - if (empty($enabled)) { - return; - } - - $fb_id = $this->params->get('article_opengraph_facebook', ''); - $tw_id = $this->params->get('article_opengraph_twitter', ''); - - $config = JFactory::getConfig(); - $og_title = $item->title; - if (!empty($params->get('astroid_og_title_menuitem', ''))) { - $og_title = $params->get('astroid_og_title_menuitem', ''); - } - $og_description = ''; - if (!empty($params->get('astroid_og_desc_menuitem', ''))) { - $og_description = $params->get('astroid_og_desc_menuitem', ''); - } - $og_image = ''; - if (!empty($params->get('astroid_og_image_menuitem', ''))) { - $og_image = JURI::base() . $params->get('astroid_og_image_menuitem', ''); - } - - $og_sitename = $config->get('sitename'); - $og_siteurl = JURI::getInstance(); - - $meta = []; - $meta[] = ''; - - if ($item->type == 'component' && isset($item->query) && $item->query['option'] == 'com_content' && $item->query['view'] == 'article') { - $meta[] = ''; - } - if (!empty($og_title)) { - $meta[] = ''; - } - if (!empty($og_sitename)) { - $meta[] = ''; - } - if (!empty($og_siteurl)) { - $meta[] = ''; - } - if (!empty($og_description)) { - $meta[] = ''; - } - if (!empty($fb_id)) { - $meta[] = ''; - } - if (!empty($tw_id)) { - $meta[] = ''; - } - if (!empty($og_image)) { - $meta[] = ''; - } - $meta = implode('', $meta); - if (!empty($meta)) { - $document = JFactory::getDocument(); - $document->addCustomTag($meta); - } - } - - protected function getTemplateParams($id = null) - { - if (empty($id)) { - $template = JFactory::getApplication()->getTemplate(true); - if (isset($template->id) && $template->id === 0) { - $template->id = $template->params->get('astroid', 0); - } - if (isset($template->id)) { - $id = $template->id; - } else { - $astroid_id = $template->params->get('astroid', 0); - if (empty($astroid_id)) { - $params = new JRegistry(); - return $params; - } - $id = $astroid_id; - } - } - - $params_path = JPATH_SITE . "/media/templates/site/{$this->template}/params/" . $id . '.json'; - $json = file_get_contents($params_path); - $params = new JRegistry(); - $params->loadString($json, 'JSON'); - - $issetPreset = JFactory::getApplication()->input->get('preset', ''); - if (!empty($issetPreset)) { - $preset = null; - foreach ($this->presets as $set) { - if ($set['name'] === $issetPreset) { - $preset = $set; - break; - } - } - if ($preset !== null) { - foreach ($preset['preset'] as $attr => $val) { - if (is_array($val)) { - $obj = $params->get($attr); - foreach ($val as $subattr => $subval) { - $obj->{$subattr} = $subval; - } - $params->set($attr, $obj); - } else { - $params->set($attr, $val); - } - } - } - } - - return $params; - } - - public function head() - { - } - - public function initAgent() - { - // $agent = new Mobile_Detect; - // if ($agent->isMobile() || $agent->isTablet()) { - // $agent_environment = 'wap'; - // if ($agent->isTablet()) { - // $agent_device = 'tablet'; - // } else { - // $agent_device = 'mobile'; - // } - // $agent_name = $agent->device(); - // $agent_browser = $agent->browser(); - // } else if ($agent->isDesktop()) { - // $agent_environment = 'web'; - // $agent_device = 'desktop'; - // $agent_name = $agent->device(); - // $agent_browser = $agent->browser(); - // } else if ($agent->isRobot()) { - // config(['agent.environment' => 'robot']); - // $agent_device = strtolower($agent->robot()); - // $agent_name = $agent->robot(); - // } else { - // $agent_environment = 'desktop'; - // $agent_device = 'undefined'; - // $agent_name = $agent->device(); - // $agent_browser = $agent->browser(); - // } - - /* - var ASTROID_TEMPLATE = []; - ASTROID_TEMPLATE.DEVICE_ENV = ""; - ASTROID_TEMPLATE.DEVICE_TYPE = ""; - ASTROID_TEMPLATE.DEVICE_NAME = ""; - ASTROID_TEMPLATE.DEVICE_BROWSER = ""; - ASTROID_TEMPLATE.BASE_URL = ""; - */ - } - - public function body() - { - $this->loadLayout('custom'); - if ($this->debug) { - $this->renderLogs(); - } - } - - public function renderLayout() - { - define('ASTROID_FRONTEND', 1); - $params = $this->params; - $layout = $params->get("layout", NULL); - if ($layout === NULL) { - $value = file_get_contents(JPATH_SITE . '/' . 'media' . '/' . 'astroid' . '/' . 'assets' . '/' . 'json' . '/' . 'layouts' . '/' . 'default.json'); - $layout = \json_decode($value, true); - } else { - $layout = \json_decode($layout, true); - } - $this->setLog("Rending Layout"); - $template_layout = $this->params->get('template_layout', 'wide'); - $sppb = $this->isPageBuilder(); - echo '
'; - $header_mode = $this->params->get('header_mode', 'horizontal'); - $header = $this->params->get('header', TRUE); - if ($header && !empty($header_mode) && $header_mode == 'sidebar') { - $this->loadLayout('header.sidebar'); - } else { - $this->loadLayout('offcanvas'); - } - $this->loadLayout('mobilemenu'); - - $content_classes = []; - - if ($header && !empty($header_mode) && $header_mode == 'sidebar') { - $sidebar_dir = $this->params->get('header_sidebar_menu_mode', 'left'); - $content_classes[] = 'has-sidebar'; - $content_classes[] = 'sidebar-dir-' . $sidebar_dir; - } - - echo '
'; - echo '
'; - echo '
'; - foreach ($layout['sections'] as $section) { - $sectionObject = new AstroidElement($section['type'], $section, $this); - $sectionHTML = ''; - $this->setLog("Rending Section : " . $sectionObject->getValue('title')); - $rowHTML = ''; - $layout_type = $sectionObject->getValue('layout_type', ''); - $section_layout_type = $sectionObject->getSectionLayoutType(); - foreach ($section['rows'] as $rowIndex => $row) { - $columnHTML = ''; - - $columnSizes = []; - $bufferSize = 0; - $hasComponent = FALSE; - $componentIndex = 0; - - foreach ($row['cols'] as $colIndex => $col) { - foreach ($col['elements'] as $element) { - if ($element['type'] == 'component') { - $hasComponent = true; - $componentIndex = $colIndex; - break; - } - } - } - - $prevColIndex = null; - foreach ($row['cols'] as $colIndex => $col) { - $renderedHTML = ''; - foreach ($col['elements'] as $element) { - $el = new AstroidElement($element['type'], $element, $this); - $renderedHTML .= $el->render(); - } - if (empty($renderedHTML)) { - $bufferSize += $col['size']; - unset($row['cols'][$colIndex]); - } else { - if ($hasComponent) { - $row['cols'][$componentIndex]['size'] = $row['cols'][$componentIndex]['size'] + $bufferSize; - $bufferSize = 0; - } else { - if (isset($row['cols'][$prevColIndex])) { - $row['cols'][$prevColIndex]['size'] = $row['cols'][$prevColIndex]['size'] + $bufferSize; - } else { - $row['cols'][$colIndex]['size'] = $row['cols'][$colIndex]['size'] + $bufferSize; - } - $bufferSize = 0; - } - $prevColIndex = $colIndex; - } - } - if (!empty($row['cols'])) { - if ($bufferSize) { - if ($hasComponent) { - $row['cols'][$componentIndex]['size'] = $row['cols'][$componentIndex]['size'] + $bufferSize; - } else { - if ($prevColIndex !== null) { - $row['cols'][$prevColIndex]['size'] = $row['cols'][$prevColIndex]['size'] + $bufferSize; - } - } - } - foreach ($row['cols'] as $col) { - $renderedHTML = ''; - foreach ($col['elements'] as $element) { - $el = new AstroidElement($element['type'], $element, $this); - $this->setLog("Rending Element : " . $el->getValue('title')); - $template_positions_display = JComponentHelper::getParams('com_templates')->get('template_positions_display'); - if (@$_GET['wf'] == 1 && $template_positions_display) { - $renderedHTML .= $el->renderWireframe(); - } else { - $renderedHTML .= $el->render(); - } - } - if (!empty($renderedHTML)) { - $columnObject = new AstroidElement("column", $col, $this); - $col_stylesEnable = $columnObject->getStyles() ? true : false; - $col_animationEnable = $columnObject->getAnimation() ? true : false; - $col_animationDelay = $columnObject->getAnimationDelay() ? true : false; - $col_animationDuration = $columnObject->getAnimationDuration() ? true : false; - $columnHTML .= '
getAttributes() . '>'; - $columnHTML .= $renderedHTML; - $columnHTML .= '
'; - } - } - } - if (!empty($columnHTML)) { - $layout_type = ($sppb && $hasComponent) ? 'no-container' : $layout_type; - $no_gutter = false; - switch ($layout_type) { - case 'no-container': - case 'custom-container': - case 'container-with-no-gutters': - case 'container-fluid-with-no-gutters': - $no_gutter = true; - break; - } - - $rowObject = new AstroidElement("row", $row, $this); - $row_stylesEnable = $rowObject->getStyles() ? true : false; - $row_animationEnable = $rowObject->getAnimation() ? true : false; - $row_animationDelay = $rowObject->getAnimationDelay() ? true : false; - $row_animationDuration = $rowObject->getAnimationDuration() ? true : false; - $rowHTML .= '
getAttributes() . '>'; - $rowHTML .= $columnHTML; - $rowHTML .= '
'; - } - } - if (!empty($rowHTML)) { - $stylesEnable = $sectionObject->getStyles() ? true : false; - $animationEnable = $sectionObject->getAnimation() ? true : false; - $sectionHTML .= '
getAttributes() . '>'; - - $section_layout_type = ($sppb && $hasComponent) ? '' : $section_layout_type; - if (!empty($section_layout_type)) { - $sectionHTML .= "
"; - } - $sectionHTML .= $rowHTML; - if (!empty($section_layout_type)) { - $sectionHTML .= '
'; - } - $sectionHTML .= '
'; - } - echo $sectionHTML; - } - echo '
'; - echo '
'; - echo '
'; - echo '
'; - $this->setLog("Rending Complete!", "success"); - } - - public function getLayoutStyles() - { - $styles = []; - $template_layout = $this->params->get('template_layout', 'wide'); - if ($template_layout != 'boxed') { - return false; - } - $layout_background_image = $this->params->get('layout_background_image', ''); - if (!empty($layout_background_image)) { - $styles[] = 'background-image:url(' . JURI::root() . $this->SeletedMedia() . '/' . $layout_background_image . ')'; - $styles[] = 'background-repeat:' . $this->params->get('layout_background_repeat', 'inherit'); - $styles[] = 'background-size:' . $this->params->get('layout_background_size', 'inherit'); - $styles[] = 'background-position:' . $this->params->get('layout_background_position', 'inherit'); - $styles[] = 'background-attachment:' . $this->params->get('layout_background_attachment', 'inherit'); - } - return implode(';', $styles); - } - - public function renderErrorLayout() - { - $params = $this->params; - $template_layout = $this->params->get('template_layout', 'wide'); - echo '
'; - echo '
'; - $this->loadLayout('error'); - echo '
'; - echo '
'; - $this->setLog("Rending Complete!", "success"); - } - - static public function slugify($text) - { - // replace non letter or digits by - - $text = preg_replace('~[^\pL\d]+~u', '-', $text); - // transliterate - $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); - // remove unwanted characters - $text = preg_replace('~[^-\w]+~', '', $text); - // trim - $text = trim($text, '-'); - // remove duplicate - - $text = preg_replace('~-+~', '-', $text); - // lowercase - $text = strtolower($text); - if (empty($text)) { - return 'n-a'; - } - return $text; - } - - public function modulePosition($position = '', $style = 'none') - { - if (empty($position)) { - return ''; - } - $this->setLog("Rending Module Position : " . $position); - $return = ''; - - $modules = JModuleHelper::getModules($position); - if (count($modules)) { - $return .= ''; - } - return $return; - } - - public function renderModulePosition($position, $style = 'none') - { - if (empty($position)) { - return ''; - } - $return = ''; - $beforeContent = $this->getAstroidContent($position, 'before'); - if (!empty($beforeContent)) { - $return .= $beforeContent; - } - if (!empty(JModuleHelper::getModules($position))) { - $return .= $this->modulePosition($position, $style); - } - $afterContent = $this->getAstroidContent($position, 'after'); - if (!empty($afterContent)) { - $return .= $afterContent; - } - return $return; - } - - public function getAstroidContent($position, $load = 'after') - { - $contents = $this->getAstroidPositionLayouts(); - $return = ''; - if (isset($contents[$position]) && !empty($contents[$position])) { - foreach ($contents[$position] as $layout) { - $layout = explode(':', $layout); - if ($layout[1] == $load) { - $return .= $this->loadLayout($layout[0], false); - } - } - } - return $return; - } - - public function getAstroidPositionLayouts() - { - $astroidcontentlayouts = $this->params->get('astroidcontentlayouts', 'social:astroid-top-social:after,contactinfo:astroid-top-contact:after'); - $return = []; - if (!empty($astroidcontentlayouts)) { - $astroidcontentlayouts = explode(',', $astroidcontentlayouts); - foreach ($astroidcontentlayouts as $astroidcontentlayout) { - $astroidcontentlayout = explode(':', $astroidcontentlayout); - if (isset($return[$astroidcontentlayout[1]])) { - $return[$astroidcontentlayout[1]][] = $astroidcontentlayout[0] . ':' . $astroidcontentlayout[2]; - } else { - $return[$astroidcontentlayout[1]] = []; - $return[$astroidcontentlayout[1]][] = $astroidcontentlayout[0] . ':' . $astroidcontentlayout[2]; - } - } - } - return $return; - } - - public function getStyleName($template_directory, $custom = false) - { - if (!$custom) { - $scss_files = $this->getDir($template_directory . 'scss', 'scss'); - $name = ''; - foreach ($scss_files as $scss) { - $name .= md5_file($scss['basepath']); - } - - - $variables = $this->getThemeVariables(); - $name .= serialize($variables); - - $cssname = 'style-' . md5($name); - - if (!file_exists($template_directory . 'css/' . $cssname . '.css')) { - //ini_set('xdebug.max_nesting_level', 3000); - AstroidFrameworkHelper::clearCache($this->template); - AstroidFrameworkHelper::compileSass($template_directory . 'scss', $template_directory . 'css', 'style.scss', $cssname . '.css', $variables); - } - return $cssname . '.css'; - } else { - - if (!file_exists($template_directory . 'scss/custom') || !file_exists($template_directory . 'scss/custom/custom.scss')) { - return ''; - } - - $scss_files = $this->getDir($template_directory . 'scss/custom', 'scss'); - $name = ''; - foreach ($scss_files as $scss) { - $name .= md5_file($scss['basepath']); - } - $cssname = 'custom-' . md5($name); - if (!file_exists($template_directory . 'css/' . $cssname . '.css')) { - AstroidFrameworkHelper::clearCache($this->template, 'custom'); - AstroidFrameworkHelper::compileSass($template_directory . 'scss/custom', $template_directory . 'css', 'custom.scss', $cssname . '.css'); - } - return $cssname . '.css'; - } - } - - public function getThemeVariables() - { - $variables = []; - $variables['blue'] = $this->params->get('theme_blue', '#007bff'); - $variables['indigo'] = $this->params->get('theme_indigo', '#6610f2'); - $variables['purple'] = $this->params->get('theme_purple', '#6f42c1'); - $variables['pink'] = $this->params->get('theme_pink', '#e83e8c'); - $variables['red'] = $this->params->get('theme_red', '#dc3545'); - $variables['orange'] = $this->params->get('theme_orange', '#fd7e14'); - $variables['yellow'] = $this->params->get('theme_yellow', '#ffc107'); - $variables['green'] = $this->params->get('theme_green', '#28a745'); - $variables['teal'] = $this->params->get('theme_teal', '#20c997'); - $variables['cyan'] = $this->params->get('theme_cyan', '#17a2b8'); - $variables['white'] = $this->params->get('theme_white', '#fff'); - $variables['gray100'] = $this->params->get('theme_gray100', '#f8f9fa'); - $variables['gray600'] = $this->params->get('theme_gray600', '#6c757d'); - $variables['gray800'] = $this->params->get('theme_gray800', '#343a40'); - $primary = $this->params->get('theme_primary', 'blue'); - $variables['primary'] = $variables[$primary]; - $secondary = $this->params->get('theme_secondary', 'gray600'); - $variables['secondary'] = $variables[$secondary]; - $success = $this->params->get('theme_success', 'green'); - $variables['success'] = $variables[$success]; - $info = $this->params->get('theme_info', 'cyan'); - $variables['info'] = $variables[$info]; - $warning = $this->params->get('theme_warning', 'yellow'); - $variables['warning'] = $variables[$warning]; - $danger = $this->params->get('theme_danger', 'red'); - $variables['danger'] = $variables[$danger]; - $light = $this->params->get('theme_light', 'gray100'); - $variables['light'] = $variables[$light]; - $dark = $this->params->get('theme_dark', 'gray800'); - $variables['dark'] = $variables[$dark]; - /* - $link_color = $this->params->get('theme_link_color', '#007bff'); - $variables['link-color'] = $link_color; - $link_hover_color = $this->params->get('theme_link_hover_color', '#0056b3'); - $variables['link-hover-color'] = $link_hover_color; - */ - - $variables = $this->getVariableOverrides($variables); - - return $variables; - } - - public function getVariableOverrides($variables) - { - $sass_overrides = $this->params->get('sass_overrides'); - $sass_overrides = \json_decode($sass_overrides, true); - if (empty($sass_overrides)) { - return $variables; - } - - foreach ($sass_overrides as $sass_override) { - $variable = $sass_override['variable']; - if (!empty($variable) && !empty($sass_override['value'])) { - if (substr($variable, 0, 1) === "$") { - $variable = ltrim($variable, '$'); - } - $variables[$variable] = $sass_override['value']; - } - } - return $variables; - } - - public function getColors() - { - $colors = []; - $variables = $this->params->get('sass_variables', []); - foreach ($variables as $key => $variable) { - $colors[$key] = $this->params->get($variable, ''); - } - return $colors; - } - - public function getDir($dir, $extension = null, &$results = array()) - { - $files = scandir($dir); - - foreach ($files as $key => $value) { - $path = realpath($dir . DIRECTORY_SEPARATOR . $value); - if (!is_dir($path)) { - $pathinfo = pathinfo($path); - if ($extension !== null && $pathinfo['extension'] == $extension) { - $include_path = str_replace(JPATH_THEMES, '', $path); - $component_name = str_replace('.min', '', $pathinfo['filename']); - $results[$component_name] = ['component_name' => $component_name, 'name' => $pathinfo['basename'], 'path' => $include_path, 'basepath' => $path]; - } elseif ($extension === null) { - $include_path = str_replace(JPATH_THEMES, '', $path); - $results[] = ['name' => $pathinfo['basename'], 'path' => $include_path]; - } - } else if ($value != "." && $value != "..") { - $this->getDir($path, $extension, $results); - } - } - - return $results; - } - - public function loadTemplateCSS($components = '', $error = false) - { - $this->setLog("Loading Stylesheets"); - $components = explode(',', $components); - $template_directory = JPATH_THEMES . "/" . $this->template . "/css/"; - $custom_compiled_css = $this->getStyleName(JPATH_THEMES . "/" . $this->template . '/', true); - if (!empty($custom_compiled_css)) { - array_unshift($components, $custom_compiled_css); - } - $compiled_css = $this->getStyleName(JPATH_THEMES . "/" . $this->template . '/'); - array_unshift($components, $compiled_css); - $document = JFactory::getDocument(); - foreach ($components as $component) { - if (file_exists($template_directory . $component)) { - if ($error) { - echo 'getMediaVersion() . '" rel="stylesheet" />'; - } else { - $document->addStyleSheet(JURI::root() . 'templates/' . $this->template . "/css/" . $component . '?' . $document->getMediaVersion()); - } - } - } - if ($error) { - echo ''; - } else { - $document->addStyleSheet(JURI::root() . 'media/astroid/assets/css/animate.min.css?' . $document->getMediaVersion()); - } - $this->setLog("Stylesheet Loaded!", "success"); - } - - public function loadTemplateJS($components = '') - { - $this->setLog("Loading Javascripts"); - $components = explode(',', $components); - $template_directory = JPATH_THEMES . "/" . $this->template . "/js/"; - $document = JFactory::getDocument(); - foreach ($components as $component) { - if (file_exists($template_directory . $component)) { - JHtml::_('script', JURI::root() . 'templates/' . $this->template . "/js/" . $component, array('version' => $document->getMediaVersion(), 'relative' => true)); - } - } - $this->setLog("Javascripts Loaded!", "success"); - } - - /* - * Function to return classes imploded in the body tag on the website. - */ - - public function bodyClass($body_class, $language = '', $direction = '') - { - $template = JFactory::getApplication()->getTemplate(true); - $class = []; - $app = JFactory::getApplication(); - $menu = $app->getMenu()->getActive(); - $class[] = "site"; - $class[] = "astroid-framework"; - - $option = $app->input->get('option', '', 'STRING'); - $view = $app->input->get('view', '', 'STRING'); - $layout = $app->input->get('layout', 'default', 'STRING'); - $task = $app->input->get('task', '', 'STRING'); - $header = $this->params->get('header', TRUE); - $headerMode = $this->params->get('header_mode', 'horizontal', 'STRING'); - $Itemid = $app->input->get('Itemid', '', 'INT'); - - if (!empty($option)) { - $class[] = htmlspecialchars(str_replace('_', '-', $option)); - } - if (!empty($view)) { - $class[] = 'view-' . $view; - } - if (!empty($layout)) { - $class[] = 'layout-' . $layout; - } - if (!empty($task)) { - $class[] = 'task-' . $task; - } - if (!empty($Itemid)) { - $class[] = 'itemid-' . $Itemid; - } - - if ($header && !empty($headerMode) && $headerMode == 'sidebar') { - $sidebarDirection = $this->params->get('header_sidebar_menu_mode', 'left'); - $class[] = "header-sidebar-" . $sidebarDirection; - } - - if (isset($menu) && $menu) { - if ($menu->params->get('pageclass_sfx')) { - $class[] = $menu->params->get('pageclass_sfx'); - } - if ($menu->get('alias')) { - // menu alias without -alias appended will be removed in the next version. - $class[] = $menu->get('alias'); - $class[] = $menu->get('alias') . '-alias'; - } - } - if (!empty($template->id)) { - $class[] = 'tp-style-' . $template->id; - } - if (!empty($language)) { - $class[] = $language; - } - - if (!empty($direction)) { - $class[] = $direction; - } - - if (!empty($body_class)) { - $class[] = $body_class; - } - - return implode(' ', $class); - } - - public function loadLayout($partial = '', $display = true, $params = null) - { - $this->setLog("Rending template partial : " . $partial); - - if (file_exists(JPATH_SITE . '/templates/' . $this->template . '/html/frontend/' . str_replace('.', '/', $partial) . '.php')) { - $layout = new JLayoutFile($partial, JPATH_SITE . '/templates/' . $this->template . '/html/frontend'); - } else if (file_exists(self::$astroidTemplatePath . '/frontend/' . str_replace('.', '/', $partial) . '.php')) { - $layout = new JLayoutFile($partial, self::$astroidTemplatePath . '/frontend'); - } else { - return; - } - $data = []; - $data['template'] = $this; - if (!empty($params)) { - $data['params'] = $params; - } - if ($display) { - echo $layout->render($data); - } else { - return $layout->render($data); - } - $this->setLog("Template partial rendered!: " . $partial, 'success'); - } - - public function setLog($message, $type = 'info', $data = []) - { - $this->logs[] = new AstroidLog($type, $message, $data); - } - - public function renderLogs() - { - echo '
'; - foreach ($this->logs as $log) { - echo $log->render(); - } - echo '
'; - } - - /* - * Checks to see if the Page Builder is used. - * If true, then removing the container so page builder can have full control - * Current supported page builders Quix, JD Builder, Sp Page Builder - */ - - public function isPageBuilder() - { - $jinput = JFactory::getApplication()->input; - $option = $jinput->get('option', ''); - $view = $jinput->get('view', ''); - if (($option == "com_sppagebuilder" && $view == "page") || ($option == "com_quix" && $view == "page") || ($option == "com_jdbuilder" && $view == "page")) { - return TRUE; - } else { - return FALSE; - } - } - - public function addStyledeclaration($styles, $device = 'desktop') - { - if ($this->cssFile) { - $this->_styles[$device][] = $styles; - } else { - $document = JFactory::getDocument(); - $document->addStyledeclaration($styles); - } - } - - public function addScriptDeclaration($script) - { - $document = JFactory::getDocument(); - $document->addScriptDeclaration($script); - } - - public function addScript($js) - { - $template_directory = JPATH_THEMES . "/" . $this->template . "/js/"; - if (file_exists($template_directory . $js)) { - $this->_js[$js] = JURI::root() . 'templates/' . $this->template . "/js/" . $js; - } else { - $this->_js[$js] = $js; - } - } - - public function buildAstroidCSS($version, $css = '') - { - $prefix = 'astroid-'; - if ($this->cssFile) { - $issetPreset = JFactory::getApplication()->input->get('preset', ''); - if (!empty($issetPreset)) { - $prefix = 'preset-'; - } - - $template_dir = JPATH_SITE . '/templates/' . $this->template . '/css'; - if (!file_exists($template_dir . '/' . $prefix . $version . '.css')) { - if (empty($issetPreset)) { - AstroidFrameworkHelper::clearCache($this->template, 'astroid'); - } - $styles = preg_grep('~^' . $prefix . '.*\.(css)$~', scandir($template_dir)); - foreach ($styles as $style) { - unlink($template_dir . '/' . $style); - } - file_put_contents($template_dir . '/' . $prefix . $version . '.css', $css); - } - } - $document = JFactory::getDocument(); - $document->addStyleSheet(JURI::root() . 'templates/' . $this->template . '/css/' . $prefix . $version . '.css'); - } - - public function loadCSSFile() - { - if ($this->cssFile) { - $styles = []; - foreach (['desktop', 'tablet', 'mobile'] as $device) { - if ($device == 'mobile') { - $styles[] = '@media (max-width: 767.98px) {' . implode('', $this->_styles[$device]) . '}'; - } elseif ($device == 'tablet') { - $styles[] = '@media (max-width: 991.98px) {' . implode('', $this->_styles[$device]) . '}'; - } else { - $styles[] = implode('', $this->_styles[$device]); - } - } - $styles = implode('', $styles); - $document = JFactory::getDocument(); - $mediaVersion = $document->getMediaVersion(); - $version = md5($styles); - $this->buildAstroidCSS($version, $styles); - } - } - - public function getStyleDeclaration() - { - $styles = []; - foreach (['desktop', 'tablet', 'mobile'] as $device) { - if ($device == 'mobile') { - $styles[] = '@media (max-width: 767.98px) {' . implode('', $this->_styles[$device]) . '}'; - } elseif ($device == 'tablet') { - $styles[] = '@media (max-width: 991.98px) {' . implode('', $this->_styles[$device]) . '}'; - } else { - $styles[] = implode('', $this->_styles[$device]); - } - } - $styles = implode('', $styles); - return $styles; - } - - public function loadJS() - { - $document = JFactory::getDocument(); - foreach ($this->_js as $key => $js) { - if ($key == 'custom.js') { - $template_directory = JPATH_THEMES . "/" . $this->template . "/js/"; - if (!file_exists($template_directory . $key)) { - continue; - } - } - $document->addScript($js, ['version' => $document->getMediaVersion()]); - } - } - - public function _loadModule($errorContent) - { - - // Expression to search for(module Position) - $regex = '/{loadposition\s(.*?)}/i'; - - preg_match_all($regex, $errorContent, $matches, PREG_SET_ORDER); - - if ($matches) { - foreach ($matches as $match) { - $matcheslist = explode(',', $match[1]); - $position = trim($matcheslist[0]); - $output = $this->_load($position); - // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: - $errorContent = preg_replace("|$match[0]|", $output, $errorContent, 1); - } - } - - // Expression to search for(id) - $regexmodid = '/{loadmoduleid\s([1-9][0-9]*)}/i'; - - preg_match_all($regexmodid, $errorContent, $matchesmodid, PREG_SET_ORDER); - - // If no matches, skip this - if ($matchesmodid) { - foreach ($matchesmodid as $match) { - $id = trim($match[1]); - $output = $this->_loadid($id); - - // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: - $errorContent = preg_replace("|$match[0]|", $output, $errorContent, 1); - } - } - - return $errorContent; - } - - public function _load($position) - { - $this->modules[$position] = ''; - $document = JFactory::getDocument(); - $renderer = $document->loadRenderer('module'); - $modules = JModuleHelper::getModules($position); - ob_start(); - - foreach ($modules as $module) { - echo $renderer->render($module); - } - - $this->modules[$position] = ob_get_clean(); - - return $this->modules[$position]; - } - - public function _loadid($id) - { - $this->modules[$id] = ''; - $document = JFactory::getDocument(); - $renderer = $document->loadRenderer('module'); - $modules = JModuleHelper::getModuleById($id); - ob_start(); - - if ($modules->id > 0) { - echo $renderer->render($modules); - } - - $this->modules[$id] = ob_get_clean(); - - return $this->modules[$id]; - } - - public function SeletedMedia() - { - $params = JComponentHelper::getParams('com_media'); - return $params->get('image_path', 'images'); - } - - public function _loadFontAwesome() - { - $plugin = JPluginHelper::getPlugin('system', 'astroid'); - $assets = JURI::root() . 'media' . '/' . 'astroid' . '/' . 'assets' . '/' . 'fontawesome'; - $plugin_params = new JRegistry($plugin->params); - $astroid_load_fontawesome = $plugin_params->get('astroid_load_fontawesome', "cdn"); - $document = JFactory::getDocument(); - if ($astroid_load_fontawesome == "local") { - $document->addStyleSheet($assets . '/css/font-awesome.css'); - $document->addStyleSheet($assets . '/webfonts'); - } elseif ($astroid_load_fontawesome == "cdn") { - $document->addStyleSheet("https://use.fontawesome.com/releases/v" . AstroidFrameworkConstants::$fontawesome_version . "/css/all.css"); - } - } - - public function getPresets() - { - $presets_path = JPATH_SITE . "/templates/{$this->template}/astroid/presets/"; - if (!file_exists($presets_path)) { - return []; - } - $files = array_filter(glob($presets_path . '/' . '*.json'), 'is_file'); - $presets = []; - foreach ($files as $file) { - $json = file_get_contents($file); - $data = \json_decode($json, true); - $preset = ['title' => pathinfo($file)['filename'], 'colors' => [], 'preset' => [], 'thumbnail' => '', 'name' => pathinfo($file)['filename']]; - if (isset($data['title']) && !empty($data['title'])) { - $preset['title'] = \JText::_($data['title']); - } - if (isset($data['thumbnail']) && !empty($data['thumbnail'])) { - $preset['thumbnail'] = \JURI::root() . 'templates/' . $this->template . '/' . $data['thumbnail']; - } - if (isset($data['colors'])) { - $colors = []; - $properties = []; - foreach ($data['colors'] as $prop => $color) { - if (is_array($color)) { - foreach ($color as $subprop => $color2) { - if (!empty($color2)) { - $properties[$prop][$subprop] = $color2; - $colors[] = $color2; - } - } - } else { - if (!empty($color)) { - $properties[$prop] = $color; - $colors[] = $color; - } - } - } - $colors = array_keys(array_count_values($colors)); - $preset['colors'] = array_unique($colors); - $preset['preset'] = $properties; - } - $presets[] = $preset; - } - return $presets; - } - - public function inspect() - { - // fix for typography - $extension = \JTable::getInstance('extension'); - $id = $extension->find(array('element' => 'astroid', 'type' => 'library')); - $extension->load($id); - $frameworkInfo = json_decode($extension->manifest_cache, true); - if ($frameworkInfo['version'] < 2.3) { - foreach (['body', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as $typo) { - $typoType = $this->params->get($typo . '_typography'); - if (trim($typoType) == 'custom') { - $typoOption = $typo . '_typography_options'; - $typoParams = $this->params->get($typoOption); - foreach (['font_size', 'font_size_unit', 'letter_spacing', 'letter_spacing_unit', 'line_height', 'line_height_unit'] as $prop) { - if (!is_string($typoParams->{$prop})) { - $typoParams->{$prop} = $typoParams->{$prop}->desktop; - } - } - $this->params->set($typoOption, $typoParams); - } - } - - $menuType = $this->params->get('menus_typography'); - if (trim($menuType) == 'custom') { - $menu_font = $this->params->get('menu_typography_options'); - foreach (['font_size', 'font_size_unit', 'letter_spacing', 'letter_spacing_unit', 'line_height', 'line_height_unit'] as $prop) { - if (!is_string($menu_font->{$prop})) { - $menu_font->{$prop} = $menu_font->{$prop}->desktop; - } - } - $this->params->set('menu_typography_options', $menu_font); - } - - $submenuType = $this->params->get('submenus_typography'); - if (trim($submenuType) == 'custom') { - $submenu_font = $this->params->get('submenu_typography_options'); - foreach (['font_size', 'font_size_unit', 'letter_spacing', 'letter_spacing_unit', 'line_height', 'line_height_unit'] as $prop) { - if (!is_string($submenu_font->{$prop})) { - $submenu_font->{$prop} = $submenu_font->{$prop}->desktop; - } - } - $this->params->set('submenu_typography_options', $submenu_font); - } - } - } -} - -class AstroidLog -{ - - protected $type; - protected $message; - protected $data; - - public function __construct($type, $message, $data) - { - $this->type = $type; - $this->message = $message; - $this->data = $data; - $this->created = time(); - } - - public function render() - { - $class = $this->type == 'error' ? 'danger' : $this->type; - echo '

' . $this->message . '

'; - } -} +class AstroidFrameworkTemplate extends Astroid\Template {} \ No newline at end of file diff --git a/plugins/astroid/astroid.xml b/plugins/astroid/astroid.xml index 036eb01c..51b91234 100644 --- a/plugins/astroid/astroid.xml +++ b/plugins/astroid/astroid.xml @@ -2,8 +2,8 @@ Astroid Plugin Astroid Framework Team - October 2023 - 3.0.3 + November 2023 + 3.0.4 https://www.astroidframe.work Copyright (C) 2023 TemPlaza, Inc. All rights reserved. GNU General Public License version 3 or later; see LICENSE.txt diff --git a/plugins/astroid/services/provider.php b/plugins/astroid/services/provider.php index 6042deac..4a0bf781 100644 --- a/plugins/astroid/services/provider.php +++ b/plugins/astroid/services/provider.php @@ -34,8 +34,9 @@ public function register(Container $container): void $container->set( PluginInterface::class, function (Container $container) { + $dispatcher = $container->get(DispatcherInterface::class); $plugin = new AstroidPlugin( - $container->get(DispatcherInterface::class), + $dispatcher, (array) PluginHelper::getPlugin('system', 'astroid') ); $plugin->setApplication(Factory::getApplication());