You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
{{- define "index" -}}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>{{ block "title" . }}{{ template "sitetitle" . }}{{ end }}</title>
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/missing.css@1.0.9/dist/missing.min.css">
|
|
|
|
<style>
|
|
|
|
li {
|
|
|
|
margin-top: 0.75em;
|
|
|
|
}
|
|
|
|
#results .box h3 a {
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
#results .box h3 a:not(:hover) {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
|
|
|
|
</head>
|
|
|
|
<body hx-boost="true">
|
|
|
|
<main>
|
|
|
|
<a href="/">
|
|
|
|
<img src="https://jichan.org/logo.svg" style="height: 4em; display: block; margin: 1em auto 1em auto">
|
|
|
|
</a>
|
|
|
|
<form
|
|
|
|
hx-get="/search"
|
|
|
|
hx-replace-url="true"
|
|
|
|
hx-target="#results"
|
|
|
|
hx-on::before-request="document.title = `${this.querySelector('input').value} search - jidict`">
|
|
|
|
<input type="text" name="q" value="{{ block "value" . }}{{ end }}" placeholder="辞書をサーチする" class="width:100%" autocomplete="false" required>
|
|
|
|
</form>
|
|
|
|
<div id="results">
|
|
|
|
{{ block "results" . }}{{ if .Query }}{{ template "search" . }}{{ end }}{{ end }}
|
|
|
|
</div>
|
|
|
|
<br>
|
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
{{- end -}}
|
|
|
|
{{- template "index" . -}}
|