_content.scss 4.5 KB

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