Merge pull request #9039 from MrPetovan/task/frio-accent-scheme
[frio] Add accented schemes including dark scheme and black scheme
This commit is contained in:
commit
0d1fa70e2e
28 changed files with 1471 additions and 846 deletions
|
@ -165,11 +165,10 @@ class Page implements ArrayAccess
|
|||
* The path can be absolute or relative to the Friendica installation base folder.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @param string $media
|
||||
* @see Page::initHead()
|
||||
*
|
||||
*/
|
||||
public function registerStylesheet($path)
|
||||
public function registerStylesheet($path, string $media = 'screen')
|
||||
{
|
||||
$path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]);
|
||||
|
||||
|
@ -177,7 +176,7 @@ class Page implements ArrayAccess
|
|||
$path = mb_substr($path, mb_strlen($this->basePath . DIRECTORY_SEPARATOR));
|
||||
}
|
||||
|
||||
$this->stylesheets[] = trim($path, '/');
|
||||
$this->stylesheets[trim($path, '/')] = $media;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,7 +251,7 @@ class Page implements ArrayAccess
|
|||
'$shortcut_icon' => $shortcut_icon,
|
||||
'$touch_icon' => $touch_icon,
|
||||
'$block_public' => intval($config->get('system', 'block_public')),
|
||||
'$stylesheets' => array_unique($this->stylesheets),
|
||||
'$stylesheets' => $this->stylesheets,
|
||||
]) . $this->page['htmlhead'];
|
||||
}
|
||||
|
||||
|
|
|
@ -32,19 +32,17 @@ class Theme extends BaseModule
|
|||
{
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
header("Content-Type: text/css");
|
||||
header('Content-Type: text/css');
|
||||
|
||||
$a = DI::app();
|
||||
$theme = Strings::sanitizeFilePathItem($parameters['theme']);
|
||||
|
||||
if ($a->argc == 4) {
|
||||
$theme = $a->argv[2];
|
||||
$theme = Strings::sanitizeFilePathItem($theme);
|
||||
if (file_exists("view/theme/$theme/theme.php")) {
|
||||
require_once "view/theme/$theme/theme.php";
|
||||
}
|
||||
|
||||
// set the path for later use in the theme styles
|
||||
$THEMEPATH = "view/theme/$theme";
|
||||
if (file_exists("view/theme/$theme/style.php")) {
|
||||
require_once("view/theme/$theme/style.php");
|
||||
}
|
||||
// set the path for later use in the theme styles
|
||||
if (file_exists("view/theme/$theme/style.php")) {
|
||||
require_once "view/theme/$theme/style.php";
|
||||
}
|
||||
|
||||
exit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue