From 9dd2345ecfff4f7d65ec106a8aee8d866c972585 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 1 Feb 2024 00:18:42 +0300 Subject: use .phps extension for skin files --- skin/admin.skin.php | 346 ---------------------------------------------------- 1 file changed, 346 deletions(-) delete mode 100644 skin/admin.skin.php (limited to 'skin/admin.skin.php') diff --git a/skin/admin.skin.php b/skin/admin.skin.php deleted file mode 100644 index d2fc148..0000000 --- a/skin/admin.skin.php +++ /dev/null @@ -1,346 +0,0 @@ - - -
-
{$ctx->lang('as_form_password')}:
-
- -
-
-
-
-
- -
-
- -HTML; - -$js = << - - Sign out - -HTML; -} - - -// uploads page -// ------------ - -function uploads($ctx, $uploads, $error) { -return <<if_true($error, $ctx->formError, $error)} - -
-
- - -
-
{$ctx->lang('blog_upload_form_file')}:
-
- -
-
- -
-
{$ctx->lang('blog_upload_form_custom_name')}:
-
- -
-
- -
-
{$ctx->lang('blog_upload_form_note')}:
-
- -
-
- -
-
-
- -
-
-
-
- -
- {$ctx->for_each($uploads, fn($u) => $ctx->uploadsItem( - id: $u->id, - name: $u->name, - direct_url: $u->getDirectUrl(), - note: $u->note, - addslashes_note: $u->note, - markdown: $u->getMarkdown(), - size: $u->getSize(), - ))} -
-HTML; -} - -function uploadsItem($ctx, $id, $direct_url, $note, $addslashes_note, $markdown, $name, $size) { -return << - - - {$ctx->if_true($note, '
'.$note.'
')} -
{$size}
- - -HTML; -} - -function postForm($ctx, - string|Stringable $title, - string|Stringable $text, - string|Stringable $short_name, - string|Stringable $tags = '', - bool $is_edit = false, - $error_code = null, - ?bool $saved = null, - ?bool $visible = null, - ?bool $toc = null, - string|Stringable|null $post_url = null, - ?int $post_id = null): array { -$form_url = !$is_edit ? '/write/' : $post_url.'edit/'; - -$html = <<if_true($error_code, fn() => '
'.$ctx->lang('err_blog_'.$error_code).'
')} -{$ctx->if_true($saved, fn() => '
'.$ctx->lang('info_saved').'
')} - - - - - -
-
- - -
-
{$ctx->lang('blog_write_form_title')}
-
- -
-
- -
-
{$ctx->lang('blog_write_form_text')}
- -
- -
- - - - - - - - - -
-
-
{$ctx->lang('blog_write_form_tags')}
-
- -
-
-
-
-
{$ctx->lang('blog_write_form_options')}
-
- - -
-
-
-
-
{$ctx->lang('blog_write_form_short_name')}
-
- -
-
-
-
-
 
-
- -
-
-
-
-
-
-
-
-
-HTML; - -$js_params = json_encode($is_edit - ? ['edit' => true, 'id' => $post_id] - : (object)[]); -$js = "AdminWriteForm.init({$js_params});"; - -return [$html, $js]; -} - - -function pageForm($ctx, - string|Stringable $title, - string|Stringable $text, - string|Stringable $short_name, - bool $is_edit = false, - $error_code = null, - ?bool $saved = null, - bool $visible = false): array { -$form_url = '/'.$short_name.'/'.($is_edit ? 'edit' : 'create').'/'; -$html = <<if_true($error_code, fn() => '
'.$ctx->lang('err_pages_'.$error_code).'
')} -{$ctx->if_true($saved, fn() => '
'.$ctx->lang('info_saved').'
')} - - - - - -
-
- - -
-
{$ctx->lang('pages_write_form_title')}
-
- -
-
- -
-
{$ctx->lang('pages_write_form_text')}
- -
- - {$ctx->if_then_else($is_edit, - fn() => $ctx->pageFormEditOptions($short_name, $visible), - fn() => $ctx->pageFormAddOptions($short_name))} - -
-
-
-
-
-HTML; - -$js_params = json_encode(['pages' => true, 'edit' => $is_edit]); -$js = << - - - - - - - - -
-
-
{$ctx->lang('pages_write_form_short_name')}
-
- -
-
-
-
-
{$ctx->lang('pages_write_form_options')}
-
- -
-
-
- -
- -HTML; -} - -function pageFormAddOptions($ctx, $short_name) { -return << -
-
- -
- - -HTML; -} - -function pageNew($ctx, $short_name) { -return << - - -HTML; - -} - -// misc -function formError($ctx, $error) { -return <<{$ctx->lang('error')}: {$error} -HTML; -} - -function markdownPreview($ctx, $unsafe_html, $title) { -return << - {$ctx->if_true($title, '

'.$title.'

')} -
{$unsafe_html}
- -HTML; - -} \ No newline at end of file -- cgit v1.2.3