aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-09 09:33:28 +0200
committerGitHub <noreply@github.com>2020-06-09 09:33:28 +0200
commite66883b37ae0796256b3aba550670a2d76cfc98a (patch)
tree3cce3c78e9f9f327470f0370a1b4065fe7e0009e /client/src/app/shared/misc
parent6ad971d5f5e9ea2adfc58bd83ba1790efa4a8d12 (diff)
downloadPeerTube-e66883b37ae0796256b3aba550670a2d76cfc98a.tar.gz
PeerTube-e66883b37ae0796256b3aba550670a2d76cfc98a.tar.zst
PeerTube-e66883b37ae0796256b3aba550670a2d76cfc98a.zip
`fitWidth` for `video-miniature`, fluid grid (#2830)
* Fluid abstract video list * normalize timestamp display on miniatures * use grid for abstract-video-list - refactor scss function var to pvar to avoid overriding css variables - move fluid-grid margins to adapt-margin-content-width mixin for maintainability - fix video-miniature-name margin-top on small screen * move sceenratio function in a mixin * display no miniature avatar in channel videos view
Diffstat (limited to 'client/src/app/shared/misc')
-rw-r--r--client/src/app/shared/misc/help.component.scss6
-rw-r--r--client/src/app/shared/misc/list-overflow.component.scss6
-rw-r--r--client/src/app/shared/misc/utils.ts4
3 files changed, 9 insertions, 7 deletions
diff --git a/client/src/app/shared/misc/help.component.scss b/client/src/app/shared/misc/help.component.scss
index 3c8b66cd5..43f33a53a 100644
--- a/client/src/app/shared/misc/help.component.scss
+++ b/client/src/app/shared/misc/help.component.scss
@@ -11,7 +11,7 @@
11 top: -2px; 11 top: -2px;
12 margin: 5px; 12 margin: 5px;
13 13
14 @include apply-svg-color(var(--mainForegroundColor)) 14 @include apply-svg-color(pvar(--mainForegroundColor))
15 } 15 }
16} 16}
17 17
@@ -25,8 +25,8 @@
25 text-align: left; 25 text-align: left;
26 padding: 10px; 26 padding: 10px;
27 font-size: 13px; 27 font-size: 13px;
28 background-color: var(--mainBackgroundColor); 28 background-color: pvar(--mainBackgroundColor);
29 color: var(--mainForegroundColor); 29 color: pvar(--mainForegroundColor);
30 border-radius: 3px; 30 border-radius: 3px;
31 31
32 p { 32 p {
diff --git a/client/src/app/shared/misc/list-overflow.component.scss b/client/src/app/shared/misc/list-overflow.component.scss
index 1e5fe4c10..1ec044489 100644
--- a/client/src/app/shared/misc/list-overflow.component.scss
+++ b/client/src/app/shared/misc/list-overflow.component.scss
@@ -24,7 +24,7 @@ button {
24 &.routeActive { 24 &.routeActive {
25 &::after { 25 &::after {
26 display: inherit; 26 display: inherit;
27 border: 2px solid var(--mainColor); 27 border: 2px solid pvar(--mainColor);
28 position: relative; 28 position: relative;
29 right: 95%; 29 right: 95%;
30 top: 50%; 30 top: 50%;
@@ -53,8 +53,8 @@ button {
53 width: 100%; 53 width: 100%;
54 54
55 &.active { 55 &.active {
56 color: var(--mainBackgroundColor) !important; 56 color: pvar(--mainBackgroundColor) !important;
57 background-color: var(--mainHoverColor); 57 background-color: pvar(--mainHoverColor);
58 opacity: .9; 58 opacity: .9;
59 } 59 }
60 } 60 }
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index 3d1e906a2..bc3ab85b3 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -59,7 +59,9 @@ function durationToString (duration: number) {
59 const secondsPadding = seconds >= 10 ? '' : '0' 59 const secondsPadding = seconds >= 10 ? '' : '0'
60 const displayedHours = hours > 0 ? hours.toString() + ':' : '' 60 const displayedHours = hours > 0 ? hours.toString() + ':' : ''
61 61
62 return displayedHours + minutesPadding + minutes.toString() + ':' + secondsPadding + seconds.toString() 62 return (
63 displayedHours + minutesPadding + minutes.toString() + ':' + secondsPadding + seconds.toString()
64 ).replace(/^0/, '')
63} 65}
64 66
65function immutableAssign <A, B> (target: A, source: B) { 67function immutableAssign <A, B> (target: A, source: B) {