Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-mw committed Apr 28, 2022
1 parent 2dde5e6 commit 303a582
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 10 additions & 0 deletions src/MicroweberPackages/App/Http/Controllers/FrontendController.php
Expand Up @@ -153,6 +153,16 @@ public function frontend($request_params = [])
}


$animations = get_option( 'animations-global', 'template');
if($animations) {
if($animations) {
mw()->template->head('<script id="template-animations-data">mw.__pageAnimations = ' . $animations . '</script>');
}
}




$page = false;

if ($page == false and !empty($this->page)) {
Expand Down
12 changes: 1 addition & 11 deletions userfiles/modules/microweber/api/api.js
Expand Up @@ -1081,19 +1081,9 @@ if(isset($inline_scripts) and is_array($inline_scripts)){



mw.__pageAnimations = [ ];
mw.__pageAnimations = mw.__pageAnimations || [];

<?php
$animations = get_option( 'animations-global', 'page-animations');
// var_dump($animations);
if($animations) {
// $animations = @json_decode($animations, true);
if($animations) {

print('mw.__pageAnimations = ' . $animations . ';');
}
}
?>

var prefix = 'animate__';
var suffix = 'animated';
Expand Down

0 comments on commit 303a582

Please sign in to comment.