product.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. ---
  2. ---
  3. :root {
  4. --floating-button-size: 75px;
  5. }
  6. #banner-container {
  7. * {
  8. transition-duration: 0.25s;
  9. }
  10. #banner-background-wrapper {
  11. position: absolute;
  12. left: 0;
  13. top: 0;
  14. border-radius: var(--corner-radius-big);
  15. width: 100%;
  16. height: 100%;
  17. overflow: hidden;
  18. #banner-background {
  19. position: absolute;
  20. top: 0;
  21. left: 0;
  22. width: 100%;
  23. height: 100%;
  24. background-size: cover;
  25. background-position: center;
  26. background-repeat: no-repeat;
  27. filter: blur(0px);
  28. z-index: 0;
  29. }
  30. #banner-dimmer {
  31. position: relative;
  32. background-color: rgba(0, 0, 0, 0.4);
  33. width: 100%;
  34. height: 100%;
  35. z-index: 2;
  36. }
  37. }
  38. #header-content {
  39. display: flex;
  40. flex-direction: row;
  41. * {
  42. position: relative;
  43. z-index: 2;
  44. }
  45. #group-divider {
  46. width: var(--margin);
  47. height: var(--margin);
  48. }
  49. #icon {
  50. width: 25%;
  51. aspect-ratio: 1 / 1;
  52. background-size: cover;
  53. background-position: center;
  54. border-radius: var(--corner-radius-big);
  55. margin-bottom: auto;
  56. }
  57. #group-right {
  58. color: white;
  59. width: 67%;
  60. display: flex;
  61. flex-direction: column;
  62. flex-grow: 1;
  63. #name {
  64. max-lines: 2;
  65. display: block;
  66. font-size: xxx-large;
  67. font-weight: bolder;
  68. letter-spacing: 0;
  69. line-height: 1em;
  70. padding-bottom: calc(var(--margin) / 2);
  71. }
  72. #description {
  73. padding-top: 0;
  74. padding-bottom: var(--margin);
  75. }
  76. #sources {
  77. display: flex;
  78. flex-direction: row-reverse;
  79. margin-top: auto;
  80. @keyframes source-slide-in {
  81. from {
  82. transform: translatex(-100px);
  83. opacity: 0;
  84. }
  85. to {
  86. transform: translateX(0px);
  87. opacity: 100%;
  88. }
  89. }
  90. .source-badge {
  91. margin-left: calc(var(--margin) / 2);
  92. border-radius: var(--corner-radius-small);
  93. animation: 1s ease forwards source-slide-in;
  94. opacity: 0;
  95. will-change: opacity, transform;
  96. width: auto;
  97. height: 30px;
  98. display: flex;
  99. flex-direction: row;
  100. padding: 10px;
  101. img {
  102. width: auto;
  103. }
  104. .source-name {
  105. text-align: center;
  106. margin-top: auto;
  107. margin-bottom: auto;
  108. transition: all ease 0.3s 0s;
  109. width: 0;
  110. overflow: hidden;
  111. font-size: large;
  112. color: #FFF0;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. }
  119. .content * {
  120. max-width: 100%;
  121. }
  122. #floating-action-button {
  123. position: sticky;
  124. width: var(--floating-button-size);
  125. height: var(--floating-button-size);
  126. left: 100%;
  127. bottom: var(--margin);
  128. margin-right: var(--margin);
  129. margin-top: var(--margin);
  130. z-index: 100;
  131. display: flex;
  132. flex-direction: row-reverse;
  133. background-color: rgba(0, 0, 0, 0.8);
  134. color: white;
  135. border-radius: calc(var(--floating-button-size));
  136. backdrop-filter: blur(10px);
  137. overflow: hidden;
  138. transition: all 0.3s;
  139. #button-home {
  140. position: relative;
  141. width: var(--floating-button-size);
  142. height: var(--floating-button-size);
  143. display: flex;
  144. flex-direction: row-reverse;
  145. overflow: hidden;
  146. img {
  147. width: calc(var(--floating-button-size) - var(--margin) * 2);
  148. height: calc(var(--floating-button-size) - var(--margin) * 2);
  149. margin: var(--margin);
  150. }
  151. span {
  152. color: rgba(255, 255, 255, 0);
  153. font-size: 1.2em;
  154. margin-top: auto;
  155. margin-bottom: auto;
  156. transition: all 0.25s;
  157. }
  158. #icon-filled {
  159. position: absolute;
  160. z-index: 101;
  161. opacity: 0;
  162. transition: all 0.1s;
  163. }
  164. }
  165. #copyright-notice {
  166. display: none;
  167. }
  168. &[data-state="docked"] {
  169. width: calc(100% - 2 * var(--margin));
  170. border-radius: var(--corner-radius-small);
  171. @keyframes copyright-notice-appearance {
  172. 0% {
  173. transform: translateX(-10px);
  174. opacity: 0;
  175. letter-spacing: 0;
  176. }
  177. 100% {
  178. transform: translateX(0px);
  179. opacity: 1;
  180. letter-spacing: 0.1px;
  181. }
  182. }
  183. #copyright-notice {
  184. position: relative;
  185. display: block;
  186. margin: auto auto auto var(--margin);
  187. font-size: large;
  188. font-weight: 400;
  189. left: 0;
  190. animation: ease 0.5s forwards copyright-notice-appearance;
  191. animation-delay: 0.3s;
  192. opacity: 0;
  193. }
  194. }
  195. }
  196. @media screen and (any-hover: hover) {
  197. #banner-container:hover {
  198. #banner-background {
  199. top: calc(-1 * var(--margin)) !important;
  200. left: calc(-1 * var(--margin)) !important;
  201. width: calc(100% + var(--margin) * 2) !important;
  202. height: calc(100% + var(--margin) * 2) !important;
  203. filter: blur(7px) !important;
  204. }
  205. #icon {
  206. border-radius: var(--corner-radius-small) !important;
  207. }
  208. #group-right {
  209. #name {
  210. letter-spacing: 1.5px !important;
  211. }
  212. #description {
  213. padding-top: calc(var(--margin) / 2) !important;
  214. padding-bottom: calc(var(--margin) / 2) !important;
  215. }
  216. .source-badge:hover .source-name {
  217. width: 100px !important;
  218. color: #FFF !important;
  219. }
  220. }
  221. }
  222. #floating-action-button[data-state="floating"]:hover {
  223. border-radius: var(--corner-radius-small);
  224. width: calc(var(--floating-button-size) + 1.2em * 4);
  225. #button-home {
  226. width: calc(var(--floating-button-size) + 1.2em * 4);
  227. span {
  228. color: white;
  229. transition: all 1s;
  230. }
  231. }
  232. }
  233. #button-home:hover #icon-filled{
  234. opacity: 1 !important;
  235. }
  236. }
  237. @media screen and (max-width: 700px) {
  238. #banner-container {
  239. --the-width: calc((min(var(--top-level-card-max-width), 100vw) - 2 * var(--margin)) / 2);
  240. margin-top: calc(var(--margin) + var(--the-width) / 2);
  241. #header-content {
  242. flex-direction: column;
  243. align-items: center;
  244. padding-top: calc(var(--the-width) / 2 - var(--margin));
  245. &::after {
  246. content: "";
  247. display: block;
  248. background-color: var(--color-shadow);
  249. position: absolute;
  250. width: calc(var(--the-width) + var(--margin));
  251. height: calc(var(--the-width) + var(--margin));
  252. align-self: center;
  253. top: calc(var(--the-width) / -2);
  254. border-radius: var(--corner-radius-big);
  255. filter: blur(10px);
  256. transition: filter .1s ease;
  257. z-index: -100;
  258. }
  259. #icon {
  260. width: var(--the-width);
  261. position: absolute;
  262. top: calc(var(--the-width) / -2);
  263. }
  264. #group-right {
  265. width: 100%;
  266. align-items: center;
  267. #name, #description {
  268. width: 100%;
  269. text-align: center;
  270. }
  271. }
  272. }
  273. }
  274. }