動いている

This commit is contained in:
2025-12-07 21:11:48 +09:00
parent e18de43d21
commit 229cc48cb5
4 changed files with 38 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ namespace Site\Controller;
use Site\Controller\BlogPost;
use Site\Controller\Mods;
use Site\Lib\Activitypub;
use Site\Lib\Auth;
use Site\Lib\Markdown;
use Site\Lib\Template;
@@ -56,6 +57,11 @@ class Home extends BlogPost {
$postsPerPage
);
// ユーザー
$auth = new Auth();
$user = $auth->getLoggedInUser();
$tmpl->assign('user', $user);
$tmpl->assign('currentPage', $page);
$tmpl->assign('totalPages', $totalPages);
$tmpl->assign('posts', $currentPosts);
@@ -104,6 +110,11 @@ class Home extends BlogPost {
$meta->title = $this->highlightTextContent($meta->title, $keywords);
}
// ユーザー
$auth = new Auth();
$user = $auth->getLoggedInUser();
$tmpl->assign('user', $user);
$tmpl->assign('pagetit', $pagetit);
$tmpl->assign('curPage', 'blog');
$tmpl->assign('custCss', false);

View File

@@ -2,6 +2,7 @@
namespace Site\Controller;
use Site\Controller\Mods;
use Site\Lib\Auth;
use Site\Lib\Template;
class Page {
@@ -13,6 +14,11 @@ class Page {
$pagetit = '新ページ';
$description = 'PHPフレームワークについて';
// ユーザー
$auth = new Auth();
$user = $auth->getLoggedInUser();
$tmpl->assign('user', $user);
$tmpl->assign('pagetit', $pagetit);
$tmpl->assign('curPage', 'about');
$tmpl->assign('custCss', false);
@@ -31,6 +37,11 @@ class Page {
$pagetit = 'モネロXMRで支援♡';
$description = 'テクニカル諏訪子ちゃんをモネロで支援♡';
// ユーザー
$auth = new Auth();
$user = $auth->getLoggedInUser();
$tmpl->assign('user', $user);
$tmpl->assign('pagetit', $pagetit);
$tmpl->assign('curPage', 'support');
$tmpl->assign('custCss', true);
@@ -50,6 +61,11 @@ class Page {
$pagetit = '秘密のページ';
$description = 'ケロ';
// ユーザー
$auth = new Auth();
$user = $auth->getLoggedInUser();
$tmpl->assign('user', $user);
$tmpl->assign('pagetit', $pagetit);
$tmpl->assign('curPage', 'support');
$tmpl->assign('custCss', false);
@@ -61,4 +77,4 @@ class Page {
throw new \Exception($e->getMessage());
}
}
}
}

View File

@@ -72,4 +72,4 @@ class User {
throw new \Exception($e->getMessage());
}
}
}
}