| 1 |
<?php |
| 2 |
/** |
| 3 |
* MetaSync HTML Visual Editor Page Template |
| 4 |
* |
| 5 |
* @package Metasync |
| 6 |
* @subpackage Metasync/admin/partials |
| 7 |
*/ |
| 8 |
|
| 9 |
if (!defined('ABSPATH')) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
?> |
| 13 |
|
| 14 |
<div class="metasync-html-editor-wrapper"> |
| 15 |
<!-- Editor Header --> |
| 16 |
<div class="metasync-editor-header"> |
| 17 |
<div class="metasync-editor-header-left"> |
| 18 |
<a href="<?php echo esc_url(admin_url('edit.php?post_type=page')); ?>" class="metasync-back-button"> |
| 19 |
<span class="dashicons dashicons-arrow-left-alt2"></span> |
| 20 |
<?php _e('Back to Pages', 'metasync'); ?> |
| 21 |
</a> |
| 22 |
<div class="metasync-page-title"> |
| 23 |
<strong><?php echo esc_html($post->post_title); ?></strong> |
| 24 |
<span class="metasync-editor-badge">⚡ <?php echo esc_html($label); ?></span> |
| 25 |
</div> |
| 26 |
</div> |
| 27 |
|
| 28 |
<div class="metasync-editor-header-center"> |
| 29 |
<div class="metasync-editor-status"> |
| 30 |
<span class="metasync-status-indicator"></span> |
| 31 |
<span class="metasync-status-text"><?php _e('Ready', 'metasync'); ?></span> |
| 32 |
</div> |
| 33 |
</div> |
| 34 |
|
| 35 |
<div class="metasync-editor-header-right"> |
| 36 |
<button type="button" class="button metasync-preview-button" title="<?php esc_attr_e('Preview', 'metasync'); ?>"> |
| 37 |
<span class="dashicons dashicons-visibility"></span> |
| 38 |
<?php _e('Preview', 'metasync'); ?> |
| 39 |
</button> |
| 40 |
<button type="button" class="button button-primary metasync-save-button" title="<?php esc_attr_e('Save Changes', 'metasync'); ?>"> |
| 41 |
<span class="dashicons dashicons-saved"></span> |
| 42 |
<?php _e('Save', 'metasync'); ?> |
| 43 |
</button> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
|
| 47 |
<!-- Editor Container --> |
| 48 |
<div class="metasync-editor-container" id="metasync-gjs-editor"> |
| 49 |
<!-- GrapesJS will initialize here --> |
| 50 |
</div> |
| 51 |
|
| 52 |
<!-- Hidden data --> |
| 53 |
<textarea id="metasync-html-content" style="display:none;"><?php echo esc_textarea($html_content); ?></textarea> |
| 54 |
</div> |
| 55 |
|
| 56 |
<style> |
| 57 |
/* Inline critical styles to prevent flash */ |
| 58 |
.metasync-html-editor-wrapper { |
| 59 |
position: fixed; |
| 60 |
top: 32px; |
| 61 |
left: 0; |
| 62 |
right: 0; |
| 63 |
bottom: 0; |
| 64 |
background: #1e1e1e; |
| 65 |
z-index: 99999; |
| 66 |
} |
| 67 |
|
| 68 |
@media screen and (max-width: 782px) { |
| 69 |
.metasync-html-editor-wrapper { |
| 70 |
top: 46px; |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
#wpadminbar { |
| 75 |
z-index: 100000; |
| 76 |
} |
| 77 |
</style> |
| 78 |
|