Files
llmgw/internal/web/templates/claim.html
T
Ilker ManapandClaude Opus 5.5 11231d8c2b The portal in English and Turkish: a catalogue per language, a switcher at the foot of every page, landing.language, Turkish numbers and dates
Every template and handler message in internal/web goes through a JSON
catalogue under internal/web/locales/<code>/, with English as the fallback.
The language is the person's choice (a cookie set by /_lang/{code}), else
Accept-Language, else landing.language. Tests refuse a key some language
lacks, a translation with other arguments than English, and template text
left in English.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 00:12:53 +02:00

45 lines
1.4 KiB
HTML

{{define "claim"}}<!doctype html>
<html lang="{{lang}}"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>{{t "claim.title"}}</title><link rel="stylesheet" href="{{stylesheet}}">
</head><body><div class="wrap">
<header>
<h1>{{t "claim.heading"}}</h1>
<p class="sub" translate="no">llmgw · {{.BaseURL}}</p>
</header>
{{if .Secret}}
<p>{{t "claim.shown_once"}}</p>
<pre>{{.Secret}}</pre>
<p>{{t "claim.store_it"}}</p>
<h2>{{t "claim.using_it"}}</h2>
<pre>export LLMGW_API_KEY={{.Secret}}
curl {{.BaseURL}}/v1/chat/completions \
-H "Authorization: Bearer $LLMGW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "&lt;model-name&gt;", "messages": [{"role":"user","content":"hello"}]}'</pre>
<p class="note">
{{th "claim.replace_placeholder" .BaseURL}}
</p>
<pre>from openai import OpenAI
client = OpenAI(base_url="{{.BaseURL}}/v1", api_key=os.environ["LLMGW_API_KEY"])</pre>
<p class="note">{{th "claim.endpoints" .BaseURL}}</p>
{{else if .Gone}}
<p>{{.Message}}</p>
<p class="note">{{t "claim.ask_again"}}</p>
{{else}}
<p>{{t "claim.issued"}}</p>
<form method="post">
<button type="submit">{{t "claim.reveal"}}</button>
</form>
<p class="note">{{t "claim.expires" .ExpiresAt}}</p>
{{end}}
<footer><span>llmgw {{.Version}}</span><span>{{.Now}}</span>{{template "langs"}}</footer>
</div></body></html>{{end}}