From 40cddbd4e7fa6b93e07f740bb598a64bf2793e35 Mon Sep 17 00:00:00 2001 From: Grant Mathews Date: Sun, 16 Oct 2011 19:03:36 -0700 Subject: [PATCH] Add first cut at style guide. --- fancy.css | 107 ++++++++++++++++++++++++++++ gen.coffee | 22 ++++++ style-guide.html | 178 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 307 insertions(+) create mode 100644 fancy.css create mode 100644 gen.coffee create mode 100644 style-guide.html diff --git a/fancy.css b/fancy.css new file mode 100644 index 0000000..57f18ef --- /dev/null +++ b/fancy.css @@ -0,0 +1,107 @@ +a { + text-decoration: none; +} + +a:link { + color: #940; +} + +a:hover { + /*color: #fc3;*/ + color: #c60; +} + +a:visited { + color: #e91; +} + +input { + margin-left: auto; + margin-right: auto; +} + +textarea { + width: 40%; + height: 400px; + margin-left: auto; + margin-right: auto; + font-family: "Arial"; +} + +#rendered-content { + float: right; + width: 40%; + height: 400px; + margin-left: auto; + margin-right: auto; + font-family: "Arial"; +} + +.tagline { + text-align: center; + margin-top: -30px; + margin-bottom: 60px; +} + +.detail { + color: #333; + width: 40%; +} + +.date { + color: #aaa; + font-size: .8em; +} + +.blog-title { +} + +ol { + margin-left: 60px; + list-style-type: none; +} + +li { + margin-left: 10px; + margin-bottom: 15px; + padding-bottom: 15px; + width: 60%; + border-bottom: 1px solid #ddd; +} + +body { + font-family: "Helvetica Neue", "Lucida Grande", "Arial"; + padding-bottom: -20px; + padding-left: 10%; + padding-right: 10%; +} + +h1 { + text-shadow: 1px 2px 2px rgba(0,0,0,0.2); + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 4.1em; + font-weight: normal; + text-align: center; +} + +h2 { + font-family: Georgia, "Times New Roman", Times, serif; + font-weight: normal; + font-size: 2.2em; +} + +h3, h4 { + font-family: Georgia, "Times New Roman", Times, serif; + font-weight: normal; + margin-bottom: 0px; +} + + +footer { + text-align: center; + padding-left: 10%; + padding-right: 10%; + padding-top: 100px; + color: #777; + font-size: .8em; +} diff --git a/gen.coffee b/gen.coffee new file mode 100644 index 0000000..4136ca8 --- /dev/null +++ b/gen.coffee @@ -0,0 +1,22 @@ +fs = require 'fs' +converter = new (require 'showdown').Showdown.converter() + +contents = fs.readFileSync "entries/style", "UTF-8" +html = converter.makeHtml(contents) + +console.log " + + + + + + + johnfn's blog @ GitHub + + + + + + #{html} + +" diff --git a/style-guide.html b/style-guide.html new file mode 100644 index 0000000..7e1c727 --- /dev/null +++ b/style-guide.html @@ -0,0 +1,178 @@ + johnfn's blog @ GitHub

Style guide

+ +

I had big problems with style in the 106s. "What is this thing called style?!" I cried. "I came into CS because I liked how I could be sure I was absolutely right about something, and now you're telling me that I don't even had that?"

+ +

But I believe you can be absolutely right about style.

+ +

What is style?

+ +

Good style means: Your code is easy to understand, and it's easy to modify.

+ +

That's it! If you're not sure if something is stylistic, just ask yourself if it makes the code easier to understand and modify. If it is, it's more stylish :)

+ +

Stylistic problems

+ +