mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-06-19 23:51:01 +00:00
app->libretranslate; mv tests/ inside libretranslate/
This commit is contained in:
parent
40a1141eac
commit
a23a9fbd75
47 changed files with 24 additions and 25 deletions
122
libretranslate/static/css/dark-theme.css
Normal file
122
libretranslate/static/css/dark-theme.css
Normal file
|
@ -0,0 +1,122 @@
|
|||
@media (prefers-color-scheme: dark) {
|
||||
.white {
|
||||
background-color: #111 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.blue.darken-3 {
|
||||
background-color: #1E5DA6 !important;
|
||||
}
|
||||
|
||||
/* like in btn-delete-text */
|
||||
.btn-flat {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.btn-switch-type {
|
||||
background-color: #333;
|
||||
color: #5CA8FF;
|
||||
}
|
||||
.btn-switch-type:hover {
|
||||
background-color: #444 !important;
|
||||
color: #5CA8FF;
|
||||
}
|
||||
.btn-switch-type.active {
|
||||
background-color: #3392FF !important;
|
||||
color: #fff;
|
||||
}
|
||||
.btn-switch-type.active:hover {
|
||||
background-color: #5CA8FF !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-switch-language {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.language-select:after {
|
||||
border: solid #fff;
|
||||
border-width: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
/* like in textarea */
|
||||
.card-content {
|
||||
border: 1px solid #444 !important;
|
||||
background-color: #222 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.file-dropzone {
|
||||
background: #222;
|
||||
border: 1px solid #444;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
select {
|
||||
color: #fff;
|
||||
background: #111;
|
||||
}
|
||||
|
||||
option {
|
||||
color: #fff;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #444 !important;
|
||||
background-color: #222 !important;
|
||||
color: #fff;
|
||||
}
|
||||
/* like in file dropzone */
|
||||
.textarea-container {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.code {
|
||||
border: 1px solid #444;
|
||||
background: #222;
|
||||
color: #fff;
|
||||
}
|
||||
code[class*="language-"], pre[class*="language-"] {
|
||||
color: #fff;
|
||||
text-shadow: 0 1px #000;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #40b5e8;
|
||||
}
|
||||
|
||||
.language-css .token.string,
|
||||
.style .token.string,
|
||||
.token.entity,
|
||||
.token.operator,
|
||||
.token.url {
|
||||
color: #eecfab;
|
||||
background: hsla(0,0%,15%,.5);
|
||||
}
|
||||
|
||||
.token.attr-name,
|
||||
.token.builtin,
|
||||
.token.char,
|
||||
.token.inserted,
|
||||
.token.selector,
|
||||
.token.string {
|
||||
color: #acd25f;
|
||||
}
|
||||
|
||||
.token.boolean,
|
||||
.token.constant,
|
||||
.token.deleted,
|
||||
.token.number,
|
||||
.token.property,
|
||||
.token.symbol,
|
||||
.token.tag {
|
||||
color: #ff8bcc;
|
||||
}
|
||||
|
||||
.token.class-name, .token.function {
|
||||
color: #ff7994;
|
||||
}
|
||||
}
|
300
libretranslate/static/css/main.css
Normal file
300
libretranslate/static/css/main.css
Normal file
|
@ -0,0 +1,300 @@
|
|||
/* Custom styles for LibreTranslate page */
|
||||
|
||||
html,
|
||||
body,
|
||||
select {
|
||||
font-size: 16px;
|
||||
font-family: Arial, Helvetica, sans-serif !important;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#app {
|
||||
min-height: 80vh;
|
||||
}
|
||||
|
||||
h3.header {
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.mb-0 {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.mt-0 {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.mb-1 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.position-relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.language-select {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.language-select select {
|
||||
border: none;
|
||||
width: auto;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
text-decoration: underline;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
text-indent: 0.01px;
|
||||
text-overflow: "";
|
||||
margin: 0;
|
||||
margin-left: 6px;
|
||||
height: 2rem;
|
||||
line-height: inherit;
|
||||
outline: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.language-select:after {
|
||||
content: "";
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
margin: 0 0 0.25rem -0.75rem;
|
||||
border: solid black;
|
||||
border-width: 0 2px 2px 0;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
transform: rotate(45deg);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.btn-switch-language {
|
||||
color: black;
|
||||
margin-left: -1.5rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.textarea-container {
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.btn-delete-text {
|
||||
position: absolute;
|
||||
right: 1.5rem;
|
||||
top: 0.75rem;
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.btn-delete-text:focus,
|
||||
.btn-action:focus {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.characters-limit-container {
|
||||
position: absolute;
|
||||
right: 2rem;
|
||||
bottom: 1rem;
|
||||
color: #666;
|
||||
pointer-events: none;
|
||||
}
|
||||
.actions {
|
||||
position: absolute;
|
||||
right: 1.25rem;
|
||||
bottom: 1rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.btn-switch-type {
|
||||
background-color: #fff;
|
||||
color: #1565C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: .5rem;
|
||||
}
|
||||
|
||||
.btn-switch-type:focus {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.btn-switch-type:hover {
|
||||
background-color: #eee !important;
|
||||
color: #1565C0;
|
||||
}
|
||||
|
||||
.btn-switch-type.active {
|
||||
background-color: #1565C0 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.file-dropzone {
|
||||
font-size: 1.1rem;
|
||||
border: 1px solid #ccc;
|
||||
background: #f3f3f3;
|
||||
padding: 1rem 2rem 1rem 1.5rem;
|
||||
min-height: 220px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropzone-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.btn-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
font-size: 0.85rem;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-blue {
|
||||
color: #1565C0;
|
||||
}
|
||||
.btn-action:disabled {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.btn-action span {
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.btn-action .material-icons {
|
||||
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;
|
||||
}
|
||||
|
||||
.progress.translate {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.progress .indeterminate {
|
||||
background-color: steelblue;
|
||||
}
|
||||
|
||||
.textarea-container textarea {
|
||||
font-size: 1.25rem;
|
||||
resize: none;
|
||||
border: 1px solid #ccc;
|
||||
background: #f3f3f3;
|
||||
padding: 1rem 2rem 1rem 1.5rem;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.code {
|
||||
font-size: 90%;
|
||||
padding: 1rem 1.5rem;
|
||||
border: 1px solid #ccc;
|
||||
background: #fbfbfb;
|
||||
overflow: auto;
|
||||
font-family: monospace;
|
||||
min-height: 280px;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.page-footer .footer-copyright {
|
||||
justify-content: center;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
#logo-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidenav-trigger {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@media (min-width: 993px) {
|
||||
nav button.sidenav-trigger {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
#download-btn-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 2em 0;
|
||||
}
|
||||
|
||||
#download-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (min-width: 280px) {
|
||||
.btn-text {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.language-select select {
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
}
|
||||
.language-select:after {
|
||||
content: none;
|
||||
}
|
||||
.language-select span {
|
||||
display: none;
|
||||
}
|
||||
}
|
36
libretranslate/static/css/material-icons.css
Normal file
36
libretranslate/static/css/material-icons.css
Normal file
|
@ -0,0 +1,36 @@
|
|||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('../fonts/MaterialIcons-Regular.eot'); /* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url('../fonts/MaterialIcons-Regular.woff2') format('woff2'),
|
||||
url('../fonts/MaterialIcons-Regular.woff') format('woff'),
|
||||
url('../fonts/MaterialIcons-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
13
libretranslate/static/css/materialize.min.css
vendored
Normal file
13
libretranslate/static/css/materialize.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
libretranslate/static/css/prism.min.css
vendored
Normal file
1
libretranslate/static/css/prism.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
|
Loading…
Add table
Add a link
Reference in a new issue