_content.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. .content {
  2. display: flex;
  3. flex-wrap: wrap;
  4. padding: 50px 0 33px;
  5. width: 100%;
  6. min-height: calc(100% - 83px);
  7. -webkit-overflow-scrolling: touch;
  8. &::before {
  9. content: '';
  10. position: absolute;
  11. left: 0;
  12. width: 100%;
  13. height: 1px;
  14. background: white(.02);
  15. }
  16. &--sidebar {
  17. width: calc(100% - 300px);
  18. }
  19. // Animations -------------------------------------------------------------- //
  20. &.contentZoomIn .album,
  21. &.contentZoomIn .photo {
  22. animation-name: zoomIn;
  23. }
  24. &.contentZoomIn .divider {
  25. animation-name: fadeIn;
  26. }
  27. &.contentZoomOut .album,
  28. &.contentZoomOut .photo {
  29. animation-name: zoomOut;
  30. }
  31. &.contentZoomOut .divider {
  32. animation-name: fadeOut;
  33. }
  34. // Albums and Photos ------------------------------------------------------ //
  35. .album,
  36. .photo {
  37. position: relative;
  38. width: 202px;
  39. height: 202px;
  40. margin: 30px 0 0 30px;
  41. cursor: default;
  42. animation-duration: .2s;
  43. animation-fill-mode: forwards;
  44. animation-timing-function: $timing;
  45. img {
  46. position: absolute;
  47. width: 200px;
  48. height: 200px;
  49. background: #222;
  50. box-shadow: 0 2px 5px black(.5);
  51. border: 1px solid white(.5);
  52. transition: opacity .3s ease-out, transform .3s ease-out, border-color .3s ease-out;
  53. will-change: transform;
  54. }
  55. &:hover img,
  56. &.active img {
  57. border-color: $colorBlue;
  58. }
  59. &:active img {
  60. transition: none;
  61. border-color: darken($colorBlue, 15%);
  62. }
  63. }
  64. // Album -------------------------------------------------------------- //
  65. .album {
  66. img:first-child,
  67. img:nth-child(2) {
  68. transform: rotate(0) translateY(0) translateX(0);
  69. opacity: 0;
  70. }
  71. &:hover img:nth-child(1),
  72. &:hover img:nth-child(2) {
  73. opacity: 1;
  74. }
  75. &:hover img:nth-child(1) {
  76. transform: rotate(-2deg) translateY(10px) translateX(-12px);
  77. }
  78. &:hover img:nth-child(2) {
  79. transform: rotate(5deg) translateY(-8px) translateX(12px);
  80. }
  81. }
  82. // Overlay -------------------------------------------------------------- //
  83. .album .overlay,
  84. .photo .overlay {
  85. position: absolute;
  86. margin: 0 1px;
  87. width: 200px;
  88. background: linear-gradient(to bottom, black(0), black(.6));
  89. bottom: 1px;
  90. }
  91. // No overlay for empty albums
  92. .album img[data-overlay='false'] + .overlay {
  93. background: none;
  94. }
  95. .photo .overlay { opacity: 0; }
  96. .photo:hover .overlay,
  97. .photo.active .overlay {
  98. opacity: 1;
  99. }
  100. .album .overlay h1,
  101. .photo .overlay h1 {
  102. min-height: 19px;
  103. width: 180px;
  104. margin: 12px 0 5px 15px;
  105. color: #fff;
  106. text-shadow: 0 1px 3px black(.4);
  107. font-size: 16px;
  108. font-weight: bold;
  109. overflow: hidden;
  110. white-space: nowrap;
  111. text-overflow: ellipsis;
  112. }
  113. .album .overlay a,
  114. .photo .overlay a {
  115. display: block;
  116. margin: 0 0 12px 15px;
  117. font-size: 11px;
  118. color: #ccc;
  119. text-shadow: 0 1px 3px black(.4);
  120. }
  121. .photo .overlay a .iconic {
  122. fill: #ccc;
  123. margin: 0 5px 0 0;
  124. width: 8px;
  125. height: 8px;
  126. filter: drop-shadow(0 1px 3px black(.4));
  127. }
  128. .album img[data-overlay='false'] + .overlay h1,
  129. .album img[data-overlay='false'] + .overlay a {
  130. text-shadow: none;
  131. }
  132. // Badge -------------------------------------------------------------- //
  133. .album .badges,
  134. .photo .badges {
  135. position: relative;
  136. margin: -1px 0 0 6px;
  137. }
  138. .album .badge,
  139. .photo .badge {
  140. display: none;
  141. margin: 0 0 0 6px;
  142. padding: 12px 8px 6px;
  143. width: 18px;
  144. background: $colorRed;
  145. box-shadow: 0 0 2px black(.6);
  146. border-radius: 0 0 5px 5px;
  147. border: 1px solid #fff;
  148. border-top: none;
  149. color: #fff;
  150. text-align: center;
  151. text-shadow: 0 1px 0 black(.4);
  152. opacity: .9;
  153. &--visible {
  154. display: inline-block;
  155. }
  156. .iconic {
  157. fill: #fff;
  158. width: 16px;
  159. height: 16px;
  160. filter: drop-shadow($shadowLight);
  161. }
  162. }
  163. // Divider -------------------------------------------------------------- //
  164. .divider {
  165. margin: 50px 0 0;
  166. padding: 10px 0 0;
  167. width: 100%;
  168. opacity: 0;
  169. border-top: 1px solid white(.02);
  170. box-shadow: $shadow;
  171. animation-duration: .2s;
  172. animation-fill-mode: forwards;
  173. animation-timing-function: $timing;
  174. &:first-child {
  175. margin-top: 10px;
  176. border-top: 0;
  177. box-shadow: none;
  178. }
  179. h1 {
  180. margin: 0 0 0 30px;
  181. color: white(.6);
  182. font-size: 14px;
  183. font-weight: bold;
  184. }
  185. }
  186. }
  187. // No content -------------------------------------------------------------- //
  188. .no_content {
  189. position: absolute;
  190. top: 50%;
  191. left: 50%;
  192. padding-top: 20px;
  193. color: white(.35);
  194. text-shadow: 0 -1px 0 black(.4);
  195. text-align: center;
  196. transform: translateX(-50%) translateY(-50%);
  197. .iconic {
  198. fill: white(.3);
  199. margin: 0 0 10px;
  200. width: 50px;
  201. height: 50px;
  202. filter: drop-shadow(0 -1px 0 black(.4));
  203. }
  204. p {
  205. font-size: 16px;
  206. font-weight: bold;
  207. }
  208. }