-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cecc31
commit bf4d378
Showing
27 changed files
with
249 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
<?php namespace App\Assets; | ||
|
||
use App\Assets\Traits\CommonAssets; | ||
use App\Assets\Traits\FormEngineScripts; | ||
|
||
class OptionsPanelScripts { | ||
use CommonAssets; | ||
use FormEngineScripts; | ||
|
||
public function enqueue( ) { | ||
$this->enqueueCommonScripts(); | ||
$this->enqueueFormEngineScripts(); | ||
|
||
$asset = onepager()->asset(); | ||
$asset->style( 'lithium-ui', asset( 'assets/css/lithium-builder.css' ) ); | ||
$asset->script( 'admin-bundle', asset( 'assets/optionspanel.bundle.js' ), [ 'jquery' ] ); | ||
$asset->style( 'lithium-ui', op_asset( 'assets/css/lithium-builder.css' ) ); | ||
$asset->script( 'admin-bundle', op_asset( 'assets/optionspanel.bundle.js' ), [ 'jquery' ] ); | ||
$asset->enqueue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php namespace App\Assets; | ||
|
||
class PreviewScripts { | ||
public function __construct() { | ||
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue' ] ); | ||
} | ||
|
||
public function enqueue() { | ||
$asset = onepager()->asset(); | ||
|
||
if ( !$this->isPreview() ) { | ||
return; | ||
} | ||
|
||
$asset->script( 'onepager-preview', op_asset( 'assets/onepager-preview.bundle.js' ), [ 'jquery' ] ); | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
protected function isPreview() { | ||
return onepager()->content()->isPreview(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!DOCTYPE html> | ||
<html <?php language_attributes(); ?>> | ||
<head> | ||
<meta charset="<?php bloginfo( 'charset' ); ?>"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="profile" href="http://gmpg.org/xfn/11"> | ||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> | ||
<title><?php wp_title(); ?></title> | ||
|
||
<?php wp_head(); ?> | ||
<style> | ||
#onepager-builder{ | ||
width: 23%; | ||
float: left; | ||
} | ||
#onepager-preview{ | ||
width: 77%; | ||
margin-left: 23%; | ||
} | ||
#onepager-preview iframe{ | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id="onepager-builder"></div> | ||
<div id="onepager-preview"> | ||
<iframe src="<?php echo onepager_get_preview_url(get_current_page_url()) ?>" frameborder="0"></iframe> | ||
</div> | ||
|
||
<?php wp_footer(); ?> | ||
<script> | ||
jQuery("#onepager-preview").css("height", jQuery(window).height()); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.