mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-26 11:15:43 +03:00
Move translation pronunciation down and collapse to max 3 lines
This commit is contained in:
parent
e4b30d95fc
commit
5fe5d97611
2 changed files with 25 additions and 9 deletions
|
@ -82,13 +82,26 @@
|
||||||
}
|
}
|
||||||
.status-translation-block .translated-block output {
|
.status-translation-block .translated-block output {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 1em;
|
margin-top: 0.75em;
|
||||||
}
|
}
|
||||||
.status-translation-block
|
.status-translation-block
|
||||||
.translated-block
|
.translated-block
|
||||||
output.translated-pronunciation-content {
|
output.translated-pronunciation-content {
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
padding-bottom: 1em;
|
padding-top: 0.75em;
|
||||||
border-top: var(--hairline-width) solid var(--bg-color);
|
border-top: var(--hairline-width) solid var(--outline-color);
|
||||||
border-bottom: var(--hairline-width) solid var(--outline-color);
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
mask-image: linear-gradient(to top, transparent, black 16px);
|
||||||
|
}
|
||||||
|
.status-translation-block
|
||||||
|
.translated-block
|
||||||
|
output.translated-pronunciation-content:is(:active, :focus) {
|
||||||
|
display: block;
|
||||||
|
-webkit-line-clamp: unset;
|
||||||
|
-webkit-box-orient: unset;
|
||||||
|
overflow: visible;
|
||||||
|
mask-image: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,14 +139,17 @@ function TranslationBlock({
|
||||||
) : (
|
) : (
|
||||||
!!translatedContent && (
|
!!translatedContent && (
|
||||||
<>
|
<>
|
||||||
{!!pronunciationContent && (
|
|
||||||
<output class="translated-pronunciation-content">
|
|
||||||
{pronunciationContent}
|
|
||||||
</output>
|
|
||||||
)}
|
|
||||||
<output class="translated-content" lang={targetLang}>
|
<output class="translated-content" lang={targetLang}>
|
||||||
{translatedContent}
|
{translatedContent}
|
||||||
</output>
|
</output>
|
||||||
|
{!!pronunciationContent && (
|
||||||
|
<output
|
||||||
|
class="translated-pronunciation-content"
|
||||||
|
tabIndex={-1}
|
||||||
|
>
|
||||||
|
{pronunciationContent}
|
||||||
|
</output>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue