From 153e5a8fbe3d8f7897fa6ec0776766be7fc48b2e Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Fri, 5 Jun 2015 16:34:33 +0200 Subject: [PATCH] Environments, production build (fixes #3) * Use 'static' env for prod builds * Add build script * Ignore development build dir, remove it from Git --- .gitignore | 1 + build | 3 ++ {out => dist}/img/lagoon-close-02.jpg | Bin dist/index.html | 39 ++++++++++++++ {out => dist}/styles/style.css | 21 ++++++-- docpad.coffee | 6 ++- out/index.html | 72 -------------------------- src/render/index.html.eco | 18 ++++++- src/render/styles/style.css.scss | 23 ++++++-- 9 files changed, 99 insertions(+), 84 deletions(-) create mode 100755 build rename {out => dist}/img/lagoon-close-02.jpg (100%) create mode 100644 dist/index.html rename {out => dist}/styles/style.css (83%) delete mode 100644 out/index.html diff --git a/.gitignore b/.gitignore index 3c3629e..9209ef5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +out diff --git a/build b/build new file mode 100755 index 0000000..de83747 --- /dev/null +++ b/build @@ -0,0 +1,3 @@ +#!/bin/sh + +docpad generate --env static diff --git a/out/img/lagoon-close-02.jpg b/dist/img/lagoon-close-02.jpg similarity index 100% rename from out/img/lagoon-close-02.jpg rename to dist/img/lagoon-close-02.jpg diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..23bb2d3 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,39 @@ + + + + + Kosmos + + + + + + +
+

Kosmos

+

Open-source group communication for the 21st century

+ +
+ + + + diff --git a/out/styles/style.css b/dist/styles/style.css similarity index 83% rename from out/styles/style.css rename to dist/styles/style.css index 2f956cd..538c869 100644 --- a/out/styles/style.css +++ b/dist/styles/style.css @@ -16,11 +16,15 @@ body { background-repeat: no-repeat; color: #fff; font-family: Abel; - font-size: 18px; - text-rendering: optimizeLegibility; } + font-size: 24px; + text-rendering: optimizeLegibility; + text-align: center; } section#teaser { height: 100%; + width: 768px; + max-width: 95%; + margin: 0 auto; text-align: center; display: -webkit-box; display: -moz-box; @@ -73,11 +77,18 @@ section#teaser { flex-grow: 0; -ms-flex-positive: 0; } section#teaser h1 { - text-transform: uppercase; - font-size: 72px; + display: inline-block; + margin-bottom: 1rem; + font-size: 96px; font-family: Raleway; font-weight: 300; - margin-bottom: 1rem; } + text-transform: uppercase; } + section#teaser h2 { + margin-bottom: 4rem; + font-weight: 300; + font-size: 32px; } + section#teaser p { + margin-bottom: 2rem; } footer { position: absolute; diff --git a/docpad.coffee b/docpad.coffee index 49c67d1..9aaf09c 100644 --- a/docpad.coffee +++ b/docpad.coffee @@ -1,13 +1,15 @@ # DocPad Configuration File # http://docpad.org/docs/config -# Define the DocPad Configuration docpadConfig = { plugins: nodesass: outputStyle: 'nested' bourbon: true + + environments: + static: + outPath: 'dist' } -# Export the DocPad Configuration module.exports = docpadConfig diff --git a/out/index.html b/out/index.html deleted file mode 100644 index 95346ff..0000000 --- a/out/index.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - Kosmos - - - - - - -
-

Kosmos

-

Open-source group communication for the 21st century

-
- - - - diff --git a/src/render/index.html.eco b/src/render/index.html.eco index 8e0c98a..9de81af 100644 --- a/src/render/index.html.eco +++ b/src/render/index.html.eco @@ -6,5 +6,21 @@ isPage: true

<%= @document.title %>

-

Open-source group communication for the 21st century

+

Open-source group communication for the 21st century

+
diff --git a/src/render/styles/style.css.scss b/src/render/styles/style.css.scss index 4f02cbe..c93abbe 100644 --- a/src/render/styles/style.css.scss +++ b/src/render/styles/style.css.scss @@ -19,12 +19,16 @@ body { background-repeat: no-repeat; color: #fff; font-family: Abel; - font-size: 18px; + font-size: 24px; text-rendering: optimizeLegibility; + text-align: center; } section#teaser { height: 100%; + width: 768px; + max-width: 95%; + margin: 0 auto; text-align: center; @include display(flex); @@ -36,11 +40,22 @@ section#teaser { @include flex-grow(0); h1 { - text-transform: uppercase; - font-size: 72px; + display: inline-block; + margin-bottom: 1rem; + font-size: 96px; font-family: Raleway; font-weight: 300; - margin-bottom: 1rem; + text-transform: uppercase; + } + + h2 { + margin-bottom: 4rem; + font-weight: 300; + font-size: 32px; + } + + p { + margin-bottom: 2rem; } }