_content.scss 3.8 KB

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