Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xdamman committed Nov 30, 2021
1 parent f62e2c6 commit b99a06f
Show file tree
Hide file tree
Showing 27 changed files with 9,220 additions and 1 deletion.
106 changes: 106 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions components/ErrorNotPublished.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const ErrorNotPublished = ({ googleDocId }) => (
<div className="mx-auto w-4/6">
<h2>This Google Doc hasn't been published yet by the author</h2>
<p>
<a
href={`https://docs.google.com/document/d/${googleDocId}/edit`}
target="_blank"
>
Open the document
</a>{" "}
then go to the file menu and click on "Publish to the web".
</p>
</div>
);

export default ErrorNotPublished;
24 changes: 24 additions & 0 deletions components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const Footer = ({ googleDocId }) => (
<div className="footer text-sm mt-8 border-t border-gray-300 flex flex-row justify-between items-center w-screen max-w-screen-md mx-auto p-3">
<div>
<a href="https://theweek.earth" target="_blank" rel="noopener noreferrer">
<img
src="/images/theweek-favicon.jpg"
alt="The Week Logo"
className="h-10 mx-0"
/>
</a>
</div>
<div>
<a
href={`https://docs.google.com/document/d/${googleDocId}/edit`}
target="_blank"
className="text-gray-600"
>
Edit Page 📝
</a>
</div>
</div>
);

export default Footer;
30 changes: 30 additions & 0 deletions components/RenderGoogleDoc.js
Original file line number Diff line number Diff line change
@@ -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(
<Image
src={img.src}
width={img.width}
height={img.height}
layout="intrinsic"
/>,
img.parentNode
);
});
}

render() {
const { html } = this.props;
return (
<div ref={this.prepare} dangerouslySetInnerHTML={{ __html: html }} />
);
}
}

export default RenderGoogleDoc;
10 changes: 10 additions & 0 deletions components/TwitterEmbed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default ({ tweetUrl }) => {
return (
<div className="tweet" style={{ maxWidth: "560px", margin: "0 auto" }}>
<blockquote className="twitter-tweet">
<a href={`${tweetUrl}?ref_src=twsrc%5Etfw`}></a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js"></script>
</div>
);
};
26 changes: 26 additions & 0 deletions components/YouTubeEmbed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export default ({ id }) => {
return (
<div
className="video full-width"
style={{
position: "relative",
paddingBottom: "56.25%" /* 16:9 */,
paddingTop: 0.25,
height: 0,
}}
>
<iframe
style={{
position: "absolute",
top: 0,
left: 0,
width: "100%",
height: "100%",
}}
src={`https://www.youtube.com/embed/${id}`}
frameBorder="0"
allowFullScreen
/>
</div>
);
};
Loading

0 comments on commit b99a06f

Please sign in to comment.