mirror of
https://codeberg.org/aryak/mozhi
synced 2024-11-10 08:42:02 +05:30
Compare commits
2 Commits
555567ccdb
...
f9922cbbc9
Author | SHA1 | Date | |
---|---|---|---|
f9922cbbc9 | |||
35191f6ca9 |
2
go.mod
2
go.mod
@ -7,7 +7,7 @@ replace github.com/OwO-Network/gdeeplx => github.com/gi-yt/gdeeplx v0.0.0-202308
|
|||||||
//replace codeberg.org/aryak/libmozhi => /home/arya/projects/mozhi/libmozhi
|
//replace codeberg.org/aryak/libmozhi => /home/arya/projects/mozhi/libmozhi
|
||||||
|
|
||||||
require (
|
require (
|
||||||
codeberg.org/aryak/libmozhi v0.0.0-20240414131012-697ab3b7bb29
|
codeberg.org/aryak/libmozhi v0.0.0-20240522120450-090c25dcb721
|
||||||
github.com/gofiber/fiber/v2 v2.52.4
|
github.com/gofiber/fiber/v2 v2.52.4
|
||||||
github.com/gofiber/swagger v1.0.0
|
github.com/gofiber/swagger v1.0.0
|
||||||
github.com/gofiber/template v1.8.0
|
github.com/gofiber/template v1.8.0
|
||||||
|
2
go.sum
2
go.sum
@ -47,6 +47,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
|
|||||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||||
codeberg.org/aryak/libmozhi v0.0.0-20240414131012-697ab3b7bb29 h1:lIGbJiXpRmb9doPiiQ2eB9zMZCpk5oEyJC9f4iuKeYA=
|
codeberg.org/aryak/libmozhi v0.0.0-20240414131012-697ab3b7bb29 h1:lIGbJiXpRmb9doPiiQ2eB9zMZCpk5oEyJC9f4iuKeYA=
|
||||||
codeberg.org/aryak/libmozhi v0.0.0-20240414131012-697ab3b7bb29/go.mod h1:X3kF1lzpbtHzJZUpPgNl9eJG70fskeqjuJYVHz+uNSo=
|
codeberg.org/aryak/libmozhi v0.0.0-20240414131012-697ab3b7bb29/go.mod h1:X3kF1lzpbtHzJZUpPgNl9eJG70fskeqjuJYVHz+uNSo=
|
||||||
|
codeberg.org/aryak/libmozhi v0.0.0-20240522120450-090c25dcb721 h1:ZQ/tqILWJvFRZzVhdYXaHxJyBWdtcMiKB/yu79vHdhY=
|
||||||
|
codeberg.org/aryak/libmozhi v0.0.0-20240522120450-090c25dcb721/go.mod h1:X3kF1lzpbtHzJZUpPgNl9eJG70fskeqjuJYVHz+uNSo=
|
||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
|
@ -262,7 +262,7 @@ button:hover {
|
|||||||
select,
|
select,
|
||||||
.nice-select .nice-select-dropdown,
|
.nice-select .nice-select-dropdown,
|
||||||
.nice-select,
|
.nice-select,
|
||||||
.nice-select-search{
|
.nice-select-search {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #2f2f2f;
|
color: #2f2f2f;
|
||||||
}
|
}
|
||||||
@ -284,4 +284,68 @@ button:hover {
|
|||||||
footer {
|
footer {
|
||||||
border-top: 1px solid #b2b2b2;
|
border-top: 1px solid #b2b2b2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.def_type {
|
||||||
|
color: cyan;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.syn {
|
||||||
|
color: burlywood;
|
||||||
|
}
|
||||||
|
|
||||||
|
.syn_type {
|
||||||
|
color: cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.use_in_sentence {
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#definitions_and_translations {
|
||||||
|
display: grid;
|
||||||
|
margin: auto;
|
||||||
|
width: 1100px;
|
||||||
|
gap: 10px;
|
||||||
|
grid-template-areas: "definitions translations";
|
||||||
|
}
|
||||||
|
|
||||||
|
.def_type {
|
||||||
|
color: #007979;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.syn {
|
||||||
|
color: #804700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.syn_type {
|
||||||
|
color: #007979;
|
||||||
|
}
|
||||||
|
|
||||||
|
.use_in_sentence {
|
||||||
|
color: #009902;
|
||||||
|
}
|
||||||
|
|
||||||
|
.definitions li:not(:last-child) {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1200px) {
|
||||||
|
#definitions_and_translations {
|
||||||
|
display: grid;
|
||||||
|
width: 90vw;
|
||||||
|
grid-template-areas:
|
||||||
|
"translations translations"
|
||||||
|
"definitions definitions";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div.definitions {
|
||||||
|
grid-area: definitions;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.translations {
|
||||||
|
grid-area: translations;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{template "header" .}}
|
{{ template "header" . }}
|
||||||
<main>
|
<main>
|
||||||
<h1>About Mozhi</h1>
|
<h1>About Mozhi</h1>
|
||||||
<h2>What is Mozhi?</h2>
|
<h2>What is Mozhi?</h2>
|
||||||
@ -6,10 +6,7 @@
|
|||||||
Mozhi is an alternative frontend for many translation engines such as
|
Mozhi is an alternative frontend for many translation engines such as
|
||||||
google, yandex, duckduckgo, libretranslate and more!
|
google, yandex, duckduckgo, libretranslate and more!
|
||||||
</p>
|
</p>
|
||||||
|
<h2>Why would I use this over just directly accessing the engine in question</h2>
|
||||||
<h2>
|
|
||||||
Why would I use this over just directly accessing the engine in question
|
|
||||||
</h2>
|
|
||||||
<p>
|
<p>
|
||||||
There are many reasons why using an alternative-frontend like mozhi is
|
There are many reasons why using an alternative-frontend like mozhi is
|
||||||
superior to directly accessing the service in question, and the biggest and
|
superior to directly accessing the service in question, and the biggest and
|
||||||
@ -23,4 +20,4 @@
|
|||||||
the engines right in front of you is extremely useful.
|
the engines right in front of you is extremely useful.
|
||||||
</p>
|
</p>
|
||||||
</main>
|
</main>
|
||||||
{{ template "footer" .}}
|
{{ template "footer" . }}
|
||||||
|
@ -140,6 +140,9 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if eq .Engine "yandex" }}
|
||||||
|
{{ template "yandex_extras" . }}
|
||||||
|
{{ end }}
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
|
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
|
||||||
|
42
views/yandex_extras.html
Normal file
42
views/yandex_extras.html
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{{ if .Translation.WordChoices }}
|
||||||
|
<div id="definitions_and_translations">
|
||||||
|
<div class="translations">
|
||||||
|
{{ if or .Translation.TargetSynonyms .Translation.SourceSynonyms }}
|
||||||
|
<span class="def_type">Synonyms</span>
|
||||||
|
<ul>
|
||||||
|
{{ if .Translation.TargetSynonyms }}
|
||||||
|
<li>
|
||||||
|
<span class="syn_type">{{.Translation.OutputText}}</span>
|
||||||
|
<span class="syn">{{ range $index, $key := .Translation.TargetSynonyms }}{{ if eq $key "" }}{{ else }}{{ if eq $index 0 }}{{ else }}, {{ end }}{{.}}{{ end }}{{ end }}</span>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Translation.SourceSynonyms }}
|
||||||
|
<li>
|
||||||
|
<span class="syn_type">{{.OriginalText}}</span>
|
||||||
|
<span class="syn">{{ range $index, $key := .Translation.SourceSynonyms }}{{ if eq $key "" }}{{ else }}{{ if eq $index 0 }}{{ else }}, {{ end }}{{.}}{{ end }}{{ end }}</span>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="definitions">
|
||||||
|
{{ range $key := .Translation.WordChoices }}
|
||||||
|
<span class="def_type">{{ $key.Word }}</span>
|
||||||
|
<ol>
|
||||||
|
{{ range $index, $key2 := $key.ExamplesSource }}
|
||||||
|
<li>
|
||||||
|
say or shout “hello”; greet someone.
|
||||||
|
<br>
|
||||||
|
<span class="use_in_sentence">{{ index $key.ExamplesSource $index }}</span>
|
||||||
|
<br>
|
||||||
|
<span class="use_in_sentence">{{ index $key.ExamplesTarget $index }}</span>
|
||||||
|
<br>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ol>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user