-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Better styles and responsiveness. - Remove hardcoded languages and make them config based/dynamic. - Add support for multi-dict selection above the search box. - Make all hardcoded language i18n-ized (lang.json)
- Loading branch information
Showing
11 changed files
with
297 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"_.code": "en", | ||
"_.name": "English", | ||
"global.btnClose": "Close", | ||
"global.btnDelete": "Delete", | ||
"global.btnSearch": "Search", | ||
"global.siteName": "Dictionary", | ||
"public.errorMessage": "An error occurred. Please try later.", | ||
"public.errorTitle": "Error", | ||
"public.glossary": "{name} glossary", | ||
"public.glossaryTitle": "Glossary of words", | ||
"public.mainTitle": "Dictionary website", | ||
"public.noGlossary": "No glossary results were found for that language", | ||
"public.noResults": "No results where found for the query.", | ||
"public.noResultsTitle": "No results", | ||
"public.searchTitle": "\"{query}\" meaning", | ||
"public.similarTitle": "Similar words", | ||
"public.subTitle": "English-Malayalam dictionary", | ||
"public.submitEntry": "Suggest new entry", | ||
"public.submitEntryTitle": "Suggest new entry", | ||
"public.submitTitle": "Comments and suggestions", | ||
"public.suggestAddDefBtn": "Add another definition", | ||
"public.suggestContent": "Content", | ||
"public.suggestDefLang": "Definition language", | ||
"public.suggestDefsTitle": "Definitions", | ||
"public.suggestEdit": "Suggest edit for \"{word}\"", | ||
"public.suggestEntryLang": "Entry language", | ||
"public.suggestPhones": "Phonetic notations (pronunciation)", | ||
"public.suggestPhonesPlaceholder": "eg: pɛts, pɛt (commma separated)", | ||
"public.suggestSubmitBtn": "Submit for review", | ||
"public.suggestSubmitted": "Submitted for review successfully", | ||
"public.suggestTitle": "Suggest a new entry" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,64 @@ | ||
{{ define "results" }} | ||
<ol class="entries"> | ||
{{ range $k, $r := .Data.Results.Entries }} | ||
<li class="entry" data-guid="{{ $r.GUID }}"> | ||
<header class="head"> | ||
{{ if $.EnableSubmissions }} | ||
<a href="" data-from="{{ $r.GUID }}" class="edit" title="Suggest edit">✏️</a> | ||
{{ end }} | ||
<h3 class="title">{{ $r.Content }}</h3> | ||
<span class="pronun">♪ {{ join $r.Phones "," }}</span> | ||
</header> | ||
{{ $numResults := (min (len .Data.Results.Entries) 10) }} | ||
<div class="row"> | ||
<div class="eight columns"> | ||
<ol class="entries"> | ||
{{ range $k, $r := (mustSlice .Data.Results.Entries 0 $numResults) }} | ||
<li class="entry" data-guid="{{ $r.GUID }}"> | ||
<header class="head"> | ||
{{ if $.EnableSubmissions }} | ||
<a href="" data-from="{{ $r.GUID }}" class="edit" title="{{ $.L.Ts "public.suggestEdit" "word" $r.Content }}">✏️</a> | ||
{{ end }} | ||
<h3 class="title">{{ $r.Content }}</h3> | ||
|
||
<ol class="defs"> | ||
{{ $prevTypes := "" }} | ||
{{ range $k, $d := $r.Relations }} | ||
{{ $types := (join $d.RelationTypes ", ") }} | ||
{{ if ne $prevTypes $types }} | ||
<div class="types"> | ||
<span>{{ $types }}</span> | ||
</div> | ||
{{ end }} | ||
<li> | ||
<div data-guid="{{ $d.GUID }}" class="def"> | ||
{{ $d.Content }} | ||
{{ if $r.Phones }} | ||
<span class="pronun">♪ {{ $r.Phones | join "," }}</span> | ||
{{ end }} | ||
</header> | ||
|
||
{{ if $.EnableSubmissions }} | ||
<a href="" data-from="{{ $r.GUID }}" data-to="{{ $d.GUID }}" class="edit" title="Suggest edit">✏️</a> | ||
{{ if $r.Relations }} | ||
{{ $lastType := "" }} | ||
{{ range $k, $d := $r.Relations }} | ||
{{ $types := ($d.RelationTypes | join ", ") }} | ||
{{ if ne $lastType $types }} | ||
{{- if $lastType -}}</ol>{{- end }} | ||
<ol class="defs"> | ||
<div class="types"> | ||
:{{- range $t := $d.RelationTypes -}} | ||
{{ index (index $.Langs $d.Lang).Types $t }} - | ||
{{ index (index $.Langs $r.Lang).Types $t }} | ||
{{- end -}} | ||
</div> | ||
{{ end }} | ||
</div> | ||
</li> | ||
{{ $prevTypes = $types }} | ||
{{ end }} | ||
</ol> | ||
</li> | ||
{{ end }} | ||
</ol> | ||
|
||
<li> | ||
<div data-guid="{{ $d.GUID }}" class="def"> | ||
{{ $d.Content }} | ||
|
||
{{ if $.EnableSubmissions }} | ||
<a href="" data-from="{{ $r.GUID }}" data-to="{{ $d.GUID }}" | ||
class="edit" title="{{ $.L.Ts "public.suggestEdit" "word" $d.Content }}">✏️</a> | ||
{{ end }} | ||
</div> | ||
</li> | ||
{{ $lastType = $types }} | ||
{{ end }} | ||
</ol> | ||
{{ end }} | ||
|
||
</li> | ||
{{ end }} | ||
</ol> | ||
</div> | ||
<div class="four columns related"> | ||
{{ if gt (len .Data.Results.Entries) $numResults }} | ||
<h4>{{ .L.T "public.similarTitle" }}</h4> | ||
<ul> | ||
{{ range $k, $r := (mustSlice .Data.Results.Entries $numResults) }} | ||
<li><a href="{{ UnicodeURL $r.Content }}">{{ $r.Content }}</a></li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
</div> | ||
</div> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.