-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from contao-themes-net/fix/web-folder
fix Symfony 5 public entry point
- Loading branch information
Showing
4 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace ContaoThemesNet\NatureThemeBundle; | ||
|
||
use Contao\Combiner; | ||
use Contao\File; | ||
use Contao\System; | ||
use Contao\StringUtil; | ||
|
||
class ThemeUtils | ||
{ | ||
public static function getRootDir() { | ||
return System::getContainer()->getParameter('kernel.project_dir'); | ||
} | ||
|
||
public static function getWebDir() { | ||
return StringUtil::stripRootDir(System::getContainer()->getParameter('contao.web_dir')); | ||
} | ||
|
||
public static function getCombinedStylesheet() { | ||
|
||
// add stylesheets | ||
$combiner = new Combiner(); | ||
$combiner->add('bundles/contaothemesnetnaturetheme/fonts/fontawesome/css/all.min.css'); | ||
|
||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | ||
$combiner->add('bundles/contaothemesnetnaturetheme/scss/nature_win.scss'); | ||
} else { | ||
$combiner->add('bundles/contaothemesnetnaturetheme/scss/nature.scss'); | ||
} | ||
|
||
return $combiner->getCombinedFile(); | ||
} | ||
} |