mirror of
https://github.com/flarum/core.git
synced 2025-07-24 02:01:19 +02:00
merges 5.5 and master into next-back
This commit is contained in:
@@ -86,7 +86,7 @@ abstract class AbstractFrontend
|
||||
*/
|
||||
protected function getLayout()
|
||||
{
|
||||
return __DIR__.'/../../views/'.$this->getName().'.blade.php';
|
||||
return 'flarum.forum::'.$this->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,10 +131,6 @@ abstract class AbstractFrontend
|
||||
|
||||
$css->addString($lessVariables);
|
||||
$localeCss->addString($lessVariables);
|
||||
|
||||
$css->addString(function () {
|
||||
return $this->settings->get('custom_less');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,7 +49,7 @@ class LessCompiler extends RevisionCompiler
|
||||
'compress' => true,
|
||||
'cache_dir' => $this->cachePath,
|
||||
'import_dirs' => [
|
||||
base_path().'/vendor/components/font-awesome/less' => '',
|
||||
base_path('vendor/components/font-awesome/less') => '',
|
||||
],
|
||||
]);
|
||||
|
||||
|
@@ -81,6 +81,10 @@ class RevisionCompiler implements CompilerInterface
|
||||
$cacheDifferentiator[] = [$source, filemtime($source)];
|
||||
}
|
||||
|
||||
foreach ($this->strings as $callback) {
|
||||
$cacheDifferentiator[] = $callback();
|
||||
}
|
||||
|
||||
$current = hash('crc32b', serialize($cacheDifferentiator));
|
||||
}
|
||||
|
||||
|
@@ -287,7 +287,7 @@ class FrontendView
|
||||
$this->view->share('forum', array_get($forum, 'data'));
|
||||
$this->view->share('debug', $this->app->inDebugMode());
|
||||
|
||||
$view = $this->view->file(__DIR__.'/../../views/app.blade.php');
|
||||
$view = $this->view->make('flarum.forum::app');
|
||||
|
||||
$view->title = $this->buildTitle(array_get($forum, 'data.attributes.title'));
|
||||
$view->description = $this->description ?: array_get($forum, 'data.attributes.description');
|
||||
@@ -336,7 +336,7 @@ class FrontendView
|
||||
|
||||
protected function buildLayout()
|
||||
{
|
||||
$view = $this->view->file($this->layout);
|
||||
$view = $this->view->make($this->layout);
|
||||
|
||||
$view->content = $this->buildContent();
|
||||
|
||||
@@ -345,7 +345,7 @@ class FrontendView
|
||||
|
||||
protected function buildContent()
|
||||
{
|
||||
$view = $this->view->file(__DIR__.'/../../views/content.blade.php');
|
||||
$view = $this->view->make('flarum.forum::content');
|
||||
|
||||
$view->content = $this->content;
|
||||
|
||||
|
Reference in New Issue
Block a user