footer.scss 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. @use 'sass:map';
  2. // Max width of the sidebar
  3. $footer-width-delta: 320px;
  4. @mixin footer-container-up($bp) {
  5. $size: map.get($grid-breakpoints, $bp);
  6. @supports (container-type: inline-size) {
  7. @container fatfooter (width >= #{$size}) {
  8. @content;
  9. }
  10. }
  11. @supports not (container-type: inline-size) {
  12. @at-root {
  13. .project-ds-nav-page & {
  14. @media (min-width: #{$size + $footer-width-delta}) {
  15. @content;
  16. }
  17. }
  18. :not(.project-ds-nav-page *) & {
  19. @media (min-width: #{$size}) {
  20. @content;
  21. }
  22. }
  23. }
  24. }
  25. }
  26. @mixin footer-container-down($bp) {
  27. $size: map.get($grid-breakpoints, $bp);
  28. @supports (container-type: inline-size) {
  29. @container fatfooter (width < #{$size}) {
  30. @content;
  31. }
  32. }
  33. @supports not (container-type: inline-size) {
  34. @at-root {
  35. .project-ds-nav-page & {
  36. @media (max-width: #{$size + $footer-width-delta}) {
  37. @content;
  38. }
  39. }
  40. :not(.project-ds-nav-page *) & {
  41. @media (max-width: #{$size}) {
  42. @content;
  43. }
  44. }
  45. }
  46. }
  47. }
  48. footer.site-footer {
  49. --link-color: var(--link-web);
  50. --link-hover-color: var(--link-web-hover);
  51. --link-visited-color: var(--link-web-visited);
  52. --link-text-decoration: none;
  53. --link-hover-text-decoration: underline;
  54. background-color: var(--bg-light-primary);
  55. border-top: 1px solid var(--border-primary-dark);
  56. @include body-sm;
  57. min-height: $thin-footer-height;
  58. line-height: $thin-footer-height - 1; // Hack — in Chrome, using the full $footer-height would generate vertical scrolling
  59. ul.site-footer-items {
  60. list-style: none;
  61. margin: 0;
  62. > li {
  63. display: inline-block;
  64. margin: 0 var(--spacing-04);
  65. }
  66. i {
  67. font-size: var(--font-size-05);
  68. }
  69. }
  70. }
  71. .site-footer-content {
  72. @extend .container-fluid;
  73. }
  74. .sprite-icon-lang {
  75. display: inline-block;
  76. vertical-align: middle;
  77. }
  78. #language-picker-toggle {
  79. text-decoration: none;
  80. cursor: pointer;
  81. &::after {
  82. display: none;
  83. }
  84. &:hover {
  85. .language-picker-text {
  86. text-decoration: var(--link-hover-text-decoration);
  87. }
  88. }
  89. .material-symbols {
  90. vertical-align: -0.1875rem;
  91. }
  92. }
  93. .language-picker .dropdown-menu {
  94. .dropdown-item {
  95. &.active {
  96. color: var(--green-70);
  97. }
  98. &:hover {
  99. text-decoration: none;
  100. }
  101. }
  102. }
  103. .fat-footer {
  104. --link-color: var(--content-secondary-dark);
  105. --link-hover-color: var(--content-secondary-dark);
  106. --link-visited-color: var(--content-secondary-dark);
  107. --link-text-decoration: none;
  108. --link-hover-text-decoration: underline;
  109. container-name: fatfooter;
  110. container-type: inline-size;
  111. background: var(--bg-dark-primary);
  112. color: var(--content-secondary-dark);
  113. display: flex;
  114. flex-direction: column;
  115. .fat-footer-container {
  116. margin: var(--spacing-11) auto;
  117. @include footer-container-down(sm) {
  118. margin: var(--spacing-11) 0;
  119. }
  120. }
  121. .footer-brand-container {
  122. flex: 1;
  123. }
  124. .fat-footer-sections {
  125. display: grid;
  126. column-gap: var(--spacing-07);
  127. padding: 0 var(--spacing-07) var(--spacing-07);
  128. }
  129. .footer-brand {
  130. display: block;
  131. height: 37px;
  132. width: 130px;
  133. background-image: url('../../../../public/img/ol-brand/overleaf-white.svg');
  134. background-size: contain;
  135. background-repeat: no-repeat;
  136. background-position: left center;
  137. }
  138. .footer-section-heading {
  139. color: var(--content-secondary-dark);
  140. @include heading-sm;
  141. margin-bottom: var(--spacing-07);
  142. margin-top: var(--spacing-07);
  143. }
  144. .footer-section ul {
  145. @include body-sm;
  146. }
  147. .footer-section li {
  148. padding-bottom: var(--spacing-04);
  149. }
  150. #footer-brand {
  151. grid-column: 1/-1;
  152. margin-top: var(--spacing-07);
  153. }
  154. .fat-footer-base {
  155. color: var(--content-disabled);
  156. @include body-sm;
  157. #language-picker-toggle {
  158. color: var(--content-secondary-dark);
  159. }
  160. .fat-footer-base-meta a:not(.dropdown-toggle) {
  161. color: inherit;
  162. }
  163. .language-picker .dropdown-menu {
  164. .dropdown-header {
  165. display: none; /* hiding rather than removing as still needed in the thin footer */
  166. }
  167. }
  168. }
  169. .fat-footer-base-item {
  170. display: flex;
  171. white-space: nowrap;
  172. }
  173. @include footer-container-down(md) {
  174. .fat-footer-sections {
  175. grid-template-columns: repeat(2, 1fr);
  176. grid-template-rows: repeat(4, auto);
  177. }
  178. .fat-footer-base {
  179. display: flex;
  180. flex-direction: column;
  181. align-items: center;
  182. .fat-footer-base-section {
  183. display: flex;
  184. align-items: center;
  185. }
  186. .fat-footer-base-social {
  187. order: 1;
  188. }
  189. .fat-footer-base-meta {
  190. display: flex;
  191. flex-direction: column-reverse;
  192. align-items: center;
  193. order: 2;
  194. }
  195. .fat-footer-base-item {
  196. flex-wrap: wrap;
  197. padding: var(--spacing-02);
  198. margin: var(--spacing-06);
  199. }
  200. .fat-footer-base-meta .fat-footer-base-item {
  201. gap: var(--spacing-09);
  202. justify-content: center;
  203. @include footer-container-down(sm) {
  204. gap: var(--spacing-06);
  205. }
  206. }
  207. .fat-footer-base-social .fat-footer-base-item {
  208. gap: var(--spacing-07);
  209. margin-top: var(--spacing-00);
  210. }
  211. .fat-footer-social {
  212. @include heading-lg;
  213. }
  214. .fat-footer-base-copyright {
  215. order: 2;
  216. }
  217. }
  218. }
  219. @include footer-container-up(md) {
  220. .fat-footer-container {
  221. width: (map.get($grid-breakpoints, 'md') - ($spacing-04 * 2));
  222. }
  223. #footer-brand {
  224. grid-column: auto;
  225. grid-row: 1/-1;
  226. }
  227. .fat-footer-sections {
  228. grid-template-columns: repeat(4, 1fr);
  229. grid-template-rows: repeat(2, auto);
  230. }
  231. .footer-section:last-of-type {
  232. grid-column: 4;
  233. }
  234. .fat-footer-base {
  235. display: flex;
  236. justify-content: space-between;
  237. margin: var(--spacing-07) auto;
  238. .fat-footer-base-section {
  239. display: flex;
  240. align-items: center;
  241. }
  242. .fat-footer-base-item {
  243. padding: var(--spacing-02);
  244. margin: var(--spacing-02);
  245. }
  246. .fat-footer-base-meta .fat-footer-base-item {
  247. gap: var(--spacing-07);
  248. }
  249. .fat-footer-social {
  250. margin: var(--spacing-07) var(--spacing-02);
  251. @include heading-lg;
  252. }
  253. }
  254. }
  255. @include footer-container-up(lg) {
  256. .fat-footer-container {
  257. width: (map.get($grid-breakpoints, 'lg') - $spacing-07);
  258. }
  259. .fat-footer-sections {
  260. grid-template-columns: repeat(4, 1fr);
  261. }
  262. }
  263. @include footer-container-up(xl) {
  264. .fat-footer-container {
  265. width: (map.get($grid-breakpoints, 'xl') - $spacing-09);
  266. }
  267. .fat-footer-sections {
  268. grid-template-columns: repeat(6, 1fr);
  269. grid-template-rows: auto;
  270. }
  271. .footer-section:last-of-type {
  272. grid-column: 6;
  273. }
  274. }
  275. }
  276. .cookie-banner {
  277. @include body-sm;
  278. padding: var(--spacing-05) var(--spacing-07);
  279. position: fixed;
  280. bottom: 0;
  281. left: 0;
  282. right: 0;
  283. z-index: 100;
  284. color: var(--content-secondary);
  285. background: var(--bg-light-secondary);
  286. box-shadow: 0 -5px 8px 0 #0000001a;
  287. .cookie-banner-actions {
  288. padding-top: var(--spacing-04);
  289. }
  290. @include media-breakpoint-up(md) {
  291. align-items: center;
  292. display: flex;
  293. flex-wrap: wrap;
  294. .cookie-banner-content {
  295. flex: 1;
  296. }
  297. .cookie-banner-actions {
  298. flex-shrink: 0;
  299. white-space: nowrap;
  300. padding-top: var(--spacing-00);
  301. }
  302. }
  303. }
  304. .website-redesign-fat-footer,
  305. .website-redesign .fat-footer {
  306. .fat-footer-container {
  307. @include footer-container-down(sm) {
  308. margin: var(--spacing-11) 0;
  309. }
  310. }
  311. &.fat-footer {
  312. --link-color: var(--content-primary);
  313. --link-hover-color: var(--content-primary);
  314. --link-visited-color: var(--content-primary);
  315. background: var(--content-primary-dark);
  316. color: var(--content-primary);
  317. .footer-section-heading {
  318. color: var(--content-primary);
  319. }
  320. h2 {
  321. font-weight: 400;
  322. }
  323. .fat-footer-base {
  324. color: var(--content-primary);
  325. #language-picker-toggle {
  326. color: inherit;
  327. }
  328. }
  329. }
  330. .footer-brand {
  331. background-image: url('../../../../public/img/ol-brand/overleaf-black.svg');
  332. }
  333. @include footer-container-down(sm) {
  334. .fat-footer-sections {
  335. grid-template-columns: repeat(1, 1fr);
  336. grid-template-rows: repeat(6, auto);
  337. }
  338. }
  339. }