Skip to content

Commit

Permalink
Bug Fix: Layout Getter with Parameter(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Jan 27, 2025
1 parent 9c5ff56 commit ccdb0ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion about.page
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ icon: 'M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z'
color: '#550bdf'
author: Taufik Nurrohman
type: Markdown
version: 2.2.0
version: 2.2.1
...

### Features
Expand Down
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace {
function layout(...$lot) {
if (\is_array($lot[1] ?? [])) {
return \Layout::get(...$lot);
}
return \count($lot) < 2 ? \Layout::get(...$lot) : \Layout::set(...$lot);
}
\lot('date', \lot('time', new \Time($_SERVER['REQUEST_TIME'] ?? \time())));
Expand Down

0 comments on commit ccdb0ca

Please sign in to comment.