summaryrefslogtreecommitdiff
path: root/web/views/template
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-03-30 12:14:42 -0400
committerFreya Murphy <freya@freyacat.org>2024-03-30 12:14:42 -0400
commit1f04b83be337cc91a3fabcf4e574e2306f3d2eaa (patch)
tree74d7d65a7047e60d1877384e3c7b0d70c7b0e49a /web/views/template
parentstart database (user and post), and initial barebones home page (diff)
downloadxssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.gz
xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.tar.bz2
xssbook2-1f04b83be337cc91a3fabcf4e574e2306f3d2eaa.zip
refactor
Diffstat (limited to '')
-rw-r--r--web/views/template/comment.php2
-rw-r--r--web/views/template/error.php (renamed from web/core/error.php)0
-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, 27 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/core/error.php b/web/views/template/error.php
index 2e02cb1..2e02cb1 100644
--- a/web/core/error.php
+++ b/web/views/template/error.php
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>