diff --git a/index.php b/index.php index 8f052a0..d0b59c3 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ $z = defined('TEST') && TEST ? '.' : '.min.'; Asset::set(__DIR__ . D . 'index' . $z . 'css', 20); -$GLOBALS['links'] = new Anemone((static function($links, $state, $url) { +$GLOBALS['links'] = new Anemone((static function ($links, $state, $url) { $index = LOT . D . 'page' . D . trim(strtr($state->route, '/', D), D) . '.page'; $path = $url->path . '/'; foreach (g(LOT . D . 'page', 'page') as $k => $v) { @@ -35,20 +35,20 @@ } if (isset($state->x->alert)) { - Hook::set('route.archive', function($content, $path, $query, $hash, $data) { + Hook::set('route.archive', function ($content, $path, $query, $hash, $data) { $archive = new Time(substr_replace('1970-01-01-00-00-00', $name = $data['name'], 0, strlen($name))); Alert::info('Showing %s published in %s.', ['posts', '' . $archive->i((false === strpos($name, '-') ? "" : '%B ') . '%Y') . '']); }); - Hook::set('route.search', function($content, $path, $query, $hash, $data) { + Hook::set('route.search', function ($content, $path, $query, $hash, $data) { Alert::info('Showing %s matched with query %s.', ['posts', '' . $data['query'] . '']); }); - Hook::set('route.tag', function($content, $path, $query, $hash, $data) { + Hook::set('route.tag', function ($content, $path, $query, $hash, $data) { if (is_file($file = LOT . D . 'tag' . D . $data['name'] . '.page')) { $tag = new Tag($file); Alert::info('Showing %s tagged in %s.', ['posts', '' . $tag->title . '']); } }); - Hook::set('y.alert', function($alert) { + Hook::set('y.alert', function ($alert) { foreach ($alert[1] as &$v) { $v[2]['aria-live'] = ['error' => 'assertive', 'info' => 'off', 'success' => 'polite'][$v[2]['type'] ?? $v['type']] ?? null; } @@ -58,7 +58,7 @@ } if (isset($state->x->excerpt) && $state->is('page')) { - Hook::set('page.content', function($content) { + Hook::set('page.content', function ($content) { return strtr($content, ["\f" => '