Skip to content

Conversation

@chrishutchinson
Copy link
Contributor

@chrishutchinson chrishutchinson commented Nov 24, 2017

This PR adds:

  • A Node.js script for generating a static index.html file, which we can host on GitHub pages
  • Removes the "Latest additions" from the README in favour of the static site
  • Adds some necessary babel config

screen shot 2017-11-24 at 15 02 21

@basilesimon
Copy link
Contributor

Aside from the technicalities, and I hate to be that guy, but are you going to have some of this designed at all, @chrishutchinson? It looks odd to me, like with a few things slightly off.

@chrishutchinson
Copy link
Contributor Author

@basilesimon Agree entirely. I will be putting it past Matt M as we did with the data vis catalogue before merging and releasing, but wanted overall agreement from the team on the tech side first

Copy link
Contributor

@elliotdavies elliotdavies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approach looks great to me

@@ -0,0 +1,84 @@
const React = require("react");
const ReactMarkdown = require("react-markdown");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we've discussed as a team what our default prettier settings should be – the EB version (i.e. single quotes, trailing commas) or the tool defaults? Either way we should maybe add a .pretterrc to this repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I totally meant to add one - I'll do that

const ReactMarkdown = require("react-markdown");

const capitalise = string => {
if (string === "aws") return string.toUpperCase();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In terms of future-proofing, this could be an array of names?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout, will do

@@ -0,0 +1,19 @@
<html>
<head>
<title>Learning!</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

‼️

name: a,
content,
headline: content.match(/# \[(.*?)\]/)[1],
dateAdded: fs.statSync(`${path}${a}`).birthtime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

birthtime 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed the most appropriate from this list

if (diff === 0) return diff;
return diff > 0 ? -1 : 1;
})
.splice(0, 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine, honestly, but technically splice is a mutation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, I think I meant slice

@@ -0,0 +1,282 @@
html {
font-size: 62.5%;
text-rendering: optimizeLegibility;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this? Looks cool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I googled the best way to do full cross browser font smoothing. I suspect this covers a weird Windows case or something similar

div.wrapper {
}

@media screen and (min-width: 737px) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same media query as the one above?

display: block;
border-radius: 4px;
box-shadow: 0px 1px 1px #888;
}
Copy link
Contributor

@elliotdavies elliotdavies Nov 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth using SASS in this file, I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - I didn't really want to have to build a whole SASS thing, but now I've written it I think it's worth the investment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants