summaryrefslogtreecommitdiff
path: root/views/index.erb
diff options
context:
space:
mode:
Diffstat (limited to 'views/index.erb')
-rw-r--r--views/index.erb39
1 files changed, 0 insertions, 39 deletions
diff --git a/views/index.erb b/views/index.erb
deleted file mode 100644
index b512911..0000000
--- a/views/index.erb
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang='en'>
- <head>
- <link rel='stylesheet' type='text/css' href='/style.css'>
- </head>
- <body>
- <h1><%= @dir %>
- <form action='<%= @alt_dir %>' method='get'>
- <button><%= @alt_name %></button>
- </form>
- </h1>
- <% @threads.each do |item| %>
- <%= html item %>
- <% end %>
- <% if @dir == 'inbox' %>
- <form action='/delete' method='post'>
- <button>Delete all</button>
- </form>
- <% end %>
- </body>
- <script>
- const reply_buttons = document.querySelectorAll(".reply");
- for (const button of reply_buttons) {
- button.addEventListener('click', function() {
- const form = document.getElementById('form' + button.getAttribute('data-index'));
- button.style.display = 'none';
- form.style.display = 'block';
- });
- };
- const cancel_buttons = document.querySelectorAll(".cancel");
- for (const button of cancel_buttons) {
- button.addEventListener('click', function() {
- const form = document.getElementById('form' + button.getAttribute('data-index'));
- button.style.display = 'block';
- form.style.display = 'none';
- });
- };
- </script>
-</html>