diff --git a/.gitignore b/.gitignore index 288654e6..6ba60baf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,20 @@ -node_modules -data -locales -images/latex/source -components/sections/**/index.js -!components/sections/index.js +# nonsense files and dirs: .buildmark npm-debug.log +node_modules + +# the locale data is transient, and only used during build +locales + +# The latex source files are similarly transient +images/latex/source + +# each section's index.js is autogenerated and doesn't need to be checked in +components/sections/**/index.js + +# but NOT these two! These absolutely need checking in. +!components/sections/index.js +!components/sections/comments/index.js + # this gets to be here for as long as I've not figured out how to do the full surgery index.full.html diff --git a/components/sections/comments/index.js b/components/sections/comments/index.js new file mode 100644 index 00000000..c8b50248 --- /dev/null +++ b/components/sections/comments/index.js @@ -0,0 +1,43 @@ +var React = require("react"); + +var style = { + width: 'calc(960px + 2em)', + marginTop: 0, + borderTop: '1px solid rgba(255, 0, 0, 0.5)', + paddingTop: '3em' +}; + +var sectionHTML = ( +
+

Comments and questions

+ +

If you enjoyed this book, or you simply found it useful for something you were trying to + get done, and you were wondering how to let me know you appreciated this book, you can + always buy me a coffee, however much a coffee is where you live. This work has grown over the + years, from a small primer to a 70ish print-page-equivalent reader on the subject of Bézier + curves, and a lot of coffee went into the making of it. I don't regret a minute I spent +on writing it, but I can always do with some more coffee to keep on writing!

+ +
+
+); + +var CommentsAndQuestions = React.createClass({ + getDefaultProps: function() { + return { + title: "Comments and Questions" + }; + }, + componentDidMount: function() { + if (typeof document !== "undefined") { + var disqusScript = document.createElement("script"); + disqusScript.setAttribute("async", "async"); + disqusScript.src = "lib/site/disqus.js"; + document.head.appendChild(disqusScript); + } + }, + render: function() { return sectionHTML; } +}); + +module.exports = CommentsAndQuestions;