LT-251: Styling quick switch toolbar like the specifications in the design

This commit is contained in:
Bruno Alves de Faria 2016-06-16 12:08:02 -03:00 committed by Erik Ziegler
parent d8181a1a5e
commit 51cb360b68
3 changed files with 92 additions and 87 deletions

View File

@ -1,23 +1,26 @@
@import "./spacings" @import "./spacings"
// MIN WIDTH 1600 // MIN WIDTH 1920
generateSpacings('r', $spacer-x, $spacer-y) generateSpacings('r', $spacer-x, $spacer-y)
@media screen and (min-width: 1440px) and (max-width: 1599px) @media screen and (min-width: 1600px) and (max-width: 1919px)
generateSpacings('r', ($spacer-x * 0.9), ($spacer-y * 0.9)) generateSpacings('r', ($spacer-x * 0.9), ($spacer-y * 0.9))
@media screen and (min-width: 1360px) and (max-width: 1439px) @media screen and (min-width: 1440px) and (max-width: 1599px)
generateSpacings('r', ($spacer-x * 0.8), ($spacer-y * 0.8)) generateSpacings('r', ($spacer-x * 0.8), ($spacer-y * 0.8))
@media screen and (min-width: 1280px) and (max-width: 1359px) @media screen and (min-width: 1360px) and (max-width: 1439px)
generateSpacings('r', ($spacer-x * 0.7), ($spacer-y * 0.7)) generateSpacings('r', ($spacer-x * 0.7), ($spacer-y * 0.7))
@media screen and (min-width: 1152px) and (max-width: 1279px) @media screen and (min-width: 1280px) and (max-width: 1359px)
generateSpacings('r', ($spacer-x * 0.6), ($spacer-y * 0.6)) generateSpacings('r', ($spacer-x * 0.6), ($spacer-y * 0.6))
@media screen and (min-width: 1024px) and (max-width: 1151px) @media screen and (min-width: 1152px) and (max-width: 1279px)
generateSpacings('r', ($spacer-x * 0.5), ($spacer-y * 0.5)) generateSpacings('r', ($spacer-x * 0.5), ($spacer-y * 0.5))
@media screen and (max-width: 1023px) @media screen and (min-width: 1024px) and (max-width: 1151px)
generateSpacings('r', ($spacer-x * 0.4), ($spacer-y * 0.4)) generateSpacings('r', ($spacer-x * 0.4), ($spacer-y * 0.4))
@media screen and (max-width: 1023px)
generateSpacings('r', ($spacer-x * 0.3), ($spacer-y * 0.3))

View File

@ -1,15 +1,18 @@
<template name="studySeriesQuickSwitch"> <template name="studySeriesQuickSwitch">
<div class="quickSwitch {{side}} clearfix"> <div class="quickSwitchWrapper {{side}}">
<div class="switchSection {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}"> <div class="quickSwitch clearfix rp-t-1 {{#if eq side 'left'}}rp-r-3{{else}}rp-l-3{{/if}}">
<div class="switchSection rm-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
<div class="label">Study</div> <div class="label">Study</div>
<div class="studySwitch"></div> <div class="studySwitch">
<div class="studyBox"></div>
<div class="switchHover studyHover clearfix"> <div class="switchHover studyHover clearfix">
<div class="scrollArea"> <div class="scrollArea">
{{>studyTimepointBrowser timepointViewType=timepointViewType viewportIndex=viewportIndex}} {{>studyTimepointBrowser timepointViewType=timepointViewType viewportIndex=viewportIndex}}
</div> </div>
</div> </div>
</div> </div>
<div class="switchSection {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}"> </div>
<div class="switchSection rm-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
{{#let thumbnailsList=(thumbnails currentStudy)}} {{#let thumbnailsList=(thumbnails currentStudy)}}
<div class="label">Series</div> <div class="label">Series</div>
<div class="seriesSwitch clearfix"> <div class="seriesSwitch clearfix">
@ -22,7 +25,6 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/each}} {{/each}}
</div>
<div class="switchHover seriesHover clearfix"> <div class="switchHover seriesHover clearfix">
<div class="scrollArea"> <div class="scrollArea">
{{#each thumbnail in thumbnailsList}} {{#each thumbnail in thumbnailsList}}
@ -30,7 +32,9 @@
{{/each}} {{/each}}
</div> </div>
</div> </div>
</div>
{{/let}} {{/let}}
</div> </div>
</div> </div>
</div>
</template> </template>

View File

@ -1,58 +1,49 @@
@import "{design}/app" @import "{design}/app"
$switchSize = 55px $switchSize = 55px
$switchTop = 5px
$switchHeight = 70px
$switchWrapperWidth = 140px
$seriesSpacing = 2px $seriesSpacing = 2px
.quickSwitch .quickSwitchWrapper
height: $switchHeight
position: absolute position: absolute
top: $switchTop top: 0
width: $switchWrapperWidth
&.middle &.middle
left: 'calc(50% - %s)' % ($switchWrapperWidth / 2) left: 50%
transform(translateX(-50%))
&.left &.left
left: 'calc(50% - %s - 20px)' % $switchWrapperWidth border-right: 1px solid $uiBorderColor
right: 50%
&.right &.right
left: calc(50% + 20px) left: 50%
.quickSwitch
.switchSection .switchSection
display: inline-block display: inline-block
float: left float: left
height: 100% height: 100%
margin: 0 5px
position: relative position: relative
&:hover &:hover
.studySwitch, .seriesSwitch .studySwitch .studyBox, .seriesSwitch .seriesItem
opacity: 0 opacity: 0
.switchHover .switchHover
opacity: 0.8 opacity: 0.8
.studyHover .studyHover
transform(scale(1)) transform(scale(1))
.label .studySwitch .studyBox, .seriesSwitch .seriesItem
color: $textSecondaryColor
display: block
font-size: 12px
font-weight: 300
padding: 0
text-align: center
text-transform: uppercase
.studySwitch, .seriesSwitch
transition(opacity 0.3s ease) transition(opacity 0.3s ease)
.studySwitch, .seriesSwitch
position: relative
.studySwitch .studySwitch
.studyBox
background-color: $darkUiColor background-color: $darkUiColor
border: solid 1px $activeColor border: solid 1px $activeColor
border-radius: 11px border-radius: 11px
display: block display: block
height: $switchSize height: $switchSize
margin: 0 auto
width: $switchSize width: $switchSize
.seriesSwitch .seriesSwitch
@ -78,13 +69,23 @@ $seriesSpacing = 2px
&.active &.active
background-color: $activeColor background-color: $activeColor
.label
color: $textSecondaryColor
display: block
font-size: 12px
font-weight: 300
line-height: 34px
padding: 0
text-align: center
text-transform: uppercase
.switchHover .switchHover
background: black background: black
border-radius: 5px border-radius: 5px
opacity: 0 opacity: 0
overflow: hidden overflow: hidden
position: absolute position: absolute
top: 18px top: 0
transform(scale(0)) transform(scale(0))
transition(all 0.3s ease) transition(all 0.3s ease)
z-index: 10000 z-index: 10000
@ -105,7 +106,7 @@ $seriesSpacing = 2px
.thumbnailEntry .thumbnailEntry
margin: 0 margin: 0
.quickSwitch.left, .quickSwitch.middle .quickSwitchWrapper.left, .quickSwitchWrapper.middle
.seriesHover .thumbnailEntry .seriesHover .thumbnailEntry
float: right float: right
.studyHover .studyHover
@ -115,7 +116,7 @@ $seriesSpacing = 2px
right: 0 right: 0
transform-origin(100% 0%) transform-origin(100% 0%)
.quickSwitch.right .quickSwitchWrapper.right
.seriesHover .thumbnailEntry .seriesHover .thumbnailEntry
float: left float: left
.studyHover .studyHover
@ -134,38 +135,35 @@ $seriesSmallSpacing = 1px
transform(scale(0.5)) transform(scale(0.5))
@media screen and (min-width: 1024px) and (max-width: 1151px) @media screen and (min-width: 1024px) and (max-width: 1151px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(0.63)) transform(scale(0.61))
@media screen and (min-width: 1152px) and (max-width: 1279px) @media screen and (min-width: 1152px) and (max-width: 1279px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(0.72)) transform(scale(0.69))
@media screen and (min-width: 1280px) and (max-width: 1359px) @media screen and (min-width: 1280px) and (max-width: 1359px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(0.81)) transform(scale(0.77))
@media screen and (min-width: 1360px) and (max-width: 1439px) @media screen and (min-width: 1360px) and (max-width: 1439px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(0.86)) transform(scale(0.82))
@media screen and (min-width: 1440px) and (max-width: 1599px) @media screen and (min-width: 1440px) and (max-width: 1599px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(0.91)) transform(scale(0.87))
@media screen and (min-width: 1600px) @media screen and (min-width: 1600px) and (max-width: 1919px)
.switchSection:hover .seriesHover
transform(scale(0.97))
@media screen and (min-width: 1920px)
.switchSection:hover .seriesHover .switchSection:hover .seriesHover
transform(scale(1)) transform(scale(1))
@media screen and (max-width: 1599px) @media screen and (max-width: 1599px)
.quickSwitch .quickSwitch
height: 45px
&.left
left: 'calc(50% - %s - 8px)' % $switchWrapperWidth
&.right
left: calc(50% + 8px)
.switchSection .switchSection
.switchHover
top: 8px
.label .label
font-size: 8px font-size: 8px
font-weight: 400 font-weight: 400
line-height: 12px
padding: 0 padding: 0
.studySwitch .studySwitch .studyBox
border-radius: 7px border-radius: 7px
height: $switchSmallSize height: $switchSmallSize
width: $switchSmallSize width: $switchSmallSize
@ -178,6 +176,6 @@ $seriesSmallSpacing = 1px
margin: $seriesSmallSpacing margin: $seriesSmallSpacing
width: 10px width: 10px
&.count &.count
font-size: 10px; font-size: 10px
font-weight: 300; font-weight: 300
line-height: 10px; line-height: 10px