_content.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /**
  2. * @copyright 2015 by Tobias Reich
  3. */
  4. #content {
  5. position: absolute;
  6. padding: 50px 0 33px;
  7. width: 100%;
  8. min-height: calc(100% - 83px);
  9. -webkit-overflow-scrolling: touch;
  10. &::before {
  11. content: '';
  12. position: absolute;
  13. left: 0;
  14. width: 100%;
  15. height: 1px;
  16. border-top: 1px solid white(.02);
  17. }
  18. &.sidebar { width: calc(100% - 300px); }
  19. /* Animations ------------------------------------------------------------------- */
  20. &.contentZoomIn .album,
  21. &.contentZoomIn .photo {
  22. animation-name: zoomIn;
  23. animation-duration: .2s;
  24. animation-fill-mode: forwards;
  25. animation-timing-function: $timing;
  26. }
  27. &.contentZoomIn .divider {
  28. animation-name: fadeIn;
  29. animation-duration: .2s;
  30. animation-fill-mode: forwards;
  31. animation-timing-function: $timing;
  32. }
  33. &.contentZoomOut .album,
  34. &.contentZoomOut .photo {
  35. animation-name: zoomOut;
  36. animation-duration: .2s;
  37. animation-fill-mode: forwards;
  38. animation-timing-function: $timing;
  39. }
  40. &.contentZoomOut .divider {
  41. animation-name: fadeOut;
  42. animation-duration: .3s;
  43. animation-fill-mode: forwards;
  44. animation-timing-function: $timing;
  45. }
  46. /* Albums and Photos ------------------------------------------------*/
  47. .album,
  48. .photo {
  49. float: left;
  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: 185px;
  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. }
  115. .album .overlay a,
  116. .photo .overlay a {
  117. display: block;
  118. margin: 0 0 12px 15px;
  119. font-size: 11px;
  120. color: #bbb;
  121. text-shadow: 0 1px 3px black(.4);
  122. }
  123. .photo .overlay a .iconic {
  124. fill: #bbb;
  125. margin: 0 5px 0 0;
  126. width: 8px;
  127. height: 8px;
  128. filter: drop-shadow(0 1px 3px black(.4));
  129. }
  130. .album img[data-retina='false'] + .overlay h1,
  131. .album img[data-retina='false'] + .overlay a { text-shadow: none; }
  132. /* Badges ------------------------------------------------*/
  133. .album .badge,
  134. .photo .badge {
  135. position: absolute;
  136. margin: -1px 0 0 12px;
  137. padding: 12px 8px 6px;
  138. box-shadow: 0 0 2px black(.6);
  139. background: $colorRed;
  140. border-radius: 0 0 5px 5px;
  141. border: 1px solid #fff;
  142. border-top: none;
  143. color: #fff;
  144. text-shadow: 0 1px 0 black(.4);
  145. opacity: .9;
  146. &:nth-child(2n) { margin-left: 54px; }
  147. .iconic {
  148. fill: #fff;
  149. width: 16px;
  150. height: 16px;
  151. filter: drop-shadow($shadowLight);
  152. }
  153. }
  154. /* Divider ------------------------------------------------*/
  155. .divider {
  156. float: left;
  157. margin: 50px 0 0;
  158. padding: 10px 0 0;
  159. width: 100%;
  160. opacity: 0;
  161. border-top: 1px solid white(.02);
  162. box-shadow: $shadow;
  163. &:first-child {
  164. margin-top: 10px;
  165. border-top: 0;
  166. box-shadow: none;
  167. }
  168. h1 {
  169. float: left;
  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: black(.9);
  184. text-shadow: 0 1px 0 white(.03);
  185. text-align: center;
  186. transform: translateX(-50%) translateY(-50%);
  187. .iconic {
  188. fill: black(.9);
  189. margin: 0 0 10px;
  190. width: 60px;
  191. height: 60px;
  192. filter: drop-shadow(0 1px 0 white(.03));
  193. }
  194. p {
  195. font-size: 18px;
  196. font-weight: bold;
  197. }
  198. }