generated from ElnuDev/go-project
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.
57 lines
2.6 KiB
57 lines
2.6 KiB
{{- 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="/logo.svg" style="height: 4em; display: block; margin: 1em auto 1em auto">
|
|
</a>
|
|
<div class="box warn">
|
|
<b>jichan.org</b> is in open alpha. The site may be buggy. More features are coming soon. If you have ideas or want to contribute, DM me on Discord <a href="https://discord.com/users/441283734214279178" target="_blank">@elnudev</a> or <a href="https://codeberg.org/ElnuDev/jichanorg/issues" target="_blank">open an issue on Codeberg</a>.
|
|
</div>
|
|
<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" . }}
|
|
{{ else }}
|
|
<h3>Thank you to</h3>
|
|
<ul>
|
|
<li><a href="https://www.edrdg.org/wiki/index.php/JMdict-EDICT_Dictionary_Project" target="_blank"><b>JMdict</b></a> for providing free and open dictionary data</li>
|
|
<li><a href="https://foosoft.net/" target="_blank">Alexei Yatskov</a> a.k.a. Foosoft Productions for providing the <a href="https:/foosoft.net/projects/jmdict">foosoft.net/projects/jmdict</a> Go package for parsing JMdict, and also for creating Yomichan, a great inspiration</li>
|
|
<li>Doublevil for providing <a href="https://github.com/Doublevil/JmdictFurigana">JmdictFurigana</a></li>
|
|
<li><a href="https://htmx.org/">htmx</a></li>
|
|
</ul>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
<br>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{- end -}}
|
|
{{- template "index" . -}} |