diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/feed.ts | 53 | ||||
-rw-r--r-- | lib/next_image.tsx | 19 | ||||
-rw-r--r-- | lib/theme.tsx | 55 |
3 files changed, 0 insertions, 127 deletions
diff --git a/lib/feed.ts b/lib/feed.ts deleted file mode 100644 index 25f7b30..0000000 --- a/lib/feed.ts +++ /dev/null @@ -1,53 +0,0 @@ -import fs from "fs"; -import { Feed } from "feed"; -import Publications from "../data/publications"; - -const generateRssFeed = async () => { - const siteURL = "https://www.sapka.me"; - const date = new Date(); - const author = { - name: "Michał M. Sapka", - email: "michal@sapka.pl", - link: "https://michal.sapka.pl", - }; - - const feed = new Feed({ - title: "Michał's publications", - description: "Michał Sapka's recent publications", - id: siteURL, - link: siteURL, - //image: `${siteURL}/logo.svg`, - //favicon: `${siteURL}/favicon.png`, - copyright: `All rights reserved ${date.getFullYear()}, Michał M. Sapka`, - updated: date, - generator: "Feed for Node.js", - feedLinks: { - rss2: `${siteURL}/rss/feed.xml`, - json: `${siteURL}/rss/feed.json`, - atom: `${siteURL}/rss/atom.xml`, - }, - author, - - }); - - Publications.forEach((post) => { - const url = post.url; - feed.addItem({ - title: post.title, - id: url, - link: url, - description: post.summary, - content: post.summary, - author: [author], - contributor: [author], - date: new Date(post.publishedAt), - }); - }); - - fs.mkdirSync("./public/rss", { recursive: true }); - fs.writeFileSync("./public/rss/feed.xml", feed.rss2()); - fs.writeFileSync("./public/rss/atom.xml", feed.atom1()); - fs.writeFileSync("./public/rss/feed.json", feed.json1()); -}; - -export default generateRssFeed diff --git a/lib/next_image.tsx b/lib/next_image.tsx deleted file mode 100644 index 6fb25bf..0000000 --- a/lib/next_image.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import NextImage from "next/image"; -import { chakra } from "@chakra-ui/react"; - -const Image = chakra(NextImage, { - baseStyle: { maxH: 120, maxW: 120 }, - shouldForwardProp: (prop) => - [ - "width", - "height", - "src", - "alt", - "quality", - "placeholder", - "blurDataURL", - "loader ", - ].includes(prop), -}); - -export default Image diff --git a/lib/theme.tsx b/lib/theme.tsx deleted file mode 100644 index e374a88..0000000 --- a/lib/theme.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { extendTheme ,type ThemeConfig } from "@chakra-ui/react" -import { mode } from '@chakra-ui/theme-tools' -import type { StyleFunctionProps } from '@chakra-ui/styled-system' - -const styles = { - global: (props : StyleFunctionProps) => ({ - body: { - bg: mode('#f8f8f2', '#282a36')(props), - color: mode('#282a36', '#f8f8f2')(props), - } - }) -} - -const components = { - Link: { - baseStyle: (props : StyleFunctionProps) => ({ - color: mode('#ff5555', '#bd93f9')(props), - - textUnderlineOffset: 3 - }), - variants: { - 'topnav-link': (props : StyleFunctionProps) => ({ - color: mode('#282a36', '#f8f8f2')(props), - textDecoration: "none" - }), - 'list-link': (props : StyleFunctionProps) => ({ - color: mode('#282a36', '#f8f8f2')(props), - textDecoration: "none" - }) - } - }, - Text: { - baseStyle: (_props : StyleFunctionProps) => ({ - textAlign: "justify", - }) - }, - Heading: { - variants: { - "section-title": { - pt: "10px", - pb: "10px", - fontSize: "1.5rem" - } - } - } -} - -const config: ThemeConfig = { - initialColorMode: 'light', - useSystemColorMode: false, -} - -const theme = extendTheme({ config, styles, components }) - -export default theme |