_content.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. }
  64. &:hover img,
  65. &.active img {
  66. border-color: $colorBlue;
  67. }
  68. &:active img {
  69. transition: none;
  70. border-color: darken($colorBlue, 15%);
  71. }
  72. }
  73. /* Album ------------------------------------------------*/
  74. .album {
  75. img:first-child,
  76. img:nth-child(2) {
  77. transform: rotate(0) translateY(0) translateX(0);
  78. opacity: 0;
  79. }
  80. &:hover img:nth-child(1),
  81. &:hover img:nth-child(2) { opacity: 1; }
  82. &:hover img:nth-child(1) { transform: rotate(-2deg) translateY(10px) translateX(-12px); }
  83. &:hover img:nth-child(2) { transform: rotate(5deg) translateY(-8px) translateX(12px); }
  84. }
  85. /* Album/Photo Overlay ------------------------------------------------*/
  86. .album .overlay,
  87. .photo .overlay {
  88. position: absolute;
  89. margin: 0 1px;
  90. width: 200px;
  91. background: black(.6);
  92. background: linear-gradient(to bottom, black(0), black(.6));
  93. bottom: 1px;
  94. }
  95. // No overlay for empty albums
  96. .album img[data-retina='false'] + .overlay {
  97. background: none;
  98. }
  99. .photo .overlay { opacity: 0; }
  100. .photo:hover .overlay,
  101. .photo.active .overlay {
  102. opacity: 1;
  103. }
  104. .album .overlay h1,
  105. .photo .overlay h1 {
  106. min-height: 19px;
  107. width: 180px;
  108. margin: 12px 0 5px 15px;
  109. color: #fff;
  110. text-shadow: 0 1px 3px black(.4);
  111. font-size: 16px;
  112. font-weight: bold;
  113. overflow: hidden;
  114. white-space: nowrap;
  115. text-overflow: ellipsis;
  116. }
  117. .album .overlay a,
  118. .photo .overlay a {
  119. display: block;
  120. margin: 0 0 12px 15px;
  121. font-size: 11px;
  122. color: #ccc;
  123. text-shadow: 0 1px 3px black(.4);
  124. }
  125. .photo .overlay a .iconic {
  126. fill: #ccc;
  127. margin: 0 5px 0 0;
  128. width: 8px;
  129. height: 8px;
  130. filter: drop-shadow(0 1px 3px black(.4));
  131. }
  132. .album img[data-retina='false'] + .overlay h1,
  133. .album img[data-retina='false'] + .overlay a { text-shadow: none; }
  134. /* Badges ------------------------------------------------*/
  135. .album .badge,
  136. .photo .badge {
  137. position: absolute;
  138. margin: -1px 0 0 12px;
  139. padding: 12px 8px 6px;
  140. box-shadow: 0 0 2px black(.6);
  141. background: $colorRed;
  142. border-radius: 0 0 5px 5px;
  143. border: 1px solid #fff;
  144. border-top: none;
  145. color: #fff;
  146. text-shadow: 0 1px 0 black(.4);
  147. opacity: .9;
  148. &:nth-child(2n) { margin-left: 54px; }
  149. .iconic {
  150. fill: #fff;
  151. width: 16px;
  152. height: 16px;
  153. filter: drop-shadow($shadowLight);
  154. }
  155. }
  156. /* Divider ------------------------------------------------*/
  157. .divider {
  158. margin: 50px 0 0;
  159. padding: 10px 0 0;
  160. width: 100%;
  161. opacity: 0;
  162. border-top: 1px solid white(.02);
  163. box-shadow: $shadow;
  164. &:first-child {
  165. margin-top: 10px;
  166. border-top: 0;
  167. box-shadow: none;
  168. }
  169. h1 {
  170. margin: 0 0 0 30px;
  171. color: white(.6);
  172. font-size: 14px;
  173. font-weight: bold;
  174. }
  175. }
  176. }
  177. /* No Content ------------------------------------------------*/
  178. .no_content {
  179. position: absolute;
  180. top: 50%;
  181. left: 50%;
  182. padding-top: 20px;
  183. color: white(.35);
  184. text-shadow: 0 -1px 0 black(.4);
  185. text-align: center;
  186. transform: translateX(-50%) translateY(-50%);
  187. .iconic {
  188. fill: white(.3);
  189. margin: 0 0 10px;
  190. width: 50px;
  191. height: 50px;
  192. filter: drop-shadow(0 -1px 0 black(.4));
  193. }
  194. p {
  195. font-size: 16px;
  196. font-weight: bold;
  197. }
  198. }