diff --git a/_components/headings.html b/_components/headings.html new file mode 100644 index 0000000..dee8b1d --- /dev/null +++ b/_components/headings.html @@ -0,0 +1,9 @@ +--- +title: "Headings" +type: headings +usage: +--- + +

Heading 1

+

Heading 2

+

Heading 3

diff --git a/_includes/component-color.html b/_includes/component-color.html index 38e5b28..5c1d67f 100644 --- a/_includes/component-color.html +++ b/_includes/component-color.html @@ -1,11 +1,11 @@

{{ entry.title }}

- {% if entry.usage %}

Usage: {{ entry.usage }}

{% endif %} + {% if entry.usage %}

{{ entry.usage }}

{% endif %}
-
-
+
+
{{ entry.content }}
diff --git a/_includes/component.html b/_includes/component.html index cb1b223..8948577 100644 --- a/_includes/component.html +++ b/_includes/component.html @@ -1,7 +1,7 @@

{{ entry.title }}

- {% if entry.usage %}

Usage: {{ entry.usage }}

{% endif %} + {% if entry.usage %}

{{ entry.usage }}

{% endif %}
diff --git a/package.json b/package.json index b41dde4..ccbae55 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "prefix": "postcss --use autoprefixer -b 'last 3 versions' --output dist/css/main.min.css dist/css/main.min.css", "sass:dist": "node-sass --output-style compressed src/scss/main.scss dist/css/main.min.css", "sass": "npm run sass:dist", - "font": "mkdir -p dist/fonts && cp -R src/fonts/ dist/fonts/", + "font": "mkdir -p dist/fonts && cp -R src/fonts/ dist/", "imagemin": "imagemin src/images/* _site/dist/images/ -p", "build:jekyll": "jekyll build --config _config.yml", "build:js": "npm run eslint && npm run uglify", diff --git a/src/scss/_code-highlight.scss b/src/scss/_code-highlight.scss new file mode 100644 index 0000000..a26ded8 --- /dev/null +++ b/src/scss/_code-highlight.scss @@ -0,0 +1,65 @@ +figure.highlight { background-color: #333333; color: #f8f8f2; } /* Code background, plain text */ +figure.highlight .hll { background-color: #49483e } +figure.highlight .c { color: #75715e } /* Comment */ +figure.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ +figure.highlight .k { color: #66d9ef } /* Keyword */ +figure.highlight .l { color: #ae81ff } /* Literal */ +figure.highlight .n { color: #f8f8f2 } /* Name */ +figure.highlight .o { color: #f92672 } /* Operator */ +figure.highlight .p { color: #f8f8f2 } /* Punctuation */ +figure.highlight .cm { color: #75715e } /* Comment.Multiline */ +figure.highlight .cp { color: #75715e } /* Comment.Preproc */ +figure.highlight .c1 { color: #75715e } /* Comment.Single */ +figure.highlight .cs { color: #75715e } /* Comment.Special */ +figure.highlight .ge { font-style: italic } /* Generic.Emph */ +figure.highlight .gs { font-weight: bold } /* Generic.Strong */ +figure.highlight .kc { color: #66d9ef } /* Keyword.Constant */ +figure.highlight .kd { color: #66d9ef } /* Keyword.Declaration */ +figure.highlight .kn { color: #f92672 } /* Keyword.Namespace */ +figure.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ +figure.highlight .kr { color: #66d9ef } /* Keyword.Reserved */ +figure.highlight .kt { color: #66d9ef } /* Keyword.Type */ +figure.highlight .ld { color: #e6db74 } /* Literal.Date */ +figure.highlight .m { color: #ae81ff } /* Literal.Number */ +figure.highlight .s { color: #e6db74 } /* Literal.String */ +figure.highlight .na { color: #a6e22e } /* Name.Attribute */ +figure.highlight .nb { color: #f8f8f2 } /* Name.Builtin */ +figure.highlight .nc { color: #a6e22e } /* Name.Class */ +figure.highlight .no { color: #66d9ef } /* Name.Constant */ +figure.highlight .nd { color: #a6e22e } /* Name.Decorator */ +figure.highlight .ni { color: #f8f8f2 } /* Name.Entity */ +figure.highlight .ne { color: #a6e22e } /* Name.Exception */ +figure.highlight .nf { color: #a6e22e } /* Name.Function */ +figure.highlight .nl { color: #f8f8f2 } /* Name.Label */ +figure.highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +figure.highlight .nx { color: #a6e22e } /* Name.Other */ +figure.highlight .py { color: #f8f8f2 } /* Name.Property */ +figure.highlight .nt { color: #f92672 } /* Name.Tag */ +figure.highlight .nv { color: #f8f8f2 } /* Name.Variable */ +figure.highlight .ow { color: #f92672 } /* Operator.Word */ +figure.highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +figure.highlight .mf { color: #ae81ff } /* Literal.Number.Float */ +figure.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ +figure.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ +figure.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ +figure.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ +figure.highlight .sc { color: #e6db74 } /* Literal.String.Char */ +figure.highlight .sd { color: #e6db74 } /* Literal.String.Doc */ +figure.highlight .s2 { color: #e6db74 } /* Literal.String.Double */ +figure.highlight .se { color: #ae81ff } /* Literal.String.Escape */ +figure.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ +figure.highlight .si { color: #e6db74 } /* Literal.String.Interpol */ +figure.highlight .sx { color: #e6db74 } /* Literal.String.Other */ +figure.highlight .sr { color: #e6db74 } /* Literal.String.Regex */ +figure.highlight .s1 { color: #e6db74 } /* Literal.String.Single */ +figure.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ +figure.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +figure.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ +figure.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ +figure.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +figure.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ + +figure.highlight .gh { } /* Generic Heading & Diff Header */ +figure.highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */ +figure.highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */ +figure.highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */ diff --git a/src/scss/_styleguide.scss b/src/scss/_styleguide.scss index ed967b3..47396f7 100644 --- a/src/scss/_styleguide.scss +++ b/src/scss/_styleguide.scss @@ -1,4 +1,6 @@ #styleguide { + padding-top: 40px; + .component { &:after { // TODO clearfix mixin content: ''; @@ -17,4 +19,31 @@ width: 10em; border-radius: 10px; } + + > h2 { + margin-top: 40px; + padding-left: 20px; + } + + .component { + margin: 20px 0; + box-shadow: 5px 5px 15px -5px $black; + border-radius: 10px; + } + + .component__header { + padding: 20px; + border-bottom: 1px solid lighten($black, 50%); + border-radius: 10px 10px 0 0; + } + + .component__rendered { + padding: 20px; + } + + .component__code { + padding: 20px; + background-color: #333333; + border-radius: 0 0 10px 10px; + } } diff --git a/src/scss/main.scss b/src/scss/main.scss index 4080b68..349d6f1 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -27,3 +27,4 @@ @import "post"; @import "junk-drawer"; @import "styleguide"; +@import "code-highlight";