_content.scss 4.6 KB

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