From 3f0d5442db72654bb48ec6a6c98ddcaeef6d89a2 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 4 Apr 2020 03:06:02 +0200 Subject: [PATCH] Implementing an episode's more button with a download option --- .../episodes-list.component.html | 40 +++-- .../episodes-list.component.scss | 140 ++++++++++-------- 2 files changed, 106 insertions(+), 74 deletions(-) diff --git a/src/app/episodes-list/episodes-list.component.html b/src/app/episodes-list/episodes-list.component.html index 7ceeeecf..5456e3c7 100644 --- a/src/app/episodes-list/episodes-list.component.html +++ b/src/app/episodes-list/episodes-list.component.html @@ -1,21 +1,31 @@
+ + + + + + +
diff --git a/src/app/episodes-list/episodes-list.component.scss b/src/app/episodes-list/episodes-list.component.scss index fa783ea9..b51e4ec7 100644 --- a/src/app/episodes-list/episodes-list.component.scss +++ b/src/app/episodes-list/episodes-list.component.scss @@ -52,9 +52,8 @@ padding: .25rem; flex-shrink: 0; width: 55%; - cursor: pointer; - color: inherit; - text-decoration: inherit; + outline: none; + position: relative; @include media-breakpoint-up(sm) { @@ -76,74 +75,97 @@ width: 18%; } - .img - { - width: 100%; - height: 0; - padding-top: 56.25%; - background-color: #333333; - background-size: contain; - position: relative; - > button - { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: auto; - width: 64px; - height: 64px; - outline: none; - display: none; + > .moreBtn + { + position: absolute; + top: 2%; + right: 2%; + width: 36px; + height: 36px; + outline: none; + display: none; + z-index: 255 + } + + > a { + cursor: pointer; + color: inherit; + text-decoration: inherit; + outline: none; + + .img { + width: 100%; + height: 0; + padding-top: 56.25%; + background-color: #333333; + background-size: contain; + position: relative; + + > .playBtn { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; + width: 64px; + height: 64px; + outline: none; + display: none; + } } - } - .title - { - padding-top: .2rem; - font-weight: 600; - margin-bottom: 0; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; - } + .title { + padding-top: .2rem; + font-weight: 600; + margin-bottom: 0; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + } - .overview - { - font-weight: 300; - display: -webkit-box; - -webkit-line-clamp: 4; - -webkit-box-orient: vertical; - overflow: hidden; - } + .overview { + font-weight: 300; + display: -webkit-box; + -webkit-line-clamp: 4; + -webkit-box-orient: vertical; + overflow: hidden; + } - .subtitle - { - font-weight: 300; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - overflow: hidden; + .subtitle { + font-weight: 300; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + } } &:host-context(.hoverEnabled) &:hover { - .img + .moreBtn { - outline: solid var(--accentColor); - - .playBtn - { - display: block; - } + display: block; } - - .title + + > a { - text-decoration: underline; + .img + { + outline: solid var(--accentColor); + + .playBtn + { + display: block; + } + } + + .title + { + text-decoration: underline; + } } } }