summaryrefslogtreecommitdiff
path: root/src/ollama_web/templates
diff options
context:
space:
mode:
authortanaka takashi <isazaka@gmail.com>2026-06-24 22:47:13 +0900
committertanaka takashi <isazaka@gmail.com>2026-06-24 22:47:13 +0900
commite4d421c782a181f421e2987f75b4610845e3ef55 (patch)
treee61b848b32dc046977751346d4346c4debc7c4f8 /src/ollama_web/templates
parenta1d744387659f7fe29559017ae03dc76e8532bb1 (diff)
Harden web UI security
Diffstat (limited to 'src/ollama_web/templates')
-rw-r--r--src/ollama_web/templates/index.html23
-rw-r--r--src/ollama_web/templates/login.html21
2 files changed, 29 insertions, 15 deletions
diff --git a/src/ollama_web/templates/index.html b/src/ollama_web/templates/index.html
index c0eb30c..2095e74 100644
--- a/src/ollama_web/templates/index.html
+++ b/src/ollama_web/templates/index.html
@@ -5,11 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ollama-web</title>
<link rel="stylesheet" href="{{ url_for('static', path='style.css') }}" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css" />
- <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.0/marked.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.js"></script>
+ <link rel="stylesheet" href="{{ url_for('static', path='vendor/github-dark.min.css') }}" />
+ <link rel="stylesheet" href="{{ url_for('static', path='vendor/katex.min.css') }}" />
+ <script src="{{ url_for('static', path='vendor/marked.min.js') }}"></script>
+ <script src="{{ url_for('static', path='vendor/purify.min.js') }}"></script>
+ <script src="{{ url_for('static', path='vendor/highlight.min.js') }}"></script>
+ <script src="{{ url_for('static', path='vendor/katex.min.js') }}"></script>
</head>
<body>
<aside id="sidebar">
@@ -60,15 +61,7 @@
</div>
</form>
</div>
-
- <script>
- const TOOLS = [
- { name: "web_search", label: "Web検索" },
- { name: "scrape_url", label: "スクレイピング" },
- { name: "search_and_fetch", label: "ファイル検索・取得" },
- { name: "pdf_to_text", label: "PDFテキスト変換" },
- ];
- </script>
+ <script src="{{ url_for('static', path='tools.js') }}"></script>
<script src="{{ url_for('static', path='app.js') }}"></script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/ollama_web/templates/login.html b/src/ollama_web/templates/login.html
new file mode 100644
index 0000000..af88b52
--- /dev/null
+++ b/src/ollama_web/templates/login.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="ja">
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>ollama-web login</title>
+ <link rel="stylesheet" href="{{ url_for('static', path='style.css') }}" />
+</head>
+<body class="login-page">
+ <main class="login-shell">
+ <form id="login-form" class="login-form">
+ <h1>ollama-web</h1>
+ <label for="pin-input">PIN</label>
+ <input id="pin-input" name="pin" type="password" autocomplete="current-password" autofocus />
+ <button type="submit">ログイン</button>
+ <p id="login-error" role="alert"></p>
+ </form>
+ </main>
+ <script src="{{ url_for('static', path='login.js') }}"></script>
+</body>
+</html>