From 7ad954b24dfaa03c861db9740916a00a3f5ab031 Mon Sep 17 00:00:00 2001 From: William Felker Date: Thu, 27 Oct 2022 20:49:53 +0000 Subject: [PATCH] updates! --- .nova/Configuration.json | 3 +- cache/cache.js | 17 + components/Footer.tsx | 125 +- components/Header.tsx | 6 +- components/Layout.tsx | 2 +- components/Term.tsx | 2 +- package-lock.json | 2 +- package.json | 4 +- pages/_app.tsx | 77 + pages/api/search.ts | 14 + pages/index.tsx | 42 +- .../20220408154015_init/migration.sql | 6 +- .../20221016203150_yarn_dev/migration.sql | 6 +- public/fonts/Satoshi-Black.eot | Bin 0 -> 73352 bytes public/fonts/Satoshi-Black.ttf | Bin 0 -> 73176 bytes public/fonts/Satoshi-Black.woff | Bin 0 -> 30376 bytes public/fonts/Satoshi-Black.woff2 | Bin 0 -> 23484 bytes public/fonts/Satoshi-BlackItalic.eot | Bin 0 -> 75950 bytes public/fonts/Satoshi-BlackItalic.ttf | Bin 0 -> 75760 bytes public/fonts/Satoshi-BlackItalic.woff | Bin 0 -> 31364 bytes public/fonts/Satoshi-BlackItalic.woff2 | Bin 0 -> 24276 bytes public/fonts/Satoshi-Bold.eot | Bin 0 -> 73532 bytes public/fonts/Satoshi-Bold.ttf | Bin 0 -> 73368 bytes public/fonts/Satoshi-Bold.woff | Bin 0 -> 32972 bytes public/fonts/Satoshi-Bold.woff2 | Bin 0 -> 25328 bytes public/fonts/Satoshi-BoldItalic.eot | Bin 0 -> 76620 bytes public/fonts/Satoshi-BoldItalic.ttf | Bin 0 -> 76452 bytes public/fonts/Satoshi-BoldItalic.woff | Bin 0 -> 34336 bytes public/fonts/Satoshi-BoldItalic.woff2 | Bin 0 -> 26300 bytes public/fonts/Satoshi-Italic.eot | Bin 0 -> 76762 bytes public/fonts/Satoshi-Italic.ttf | Bin 0 -> 76604 bytes public/fonts/Satoshi-Italic.woff | Bin 0 -> 34336 bytes public/fonts/Satoshi-Italic.woff2 | Bin 0 -> 26456 bytes public/fonts/Satoshi-Light.eot | Bin 0 -> 71860 bytes public/fonts/Satoshi-Light.ttf | Bin 0 -> 71684 bytes public/fonts/Satoshi-Light.woff | Bin 0 -> 29276 bytes public/fonts/Satoshi-Light.woff2 | Bin 0 -> 22800 bytes public/fonts/Satoshi-LightItalic.eot | Bin 0 -> 75590 bytes public/fonts/Satoshi-LightItalic.ttf | Bin 0 -> 75400 bytes public/fonts/Satoshi-LightItalic.woff | Bin 0 -> 30336 bytes public/fonts/Satoshi-LightItalic.woff2 | Bin 0 -> 23408 bytes public/fonts/Satoshi-Medium.eot | Bin 0 -> 73934 bytes public/fonts/Satoshi-Medium.ttf | Bin 0 -> 73756 bytes public/fonts/Satoshi-Medium.woff | Bin 0 -> 33272 bytes public/fonts/Satoshi-Medium.woff2 | Bin 0 -> 25596 bytes public/fonts/Satoshi-MediumItalic.eot | Bin 0 -> 76888 bytes public/fonts/Satoshi-MediumItalic.ttf | Bin 0 -> 76696 bytes public/fonts/Satoshi-MediumItalic.woff | Bin 0 -> 34576 bytes public/fonts/Satoshi-MediumItalic.woff2 | Bin 0 -> 26696 bytes public/fonts/Satoshi-Regular.eot | Bin 0 -> 73634 bytes public/fonts/Satoshi-Regular.ttf | Bin 0 -> 73476 bytes public/fonts/Satoshi-Regular.woff | Bin 0 -> 33024 bytes public/fonts/Satoshi-Regular.woff2 | Bin 0 -> 25516 bytes public/fonts/Satoshi-Variable.eot | Bin 0 -> 127628 bytes public/fonts/Satoshi-Variable.ttf | Bin 0 -> 127420 bytes public/fonts/Satoshi-Variable.woff | Bin 0 -> 35160 bytes public/fonts/Satoshi-Variable.woff2 | Bin 0 -> 42588 bytes public/fonts/Satoshi-VariableItalic.eot | Bin 0 -> 129984 bytes public/fonts/Satoshi-VariableItalic.ttf | Bin 0 -> 129748 bytes public/fonts/Satoshi-VariableItalic.woff | Bin 0 -> 36472 bytes public/fonts/Satoshi-VariableItalic.woff2 | Bin 0 -> 43844 bytes styles/globals.css | 166 + tailwind.config.js | 25 +- yarn-error.log | 3155 +++++++++++ yarn.lock | 4599 +++++++++++------ 65 files changed, 6524 insertions(+), 1727 deletions(-) create mode 100644 cache/cache.js create mode 100644 pages/api/search.ts create mode 100644 public/fonts/Satoshi-Black.eot create mode 100644 public/fonts/Satoshi-Black.ttf create mode 100644 public/fonts/Satoshi-Black.woff create mode 100644 public/fonts/Satoshi-Black.woff2 create mode 100644 public/fonts/Satoshi-BlackItalic.eot create mode 100644 public/fonts/Satoshi-BlackItalic.ttf create mode 100644 public/fonts/Satoshi-BlackItalic.woff create mode 100644 public/fonts/Satoshi-BlackItalic.woff2 create mode 100644 public/fonts/Satoshi-Bold.eot create mode 100644 public/fonts/Satoshi-Bold.ttf create mode 100644 public/fonts/Satoshi-Bold.woff create mode 100644 public/fonts/Satoshi-Bold.woff2 create mode 100644 public/fonts/Satoshi-BoldItalic.eot create mode 100644 public/fonts/Satoshi-BoldItalic.ttf create mode 100644 public/fonts/Satoshi-BoldItalic.woff create mode 100644 public/fonts/Satoshi-BoldItalic.woff2 create mode 100644 public/fonts/Satoshi-Italic.eot create mode 100644 public/fonts/Satoshi-Italic.ttf create mode 100644 public/fonts/Satoshi-Italic.woff create mode 100644 public/fonts/Satoshi-Italic.woff2 create mode 100644 public/fonts/Satoshi-Light.eot create mode 100644 public/fonts/Satoshi-Light.ttf create mode 100644 public/fonts/Satoshi-Light.woff create mode 100644 public/fonts/Satoshi-Light.woff2 create mode 100644 public/fonts/Satoshi-LightItalic.eot create mode 100644 public/fonts/Satoshi-LightItalic.ttf create mode 100644 public/fonts/Satoshi-LightItalic.woff create mode 100644 public/fonts/Satoshi-LightItalic.woff2 create mode 100644 public/fonts/Satoshi-Medium.eot create mode 100644 public/fonts/Satoshi-Medium.ttf create mode 100644 public/fonts/Satoshi-Medium.woff create mode 100644 public/fonts/Satoshi-Medium.woff2 create mode 100644 public/fonts/Satoshi-MediumItalic.eot create mode 100644 public/fonts/Satoshi-MediumItalic.ttf create mode 100644 public/fonts/Satoshi-MediumItalic.woff create mode 100644 public/fonts/Satoshi-MediumItalic.woff2 create mode 100644 public/fonts/Satoshi-Regular.eot create mode 100644 public/fonts/Satoshi-Regular.ttf create mode 100644 public/fonts/Satoshi-Regular.woff create mode 100644 public/fonts/Satoshi-Regular.woff2 create mode 100644 public/fonts/Satoshi-Variable.eot create mode 100644 public/fonts/Satoshi-Variable.ttf create mode 100644 public/fonts/Satoshi-Variable.woff create mode 100644 public/fonts/Satoshi-Variable.woff2 create mode 100644 public/fonts/Satoshi-VariableItalic.eot create mode 100644 public/fonts/Satoshi-VariableItalic.ttf create mode 100644 public/fonts/Satoshi-VariableItalic.woff create mode 100644 public/fonts/Satoshi-VariableItalic.woff2 create mode 100644 yarn-error.log diff --git a/.nova/Configuration.json b/.nova/Configuration.json index 8cd7ee0..0e9f5ec 100644 --- a/.nova/Configuration.json +++ b/.nova/Configuration.json @@ -1,4 +1,3 @@ { - "workspace.art_style" : 0, - "workspace.name" : "ClimateDictionary" + "workspace.name" : "Climate Glossery" } diff --git a/cache/cache.js b/cache/cache.js new file mode 100644 index 0000000..e873ea3 --- /dev/null +++ b/cache/cache.js @@ -0,0 +1,17 @@ +import fs from "fs"; +import { cachedPostData } from "@/lib/utils"; + +// First step +const blogContent = await cachedPostData("blog"); + +// Second step +function createBlogCache(filename) { + fs.writeFile(`./cache/${filename}.js`, blogContent, function (err) { + if (err) { + console.log(err); + } + console.log("Blog cache file written"); + }); +} + +createBlogCache("blog"); diff --git a/components/Footer.tsx b/components/Footer.tsx index bcdd82b..ba33637 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,60 +1,48 @@ import Link from "next/link"; const navigation = { main: [ + { + name: "about", + href: "https://madefor.earth/about", + }, + { + name: "support us", + href: "https://madefor.earth/support", + }, + { name: "work with us", - href: "https://github.com/orgs/tiny-factories/teams/made-for-earth", + href: "https://madefor.earth/work", }, { name: "newsletter", href: "https://buttondown.email/madeforearth" }, ], + contribute: [ + { + name: "Help Translate", + href: "https://glossary.madeforearth/translate", + }, + { name: "Add Term", href: "https://glossary.madeforearth/add" }, + { + name: "GitHub ↗", + href: "https://github.com/orgs/tiny-factories/teams/made-for-earth", + }, + ], social: [ { - name: "Tiny Garden", - href: "#", - icon: (props) => ( - - - - ), + name: "Twitter ↗", + href: "https://twitter.com/madeforearth1", }, { - name: "Twitter", - href: "#", - icon: (props) => ( - - - - ), + name: "Are.na ↗", + href: "https://www.are.na/made-for-earth", }, { - name: "GitHub", + name: "GitHub ↗", href: "https://github.com/tiny-factories/climate-dictionary", - icon: (props) => ( - - - - ), }, { - name: "Dribbble", + name: "Disscord ↗", href: "#", - icon: (props) => ( - - - - ), }, ], }; @@ -62,8 +50,61 @@ const navigation = { export default function Example() { return ( ); diff --git a/components/Header.tsx b/components/Header.tsx index dad5f3f..4816117 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -14,15 +14,15 @@ const Header: React.FC = () => {
- ClimateDictionary/ + Climate Glossary - - + */}
); diff --git a/components/Layout.tsx b/components/Layout.tsx index 409bd83..e6e212c 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -9,7 +9,7 @@ type Props = { const Layout: React.FC = (props) => (
-
{props.children}
+
{props.children}