示例#1
0
 /**
  * Add global JS variables
  *
  * @param array $vars global variables list
  * @return boolean return true
  */
 public static function onMakeGlobalVariablesScript(array &$vars)
 {
     $vars['wgOasisResponsive'] = BodyController::isResponsiveLayoutEnabled();
     $vars['wgOasisBreakpoints'] = BodyController::isOasisBreakpoints();
     $vars['verticalName'] = HubService::getCurrentWikiaVerticalName();
     return true;
 }
示例#2
0
/**
 * Inserts the necessary HTML to start the left column
 *
 * @param string $input Input between the <sample> and </sample> tags, or null if the tag is "closed", i.e. <sample />
 * @param array $args Tag arguments, which are entered like HTML tag attributes; this is an associative array indexed by attribute name.
 * @param array $parser The parent parser (a Parser object); more advanced extensions use this to obtain the contextual Title, parse wiki text, expand braces, register link relationships and dependencies, etc.
 */
function wfMainPageTag_lcs($input, $args, $parser)
{
    global $wfMainPageTag_rcs_called, $wfMainPageTag_lcs_called, $wgMainPageTag_count;
    $wfMainPageTag_lcs_called = true;
    $wgMainPageTag_count++;
    $isOasis = F::app()->checkSkin('oasis');
    $isGridLayoutEnabled = $isOasis && BodyController::isGridLayoutEnabled();
    $isResponsiveLayoutEnabled = $isOasis && BodyController::isResponsiveLayoutEnabled();
    $areBreakpointsLayoutEnabled = $isOasis && BodyController::isOasisBreakpoints();
    $gutter = isset($args['gutter']) ? str_replace('px', '', $args['gutter']) : 10;
    $html = '<div class="main-page-tag-lcs ';
    if ($isGridLayoutEnabled) {
        $html .= 'grid-4 alpha ';
    }
    if ($wfMainPageTag_rcs_called) {
        $html .= 'main-page-tag-lcs-collapsed"';
        if (!$isResponsiveLayoutEnabled && !$areBreakpointsLayoutEnabled) {
            $html .= ' style="padding-right: ' . $gutter . 'px"';
        }
        $html .= '><div class="lcs-container">';
    } else {
        $gutter += 300;
        $html .= 'main-page-tag-lcs-exploded" ';
        if ($isGridLayoutEnabled || $isResponsiveLayoutEnabled || $areBreakpointsLayoutEnabled) {
            $html .= '><div class="lcs-container">';
        } else {
            $html .= 'style="margin-right: -' . $gutter . 'px; "><div class="lcs-container" style="margin-right: ' . $gutter . 'px;">';
        }
    }
    return $html;
}
示例#3
0
 /**
  * Returns a set of sass parameters set by the webapp that should not be saved to wiki themesettings
  * For example, skin width is an webapp, application, setting.  It is not user controllable.
  * Rationale: User-set theme settings and skin logic should be kept separate.
  *            User-set theme settings should be saved.
  *            Non-settable settings should be driven programmatically.
  */
 public static function getApplicationThemeSettings()
 {
     if (class_exists('BodyController') && BodyController::isOasisBreakpoints()) {
         $params = ['widthType' => 0];
         if (BodyController::isOasisTypography()) {
             $params['oasisTypography'] = 1;
         }
         return $params;
     } else {
         $params = [];
         global $wgOasisGrid;
         if ($wgOasisGrid) {
             $params['widthType'] = 3;
         }
         // Should be last so it can override wgOasisGrid
         if (class_exists('BodyController') && BodyController::isResponsiveLayoutEnabled()) {
             $params['widthType'] = 2;
         }
         return $params;
     }
 }
示例#4
0
?>

<?php 
echo $headItems;
?>

</head>
<body class="<?php 
echo implode(' ', $bodyClasses);
?>
"<?php 
echo $itemType;
?>
>
<?php 
if (BodyController::isResponsiveLayoutEnabled() || BodyController::isOasisBreakpoints()) {
    ?>
	<div class="background-image-gradient"></div>
<?php 
}
?>

<?php 
echo $comScore;
echo $quantServe;
echo $googleAnalytics;
echo $amazonMatch;
echo $dynamicYield;
echo $ivw2;
echo $rubiconRtp;
?>