diff --git a/pkg/timvir/core/components/Footer/Footer.tsx b/pkg/timvir/core/components/Footer/Footer.tsx index 32c426f78..11b2e0264 100644 --- a/pkg/timvir/core/components/Footer/Footer.tsx +++ b/pkg/timvir/core/components/Footer/Footer.tsx @@ -39,7 +39,7 @@ function Footer(props: Props, ref: React.ForwardedRef -
+
Built with Timvir
@@ -52,11 +52,11 @@ export default React.forwardRef(Footer); const classes = { root: css` padding: 50px 0 30px; - background: #20232a; - color: white; display: grid; gap: 50px; + + border-top: 1px solid var(--timvir-border-color); `, linkGroups: css` @@ -66,16 +66,13 @@ const classes = { `, linkGroupTitle: css` - text-transform: uppercase; - color: var(--timvir-secondary-text-color); - font-weight: 700; - letter-spacing: 0.08em; + font-weight: 600; margin-bottom: 12px; `, link: css` display: block; - color: white; + color: inherit; text-decoration: none; &:hover { color: var(--c-p-4); @@ -86,7 +83,7 @@ const classes = { color: var(--timvir-secondary-text-color); a { - color: currentColor; + color: inherit; text-decoration: none; background-image: linear-gradient(transparent, transparent 5px, #383838 5px, #383838); background-position: bottom; diff --git a/pkg/timvir/core/components/NavigationFooter/NavigationFooter.tsx b/pkg/timvir/core/components/NavigationFooter/NavigationFooter.tsx index a609acf06..908018fb1 100644 --- a/pkg/timvir/core/components/NavigationFooter/NavigationFooter.tsx +++ b/pkg/timvir/core/components/NavigationFooter/NavigationFooter.tsx @@ -1,6 +1,7 @@ import { css, cx } from "@linaria/core"; import * as React from "react"; import { useContext } from "timvir/context"; +import * as Icons from "react-feather"; /** * The underlying DOM element which is rendered by this component. @@ -21,77 +22,90 @@ interface Props extends React.ComponentPropsWithoutRef { } function NavigationFooter(props: Props, ref: React.ForwardedRef>) { + const { Link } = useContext(); + const { prev, next, className, ...rest } = props; return ( - +
* { - grid-column: lc / rc; + flex-direction: row; } - ` - )} - > -
-
- {prev && ( - <> - {prev.context || "/"} - {prev.label} - - )} -
-
- {next && ( + {prev && ( + + + Previous + + + + )} + {next && ( + <> - {next.context || "/"} - {next.label} + + Next + + - )} -
+ + )}
); @@ -99,33 +113,65 @@ function NavigationFooter(props: Props, ref: React.ForwardedRef { - const { Link } = useContext(); +function Label(props: { children: React.ReactNode }) { + return ( +
+ ); +} +function Context(props: { children?: React.ReactNode }) { return ( - - {children} - + {...props} + /> ); -}; +} + +const classes = { + root: css` + padding: 50px 0 80px; + + display: grid; -const SecondaryLabel = ({ children }: { children?: React.ReactNode }) => ( -
- {children} -
-); + grid-auto-rows: min-content; + grid-template-columns: [le] var(--timvir-page-margin) [lex lc] 1fr [rc rex] var(--timvir-page-margin) [re]; + + @media (min-width: 48rem) { + grid-template-columns: + [le] var(--timvir-page-margin) [lex] 1fr [lc] minmax(0, 48rem) [rc] 1fr [rex] var(--timvir-page-margin) + [re]; + } + + @media (min-width: 72rem) { + grid-template-columns: + [le] 1fr var(--timvir-page-margin) [lex] minmax(0, 12rem) [lc] 48rem [rc] minmax(0, 12rem) [rex] var( + --timvir-page-margin + ) + 1fr [re]; + } + + & > * { + grid-column: lc / rc; + } + `, +}; diff --git a/pkg/timvir/core/theme/index.ts b/pkg/timvir/core/theme/index.ts index 9d7ca0254..fdd8506f2 100644 --- a/pkg/timvir/core/theme/index.ts +++ b/pkg/timvir/core/theme/index.ts @@ -67,7 +67,7 @@ export const theme = css` --c-p-5: ${colors.green["500"]}; `; -function mkTheme(config: typeof themes[keyof typeof themes]) { +function mkTheme(config: (typeof themes)[keyof typeof themes]) { return ` --timvir-background-color: ${config.backgroundColor}; --timvir-text-color: ${config.textColor}; diff --git a/src/timvir/wrapper.tsx b/src/timvir/wrapper.tsx index 0013cc96b..369e5fdcd 100644 --- a/src/timvir/wrapper.tsx +++ b/src/timvir/wrapper.tsx @@ -2,7 +2,7 @@ import Link, { LinkProps } from "next/link"; import { useRouter } from "next/router"; import * as React from "react"; import { Code } from "timvir/blocks"; -import { Footer, Page } from "timvir/core"; +import { Page } from "timvir/core"; import { defaultSearch, Search } from "timvir/search"; import routes from "./routes"; import toc from "./toc"; @@ -29,27 +29,7 @@ export default function Wrapper({ children }: { children?: React.ReactNode }) { } return ( - ( -