当前位置: 首页>>代码示例>>PHP>>正文


PHP JHtmlBootstrap::loadCss方法代码示例

本文整理汇总了PHP中JHtmlBootstrap::loadCss方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBootstrap::loadCss方法的具体用法?PHP JHtmlBootstrap::loadCss怎么用?PHP JHtmlBootstrap::loadCss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JHtmlBootstrap的用法示例。


在下文中一共展示了JHtmlBootstrap::loadCss方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($context)
 {
     $this->_jtemplate = $context;
     parent::__construct();
     JHtmlBootstrap::loadCss($includeMaincss = true, $this->_jtemplate->direction);
     JHtmlBootstrap::framework();
     $this->_jparams = $this->_jtemplate->params ? $this->_jtemplate->params : JFactory::getApplication()->getTemplate(true)->params;
     $this->_google = new stdClass();
     $this->setShowcase();
     $this->setBackground();
     $this->_mobile = Avatar::isHandleDevice();
     $this->_responsive = $this->_jparams->get('active_responsive') ? $this->_jparams->get('active_responsive') : false;
     $this->_jquery = $this->_jparams->get('load_jquery') ? $this->_jparams->get('load_jquery') : false;
     $this->_optimize = $this->_jparams->get('optimize');
 }
开发者ID:kenyonjohnston,项目名称:hott_theater,代码行数:15,代码来源:template.php

示例2: defined

 * @subpackage  Templates.protostar
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$this->language = $doc->language;
$this->direction = $doc->direction;
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Add Stylesheets
$doc->addStyleSheet('templates/' . $this->template . '/css/template.css');
// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtmlBootstrap::loadCss($includeMaincss = false, $this->direction);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php 
echo $this->language;
?>
" lang="<?php 
echo $this->language;
?>
" dir="<?php 
echo $this->direction;
?>
">
<head>
<jdoc:include type="head" />
<!--[if lt IE 9]>
开发者ID:Vartacom,项目名称:bootstrapbase,代码行数:31,代码来源:component.php

示例3: array

// This loads jQuery too!
JevHtmlBootstrap::framework();
// jQnc not only fixes noConflict it creates the jQuery alias we use in JEvents "jevqc" so we always need it
JEVHelper::script("components/com_jevents/assets/js/jQnc.js");
if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("fixjquery", 1)) {
    // this script should come after all the URL based scripts in Joomla so should be a safe place to know that noConflict has been set
    JFactory::getDocument()->addScriptDeclaration("checkJQ();");
}
if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("bootstrapcss", 1) == 1) {
    // This version of bootstrap has maximum compatibility with JEvents due to enhanced namespacing
    JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
    // Responsive version of bootstrap with maximum compatibility with JEvents due to enhanced namespacing
    JHTML::stylesheet("com_jevents/bootstrap-responsive.css", array(), true);
} else {
    if (JComponentHelper::getParams(JEV_COM_COMPONENT)->get("bootstrapcss", 1) == 2) {
        JHtmlBootstrap::loadCss();
    }
}
$newparams = JFactory::getApplication('site')->getParams();
// Because the application sets a default page title,
// we need to get it from the menu item itself
$menu = JFactory::getApplication()->getMenu()->getActive();
if ($menu) {
    $newparams->def('page_heading', $newparams->get('page_title', $menu->title));
} else {
    $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
    $newparams->def('page_heading', $params->get('page_title'));
}
// handle global menu item parameter for viewname
$com_calViewName = $newparams->get('com_calViewName', "");
if ($com_calViewName == "global" || $com_calViewName == "") {
开发者ID:hriggs,项目名称:cs-website,代码行数:31,代码来源:jevents.php

示例4: __construct

 function __construct($params, $modid)
 {
     $this->_modid = $modid;
     $this->modparams =& $params;
     $jevents_config = JEVConfig::getInstance();
     $this->datamodel = new JEventsDataModel();
     // find appropriate Itemid and setup catids for datamodel
     $this->myItemid = $this->datamodel->setupModuleCatids($this->modparams);
     $this->catout = $this->datamodel->getCatidsOutLink(true);
     $user = JFactory::getUser();
     // Can't use getCfg since this cannot be changed by Joomfish etc.
     $tmplang = JFactory::getLanguage();
     $this->langtag = $tmplang->getTag();
     // get params exclusive to module
     $this->inccss = $params->get('modlatest_inccss', 0);
     if ($this->inccss) {
         $modtheme = $params->get("com_calViewName", "");
         if ($modtheme == "" || $modtheme == "global") {
             $modtheme = JEV_CommonFunctions::getJEventsViewName();
         }
         $this->jevlayout = $modtheme;
         JEVHelper::componentStylesheet($this, "modstyle.css");
     }
     // get params exclusive to component
     $this->com_starday = intval($jevents_config->get('com_starday', 0));
     $this->com_calUseStdTime = intval($jevents_config->get('com_calUseStdTime', 1));
     if ($this->com_calUseStdTime) {
         $this->defaultfFormatStr = IS_WIN ? $this->_defaultfFormatStr12winos : $this->_defaultfFormatStr12;
     } else {
         $this->defaultfFormatStr = $this->_defaultfFormatStr24;
     }
     // get params depending on switch
     if (intval($params->get('modlatest_useLocalParam', 0)) == 1) {
         $myparam =& $params;
     } else {
         $myparam =& $jevents_config;
     }
     $this->maxEvents = intval($myparam->get('modlatest_MaxEvents', 15));
     $this->dispMode = intval($myparam->get('modlatest_Mode', 0));
     $this->startNow = intval($myparam->get('startnow', 0));
     $this->pastOnly = intval($myparam->get('pastonly', 0));
     $this->rangeDays = intval($myparam->get('modlatest_Days', 30));
     $this->norepeat = intval($myparam->get('modlatest_NoRepeat', 0));
     $this->multiday = intval($myparam->get('modlatest_multiday', 0));
     $this->displayLinks = intval($myparam->get('modlatest_DispLinks', 1));
     $this->displayYear = intval($myparam->get('modlatest_DispYear', 0));
     $this->disableDateStyle = intval($myparam->get('modlatest_DisDateStyle', 0));
     $this->disableTitleStyle = intval($myparam->get('modlatest_DisTitleStyle', 0));
     $this->linkCloaking = intval($myparam->get('modlatest_LinkCloaking', 0));
     $this->linkToCal = intval($myparam->get('modlatest_LinkToCal', 0));
     $this->customFormatStr = $myparam->get('modlatest_CustFmtStr', '');
     $this->displayRSS = intval($myparam->get('modlatest_RSS', 0));
     $this->sortReverse = intval($myparam->get('modlatest_SortReverse', 0));
     if ($myparam->get("bootstrapcss", 1) == 1) {
         $cfg = JEVConfig::getInstance();
         if ($cfg->get("bootstrapcss", 1) == 1) {
             // This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing
             JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
             // Responsive version of bootstrap with maximum compatibility with JEvents due to enhanced namespacing
             JHTML::stylesheet("com_jevents/bootstrap-responsive.css", array(), true);
         } else {
             if ($cfg->get("bootstrapcss", 1) == 2) {
                 JHtmlBootstrap::loadCss();
             }
         }
     } else {
         if ($myparam->get("bootstrapcss", 1) == 2) {
             JHtmlBootstrap::loadCss();
         }
     }
     if (JFile::exists(JPATH_SITE . "/components/com_jevents/assets/css/jevcustom.css")) {
         $document = JFactory::getDocument();
         JEVHelper::stylesheet('jevcustom.css', 'components/' . JEV_COM_COMPONENT . '/assets/css/');
     }
     if ($myparam->get("modlatest_customcss", false)) {
         JFactory::getDocument()->addStyleDeclaration($myparam->get("modlatest_customcss", false));
     }
     if ($this->dispMode > 7) {
         $this->dispMode = 0;
     }
     // $maxEvents hardcoded to 105 for now to avoid bad mistakes in params
     if ($this->maxEvents > 150) {
         $this->maxEvents = 150;
     }
     if ($this->displayRSS) {
         if ($modid > 0) {
             // do not use JRoute since this creates .rss link which normal sef can't deal with
             $this->rsslink = JURI::root() . 'index.php?option=' . JEV_COM_COMPONENT . '&amp;task=modlatest.rss&amp;format=feed&amp;type=rss&amp;modid=' . $modid;
         } else {
             $this->displayRSS = false;
         }
     }
 }
开发者ID:hriggs,项目名称:cs-website,代码行数:93,代码来源:latest.php

示例5: bootstrap

 /**
  * Method to load the Bootstrap JavaScript & CSS framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param  boolean  $css    Include CSS.
  * @param  boolean  $debug  Is debugging mode on? [optional]
  *
  * @return  AssetManager  Return self to support chaining.
  */
 public function bootstrap($css = false, $debug = null)
 {
     \JHtmlBootstrap::framework($debug);
     if ($css) {
         \JHtmlBootstrap::loadCss();
     }
     return $this;
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:18,代码来源:AssetManager.php

示例6: DefaultViewHelperViewNavAdminPanel

function DefaultViewHelperViewNavAdminPanel($view)
{
    $cfg = JEVConfig::getInstance();
    if ($cfg->get('show_adminpanel', 1) == 1) {
        $is_event_editor = JEVHelper::isEventCreator();
        $user = JFactory::getUser();
        JEVHelper::script('view_detailJQ.js', 'components/' . JEV_COM_COMPONENT . "/assets/js/");
        JLoader::register('jevFilterProcessing', JEV_PATH . "/libraries/filters.php");
        $pluginsDir = JPATH_ROOT . '/' . 'plugins' . '/' . 'jevents';
        $filters = jevFilterProcessing::getInstance(array("published", "justmine", "category", "reset"));
        $cfg = JEVConfig::getInstance();
        if (JRequest::getInt('pop', 0)) {
            return;
        }
        if ($is_event_editor) {
            if ($cfg->get("bootstrapchosen", 1)) {
                // Load Bootstrap
                JevHtmlBootstrap::framework();
                JHtml::_('formbehavior.chosen', '#jevents select:not(.notchosen)');
            }
            if ($cfg->get("bootstrapcss", 1) == 1) {
                // This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing
                JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
            } else {
                if ($cfg->get("bootstrapcss", 1) == 2) {
                    JHtmlBootstrap::loadCss();
                }
            }
            // Load event adding language string
            JText::script('JEV_ADD_EVENT');
            JText::script('JEV_IMPORT_ICALEVENT');
            ?>
			<div class="ev_adminpanel">
				<div align="left" class="nav_bar_cell">
					<?php 
            $editLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icalevent.edit' . '&year=' . $view->year . '&month=' . $view->month . '&day=' . $view->day . '&Itemid=' . $view->Itemid, true);
            $popup = false;
            $params = JComponentHelper::getParams(JEV_COM_COMPONENT);
            if ($params->get("editpopup", 0) && JEVHelper::isEventCreator()) {
                //JevHtmlBootstrap::modal();
                JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
                $popup = true;
            }
            $eventlinkadd = $popup ? "javascript:jevEditPopup('" . $editLink . "');" : $editLink;
            ?>
					<a href="<?php 
            echo $eventlinkadd;
            ?>
" title="<?php 
            echo JText::_('JEV_ADDEVENT');
            ?>
">
						<b><?php 
            echo JText::_('JEV_ADDEVENT');
            ?>
</b>
					</a>
					<?php 
            // offer frontend import ?
            if ($params->get("feimport", 0)) {
                $importLink = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=icals.importform&tmpl=component&Itemid=' . $view->Itemid, true);
                //JevHtmlBootstrap::modal();
                JEVHelper::script('editpopupJQ.js', 'components/' . JEV_COM_COMPONENT . '/assets/js/');
                $eventimport = "javascript:jevImportPopup('" . $importLink . "');";
                ?>
						<br/><a href="<?php 
                echo $eventimport;
                ?>
" title="<?php 
                echo JText::_('JEV_IMPORT_ICALEVENT', true);
                ?>
">
							<b><?php 
                echo JText::_('JEV_IMPORT_ICALEVENT');
                ?>
</b>
						</a>
						<?php 
            }
            if ($user->id > 0) {
                $datamodel = new JEventsDataModel();
                // find appropriate Itemid and setup catids for datamodel
                $myItemid = JEVHelper::getItemid();
                $datamodel->setupComponentCatids();
                list($year, $month, $day) = JEVHelper::getYMD();
                $evid = JRequest::getVar("evid", false);
                $jevtype = JRequest::getVar("jevtype", false);
                // FORM for filter submission
                $form_link = JRoute::_('index.php?option=' . JEV_COM_COMPONENT . '&task=' . JRequest::getVar("jevtask", "month.calendar") . ($evid ? '&evid=' . $evid : '') . ($jevtype ? '&jevtype=' . $jevtype : '') . ($year ? '&year=' . $year : '') . ($month ? '&month=' . $month : '') . ($day ? '&day=' . $day : '') . "&Itemid=" . $myItemid, false);
                ?>
						<form action="<?php 
                echo $form_link;
                ?>
"  method="post">
							<?php 
                $filterHTML = $filters->getFilterHTML();
                $Itemid = JEVHelper::getItemid();
                foreach ($filterHTML as $filter) {
                    echo "<div>" . $filter["title"] . " " . $filter["html"] . "</div>";
                }
//.........这里部分代码省略.........
开发者ID:poorgeek,项目名称:JEvents,代码行数:101,代码来源:defaultviewhelperviewnavadminpanel.php

示例7: _prepareHead

    /**
     * Preparing head section for the template
     *
     * @return void
     */
    private function _prepareHead()
    {
        // Only continue if requested return format is html
        if (strcasecmp(get_class($this->_document), 'JDocumentHTML') != 0) {
            return;
        }
        // Load Joomla script framework
        JHTML::_('behavior.framework', true);
        if ($this->_loadTemplateCSS == true) {
            if ($this->_isJoomla3()) {
                // Add JavaScript Frameworks
                JHtml::_('bootstrap.framework');
                // Add Css Frameworks
                JHtmlBootstrap::loadCss();
                // Load optional rtl Bootstrap css and Bootstrap bugfixes
                JHtmlBootstrap::loadCss(true, $this->_document->direction);
            }
            // Print optimize
            if ($this->_document->printOptimize) {
                $this->_document->addStylesheet($this->_document->templateUrl . "/css/print.css", 'text/css', 'Print');
            }
            // Load general styles
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/system.css');
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/general.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/template.css');
            // Load PRO template styles
            if (substr($this->_document->templateUrl, -4) == '_pro') {
                if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/template_pro.css')) {
                    $this->_document->addStylesheet($this->_document->templateUrl . '/css/template_pro.css');
                }
            }
            // Load customization styles
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/colors/' . $this->_document->templateColor . '.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/styles/' . $this->_document->templateStyle . '.css');
            // Auto icon link stylesheet
            if ($this->_document->autoIconLink) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_iconlinks.css');
            }
            // Right to left stylesheet
            if ($this->_document->direction == "rtl") {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_rtl.css');
            }
            // Mobile support stylesheet
            if ($this->_document->mobileSupport) {
                $this->_document->addCustomTag('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />');
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_mobile.css');
            }
            // CSS3 effect stylesheet
            if ($this->_document->useCSS3Effect) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_css3.css');
            }
            // IE7 Specific stylesheet
            if ($this->_document->isIE7) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/css/jsn_fixie7.css');
            }
            // Squeezebox stylesheet
            if ($this->_document->useSqueezeBox) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/media/system/css/modal.css');
            }
            // Template width
            $unit = $this->_document->layoutWidth == 'float' ? '%' : 'px';
            $this->_document->templateWidth = $this->_document->{'layout' . ucfirst($this->_document->layoutWidth) . 'Width'} . $unit;
            // Load custom css that declared by the template
            if (is_file(JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php")) {
                include_once JPATH_ROOT . "/templates/{$this->_document->template}/template_custom.php";
            }
            // Load custom css files from the parameter
            foreach (explode("\n", $this->_document->cssFiles) as $file) {
                if (empty($file)) {
                    continue;
                }
                preg_match('/^[a-z]+:\\/\\//i', $file) ? $this->_document->addStylesheet(trim($file)) : $this->_document->addStylesheet($this->_document->templateUrl . '/css/' . trim($file));
            }
        }
        if ($this->_loadTemplateJS == true) {
            // Load Javascript files
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/noconflict.js');
            $this->_document->addScript($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/joomlashine/js/utils.js');
            $this->_document->addScript($this->_document->templateUrl . '/js/jsn_template.js');
            // Load javascript file for squeezebox
            if ($this->_document->useSqueezeBox) {
                $this->_document->addScript($this->_document->rootUrl . '/media/system/js/modal.js');
            }
            // Custom template JS declarations
            $this->_document->addScriptDeclaration('
				JSNTemplate.initTemplate({
					templatePrefix			: "' . $this->_document->template . '_",
					templatePath			: "' . $this->_document->rootUrl . '/templates/' . $this->_document->template . '",
					enableRTL				: ' . ($this->_document->direction == "rtl" ? 'true' : 'false') . ',
					enableGotopLink			: ' . ($this->_document->gotoTop ? 'true' : 'false') . ',
					enableMobile			: ' . ((isset($this->_document->mobileView) and $this->_document->mobileView or $this->_document->mobileSupport) ? 'true' : 'false') . ',
					enableMobileMenuSticky	: ' . ($this->_document->menuSticky ? 'true' : 'false') . '
				});
			');
            // load Squeezebox
//.........这里部分代码省略.........
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:101,代码来源:helper_v1.php

示例8: registerStylesheet

 /**
  * registerStylesheet
  *
  * @param \JDocument $template
  *
  * @return  void
  */
 protected static function registerStylesheet(\JDocument $template)
 {
     \JHtmlBootstrap::loadCss();
     static::$asset->addCSS('template.css');
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:12,代码来源:Template.php

示例9: _prepareHead

    /**
     * Preparing head section for the template
     *
     * @return void
     */
    private function _prepareHead()
    {
        // Only continue if requested return format is html
        if (strcasecmp(get_class($this->_document), 'JDocumentHTML') != 0) {
            return;
        }
        // Load Joomla script framework
        JHtml::_('behavior.framework', true);
        // Load optional Bootstrap's right-to-left CSS file
        !class_exists('JHtmlBootstrap') or JHtmlBootstrap::loadCss(true);
        // Load Bootstrap stylesheets
        if (is_readable(JPATH_ROOT . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-frontend.min.css')) {
            $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-frontend.min.css');
        } else {
            $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap.min.css');
        }
        if (!$this->_document->isFree and $this->_document->mobileSupport and $this->_document->templateWidth['type'] == 'responsive') {
            if (is_readable(JPATH_ROOT . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive-frontend.min.css')) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive-frontend.min.css');
            } else {
                $this->_document->addStylesheet($this->_document->rootUrl . '/plugins/system/jsntplframework/assets/3rd-party/bootstrap/css/bootstrap-responsive.min.css');
            }
        }
        // Prepare custom font style
        if (@is_array($this->_document->fontStyle[$this->_document->fontStyle['style']]) and is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css.php')) {
            $this->_document->customStyle = $this->_document->fontStyle[$this->_document->fontStyle['style']];
            // Generate custom style
            ob_start();
            require_once JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css.php';
            $this->_document->customStyle = ob_get_clean();
            // Create custom style declaration file
            if (!JFile::write(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css', $this->_document->customStyle)) {
                $this->_document->addStyleDeclaration($this->_document->customStyle);
            }
        }
        // Load other stylesheets
        if ($this->_loadTemplateCSS == true) {
            // Print optimize
            if ($this->_document->printOptimize) {
                $this->_document->addStylesheet($this->_document->templateUrl . "/css/print.css", 'text/css', 'Print');
            }
            // Load general stylesheets
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/system.css');
            $this->_document->addStylesheet($this->_document->rootUrl . '/templates/system/css/general.css');
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/template.css');
            // Load PRO template styles
            if ($this->_template->edition != 'FREE') {
                if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/template_pro.css')) {
                    $this->_document->addStylesheet($this->_document->templateUrl . '/css/template_pro.css');
                }
            }
            // Load customization styles
            $this->_document->addStylesheet($this->_document->templateUrl . '/css/colors/' . $this->_document->templateColor . '.css');
            if (is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/styles/' . $this->_document->fontStyle['style'] . '.css')) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/styles/' . $this->_document->fontStyle['style'] . '.css');
            }
            // Auto icon link stylesheet
            if ($this->_document->autoIconLink) {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_iconlinks.css');
            }
            // Right to left stylesheet
            if ($this->_document->direction == "rtl") {
                $this->_document->addStylesheet($this->_document->templateUrl . '/css/jsn_rtl.css');
            }
            // Enable mobile support
            if ($this->_document->mobileSupport) {
                $this->_document->addCustomTag('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />');
            }
            // IE7 Specific stylesheet
            if ($this->_document->isIE7) {
                $this->_document->addStylesheet($this->_document->rootUrl . '/css/jsn_fixie7.css');
            }
            // Process template width
            switch ($this->_document->templateWidth['type']) {
                case 'fixed':
                case 'float':
                    $unit = $this->_document->templateWidth['type'] == 'fixed' ? 'px' : '%';
                    $this->_document->customWidth = $this->_document->templateWidth[$this->_document->templateWidth['type']] . $unit;
                    break;
                case 'responsive':
                default:
                    if (!$this->_document->isFree) {
                        $enabledLayout = $this->_document->templateWidth[$this->_document->templateWidth['type']];
                        $hasWideLayout = is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/layouts/jsn_wide.css');
                        $hasMobileLayout = is_readable(JPATH_ROOT . '/templates/' . basename($this->_document->templateUrl) . '/css/layouts/jsn_mobile.css');
                        if (in_array('wide', $enabledLayout) and $hasWideLayout) {
                            $this->_document->addStylesheet($this->_document->templateUrl . '/css/layouts/jsn_wide.css');
                        }
                        if ($this->_document->mobileSupport and in_array('mobile', $enabledLayout) and $hasMobileLayout) {
                            $this->_document->addStylesheet($this->_document->templateUrl . '/css/layouts/jsn_mobile.css');
                        }
                    }
                    $this->_document->customWidth = 'responsive';
                    break;
            }
//.........这里部分代码省略.........
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:101,代码来源:helper.php

示例10: defined

<?php

/**
 * @package     Joomla.Site
 * @subpackage  Template.Blank_J3
 *
 * @copyright   Copyright (C) 2005 - 2016 Saity74, LLC. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
require_once JPATH_THEMES . '/blank_j3/_php/blank_j3.php';
JHtmlBootstrap::loadCss(false);
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$params = $this->params;
$tmpl = new Blank_J3($this);
$assets = $tmpl->get_assets();
// Add styles..
$doc->addStyleSheet($assets['styles']);
// Add scripts..
$doc->addScript($assets['scripts']);
$menu = $app->getMenu()->getActive();
$body_class = '';
if (is_object($menu)) {
    $body_class = $tmpl->is_frontpage() ? 'g-homepage ' : '';
    $body_class .= $menu->params->get('pageclass_sfx');
    $body_class .= str_replace('_', '-', ' g-jm-' . $menu->query['option'] . '-' . $menu->query['view']);
}
?>

<!DOCTYPE html>
开发者ID:shanginn,项目名称:joomla-developer-template,代码行数:31,代码来源:index.php

示例11: JUIEnable

 public function JUIEnable()
 {
     if ($this->enable_bootstrap) {
         JHtml::_('bootstrap.framework');
         JHtmlBootstrap::loadCss($this->responsive_css);
         if (!$this->responsive_css) {
             $this->tpl->addStyleSheet($this->relative_path . 'css/bootstrap.min.css');
         }
     }
 }
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:10,代码来源:j3.php

示例12: import

 /**
  * Imports required package to be used in applications
  * 
  * @param string $library ex: corejoomla.tree.nestedtree
  */
 public static function import($package, $cjprefixed = false, $force = false, $custom_tag = false)
 {
     $lib = '';
     $document = JFactory::getDocument();
     $app = JFactory::getApplication();
     switch ($package) {
         case 'corejoomla.framework.core':
             $lib = CJLIB_PATH . '/framework/functions.php';
             break;
         case 'corejoomla.template.core':
             $lib = CJLIB_PATH . '/template/template.php';
             break;
         case 'corejoomla.nestedtree.core':
             $lib = CJLIB_PATH . '/tree/nestedtree.php';
             break;
         case 'corejoomla.nestedtree.ui':
             $document->addStyleSheet(CJLIB_URI . '/tree/ui/css/jquery.mcdropdown.min.css');
             $document->addScript(CJLIB_URI . '/tree/ui/scripts/jquery.bgiframe.js');
             $document->addScript(CJLIB_URI . '/tree/ui/scripts/jquery.mcdropdown.min.js');
             break;
         case 'corejoomla.forms.form':
             $lib = CJLIB_PATH . '/forms/form.php';
             break;
         case 'corejoomla.forms.image':
             $lib = CJLIB_PATH . '/forms/image.php';
             break;
         case 'corejoomla.ui.bootstrap':
             $bsloaded = !empty($app->cjbootstrap) || isset($app->cjbsjs) ? true : false;
             if (!$bsloaded || $force) {
                 if (APP_VERSION < 3) {
                     $document->setMetaData('viewport', 'width=device-width, initial-scale=1.0');
                     if ($cjprefixed) {
                         if (JFactory::getLanguage()->isRTL()) {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap.rtl.min.css', $custom_tag);
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap-responsive.rtl.min.css', $custom_tag);
                         } else {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap.min.css', $custom_tag);
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap-responsive.min.css', $custom_tag);
                         }
                     } else {
                         if (JFactory::getLanguage()->isRTL()) {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap.rtl.min.css', $custom_tag);
                         } else {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap.min.css', $custom_tag);
                         }
                         CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap-responsive.min.css', $custom_tag);
                     }
                     CJFunctions::load_jquery(array('libs' => array()));
                     $document->addScript(CJLIB_URI . '/bootstrap/js/bootstrap.min.js');
                 } else {
                     JHtml::_('bootstrap.framework');
                     JHtmlBootstrap::loadCss(true, $document->direction);
                 }
                 $app->cjbootstrap = true;
                 $app->cjbsjs = true;
             }
             break;
         case 'corejoomla.ui.fa.bootstrap':
             $bsloaded = !empty($app->cjbootstrap) || isset($app->cjbsjs) ? true : false;
             if (!$bsloaded || $force) {
                 if (APP_VERSION < 3) {
                     $document->setMetaData('viewport', 'width=device-width, initial-scale=1.0');
                     if ($cjprefixed) {
                         if (JFactory::getLanguage()->isRTL()) {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap.fontawesome.rtl.min.css', $custom_tag);
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap-responsive.rtl.min.css', $custom_tag);
                         } else {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap.fontawesome.min.css', $custom_tag);
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/cj.bootstrap-responsive.min.css', $custom_tag);
                         }
                     } else {
                         if (JFactory::getLanguage()->isRTL()) {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap.fontawesome.rtl.min.css', $custom_tag);
                         } else {
                             CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap.fontawesome.min.css', $custom_tag);
                         }
                         CJFunctions::add_css_to_document($document, CJLIB_URI . '/bootstrap/css/bootstrap-responsive.min.css', $custom_tag);
                     }
                     $document->addCustomTag('<!--[if IE 7]><link rel="stylesheet" href="' . CJLIB_URI . '/bootstrap/css/font-awesome-ie7.min.css"><![endif]-->');
                     CJFunctions::load_jquery(array('libs' => array()));
                     $document->addScript(CJLIB_URI . '/bootstrap/js/bootstrap.min.js');
                 } else {
                     JHtml::_('bootstrap.framework');
                     JHtmlBootstrap::loadCss(true, $document->direction);
                     CJFunctions::load_jquery(array('libs' => array('fontawesome'), 'custom_tag' => $custom_tag));
                 }
                 $app->cjbootstrap = true;
                 $app->cjbsjs = true;
                 $app->jqueryplugins = !empty($app->jqueryplugins) ? $app->jqueryplugins : array();
                 $app->jqueryplugins[] = 'fontawesome';
             } else {
                 if ($bsloaded) {
                     if (APP_VERSION >= 3) {
                         CJFunctions::load_jquery(array('libs' => array('fontawesome'), 'custom_tag' => $custom_tag));
                     }
//.........这里部分代码省略.........
开发者ID:pguilford,项目名称:vcomcc,代码行数:101,代码来源:framework.php

示例13: defined

<?php

defined('_JEXEC') or die;
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');
// Load optional rtl Bootstrap css and Bootstrap bugfixes
JHtmlBootstrap::loadCss($includeMaincss = true);
?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<jdoc:include type="head" />
	<!--[if lt IE 9]>
		<script src="<?php 
echo $this->baseurl;
?>
/media/jui/js/html5.js"></script>
	<![endif]-->
	<link href="templates/marketingera/css/bootstrap-rtl.css" rel="stylesheet">
	<link href="templates/marketingera/css/custom.css" rel="stylesheet">
	<script src="templates/marketingera/js/respond.js"></script>
    <script src="templates/marketingera/js/masonry.pkgd.min.js"></script>
</head>
<body>

	<!-- Menu & logo & Navigation !-->
	<header class="row1">
		<div class="container">
		
开发者ID:digimarketingteam,项目名称:Joomla,代码行数:30,代码来源:index.php

示例14:

    ?>
        <?php 
    JHtmlBootstrap::loadCss($includeMaincss = true, $this->direction = 'rtl');
    ?>
        <link href="<?php 
    echo $this->baseurl;
    ?>
/templates/<?php 
    echo $this->template;
    ?>
/css/extensions_rtl.css" rel="stylesheet" type="text/css" />
    <?php 
} else {
    ?>
        <?php 
    JHtmlBootstrap::loadCss($includeMaincss = true, $this->direction = 'ltr');
    ?>
    <?php 
}
?>
    <!--[if lt IE 9]>
        <script src="<?php 
echo $this->baseurl;
?>
/media/jui/js/html5.js"></script>
    <![endif]-->
</head>
<body class="contentpane modal">
    <jdoc:include type="message" />
    <jdoc:include type="component" />
</body>
开发者ID:politik86,项目名称:test2,代码行数:31,代码来源:component.php

示例15: testLoadCss

 /**
  * Tests the loadCss method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testLoadCss()
 {
     // Initialise the Bootstrap JS framework
     JHtmlBootstrap::loadCss(true, 'rtl');
     // Get the document instance
     $document = JFactory::getDocument();
     $this->assertArrayHasKey('/media/jui/css/bootstrap.min.css', $document->_styleSheets, 'Verify that the base Bootstrap CSS is loaded');
     $this->assertArrayHasKey('/media/jui/css/bootstrap-rtl.css', $document->_styleSheets, 'Verify that the RTL Bootstrap CSS is loaded');
 }
开发者ID:karimzg,项目名称:joomla,代码行数:16,代码来源:JHtmlBootstrapTest.php


注:本文中的JHtmlBootstrap::loadCss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。