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.

62 lines
3.0 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">
<link rel="stylesheet" href="/overrides.css">
2 years ago
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
2 years ago
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.elnu.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '6']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
2 years ago
</head>
<body hx-boost="true">
2 years ago
<main>
<a href="/">
<img src="/logo.svg" style="height: 4em; display: block; margin: 1em auto 1em auto">
2 years ago
</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>
2 years ago
<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" . }}
{{ 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>
2 years ago
<br>
</main>
</body>
</html>
{{- end -}}
{{- template "index" . -}}