Skip to content

Instantly share code, notes, and snippets.

@reneruiz
Last active January 24, 2016 02:34
Show Gist options
  • Save reneruiz/f0b30c63b53301883ab8 to your computer and use it in GitHub Desktop.
Save reneruiz/f0b30c63b53301883ab8 to your computer and use it in GitHub Desktop.
Middleman config: Gemfile, config.rb, compiled CSS
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */ }
/**
* Remove default margin.
*/
body {
margin: 0; }
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block; }
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */ }
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0; }
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none; }
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent; }
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0; }
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted; }
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold; }
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic; }
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0; }
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000; }
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%; }
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sup {
top: -0.5em; }
sub {
bottom: -0.25em; }
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0; }
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden; }
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px; }
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0; }
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto; }
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em; }
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit;
/* 1 */
font: inherit;
/* 2 */
margin: 0;
/* 3 */ }
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible; }
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none; }
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
/* 2 */
cursor: pointer;
/* 3 */ }
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default; }
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0; }
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal; }
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto; }
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield;
/* 1 */
/* 2 */
box-sizing: content-box; }
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; }
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em; }
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0;
/* 1 */
padding: 0;
/* 2 */ }
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto; }
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold; }
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0; }
td,
th {
padding: 0; }
button, input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: #1565c0;
border: 0;
border-radius: 3px;
color: #fff;
cursor: pointer;
display: inline-block;
font-family: "freight-sans-pro", sans-serif;
font-size: 1.25rem;
-webkit-font-smoothing: antialiased;
font-weight: 600;
line-height: 1;
padding: 0.75em 1.5em;
text-decoration: none;
transition: background-color 150ms ease;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
vertical-align: middle;
white-space: nowrap; }
button:hover, button:focus, input[type="button"]:hover, input[type="button"]:focus, input[type="reset"]:hover, input[type="reset"]:focus, input[type="submit"]:hover, input[type="submit"]:focus {
background-color: #11519a;
color: #fff; }
button:disabled, input[type="button"]:disabled, input[type="reset"]:disabled, input[type="submit"]:disabled {
cursor: not-allowed;
opacity: 0.5; }
button:disabled:hover, input[type="button"]:disabled:hover, input[type="reset"]:disabled:hover, input[type="submit"]:disabled:hover {
background-color: #1565c0; }
fieldset {
background-color: transparent;
border: 0;
margin: 0;
padding: 0; }
legend {
font-weight: 600;
margin-bottom: 0.375em;
padding: 0; }
label {
display: block;
font-weight: 600;
margin-bottom: 0.375em; }
input,
select {
display: block;
font-family: "freight-sans-pro", sans-serif;
font-size: 1.25rem; }
input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"], input:not([type]), textarea,
select[multiple] {
background-color: #f1f1f1;
border: 1px solid #ddd;
border-radius: 3px;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
box-sizing: border-box;
font-family: "freight-sans-pro", sans-serif;
font-size: 1.25rem;
margin-bottom: 0.75em;
padding: 0.5em;
transition: border-color 150ms ease;
width: 100%; }
input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="email"]:hover, input[type="month"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="time"]:hover, input[type="url"]:hover, input[type="week"]:hover, input:not([type]):hover, textarea:hover,
select[multiple]:hover {
border-color: #b1b1b1; }
input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus, input:not([type]):focus, textarea:focus,
select[multiple]:focus {
border-color: #1565c0;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 5px rgba(18, 89, 169, 0.7);
outline: none; }
input[type="color"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="email"]:disabled, input[type="month"]:disabled, input[type="number"]:disabled, input[type="password"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="text"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="week"]:disabled, input:not([type]):disabled, textarea:disabled,
select[multiple]:disabled {
background-color: #e5e5e5;
cursor: not-allowed; }
input[type="color"]:disabled:hover, input[type="date"]:disabled:hover, input[type="datetime"]:disabled:hover, input[type="datetime-local"]:disabled:hover, input[type="email"]:disabled:hover, input[type="month"]:disabled:hover, input[type="number"]:disabled:hover, input[type="password"]:disabled:hover, input[type="search"]:disabled:hover, input[type="tel"]:disabled:hover, input[type="text"]:disabled:hover, input[type="time"]:disabled:hover, input[type="url"]:disabled:hover, input[type="week"]:disabled:hover, input:not([type]):disabled:hover, textarea:disabled:hover,
select[multiple]:disabled:hover {
border: 1px solid #ddd; }
textarea {
resize: vertical; }
[type="search"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
[type="checkbox"],
[type="radio"] {
display: inline;
margin-right: 0.375em; }
[type="file"] {
margin-bottom: 0.75em;
width: 100%; }
select {
margin-bottom: 1.5em;
max-width: 100%;
width: auto; }
ul,
ol {
list-style-type: none;
margin: 0;
padding: 0; }
dl {
margin-bottom: 0.75em; }
dl dt {
font-weight: 600;
margin-top: 0.75em; }
dl dd {
margin: 0; }
body {
color: #030303;
font-family: "freight-sans-pro", sans-serif;
font-size: 1.25rem;
line-height: 1.5; }
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "proxima-nova-soft", sans-serif;
font-size: 1.25rem;
line-height: 1.2;
margin: 0.75em 0; }
p {
margin: 0 0 0.75em; }
a {
color: #f1f1f1;
text-decoration: none;
transition: color 150ms ease; }
a:active, a:focus, a:hover {
color: white; }
hr {
border-bottom: 1px solid #ddd;
border-left: 0;
border-right: 0;
border-top: 0;
margin: 1.5em 0; }
img,
picture {
margin: 0;
max-width: 100%; }
html {
box-sizing: border-box; }
*, *::after, *::before {
box-sizing: inherit; }
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-color: #f1f1f1;
color: #030303;
position: relative; }
body.index::after {
background-color: rgba(255, 255, 255, 0);
background-image: linear-gradient(to bottom,rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.75) 100%);
position: fixed;
bottom: 0;
right: 0;
left: 0;
z-index: 2;
content: '';
display: block;
height: 200px;
opacity: .1;
pointer-events: none; }
blockquote {
font-style: italic; }
.article-header {
background-color: #030303;
color: #f1f1f1; }
.page-header {
padding: 10rem 6rem;
background-color: #030303;
color: #f1f1f1; }
.nav {
margin-bottom: 2rem; }
.return-home:hover {
color: #3c3c3c; }
.index .article-header:not(:last-of-type) {
margin-bottom: 12rem; }
.article-title {
font-size: 3rem;
font-weight: normal; }
.article-permalink:hover {
color: #3c3c3c; }
.article-date {
color: #999;
font-size: 1.25rem; }
.article-body {
padding: 6rem;
font-size: 2rem; }
.container {
margin: auto;
max-width: 40rem; }
/**
* Syntax highlighting
* Colors from SublimeText theme "Spacegray"
* https://github.com/kkga/spacegray
*/
.highlight {
background-color: #343d46;
color: white;
font-family: "source-code-pro", monospace;
font-size: 1rem;
line-height: 1.5;
/* Comment */
/* Error */
/* Keyword */
/* Literal */
/* Name */
/* Operator */
/* Punctuation */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Emph */
/* Generic.Strong */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Namespace */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Date */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Decorator */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Label */
/* Name.Namespace */
/* Name.Other */
/* Name.Property */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */ }
.highlight .gl {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 0 5px;
overflow: hidden; }
.highlight .gutter {
width: 1.25rem; }
.highlight .code {
padding-right: 0.5rem;
padding-left: 0.5rem; }
.highlight .hll {
background-color: #343d46; }
.highlight .c {
color: #65737e; }
.highlight .err {
color: #ffffff;
background-color: #ca858d; }
.highlight .k {
color: #b48ead; }
.highlight .l {
color: #d08770; }
.highlight .n {
color: #8FA1B3; }
.highlight .o {
color: #c0c5ce; }
.highlight .p {
color: #8FA1B3; }
.highlight .cm {
color: #65737e; }
.highlight .cp {
color: #65737e; }
.highlight .c1 {
color: #65737e; }
.highlight .cs {
color: #65737e; }
.highlight .ge {
font-style: italic; }
.highlight .gs {
font-weight: bold; }
.highlight .kc {
color: #b48ead; }
.highlight .kd {
color: #b48ead; }
.highlight .kn {
color: #c0c5ce; }
.highlight .kp {
color: #b48ead; }
.highlight .kr {
color: #b48ead; }
.highlight .kt {
color: #b48ead; }
.highlight .ld {
color: #a3be8c; }
.highlight .m {
color: #d08770; }
.highlight .s {
color: #a3be8c; }
.highlight .na {
color: #d08770; }
.highlight .nb {
color: #8FA1B3; }
.highlight .nc {
color: #ebcb8b; }
.highlight .no {
color: #b48ead; }
.highlight .nd {
color: #ebcb8b; }
.highlight .ni {
color: #8FA1B3; }
.highlight .ne {
color: #ebcb8b; }
.highlight .nf {
color: #ebcb8b; }
.highlight .nl {
color: #8FA1B3; }
.highlight .nn {
color: #8FA1B3; }
.highlight .nx {
color: #C0C5CE; }
.highlight .py {
color: #8FA1B3; }
.highlight .nt {
color: #bf616a; }
.highlight .nv {
color: #8FA1B3; }
.highlight .ow {
color: #c0c5ce; }
.highlight .w {
color: #8FA1B3; }
.highlight .mf {
color: #d08770; }
.highlight .mh {
color: #d08770; }
.highlight .mi {
color: #d08770; }
.highlight .mo {
color: #d08770; }
.highlight .sb {
color: #a3be8c; }
.highlight .sc {
color: #a3be8c; }
.highlight .sd {
color: #a3be8c; }
.highlight .s2 {
color: #a3be8c; }
.highlight .se {
color: #d08770; }
.highlight .sh {
color: #a3be8c; }
.highlight .si {
color: #a3be8c; }
.highlight .sx {
color: #a3be8c; }
.highlight .sr {
color: #a3be8c; }
.highlight .s1 {
color: #a3be8c; }
.highlight .ss {
color: #a3be8c; }
.highlight .bp {
color: #8FA1B3; }
.highlight .vc {
color: #8FA1B3; }
.highlight .vg {
color: #8FA1B3; }
.highlight .vi {
color: #8FA1B3; }
.highlight .il {
color: #d08770; }
# Setup My Blog
activate :blog do |blog|
blog.paginate = false
blog.permalink = "{title}.html"
blog.sources = "articles/{title}.html"
blog.layout = "layouts/single_article"
end
# Use Pretty URLs
activate :directory_indexes
activate :autoprefixer do |config|
config.browsers = ['last 2 versions', 'ie >= 9']
end
# Use syntax highlighting
activate :syntax, :line_numbers => true
set :markdown_engine, :redcarpet
set :markdown, :fenced_code_blocks => true, :smartypants => true
set :relative_links, true
set :css_dir, "assets/stylesheets"
set :js_dir, "assets/javascripts"
set :images_dir, "assets/images"
set :fonts_dir, "assets/fonts"
set :layout, "layouts/application"
page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false
configure :development do
activate :livereload, livereload_css_target: "stylesheets/application.css"
end
configure :build do
# Use relative URLs
activate :relative_assets
activate :minify_css
activate :minify_javascript
end
activate :deploy do |deploy|
deploy.build_before = true
deploy.deploy_method = :git
end
# If you do not have OpenSSL installed, change
# the following line to use "http://"
source "https://rubygems.org"
gem "bourbon", "~> 4.2"
gem "middleman", "~> 4.0"
gem "middleman-autoprefixer", "~> 2.6"
gem "middleman-blog"
gem "middleman-deploy", "= 2.0.0.pre.alpha"
gem "middleman-livereload", "~> 3.4"
gem "middleman-syntax"
gem "middleman-sprockets", "= 4.0.0.rc.1"
gem "neat", "~> 1.7"
gem 'redcarpet', '~> 3.3', '>= 3.3.3'
# For feed.xml.builder
gem "builder", "~> 3.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment