_content.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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-overlay='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-overlay='false'] + .overlay h1,
  134. .album img[data-overlay='false'] + .overlay a { text-shadow: none; }
  135. /* Badges ------------------------------------------------*/
  136. .album .badges,
  137. .photo .badges {
  138. position: relative;
  139. margin: -1px 0 0 6px;
  140. }
  141. .album .badge,
  142. .photo .badge {
  143. display: none;
  144. margin: 0 0 0 6px;
  145. padding: 12px 8px 6px;
  146. width: 18px;
  147. background: $colorRed;
  148. box-shadow: 0 0 2px black(.6);
  149. border-radius: 0 0 5px 5px;
  150. border: 1px solid #fff;
  151. border-top: none;
  152. color: #fff;
  153. text-align: center;
  154. text-shadow: 0 1px 0 black(.4);
  155. opacity: .9;
  156. &--visible { display: inline-block; }
  157. .iconic {
  158. fill: #fff;
  159. width: 16px;
  160. height: 16px;
  161. filter: drop-shadow($shadowLight);
  162. }
  163. }
  164. /* Divider ------------------------------------------------*/
  165. .divider {
  166. margin: 50px 0 0;
  167. padding: 10px 0 0;
  168. width: 100%;
  169. opacity: 0;
  170. border-top: 1px solid white(.02);
  171. box-shadow: $shadow;
  172. &:first-child {
  173. margin-top: 10px;
  174. border-top: 0;
  175. box-shadow: none;
  176. }
  177. h1 {
  178. margin: 0 0 0 30px;
  179. color: white(.6);
  180. font-size: 14px;
  181. font-weight: bold;
  182. }
  183. }
  184. }
  185. /* No Content ------------------------------------------------*/
  186. .no_content {
  187. position: absolute;
  188. top: 50%;
  189. left: 50%;
  190. padding-top: 20px;
  191. color: white(.35);
  192. text-shadow: 0 -1px 0 black(.4);
  193. text-align: center;
  194. transform: translateX(-50%) translateY(-50%);
  195. .iconic {
  196. fill: white(.3);
  197. margin: 0 0 10px;
  198. width: 50px;
  199. height: 50px;
  200. filter: drop-shadow(0 -1px 0 black(.4));
  201. }
  202. p {
  203. font-size: 16px;
  204. font-weight: bold;
  205. }
  206. }