_imageview.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #imageview {
  2. position: fixed;
  3. display: none;
  4. top: 0;
  5. left: 0;
  6. width: 100%;
  7. height: 100%;
  8. background-color: rgba(10, 10, 10, .98);
  9. transition: background-color .3s;
  10. // Modes -------------------------------------------------------------- //
  11. &.view { background-color: inherit; }
  12. &.full { background-color: black(1); }
  13. // ImageView -------------------------------------------------------------- //
  14. #image {
  15. position: absolute;
  16. top: 60px;
  17. right: 30px;
  18. bottom: 30px;
  19. left: 30px;
  20. margin: auto;
  21. max-width: calc(100% - 60px);
  22. max-height: calc(100% - 90px);
  23. width: auto;
  24. height: auto;
  25. transition: top .3s, right .3s, bottom .3s, left .3s, max-width .3s, max-height .3s;
  26. animation-name: zoomIn;
  27. animation-duration: .3s;
  28. animation-timing-function: $timingBounce;
  29. @media (max-width: 640px) {
  30. top: 60px;
  31. right: 20px;
  32. bottom: 20px;
  33. left: 20px;
  34. max-width: calc(100% - 40px);
  35. max-height: calc(100% - 80px);
  36. }
  37. }
  38. &.full #image {
  39. top: 0;
  40. right: 0;
  41. bottom: 0;
  42. left: 0;
  43. max-width: 100%;
  44. max-height: 100%;
  45. }
  46. // Previous/Next Buttons -------------------------------------------------------------- //
  47. .arrow_wrapper {
  48. position: fixed;
  49. width: 15%;
  50. height: calc(100% - 60px);
  51. top: 60px;
  52. &--previous { left: 0; }
  53. &--next { right: 0; }
  54. @media (max-width: 640px) {
  55. display: none;
  56. }
  57. a {
  58. position: fixed;
  59. top: 50%;
  60. margin: -19px 0 0;
  61. padding: 8px 12px;
  62. width: 16px;
  63. height: 22px;
  64. // The background-image will be styled dynamically via JS
  65. // background-image: linear-gradient(to bottom, rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)), url('');
  66. background-size: 100% 100%;
  67. border: 1px solid white(.8);
  68. opacity: .6;
  69. z-index: 2;
  70. transition: transform .2s ease-out, opacity .2s ease-out;
  71. will-change: transform;
  72. &#previous {
  73. left: -1px;
  74. transform: translateX(-100%);
  75. }
  76. &#next {
  77. right: -1px;
  78. transform: translateX(100%);
  79. }
  80. }
  81. &:hover a#previous,
  82. &:hover a#next {
  83. transform: translateX(0);
  84. }
  85. a:hover {
  86. opacity: 1;
  87. }
  88. .iconic {
  89. fill: white(.8);
  90. }
  91. }
  92. }