Want to contribute? Fork me on Codeberg.org!
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.

42 lines
1.4 KiB

{{- define "index" -}}
2 years ago
<!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>
2 years ago
<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>
2 years ago
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
</head>
<body hx-boost="true">
2 years ago
<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>
2 years ago
</form>
<div id="results">
{{ block "results" . }}{{ if .Query }}{{ template "search" . }}{{ end }}{{ end }}
</div>
2 years ago
<br>
</main>
</body>
</html>
{{- end -}}
{{- template "index" . -}}