$data
+ */
+ private function load_projects(&$data): void
+ {
$projects = array();
- $dir = $GLOBALS['assetroot'] . '/projects';
+ $dir = ASSET_ROOT . '/projects';
if ($handle = opendir($dir)) {
while (false !== ($entry = readdir($handle))) {
if (str_starts_with($entry, ".")) {
@@ -28,8 +29,9 @@ class Projects_model extends Model {
$data['projects'] = $projects;
}
- public function get_data(): ?array {
- $data = parent::get_data();
+ public function get_data(): ?array
+ {
+ $data = parent::get_base_data();
$this->load_projects($data);
$data['title'] = lang('title');
$data['desc'] = lang('short_desc');
diff --git a/src/web/_views/apps/blog.php b/src/web/_views/apps/blog.php
index 7290f0e..f64453c 100644
--- a/src/web/_views/apps/blog.php
+++ b/src/web/_views/apps/blog.php
@@ -1,13 +1,13 @@
=aria_section('blog', lang('title'))?>
- =lang('blog_desc', sub: [$this->main->get_url('rss.xml')])?>
+ =lang('blog_desc', sub: [$this->get_url('rss.xml')])?>
$post) {
$meta = $post['meta'];
- $link = $this->main->get_url('blog/post?name=' . $name);
+ $link = $this->get_url('blog/post/' . substr($name, 0, -3));
echo '' . $meta['name'] . '
';
echo '' . $meta['desc'] . '
';
- echo '';
+ echo '';
}
?>
diff --git a/src/web/_views/apps/blog_post.php b/src/web/_views/apps/blog_post.php
index d5ad255..8b45a62 100644
--- a/src/web/_views/apps/blog_post.php
+++ b/src/web/_views/apps/blog_post.php
@@ -1,6 +1,6 @@
=aria_section('post', $post['meta']['name'])?>
- =ucfirst(lang('posted'))?>:
+ =ucfirst(lang('posted'))?>:
=$post['content']?>
diff --git a/src/web/_views/apps/blog_rss.php b/src/web/_views/apps/blog_rss.php
index c3b1c84..e112389 100644
--- a/src/web/_views/apps/blog_rss.php
+++ b/src/web/_views/apps/blog_rss.php
@@ -7,12 +7,13 @@
=lang('lang_short')?>
$post) {
+ $name = substr($name, 0, -3);
echo '- ';
echo '' . $post['meta']['name'] . '';
echo '' . $post['meta']['desc'] . '';
echo '' . $post['meta']['date'] . '';
- echo '' . lang('root_url') . 'blog/post?name=' . $name . '';
- echo '' . lang('root_url') . 'blog/post?name=' . $name . '';
+ echo '' . lang('root_url') . 'blog/post/' . $name . '';
+ echo '' . lang('root_url') . 'blog/post/' . $name . '';
echo '
';
}
?>
diff --git a/src/web/_views/apps/bucket.php b/src/web/_views/apps/bucket.php
index 72c349b..aeb6cf3 100644
--- a/src/web/_views/apps/bucket.php
+++ b/src/web/_views/apps/bucket.php
@@ -3,9 +3,9 @@
$root='https://webring.bucketfish.me/redirect.html?to=%s&name=' . $name;
$this->view('head', $data);
if ($lightmode === 'true') {
- echo $this->main->link_css('css/bucket_light.css');
+ echo $this->link_css('css/bucket_light.css');
} else {
- echo $this->main->link_css('css/bucket.css');
+ echo $this->link_css('css/bucket.css');
}
?>
diff --git a/src/web/_views/comments.php b/src/web/_views/comments.php
index 0544f84..78cc1cb 100644
--- a/src/web/_views/comments.php
+++ b/src/web/_views/comments.php
@@ -3,7 +3,7 @@
main->format_date($comment['created']);
+ $date = $this->format_date($comment['created']);
echo '
@@ -39,13 +37,12 @@
height="40"
class="bucket"
title="=lang('bucket_title')?>"
- src="=$this->main->get_url('bucket?name=freya')?>"
+ src="=$this->get_url('bucket?name=freya')?>"
>
-
-
-
-
+
' . esc($comment['author']) . '
'; diff --git a/src/web/_views/footer.php b/src/web/_views/footer.php index 1eac625..f451bfd 100644 --- a/src/web/_views/footer.php +++ b/src/web/_views/footer.php @@ -6,8 +6,6 @@ } else { $footer_text = ''; } - - $legacy = $this->main->get_ie_version() <= 7; ?>