Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blog #10

Merged
merged 1 commit into from Aug 10, 2019
Merged

Add blog #10

Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -0,0 +1,15 @@
.container {
display: flex;
justify-content: space-between;
margin-bottom: 1em;
}

.container a {
color: var(--primaryColor);
text-decoration: none;
font-size: 0.8em;
}

.container a:hover {
color: var(--hoverColor);
}
@@ -0,0 +1,48 @@
// External
import parse from "date-fns/parse";
import Link from "next/link";
import { withRouter } from "next/router";
import PropTypes from "prop-types";

// Data
import posts from "data/posts";

import styles from "./blog-nav.css";

const sortedPosts = posts
.filter(post => post.published)
// The `sort` method can be conveniently used with function expressions:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
.sort((a, b) => parse(b.date) - parse(a.date));

const BlogNav = props => {
const postIndex = sortedPosts.findIndex(
post => post.id === props.router.pathname.replace("/writing/", "")
);

const nextPost = sortedPosts[postIndex - 1];
const prevPost = sortedPosts[postIndex + 1];

return (
<div className={styles.container}>
{postIndex > 0 ? (
<Link href={`/writing/${nextPost.id}`}>
<a>&larr; {nextPost.title}</a>
</Link>
) : null}{" "}
{postIndex < sortedPosts.length - 1 ? (
<Link href={`/writing/${prevPost.id}`}>
<a>{prevPost.title} &rarr;</a>
</Link>
) : null}
</div>
);
};

BlogNav.propTypes = {
router: PropTypes.shape({
pathname: PropTypes.string.isRequired
}).isRequired
};

export default withRouter(BlogNav);
@@ -0,0 +1,56 @@
import classnames from "classnames";
import { distanceInWordsToNow, format } from "date-fns";
import PropTypes from "prop-types";

import BlogNav from "core/blog-nav";
import Footer from "core/footer";
import Head from "core/head";
import Nav from "core/nav";

const BlogPage = ({
children,
className,
dateTime,
description,
ogImage,
title,
url
}) => (
<div className={classnames("container", className)}>
<Head title={title} description={description} url={url} ogImage={ogImage} />
<Nav />

<article>
{children}
<p>
<time dateTime={dateTime}>
{format(dateTime, "MMMM Do, YYYY")}{distanceInWordsToNow(dateTime)}{" "}
ago
</time>
</p>
</article>

<BlogNav />
<Footer />
</div>
);

BlogPage.defaultProps = {
className: "",
description: "",
ogImage: "",
url: ""
};

BlogPage.propTypes = {
children: PropTypes.oneOfType([PropTypes.element, PropTypes.array])
.isRequired,
className: PropTypes.string,
dateTime: PropTypes.string.isRequired,
description: PropTypes.string,
ogImage: PropTypes.string,
title: PropTypes.string.isRequired,
url: PropTypes.string
};

export default BlogPage;
@@ -62,6 +62,7 @@ function PhotoStack() {
setTimeout(() => gone.clear() || set(i => to(i)), 600);
}
);

// Now we're just mapping the animated values to our view, that's it. Btw, this component only renders once. :-)
return props.map(({ x, y, rot, scale }, i) => (
<animated.div
@@ -1,3 +1,4 @@
/** @type {Array<{ id: string, date: string, published: boolean, title: string }>} */
const posts = [
{
id: "breathe",
@@ -1,109 +1,98 @@
import Page from "core/page";
import BlogPage from "core/blog-page";

export default () => (
<Page
className={"container"}
title={"3D Printing and the End of the Industrial Age"}
<BlogPage
dateTime="2012-08-13"
title="3D Printing and the End of the Industrial Age"
>
<article>
<header>
<h1>3D Printing and the End of the Industrial Age</h1>
</header>
<header>
<h1>3D Printing and the End of the Industrial Age</h1>
</header>

<p>
3D printing, or{" "}
<a href="http://en.wikipedia.org/wiki/3D_printing">
additive manufacturing
</a>
, has been{" "}
<a href="http://mashable.com/follow/search/?q=3d+printing&amp;commit=Search">
in the news
</a>{" "}
more and more lately, and for good reason. It’s allowing people to build
amazing things, such as a{" "}
<a href="http://mashable.com/2012/08/10/japanese-printing-live-fetus/">
3D replica of a live fetus
</a>
, or a{" "}
<a href="http://mashable.com/2012/08/03/3d-printed-magic-arms/">
robotic exoskeleton
</a>
. These are fantastic uses for this breakthrough technology.
</p>
<p>
If this is something you are extremely excited about, it’s possible to
buy one{" "}
<a href="http://www.ebay.com/sch/i.html?_nkw=3d+printer">right now</a>.
3D printers are relatively small and becoming more affordable every day,
so I don’t think it’s not too much of a stretch to say that there may be
a 3D printer in every household in the not-so-distant future. Here are a
few changes I think will come with this device as it becomes more
common.
</p>
<ol>
<li>
<strong>Materials can and will be purchased in bulk.</strong> Rather
than buying plates, cups, decorations, brackets, etc, we will be
capable of buying materials like plastic in bulk the same way we buy
paper and ink for printing. By always having these raw materials
available, we are only limited by the number of 3D models available
online. If you know how to use a 3D modeling program, you may not be
limited at all.
</li>
<li>
<strong>
Mass production of small items will be much less common, if not
entirely unnecessary.
</strong>{" "}
Instead of producing a million copies of a product and hoping they’ll
sell, household 3D printers allow for an on-demand system. As
consumers, we will no longer have to go to the store and hope they
have a particular item we want in stock. We can browse online and
print it ourselves, and even design it ourselves with the proper
training.
</li>
<li>
<strong>
3D printer-friendly digital models will become a big market.
</strong>{" "}
As mentioned above, a large online market will form around printable
3D models. There will be many open source models available, many of
them meeting the basic needs of individuals, such as a full dining
set.
</li>
<li>
<strong>It will be much easier to be a stop-motion hobbyist.</strong>{" "}
This one’s not for everyone, but 3D printers will most likely bring
about a big wave of aspiring animators. What level of animation can be
achieved with 3D printers? Watch Coraline and{" "}
<a href="http://images.businessweek.com/ss/09/04/0415_how_to_innovate/9.htm">
you’ll see
</a>
.
</li>
<li>
<strong>
Recycling materials within the household will become more common.
</strong>{" "}
Getting sick of your old decorations? Why not stick them back into
your 3D printer and create something new? Not only that, but if you
absolutely need a plate for a guest, you can stick anything you no
longer need of that particular material in it, and voilà!
</li>
</ol>
<p>
In the end, I believe the greatest change this technology will bring is
an end to most labor-intensive factory jobs. While the potential is
great, there are many issues that will need to be covered, such as{" "}
<a href="http://thenextweb.com/shareables/2012/07/26/the-worlds-first-3d-printed-gun-is-a-terrifying-thing/">
the creation of weaponry
<p>
3D printing, or{" "}
<a href="http://en.wikipedia.org/wiki/3D_printing">
additive manufacturing
</a>
, has been{" "}
<a href="http://mashable.com/follow/search/?q=3d+printing&amp;commit=Search">
in the news
</a>{" "}
more and more lately, and for good reason. It’s allowing people to build
amazing things, such as a{" "}
<a href="http://mashable.com/2012/08/10/japanese-printing-live-fetus/">
3D replica of a live fetus
</a>
, or a{" "}
<a href="http://mashable.com/2012/08/03/3d-printed-magic-arms/">
robotic exoskeleton
</a>
. These are fantastic uses for this breakthrough technology.
</p>
<p>
If this is something you are extremely excited about, it’s possible to buy
one <a href="http://www.ebay.com/sch/i.html?_nkw=3d+printer">right now</a>
. 3D printers are relatively small and becoming more affordable every day,
so I don’t think it’s not too much of a stretch to say that there may be a
3D printer in every household in the not-so-distant future. Here are a few
changes I think will come with this device as it becomes more common.
</p>
<ol>
<li>
<strong>Materials can and will be purchased in bulk.</strong> Rather
than buying plates, cups, decorations, brackets, etc, we will be capable
of buying materials like plastic in bulk the same way we buy paper and
ink for printing. By always having these raw materials available, we are
only limited by the number of 3D models available online. If you know
how to use a 3D modeling program, you may not be limited at all.
</li>
<li>
<strong>
Mass production of small items will be much less common, if not
entirely unnecessary.
</strong>{" "}
Instead of producing a million copies of a product and hoping they’ll
sell, household 3D printers allow for an on-demand system. As consumers,
we will no longer have to go to the store and hope they have a
particular item we want in stock. We can browse online and print it
ourselves, and even design it ourselves with the proper training.
</li>
<li>
<strong>
3D printer-friendly digital models will become a big market.
</strong>{" "}
As mentioned above, a large online market will form around printable 3D
models. There will be many open source models available, many of them
meeting the basic needs of individuals, such as a full dining set.
</li>
<li>
<strong>It will be much easier to be a stop-motion hobbyist.</strong>{" "}
This one’s not for everyone, but 3D printers will most likely bring
about a big wave of aspiring animators. What level of animation can be
achieved with 3D printers? Watch Coraline and{" "}
<a href="http://images.businessweek.com/ss/09/04/0415_how_to_innovate/9.htm">
you’ll see
</a>
. What do you think could be a potential use or misuse of 3D printing?
</p>
</article>

.
</li>
<li>
<strong>
Recycling materials within the household will become more common.
</strong>{" "}
Getting sick of your old decorations? Why not stick them back into your
3D printer and create something new? Not only that, but if you
absolutely need a plate for a guest, you can stick anything you no
longer need of that particular material in it, and voilà!
</li>
</ol>
<p>
<time dateTime="2012-08-13">August 13, 2012</time>
In the end, I believe the greatest change this technology will bring is an
end to most labor-intensive factory jobs. While the potential is great,
there are many issues that will need to be covered, such as{" "}
<a href="http://thenextweb.com/shareables/2012/07/26/the-worlds-first-3d-printed-gun-is-a-terrifying-thing/">
the creation of weaponry
</a>
. What do you think could be a potential use or misuse of 3D printing?
</p>
</Page>
</BlogPage>
);
@@ -1,30 +1,24 @@
import Page from "core/page";
import BlogPage from "core/blog-page";

export default () => (
<Page className={"container"} title={"Angry Birds Goes Nintendo"}>
<article>
<header>
<h1>Angry Birds Goes Nintendo</h1>
</header>
<BlogPage dateTime="2013-12-16" title="Angry Birds Goes Nintendo">
<header>
<h1>Angry Birds Goes Nintendo</h1>
</header>

<p>
Rovio just released{" "}
<a href="https://itunes.apple.com/us/app/angry-birds-go!/id642821482?mt=8">
Angry Birds Go!
</a>{" "}
for iOS, and I wonder if their decision to develop this had anything to
do with Nintendo saying they would never develop for mobile phones. The
longer Nintendo waits, the more chances other developers will have to
jump in and{" "}
<a href="https://itunes.apple.com/us/app/oceanhorn/id708196645?mt=8">
take their rupees
</a>
.
</p>

<p>
<time dateTime="2013-12-16">December 16, 2013</time>
</p>
</article>
</Page>
<p>
Rovio just released{" "}
<a href="https://itunes.apple.com/us/app/angry-birds-go!/id642821482?mt=8">
Angry Birds Go!
</a>{" "}
for iOS, and I wonder if their decision to develop this had anything to do
with Nintendo saying they would never develop for mobile phones. The
longer Nintendo waits, the more chances other developers will have to jump
in and{" "}
<a href="https://itunes.apple.com/us/app/oceanhorn/id708196645?mt=8">
take their rupees
</a>
.
</p>
</BlogPage>
);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.