_imageview.scss 2.1 KB

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