'noindex', 'desc' => '...'] */ function fb_layout_head($title, array $opt = []) { $site = (string)fb_cfg('site_name'); $robots = isset($opt['robots']) ? (string)$opt['robots'] : 'index,follow'; $full = $title === '' ? $site : ($title . ' · ' . $site); /* ---- 按软件换主题色 ---- * 通过 $opt['software'] 传入软件行;全站主题只靠 --brand / --brand-600 / * --brand-soft 三个变量,覆写它们即可,不用为每个软件写一套 CSS。 * 没传软件(如后台、安装页)就用主题默认色,保持中性。 */ $swColors = null; if (!empty($opt['software'])) { list($cMain, $cDark, $cSoft) = fb_software_colors($opt['software']); if ($cMain !== '') { $swColors = [$cMain, $cDark, $cSoft]; } } $themeColor = $swColors ? $swColors[0] : '#0057B8'; ?>