function get_asset_url($file, $returnType = false) { $type = pathinfo($file, PATHINFO_EXTENSION); // Set image type if we're using a weird image if (in_array($type, ['png', 'jpg', 'gif', 'bmp', 'svg'])) { $type = 'img'; } $path = get_theme_url('assets/' . $type . '/' . $file); if ($returnType === true) { return ['url' => $path, 'type' => $type]; } return $path; }
<?php if (!defined('IN_GS')) { die('you cannot load this page directly.'); } /* * ************************************************** * * @File: template.php * @Package: GetSimple * @Action: finntemplate theme for GetSimple CMS * * *************************************************** */ $echo = false; $siteurl = get_site_url($echo); $themeurl = get_theme_url($echo); ?> <!DOCTYPE html> <html lang=en> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--FAVICON AND DESKTOP ICONS--> <link rel="apple-touch-icon" sizes="57x57" href="<?php echo $siteurl; ?> apple-touch-icon-57x57.png?v3=E6vx09KgLX"> <link rel="apple-touch-icon" sizes="60x60" href="<?php
</div><!--content-social--> </div><!--top-header-wrapper--> <div id="leader-wrapper"> <div id="ad-970"> <?php /* $ad970 = get_option('ht_leader_ad'); if ($ad970) { echo stripslashes($ad970); } */ ?> </div><!--ad-970--> </div><!--leader-wrapper--> <div id="logo-wrapper" itemscope itemtype="http://schema.org/Organization"> <a itemprop="url" href=""><img itemprop="logo" src="<?php get_theme_url(); ?> /images/logo.png" alt="logo" /></a> </div><!--logo-wrapper--> </div><!--header-wrapper--> <div id="nav-wrapper"> <ul class="main-nav"> </ul><!--main-nav--> <div id="main-search">
$url = str_replace("&", "&", get_url('files', 'save_presentation')); $filename = ''; $slimContent = escapeSLIM('<div class="slide"><div style="font-size: 200%; font-weight: bold; font-family: sans-serif; position: absolute; left: 5%; top: 0%; width: 90%; height: 10%; text-align: center;">'.lang("new presentation").'</div></div>'); } $id = gen_id(); ?> <div id="<?php echo $id ?>" style="width: 100%; height: 100%; overflow: hidden;"> </div> <script> var panel = Ext.getCmp(og.getParentContentPanel('<?php echo $id ?>').id); var <?php echo $id ?> = new Slimey({ container: "<?php echo $id ?>", rootDir: '<?php echo SLIMEY_PATH ?>', imagesDir: '<?php echo get_theme_url("slimey/images/") ?>', filename: <?php echo ($file->isNew()?"''":json_encode($file->getFilename())) ?>, fileId: <?php echo ($file->isNew()?0:$file->getId()) ?>, slimContent: '<?php echo $slimContent ?>', saveUrl: '<?php echo $url ?>' }); <?php echo $id ?>.layout(); setTimeout(function() { <?php echo $id ?>.layout(); }, 1000); panel.on('resize', <?php echo $id ?>.layout, <?php echo $id ?>); // for the image chooser imagesUrl = '<?php echo get_url('files', 'list_files', array('type' => 'image', 'ajax' => 'true')) ?>'; og.eventManager.addListener("presentation saved", function(obj) {
?> ').id); var <?php echo $id; ?> = new Slimey({ container: "<?php echo $id; ?> ", rootDir: '<?php echo SLIMEY_PATH; ?> ', imagesDir: '<?php echo get_theme_url("slimey/images/"); ?> ', filename: <?php echo $file->isNew() ? "''" : json_encode($file->getFilename()); ?> , fileId: <?php echo $file->isNew() ? 0 : $file->getId(); ?> , slimContent: '<?php echo $slimContent; ?> ', saveUrl: '<?php
?> "/> <meta name="robots" content="index,follow"/> <link href="<?php get_url('favicon.ico'); ?> " rel="icon" type="image/x-icon" /> <link rel="alternate" type="application/rss+xml" title="<?php get_site('title'); ?> Rss Feed" href="<?php get_url('feed.php'); ?> " /> <link rel="stylesheet" href="<?php get_theme_url('css'); ?> " type="text/css" /> <?php exec_action('header'); ?> </head> <body id="<?php get_page('id'); ?> "> <?php echo isset($adminMenu) ? $adminMenu : ''; ?> <div id="wrap"> <div id="header" class="clear_both">
<?php } if ($twitter_creator) { ?> <meta name="twitter:creator" content="@<?php echo $twitter_creator; ?> " /> <?php } ?> <meta name="twitter:title" content="<?php echo get_page_clean_title(); ?> " /> <meta name="twitter:description" content="<?php echo get_page_meta_desc(); ?> " /> <?php if ($this->imageExists(get_theme_url(false) . "/" . $general_image_path . return_page_slug() . '.jpg')) { ?> <meta name="twitter:image" content="<?php echo get_theme_url(false) . "/" . $general_image_path . return_page_slug() . '.jpg'; ?> " /> <?php } ?>