public function action_main($params = array()) { $config = $this->config; $gConfig = \Config::load('novius_social_widget::config', true); if (Arr::get($gConfig, 'embed_js', true)) { if (!empty($config['js'])) { foreach ($config['js'] as $script) { Nos::main_controller()->addJavascript($script); } } } $chrome = array(); $typeList = array('chrome'); foreach ($params as $param => $value) { if ($value) { foreach ($typeList as $type) { $typePrefix = "{$type}-"; if ($value && \Str::starts_with($param, $typePrefix)) { array_push(${$type}, \Str::sub($param, \Str::length($typePrefix))); } } } } return \View::forge('novius_social_widget::front/enhancer/twitter', array('widgetId' => $params['widget-id'], 'chrome' => $chrome, 'limit' => \Arr::get($params, 'limit'), 'width' => \Arr::get($params, 'width'), 'height' => \Arr::get($params, 'height')), false); }
public function action_page($params = array()) { $config = $this->config; $gConfig = \Config::load('novius_social_widget::config', true); if (Arr::get($gConfig, 'embed_js', true)) { if (!empty($config['js'])) { foreach ($config['js'] as $script) { Nos::main_controller()->addJavascript($script); } } } $data = array(); $list = $this->getDataList(); foreach ($list as $key => $values) { $data[$key] = \Arr::get($params, "data-" . $key, 0); } return \View::forge('novius_social_widget::front/enhancer/facebook', array('url' => $params['url'], 'data' => $data, 'width' => \Arr::get($params, 'width'), 'height' => \Arr::get($params, 'height')), false); }
\Nos\Nos::main_controller()->addJavascript('static/apps/bespoke/js/bespoke-voltaire.js'); ?> <!doctype html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Bespoke.js</title> </head> <body class="coverflow"> <div id="main"> <?php // fork from noviusos_templates_basic // https://github.com/novius-os/noviusos_templates_basic/blob/master/elche/views/subviews/menu.view.php // https://github.com/novius-os/noviusos_templates_basic/blob/master/elche/views/subviews/menu_driver.view.php $tpvar = \Nos\Nos::main_controller()->getTemplateVariation(); $menu = $tpvar->menus->principal; if (!empty($menu)) { $items = $menu->branch(); if (count($items)) { echo '<article>'; foreach ($items as $item) { echo '<section><div class="bullet"><h2>', e($item->mitem_title), '</h2>', $item->html(), '</div>'; $subitems = $menu->branch($item); if (count($subitems)) { foreach ($subitems as $si) { echo '<div class="bullet">', $si->html(), '</div>'; } } echo '</section>'; }
<?php if (isset($item_driver->item) && isset($item_driver->item->mitem__anchor)) { $url = \Arr::get($params, 'base_url_anchor', \Nos\Nos::main_controller()->getUrl()); ?> <a href="<?php echo $url; ?> #<?php echo $item_driver->item->mitem__anchor; ?> " title="<?php echo e($item_driver->title()); ?> "><?php echo e($item_driver->title()); ?> </a> <?php }