<?php
/**
 * Script for starter content
 */

if ( !defined( 'ABSPATH' ) ) exit;

new starter($config);
class starter {

    private static $config;
    public function __construct($config) {
        // set config
        self::$config = (object) $config;
    }

    /**
     * set starter content for theme preview
     */
    public static function set_starter_contents() {

        // debug("starter content");
        $empty_install = false;
        $theme_mods = get_theme_mods();
        $posts = get_posts( array(
            'posts_per_page'   => 1,
            'post_type'        => 'page',
        ) );
        $menu = wp_get_nav_menu_object( 'main-menu' );
        if (!$theme_mods || count($theme_mods) < 15 || empty($posts) || $menu === false) {
            if (get_option('fresh_site') != '1') {
                update_option('fresh_site', '1');
                header('Location: '.$_SERVER['REQUEST_URI']);
                exit();
            }
        }
        else return false;

        $path = plugins_url( 'greyd_tp_management/assets/wizzard/' );
        $starter = array(
            'theme_mods' => array(),
            'posts' => array(),
            'options' => array( 'show_on_front' => 'page' ),
            'nav_menus' => array(),
        );

        // theme mods
        if (!$theme_mods || count($theme_mods) < 15) {
            $file = $path.'mods/raw.json';
            if ( $file = \vc\helper::get_file_contents($file) ) {
                if ( ($data = json_decode($file)) ) {
                    foreach( (array)$data as $key => $value )
                        $starter['theme_mods'][$key] = $value;
                }
            }
            $starter['theme_mods']["custom_logo"] = $path.'content/img/greyd-LogoPh-dark.svg';
        }
        // pages
        if (empty($posts)) {
            $starter_contents = self::get_starter_contents();
            $page = $starter_contents['frontpage'];
            $content = $page['content'];
            foreach ($starter_contents['media'] as $slug => $media) {
                $content = str_replace('{{'.$slug.'}}', $path.'content/img/'.$media['slug'].'.svg', $content);
            }

            $starter['posts'][$page['title']] = array(
                'post_type'    => $page['type'],
                'post_title'   => $page['title'],
                'post_name'    => $page['slug'],
                'post_content' => $content,
            );
            $starter['options']['page_on_front'] = 'page';
            $starter['options']['page_on_front'] = '{{'.$page['title'].'}}';
        }
        // menu
        if ($menu === false) {
            $starter['nav_menus']['main-menu'] = array(
                'name' => __('GREYD Beispiel Menü', 'greyd_hub'),
                'items' => array(
                    'home'       => array(
                        'type'  => 'custom',
                        'title' => __('Beispiel Seite', 'greyd_hub'),
                        'url'   => home_url( '/' ),
                    ),
                    'tutorials' => array(
                        'type'  => 'custom',
                        'title' => __('Tutorials', 'greyd_hub'),
                        'url'   => __(self::$config->helpcenter, 'greyd_hub'),
                    ),
                ),
            );
        }

        // not working:
        // // media
        // // posts
        // // templates

        // debug($starter);
        add_theme_support( 'starter-content', $starter );
    }

    /**
     * Get content for theme preview
     */
    public static function get_starter_contents() {

        $content_shortcodes = 
            '[vc_row vc_bg_type="vc_bg_image" dynamic_vc_bg_image="" vc_bg_image_repeat="no-repeat" vc_bg_image_position="center_center" vc_bg_overlay_type="vc_bg_gradient2" vc_bg_overlay_color_opacity="30" ignore_inner_gutter="true" vc_bg_overlay="true" seperator_bgtype="" new_line_grad="" new_line_grad_more="" sub_seperator_sep="" vc_bg_colorselect="color_33" vc_bg_image="{{img_light_wide}}" vc_bg_overlay_gradient2="scroll|angle|192|color_31:0|color_63:100"][vc_column]
                [vc_blank_space height="80px" height_sm="20%" height_md="20%" height_lg="50%"]
                [vc_row_inner][vc_column_inner]
                    [vc_headlines dynamic_title="" h="h4" align="_center" title="'.__('Das ist deine neue Seite', 'greyd_hub').'"]
                    [vc_headlines dynamic_title="" h="h1" align="_center" title="'.__('mit der GREYD.SUITE', 'greyd_hub').'"]
                    [vc_cbutton style="down" dynamic_content="" dynamic_anchor="" anchor="features" pull="_center" size="_big" mode="_button" icon_size="0%"]'._x('Features ansehen', 'small', 'greyd_hub').'[/vc_cbutton]
                    [/vc_column_inner]
                [/vc_row_inner]
                [vc_blank_space height="140px" height_sm="60%"]
            [/vc_column][/vc_row]'.
            '[vc_row ignore_inner_gutter="true"][vc_column]
                [vc_blank_space height="100px" height_sm="60%"]
                [vc_row_inner][vc_column_inner offset="vc_col-lg-7 vc_col-md-8"]
                    [vc_headlines dynamic_title="" h="h5" title="'.__('Intuitive Gestaltung', 'greyd_hub').'"]
                    [vc_headlines dynamic_title="" h="h3" title="'.__('Dank Customizer mit Live-Vorschau', 'greyd_hub').'"]
                    [vc_column_text dynamic_content=""]'.__('Lege Design-Einstellungen im Customizer zentral für deine gesamte Website fest - von Farben über Schriften bis hin zum Aussehen von Buttons, Formularfeldern oder Überschriften. Du möchtest etwas ändern? Kein Problem! Ein Klick im Customizer und alle betroffenen Bereiche deiner Seite passen sich automatisch an.', 'greyd_hub').'[/vc_column_text]
                    [vc_blank_space]
                    [vc_cbutton dynamic_linkk="" mode="_button _sec" linkk="url:%2Fwp-admin%2Fcustomize.php|title:'.vc_encode(_x('Customizer öffnen', 'small', 'greyd_hub')).'|target:%20_blank|" icon="icon_tool"][/vc_cbutton]
                [/vc_column_inner]
                [vc_column_inner el_class="vc_col-lg-push-1" width="1/2" offset="vc_col-lg-offset-0 vc_col-lg-5 vc_col-md-offset-0 vc_col-md-4 vc_col-sm-offset-3 vc_col-xs-offset-1 vc_col-xs-10"]
                [/vc_column_inner][/vc_row_inner]
                [vc_blank_space height="100px" height_sm="50%"]
            [/vc_column][/vc_row]'.
            '[vc_row override_type="override_sm,override_md" override_gutter="override_sm,override_md"][vc_column]
                [vc_row_inner][vc_column_inner]
                    [vc_cbutton_anchor anchor="features"]
                [/vc_column_inner][/vc_row_inner]
                [vc_row_inner override_gutter="override_md,override_lg,override_xl" content_placement="bottom" equal_height="yes"][vc_column_inner width="1/2" offset="vc_col-lg-offset-0 vc_col-md-offset-0 vc_col-md-6 vc_col-sm-offset-0" el_id="boxborder"]
                    [vc_content_box dynamic_vc_content_box_link="" vc_content_box_type="vc_content_box_color" vc_content_box_margin_top_sm="15px" vc_content_box_margin_right_sm="20px" vc_content_box_padding_top_sm="30px" vc_content_boxpadding_right_sm="30px" vc_content_box_link="|||" vc_content_box_padding_right_md="30px" vc_content_box_padding_right_lg="40px" vc_content_box_colorselect="color_63" vc_content_box_colorselect_hover="color_23" vc_content_box_margin_right_md="0px"]
                        [vc_list vc_list_type="img" vc_list_icon_size="40px" vc_list_icon_margin="15px" list_icon_align_y="center" vc_list_image="{{logo_dark}}"]'.
                            '[vc_list_item dynamic_content=""]'.__('Der Customizer', 'greyd_hub').'[/vc_list_item]'.
                        '[/vc_list]
                        [vc_headlines dynamic_title="" h="h5" title="'.__('Globale Gestaltung deines Designs', 'greyd_hub').'"]
                        [vc_column_text dynamic_content=""]'.__('Definiere dein Design ganz unabhängig von den Inhalten deiner Seite. So kannst du Design-Anpassungen später problemlos vornehmen ohne dazu jedes Inhaltselement einzeln zu bearbeiten.', 'greyd_hub').'[/vc_column_text]
                        [vc_blank_space height="40px" height_sm="50%" height_lg="80%"]
                        [vc_cbutton dynamic_linkk="" size="_small" mode="_button _trd" icon_size="150%" linkk="url:%2Fwp-admin%2Fcustomize.php|title:'.vc_encode(__('zum Customizer', 'greyd_hub')).'||" icon="arrow_right"][/vc_cbutton]
                    [/vc_content_box]
                [/vc_column_inner]
                [vc_column_inner width="1/2" offset="vc_col-lg-offset-0 vc_col-md-offset-0 vc_col-md-6 vc_col-sm-offset-0" el_id="boxborder"]
                    [vc_content_box dynamic_vc_content_box_link="" vc_content_box_type="vc_content_box_color" vc_content_box_margin_top_sm="15" vc_content_box_margin_right_sm="20px" vc_content_box_padding_top_sm="30px" vc_content_boxpadding_right_sm="30px" vc_content_box_link="|||" vc_content_box_padding_right_md="30px" vc_content_box_padding_right_lg="40px" vc_content_box_padding_right_xl="40px" vc_content_box_colorselect="color_63" vc_content_box_colorselect_hover="color_23" vc_content_box_margin_right_md="0px"]
                        [vc_list vc_list_type="img" vc_list_icon_size="40px" vc_list_icon_margin="15px" list_icon_align_y="center" vc_list_image="{{logo_dark}}"]'.
                            '[vc_list_item dynamic_content=""]'.__('GREYD.Hub', 'greyd_hub').'[/vc_list_item]'.
                        '[/vc_list]
                        [vc_headlines h="h5" title="'.__('Verwalte deine komplette Multisite', 'greyd_hub').'"]
                        [vc_column_text dynamic_content=""]'.__('Egal wie viele Seiten deine Installation enthält: Im GREYD.Hub verwaltest du alle Seiten in einem Backend, kannst Back-ups erstellen, Design-Einstellungen exportieren und Seiten in wenigen Sekunden umziehen.', 'greyd_hub').'[/vc_column_text]
                        [vc_blank_space height="40px" height_sm="50%" height_lg="80%"]
                        [vc_cbutton dynamic_linkk="" size="_small" mode="_button _trd" icon_size="150%" linkk="url:%2Fwp-admin%2Fadmin.php%3Fpage%3Dgreyd_hub|title:'.vc_encode(__('zum Dashboard', 'greyd_hub')).'||" icon="arrow_right"][/vc_cbutton]
                    [/vc_content_box]
                [/vc_column_inner][/vc_row_inner]
                [vc_row_inner override_gutter="override_sm,override_md,override_lg,override_xl" content_placement="top" equal_height="yes"][vc_column_inner el_class="boxborder" width="1/2" offset="vc_col-lg-offset-0 vc_col-md-offset-0 vc_col-md-6 vc_col-sm-offset-0"]
                    [vc_content_box dynamic_vc_content_box_link="" vc_content_box_type="vc_content_box_color" vc_content_box_margin_top_sm="15px" vc_content_box_margin_right_sm="20px" vc_content_box_padding_top_sm="30px" vc_content_boxpadding_right_sm="30px" vc_content_box_link="|||" vc_content_box_padding_right_md="30px" vc_content_box_padding_right_lg="40px" vc_content_box_colorselect="color_63" vc_content_box_colorselect_hover="color_23" vc_content_box_margin_right_md="0px"]
                        [vc_list vc_list_type="img" vc_list_icon_size="40px" vc_list_icon_margin="15px" list_icon_align_y="center" vc_list_image="{{logo_dark}}"]'.
                            '[vc_list_item dynamic_content=""]'.__('GREYD.Forms', 'greyd_hub').'[/vc_list_item]'.
                        '[/vc_list]
                        [vc_headlines dynamic_title="" h="h5" title="'.__('Professionelle Formulare erstellen', 'greyd_hub').'" padding="0" css=".vc_custom_1587022528502{padding-top: 0px !important;padding-right: 0px !important;padding-bottom: 0px !important;padding-left: 0px !important;}"]
                        [vc_column_text dynamic_content=""]'.__('Ob einfaches Kontaktformular mit Double Opt-in, Conversion-optimiertes Lead-Formular oder mehrstufige Formulare mit CRM-Anbindung - mit dem Formulargenerator der GREYD.SUITE brauchst du keine zusätzlichen Plugins!', 'greyd_hub').'[/vc_column_text]
                        [vc_blank_space height="40px" height_sm="50%" height_lg="80%"]
                        [vc_cbutton dynamic_linkk="" size="_small" mode="_button _trd" icon_size="150%" linkk="url:%2Fwp-admin%2Fedit.php%3Fpost_type%3Dtp_forms|title:'.vc_encode(__('zu den Formularen', 'greyd_hub')).'||" icon="arrow_right"][/vc_cbutton]
                    [/vc_content_box]
                [/vc_column_inner][vc_column_inner el_class="boxborder" width="1/2" offset="vc_col-lg-offset-0 vc_col-md-offset-0 vc_col-md-6 vc_col-sm-offset-0"]
                    [vc_content_box dynamic_vc_content_box_link="" vc_content_box_type="vc_content_box_gradient2" vc_content_box_sdw_x="0px" vc_content_box_sdw_y="0px" vc_content_box_sdw_blur="50px" vc_content_box_sdw_x_hover="0px" vc_content_box_sdw_y_hover="0px" vc_content_box_sdw_blur_hover="30px" vc_content_box_sdw="true" vc_content_box_margin_top_sm="15px" vc_content_box_margin_right_sm="20px" vc_content_box_padding_top_sm="30px" vc_content_boxpadding_right_sm="30px" vc_content_box_link="|||" vc_content_box_padding_right_lg="40px" vc_content_box_margin_right_lg="30px" vc_content_box_sdw_colorselect="color_22" vc_content_box_sdw_colorselect_hover="color_22" vc_content_box_padding_right_sm="30px" vc_content_box_text_colorselect="color_62" vc_content_box_text_colorselect_hover="color_62" vc_content_box_gradient2="scroll|angle|145|color_11:0|color_12:100" vc_content_box_shadow="0px+0px+50px+0px+color_22+100" vc_content_box_shadow_hover="0px+0px+30px+0px+color_22+100"]
                        [vc_list vc_list_type="img" vc_list_icon_size="40px" vc_list_icon_margin="15px" list_icon_align_y="center" vc_list_image="{{logo_light}}"]'.
                            '[vc_list_item dynamic_content=""]'.__('Dynamic Templates', 'greyd_hub').'[/vc_list_item]'.
                        '[/vc_list]
                        [vc_headlines h="h5" title="'.__('Nutze die ganze Power von WordPress', 'greyd_hub').'"]
                        [vc_column_text dynamic_content=""]'.__('Mit Dynamic Templates reduzierst du den Aufwand für Aufbau und Pflege deiner Seite massiv und kannst Inhalte von Redakteuren ohne WordPress Kenntnisse pflegen lassen.', 'greyd_hub').'[/vc_column_text]
                        [vc_blank_space height="40px" height_sm="50%" height_lg="80%"]
                        [vc_cbutton dynamic_linkk="" mode="_button _sec" icon_size="150%" linkk="url:%2Fwp-admin%2Fedit.php%3Fpost_type%3Ddynamic_template|title:'.vc_encode(__('zu den Templates', 'greyd_hub')).'||" icon="arrow_right"][/vc_cbutton]
                    [/vc_content_box]
                [/vc_column_inner][/vc_row_inner]
                [vc_row_inner][vc_column_inner]
                    [vc_blank_space height="100px" height_sm="50%"]
                [/vc_column_inner][/vc_row_inner]
            [/vc_column][/vc_row]'.
            '[vc_row vc_bg_type="vc_bg_gradient2" vc_bg_gradient2="scroll|angle|202|color_11:0.0|color_12:100"][vc_column]
                [vc_row_inner content_placement="middle" equal_height="yes"][vc_column_inner width="5/6" offset="vc_col-md-10 vc_col-sm-offset-1 vc_col-xs-12"]
                    [vc_blank_space height="120px" height_sm="50%"]
                    [vc_headlines dynamic_title="" h="h3" align="_center" title="'.__('„It’s not an experiment if you know it’s going to work.”', 'greyd_hub').'" color="color_62"]
                    [vc_headlines dynamic_title="" h="h6" align="_center" title="'.__('Jeff Bezos', 'greyd_hub').'" color="color_62"]
                    [vc_blank_space height="120px" height_sm="50%"]
                [/vc_column_inner][/vc_row_inner]
            [/vc_column][/vc_row]'.
            '[vc_row vc_bg_type="vc_bg_color" vc_bg_colorselect="color_23"][vc_column]
                [vc_blank_space]
                [vc_headlines dynamic_title="" h="h5" align="_center" title="'.__('Jetzt loslegen', 'greyd_hub').'"]
                [vc_headlines h="h4" align="_center" title="'.__('Tutorials, FAQ und vieles mehr gibt’s hier:', 'greyd_hub').'"]
                [vc_cbutton dynamic_linkk="" pull="_center" mode="_button" linkk="url:'.urlencode(__(self::$config->helpcenter, 'greyd_hub')).'|title:'.vc_encode(__('zum Helpcenter', 'greyd_hub')).'|target:%20_blank|"][/vc_cbutton]
            [/vc_column][/vc_row]';
            
        $content_blocks = 
            '<!-- wp:columns {"backgroundColor":"color-33","className":"row_xxl ","row":{"type":"row_xxl"},"background":{"type":"image","opacity":100,"scroll":{"type":"scroll","parallax":30,"parallax_mobile":false},"image":{"id": {{img_light_wide}} ,"url":"{{img_light_wide::url}}","size":"contain","repeat":"no-repeat","position":"top center"},"overlay":{"type":"gradient","opacity":30,"color":"","gradient":"color-31-to-color-63-s"}}} -->
            <div class="wp-block-columns row_xxl has-color-33-background-color has-background"><!-- wp:column {"className":"col-12 wp-block-column ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:spacer {"height":80,"responsive":{"height":{"sm":"20%","md":"20%","lg":"50%"}}} -->
            <div style="height:80px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:columns {"className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns row_xxxl"><!-- wp:column {"className":"col-12, wp-block-column ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:heading {"textAlign":"center","level":4,"className":"has-text-align-center"} -->
            <h4 class="has-text-align-center">'.__('Das ist deine neue Seite', 'greyd_hub').'</h4>
            <!-- /wp:heading -->
            <!-- wp:heading {"textAlign":"center","level":1} -->
            <h1 class="has-text-align-center">'.__('mit der GREYD.SUITE', 'greyd_hub').'</h1>
            <!-- /wp:heading -->
            <!-- wp:greyd/buttons {"align":"center"} -->
            <div class="wp-block-greyd-buttons aligncenter"><!-- wp:greyd/button {"greydClass":"gs_xurjKj","trigger":{"type":"scroll","params":"features"},"size":"big","content":"'._x('Zeig mir mehr', 'small', 'greyd_hub').'","className":"is-style-prim"} -->
            <a role="trigger" class="button is-style-prim gs_xurjKj big"><span style="flex:1">'._x('Zeig mir mehr', 'small', 'greyd_hub').'</span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:spacer {"height":140,"responsive":{"height":{"sm":"60%"}}} -->
            <div style="height:140px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"className":"row_xxl ","row":{"type":"row_xxl"}} -->
            <div class="wp-block-columns row_xxl"><!-- wp:column {"className":"col-12 wp-block-column ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:spacer {"responsive":{"height":{"sm":"60%"}}} -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:columns {"className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns row_xxxl"><!-- wp:column {"className":"col-12 col-md-8 col-lg-7 wp-block-column","responsive":{"width":{"md":"col-md-8","lg":"col-lg-7","sm":""}}} -->
            <div class="wp-block-column col-12 col-md-8 col-lg-7"><!-- wp:heading {"level":5} -->
            <h5>'.__('Intuitive Gestaltung', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:heading {"level":2} -->
            <h2>'.__('Dank nativ integriertem Gutenberg Editor', 'greyd_hub').'</h2>
            <!-- /wp:heading -->
            <!-- wp:paragraph -->
            <p>'.__('Die GREYD.SUITE ist die einzige All-in-one Lösung, die den neuen Editor von WordPress vollständig integriert hat. Die nativen Funktionen haben wir an vielen Stellen erweitert und um starke GREYD.SUITE Features ergänzt. Das Design gestaltest du global für die gesamte Website im Customizer.', 'greyd_hub').'</p>
            <!-- /wp:paragraph -->
            <!-- wp:spacer -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/buttons -->
            <div class="wp-block-greyd-buttons alignleft"><!-- wp:greyd/button {"inline_css_id":"block-920533f7-2654-47ec-85e9-42726ffa5a9d","greydClass":"gs_Qo2uvO","trigger":{"type":"link","params":{"url":"/wp-admin/customize.php","title":"'._x('Customizer öffnen', 'small', 'greyd_hub').'","opensInNewTab":1}},"content":"'._x('Customizer öffnen', 'small', 'greyd_hub').'","icon":{"content":"icon_tool","position":"after","size":"100%","margin":"10px"},"className":"is-style-sec"} -->
            <a role="trigger" class="button is-style-sec gs_Qo2uvO "><span style="flex:1">'._x('Customizer öffnen', 'small', 'greyd_hub').'</span><span class="icon_tool" style="vertical-align:middle;font-size:100%;margin-left:10px" ariahidden="true"></span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:column -->
            <!-- wp:column {"className":"col-10 col-md-4 col-lg-5 offset-1 offset-sm-3 offset-md-0 offset-lg-0 push-lg-1","responsive":{"width":{"xs":"col-10","md":"col-md-4","lg":"col-lg-5","sm":""},"offset":{"xs":"offset-1","sm":"offset-sm-3","md":"offset-md-0","lg":"offset-lg-0"}}} -->
            <div class="wp-block-column col-10 col-md-4 col-lg-5 offset-1 offset-sm-3 offset-md-0 offset-lg-0 push-lg-1"></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:spacer {"responsive":{"height":{"sm":"50%"}}} -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns row_xxxl"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:greyd/dynamic {"template":"'.__('beispiel-was-ist-ein-dynamic-template', 'greyd_hub').'","dynamic_content":[{"dkey":"icon","dtype":"file_picker","dtitle":"Bild","dvalue":""},{"dkey":"title","dtype":"textarea","dtitle":"'.(__('Überschrift', 'greyd_hub')).'","dvalue":"'.(__('Dynamic Templates mobil optimiert', 'greyd_hub')).'"},{"dkey":"content","dtype":"textarea_html","dtitle":"'.(__('Textblock 01', 'greyd_hub')).'","dvalue":"'.__('Probiere einmal aus, dein Browser-Fenster zu verkleinern und sieh, wie sich dieser Bereich verändert. Wie das funktioniert?', 'greyd_hub').'"},{"dkey":"content","dtype":"textarea_html","dtitle":"'.(__('Textblock 02', 'greyd_hub')).'","dvalue":"'.__('Mit den Dynamic Templates der GREYD.SUITE! Damit kannst du verschiedene Layouts für jeden Breakpoint erstellen, musst deine Inhalte aber trotzdem nur einmal eingeben.', 'greyd_hub').'"},{"dkey":"content","dtype":"textarea","dtitle":"'.(__('Button', 'greyd_hub')).'","dvalue":"'.__('zu den Features', 'greyd_hub').'"},{"dkey":"trigger","dtype":"textfield","dtitle":"'.(__('Anker', 'greyd_hub')).'","dvalue":"%7B%22type%22%3A%22scroll%22%2C%22params%22%3A%22features%22%7D"}]} /--></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"className":"row_xxl ","row":{"type":"row_xxl"}} -->
            <div class="wp-block-columns row_xxl"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:columns {"className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns row_xxxl"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:spacer {"responsive":{"height":{"lg":"100%"}}} -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/anchor {"anchor":"features"} -->
            <div id="features" class="greyd-anchor-target"></div>
            <!-- /wp:greyd/anchor --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"verticalAlignment":"bottom","className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns are-vertically-aligned-bottom row_xxxl"><!-- wp:column {"className":"col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 ","responsive":{"width":{"md":"col-md-6","sm":""},"offset":{"sm":"offset-sm-0","md":"offset-md-0","lg":"offset-lg-0"}}} -->
            <div class="wp-block-column col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0" id="boxborder"><!-- wp:greyd/box {"greydClass":"gs_j51agd","greydStyles":{"padding":{"top":"30px","bottom":"30px","right":"40px","left":"40px"},"margin":{"top":"15px","bottom":"15px","right":"0px","left":"0px"},"responsive":{"lg":{"padding":{"right":"40px","left":"40px"}},"md":{"padding":{"right":"30px","left":"30px"},"margin":{"right":"0px","left":"0px"}},"sm":{"padding":{"top":"30px","bottom":"30px","right":"30px","left":"30px"},"margin":{"top":"15px","bottom":"15px","right":"20px","left":"20px"}}},"background":"color-63","hover":{"background":"color-23"}}} -->
            <div class="wp-block-greyd-box"><!-- wp:greyd/list {"type":"img","web":{"style":"disc","position":"left","align_y":"start"},"icon":{"icon":"","url":"{{logo_dark::url}}","id": {{logo_dark}} ,"color":"","size":"40px","margin":"15px","position":"left","align_y":"center","align_x":"start"}} -->
            <ul class="wp-block-greyd-list alignleft"><!-- wp:greyd/list-item {"type":"img"} -->
            <li><span class="list_icon"></span><span class="list_content"><p>'.__('GREYD.Popups', 'greyd_hub').'</p></span></li>
            <!-- /wp:greyd/list-item --></ul>
            <!-- /wp:greyd/list -->
            <!-- wp:heading {"level":5} -->
            <h5>'.__('Automatisierte Pop-ups im Design deiner Seite', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:paragraph -->
            <p>'.__('Mit dem integrierten Pop-up Builder gestaltest du einzigartige Pop-ups automatisch im Design deiner Website. Dir stehen unterschiedlichste Auslöser, Animationen, Regeln und Module zur Verfügung.', 'greyd_hub').'</p>
            <!-- /wp:paragraph -->
            <!-- wp:spacer {"height":40,"responsive":{"height":{"sm":"50%","lg":"80%"}}} -->
            <div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/buttons -->
            <div class="wp-block-greyd-buttons alignleft"><!-- wp:greyd/button {"greydClass":"gs_9oQDI5","trigger":{"type":"link","params":{"url":"/wp-admin/customize.php","title":"'.(__('zu den Pop-ups', 'greyd_hub')).'","opensInNewTab":0}},"size":"small","content":"'.(__('zu den Pop-ups', 'greyd_hub')).'","icon":{"content":"arrow_right","position":"after","size":"150%","margin":"10px"},"className":"is-style-trd"} -->
            <a role="trigger" class="button is-style-trd gs_9oQDI5 small"><span style="flex:1">'.(__('zu den Pop-ups', 'greyd_hub')).'</span><span class="arrow_right" style="vertical-align:middle;font-size:150%;margin-left:10px" ariahidden="true"></span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:greyd/box --></div>
            <!-- /wp:column -->
            <!-- wp:column {"className":"col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 ","responsive":{"width":{"md":"col-md-6","sm":""},"offset":{"sm":"offset-sm-0","md":"offset-md-0","lg":"offset-lg-0"}}} -->
            <div class="wp-block-column col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0" id="boxborder"><!-- wp:greyd/box {"greydClass":"gs_fJGb5f","greydStyles":{"padding":{"top":"30px","bottom":"30px","right":"40px","left":"40px"},"margin":{"top":"15px","bottom":"15px","right":"0px","left":"0px"},"responsive":{"lg":{"padding":{"right":"40px","left":"40px"}},"md":{"padding":{"right":"30px","left":"30px"},"margin":{"right":"0px","left":"0px"}},"sm":{"padding":{"top":"30px","bottom":"30px","right":"30px","left":"30px"},"margin":{"top":"15px","bottom":"15px","right":"20px","left":"20px"}}},"background":"color-63","hover":{"background":"color-23"}}} -->
            <div class="wp-block-greyd-box"><!-- wp:greyd/list {"type":"img","web":{"style":"disc","position":"left","align_y":"start"},"icon":{"icon":"","url":"{{logo_dark::url}}","id": {{logo_dark}} ,"color":"","size":"40px","margin":"15px","position":"left","align_y":"center","align_x":"start"}} -->
            <ul class="wp-block-greyd-list alignleft"><!-- wp:greyd/list-item {"type":"img"} -->
            <li><span class="list_icon"></span><span class="list_content"><p>'.__('GREYD.Hub', 'greyd_hub').'</p></span></li>
            <!-- /wp:greyd/list-item --></ul>
            <!-- /wp:greyd/list -->
            <!-- wp:heading {"level":5} -->
            <h5>'.__('Alle deine Projekte in einem Backend', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:paragraph -->
            <p>'.__('Egal wie viele Seiten deine Installation enthält: Im GREYD.Hub kannst du alle deine Seiten zentral verwalten, mit nur einem Klick Inhalte, Designs oder ganze Seiten importieren und exportieren sowie Back-ups übersichtlich verwalten.', 'greyd_hub').'</p>
            <!-- /wp:paragraph -->
            <!-- wp:spacer {"height":40,"responsive":{"height":{"sm":"50%","lg":"80%"}}} -->
            <div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/buttons -->
            <div class="wp-block-greyd-buttons alignleft"><!-- wp:greyd/button {"greydClass":"gs_rXaywR","trigger":{"type":"link","params":{"url":"/wp-admin/admin.php?page=greyd_hub","title":"'.(__('zum Dashboard', 'greyd_hub')).'","opensInNewTab":0}},"size":"small","content":"'.(__('zum Dashboard', 'greyd_hub')).'","icon":{"content":"arrow_right","position":"after","size":"150%","margin":"10px"},"className":"is-style-trd"} -->
            <a role="trigger" class="button is-style-trd gs_rXaywR small"><span style="flex:1">'.(__('zum Dashboard', 'greyd_hub')).'</span><span class="arrow_right" style="vertical-align:middle;font-size:150%;margin-left:10px" ariahidden="true"></span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:greyd/box --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"verticalAlignment":"top","className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns are-vertically-aligned-top row_xxxl"><!-- wp:column {"className":"col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 boxborder","responsive":{"width":{"md":"col-md-6","sm":""},"offset":{"sm":"offset-sm-0","md":"offset-md-0","lg":"offset-lg-0"}}} -->
            <div class="wp-block-column col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 boxborder"><!-- wp:greyd/box {"greydClass":"gs_HLljXL","greydStyles":{"padding":{"top":"30px","bottom":"30px","right":"40px","left":"40px"},"margin":{"top":"15px","bottom":"15px","right":"0px","left":"0px"},"responsive":{"lg":{"padding":{"right":"40px","left":"40px"}},"md":{"padding":{"right":"30px","left":"30px"},"margin":{"right":"0px","left":"0px"}},"sm":{"padding":{"top":"30px","bottom":"30px","right":"30px","left":"30px"},"margin":{"top":"15px","bottom":"15px","right":"20px","left":"20px"}}},"background":"color-63","hover":{"background":"color-23"}}} -->
            <div class="wp-block-greyd-box"><!-- wp:greyd/list {"type":"img","web":{"style":"disc","position":"left","align_y":"start"},"icon":{"icon":"","url":"{{logo_dark::url}}","id": {{logo_dark}} ,"color":"","size":"40px","margin":"15px","position":"left","align_y":"center","align_x":"start"}} -->
            <ul class="wp-block-greyd-list alignleft"><!-- wp:greyd/list-item {"type":"img"} -->
            <li><span class="list_icon"></span><span class="list_content"><p>'.__('GREYD.Forms', 'greyd_hub').'</p></span></li>
            <!-- /wp:greyd/list-item --></ul>
            <!-- /wp:greyd/list -->
            <!-- wp:heading {"level":5,"inline_css":"padding-top: 0px !important;\npadding-right: 0px !important;\npadding-bottom: 0px !important;\npadding-left: 0px !important;\n"} -->
            <h5>'.__('Professionelle Formulare erstellen', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:paragraph -->
            <p>'.__('Ob einfaches Kontaktformular mit Double Opt-in, Conversion-optimiertes Lead-Formular oder komplexe Multistep-Formulare mit CRM-Anbindung und mathematischen Berechnungen – mit GREYD.Forms brauchst du keine zusätzlichen Plugins!', 'greyd_hub').'</p>
            <!-- /wp:paragraph -->
            <!-- wp:spacer {"height":40,"responsive":{"height":{"sm":"50%","lg":"80%"}}} -->
            <div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/buttons -->
            <div class="wp-block-greyd-buttons alignleft"><!-- wp:greyd/button {"greydClass":"gs_QjKw7p","trigger":{"type":"link","params":{"url":"/wp-admin/edit.php?post_type=tp_forms","title":"'.(__('zu den Formularen', 'greyd_hub')).'","opensInNewTab":0}},"size":"small","content":"'.(__('zu den Formularen', 'greyd_hub')).'","icon":{"content":"arrow_right","position":"after","size":"150%","margin":"10px"},"className":"is-style-trd"} -->
            <a role="trigger" class="button is-style-trd gs_QjKw7p small"><span style="flex:1">'.(__('zu den Formularen', 'greyd_hub')).'</span><span class="arrow_right" style="vertical-align:middle;font-size:150%;margin-left:10px" ariahidden="true"></span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:greyd/box --></div>
            <!-- /wp:column -->
            <!-- wp:column {"className":"col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 boxborder","responsive":{"width":{"md":"col-md-6","sm":""},"offset":{"sm":"offset-sm-0","md":"offset-md-0","lg":"offset-lg-0"}}} -->
            <div class="wp-block-column col-12 col-md-6 offset-sm-0 offset-md-0 offset-lg-0 boxborder"><!-- wp:greyd/box {"greydClass":"gs_AgIzsm","greydStyles":{"padding":{"top":"30px","bottom":"30px","right":"40px","left":"40px"},"margin":{"top":"15px","bottom":"15px","right":"30px","left":"30px"},"responsive":{"lg":{"padding":{"right":"40px","left":"40px"},"margin":{"right":"30px","left":"30px"}},"sm":{"padding":{"top":"30px","bottom":"30px","right":"30px","left":"30px"},"margin":{"top":"15px","bottom":"15px","right":"20px","left":"20px"}}},"color":"color-62","background":"color-11-to-color-12-se","boxShadow":"0px+0px+50px+0px+color-22+100","hover":{"boxShadow":"0px+0px+30px+0px+color-22+100"}}} -->
            <div class="wp-block-greyd-box"><!-- wp:greyd/list {"type":"img","web":{"style":"disc","position":"left","align_y":"start"},"icon":{"icon":"","url":"{{logo_light::url}}","id":{{logo_light}},"color":"","size":"40px","margin":"15px","position":"left","align_y":"center","align_x":"start"}} -->
            <ul class="wp-block-greyd-list alignleft"><!-- wp:greyd/list-item {"type":"img"} -->
            <li><span class="list_icon"></span><span class="list_content"><p>'.__('Dynamic Templates', 'greyd_hub').'</p></span></li>
            <!-- /wp:greyd/list-item --></ul>
            <!-- /wp:greyd/list -->
            <!-- wp:heading {"level":5} -->
            <h5>'.__('Nutze die ganze Power von WordPress', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:paragraph -->
            <p>'.__('Mit Dynamic Templates reduzierst du den Aufwand für Aufbau und Pflege deiner Seite massiv und kannst Inhalte von Redakteuren ohne WordPress Kenntnisse pflegen lassen.', 'greyd_hub').'</p>
            <!-- /wp:paragraph -->
            <!-- wp:spacer {"height":40,"responsive":{"height":{"sm":"50%","lg":"80%"}}} -->
            <div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:greyd/buttons -->
            <div class="wp-block-greyd-buttons alignleft"><!-- wp:greyd/button {"greydClass":"gs_UZh7et","trigger":{"type":"link","params":{"url":"/wp-admin/edit.php?post_type=dynamic_template","title":"'.(__('zu den Templates', 'greyd_hub')).'","opensInNewTab":0}},"content":"'.(__('zu den Templates', 'greyd_hub')).'","icon":{"content":"arrow_right","position":"after","size":"150%","margin":"10px"},"className":"is-style-sec"} -->
            <a role="trigger" class="button is-style-sec gs_UZh7et "><span style="flex:1">'.(__('zu den Templates', 'greyd_hub')).'</span><span class="arrow_right" style="vertical-align:middle;font-size:150%;margin-left:10px" ariahidden="true"></span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:greyd/box --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns row_xxxl"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:spacer {"responsive":{"height":{"sm":"50%"}}} -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
            <!-- wp:columns {"gradient":"color-11-to-color-12-sw","className":"row_xxl ","row":{"type":"row_xxl"}} -->
            <div class="wp-block-columns row_xxl has-color-11-to-color-12-sw-gradient-background has-background"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:columns {"verticalAlignment":"middle","className":"row_xxxl ","row":{"type":"row_xxxl"}} -->
            <div class="wp-block-columns are-vertically-aligned-middle row_xxxl"><!-- wp:column {"className":"col-12 col-md-10 offset-sm-0 offset-md-1 wp-block-column ","responsive":{"width":{"md":"col-md-10","sm":""},"offset":{"sm":"offset-sm-0","md":"offset-md-1"}}} -->
            <div class="wp-block-column col-12 col-md-10 offset-sm-0 offset-md-1"><!-- wp:spacer {"height":120,"responsive":{"height":{"sm":"50%"}}} -->
            <div style="height:120px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:heading {"textAlign":"center","level":3,"textColor":"color-62","className":"has-text-align-center has-color-62-color has-text-color"} -->
            <h3 class="has-text-align-center has-color-62-color has-text-color">'.__('„It’s not an experiment if you know it’s going to work.”', 'greyd_hub').'</h3>
            <!-- /wp:heading -->
            <!-- wp:heading {"textAlign":"center","level":6,"textColor":"color-62","className":"has-text-align-center has-color-62-color has-text-color"} -->
            <h6 class="has-text-align-center has-color-62-color has-text-color">'.__('Jeff Bezos', 'greyd_hub').'</h6>
            <!-- /wp:heading -->
            <!-- wp:spacer {"height":120,"responsive":{"height":{"sm":"50%"}}} -->
            <div style="height:120px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->
    
            <!-- wp:columns {"backgroundColor":"color-23","className":"row_xxl ","row":{"type":"row_xxl"}} -->
            <div class="wp-block-columns row_xxl has-color-23-background-color has-background"><!-- wp:column {"className":"col-12 ","responsive":{"width":{"sm":""}}} -->
            <div class="wp-block-column col-12"><!-- wp:spacer -->
            <div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
            <!-- /wp:spacer -->
            <!-- wp:heading {"textAlign":"center","level":5} -->
            <h5 class="has-text-align-center">'.__('Jetzt loslegen', 'greyd_hub').'</h5>
            <!-- /wp:heading -->
            <!-- wp:heading {"textAlign":"center","level":4} -->
            <h4 class="has-text-align-center">'.__('Tutorials, Quick Learning Videos & FAQ gibt’s hier:', 'greyd_hub').'</h4>
            <!-- /wp:heading -->
            <!-- wp:greyd/buttons {"align":"center"} -->
            <div class="wp-block-greyd-buttons aligncenter"><!-- wp:greyd/button {"inline_css_id":"block-62785b2a-3fb3-4cdc-b8fb-ee7e63ee1531","greydClass":"gs_12yPWZ","trigger":{"type":"link","params":{"url":"'.__(self::$config->helpcenter, 'greyd_hub').'", "title":"'.(__('zum Helpcenter', 'greyd_hub')).'","opensInNewTab":1}},"content":"'.(__('zum Helpcenter', 'greyd_hub')).'","className":"is-style-prim"} -->
            <a role="trigger" class="button is-style-prim gs_12yPWZ "><span style="flex:1">'.(__("zum Helpcenter", "greyd_hub")).'</span></a>
            <!-- /wp:greyd/button --></div>
            <!-- /wp:greyd/buttons --></div>
            <!-- /wp:column --></div>
            <!-- /wp:columns -->';

        // return content
        return array(
            'frontpage' => array(
                'type'         => 'page',
                'slug'         => __('beispiel-seite', 'greyd_hub'),
                'title'        => __('Beispiel Seite', 'greyd_hub'),
                'content'      => is_greyd_blocks() ? $content_blocks : $content_shortcodes
            ),
            'media' => array(
                // Logo
                'logo_dark' => array(
                    'slug'  => 'greyd-LogoPh-dark'
                ),
                'logo_mid' => array(
                    'slug'  => 'greyd-LogoPh-mid'
                ),
                'logo_light' => array(
                    'slug'  => 'greyd-LogoPh-light'
                ),
                // Portrait
                'img_dark' => array(
                    'slug'  => 'greyd-ImgPh-dark'
                ),
                'img_mid' => array(
                    'slug'  => 'greyd-ImgPh-mid'
                ),
                'img_light' => array(
                    'slug'  => 'greyd-ImgPh-light'
                ),
                // Landscape
                'img_dark_wide' => array(
                    'slug'  => 'greyd-ImgPh-dark-wide'
                ),
                'img_mid_wide' => array(
                    'slug'  => 'greyd-ImgPh-mid-wide'
                ),
                'img_light_wide' => array(
                    'slug'  => 'greyd-ImgPh-light-wide'
                )
            )
        );
    }

}

