diff options
author | Freya Murphy <freya@freyacat.org> | 2024-05-24 09:05:42 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-05-24 09:05:42 -0400 |
commit | c5f39ea2cd7cf02246705ea8872d3b350526165c (patch) | |
tree | 2694f9fdc5d83b529a01f2997c1d89c271c86592 /src/web/_views | |
download | website-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.gz website-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.bz2 website-c5f39ea2cd7cf02246705ea8872d3b350526165c.zip |
initial
Diffstat (limited to 'src/web/_views')
-rw-r--r-- | src/web/_views/apps/blog.php | 13 | ||||
-rw-r--r-- | src/web/_views/apps/blog_post.php | 6 | ||||
-rw-r--r-- | src/web/_views/apps/blog_rss.php | 20 | ||||
-rw-r--r-- | src/web/_views/apps/blog_writeup.php | 5 | ||||
-rw-r--r-- | src/web/_views/apps/bucket.php | 41 | ||||
-rw-r--r-- | src/web/_views/apps/error.php | 6 | ||||
-rw-r--r-- | src/web/_views/apps/home.php | 55 | ||||
-rw-r--r-- | src/web/_views/apps/projects.php | 11 | ||||
-rw-r--r-- | src/web/_views/comments.php | 51 | ||||
-rw-r--r-- | src/web/_views/footer.php | 51 | ||||
-rw-r--r-- | src/web/_views/head.php | 29 | ||||
-rw-r--r-- | src/web/_views/header.php | 43 |
12 files changed, 331 insertions, 0 deletions
diff --git a/src/web/_views/apps/blog.php b/src/web/_views/apps/blog.php new file mode 100644 index 0000000..e8908e6 --- /dev/null +++ b/src/web/_views/apps/blog.php @@ -0,0 +1,13 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?=aria_section('blog', lang('title'))?> + <p><?=lang('blog_desc')?></p> + <?php + foreach($blog as $name => $post) { + $meta = $post['meta']; + $link = $this->main->get_url('blog/post?name=' . $name); + echo '<a href="' . $link . '"><h3>' . $meta['name'] . '</h3></a>'; + echo '<span>' . $meta['desc'] . '</span><br>'; + echo '<span><time>' . $this->main->format_date($meta['date']) . '</time></span>'; + } + ?> +</div> diff --git a/src/web/_views/apps/blog_post.php b/src/web/_views/apps/blog_post.php new file mode 100644 index 0000000..d5ad255 --- /dev/null +++ b/src/web/_views/apps/blog_post.php @@ -0,0 +1,6 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?=aria_section('post', $post['meta']['name'])?> + <span><?=ucfirst(lang('posted'))?>: <time><?=$this->main->format_date($post['meta']['date'])?></time></span> + <br> + <?=$post['content']?> +</div> diff --git a/src/web/_views/apps/blog_rss.php b/src/web/_views/apps/blog_rss.php new file mode 100644 index 0000000..1d0dcd4 --- /dev/null +++ b/src/web/_views/apps/blog_rss.php @@ -0,0 +1,20 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<rss version="2.0"> + <channel> + <title><?=lang('title')?></title> + <link><?=lang('root_url') . '/blog'?></link> + <description><?=lang('blog_short_desc')?></description> + <language><?=lang('lang_short')?></language> + <?php + foreach ($blog as $name => $post) { + echo '<item>'; + echo '<title>' . $post['meta']['name'] . '</title>'; + echo '<description>' . $post['meta']['desc'] . '</description>'; + echo '<pubDate>' . $post['meta']['date'] . '</pubDate>'; + echo '<link>' . lang('root_url') . '/blog/post?name=' . $name . '</link>'; + echo '<guid>' . lang('root_url') . '/blog/post?name=' . $name . '</guid>'; + echo '</item>'; + } + ?> + </channel> +</rss> diff --git a/src/web/_views/apps/blog_writeup.php b/src/web/_views/apps/blog_writeup.php new file mode 100644 index 0000000..b0f18e7 --- /dev/null +++ b/src/web/_views/apps/blog_writeup.php @@ -0,0 +1,5 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?=aria_section('writeup', $post['meta']['name'])?> + <br> + <?=$post['content']?> +</div> diff --git a/src/web/_views/apps/bucket.php b/src/web/_views/apps/bucket.php new file mode 100644 index 0000000..58925f1 --- /dev/null +++ b/src/web/_views/apps/bucket.php @@ -0,0 +1,41 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> + <?php + $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'); + } else { + echo $this->main->link_css('css/bucket.css'); + } + ?> + </head> + <body> + <div id="webring"> + <center> + <span class="center"> + 🏳️🌈 + <a href="https://webring.bucketfish.me" class="header"> + <span class="e0">b</span><!-- + --><span class="e1">u</span><!-- + --><span class="e2">c</span><!-- + --><span class="e3">k</span><!-- + --><span class="e4">e</span><!-- + --><span class="e5">t</span><!-- + --> <!-- + --><span class="e6">w</span><!-- + --><span class="e7">e</span><!-- + --><span class="e8">b</span><!-- + --><span class="e9">r</span><!-- + --><span class="e10">i</span><!-- + --><span class="e11">n</span><!-- + --><span class="e12">g</span> + </a> + 🏳️🌈 + </span> + </center> + <span class="left">⥼ <a href="<?=sprintf($root, 'prev')?>" class="prev">prev</a></span> + <span class="right"><a href="<?=sprintf($root, 'next')?>" class="next">next</a> ⥽</span> + </div> + </body> +</html> + diff --git a/src/web/_views/apps/error.php b/src/web/_views/apps/error.php new file mode 100644 index 0000000..efe7546 --- /dev/null +++ b/src/web/_views/apps/error.php @@ -0,0 +1,6 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?=aria_section('error')?> + <h2><?=lang('haa_haa_hee_hee_hoo_hoo')?></h2> + <h1><?=$title?></h1> + <h2><?=ucfirst($msg)?></h2> +</div> diff --git a/src/web/_views/apps/home.php b/src/web/_views/apps/home.php new file mode 100644 index 0000000..8e59423 --- /dev/null +++ b/src/web/_views/apps/home.php @@ -0,0 +1,55 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<div class="col left"> + <?=aria_section('about', lang('about'))?> + <p><?=lang('section_about')?></p> + </div> + + <?=aria_section('whats_new', lang('whats_new'))?> + <p><?=lang('section_whats_new')?></p> + </div> +</div> + +<div class="col right"> + <?=aria_section('interests', lang('interests'))?> + <table> + <tbody> + <tr> + <th><?=lang('interests_general')?></th> + <td><?=lang('interests_general_value')?></td> + </tr> + <tr> + <th><?=lang('interests_music')?></th> + <td><?=lang('interests_music_value')?></td> + </tr> + <tr> + <th><?=lang('interests_comics')?></th> + <td><?=lang('interests_comics_value')?></td> + </tr> + </tbody> + </table> + </div> + + <?=aria_section('contact', lang('contact'))?> + <table> + <tbody> + <tr> + <th><?=lang('contact_email')?></th> + <td><a href="mailto:contact@freyacat.org">contact@freyacat.org</a></td> + </tr> + <tr> + <th><?=lang('contact_matrix')?></th> + <td><a href="https://matrix.to/#/@freya:freya.cat">@freya:freya.cat</a></td> + </tr> + <tr> + <th><?=lang('contact_xmpp')?></th> + <td><a href="xmpp:freya@freya.cat">freya@freya.cat</a></td> + </tr> + <tr> + <th><?=lang('contact_mastodon')?></th> + <td><a href="https://social.freya.cat/@freya">@freya@freya.cat</a></td> + </tr> + </tbody> + </table> + </div> +</div> + diff --git a/src/web/_views/apps/projects.php b/src/web/_views/apps/projects.php new file mode 100644 index 0000000..bac1004 --- /dev/null +++ b/src/web/_views/apps/projects.php @@ -0,0 +1,11 @@ +<?=aria_section('projects', lang('title'))?> + <?php + foreach($projects as $project) { + $meta = $project['meta']; + $content = $project['content']; + $link = lang('git_url') . '/' . $meta['repo']; + echo '<a href="' . $link . '"><h3>' . $meta['name'] . '</h3></a>'; + echo $content; + } + ?> +</div> diff --git a/src/web/_views/comments.php b/src/web/_views/comments.php new file mode 100644 index 0000000..d72afd6 --- /dev/null +++ b/src/web/_views/comments.php @@ -0,0 +1,51 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?=aria_section('comments', lang('comments'))?> + <?php + foreach($comments as $comment) { + $date = date_create($comment['created']); + $date = date_format($date, "Y-m-d H:i"); + + echo '<div class="comment">'; + echo '<h3 class="header">' . esc($comment['author']) . '</h3>'; + echo '<span class="date">' . $date . '</span>'; + echo '<p class="content">' . esc($comment['content']) . '</p>'; + echo '</div>'; + } + if (!count($comments)) { + echo '<span>'. lang('no_comments') .'</span>'; + } + ?> + <div class="new"> + <h3><?=lang('new_comment_title')?></h3> + <form id="new_comment" method="get" action="<?=lang('base_path') . '_comments/post'?>"> + <input + type="text" + name="author" + id="author" + aria-label="<?=lang('new_comment_author_label')?>" + placeholder="<?=lang('new_comment_author_ph')?>"> + <input + type="text" + name="content" + id="content" + aria-label="<?=lang('new_comment_content_label')?>" + placeholder="<?=lang('new_comment_content_ph')?>"> + <input + type="hidden" + class="hidden" + name="ref" + value="<?=base64_encode($ref)?>"> + <input + type="hidden" + class="hidden" + name="page" + value="<?=$page?>"> + <input + type="submit" + role="button" + id="submit" + value="<?=lang('new_comment_submit_text')?>"> + </form> + </div> +</div> + diff --git a/src/web/_views/footer.php b/src/web/_views/footer.php new file mode 100644 index 0000000..1eac625 --- /dev/null +++ b/src/web/_views/footer.php @@ -0,0 +1,51 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?php + $footer_text = lang('footer_text', NULL); + if ($footer_text) { + $footer_text = $footer_text[array_rand($footer_text)]; + } else { + $footer_text = ''; + } + + $legacy = $this->main->get_ie_version() <= 7; +?> + </div> + </div> + <div id="footer" role="contentinfo" aria-label="footer"> + <?=lang('license_pre')?> + <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> + <br> + <?=lang('copyright')?> <?=lang('first_name')?> <?=lang('last_name')?> <?=date('Y')?> + <br> + <span class="footer-text"> + <?=$footer_text?> + </span> + <div class="buttons"> + <?=image('buttons/eyes', 'alt_button_eyes', animated: TRUE, width: '88', height: '30')?> + <?=image('buttons/vim', 'alt_button_vim', animated: TRUE, width: '88', height: '30')?> + <?=image('buttons/gnu-linux', 'alt_button_gnu_linux', width: '88', height: '30')?> + <a href="https://citrons.xyz/a/memetic-apioform-page.html"> + <?=image('buttons/apiopage', 'alt_button_apiopage', width: '81', height: '30')?> + </a> + </div> + <br> + <iframe + height="94" + class="john" + title="<?=lang('john_title')?>" + src="https://john.citrons.xyz/embed?ref=freya.cat" + ></iframe> + <iframe + height="40" + class="bucket" + title="<?=lang('bucket_title')?>" + src="<?=$this->main->get_url('bucket?name=freya')?>" + ></iframe> + </div> +<?php if($legacy): ?> + </center> +<?php else: ?> + </div> +<?php endif; ?> + </body> +</html> diff --git a/src/web/_views/head.php b/src/web/_views/head.php new file mode 100644 index 0000000..e30e05c --- /dev/null +++ b/src/web/_views/head.php @@ -0,0 +1,29 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<!DOCTYPE html> +<html lang="<?=lang('lang_short')?>"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="author" content="freya"> + <meta name="description" content="<?=$desc?>"> + <meta name="theme-color" content="<?=lang('theme_color')?>"> + <meta name="referrer" content="origin"> + <meta name="color-scheme" content="none"> + <meta property="og:description" content="<?=$desc?>"> + <meta property="og:title" content="<?=$title?>"> + <meta property="og:site_name" content="<?=lang('domain')?>"> + <meta property="og:image" content="<?=$this->main->get_url_full('public/icons/logo640.png')?>"> + <title><?=$title?></title> + <link rel="icon" type="image/png" sizes="16x16" href="/public/icons/logo16.png"> + <link rel="icon" type="image/png" sizes="32x32" href="/public/icons/logo32.png"> + <link rel="icon" type="image/png" sizes="64x64" href="/public/icons/logo64.png"> + <link rel="icon" type="image/png" sizes="320x320" href="/public/icons/logo320.png"> + <link rel="icon" type="image/png" sizes="512x512" href="/public/icons/logo512.png"> + <link rel="icon" type="image/png" sizes="640x640" href="/public/icons/logo640.png"> + <link rel="manifest" href="/manifest.json"> + <?php if($this->main->get_ie_version() <= 7) + echo $this->main->link_css('css/legacy.css'); + ?> + <?php foreach($css as $file) + echo $this->main->embed_css($file); + ?> diff --git a/src/web/_views/header.php b/src/web/_views/header.php new file mode 100644 index 0000000..b037038 --- /dev/null +++ b/src/web/_views/header.php @@ -0,0 +1,43 @@ +<?php /* Copyright (c) 2024 Freya Murphy */ ?> +<?php + $this->view('head', $data); + echo $this->main->link_css('css/main.css'); + $legacy = $this->main->get_ie_version() <= 7; +?> +</head> +<body> +<?php if($legacy): ?> +<center> +<?php else: ?> +<div class="center"> +<?php endif; ?> + <div id="header" role="banner" aria-label="banner"> + <?=image('img/headerLogo', 'alt_website_logo', size: '200')?> + <div class="content"> + <h1 class="logo-text"> + <?=lang('first_name')?> + </h1> + <div role="navigation"> + <ul id="nav"> + <li><?=ilang('action_home', + href: $this->main->get_url('home'), + container: 'h2' + )?></li> + <li><?=ilang('action_projects', + href: $this->main->get_url('projects'), + container: 'h2' + )?></li> + <li><?=ilang('action_blog', + href: $this->main->get_url('blog'), + container: 'h2' + )?></li> + </ul> + </div> + </div> + </div> +<?php if($legacy): ?> + <div id="main" class="legacy" role="main"> +<?php else: ?> + <div id="main" role="main" aria-label="main"> +<?php endif; ?> + <div id="container"> |