mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 09:21:04 +00:00
fix translate text/file buttons
This commit is contained in:
parent
27c4c12c1f
commit
da36cd77cd
2 changed files with 49 additions and 16 deletions
|
@ -56,6 +56,7 @@ h3.header {
|
||||||
outline: none;
|
outline: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@-moz-document url-prefix() {
|
@-moz-document url-prefix() {
|
||||||
.language-select select {
|
.language-select select {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
|
@ -119,8 +120,11 @@ h3.header {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-switch-type {
|
.btn-switch-type {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #42A5F5;
|
color: #42A5F5;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-switch-type:focus {
|
.btn-switch-type:focus {
|
||||||
|
@ -179,6 +183,22 @@ h3.header {
|
||||||
font-size: 1.35rem;
|
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 {
|
.progress {
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
}
|
}
|
||||||
|
@ -236,6 +256,12 @@ h3.header {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 280px) {
|
||||||
|
.btn-text {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
@media (max-width: 760px) {
|
||||||
.language-select select {
|
.language-select select {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LibreTranslate - Free and Open Source Machine Translation API</title>
|
<title>LibreTranslate - Free and Open Source Machine Translation API</title>
|
||||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||||
<meta name="description" content="Free and Open Source Machine Translation API. 100% self-hosted, offline capable and easy to setup. Run your own API server in just a few minutes.">
|
<meta name="description" content="Free and Open Source Machine Translation API. 100% self-hosted, offline capable and easy to setup. Run your own API server in just a few minutes.">
|
||||||
<meta name="keywords" content="translation,api">
|
<meta name="keywords" content="translation,api">
|
||||||
|
|
||||||
<meta property="og:title" content="LibreTranslate - Free and Open Source Machine Translation API" />
|
<meta property="og:title" content="LibreTranslate - Free and Open Source Machine Translation API" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="https://libretranslate.com" />
|
<meta property="og:url" content="https://libretranslate.com" />
|
||||||
<meta property="og:image" content="https://user-images.githubusercontent.com/1951843/102724116-32a6df00-42db-11eb-8cc0-129ab39cdfb5.png" />
|
<meta property="og:image" content="https://user-images.githubusercontent.com/1951843/102724116-32a6df00-42db-11eb-8cc0-129ab39cdfb5.png" />
|
||||||
<meta property="og:description" name="description" class="swiftype" content="Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes."/>
|
<meta property="og:description" name="description" class="swiftype" content="Free and Open Source Machine Translation API. 100% self-hosted, no limits, no ties to proprietary services. Run your own API server in just a few minutes."/>
|
||||||
|
|
||||||
<script src="{{ url_for('static', filename='js/vue@2.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/vue@2.js') }}"></script>
|
||||||
<!-- Compiled and minified CSS -->
|
<!-- Compiled and minified CSS -->
|
||||||
|
@ -37,8 +37,10 @@
|
||||||
<header>
|
<header>
|
||||||
<nav class="blue lighten-1" role="navigation">
|
<nav class="blue lighten-1" role="navigation">
|
||||||
<div class="nav-wrapper container">
|
<div class="nav-wrapper container">
|
||||||
|
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||||
<a id="logo-container" href="/" class="brand-logo">
|
<a id="logo-container" href="/" class="brand-logo">
|
||||||
<img src="{{ url_for('static', filename='icon.svg') }}" class="logo"> LibreTranslate
|
<img src="{{ url_for('static', filename='icon.svg') }}" alt="Logo for LibreTranslate" class="logo">
|
||||||
|
<span>LibreTranslate</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="right hide-on-med-and-down">
|
<ul class="right hide-on-med-and-down">
|
||||||
<li><a href="/docs">API Docs</a></li>
|
<li><a href="/docs">API Docs</a></li>
|
||||||
|
@ -55,7 +57,6 @@
|
||||||
<li><a href="javascript:setApiKey()" title="Set API Key"><i class="material-icons">vpn_key</i></a></li>
|
<li><a href="javascript:setApiKey()" title="Set API Key"><i class="material-icons">vpn_key</i></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
@ -105,11 +106,17 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h3 class="header center">Translation API</h3>
|
<h3 class="header center">Translation API</h3>
|
||||||
<div class="col s12 mb-1 center" v-if="filesTranslation === true">
|
<div id="translation-type-btns" class="s12 center" v-if="filesTranslation === true">
|
||||||
<button type="button" class="btn btn-switch-type" @click="switchType('text')" :class="{'active': translationType === 'text'}"><i class="material-icons left">title</i>Translate text</button>
|
<button type="button" class="btn btn-switch-type" @click="switchType('text')" :class="{'active': translationType === 'text'}">
|
||||||
<button type="button" class="btn btn-switch-type" @click="switchType('files')" :class="{'active': translationType === 'files'}"><i class="material-icons left">description</i>Translate files</button>
|
<i class="material-icons">title</i>
|
||||||
</div>
|
<span class="btn-text">Translate Text</span>
|
||||||
<form class="col s12">
|
</button>
|
||||||
|
<button type="button" class="btn btn-switch-type" @click="switchType('files')" :class="{'active': translationType === 'files'}">
|
||||||
|
<i class="material-icons">description</i>
|
||||||
|
<span class="btn-text">Translate Files</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form id="translation-form" class="col s12">
|
||||||
<div class="row mb-0">
|
<div class="row mb-0">
|
||||||
<div class="col s6 language-select">
|
<div class="col s6 language-select">
|
||||||
<span>Translate from</span>
|
<span>Translate from</span>
|
||||||
|
|
Loading…
Reference in a new issue