2019-09-06 03:17:40 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Extensions\Themes;
|
|
|
|
|
|
|
|
class Theme
|
|
|
|
{
|
2022-10-14 16:59:20 +00:00
|
|
|
public function js($path): string
|
2019-09-06 03:17:40 +00:00
|
|
|
{
|
|
|
|
return sprintf('<script src="%s"></script>' . PHP_EOL, $this->getUrl($path));
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:59:20 +00:00
|
|
|
public function css($path): string
|
2019-09-06 03:17:40 +00:00
|
|
|
{
|
|
|
|
return sprintf('<link media="all" type="text/css" rel="stylesheet" href="%s"/>' . PHP_EOL, $this->getUrl($path));
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:59:20 +00:00
|
|
|
protected function getUrl($path): string
|
2019-09-06 03:17:40 +00:00
|
|
|
{
|
|
|
|
return '/themes/pterodactyl/' . ltrim($path, '/');
|
|
|
|
}
|
|
|
|
}
|