aboutsummaryrefslogtreecommitdiff
path: root/cmds/templates/tools.html
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/templates/tools.html')
-rw-r--r--cmds/templates/tools.html202
1 files changed, 202 insertions, 0 deletions
diff --git a/cmds/templates/tools.html b/cmds/templates/tools.html
new file mode 100644
index 0000000..def04fe
--- /dev/null
+++ b/cmds/templates/tools.html
@@ -0,0 +1,202 @@
+{{define "tools"}}
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{{.Title}} - Score & Scan</title>
+ <style>
+ /* ========================================
+ BASE STYLE
+ ======================================== */
+ * { margin: 0; padding: 0; box-sizing: border-box; }
+ body {
+ font-family: monospace;
+ background: #fff;
+ color: #000;
+ padding: 20px;
+ line-height: 1.6;
+ }
+ h1 {
+ font-size: 1.2em;
+ font-weight: bold;
+ margin-bottom: 20px;
+ }
+ h2 {
+ font-size: 1em;
+ font-weight: bold;
+ margin-bottom: 15px;
+ border-bottom: 1px solid #000;
+ padding-bottom: 10px;
+ }
+
+ /* ========================================
+ NAV (live-feed | score-scan)
+ ======================================== */
+ .nav {
+ margin-bottom: 30px;
+ display: flex;
+ gap: 30px;
+ border-bottom: 1px solid #000;
+ padding-bottom: 10px;
+ }
+ .nav a {
+ text-decoration: none;
+ color: #000;
+ font-family: monospace;
+ }
+ .nav a.active {
+ border-bottom: 2px solid #000;
+ padding-bottom: 5px;
+ }
+
+ /* ========================================
+ LAYOUT (2-column grid for score-scan)
+ ======================================== */
+ .container {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 30px;
+ }
+ .section {
+ border: 1px solid #000;
+ padding: 20px;
+ }
+
+ /* ========================================
+ FORMS (input, textarea, button)
+ ======================================== */
+ label {
+ display: block;
+ margin-top: 15px;
+ font-weight: bold;
+ }
+ input, textarea {
+ display: block;
+ width: 100%;
+ margin-top: 5px;
+ padding: 5px;
+ border: 1px solid #000;
+ font-family: monospace;
+ }
+ textarea {
+ resize: vertical;
+ min-height: 80px;
+ }
+ button {
+ margin-top: 15px;
+ padding: 5px 15px;
+ border: 1px solid #000;
+ background: #fff;
+ cursor: pointer;
+ font-family: monospace;
+ }
+ button:hover {
+ background: #000;
+ color: #fff;
+ }
+ button:active {
+ opacity: 0.8;
+ }
+
+ /* ========================================
+ RESULT BOXES
+ ======================================== */
+ .result {
+ margin-top: 20px;
+ padding: 15px;
+ border: 1px solid #000;
+ background: #f5f5f5;
+ }
+ .score {
+ font-size: 3em;
+ font-weight: bold;
+ text-align: center;
+ margin: 20px 0;
+ }
+ .error {
+ color: #f00;
+ margin-top: 10px;
+ padding: 10px;
+ border: 1px solid #f00;
+ }
+
+ /* ========================================
+ ARTICLE LIST
+ ======================================== */
+ .article {
+ margin-bottom: 15px;
+ padding: 10px;
+ border: 1px solid #ccc;
+ }
+ .article a {
+ color: #00f;
+ text-decoration: underline;
+ }
+ .article-meta {
+ margin-top: 8px;
+ color: #666;
+ font-size: 0.9em;
+ }
+
+ /* ========================================
+ ARTICLE LIST STUFF
+ ======================================== */
+ .summary {
+ margin-bottom: 15px;
+ padding: 10px;
+ border: 1px solid #000;
+ background: #f9f9f9;
+ }
+
+ small {
+ display: block;
+ margin-top: 5px;
+ color: #666;
+ }
+
+ /* ========================================
+ MOBILE
+ ======================================== */
+ @media (max-width: 960px) {
+ .container {
+ grid-template-columns: 1fr;
+ gap: 20px;
+ }
+ }
+ </style>
+</head>
+<body>
+ <h1><a href="/live-feed" style="color: inherit; text-decoration: none;">{{.Title}}</a></h1>
+ <div class="nav">
+ <a href="/live-feed">Live Feed</a>
+ <a href="/tools" class="active">Score & Scan</a>
+ </div>
+
+ <div class="container">
+ <div class="section">
+ <h2>Score Article</h2>
+ <form method="POST" action="/score">
+ <label for="scoreTitle">Title:</label>
+ <input type="text" id="scoreTitle" name="title" placeholder="Enter article title" />
+ <label for="scoreURL" style="margin-top: 10px;">URL or DOI:</label>
+ <input type="text" id="scoreURL" name="url" placeholder="https://example.com/article or 10.xxxx/doi" />
+ <small>If URL is provided, title will be automatically extracted</small>
+ <button type="submit">Score</button>
+ </form>
+ </div>
+
+ <div class="section">
+ <h2>Scan Feed</h2>
+ <form method="POST" action="/scan">
+ <label for="feedURL">RSS Feed URL:</label>
+ <input type="text" id="feedURL" name="feed_url" placeholder="https://example.com/rss.xml" required />
+ <button type="submit">Scan</button>
+ </form>
+ </div>
+ </div>
+</body>
+</html>
+{{end}}