|
| 1 | +import React from "react"; |
| 2 | +import Link from "@docusaurus/Link"; |
| 3 | +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; |
| 4 | + |
| 5 | +function FooterLink({ item }) { |
| 6 | + const className = "footer__link-item"; |
| 7 | + |
| 8 | + return item.href ? ( |
| 9 | + <a className={className} href={item.href}> |
| 10 | + {item.label} |
| 11 | + </a> |
| 12 | + ) : ( |
| 13 | + <Link className={className} to={item.to}> |
| 14 | + {item.label} |
| 15 | + </Link> |
| 16 | + ); |
| 17 | +} |
| 18 | + |
| 19 | +export default function Footer() { |
| 20 | + const { siteConfig } = useDocusaurusContext(); |
| 21 | + const { links, copyright } = siteConfig.themeConfig.footer; |
| 22 | + |
| 23 | + return ( |
| 24 | + <footer className="footer"> |
| 25 | + <div className="container"> |
| 26 | + <div className="footer__links"> |
| 27 | + <div className="footer__col footer-brand"> |
| 28 | + <a className="footer-brand__wordmark" href="https://feascript.com" aria-label="FEAScript website"> |
| 29 | + <svg viewBox="14 79 242 242" aria-hidden="true"> |
| 30 | + <polygon points="17,254 190,82 253,317" fill="#d4aa00" /> |
| 31 | + </svg> |
| 32 | + <span> |
| 33 | + FEAScrip |
| 34 | + <svg className="wm-t" viewBox="0 0 30 115" fill="none" stroke="currentColor" aria-hidden="true"> |
| 35 | + <path strokeWidth="5.9" d="M15 0V100A11.4 11.4 0 0 0 26.4 111.4H29.5" /> |
| 36 | + <path strokeWidth="5.4" d="M0.4 16.9H29.6" /> |
| 37 | + </svg> |
| 38 | + </span> |
| 39 | + </a> |
| 40 | + <p className="footer-brand__tagline"> |
| 41 | + Finite element simulation in JavaScript, for the browser and Node.js. |
| 42 | + </p> |
| 43 | + <a className="footer-brand__email" href="mailto:info@feascript.com"> |
| 44 | + info@feascript.com |
| 45 | + </a> |
| 46 | + </div> |
| 47 | + {links.map((column) => ( |
| 48 | + <div className="footer__col" key={column.title}> |
| 49 | + <div className="footer__title">{column.title}</div> |
| 50 | + <ul className="footer__items"> |
| 51 | + {column.items.map((item) => ( |
| 52 | + <li key={item.label}> |
| 53 | + <FooterLink item={item} /> |
| 54 | + </li> |
| 55 | + ))} |
| 56 | + </ul> |
| 57 | + </div> |
| 58 | + ))} |
| 59 | + </div> |
| 60 | + <div className="footer__bottom"> |
| 61 | + <div className="footer__copyright" dangerouslySetInnerHTML={{ __html: copyright }} /> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </footer> |
| 65 | + ); |
| 66 | +} |
0 commit comments