ciam-layout.tsx 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import React, { FC, ReactNode } from 'react'
  2. import { Trans } from 'react-i18next'
  3. import * as eventTracking from '@/infrastructure/event-tracking'
  4. import dsLogo from '@/shared/svgs/digital-science.svg'
  5. type Props = { children: ReactNode }
  6. const CiamLayout: FC<Props> = ({ children }: Props) => (
  7. <div className="ciam-layout ciam-enabled">
  8. <header className="ciam-logo">
  9. <a href="/" className="brand overleaf-ds-logo ciam-image-link">
  10. <span className="visually-hidden">Overleaf</span>
  11. </a>
  12. </header>
  13. <div className="ciam-container">
  14. <main className="ciam-card" id="main-content">
  15. {children}
  16. <section className="ciam-card-footer">
  17. <hr className="ciam-card-separator" />
  18. <div className="ciam-footer-ds-logo">
  19. <a
  20. href="https://www.digital-science.com/"
  21. target="_blank"
  22. rel="noopener noreferrer"
  23. className="ciam-image-link"
  24. onClick={() =>
  25. eventTracking.sendMB('unified-access-footer-click', {
  26. product: 'overleaf',
  27. item: 'logo',
  28. destinationUrl: 'https://www.digital-science.com/',
  29. })
  30. }
  31. >
  32. <img src={dsLogo} alt="Digital Science — home" />
  33. </a>
  34. </div>
  35. <p>
  36. <Trans
  37. i18nKey="advancing_research_with"
  38. components={[
  39. // eslint-disable-next-line jsx-a11y/anchor-has-content,react/jsx-key
  40. <a
  41. href="https://www.overleaf.com/"
  42. target="_blank"
  43. rel="noopener noreferrer"
  44. onClick={() =>
  45. eventTracking.sendMB('unified-access-footer-click', {
  46. product: 'overleaf',
  47. item: 'overleaf',
  48. destinationUrl: 'https://www.overleaf.com/',
  49. })
  50. }
  51. />,
  52. // eslint-disable-next-line jsx-a11y/anchor-has-content,react/jsx-key
  53. <a
  54. href="https://www.papersapp.com/"
  55. target="_blank"
  56. rel="noopener noreferrer"
  57. onClick={() =>
  58. eventTracking.sendMB('unified-access-footer-click', {
  59. product: 'overleaf',
  60. item: 'papers',
  61. destinationUrl: 'https://www.papersapp.com/',
  62. })
  63. }
  64. />,
  65. ]}
  66. />
  67. </p>
  68. </section>
  69. </main>
  70. </div>
  71. <footer>
  72. <div className="footer-links">
  73. <a href="https://www.overleaf.com/legal#Privacy">Privacy</a>
  74. <a href="https://www.overleaf.com/legal#Terms">Terms</a>
  75. </div>
  76. </footer>
  77. </div>
  78. )
  79. export default CiamLayout