First commit.

This commit is contained in:
2025-11-30 14:11:42 +05:30
commit a2fda5eb97
30 changed files with 2244 additions and 0 deletions

110
base.html Normal file
View File

@@ -0,0 +1,110 @@
{{- define "header" -}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{{- block "meta" . -}}
<title>
{{- if eq .Data.PageType "/" }} {{- .L.T "global.siteName" -}}
{{- else if eq .Data.PageType "glossary" }}{{- .L.T "public.glossaryTitle" -}}
{{- else if eq .Data.PageType "search" }}{{- .L.Ts "public.searchTitle" "query" .Data.Query.Query -}}
{{- else if ne .Data.Title "" }}{{ .Data.Title }}
{{- end -}}
</title>
<meta name="description" value="
{{- if eq .Data.PageType "/" }}Dictionary website
{{- else if eq .Data.PageType "glossary" }}Glossary of words.
{{- else if eq .Data.PageType "search" }}{{ .Data.Query.Query }} meaning.
{{- else if ne .Data.Description "" }}{{ .Data.Description }}
{{- else }}{{ block "description" . }}{{end}}
{{- end -}}" />
{{- end -}}
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<script>
window._ROOT_URL = "";
window._MAX_CONTENT_ITEMS = {{ .Consts.SiteMaxEntryContentItems }};
</script>
<link rel="shortcut icon" href="/static/favicon.png?v={{ .AssetVer }}" type="image/x-icon" />
<link href="/static/flexit.css?v={{ .AssetVer }}" rel="stylesheet" type="text/css" />
<link href="/static/style.css?v={{ .AssetVer }}" rel="stylesheet" type="text/css" />
</head>
<body class="{{ if eq .Data.PageType "/"}}home{{ end }}">
<div class="container">
<section class="main">
<header class="header">
<div class="row">
<div class="logo four columns">
<a href="/"><img src="/static/logo.svg?v={{ .AssetVer }}" alt="Dictionary logo" /></a>
<h3 class="intro">
<p>ಶ್ರೀ. ವಿ. ಕೃಷ್ಣ ಅವರ ಕನ್ನಡ - ಇಂಗ್ಲಿಷ್ ನಿಘಂಟು</p>
“Alar” V. Krishna's Kannada → English dictionary
</h3>
</div><!-- logo col -->
<div class="search eight columns">
<form class="search-form" method="get" action="">
<div>
<select name="lang" aria-label="Select dictionary">
{{ range $d := .Dicts }}
{{ $from := index $d 0}}
{{ $to := index $d 1}}
<option value="{{ $from.ID }}/{{ $to.ID }}">
{{ $from.Name }} - {{ $to.Name }}
</option>
{{ end }}
</select>
<div class="input-group">
<input autofocus autocomplete="off" required placeholder="" aria-label="Search word"
type="text" id="q" name="q" value="{{ if .Data.Query }}{{ .Data.Query.Query }}{{ end }}" />
<button type="submit" aria-label="Search"><img src="/static/search.svg?v={{ .AssetVer }}" alt="{{- .L.T "global.btnSearch" -}}" /></button>
</div>
</div>
</form>
</div>
</div>
</header>
{{ end}}
{{ define "footer" }}
<nav class="nav">
{{ if .Consts.EnableSubmissions }}
<a href="{{ $.Consts.RootURL }}/submit">{{- .L.T "public.submitEntry" -}}</a>
{{ end }}
{{ if .Consts.EnableGlossary }}
{{ range $d := .Dicts }}
{{ $from := index $d 0}}
{{ $to := index $d 1}}
<a href="{{ $.Consts.RootURL }}/glossary/{{ $from.ID }}/{{ $to.ID }}/*" class="tab">
{{ title ($.L.Ts "public.glossary" "lang" "") }}
</a>
{{ end }}
{{ end }}
<a href="/p/about">{{ .L.T "public.about" }}</a>
</nav>
</section>
<footer class="footer">
<a href="https://indicarchive.org">IDAF</a>
<a href="https://zerodha.tech/blog/alar-the-making-of-an-open-source-dictionary/">Support by <img src="/static/zerodha-logo.svg" alt="Zerodha"></a>
</footer>
</div><!-- container -->
<form class="box form-comments" data-success="{{ .L.T "public.suggestSubmitted" }}">
<div>
<h4>{{ .L.T "public.submitTitle" }}</h4>
<textarea name="comments" autofocus maxlength="500"></textarea>
<p>
<button type="submit">{{ .L.T "public.suggestSubmitBtn" }}</button>
<button class="button-outline close">{{ .L.T "global.btnClose" }}</button>
</p>
</div>
</form>
<script type="module" src="/static/_bundle.js?f=autocomp.js&f=share.js&f=main.js&f=alar.js&v={{ .AssetVer }}"></script>
</body>
</html>
{{ end }}