Commit Graph

44 Commits

Author SHA1 Message Date
ede216789b Add reply highlighting
If a user hovers over a reply link, that reply is highlighted.
Obviously, this is only useful if the reply is on-screen.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-29 21:09:19 -07:00
b84ca6d84f Add Youtube embeds
This will embed a youtube video inline on the page. Hopefully it works!

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-29 19:59:10 -07:00
83e0a5b84e Add spoiler tags
Boards can have spoiler processors enabled on them now.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-20 01:18:06 -07:00
c53111ea60 Add user tripcodes
Users can separate their name and a password with ## to create the
illusion of consistent posting.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-20 00:28:02 -07:00
60441aa5d9 Add initial navbar
This includes all boards, as well as report counts if the user is an
admin.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-19 19:45:36 -07:00
b2cb1536c1 Add recent news header to boards and posts
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-19 18:59:25 -07:00
1173cc16cb Add 25px margin to top and bottom of threads on the board
This should hopefully visually separate things a little better.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-18 19:38:04 -07:00
b40b65bef6 Add restricted.css for future styles that are accessible by admin-only
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-17 17:49:12 -07:00
1856adaf3b Add user post wiping
If a user has spammed a lot of posts and made a mess of the board, this
will allow us to delete all posts by the offending user from the same
IP.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-17 16:59:23 -07:00
8ea95a927c Move modify.js + ban.js => restricted.js
Further in on restricted JS to simplify things. Rather than breaking out
all Javascript stuff into their own granular files, this just includes
all admin actions together in the same file.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-17 15:56:44 -07:00
e686c3b235 Add ActionSuccessView
ActionSuccessView is a a generic view that indicates that something was
successful, e.g. deleting a post or banning a user. This hopefully
reduces the amount of boilerplate code used for creating success pages
since most of them can derive from this generic view.

The report and delete success views are updated to use this directly.

The ban and modify success views are updated to derive from this class,
with special permissions required.

The post success view is updated to derive from this class, using a
different template.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-17 15:08:33 -07:00
bfd3dedb09 Better positioning of ban window
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-14 00:08:56 -07:00
996e75dc2a Add news posts
You know. For basic information.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-13 23:01:51 -07:00
83533b5fb4 Add post and image deletion
This one was kind of a doozy. This also adds a custom 403 error page and
fixes some permission denied behavior that I was having issues with for
a while.

This is also set up in a way that hopefully will allow me to easily
implement user post deletion.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-13 15:19:20 -07:00
f04604ce69 Users may only report a post once per IP address.
If a user *really* doesn't like a post, they may try to report it
multiple times. Users may now only report a single post once per IP
address.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-13 12:35:57 -07:00
f131c58d1b Add post hiding
This allows users to hide posts that they may find unsavory. On threads
themselves in the board view, this adds a minus/plus button that will
toggle back and forth if hidden. This also adds a post menu item that
will toggle a post being hidden.

This also changes the post snippet layout a little bit. This caused
minor issues with the other menu items, but it should be fixed in this
set of changes too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-13 12:03:09 -07:00
925c17675f Add inline image expansion
Clicking an image will expand it.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 22:26:51 -07:00
0d6b6ca5b5 Add image hover
If a user hovers over an image with their mouse, it will load the image
and display it in the corner.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 22:02:51 -07:00
3f1615f058 Add post count, image count, and unique posters to post detail
Just like 4chan has!!!!!!!

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 21:12:16 -07:00
5df21ccb95 Add poster name saving via cookie
When a user makes a new post with a name set, it will get saved via a
cookie to the user's client and it will automatically get set the next
time a user makes a post.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 20:28:21 -07:00
a38162a8df Fix up create*Window functions to be more mobile-friendly
I was surprised to see that the site is already pretty mobile-friendly.
The main issue was the quick reply, new thread, and report
windows - they were all hard-coded to be 500px, 500px, and 360px wide
respectively. Now, those hard-coded widths are the default but if the
viewport is thinner than that, the new window will size itself down with
some padding.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 16:48:21 -07:00
0de62aa63d Add overflow-wrap: break-word; to post_body CSS
This will cause long, unbroken posts to wrap.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-12 15:40:14 -07:00
b791cf6a6b Update various windows that open to have their height automatically set
Some windows have a variable height based on the user's permissions
(e.g. having a capcode option). This sets the window height to the
minimum requiremed height based on the document loaded in.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-30 20:37:19 -07:00
61b9e2a277 Merge report_window.js into post.js
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-30 18:44:58 -07:00
6f99472f16 Add post modify view
This allows moderators to modify posts (add sticky, etc).

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-30 16:21:36 -07:00
2947ab6cf2 Add fontawesome
My kingdom for a sticky icon

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-30 15:46:54 -07:00
6c11d210e8 Add floating window for new threads
New threads get a floating window just like new replies have. This only
pops up on the board detail view.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-28 23:55:44 -07:00
d931f52f01 Move off WinBox to JSFrame
WinBox is nice, but it has this annoying bug that I don't feel like
figuring out how to fix. JSFrame seems to work much better, although
centering the window seems to be a chore. I'll figure it out soon
enough.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-26 20:52:47 -07:00
fb61239147 Add JSFrame implementation for report window
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-25 21:05:31 -07:00
5239ec028d Remove winbox.js CSS rules
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-25 20:56:13 -07:00
e596d59e82 Trying out JSFrame for windows
Winbox has this annoying bug where you can't move the window below the
calculated area of the document, so you can't drag it over blank space.
JSFrame fixes this and does basically what we want as well. This has
been implemented for post replies and I am going to implement it for
reports and ban creation too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-25 20:42:10 -07:00
1f994dca3e Remove single line comment
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 23:01:05 -07:00
024f0c1290 Move openBanWindow to its own separate file
It is now shared between the admin view and the inline view.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 22:58:31 -07:00
4c5d8cee2a Add color vars to style.css and some winbox stuff
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 22:57:56 -07:00
8f9b27d5be Update order of the menu items
Report item gets added first in the menu now.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 22:30:56 -07:00
647aedfc67 Add in-line ban capabilities
Anyone with the ability to create bans can now do so via the drop down
menu on all posts.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 22:27:26 -07:00
470a10d2a7 Add ability to create bans from reports
This is done in the admin view and opens a new iframed window. The ban
form is pretty barebones and doesn't have full functionality yet, but
that is coming.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 16:03:09 -07:00
b838663d50 Add preliminary report system
The report system is pretty low-tech. However the scaffolding is there
for a lot of new stuff. What we currently have:

* Users can create reports
* Staff can view reports
* Admins can create report templates

There's a post drop-down menu available on all posts now, too. This is
where "report post" menu item lives and other things like that can be
added too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-14 14:56:50 -07:00
0fd40d5d3d Add winbox.bundle.js
I hope this library is sufficient for our needs

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 17:47:26 -07:00
994e4904a6 Add page count and links to bottom of board view
Current page shows up on the bottom of every board with next/prev links
where applicable.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 15:14:50 -07:00
e9585544d5 Add underline back to links in the style
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-06 21:59:45 -07:00
6ed47f9957 Add max image upload size limit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 21:14:00 -07:00
e6c60ff93c Add image upload support
Images can be uploaded, thumbnails are created, they're displayed within
the threads themselves. Just like four chans!

There is not an upload size limit set yet. Gotta get on that next.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-04 19:45:36 -07:00
126db039e2 Initial commit
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-03 18:02:04 -07:00