/**
* Build the page - now that we have all the components
*/
-
-if (!$a->theme['stylesheet']) {
- $stylesheet = $a->getCurrentThemeStylesheetPath();
-} else {
- $stylesheet = $a->theme['stylesheet'];
-}
-
-$a->page['htmlhead'] = str_replace('{{$stylesheet}}', $stylesheet, $a->page['htmlhead']);
-//$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet));
-
if (isset($_GET["mode"]) && (($_GET["mode"] == "raw") || ($_GET["mode"] == "minimal"))) {
$doc = new DOMDocument();
$this->page['title'] = $this->config['sitename'];
}
- /* put the head template at the beginning of page['htmlhead']
- * since the code added by the modules frequently depends on it
- * being first
- */
-
- // If we're using Smarty, then doing replace_macros() will replace
- // any unrecognized variables with a blank string. Since we delay
- // replacing $stylesheet until later, we need to replace it now
- // with another variable name
- if ($this->theme['template_engine'] === 'smarty3') {
- $stylesheet = $this->get_template_ldelim('smarty3') . '$stylesheet' . $this->get_template_rdelim('smarty3');
+ if (!empty($this->theme['stylesheet'])) {
+ $stylesheet = $this->theme['stylesheet'];
} else {
- $stylesheet = '$stylesheet';
+ $stylesheet = $this->getCurrentThemeStylesheetPath();
}
+ $this->registerStylesheet($stylesheet);
+
$shortcut_icon = Config::get('system', 'shortcut_icon');
if ($shortcut_icon == '') {
$shortcut_icon = 'images/friendica-32.png';
Core\Addon::callHooks('head', $this->page['htmlhead']);
$tpl = get_markup_template('head.tpl');
+ /* put the head template at the beginning of page['htmlhead']
+ * since the code added by the modules frequently depends on it
+ * being first
+ */
$this->page['htmlhead'] = replace_macros($tpl, [
'$baseurl' => $this->get_baseurl(),
'$local_user' => local_user(),
'$update_interval' => $interval,
'$shortcut_icon' => $shortcut_icon,
'$touch_icon' => $touch_icon,
- '$stylesheet' => $stylesheet,
'$infinite_scroll' => $infinite_scroll,
'$block_public' => intval(Config::get('system', 'block_public')),
'$stylesheets' => $this->stylesheets,
public function initFooter()
{
- if (!isset($this->page['footer'])) {
- $this->page['footer'] = '';
- }
-
// If you're just visiting, let javascript take you home
if (!empty($_SESSION['visitor_home'])) {
$homebase = $_SESSION['visitor_home'];
<link rel="stylesheet" href="view/asset/perfect-scrollbar/css/perfect-scrollbar.min.css" type="text/css" media="screen" />
<link rel="stylesheet" href="vendor/pear/text_highlighter/sample.css" type="text/css" media="screen" />
-<link rel="stylesheet" type="text/css" href="{{$stylesheet}}" media="all" />
-
{{foreach $stylesheets as $stylesheetUrl}}
<link rel="stylesheet" href="{{$stylesheetUrl}}" type="text/css" media="screen" />
{{/foreach}}
-<!--
-<link rel="shortcut icon" href="images/friendica-32.png" />
-<link rel="apple-touch-icon" href="images/friendica-128.png"/>
--->
<link rel="shortcut icon" href="{{$shortcut_icon}}" />
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>
<link rel="stylesheet" href="view/theme/frio/frameworks/bootstrap-toggle/css/bootstrap-toggle.min.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="view/theme/frio/font/open_sans/open-sans.css" type="text/css" media="screen"/>
-{{* The own style.css *}}
-<link rel="stylesheet" type="text/css" href="{{$stylesheet}}" media="all" />
+{{foreach $stylesheets as $stylesheetUrl}}
+<link rel="stylesheet" href="{{$stylesheetUrl}}" type="text/css" media="screen" />
+{{/foreach}}
{{* own css files *}}
<link rel="stylesheet" href="view/theme/frio/css/hovercard.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="view/theme/frio/css/font-awesome.custom.css" type="text/css" media="screen"/>
-{{foreach $stylesheets as $stylesheetUrl}}
-<link rel="stylesheet" href="{{$stylesheetUrl}}" type="text/css" media="screen" />
-{{/foreach}}
-
-<!--
-<link rel="shortcut icon" href="images/friendica-32.png" />
-<link rel="apple-touch-icon" href="images/friendica-128.png"/>
--->
<link rel="shortcut icon" href="{{$shortcut_icon}}" />
<link rel="apple-touch-icon" href="{{$touch_icon}}"/>