summaryrefslogtreecommitdiff
path: root/web/views/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/views/template')
-rw-r--r--web/views/template/comment.php2
-rw-r--r--web/views/template/error.php12
-rw-r--r--web/views/template/modal.php2
-rw-r--r--web/views/template/pfp.php2
-rw-r--r--web/views/template/post.php2
-rw-r--r--web/views/template/toast.php19
6 files changed, 39 insertions, 0 deletions
diff --git a/web/views/template/comment.php b/web/views/template/comment.php
index ef7a081..943f232 100644
--- a/web/views/template/comment.php
+++ b/web/views/template/comment.php
@@ -1,3 +1,5 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?php /* vi: syntax=php */ ?>
<div class="comment row mt">
<?php $this->view('template/pfp', array('user' => $user))?>
<div class="ml col sub-card">
diff --git a/web/views/template/error.php b/web/views/template/error.php
new file mode 100644
index 0000000..2e02cb1
--- /dev/null
+++ b/web/views/template/error.php
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title><?=$code . ' - ' . $msg?></title>
+ </head>
+ <body>
+ <center>
+ <h1><?=$code . ' ' . $msg?></h1>
+ </center>
+ <hr>
+ </body>
+</html>
diff --git a/web/views/template/modal.php b/web/views/template/modal.php
index 4f47400..e3ce6fe 100644
--- a/web/views/template/modal.php
+++ b/web/views/template/modal.php
@@ -1,3 +1,5 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?php /* vi: syntax=php */ ?>
<div class="modal-container">
<div class="modal">
<div class="modal-header row">
diff --git a/web/views/template/pfp.php b/web/views/template/pfp.php
index 842fc92..aec7318 100644
--- a/web/views/template/pfp.php
+++ b/web/views/template/pfp.php
@@ -1,3 +1,5 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?php /* vi: syntax=php */ ?>
<?php
$class = isset($class) ? $class : '';
?>
diff --git a/web/views/template/post.php b/web/views/template/post.php
index d9c7c92..40a3c1d 100644
--- a/web/views/template/post.php
+++ b/web/views/template/post.php
@@ -1,3 +1,5 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?php /* vi: syntax=php */ ?>
<div class="post card">
<div class="row">
<?php $this->view('template/pfp', array('user' => $user))?>
diff --git a/web/views/template/toast.php b/web/views/template/toast.php
new file mode 100644
index 0000000..1f74602
--- /dev/null
+++ b/web/views/template/toast.php
@@ -0,0 +1,19 @@
+<?php /* Copyright (c) 2024 Freya Murphy */ ?>
+<?php /* vi: syntax=php */ ?>
+<?php
+ $params = array();
+
+ if ($detail) {
+ array_push($params, lang('api_column_' . $detail));
+ }
+
+ if ($hint) {
+ array_push($params, $hint);
+ }
+
+ $msg = lang($msg, sub: $params);
+?>
+<div class="toast error">
+ <?=ucfirst($msg)?>
+ <?=ilang('action_close', class: 'action-close-toast')?>
+</div>