$type = ''; $page = ''; } if (empty($layout)) { Flight::notFound(); } site_popover(true); Flight::render('documentation.php', array('title' => 'Theme Documentation', 'layout' => $layout, 'type' => $type, 'page' => $page)); }); /** * theme preview */ Flight::route('/theme-preview/(@theme)/', function ($theme_slug = '') { $template = 'theme-preview.php'; $theme = array(); if (!($theme = themes_get($theme_slug))) { Flight::notFound(); } site_title($theme['name'] . ' Theme Preview'); site_enable_purchase(); Flight::render($template, array('theme_slug' => $theme_slug, 'theme' => $theme)); }); /** * website demos */ Flight::route('/showcase-preview/(@site)/', function ($site = '') { $template = 'showcase-preview.php'; if (!website_exists($site)) { Flight::notFound(); } $site_data = website_get($site);
<?php include '_partials/head.php'; $site_data = website_get($site); $theme_data = themes_get($site_data['theme']); ?> <body class="page-preview"> <header> <h1><?php echo $site_data['name']; ?> </h1> <a href="<?php echo $site_data['url-showcase']; ?> " class="button"><i class="fa fa-arrow-left" aria-hidden="true"></i><?php echo $theme_data['name']; ?> Site Showcase</a> <a href="<?php echo $theme_data['url']; ?> " class="button"><?php echo $theme_data['name']; ?> Info</a> <div class="preview-size"> <a href="/" class="selected" data-size="100%"><i class="fa fa-desktop" aria-hidden="true"></i></a> <a href="/" data-size="768px"><i class="fa fa-tablet" aria-hidden="true"></i></a> <a href="/" data-size="375"><i class="fa fa-mobile" aria-hidden="true"></i></a> </div>
<?php $themes = get_theme_data(); include '_partials/head.php'; ?> <body class="page-theme-showcase"> <?php include '_partials/header.php'; site_page_nav(); $theme_data = themes_get($tag); if ($theme_data) { ?> <div class="wrapper showcase-description"> <div class="note message"> <h1><?php echo $theme_data['name']; ?> </h1> <p class="intro"><?php echo $theme_data['description']; ?> </p> <a href="<?php echo $theme_data['url']; ?> " class="button positive">More info <i class="fa fa-arrow-right" aria-hidden="true"></i></a> </div> </div> <?php