footer.scss 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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. --footer-text-color: var(--content-secondary-dark);
  105. --footer-background-color: var(--bg-dark-primary);
  106. --link-color: var(--footer-text-color);
  107. --link-hover-color: var(--footer-text-color);
  108. --link-visited-color: var(--footer-text-color);
  109. --link-text-decoration: none;
  110. --link-hover-text-decoration: underline;
  111. container-name: fatfooter;
  112. container-type: inline-size;
  113. background: var(--footer-background-color);
  114. color: var(--footer-text-color);
  115. display: flex;
  116. flex-direction: column;
  117. .fat-footer-container {
  118. margin: var(--spacing-11) auto;
  119. @include footer-container-down(sm) {
  120. margin: var(--spacing-11) 0;
  121. }
  122. }
  123. .footer-brand-container {
  124. flex: 1;
  125. }
  126. .fat-footer-sections {
  127. display: grid;
  128. column-gap: var(--spacing-07);
  129. padding: 0 var(--spacing-07) var(--spacing-07);
  130. }
  131. .footer-brand {
  132. display: block;
  133. height: 37px;
  134. width: 130px;
  135. background-image: url('../../../../public/img/ol-brand/overleaf-white.svg');
  136. background-size: contain;
  137. background-repeat: no-repeat;
  138. background-position: left center;
  139. }
  140. .footer-section-heading {
  141. color: var(--footer-text-color);
  142. @include heading-sm;
  143. margin-bottom: var(--spacing-07);
  144. margin-top: var(--spacing-07);
  145. }
  146. .footer-section ul {
  147. @include body-sm;
  148. }
  149. .footer-section li {
  150. padding-bottom: var(--spacing-04);
  151. }
  152. #footer-brand {
  153. grid-column: 1/-1;
  154. margin-top: var(--spacing-07);
  155. }
  156. .fat-footer-base {
  157. color: var(--content-disabled);
  158. @include body-sm;
  159. #language-picker-toggle {
  160. color: var(--footer-text-color);
  161. }
  162. .fat-footer-base-meta a:not(.dropdown-toggle) {
  163. color: inherit;
  164. }
  165. .language-picker .dropdown-menu {
  166. .dropdown-header {
  167. display: none; /* hiding rather than removing as still needed in the thin footer */
  168. }
  169. }
  170. }
  171. .fat-footer-base-item {
  172. display: flex;
  173. white-space: nowrap;
  174. }
  175. .fat-footer-social {
  176. &.x-logo svg path {
  177. fill: var(--footer-text-color);
  178. }
  179. &.facebook-logo svg,
  180. &.linkedin-logo svg {
  181. path.background {
  182. fill: var(--footer-text-color);
  183. }
  184. }
  185. &.facebook-logo svg {
  186. path.text {
  187. fill: transparent;
  188. }
  189. }
  190. &.linkedin-logo svg {
  191. path.text {
  192. fill: var(--footer-background-color);
  193. }
  194. }
  195. }
  196. @include footer-container-down(md) {
  197. .fat-footer-sections {
  198. grid-template-columns: repeat(2, 1fr);
  199. grid-template-rows: repeat(4, auto);
  200. }
  201. .fat-footer-base {
  202. display: flex;
  203. flex-direction: column;
  204. align-items: center;
  205. .fat-footer-base-section {
  206. display: flex;
  207. align-items: center;
  208. }
  209. .fat-footer-base-social {
  210. order: 1;
  211. }
  212. .fat-footer-base-meta {
  213. display: flex;
  214. flex-direction: column-reverse;
  215. align-items: center;
  216. order: 2;
  217. }
  218. .fat-footer-base-item {
  219. flex-wrap: wrap;
  220. padding: var(--spacing-02);
  221. margin: var(--spacing-06);
  222. }
  223. .fat-footer-base-meta .fat-footer-base-item {
  224. gap: var(--spacing-09);
  225. justify-content: center;
  226. @include footer-container-down(sm) {
  227. gap: var(--spacing-06);
  228. }
  229. }
  230. .fat-footer-base-social .fat-footer-base-item {
  231. gap: var(--spacing-07);
  232. margin-top: var(--spacing-00);
  233. }
  234. .fat-footer-base-copyright {
  235. order: 2;
  236. }
  237. }
  238. }
  239. @include footer-container-up(md) {
  240. .fat-footer-container {
  241. width: (map.get($grid-breakpoints, 'md') - ($spacing-04 * 2));
  242. }
  243. #footer-brand {
  244. grid-column: auto;
  245. grid-row: 1/-1;
  246. }
  247. .fat-footer-sections {
  248. grid-template-columns: repeat(4, 1fr);
  249. grid-template-rows: repeat(2, auto);
  250. }
  251. .footer-section:last-of-type {
  252. grid-column: 4;
  253. }
  254. .fat-footer-base {
  255. display: flex;
  256. justify-content: space-between;
  257. margin: var(--spacing-07) auto;
  258. .fat-footer-base-section {
  259. display: flex;
  260. align-items: center;
  261. }
  262. .fat-footer-base-item {
  263. padding: var(--spacing-02);
  264. margin: var(--spacing-02);
  265. }
  266. .fat-footer-base-meta .fat-footer-base-item {
  267. gap: var(--spacing-07);
  268. }
  269. .fat-footer-social {
  270. margin: var(--spacing-07) var(--spacing-03);
  271. }
  272. }
  273. }
  274. @include footer-container-up(lg) {
  275. .fat-footer-container {
  276. width: (map.get($grid-breakpoints, 'lg') - $spacing-07);
  277. }
  278. .fat-footer-sections {
  279. grid-template-columns: repeat(4, 1fr);
  280. }
  281. }
  282. @include footer-container-up(xl) {
  283. .fat-footer-container {
  284. width: (map.get($grid-breakpoints, 'xl') - $spacing-09);
  285. }
  286. .fat-footer-sections {
  287. grid-template-columns: repeat(7, 1fr);
  288. grid-template-rows: auto;
  289. }
  290. .footer-section:last-of-type {
  291. grid-column: 7;
  292. }
  293. }
  294. }
  295. .cookie-banner {
  296. @include body-sm;
  297. padding: var(--spacing-05) var(--spacing-07);
  298. position: fixed;
  299. bottom: 0;
  300. left: 0;
  301. right: 0;
  302. z-index: 100;
  303. color: var(--content-secondary);
  304. background: var(--bg-light-secondary);
  305. box-shadow: 0 -5px 8px 0 #0000001a;
  306. .cookie-banner-actions {
  307. padding-top: var(--spacing-04);
  308. }
  309. @include media-breakpoint-up(md) {
  310. align-items: center;
  311. display: flex;
  312. flex-wrap: wrap;
  313. .cookie-banner-content {
  314. flex: 1;
  315. }
  316. .cookie-banner-actions {
  317. flex-shrink: 0;
  318. white-space: nowrap;
  319. padding-top: var(--spacing-00);
  320. }
  321. .cookie-banner-content a,
  322. .cookie-banner-actions .btn-link {
  323. color: var(--link-ui);
  324. }
  325. }
  326. }
  327. .website-redesign-fat-footer,
  328. .website-redesign .fat-footer {
  329. --footer-text-color: var(--content-primary);
  330. .fat-footer-container {
  331. @include footer-container-down(sm) {
  332. margin: var(--spacing-11) 0;
  333. }
  334. }
  335. &.fat-footer {
  336. background: var(--content-primary-dark);
  337. h2 {
  338. font-weight: 400;
  339. }
  340. .fat-footer-base {
  341. color: var(--content-primary);
  342. #language-picker-toggle {
  343. color: inherit;
  344. }
  345. }
  346. // This is duplication of fill colours in the SVGs themselves. This could be fixed by using :has() but that's not
  347. // supported in older versions of browsers and these logos need to be correct.
  348. .fat-footer-social {
  349. &.x-logo svg path {
  350. fill: #0f1419;
  351. }
  352. &.facebook-logo svg,
  353. &.linkedin-logo svg {
  354. path.text {
  355. fill: #fff;
  356. }
  357. }
  358. &.facebook-logo svg {
  359. path.background {
  360. fill: #0866ff;
  361. }
  362. }
  363. &.linkedin-logo svg {
  364. path.background {
  365. fill: #0b66c3;
  366. }
  367. }
  368. }
  369. }
  370. .footer-brand {
  371. background-image: url('../../../../public/img/ol-brand/overleaf-black.svg');
  372. }
  373. @include footer-container-down(sm) {
  374. .fat-footer-sections {
  375. grid-template-columns: repeat(1, 1fr);
  376. grid-template-rows: repeat(6, auto);
  377. }
  378. }
  379. }