From da36cd77cdf6dca78777747843a8d582a9afad17 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Tue, 4 Jan 2022 20:20:02 +0100 Subject: [PATCH] fix translate text/file buttons --- app/static/css/main.css | 30 ++++++++++++++++++++++++++++-- app/templates/index.html | 35 +++++++++++++++++++++-------------- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index 2aca92b..333528c 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -56,6 +56,7 @@ h3.header { outline: none; position: relative; } + @-moz-document url-prefix() { .language-select select { -moz-appearance: none; @@ -119,8 +120,11 @@ h3.header { } .btn-switch-type { - background-color: #fff; - color: #42A5F5; + background-color: #fff; + color: #42A5F5; + display: flex; + align-items: center; + margin: .5rem; } .btn-switch-type:focus { @@ -179,6 +183,22 @@ h3.header { font-size: 1.35rem; } +#translation-type-btns { + display: flex; + flex-wrap: wrap; + justify-content: center; + margin: -.5rem; +} + +.btn-text { + display: none; + margin-left: 1em; +} + +#translation-form { + padding-top: 1em; +} + .progress { background-color: #f3f3f3; } @@ -236,6 +256,12 @@ h3.header { height: 32px; } +@media (min-width: 280px) { + .btn-text { + display: inline; + } +} + @media (max-width: 760px) { .language-select select { text-align: center; diff --git a/app/templates/index.html b/app/templates/index.html index 6718afe..a38bd46 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -5,14 +5,14 @@ LibreTranslate - Free and Open Source Machine Translation API - - + + - - - - - + + + + + @@ -37,8 +37,10 @@
@@ -105,11 +106,17 @@

Translation API

-
- - -
-
+
+ + +
+
Translate from