wizard
1 year ago
class-page-additional-css.php
1 year ago
class-page-dashboard.php
1 year ago
class-page-settings.php
1 year ago
class-page-support.php
1 year ago
class-page-dashboard.php
120 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Admin\Pages; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | use SuperbAddons\Admin\Controllers\DashboardController; |
| 8 | use SuperbAddons\Admin\Controllers\Wizard\WizardController; |
| 9 | use SuperbAddons\Components\Admin\EditorPreviewsModal; |
| 10 | use SuperbAddons\Components\Admin\NewsletterForm; |
| 11 | use SuperbAddons\Data\Utils\Wizard\WizardActionParameter; |
| 12 | |
| 13 | class DashboardPage |
| 14 | { |
| 15 | private $theme_designer_url; |
| 16 | private $add_new_pages_url; |
| 17 | private $custom_css_url; |
| 18 | private $woocommerce_header_url; |
| 19 | private $header_footer_url; |
| 20 | |
| 21 | public function __construct() |
| 22 | { |
| 23 | $this->theme_designer_url = WizardController::GetWizardURL(WizardActionParameter::INTRO); |
| 24 | $this->add_new_pages_url = WizardController::GetWizardURL(WizardActionParameter::ADD_NEW_PAGES); |
| 25 | $this->woocommerce_header_url = WizardController::GetWizardURL(WizardActionParameter::WOOCOMMERCE_HEADER); |
| 26 | $this->header_footer_url = WizardController::GetWizardURL(WizardActionParameter::HEADER_FOOTER); |
| 27 | $this->custom_css_url = add_query_arg( |
| 28 | array( |
| 29 | 'page' => DashboardController::ADDITIONAL_CSS, |
| 30 | ), |
| 31 | admin_url("admin.php") |
| 32 | ); |
| 33 | $this->Render(); |
| 34 | } |
| 35 | |
| 36 | private function Render() |
| 37 | { |
| 38 | ?> |
| 39 | <div class="superbthemes-module-introduction-box"> |
| 40 | <div class="superbthemes-module-introduction-box-content" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/superb-addons-preview.png'); ?>);"> |
| 41 | <h1><?= esc_html__("An introduction to Superb Addons", "superb-blocks"); ?></h1> |
| 42 | <p><?= esc_html__("Supercharge the WordPress Editor and unlock new pre-built websites, features, patterns, blocks and sections.", "superb-blocks"); ?></p> |
| 43 | </div> |
| 44 | <div class="superbthemes-module-introduction-box-footer"> |
| 45 | <?php new NewsletterForm(__("Sign up for our newsletter to get updates, freebies, and more.", "superb-blocks"), true); ?> |
| 46 | </div> |
| 47 | </div> |
| 48 | |
| 49 | <div class="superbthemes-module-feature-grid-large"> |
| 50 | |
| 51 | <div class="superbthemes-module-feature-grid-large-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/theme-designer-bg.svg'); ?>)"> |
| 52 | <img src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/theme-designer-icon.svg'); ?>" aria-hidden="true" width="54" height="54"> |
| 53 | <h3><?= esc_html__("Theme Designer", "superb-blocks"); ?></h3> |
| 54 | <p><?= esc_html__("Customize your website's layout and design with a few clicks.", "superb-blocks"); ?></p> |
| 55 | <a class="superbthemes-module-cta superbthemes-module-cta-green" href="<?= esc_url($this->theme_designer_url); ?>"><?= esc_html__("Launch Theme Designer", "superb-blocks"); ?></a> |
| 56 | </div> |
| 57 | |
| 58 | <div class="superbthemes-module-feature-grid-large-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/template-page-bg.svg'); ?>)"> |
| 59 | <img src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/template-page-icon.svg'); ?>" aria-hidden="true" width="54" height="54"> |
| 60 | <h3><?= esc_html__("Template Pages", "superb-blocks"); ?></h3> |
| 61 | <p><?= esc_html__("Add pre-built page designs to your site and insert your own content.", "superb-blocks"); ?></p> |
| 62 | <a class="superbthemes-module-cta" href="<?= esc_url($this->add_new_pages_url); ?>"><?= esc_html__("Add Template Pages", "superb-blocks"); ?></a> |
| 63 | </div> |
| 64 | |
| 65 | <div class="superbthemes-module-feature-grid-large-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/gutenberg-patterns-bg.svg'); ?>)"> |
| 66 | <img src="<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/gutenberg-patterns-icon.svg'); ?>" aria-hidden="true" width="54" height="54"> |
| 67 | <h3><?= esc_html__("WordPress Editor Patterns", "superb-blocks"); ?></h3> |
| 68 | <p><?= esc_html__("Explore hundreds of pre-built patterns that you can insert with one click.", "superb-blocks"); ?></p> |
| 69 | <button type="button" class="superbthemes-module-cta" id="gutenberg-lib-modal-btn"><?= esc_html__("Explore Patterns", "superb-blocks"); ?></button> |
| 70 | </div> |
| 71 | |
| 72 | </div> |
| 73 | |
| 74 | <div class="superbthemes-module-feature-grid-small"> |
| 75 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/superb-blocks.svg'); ?>)"> |
| 76 | <h3><?= esc_html__("Blocks & WordPress Editor Enhancements", "superb-blocks"); ?></h3> |
| 77 | <p><?= esc_html__("Access must-have blocks, Enhanced editor, grid systems, improved block control and much more", "superb-blocks"); ?>.</p> |
| 78 | <button type="button" id="superb-addons-dashboard-preview-modal-btn" class="superbthemes-module-cta-link"><?= esc_html__("Explore blocks and enhancements", "superb-blocks"); ?></button> |
| 79 | </div> |
| 80 | |
| 81 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/custom-css.svg'); ?>)"> |
| 82 | <h3><?= esc_html__("Custom CSS", "superb-blocks"); ?></h3> |
| 83 | <p><?= esc_html__("Add custom CSS with syntax highlight, custom display settings, and minified output.", "superb-blocks"); ?></p> |
| 84 | <a href="<?= esc_url($this->custom_css_url); ?>" class="superbthemes-module-cta-link"><?= esc_html__("Add custom CSS", "superb-blocks"); ?></a> |
| 85 | </div> |
| 86 | |
| 87 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/dashboard-header-footer.svg'); ?>)"> |
| 88 | <h3><?= esc_html__("Header & Footer Templates", "superb-blocks"); ?></h3> |
| 89 | <p><?= esc_html__("Select your website's new header and footer layout with a few clicks.", "superb-blocks"); ?></p> |
| 90 | <a href="<?= esc_url($this->header_footer_url); ?>" class="superbthemes-module-cta-link"><?= esc_html__("Select header and footer", "superb-blocks"); ?></a> |
| 91 | </div> |
| 92 | |
| 93 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/dashboard-wc-icon.svg'); ?>)"> |
| 94 | <h3><?= esc_html__("WooCommerce Header Templates", "superb-blocks"); ?></h3> |
| 95 | <p><?= esc_html__("Select a premade WooCommerce compatible header template and navigation menu.", "superb-blocks"); ?></p> |
| 96 | <?php if (is_plugin_active('woocommerce/woocommerce.php')): ?> |
| 97 | <a href="<?= esc_url($this->woocommerce_header_url); ?>" class="superbthemes-module-cta-link"><?= esc_html__("Select WooCommerce header", "superb-blocks"); ?></a> |
| 98 | <?php else: ?> |
| 99 | <span class="superbthemes-module-cta-link-disabled superbaddons-element-text-gray"><?= esc_html__("Requires WooCommerce", "superb-blocks"); ?></span> |
| 100 | <?php endif; ?> |
| 101 | </div> |
| 102 | |
| 103 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/elementor-sections.svg'); ?>)"> |
| 104 | <h3><?= esc_html__("Elementor Sections", "superb-blocks"); ?></h3> |
| 105 | <p><?= esc_html__("Access 300+ pre-built elementor sections and build beautiful sites, fast.", "superb-blocks"); ?></p> |
| 106 | <button type="button" id="elementor-lib-modal-btn" class="superbthemes-module-cta-link"><?= esc_html__("Explore sections", "superb-blocks"); ?></button> |
| 107 | </div> |
| 108 | |
| 109 | <div class="superbthemes-module-feature-grid-small-item" style="background-image:url(<?= esc_url(SUPERBADDONS_ASSETS_PATH . '/img/get-help.svg'); ?>)"> |
| 110 | <h3><?= esc_html__("Get Help", "superb-blocks"); ?></h3> |
| 111 | <p><?= esc_html__("Our team is here to assist you. If you have any questions or issues, please don't hesitate to reach out.", "superb-blocks"); ?></p> |
| 112 | <a href="https://superbthemes.com/contact/" target="_blank" class="superbthemes-module-cta-link"><?= esc_html__("Contact support", "superb-blocks"); ?></a> |
| 113 | </div> |
| 114 | </div> |
| 115 | |
| 116 | <?php |
| 117 | new EditorPreviewsModal(); |
| 118 | } |
| 119 | } |
| 120 |