fixed
All checks were successful
Build and push / Pulling repo on server (push) Successful in 19s

This commit is contained in:
Chris 2023-10-21 21:21:52 +02:00
parent 72826ea815
commit bf101b3b26
3 changed files with 5 additions and 16 deletions

View File

@ -94,20 +94,14 @@ class Page
function renderPagecontent()
{
$controller_dir = ROOT . DS . 'pages' . DS . $this->_controller . DS;
/*$partials = [];
if(is_dir($controller_dir.'partials'))
$partials[] = new Mustache_Loader_FilesystemLoader($controller_dir.'partials');
$partials[] = new Mustache_Loader_FilesystemLoader(ROOT.DS.DS.'templates'.DS.'partials');
$m = new Mustache_Engine(array(
'entity_flags' => ENT_QUOTES,
'partials_loader' => new Mustache_Loader_CascadingLoader($partials)
));
$this->variables['translate'] = function($value) { return translate($value); };
$m = $this->addHelpers($m);*/
//when the template path starts with a / it is relative to the root of the project
if($this->variables['template'][0]=='/')
$this->variables['template'] = '../../'.$this->variables['template'];
if($this->variables['template'] && file_exists(ROOT . DS . 'pages' . DS . $this->_controller . DS . $this->variables['template']))
$templatefile = ROOT . DS . 'pages' . DS . $this->_controller . DS . $this->variables['template'];
//render template by running include
ob_start();
extract($this->variables);

View File

@ -9,9 +9,4 @@ class Login extends Page {
//return print_r($_REQUEST, true);
}
function maySeeThisPage()
{
return true;
}
}

View File

@ -33,7 +33,7 @@
<a href="#" hx-get="/features" hx-push-url="/features" hx-target="#main" class="text-sm font-semibold leading-6 text-gray-900">Features</a>
</div>
<div class="hidden lg:flex lg:flex-1 lg:justify-end">
<a href="#" hx-get="/templates/login.html" hx-target="#main" hx-push-url="/login" class="text-sm font-semibold leading-6 text-gray-900">Log in <span aria-hidden="true">&rarr;</span></a>
<a href="#" hx-get="/login" hx-target="#main" hx-push-url="/login" class="text-sm font-semibold leading-6 text-gray-900">Log in <span aria-hidden="true">&rarr;</span></a>
</div>
</nav>
</header>