diff options
Diffstat (limited to 'views/result.ejs')
-rw-r--r-- | views/result.ejs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/views/result.ejs b/views/result.ejs new file mode 100644 index 0000000..7732521 --- /dev/null +++ b/views/result.ejs @@ -0,0 +1,42 @@ +<%- include('partials/header'); %> + +<h1>Results for: <%= query %></h1> + + <% if (results) { %> + <table class="table table-striped table-hover table-responsive text-center"> + <thead> + <tr> + <th scope="col">Name</th> + <th scope="col">Category</th> + <th scope="col">Magnet Link</th> + <th scope="col">Files</th> + <th scope="col">Size</th> + <th scope="col">Date</th> + <th scope="col">Seeders</th> + <th scope="col">Leechers</th> + </tr> + </thead> + <tbody class="table-group-divider"> + <% results.data.forEach(result => { %> + <tr> + <td class="text-start"><%= result.name %></td> + <td><%= functions.getCategory(parseInt(result.category)) %></td> + <td> + <a class="link-dark" href=<%= functions.makeMagnet(result.info_hash, result.name) %>> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-magnet-fill" viewBox="0 0 16 16"> + <path d="M15 12h-4v3h4v-3ZM5 12H1v3h4v-3ZM0 8a8 8 0 1 1 16 0v8h-6V8a2 2 0 1 0-4 0v8H0V8Z"/> + </svg> + </a> + </td> + <td><%= result.num_files %></td> + <td><%= functions.bytesToSize(result.size) %></td> + <td><%= functions.getDate(result.added) %></td> + <td><%= result.seeders %></td> + <td><%= result.leechers %></td> + </tr> + <% }); %> + </tbody> + </table> + <% } %> + +<%- include('partials/footer'); %>
\ No newline at end of file |