From b99a06f18a24ac89d57a03d50ab3e5f7fca25e7a Mon Sep 17 00:00:00 2001 From: Xavier Damman Date: Tue, 30 Nov 2021 16:35:53 +0100 Subject: [PATCH] first commit --- .gitignore | 106 + LICENSE | 2 +- README.md | 3 + components/ErrorNotPublished.js | 16 + components/Footer.js | 24 + components/RenderGoogleDoc.js | 30 + components/TwitterEmbed.js | 10 + components/YouTubeEmbed.js | 26 + lib/googledoc.js | 170 + lib/lib.js | 20 + next.config.js | 39 + package-lock.json | 8437 ++++++++++++++++++++++++ package.json | 21 + pages/[googleDocId].js | 80 + pages/_app.js | 7 + pages/api/hello.js | 6 + pages/index.js | 45 + postcss.config.js | 34 + public/images/theweek-discord-logo.jpg | Bin 0 -> 587488 bytes public/images/theweek-favicon.jpg | Bin 0 -> 11343 bytes public/images/theweek-mirror-cover.png | Bin 0 -> 9782960 bytes public/images/theweek-screen.jpg | Bin 0 -> 85685 bytes sitemap.json | 9 + styles/Home.module.css | 0 styles/globals.css | 42 + styles/tailwind.css | 82 + tailwind.config.js | 12 + 27 files changed, 9220 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 components/ErrorNotPublished.js create mode 100644 components/Footer.js create mode 100644 components/RenderGoogleDoc.js create mode 100644 components/TwitterEmbed.js create mode 100644 components/YouTubeEmbed.js create mode 100644 lib/googledoc.js create mode 100644 lib/lib.js create mode 100644 next.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/[googleDocId].js create mode 100644 pages/_app.js create mode 100644 pages/api/hello.js create mode 100644 pages/index.js create mode 100644 postcss.config.js create mode 100755 public/images/theweek-discord-logo.jpg create mode 100755 public/images/theweek-favicon.jpg create mode 100755 public/images/theweek-mirror-cover.png create mode 100755 public/images/theweek-screen.jpg create mode 100644 sitemap.json create mode 100644 styles/Home.module.css create mode 100644 styles/globals.css create mode 100644 styles/tailwind.css create mode 100644 tailwind.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a500501 --- /dev/null +++ b/.gitignore @@ -0,0 +1,106 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and *not* Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +.vercel diff --git a/LICENSE b/LICENSE index fd1f20c..f044328 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 All for Climate +Copyright (c) 2020 Citizen Spring Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 0000000..34d0751 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +This is the code for the cryptoart.brussels website + +It uses [shared google docs](https://drive.google.com/drive/u/0/folders/10N_TlgG7xonuvjVIK8e0rhal8kBWc_GJ) to make it easy for anyone to contribute. diff --git a/components/ErrorNotPublished.js b/components/ErrorNotPublished.js new file mode 100644 index 0000000..d77cab0 --- /dev/null +++ b/components/ErrorNotPublished.js @@ -0,0 +1,16 @@ +const ErrorNotPublished = ({ googleDocId }) => ( +
+

This Google Doc hasn't been published yet by the author

+

+ + Open the document + {" "} + then go to the file menu and click on "Publish to the web". +

+
+); + +export default ErrorNotPublished; diff --git a/components/Footer.js b/components/Footer.js new file mode 100644 index 0000000..f8672b8 --- /dev/null +++ b/components/Footer.js @@ -0,0 +1,24 @@ +const Footer = ({ googleDocId }) => ( +
+
+ + The Week Logo + +
+
+ + Edit Page 📝 + +
+
+); + +export default Footer; diff --git a/components/RenderGoogleDoc.js b/components/RenderGoogleDoc.js new file mode 100644 index 0000000..3a084ca --- /dev/null +++ b/components/RenderGoogleDoc.js @@ -0,0 +1,30 @@ +import React from "react"; +import Image from "next/image"; +import ReactDOM from "react-dom"; + +class RenderGoogleDoc extends React.Component { + prepare(ref) { + if (!ref || !ref.querySelectorAll) return; + const images = Array.from(ref.querySelectorAll("img")); + images.forEach((img) => { + ReactDOM.render( + , + img.parentNode + ); + }); + } + + render() { + const { html } = this.props; + return ( +
+ ); + } +} + +export default RenderGoogleDoc; diff --git a/components/TwitterEmbed.js b/components/TwitterEmbed.js new file mode 100644 index 0000000..b198dc4 --- /dev/null +++ b/components/TwitterEmbed.js @@ -0,0 +1,10 @@ +export default ({ tweetUrl }) => { + return ( +
+
+ +
+ +
+ ); +}; diff --git a/components/YouTubeEmbed.js b/components/YouTubeEmbed.js new file mode 100644 index 0000000..6756e3d --- /dev/null +++ b/components/YouTubeEmbed.js @@ -0,0 +1,26 @@ +export default ({ id }) => { + return ( +
+