mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 06:26:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			478 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			478 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Extensions\Themes;
 | 
						|
 | 
						|
class Theme
 | 
						|
{
 | 
						|
    public function js($path): string
 | 
						|
    {
 | 
						|
        return sprintf('<script src="%s"></script>' . PHP_EOL, $this->getUrl($path));
 | 
						|
    }
 | 
						|
 | 
						|
    public function css($path): string
 | 
						|
    {
 | 
						|
        return sprintf('<link media="all" type="text/css" rel="stylesheet" href="%s"/>' . PHP_EOL, $this->getUrl($path));
 | 
						|
    }
 | 
						|
 | 
						|
    protected function getUrl($path): string
 | 
						|
    {
 | 
						|
        return '/themes/panel/' . ltrim($path, '/');
 | 
						|
    }
 | 
						|
}
 |