From 763bf83aca0095b89996cdcebd473689d4b94fdc Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Thu, 2 Jul 2015 08:37:49 -0400 Subject: [PATCH 01/71] Initial commit --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..e69de29b From 89c31d7b4c140d7cc71ea9a24c1e20d132a3930c Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Thu, 2 Jul 2015 09:02:55 -0400 Subject: [PATCH 02/71] README.md: add "front matter" --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e69de29b..e262bcf9 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,5 @@ +--- +layout: page +title: README +permalink: /README/ +--- From 5006d4e12fb628c482d50abdb37884a8511434aa Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Thu, 2 Jul 2015 09:06:04 -0400 Subject: [PATCH 03/71] New jekyll site --- .gitignore | 2 + Gemfile | 2 + Gemfile.lock | 131 ++++++++++ _config.yml | 23 ++ _includes/footer.html | 55 +++++ _includes/head.html | 12 + _includes/header.html | 27 +++ _layouts/default.html | 20 ++ _layouts/page.html | 14 ++ _layouts/post.html | 15 ++ _posts/2015-07-02-welcome-to-jekyll.markdown | 25 ++ _sass/_base.scss | 204 ++++++++++++++++ _sass/_layout.scss | 236 +++++++++++++++++++ _sass/_syntax-highlighting.scss | 67 ++++++ about.md | 11 + css/main.scss | 52 ++++ feed.xml | 30 +++ index.html | 23 ++ 18 files changed, 949 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 _config.yml create mode 100644 _includes/footer.html create mode 100644 _includes/head.html create mode 100644 _includes/header.html create mode 100644 _layouts/default.html create mode 100644 _layouts/page.html create mode 100644 _layouts/post.html create mode 100644 _posts/2015-07-02-welcome-to-jekyll.markdown create mode 100644 _sass/_base.scss create mode 100644 _sass/_layout.scss create mode 100644 _sass/_syntax-highlighting.scss create mode 100644 about.md create mode 100755 css/main.scss create mode 100644 feed.xml create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..badbc02f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +_site +.sass-cache diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..053c27dc --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..b89b8039 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,131 @@ +GEM + remote: https://rubygems.org/ + specs: + RedCloth (4.2.9) + activesupport (4.2.3) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + blankslate (2.1.2.4) + celluloid (0.16.0) + timers (~> 4.0.0) + classifier-reborn (2.0.3) + fast-stemmer (~> 1.0) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.9.1.1) + colorator (0.1) + execjs (2.5.2) + fast-stemmer (1.0.2) + ffi (1.9.10) + gemoji (2.1.0) + github-pages (38) + RedCloth (= 4.2.9) + github-pages-health-check (~> 0.2) + jekyll (= 2.4.0) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.3.0) + jekyll-mentions (= 0.2.1) + jekyll-redirect-from (= 0.8.0) + jekyll-sass-converter (= 1.2.0) + jekyll-sitemap (= 0.8.1) + jemoji (= 0.4.0) + kramdown (= 1.5.0) + liquid (= 2.6.2) + maruku (= 0.7.0) + mercenary (~> 0.3) + pygments.rb (= 0.6.3) + rdiscount (= 2.1.7) + redcarpet (= 3.3.1) + terminal-table (~> 1.4) + github-pages-health-check (0.3.1) + net-dns (~> 0.6) + public_suffix (~> 1.4) + hitimes (1.2.2) + html-pipeline (1.9.0) + activesupport (>= 2) + nokogiri (~> 1.4) + i18n (0.7.0) + jekyll (2.4.0) + classifier-reborn (~> 2.0) + colorator (~> 0.1) + jekyll-coffeescript (~> 1.0) + jekyll-gist (~> 1.0) + jekyll-paginate (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 2.6.1) + mercenary (~> 0.3.3) + pygments.rb (~> 0.6.0) + redcarpet (~> 3.1) + safe_yaml (~> 1.0) + toml (~> 0.1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-feed (0.3.0) + jekyll-gist (1.2.1) + jekyll-mentions (0.2.1) + html-pipeline (~> 1.9.0) + jekyll (~> 2.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.8.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.2.0) + sass (~> 3.2) + jekyll-sitemap (0.8.1) + jekyll-watch (1.2.1) + listen (~> 2.7) + jemoji (0.4.0) + gemoji (~> 2.0) + html-pipeline (~> 1.9) + jekyll (~> 2.0) + json (1.8.3) + kramdown (1.5.0) + liquid (2.6.2) + listen (2.10.1) + celluloid (~> 0.16.0) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + maruku (0.7.0) + mercenary (0.3.5) + mini_portile (0.6.2) + minitest (5.7.0) + net-dns (0.8.0) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + parslet (1.5.0) + blankslate (~> 2.0) + posix-spawn (0.3.11) + public_suffix (1.5.1) + pygments.rb (0.6.3) + posix-spawn (~> 0.3.6) + yajl-ruby (~> 1.2.0) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rdiscount (2.1.7) + redcarpet (3.3.1) + safe_yaml (1.0.4) + sass (3.4.15) + terminal-table (1.5.2) + thread_safe (0.3.5) + timers (4.0.1) + hitimes + toml (0.1.2) + parslet (~> 1.5.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + yajl-ruby (1.2.1) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + +BUNDLED WITH + 1.10.5 diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..da9e70e2 --- /dev/null +++ b/_config.yml @@ -0,0 +1,23 @@ +# Site settings +title: Your awesome title +email: your-email@domain.com +description: > # this means to ignore newlines until "baseurl:" + Write an awesome description for your new site here. You can edit this + line in _config.yml. It will appear in your document head meta (for + Google search results) and in your feed.xml site description. +baseurl: "" # the subpath of your site, e.g. /blog/ +url: "http://yourdomain.com" # the base hostname & protocol for your site +twitter_username: jekyllrb +github_username: jekyll + +# Build settings +markdown: kramdown + +# Github Pages +ghlighter: pygments +github: [Repository metadata] +gems: +- jekyll-mentions +- jemoji +- jekyll-redirect-from +- jekyll-sitemap diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 00000000..be3976f7 --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,55 @@ + diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 00000000..47057b50 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,12 @@ + + + + + + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + + + + + + diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 00000000..cfe381f7 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,27 @@ + diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 00000000..e4ab96fb --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,20 @@ + + + + {% include head.html %} + + + + {% include header.html %} + +
+
+ {{ content }} +
+
+ + {% include footer.html %} + + + + diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 00000000..74c1a118 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,14 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+
+ +
+ {{ content }} +
+ +
diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 00000000..a2b4e52f --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,15 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+ +
+ +
+ {{ content }} +
+ +
diff --git a/_posts/2015-07-02-welcome-to-jekyll.markdown b/_posts/2015-07-02-welcome-to-jekyll.markdown new file mode 100644 index 00000000..89a03bfe --- /dev/null +++ b/_posts/2015-07-02-welcome-to-jekyll.markdown @@ -0,0 +1,25 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2015-07-02 08:50:40 +categories: jekyll update +--- +You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. + +To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help]. + +[jekyll]: http://jekyllrb.com +[jekyll-gh]: https://github.com/jekyll/jekyll +[jekyll-help]: https://github.com/jekyll/jekyll-help diff --git a/_sass/_base.scss b/_sass/_base.scss new file mode 100644 index 00000000..e5fd0fd8 --- /dev/null +++ b/_sass/_base.scss @@ -0,0 +1,204 @@ +/** + * Reset some basic elements + */ +body, h1, h2, h3, h4, h5, h6, +p, blockquote, pre, hr, +dl, dd, ol, ul, figure { + margin: 0; + padding: 0; +} + + + +/** + * Basic styling + */ +body { + font-family: $base-font-family; + font-size: $base-font-size; + line-height: $base-line-height; + font-weight: 300; + color: $text-color; + background-color: $background-color; + -webkit-text-size-adjust: 100%; +} + + + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +%vertical-rhythm { + margin-bottom: $spacing-unit / 2; +} + + + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; +} + + + +/** + * Figures + */ +figure > img { + display: block; +} + +figcaption { + font-size: $small-font-size; +} + + + +/** + * Lists + */ +ul, ol { + margin-left: $spacing-unit; +} + +li { + > ul, + > ol { + margin-bottom: 0; + } +} + + + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-weight: 300; +} + + + +/** + * Links + */ +a { + color: $brand-color; + text-decoration: none; + + &:visited { + color: darken($brand-color, 15%); + } + + &:hover { + color: $text-color; + text-decoration: underline; + } +} + + + +/** + * Blockquotes + */ +blockquote { + color: $grey-color; + border-left: 4px solid $grey-color-light; + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + + + +/** + * Code formatting + */ +pre, +code { + font-size: 15px; + border: 1px solid $grey-color-light; + border-radius: 3px; + background-color: #eef; +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + overflow-x: scroll; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + + + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); + max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; + + @include media-query($on-laptop) { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); + max-width: calc(#{$content-width} - (#{$spacing-unit})); + padding-right: $spacing-unit / 2; + padding-left: $spacing-unit / 2; + } +} + + + +/** + * Clearfix + */ +%clearfix { + + &:after { + content: ""; + display: table; + clear: both; + } +} + + + +/** + * Icons + */ +.icon { + + > svg { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + + path { + fill: $grey-color; + } + } +} diff --git a/_sass/_layout.scss b/_sass/_layout.scss new file mode 100644 index 00000000..def56f89 --- /dev/null +++ b/_sass/_layout.scss @@ -0,0 +1,236 @@ +/** + * Site header + */ +.site-header { + border-top: 5px solid $grey-color-dark; + border-bottom: 1px solid $grey-color-light; + min-height: 56px; + + // Positioning context for the mobile navigation icon + position: relative; +} + +.site-title { + font-size: 26px; + line-height: 56px; + letter-spacing: -1px; + margin-bottom: 0; + float: left; + + &, + &:visited { + color: $grey-color-dark; + } +} + +.site-nav { + float: right; + line-height: 56px; + + .menu-icon { + display: none; + } + + .page-link { + color: $text-color; + line-height: $base-line-height; + + // Gaps between nav items, but not on the first one + &:not(:first-child) { + margin-left: 20px; + } + } + + @include media-query($on-palm) { + position: absolute; + top: 9px; + right: 30px; + background-color: $background-color; + border: 1px solid $grey-color-light; + border-radius: 5px; + text-align: right; + + .menu-icon { + display: block; + float: right; + width: 36px; + height: 26px; + line-height: 0; + padding-top: 10px; + text-align: center; + + > svg { + width: 18px; + height: 15px; + + path { + fill: $grey-color-dark; + } + } + } + + .trigger { + clear: both; + display: none; + } + + &:hover .trigger { + display: block; + padding-bottom: 5px; + } + + .page-link { + display: block; + padding: 5px 10px; + } + } +} + + + +/** + * Site footer + */ +.site-footer { + border-top: 1px solid $grey-color-light; + padding: $spacing-unit 0; +} + +.footer-heading { + font-size: 18px; + margin-bottom: $spacing-unit / 2; +} + +.contact-list, +.social-media-list { + list-style: none; + margin-left: 0; +} + +.footer-col-wrapper { + font-size: 15px; + color: $grey-color; + margin-left: -$spacing-unit / 2; + @extend %clearfix; +} + +.footer-col { + float: left; + margin-bottom: $spacing-unit / 2; + padding-left: $spacing-unit / 2; +} + +.footer-col-1 { + width: -webkit-calc(35% - (#{$spacing-unit} / 2)); + width: calc(35% - (#{$spacing-unit} / 2)); +} + +.footer-col-2 { + width: -webkit-calc(20% - (#{$spacing-unit} / 2)); + width: calc(20% - (#{$spacing-unit} / 2)); +} + +.footer-col-3 { + width: -webkit-calc(45% - (#{$spacing-unit} / 2)); + width: calc(45% - (#{$spacing-unit} / 2)); +} + +@include media-query($on-laptop) { + .footer-col-1, + .footer-col-2 { + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); + } + + .footer-col-3 { + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + +@include media-query($on-palm) { + .footer-col { + float: none; + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + + + +/** + * Page content + */ +.page-content { + padding: $spacing-unit 0; +} + +.page-heading { + font-size: 20px; +} + +.post-list { + margin-left: 0; + list-style: none; + + > li { + margin-bottom: $spacing-unit; + } +} + +.post-meta { + font-size: $small-font-size; + color: $grey-color; +} + +.post-link { + display: block; + font-size: 24px; +} + + + +/** + * Posts + */ +.post-header { + margin-bottom: $spacing-unit; +} + +.post-title { + font-size: 42px; + letter-spacing: -1px; + line-height: 1; + + @include media-query($on-laptop) { + font-size: 36px; + } +} + +.post-content { + margin-bottom: $spacing-unit; + + h2 { + font-size: 32px; + + @include media-query($on-laptop) { + font-size: 28px; + } + } + + h3 { + font-size: 26px; + + @include media-query($on-laptop) { + font-size: 22px; + } + } + + h4 { + font-size: 20px; + + @include media-query($on-laptop) { + font-size: 18px; + } + } +} diff --git a/_sass/_syntax-highlighting.scss b/_sass/_syntax-highlighting.scss new file mode 100644 index 00000000..e36627da --- /dev/null +++ b/_sass/_syntax-highlighting.scss @@ -0,0 +1,67 @@ +/** + * Syntax highlighting styles + */ +.highlight { + background: #fff; + @extend %vertical-rhythm; + + .c { color: #998; font-style: italic } // Comment + .err { color: #a61717; background-color: #e3d2d2 } // Error + .k { font-weight: bold } // Keyword + .o { font-weight: bold } // Operator + .cm { color: #998; font-style: italic } // Comment.Multiline + .cp { color: #999; font-weight: bold } // Comment.Preproc + .c1 { color: #998; font-style: italic } // Comment.Single + .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special + .gd { color: #000; background-color: #fdd } // Generic.Deleted + .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific + .ge { font-style: italic } // Generic.Emph + .gr { color: #a00 } // Generic.Error + .gh { color: #999 } // Generic.Heading + .gi { color: #000; background-color: #dfd } // Generic.Inserted + .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific + .go { color: #888 } // Generic.Output + .gp { color: #555 } // Generic.Prompt + .gs { font-weight: bold } // Generic.Strong + .gu { color: #aaa } // Generic.Subheading + .gt { color: #a00 } // Generic.Traceback + .kc { font-weight: bold } // Keyword.Constant + .kd { font-weight: bold } // Keyword.Declaration + .kp { font-weight: bold } // Keyword.Pseudo + .kr { font-weight: bold } // Keyword.Reserved + .kt { color: #458; font-weight: bold } // Keyword.Type + .m { color: #099 } // Literal.Number + .s { color: #d14 } // Literal.String + .na { color: #008080 } // Name.Attribute + .nb { color: #0086B3 } // Name.Builtin + .nc { color: #458; font-weight: bold } // Name.Class + .no { color: #008080 } // Name.Constant + .ni { color: #800080 } // Name.Entity + .ne { color: #900; font-weight: bold } // Name.Exception + .nf { color: #900; font-weight: bold } // Name.Function + .nn { color: #555 } // Name.Namespace + .nt { color: #000080 } // Name.Tag + .nv { color: #008080 } // Name.Variable + .ow { font-weight: bold } // Operator.Word + .w { color: #bbb } // Text.Whitespace + .mf { color: #099 } // Literal.Number.Float + .mh { color: #099 } // Literal.Number.Hex + .mi { color: #099 } // Literal.Number.Integer + .mo { color: #099 } // Literal.Number.Oct + .sb { color: #d14 } // Literal.String.Backtick + .sc { color: #d14 } // Literal.String.Char + .sd { color: #d14 } // Literal.String.Doc + .s2 { color: #d14 } // Literal.String.Double + .se { color: #d14 } // Literal.String.Escape + .sh { color: #d14 } // Literal.String.Heredoc + .si { color: #d14 } // Literal.String.Interpol + .sx { color: #d14 } // Literal.String.Other + .sr { color: #009926 } // Literal.String.Regex + .s1 { color: #d14 } // Literal.String.Single + .ss { color: #990073 } // Literal.String.Symbol + .bp { color: #999 } // Name.Builtin.Pseudo + .vc { color: #008080 } // Name.Variable.Class + .vg { color: #008080 } // Name.Variable.Global + .vi { color: #008080 } // Name.Variable.Instance + .il { color: #099 } // Literal.Number.Integer.Long +} diff --git a/about.md b/about.md new file mode 100644 index 00000000..3ed64bb6 --- /dev/null +++ b/about.md @@ -0,0 +1,11 @@ +--- +layout: page +title: About +permalink: /about/ +--- + +This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/) + +You can find the source code for the Jekyll new theme at: [github.com/jglovier/jekyll-new](https://github.com/jglovier/jekyll-new) + +You can find the source code for Jekyll at [github.com/jekyll/jekyll](https://github.com/jekyll/jekyll) diff --git a/css/main.scss b/css/main.scss new file mode 100755 index 00000000..beee4e3d --- /dev/null +++ b/css/main.scss @@ -0,0 +1,52 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- +@charset "utf-8"; + + + +// Our variables +$base-font-family: Helvetica, Arial, sans-serif; +$base-font-size: 16px; +$small-font-size: $base-font-size * 0.875; +$base-line-height: 1.5; + +$spacing-unit: 30px; + +$text-color: #111; +$background-color: #fdfdfd; +$brand-color: #2a7ae2; + +$grey-color: #828282; +$grey-color-light: lighten($grey-color, 40%); +$grey-color-dark: darken($grey-color, 25%); + +// Width of the content area +$content-width: 800px; + +$on-palm: 600px; +$on-laptop: 800px; + + + +// Using media queries with like this: +// @include media-query($on-palm) { +// .wrapper { +// padding-right: $spacing-unit / 2; +// padding-left: $spacing-unit / 2; +// } +// } +@mixin media-query($device) { + @media screen and (max-width: $device) { + @content; + } +} + + + +// Import partials from `sass_dir` (defaults to `_sass`) +@import + "base", + "layout", + "syntax-highlighting" +; diff --git a/feed.xml b/feed.xml new file mode 100644 index 00000000..a6628bd8 --- /dev/null +++ b/feed.xml @@ -0,0 +1,30 @@ +--- +layout: null +--- + + + + {{ site.title | xml_escape }} + {{ site.description | xml_escape }} + {{ site.url }}{{ site.baseurl }}/ + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + Jekyll v{{ jekyll.version }} + {% for post in site.posts limit:10 %} + + {{ post.title | xml_escape }} + {{ post.content | xml_escape }} + {{ post.date | date_to_rfc822 }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {% for tag in post.tags %} + {{ tag | xml_escape }} + {% endfor %} + {% for cat in post.categories %} + {{ cat | xml_escape }} + {% endfor %} + + {% endfor %} + + diff --git a/index.html b/index.html new file mode 100644 index 00000000..83d93985 --- /dev/null +++ b/index.html @@ -0,0 +1,23 @@ +--- +layout: default +--- + +
+ +

Posts

+ +
    + {% for post in site.posts %} +
  • + + +

    + {{ post.title }} +

    +
  • + {% endfor %} +
+ +

subscribe via RSS

+ +
From 0598b8d69c78bd9e28bc7340596da726cd09cf21 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Sun, 5 Jul 2015 21:17:17 -0400 Subject: [PATCH 04/71] Migration to github pages --- .gitignore | 3 + README.md | 5 - _config.yml | 18 +- _includes/footer.html | 71 +-- _includes/head.html | 9 +- _includes/header.html | 47 +- _layouts/default.html | 16 +- _layouts/page.html | 14 - _layouts/post.html | 15 - _posts/2015-07-02-welcome-to-jekyll.markdown | 25 - _sass/_base.scss | 204 -------- _sass/_layout.scss | 236 --------- _sass/_leafo.scss | 308 ++++++++++++ _sass/_syntax-highlighting.scss | 67 --- about.md | 11 - css/main.scss | 46 +- css/normalize.css | 500 +++++++++++++++++++ docs/index.md | 376 ++++++++++++++ favicon.ico | Bin 0 -> 1406 bytes feed.xml | 30 -- img/tile.png | Bin 0 -> 244 bytes index.html | 23 - index.md | 249 +++++++++ 23 files changed, 1508 insertions(+), 765 deletions(-) delete mode 100644 README.md delete mode 100644 _layouts/page.html delete mode 100644 _layouts/post.html delete mode 100644 _posts/2015-07-02-welcome-to-jekyll.markdown delete mode 100644 _sass/_base.scss delete mode 100644 _sass/_layout.scss create mode 100644 _sass/_leafo.scss delete mode 100644 _sass/_syntax-highlighting.scss delete mode 100644 about.md create mode 100644 css/normalize.css create mode 100644 docs/index.md create mode 100644 favicon.ico delete mode 100644 feed.xml create mode 100644 img/tile.png delete mode 100644 index.html create mode 100644 index.md diff --git a/.gitignore b/.gitignore index badbc02f..1e771c2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ _site .sass-cache +composer.lock +serve.sh +/vendor/ diff --git a/README.md b/README.md deleted file mode 100644 index e262bcf9..00000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: page -title: README -permalink: /README/ ---- diff --git a/_config.yml b/_config.yml index da9e70e2..5176963f 100644 --- a/_config.yml +++ b/_config.yml @@ -1,17 +1,23 @@ # Site settings -title: Your awesome title -email: your-email@domain.com +title: SCSS Compiler in PHP +email: leafot@gmail.com description: > # this means to ignore newlines until "baseurl:" - Write an awesome description for your new site here. You can edit this - line in _config.yml. It will appear in your document head meta (for - Google search results) and in your feed.xml site description. + SCSS compiler written in PHP baseurl: "" # the subpath of your site, e.g. /blog/ -url: "http://yourdomain.com" # the base hostname & protocol for your site +url: "http://leafo.github.io/scssphp" # the base hostname & protocol for your site twitter_username: jekyllrb github_username: jekyll +current_version: 0.1.7 +root: /scssphp # Build settings markdown: kramdown +exclude: +- Gemfile +- Gemfile.lock +- composer.lock +- serve.sh +- vendor/ # Github Pages ghlighter: pygments diff --git a/_includes/footer.html b/_includes/footer.html index be3976f7..861d64d8 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,55 +1,26 @@ - + + + + + Fork me on GitHub diff --git a/_includes/head.html b/_includes/head.html index 47057b50..874131c5 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -3,10 +3,13 @@ - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - scssphp - + + + + + - diff --git a/_includes/header.html b/_includes/header.html index cfe381f7..f9eef8f3 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,27 +1,34 @@ - diff --git a/_layouts/default.html b/_layouts/default.html index e4ab96fb..d219a0af 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,20 +1,14 @@ - - - {% include head.html %} - + +{% assign generate_date = 'now' | date: "%a %b %d, %Y %T" %} +{% include head.html %} - {% include header.html %} - -
-
+
+
{{ content }}
- {% include footer.html %} - - diff --git a/_layouts/page.html b/_layouts/page.html deleted file mode 100644 index 74c1a118..00000000 --- a/_layouts/page.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title }}

-
- -
- {{ content }} -
- -
diff --git a/_layouts/post.html b/_layouts/post.html deleted file mode 100644 index a2b4e52f..00000000 --- a/_layouts/post.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title }}

- -
- -
- {{ content }} -
- -
diff --git a/_posts/2015-07-02-welcome-to-jekyll.markdown b/_posts/2015-07-02-welcome-to-jekyll.markdown deleted file mode 100644 index 89a03bfe..00000000 --- a/_posts/2015-07-02-welcome-to-jekyll.markdown +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: post -title: "Welcome to Jekyll!" -date: 2015-07-02 08:50:40 -categories: jekyll update ---- -You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. - -To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. - -Jekyll also offers powerful support for code snippets: - -{% highlight ruby %} -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -{% endhighlight %} - -Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help]. - -[jekyll]: http://jekyllrb.com -[jekyll-gh]: https://github.com/jekyll/jekyll -[jekyll-help]: https://github.com/jekyll/jekyll-help diff --git a/_sass/_base.scss b/_sass/_base.scss deleted file mode 100644 index e5fd0fd8..00000000 --- a/_sass/_base.scss +++ /dev/null @@ -1,204 +0,0 @@ -/** - * Reset some basic elements - */ -body, h1, h2, h3, h4, h5, h6, -p, blockquote, pre, hr, -dl, dd, ol, ul, figure { - margin: 0; - padding: 0; -} - - - -/** - * Basic styling - */ -body { - font-family: $base-font-family; - font-size: $base-font-size; - line-height: $base-line-height; - font-weight: 300; - color: $text-color; - background-color: $background-color; - -webkit-text-size-adjust: 100%; -} - - - -/** - * Set `margin-bottom` to maintain vertical rhythm - */ -h1, h2, h3, h4, h5, h6, -p, blockquote, pre, -ul, ol, dl, figure, -%vertical-rhythm { - margin-bottom: $spacing-unit / 2; -} - - - -/** - * Images - */ -img { - max-width: 100%; - vertical-align: middle; -} - - - -/** - * Figures - */ -figure > img { - display: block; -} - -figcaption { - font-size: $small-font-size; -} - - - -/** - * Lists - */ -ul, ol { - margin-left: $spacing-unit; -} - -li { - > ul, - > ol { - margin-bottom: 0; - } -} - - - -/** - * Headings - */ -h1, h2, h3, h4, h5, h6 { - font-weight: 300; -} - - - -/** - * Links - */ -a { - color: $brand-color; - text-decoration: none; - - &:visited { - color: darken($brand-color, 15%); - } - - &:hover { - color: $text-color; - text-decoration: underline; - } -} - - - -/** - * Blockquotes - */ -blockquote { - color: $grey-color; - border-left: 4px solid $grey-color-light; - padding-left: $spacing-unit / 2; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; - - > :last-child { - margin-bottom: 0; - } -} - - - -/** - * Code formatting - */ -pre, -code { - font-size: 15px; - border: 1px solid $grey-color-light; - border-radius: 3px; - background-color: #eef; -} - -code { - padding: 1px 5px; -} - -pre { - padding: 8px 12px; - overflow-x: scroll; - - > code { - border: 0; - padding-right: 0; - padding-left: 0; - } -} - - - -/** - * Wrapper - */ -.wrapper { - max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); - max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); - margin-right: auto; - margin-left: auto; - padding-right: $spacing-unit; - padding-left: $spacing-unit; - @extend %clearfix; - - @include media-query($on-laptop) { - max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); - max-width: calc(#{$content-width} - (#{$spacing-unit})); - padding-right: $spacing-unit / 2; - padding-left: $spacing-unit / 2; - } -} - - - -/** - * Clearfix - */ -%clearfix { - - &:after { - content: ""; - display: table; - clear: both; - } -} - - - -/** - * Icons - */ -.icon { - - > svg { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - - path { - fill: $grey-color; - } - } -} diff --git a/_sass/_layout.scss b/_sass/_layout.scss deleted file mode 100644 index def56f89..00000000 --- a/_sass/_layout.scss +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Site header - */ -.site-header { - border-top: 5px solid $grey-color-dark; - border-bottom: 1px solid $grey-color-light; - min-height: 56px; - - // Positioning context for the mobile navigation icon - position: relative; -} - -.site-title { - font-size: 26px; - line-height: 56px; - letter-spacing: -1px; - margin-bottom: 0; - float: left; - - &, - &:visited { - color: $grey-color-dark; - } -} - -.site-nav { - float: right; - line-height: 56px; - - .menu-icon { - display: none; - } - - .page-link { - color: $text-color; - line-height: $base-line-height; - - // Gaps between nav items, but not on the first one - &:not(:first-child) { - margin-left: 20px; - } - } - - @include media-query($on-palm) { - position: absolute; - top: 9px; - right: 30px; - background-color: $background-color; - border: 1px solid $grey-color-light; - border-radius: 5px; - text-align: right; - - .menu-icon { - display: block; - float: right; - width: 36px; - height: 26px; - line-height: 0; - padding-top: 10px; - text-align: center; - - > svg { - width: 18px; - height: 15px; - - path { - fill: $grey-color-dark; - } - } - } - - .trigger { - clear: both; - display: none; - } - - &:hover .trigger { - display: block; - padding-bottom: 5px; - } - - .page-link { - display: block; - padding: 5px 10px; - } - } -} - - - -/** - * Site footer - */ -.site-footer { - border-top: 1px solid $grey-color-light; - padding: $spacing-unit 0; -} - -.footer-heading { - font-size: 18px; - margin-bottom: $spacing-unit / 2; -} - -.contact-list, -.social-media-list { - list-style: none; - margin-left: 0; -} - -.footer-col-wrapper { - font-size: 15px; - color: $grey-color; - margin-left: -$spacing-unit / 2; - @extend %clearfix; -} - -.footer-col { - float: left; - margin-bottom: $spacing-unit / 2; - padding-left: $spacing-unit / 2; -} - -.footer-col-1 { - width: -webkit-calc(35% - (#{$spacing-unit} / 2)); - width: calc(35% - (#{$spacing-unit} / 2)); -} - -.footer-col-2 { - width: -webkit-calc(20% - (#{$spacing-unit} / 2)); - width: calc(20% - (#{$spacing-unit} / 2)); -} - -.footer-col-3 { - width: -webkit-calc(45% - (#{$spacing-unit} / 2)); - width: calc(45% - (#{$spacing-unit} / 2)); -} - -@include media-query($on-laptop) { - .footer-col-1, - .footer-col-2 { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); - } - - .footer-col-3 { - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - -@include media-query($on-palm) { - .footer-col { - float: none; - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - - - -/** - * Page content - */ -.page-content { - padding: $spacing-unit 0; -} - -.page-heading { - font-size: 20px; -} - -.post-list { - margin-left: 0; - list-style: none; - - > li { - margin-bottom: $spacing-unit; - } -} - -.post-meta { - font-size: $small-font-size; - color: $grey-color; -} - -.post-link { - display: block; - font-size: 24px; -} - - - -/** - * Posts - */ -.post-header { - margin-bottom: $spacing-unit; -} - -.post-title { - font-size: 42px; - letter-spacing: -1px; - line-height: 1; - - @include media-query($on-laptop) { - font-size: 36px; - } -} - -.post-content { - margin-bottom: $spacing-unit; - - h2 { - font-size: 32px; - - @include media-query($on-laptop) { - font-size: 28px; - } - } - - h3 { - font-size: 26px; - - @include media-query($on-laptop) { - font-size: 22px; - } - } - - h4 { - font-size: 20px; - - @include media-query($on-laptop) { - font-size: 18px; - } - } -} diff --git a/_sass/_leafo.scss b/_sass/_leafo.scss new file mode 100644 index 00000000..64adb158 --- /dev/null +++ b/_sass/_leafo.scss @@ -0,0 +1,308 @@ + +$site_width: 640px; + +$light_teal: #7FC7AF; +$teal: desaturate(#3FB8AF, 10%); +$brown: #DAD8A7; +$pink: darken(#FF9E9D, 10%); +$btn_color: desaturate(#FF3D7F, 10%); + +::selection { + background: red; + color: white; +} + +@mixin unselectable { + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; +} + +@mixin grad($top, $bottom) { + background-color: mix($top, $bottom); + background-image: linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -webkit-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -moz-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -o-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -ms-linear-gradient(bottom, $bottom 0%, $top 100%); +} + +@mixin autograd($color, $amount: 10%) { + @include grad($color, darken($color, $amount)); +} + +body { + background: $pink; + font-family: Lato, sans-serif; +} + +.header, .footer, .body { + .inner { + width: $site_width; + margin: 0 auto; + } +} + +.header { + text-shadow: 0px -1px 0px darken($teal, 15%); + + .color { + background: $teal url(../img/tile.png); + border-top: 4px solid $light_teal; + box-shadow: inset 0px 1px 0px rgba(255,255,255, 0.5), inset 0px 8px 8px -8px #37505A, inset 0px -1px 0px rgba(255,255,255, 0.3); + } + + h1 { + font-family: 'Quicksand', sans-serif; + font-size: 40px; + line-height: 100px; + font-weight: normal; + margin: 0; + + a { + text-decoration: none; + color: #EDFFF9; + + &:active { + position: relative; + top: 1px; + } + } + } + + .nav { + padding: 8px 0; + font-size: 17px; + text-shadow: none; + background: darken($teal, 30%); + color: $teal; + box-shadow: inset 0px 4px 8px -4px rgba(0,0,0,0.9), inset 0px -1px 0px rgba(255,255,255, 0.8); + + a { + color: lighten($teal, 40%); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + .social { + float: right; + margin-top: -2px; + } + } + + .download-area { + float: right; + margin-top: 25px; + background: rgba(255,255,255, 0.3); + border-radius: 8px; + padding: 5px; + + a { + text-decoration: none; + } + + .download-button { + $height: 8px; + $depress: 4px; + + @include unselectable; + + color: white; + text-align: center; + + @include autograd($btn_color); + + position: relative; + top: -1 * $height; + + padding: 8px 20px; + border-radius: 8px; + text-shadow: none; + + box-shadow: 0px $height 0px darken($btn_color, 30%), inset 0px -1px 0px rgba(255,255,255, 0.2), inset 0px 1px 0px rgba(0,0,0, 0.2); + text-shadow: 0px 1px 2px darken($btn_color, 40%); + + cursor: pointer; + + -webkit-transition: all 0.05s ease-in-out; + -moz-transition: all 0.05s ease-in-out; + transition: all 0.05s ease-in-out; + + &:hover { + @include autograd(lighten($btn_color, 3%)); + } + + &:active { + box-shadow: 0px $height - $depress 0px darken($btn_color, 30%), inset 0px -1px 0px rgba(255,255,255, 0.2), inset 0px 1px 0px rgba(0,0,0, 0.2); + top: -1 * ($height - $depress); + } + + .top { + font-weight: bold; + font-size: 16px; + } + + .sub { + font-size: 14px; + } + } + } + +} + +.body { + $bg_color: #FEFFED; + $text_color: darken($brown, 60%); + box-shadow: inset 0px 4px 8px -4px rgba(0,0,0,0.7), inset 0px -4px 8px -4px rgba(0,0,0,0.4); + background: $bg_color; + overflow: hidden; + color: $text_color; + font-size: 18px; + padding-bottom: 20px; + + .inner { + background: white; + margin-top: 20px; + padding: 30px 50px; + border: 1px solid lightGrey; + box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.19); + + h1, h2, h3 { + margin: 0 0 20px 0; + } + } + + h1, h2, h3 { + text-shadow: 1px 1px 0px $bg_color, 2px 2px 0px rgba($text_color, 0.3); + letter-spacing: -1px; + } + + h3 { + color: #4D4C3D; + } + + p { + margin: 0 0 15px 0; + } + + a { + color: #DB1C4A; + &:hover { + color: lighten(#DB1C4A, 10%); + } + } + + pre { + margin: 20px 0; + } +} + +.footer { + font-size: 16px; + color: lighten($pink, 20%); + text-shadow: 0px 1px 0px darken($pink, 20%); + + border-top: 1px dashed darken($pink, 50%); + box-shadow: inset 0px 1px 0px rgba(255,255,255, 0.5); + padding: 8px 0 20px 0; + + line-height: 150%; + + a { + color: white; + font-weight: bold; + text-decoration: none; + padding: 0 4px; + border-radius: 4px; + border: 1px solid lighten($pink, 4%); + + &:hover { + background: darken($pink, 3%); + border: 1px solid lighten($pink, 4%); + } + } +} + + +p { + line-height: 150%; + code { + background: rgba(0,0,0, 0.1); + border-radius: 4px; + padding: 1px 4px; + } +} + +.comments { + font-size: 12px; +} + +.index { + line-height: 150%; + margin-bottom: 20px; + + ul { + margin: 0; + } +} + +.highlight { + background: #333; + color: white; + font-size: 14px; + padding: 10px; + margin-bottom: 15px; + box-shadow: 0px 1px 3px rgba(0,0,0, 0.7), inset 0px 0px 0px 1px rgba(255,255,255,0.3); + border-radius: 2px; + border: 1px solid #222; + + pre { + margin-top: 0px; + margin-bottom: 0px; + } + + // builtins + .nb { + color: #FFA67C; + } + + // strings + .s, .s1, .s2, .se, .nt { + color: #ffe898; + } + + // proper names + .nc, .vc, .bp { + color: #98d9ff; + } + + // true, false, nil + .kc { + color: #acfff0; + } + + // function lit, braces, parens + .nf, .kt { + color: #9fff98; + } + + .nv { + color: #ff9898; + } + + // keywords + .k, .kd, .na { + color: #cb98ff; + } + + .c1, .c2 { + color: #929292; + } + + .m, .mi, .mf, .mh, .o { + color: #9495ff; + } +} diff --git a/_sass/_syntax-highlighting.scss b/_sass/_syntax-highlighting.scss deleted file mode 100644 index e36627da..00000000 --- a/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Syntax highlighting styles - */ -.highlight { - background: #fff; - @extend %vertical-rhythm; - - .c { color: #998; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { font-weight: bold } // Keyword - .o { font-weight: bold } // Operator - .cm { color: #998; font-style: italic } // Comment.Multiline - .cp { color: #999; font-weight: bold } // Comment.Preproc - .c1 { color: #998; font-style: italic } // Comment.Single - .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: bold } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { font-weight: bold } // Keyword.Constant - .kd { font-weight: bold } // Keyword.Declaration - .kp { font-weight: bold } // Keyword.Pseudo - .kr { font-weight: bold } // Keyword.Reserved - .kt { color: #458; font-weight: bold } // Keyword.Type - .m { color: #099 } // Literal.Number - .s { color: #d14 } // Literal.String - .na { color: #008080 } // Name.Attribute - .nb { color: #0086B3 } // Name.Builtin - .nc { color: #458; font-weight: bold } // Name.Class - .no { color: #008080 } // Name.Constant - .ni { color: #800080 } // Name.Entity - .ne { color: #900; font-weight: bold } // Name.Exception - .nf { color: #900; font-weight: bold } // Name.Function - .nn { color: #555 } // Name.Namespace - .nt { color: #000080 } // Name.Tag - .nv { color: #008080 } // Name.Variable - .ow { font-weight: bold } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf { color: #099 } // Literal.Number.Float - .mh { color: #099 } // Literal.Number.Hex - .mi { color: #099 } // Literal.Number.Integer - .mo { color: #099 } // Literal.Number.Oct - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: #009926 } // Literal.String.Regex - .s1 { color: #d14 } // Literal.String.Single - .ss { color: #990073 } // Literal.String.Symbol - .bp { color: #999 } // Name.Builtin.Pseudo - .vc { color: #008080 } // Name.Variable.Class - .vg { color: #008080 } // Name.Variable.Global - .vi { color: #008080 } // Name.Variable.Instance - .il { color: #099 } // Literal.Number.Integer.Long -} diff --git a/about.md b/about.md deleted file mode 100644 index 3ed64bb6..00000000 --- a/about.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: page -title: About -permalink: /about/ ---- - -This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/) - -You can find the source code for the Jekyll new theme at: [github.com/jglovier/jekyll-new](https://github.com/jglovier/jekyll-new) - -You can find the source code for Jekyll at [github.com/jekyll/jekyll](https://github.com/jekyll/jekyll) diff --git a/css/main.scss b/css/main.scss index beee4e3d..046ee8c8 100755 --- a/css/main.scss +++ b/css/main.scss @@ -3,50 +3,6 @@ --- @charset "utf-8"; - - -// Our variables -$base-font-family: Helvetica, Arial, sans-serif; -$base-font-size: 16px; -$small-font-size: $base-font-size * 0.875; -$base-line-height: 1.5; - -$spacing-unit: 30px; - -$text-color: #111; -$background-color: #fdfdfd; -$brand-color: #2a7ae2; - -$grey-color: #828282; -$grey-color-light: lighten($grey-color, 40%); -$grey-color-dark: darken($grey-color, 25%); - -// Width of the content area -$content-width: 800px; - -$on-palm: 600px; -$on-laptop: 800px; - - - -// Using media queries with like this: -// @include media-query($on-palm) { -// .wrapper { -// padding-right: $spacing-unit / 2; -// padding-left: $spacing-unit / 2; -// } -// } -@mixin media-query($device) { - @media screen and (max-width: $device) { - @content; - } -} - - - -// Import partials from `sass_dir` (defaults to `_sass`) @import - "base", - "layout", - "syntax-highlighting" + "leafo" ; diff --git a/css/normalize.css b/css/normalize.css new file mode 100644 index 00000000..8fa27e0b --- /dev/null +++ b/css/normalize.css @@ -0,0 +1,500 @@ +/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE6/7/8/9 & FF3. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE6/7/8/9 & FF3. + */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4. + * Known issue: no IE6 support. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using + * `em` units. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-size: 100%; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Addresses `font-family` inconsistency between `textarea` and other form + * elements. + */ + +html, +button, +input, +select, +textarea { + font-family: sans-serif; +} + +/* + * Addresses margins handled incorrectly in IE6/7. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + * people.opera.com/patrickl/experiments/keyboard/test + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses font sizes and margins set differently in IE6/7. + * Addresses font sizes within `section` and `article` in FF4+, Chrome, S5. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.75em; + margin: 2.33em 0; +} + +/* + * Addresses styling not present in IE7/8/9, S5, Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in FF3+, S4/5, Chrome. + */ + +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in S5, Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE6/7/8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/* + * Addresses margins set differently in IE6/7. + */ + +p, +pre { + margin: 1em 0; +} + +/* + * Corrects font family set oddly in IE6, S4/5, Chrome. + * en.wikipedia.org/wiki/User:Davidgothberg/Test59 + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Addresses CSS quotes not supported in IE6/7. + */ + +q { + quotes: none; +} + +/* + * Addresses `quotes` property not supported in S4. + */ + +q:before, +q:after { + content: ''; + content: none; +} + +small { + font-size: 75%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + * gist.github.com/413930 + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Lists + ========================================================================== */ + +/* + * Addresses margins set differently in IE6/7. + */ + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +/* + * Addresses paddings set differently in IE6/7. + */ + +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +/* + * Corrects list images handled incorrectly in IE7. + */ + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * 1. Removes border when inside `a` element in IE6/7/8/9, FF3. + * 2. Improves image quality when scaled in IE7. + * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ + */ + +img { + border: 0; /* 1 */ + -ms-interpolation-mode: bicubic; /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE6/7/8/9, S5, O11. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Corrects margin displayed oddly in IE6/7. + */ + +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE6/7/8/9. + * 2. Corrects text not wrapping in FF3. + * 3. Corrects alignment displayed oddly in IE6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; + white-space: normal; /* 2 */ + *margin-left: -7px; /* 3 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers. + * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome. + * 3. Improves appearance and consistency in all browsers. + */ + +button, +input, +select, +textarea { + font-size: 100%; /* 1 */ + margin: 0; /* 2 */ + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ +} + +/* + * Addresses FF3/4 setting `line-height` on `input` using `!important` in the + * UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + *overflow: visible; /* 4 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to content-box in IE8/9. + * 2. Removes excess padding in IE8/9. + * 3. Removes excess padding in IE7. + * Known issue: excess padding remains in IE6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in S5, Chrome. + * 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz` + * to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in S5, Chrome on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in FF3+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE6/7/8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..30897a54 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,376 @@ +--- +layout: default +title: Documentation +--- + +

scssphp {{ current_version }} Documentation

+ +## PHP Interface + +### Including + +The project can be loaded through a `composer` generated auto-loader. + +Alternatively, the entire project can be loaded through a utility file. +Just include it somewhere to start using it: + +{% highlight php startinline=true %} +require_once 'scssphp/scss.inc.php'; +{% endhighlight %} + +### Compiling + +In order to manually compile code from PHP you must create an instance of the +`Compiler` class. The typical flow is to create the instance, set any compile time +options, then run the compiler with the `compile` method. + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); + +echo $scss->compile(' + $color: #abc; + div { color: lighten($color, 20%); } +'); +{% endhighlight %} + +* `compile($scssCode)` will attempt to compile a string of SCSS code. If it + succeeds then the CSS will be returned as a string. If there is any error, an + exception is thrown with an appropriate error message. + +### Import Paths + +When you import a file using the `{% raw %}@{% endraw %}import` directive, the current path of your +PHP script is used as the search path by default. This is often not what +you want, so there are two methods for manipulating the import path: +`addImportPath`, and `setImportPaths`. + +* `addImportPath($path)` will append `$path` to the list of the import + paths that are searched. + +* `setImportPaths($pathArray)` will replace the entire import path with + `$pathArray`. The value of `$pathArray` will be converted to an array if it + isn't one already. + +If the import path is set to `array()` then importing is effectively disabled. +The default import path is `array('')`, which means the current directory. + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); +$scss->setImportPaths('assets/stylesheets/'); + +// will search for 'assets/stylesheets/mixins.scss' +echo $scss->compile('{% raw %}@{% endraw %}import "mixins.scss";'); +{% endhighlight %} + +Besides adding static import paths, it's also possible to add custom import +functions. This allows you to load paths from a database, or HTTP, or using +files that SCSS would otherwise not process (such as vanilla CSS imports). + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); +$scss->addImportPath(function($path) { + if (!file_exists('stylesheets/'.$path)) return null; + return 'stylesheets/'.$path; +}); + +// will import 'stylesheets/vanilla.css' +echo $scss->compile('{% raw %}@{% endraw %}import "vanilla.css";'); +{% endhighlight %} + +### Output Formatting + +It's possible to customize the formatting of the output CSS by changing the +default formatter. + +Five formatters are included: + +* `Leafo\ScssPhp\Formatter\Expanded` +* `Leafo\ScssPhp\Formatter\Nested` *(default)* +* `Leafo\ScssPhp\Formatter\Compressed` +* `Leafo\ScssPhp\Formatter\Compact` +* `Leafo\ScssPhp\Formatter\Crunched` + +We can change the formatting using the `setFormatter` method. + +* `setFormatter($formatterName)` sets the current formatter to `$formatterName`, + the name of a class as a string that implements the formatting interface. See + the source for `Leafo\ScssPhp\Formatter\Expanded` for an example. + +Given the following SCSS: + +{% highlight scss %} +/*! Comment */ +.navigation { + ul { + line-height: 20px; + color: blue; + a { + color: red; + } + } +} + +.footer { + .copyright { + color: silver; + } +} +{% endhighlight %} + +The formatters output the following: + +`Leafo\ScssPhp\Formatter\Expanded`: + +{% highlight css %} +/*! Comment */ +.navigation ul { + line-height: 20px; + color: blue; +} +.navigation ul a { + color: red; +} +.footer .copyright { + color: silver; +} +{% endhighlight %} + +`Leafo\ScssPhp\Formatter\Nested`: + +{% highlight css %} +/*! Comment */ +.navigation ul { + line-height: 20px; + color: blue; } + .navigation ul a { + color: red; } + +.footer .copyright { + color: silver; } +{% endhighlight %} + +`Leafo\ScssPhp\Formatter\Compact`: + +{% highlight css %} +/*! Comment */ +.navigation ul { line-height:20px; color:blue; } + +.navigation ul a { color:red; } + +.footer .copyright { color:silver; } +{% endhighlight %} + +`Leafo\ScssPhp\Formatter\Compressed`: + +{% highlight css %} +/* Comment*/.navigation ul{line-height:20px;color:blue;}.navigation ul a{color:red;}.footer .copyright{color:silver;} +{% endhighlight %} + +`Leafo\ScssPhp\Formatter\Crunched`: + +{% highlight css %} +.navigation ul{line-height:20px;color:blue;}.navigation ul a{color:red;}.footer .copyright{color:silver;} +{% endhighlight %} + +### Source Line Debugging + +You can output the original SCSS line numbers within the compiled CSS file for better frontend debugging. + +This works well in combination with frontend debugging tools such as https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ + +To activate this feature, call `->setLineNumberStyle(Compiler::LINE_COMMENTS)` after creating a new instance of class `Compiler`. + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Server; +use Leafo\ScssPhp\Compiler; + +$directory = 'css'; + +$scss = new Compiler(); +$scss->setLineNumberStyle(Compiler::LINE_COMMENTS); + +$server = new Server($directory, null, $scss); +$server->serve(); +{% endhighlight %} + +You can also call the `compile` method directly (without using an instance of `Server` like above) + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Server; +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); +$scss->setLineNumberStyle(Compiler::LINE_COMMENTS); + +echo $scss->compile(' + $color: #abc; + div { color: lighten($color, 20%); } +'); +{% endhighlight %} + +### Custom Functions + +It's possible to register custom functions written in PHP that can be called +from SCSS. Some possible applications include appending your assets directory +to a URL with an `asset-url` function, or converting image URLs to an embedded +data URI to reduce the number of requests on a page with a `data-uri` function. + +We can add and remove functions using the methods `registerFunction` and +`unregisterFunction`. + +* `registerFunction($functionName, $callable)` assigns the callable value to + the name `$functionName`. The name is normalized using the rules of SCSS. + Meaning underscores and dashes are interchangeable. If a function with the + same name already exists then it is replaced. + +* `unregisterFunction($functionName)` removes `$functionName` from the list of + available functions. + + +The `$callable` can be anything that PHP knows how to call using +`call_user_func`. The function receives two arguments when invoked. The first +is an array of SCSS typed arguments that the function was sent. The second is a +reference to the current `scss` instance. + +The *SCSS typed arguments* are actually just arrays that represent SCSS values. +SCSS has different types than PHP, and this is how **scssphp** represents them +internally. + +For example, the value `10px` in PHP would be `array('number', 1, 'px')`. There +is a large variety of types. Experiment with a debugging function like `print_r` +to examine the possible inputs. + +The return value of the custom function can either be a SCSS type or a basic +PHP type. (such as a string or a number) If it's a PHP type, it will be converted +automatically to the corresponding SCSS type. + +As an example, a function called `add-two` is registered, which adds two numbers +together. PHP's anonymous function syntax is used to define the function. + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); + +$scss->registerFunction('add-two', function($args) { + list($a, $b) = $args; + return $a[1] + $b[1]; +}); + +$scss->compile('.ex1 { result: add-two(10, 10); }'); +{% endhighlight %} + +It's worth noting that in this example we lose the units of the number, and we +also don't do any type checking. This will have undefined results if we give it +anything other than two numbers. + +## SCSS Server + +The SCSS server is a small class that helps with automatically compiling SCSS. + +It's an endpoint for your web application that searches for SCSS files in a +directory then compiles and serves them as CSS. It will only compile +files if they've been modified (or one of the imports has been modified). + +### Using `serveFrom` + +`Server::serveFrom` is a simple to use function that should handle most cases. + +For example, create a file `style.php`: + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Server; + +$directory = 'stylesheets'; + +Server::serveFrom($directory); +{% endhighlight %} + +Going to the URL `example.com/style.php/style.scss` will attempt to compile +`style.scss` from the `stylesheets` directory, and serve it as CSS. + +* `Server::serveFrom($directory)` will serve SCSS files out of + `$directory`. It will attempt to get the path to the file out of + `$_SERVER['PATH_INFO']`. (It also looks at the GET parameter `p`) + +If it can not find the file it will return an HTTP 404 page: + +{% highlight text %} +/* INPUT NOT FOUND scss v0.0.1 */ +{% endhighlight %} + +If the file can't be compiled due to an error, then an HTTP 500 page is +returned. Similar to the following: + +{% highlight text %} +Parse error: failed at 'height: ;' stylesheets/test.scss on line 8 +{% endhighlight %} + +By default , the SCSS server must have write access to the style sheet +directory. It writes its cache in a special directory called `scss_cache`. + +Also, because SCSS server writes headers, make sure no output is written before +it runs. + +### Using `Leafo\ScssPhp\Server` + +Creating an instance of `Server` is just another way of accomplishing what +`serveFrom` does. It lets us customize the cache directory and the instance +of the `Compiler` that is used to compile + +* `new Server($sourceDir, $cacheDir, $scss)` creates a new server that + serves files from `$sourceDir`. The cache dir is where the cached compiled + files are placed. When `null`, `$sourceDir . '/scss_cache'` is used. `$scss` + is the instance of `scss` that is used to compile. + +Just call the `serve` method to let it render its output. + +Here's an example of creating a SCSS server that outputs compressed CSS: + +{% highlight php startinline=true %} +use Leafo\ScssPhp\Compiler; +use Leafo\ScssPhp\Server; + +$scss = new Compiler(); +$scss->setFormatter('Leafo\ScssPhp\Formatter\Compressed'); + +$server = new Server('stylesheets', null, $scss); +$server->serve(); +{% endhighlight %} + +## Command Line Tool + +A really basic command line tool is included for integration with scripts. It +is called `pscss`. It reads SCSS from either a named input file or standard in, +and returns the CSS to standard out. + +Usage: bin/pscss [options] [input-file] + +### Options + +If passed the flag `-h` (or `--help`), input is ignored and a summary of the command's usage is returned. + +If passed the flag `-v` (or `--version`), input is ignored and the current version is returned. + +If passed the flag `-T`, a formatted parse tree is returned instead of the compiled CSS.. + +The flag `-f` (or `--style`) can be used to set the [formatter](#Output_formatting): + +{% highlight bash %} +$ bin/pscss -f compressed < styles.scss +{% endhighlight %} + +The flag `-i` (or `--load_paths`) can be used to set import paths for the loader. On Unix/Linux systems, +the paths are colon separated. + +The flag `-p` (or `--precision`) can be used to set the decimal number precision. The default is 5. + +The flag `--debug-info` can be used to annotate the selectors with CSS {% raw %}@{% endraw %}media queries that identify the source file and line number. + +The flag `--line-comments` (or `--line-numbers`) can be used to annotate the selectors with comments that identify the source file and line number. diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..bc72ac63673f4e777e7b38dd4ef9361c4dcf2520 GIT binary patch literal 1406 zcmeH@%`O8`7>2+4Z9B?nO{*Q%Q7xsEnzqx{qHaZE!NS7A+QNo4Nu@#vA<<|mBo)F9 zShysfLv18B)_rH5^L+1_)qEl@9$gnsx2*Sy1VtnTT!{th{_m{vX$>}D6SiO*c3>Cw zU|+m)ARalyhq#KX_y}suHGGVZ@d-Y`r}z|~;WK=W6&G+R{c?q`;YKv@N*&knExyGK z+`vuT#CP}(-{X7yfFE!Rx9}5IJTt#w#j8~EEm?s|{!!lFKKPeTIveP0;AaElzv2`M zypS(Aj#F^#oV}E@-ENPY*tWfx&1M&uztc~do6pQ=+PyE6SxC*K(=+X!noXw@iK)ai zy*HUiGA1n&r}s=)lUCfaVk-3RuOSwTs?fWl(J?iK&2Yq|yUg%t*fb-C5i|_CghC@B vBN+1Q!+`)@59oef_Xm7F-{9cap)};vv;j@?f*Me - - - {{ site.title | xml_escape }} - {{ site.description | xml_escape }} - {{ site.url }}{{ site.baseurl }}/ - - {{ site.time | date_to_rfc822 }} - {{ site.time | date_to_rfc822 }} - Jekyll v{{ jekyll.version }} - {% for post in site.posts limit:10 %} - - {{ post.title | xml_escape }} - {{ post.content | xml_escape }} - {{ post.date | date_to_rfc822 }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {% for tag in post.tags %} - {{ tag | xml_escape }} - {% endfor %} - {% for cat in post.categories %} - {{ cat | xml_escape }} - {% endfor %} - - {% endfor %} - - diff --git a/img/tile.png b/img/tile.png new file mode 100644 index 0000000000000000000000000000000000000000..ecb7149dc6e07dae7f0d8914934990ef05724d73 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPayNrmS^x=@jAa$~tArU3c`MJ5Nc_lzD1A}u>YGO%h zib8p2Nrr;Er*A-tUMf3KJi^n(F+}2W@3}y(Lke5Raw8wpPSUJuBp7`l{tC*%AJj89QNf(9B9+NRVe%W`3bYE djp3nx7K_KUN$MMF6@mQ4;OXk;vd$@?2>=OJP@w<- literal 0 HcmV?d00001 diff --git a/index.html b/index.html deleted file mode 100644 index 83d93985..00000000 --- a/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: default ---- - -
- -

Posts

- -
    - {% for post in site.posts %} -
  • - - -

    - {{ post.title }} -

    -
  • - {% endfor %} -
- -

subscribe via RSS

- -
diff --git a/index.md b/index.md new file mode 100644 index 00000000..34854524 --- /dev/null +++ b/index.md @@ -0,0 +1,249 @@ +--- +layout: default +--- + +**scssphp** is a compiler for [SCSS][0] written in PHP. + +SCSS is a CSS preprocessor that adds many features like variables, mixins, +imports, color manipulation, functions, and tons of other powerful features. + +The entire compiler comes in a single class file ready for including in any +kind of project in addition to a command line tool for running the compiler +from the terminal. + +**scssphp** primarily implements SCSS 3.2.16, with some 3.3.x/3.4.x compatibility. +It does not implement the SASS syntax, only the SCSS syntax. + +Follow the author on twitter: [@moonscript](http://twitter.com/moonscript). + +
+ + +
+ + + +## Installing + +You can always download the latest version here: +scssphp-{{ site.current_version }}.tar.gz + +You can also find the latest source online: + + +If you use [Packagist][2] for installing packages, then you can update your `composer.json` like so: + +{% highlight json %} +{ + "require": { + "leafo/scss.php": "{{ site.current_version }}" + } +} +{% endhighlight %} + + + +## Language Reference + +For a complete guide to the syntax of SCSS, consult the [official documentation][1]. + +## PHP Reference + +Complete documentation for **scssphp** is located at {{ site.root }}/docs/. + +### Quickstart + +If you just want to start serving compiled `scss` files as quick as possible +then start here. + +**scssphp** comes with a easy to use class that automatically compiles modified +`scss` files and serves them from a directory you specify. + +Create a file, like `style.php`: + +{% highlight php startinline=true %} +require_once "scssphp/scss.inc.php"; + +use Leafo\ScssPhp\Server; + +$directory = "stylesheets"; + +Server::serveFrom($directory); +{% endhighlight %} + +Create the directory set in the script alongside the script, then add your +`scss` files to it. + +If we've got a file in there called `style.scss`, then we just need to hit the +url: `example.com/style.php/style.scss` to get the compiled css. + +If there is an error compiling, the url will result in a `500` error with the +error message. If the file can't be found, then a friendly `404` is returned. + +**scssphp** will automatically create a `scss_cache` directory inside the +stylesheets directory where it will cache the compiled output. This way it can +quickly serve the files if no modifications have been made. Your PHP script +must have permission to write in `scss_cache`. + +### Compiler Interface + +If you're interested in directly using the compiler, then all you need to either +require `scss.inc.php` or use your `composer` generated auto-laoder, and then +invoke the `Compiler` class: + +{% highlight php startinline=true %} +require_once "scssphp/scss.inc.php"; + +use Leafo\ScssPhp\Compiler; + +$scss = new Compiler(); + +echo $scss->compile(' + $color: #abc; + div { color: lighten($color, 20%); } +'); +{% endhighlight %} + +The `compile` method takes `SCSS` as a string, and returns the `CSS`. If there +is an error when compiling then an exception is thrown with an appropriate +message. + + +For a more detailed guide consult {{ site.root }}/docs/. + + + +## Issues + +Find any issues? I'd love to fix them for you, post about them on [the issues tracker][3]. + +
+ +## Changelog + +* **0.1.7** -- July 1, 2015 + * bin/pscss: added --line-numbers and --debug-info options + * Compiler: added setLineNumberStyle() and 'q' unit + * Parser: deprecated show() and to() methods + * simplified licensing (MIT) + * refactoring internals and misc bug fixes (maps, empty list, function-exists()) +* **0.1.6** -- June 22, 2015 + * !global + * more built-in functions + * Server: checkedCachedCompile() (zimzat) + * Server: showErrorsAsCSS() to display errors in a pseudo-element (khamer) + * misc bug fixes +* **0.1.5** -- June 2, 2015 + * misc bug fixes +* **0.1.4** -- June 2, 2015 + * add new string functions (okj579) + * add compileFile() and checkCompile() (NoxNebula, saas786, panique) + * fix regular expression in findImport() (lucvn) + * needsCompile() shouldn't compare meta-etag with browser etag (edwinveldhuizen) +* **0.1.3** -- May 31, 2015 + * map support (okj579) + * misc bug fixes (etu, bgarret, aaukt) +* **0.1.1** -- Aug 12, 2014 + * add stub classes -- a backward compatibility layer (vladimmi) +* **0.1.0** -- Aug 9, 2014 + * raise PHP requirement (5.3+) + * reformat/reorganize source files to be PSR-2 compliant +* **0.0.15** -- Aug 6, 2014 + * fix regression with default values in functions (torkiljohnsen) +* **0.0.14** -- Aug 5, 2014 + * {% raw %}@{% endraw %}keyframes $name - didn't work inside mixin (sergeylukin) + * Bourbon transform(translateX()) didn't work (dovy and greynor) +* **0.0.13** -- Aug 4, 2014 + * handle If-None-Match in client request, and send ETag in response (NSmithUK) + * normalize quotation marks (NoxNebula) + * improve handling of escape sequence in selectors (matt3224) + * add "scss_formatter_crunched" which strips comments + * internal: generate more accurate parse tree +* **0.0.12** -- July 6, 2014 + * revert erroneous import-partials-fix (smuuf) + * handle If-Modified-Since in client request, and send Last-Modified in response (braver) + * add hhvm to travis-ci testing +* **0.0.11** -- July 5, 2014 + * support multi-line continuation character (backslash) per CSS2.1 and CSS3 spec (caiosm1005) + * imported partials should not be compiled (squarestar) + * add setVariables() and unsetVariable() to interface (leafo/lessphp) + * micro-optimizing is_null() (Yahasana) +* **0.0.10** -- April 14, 2014 + * fix media query merging (timonbaetz) + * inline if should treat null as false (wonderslug) + * optimizing toHSL() (jfsullivan) +* **0.0.9** -- December 23, 2013 + * fix {% raw %}@{% endraw %}for/{% raw %}@{% endraw %}while inside {% raw %}@{% endraw %}content block (sergeylukin) + * fix functions in mixin_content (timonbaetz) + * fix infinite loop when target extends itself (oscherler) + * fix function arguments are lost inside of {% raw %}@{% endraw %}content block + * allow setting number precision (kasperisager) + * add public function helpers (toBool, get, findImport, assertList, assertColor, assertNumber, throwError) (Burgov, atdt) + * add optional cache buster prefix to serve() method (iMoses) +* **0.0.8** -- September 16, 2013 + * Avoid IE7 content: counter bug + * Support transparent as color name + * Recursively create cache dir (turksheadsw) + * Fix for INPUT NOT FOUND (morgen32) +* **0.0.7** -- May 24, 2013 + * Port various fixes from leafo/lessphp. + * Improve filter precision. + * Parsing large image data-urls does not work. + * Add == and != ops for colors. + * {% raw %}@{% endraw %}if and {% raw %}@{% endraw %}while directives should treat null like false. + * Add pscss as bin in composer.json (Christian Lück). + * Fix !default bug (James Shannon, Alberto Aldegheri). + * Fix mixin content includes (James Shannon, Christian Brandt). + * Fix passing of varargs to another mixin. + * Fix interpolation bug in expToString() (Matti Jarvinen). +* **0.0.5** -- March 11, 2013 + * Better compile time errors + * Fix top level properties inside of a nested `{% raw %}@{% endraw %}media` (Anthon Pang) + * Fix some issues with `{% raw %}@{% endraw %}extends` (Anthon Pang) + * Enhanced handling of `null` (Anthon Pang) + * Helper functions shouldn't mix with css builtins (Anthon Pang) + * Enhance selector parsing (Guilherme Blanco, Anthon Pang) + * Add Placeholder selector support (Martin Hasoň) + * Add variable argument support (Martin Hasoň) + * Add zip, index, comparable functions (Martin Hasoň) + * A bunch of parser and bug fixes +* **0.0.4** -- Nov 3nd, 2012 + * [Import path can be a function](docs/#import_paths) (Christian Lück). + * Correctly parse media queries with more than one item (Christian Lück). + * Add `ie_hex_str`, `abs`, `min`, `max` functions (Martin Hasoň) + * Ignore expressions inside of `calc()` (Martin Hasoň) + * Improve operator evaluation (Martin Hasoň) + * Add [`{% raw %}@{% endraw %}content`](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content) support. + * Misc bug fixes. +* **0.0.3** -- August 2nd, 2012 + * Add missing and/or/not operators. + * Expression evaluation happens correctly. + * Import file caching and _partial filename support. + * Misc bug fixes. +* **0.0.2** -- July 30th, 2012 + * SCSS server is aware of imports + * added custom function interface + * compressed formatter + * wrote documentation +* Initial Release v0.0.1 -- July 29th, 2012 + + + + + [0]: http://sass-lang.com/ + [1]: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#css_extensions + [2]: http://packagist.org/ + [3]: https://github.com/leafo/scssphp/issues + [4]: https://github.com/leafo/scssphp/ From 330427e2ffecbce1372f5f69d270d0d83678034a Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Mon, 6 Jul 2015 01:00:43 -0400 Subject: [PATCH 05/71] Clean up _config.yml --- .gitignore | 2 +- Makefile | 3 + _config.yml | 16 +- _includes/head.html | 6 +- _includes/header.html | 12 +- css/normalize.css | 500 ------------------------------------------ docs/index.md | 2 +- index.md | 8 +- 8 files changed, 25 insertions(+), 524 deletions(-) create mode 100755 Makefile delete mode 100644 css/normalize.css diff --git a/.gitignore b/.gitignore index 1e771c2b..a0d518ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ _site .sass-cache composer.lock -serve.sh +pscss.phar /vendor/ diff --git a/Makefile b/Makefile new file mode 100755 index 00000000..2634e638 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +serve: + # site should be available at http://localhost:4000/scssphp + bundle exec jekyll serve diff --git a/_config.yml b/_config.yml index 5176963f..5ab1e6f6 100644 --- a/_config.yml +++ b/_config.yml @@ -1,22 +1,20 @@ # Site settings title: SCSS Compiler in PHP -email: leafot@gmail.com -description: > # this means to ignore newlines until "baseurl:" - SCSS compiler written in PHP -baseurl: "" # the subpath of your site, e.g. /blog/ -url: "http://leafo.github.io/scssphp" # the base hostname & protocol for your site -twitter_username: jekyllrb -github_username: jekyll current_version: 0.1.7 -root: /scssphp +description: > + SCSS compiler written in PHP +url: http://leafo.github.io +baseurl: /scssphp/ +email: leafot@gmail.com +twitter_username: moonscript # Build settings markdown: kramdown exclude: - Gemfile - Gemfile.lock +- Makefile - composer.lock -- serve.sh - vendor/ # Github Pages diff --git a/_includes/head.html b/_includes/head.html index 874131c5..06e2ea29 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -7,9 +7,9 @@ - - + + - + diff --git a/_includes/header.html b/_includes/header.html index f9eef8f3..5b83d8ee 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -10,7 +10,7 @@
-

scssphp

+

scssphp

@@ -18,16 +18,16 @@

scssphp

diff --git a/css/normalize.css b/css/normalize.css deleted file mode 100644 index 8fa27e0b..00000000 --- a/css/normalize.css +++ /dev/null @@ -1,500 +0,0 @@ -/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */ - -/* ========================================================================== - HTML5 display definitions - ========================================================================== */ - -/* - * Corrects `block` display not defined in IE6/7/8/9 & FF3. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section, -summary { - display: block; -} - -/* - * Corrects `inline-block` display not defined in IE6/7/8/9 & FF3. - */ - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -/* - * Prevents modern browsers from displaying `audio` without controls. - * Remove excess height in iOS5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/* - * Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4. - * Known issue: no IE6 support. - */ - -[hidden] { - display: none; -} - -/* ========================================================================== - Base - ========================================================================== */ - -/* - * 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using - * `em` units. - * 2. Prevents iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-size: 100%; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ -} - -/* - * Addresses `font-family` inconsistency between `textarea` and other form - * elements. - */ - -html, -button, -input, -select, -textarea { - font-family: sans-serif; -} - -/* - * Addresses margins handled incorrectly in IE6/7. - */ - -body { - margin: 0; -} - -/* ========================================================================== - Links - ========================================================================== */ - -/* - * Addresses `outline` inconsistency between Chrome and other browsers. - */ - -a:focus { - outline: thin dotted; -} - -/* - * Improves readability when focused and also mouse hovered in all browsers. - * people.opera.com/patrickl/experiments/keyboard/test - */ - -a:active, -a:hover { - outline: 0; -} - -/* ========================================================================== - Typography - ========================================================================== */ - -/* - * Addresses font sizes and margins set differently in IE6/7. - * Addresses font sizes within `section` and `article` in FF4+, Chrome, S5. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -h2 { - font-size: 1.5em; - margin: 0.83em 0; -} - -h3 { - font-size: 1.17em; - margin: 1em 0; -} - -h4 { - font-size: 1em; - margin: 1.33em 0; -} - -h5 { - font-size: 0.83em; - margin: 1.67em 0; -} - -h6 { - font-size: 0.75em; - margin: 2.33em 0; -} - -/* - * Addresses styling not present in IE7/8/9, S5, Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/* - * Addresses style set to `bolder` in FF3+, S4/5, Chrome. - */ - -b, -strong { - font-weight: bold; -} - -blockquote { - margin: 1em 40px; -} - -/* - * Addresses styling not present in S5, Chrome. - */ - -dfn { - font-style: italic; -} - -/* - * Addresses styling not present in IE6/7/8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/* - * Addresses margins set differently in IE6/7. - */ - -p, -pre { - margin: 1em 0; -} - -/* - * Corrects font family set oddly in IE6, S4/5, Chrome. - * en.wikipedia.org/wiki/User:Davidgothberg/Test59 - */ - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - _font-family: 'courier new', monospace; - font-size: 1em; -} - -/* - * Improves readability of pre-formatted text in all browsers. - */ - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -/* - * Addresses CSS quotes not supported in IE6/7. - */ - -q { - quotes: none; -} - -/* - * Addresses `quotes` property not supported in S4. - */ - -q:before, -q:after { - content: ''; - content: none; -} - -small { - font-size: 75%; -} - -/* - * Prevents `sub` and `sup` affecting `line-height` in all browsers. - * gist.github.com/413930 - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - Lists - ========================================================================== */ - -/* - * Addresses margins set differently in IE6/7. - */ - -dl, -menu, -ol, -ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -/* - * Addresses paddings set differently in IE6/7. - */ - -menu, -ol, -ul { - padding: 0 0 0 40px; -} - -/* - * Corrects list images handled incorrectly in IE7. - */ - -nav ul, -nav ol { - list-style: none; - list-style-image: none; -} - -/* ========================================================================== - Embedded content - ========================================================================== */ - -/* - * 1. Removes border when inside `a` element in IE6/7/8/9, FF3. - * 2. Improves image quality when scaled in IE7. - * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ - */ - -img { - border: 0; /* 1 */ - -ms-interpolation-mode: bicubic; /* 2 */ -} - -/* - * Corrects overflow displayed oddly in IE9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - Figures - ========================================================================== */ - -/* - * Addresses margin not present in IE6/7/8/9, S5, O11. - */ - -figure { - margin: 0; -} - -/* ========================================================================== - Forms - ========================================================================== */ - -/* - * Corrects margin displayed oddly in IE6/7. - */ - -form { - margin: 0; -} - -/* - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/* - * 1. Corrects color not being inherited in IE6/7/8/9. - * 2. Corrects text not wrapping in FF3. - * 3. Corrects alignment displayed oddly in IE6/7. - */ - -legend { - border: 0; /* 1 */ - padding: 0; - white-space: normal; /* 2 */ - *margin-left: -7px; /* 3 */ -} - -/* - * 1. Corrects font size not being inherited in all browsers. - * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome. - * 3. Improves appearance and consistency in all browsers. - */ - -button, -input, -select, -textarea { - font-size: 100%; /* 1 */ - margin: 0; /* 2 */ - vertical-align: baseline; /* 3 */ - *vertical-align: middle; /* 3 */ -} - -/* - * Addresses FF3/4 setting `line-height` on `input` using `!important` in the - * UA stylesheet. - */ - -button, -input { - line-height: normal; -} - -/* - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Corrects inability to style clickable `input` types in iOS. - * 3. Improves usability and consistency of cursor style between image-type - * `input` and others. - * 4. Removes inner spacing in IE7 without affecting normal text inputs. - * Known issue: inner spacing remains in IE6. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ - *overflow: visible; /* 4 */ -} - -/* - * Re-set default cursor for disabled elements. - */ - -button[disabled], -input[disabled] { - cursor: default; -} - -/* - * 1. Addresses box sizing set to content-box in IE8/9. - * 2. Removes excess padding in IE8/9. - * 3. Removes excess padding in IE7. - * Known issue: excess padding remains in IE6. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ - *height: 13px; /* 3 */ - *width: 13px; /* 3 */ -} - -/* - * 1. Addresses `appearance` set to `searchfield` in S5, Chrome. - * 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz` - * to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/* - * Removes inner padding and search cancel button in S5, Chrome on OS X. - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* - * Removes inner padding and border in FF3+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/* - * 1. Removes default vertical scrollbar in IE6/7/8/9. - * 2. Improves readability and alignment in all browsers. - */ - -textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ -} - -/* ========================================================================== - Tables - ========================================================================== */ - -/* - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/docs/index.md b/docs/index.md index 30897a54..7e0fab50 100644 --- a/docs/index.md +++ b/docs/index.md @@ -184,7 +184,7 @@ You can output the original SCSS line numbers within the compiled CSS file for b This works well in combination with frontend debugging tools such as https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ -To activate this feature, call `->setLineNumberStyle(Compiler::LINE_COMMENTS)` after creating a new instance of class `Compiler`. +To activate this feature, call `setLineNumberStyle(Compiler::LINE_COMMENTS)` after creating a new instance of class `Compiler`. {% highlight php startinline=true %} use Leafo\ScssPhp\Server; diff --git a/index.md b/index.md index 34854524..2b23f5bf 100644 --- a/index.md +++ b/index.md @@ -14,7 +14,7 @@ from the terminal. **scssphp** primarily implements SCSS 3.2.16, with some 3.3.x/3.4.x compatibility. It does not implement the SASS syntax, only the SCSS syntax. -Follow the author on twitter: [@moonscript](http://twitter.com/moonscript). +Follow the author on twitter: [@{{ site.twitter_username }}](http://twitter.com/{{ site.twitter_username }}).
@@ -49,7 +49,7 @@ For a complete guide to the syntax of SCSS, consult the [official documentation] ## PHP Reference -Complete documentation for **scssphp** is located at {{ site.root }}/docs/. +Complete documentation for **scssphp** is located at {{ site.baseurl }}docs/. ### Quickstart @@ -109,7 +109,7 @@ is an error when compiling then an exception is thrown with an appropriate message. -For a more detailed guide consult {{ site.root }}/docs/. +For a more detailed guide consult {{ site.baseurl }}docs/. @@ -224,7 +224,7 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr * SCSS server is aware of imports * added custom function interface * compressed formatter - * wrote documentation + * wrote documentation * Initial Release v0.0.1 -- July 29th, 2012 From c95f657e38fcace80571a5d688efa6e8f774a6a3 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Mon, 6 Jul 2015 01:26:47 -0400 Subject: [PATCH 06/71] fixes #287 --- _includes/head.html | 1 - _sass/_leafo.scss | 1 - 2 files changed, 2 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 06e2ea29..33bef35e 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,7 +1,6 @@ - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - scssphp diff --git a/_sass/_leafo.scss b/_sass/_leafo.scss index 64adb158..626c9940 100644 --- a/_sass/_leafo.scss +++ b/_sass/_leafo.scss @@ -1,4 +1,3 @@ - $site_width: 640px; $light_teal: #7FC7AF; From a72ac9a3add9f1f54b6df62535e238513aa70b9a Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Sat, 11 Jul 2015 12:08:11 -0400 Subject: [PATCH 07/71] Missing version on docs/ --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 7e0fab50..07a14ac9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ layout: default title: Documentation --- -

scssphp {{ current_version }} Documentation

+

scssphp {{ site.current_version }} Documentation

## PHP Interface From 26ebf8836b32063996d5d0b2aca0ddfd91371601 Mon Sep 17 00:00:00 2001 From: Steve Edson Date: Wed, 15 Jul 2015 12:45:26 +0100 Subject: [PATCH 08/71] Fixed composer and typo --- index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 2b23f5bf..fe5f6b24 100644 --- a/index.md +++ b/index.md @@ -36,7 +36,7 @@ If you use [Packagist][2] for installing packages, then you can update your `com {% highlight json %} { "require": { - "leafo/scss.php": "{{ site.current_version }}" + "leafo/scssphp": "{{ site.current_version }}" } } {% endhighlight %} @@ -88,7 +88,7 @@ must have permission to write in `scss_cache`. ### Compiler Interface If you're interested in directly using the compiler, then all you need to either -require `scss.inc.php` or use your `composer` generated auto-laoder, and then +require `scss.inc.php` or use your `composer` generated auto-loader, and then invoke the `Compiler` class: {% highlight php startinline=true %} From 56682e2dc645f5906c0d9802c29c89576fcb705b Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Sat, 18 Jul 2015 10:46:32 -0400 Subject: [PATCH 09/71] Bump version to v0.1.8 --- _config.yml | 2 +- _includes/head.html | 2 ++ docs/index.md | 4 ++-- index.md | 31 ++++++++++++++++++------------- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/_config.yml b/_config.yml index 5ab1e6f6..36247952 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ # Site settings title: SCSS Compiler in PHP -current_version: 0.1.7 +current_version: 0.1.8 description: > SCSS compiler written in PHP url: http://leafo.github.io diff --git a/_includes/head.html b/_includes/head.html index 33bef35e..a04ee6ce 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -11,4 +11,6 @@ + + diff --git a/docs/index.md b/docs/index.md index 07a14ac9..b038ef80 100644 --- a/docs/index.md +++ b/docs/index.md @@ -184,7 +184,7 @@ You can output the original SCSS line numbers within the compiled CSS file for b This works well in combination with frontend debugging tools such as https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ -To activate this feature, call `setLineNumberStyle(Compiler::LINE_COMMENTS)` after creating a new instance of class `Compiler`. +To activate this feature, call the `setLineNumberStyle` method after creating a new instance of class `Compiler`. {% highlight php startinline=true %} use Leafo\ScssPhp\Server; @@ -360,7 +360,7 @@ If passed the flag `-v` (or `--version`), input is ignored and the current versi If passed the flag `-T`, a formatted parse tree is returned instead of the compiled CSS.. -The flag `-f` (or `--style`) can be used to set the [formatter](#Output_formatting): +The flag `-f` (or `--style`) can be used to set the [formatter](#output-formatting): {% highlight bash %} $ bin/pscss -f compressed < styles.scss diff --git a/index.md b/index.md index fe5f6b24..ae1288cf 100644 --- a/index.md +++ b/index.md @@ -2,17 +2,14 @@ layout: default --- -**scssphp** is a compiler for [SCSS][0] written in PHP. +**scssphp** is a compiler for [SCSS][0] 3.x written in PHP. -SCSS is a CSS preprocessor that adds many features like variables, mixins, -imports, color manipulation, functions, and tons of other powerful features. +SCSS is a CSS preprocessor language that adds many features like variables, +mixins, imports, color manipulation, functions, and tons of other powerful +features. -The entire compiler comes in a single class file ready for including in any -kind of project in addition to a command line tool for running the compiler -from the terminal. - -**scssphp** primarily implements SCSS 3.2.16, with some 3.3.x/3.4.x compatibility. -It does not implement the SASS syntax, only the SCSS syntax. +**scssphp** is ready for inclusion in any project. It includes a command +line tool for running the compiler from a terminal/shell or script. Follow the author on twitter: [@{{ site.twitter_username }}](http://twitter.com/{{ site.twitter_username }}). @@ -121,6 +118,15 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr ## Changelog +* **0.1.8** -- July 18, 2015 + * Online documentation moved to http://leafo.github.com/scssphp/ + * Fix index() - map support; now returns null (instead of false) when value not found + * Fix lighten(), darken() - percentages don't require % unit + * Fix str-slice() - edge cases when starts-at or ends-at is 0 + * Fix type-of() - returns arglist for variable arguments + * Fix != + * Fix {% raw %}@{% endraw %}return inside {% raw %}@{% endraw %}each + * Add box support to generate .phar * **0.1.7** -- July 1, 2015 * bin/pscss: added --line-numbers and --debug-info options * Compiler: added setLineNumberStyle() and 'q' unit @@ -208,7 +214,7 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr * Add zip, index, comparable functions (Martin Hasoň) * A bunch of parser and bug fixes * **0.0.4** -- Nov 3nd, 2012 - * [Import path can be a function](docs/#import_paths) (Christian Lück). + * [Import path can be a function](docs/#import-paths) (Christian Lück). * Correctly parse media queries with more than one item (Christian Lück). * Add `ie_hex_str`, `abs`, `min`, `max` functions (Martin Hasoň) * Ignore expressions inside of `calc()` (Martin Hasoň) @@ -225,9 +231,8 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr * added custom function interface * compressed formatter * wrote documentation -* Initial Release v0.0.1 -- July 29th, 2012 +* **0.0.1** -- July 29th, 2012 -- Initial Release - [0]: http://sass-lang.com/ - [1]: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#css_extensions + [1]: http://sass-lang.com/documentation/file.SASS_REFERENCE.html [2]: http://packagist.org/ [3]: https://github.com/leafo/scssphp/issues [4]: https://github.com/leafo/scssphp/ From 071d114b9a65f7881878c791b5767bc3df0a7658 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Wed, 29 Jul 2015 21:02:18 -0400 Subject: [PATCH 10/71] Adopt Sass Community Guidelines --- _includes/header.html | 2 ++ community/index.md | 72 +++++++++++++++++++++++++++++++++++++++++++ docs/index.md | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 community/index.md diff --git a/_includes/header.html b/_includes/header.html index 5b83d8ee..0e1d6a83 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -28,6 +28,8 @@

scssphp

Quickstart · Docs + · + Community Guidelines
diff --git a/community/index.md b/community/index.md new file mode 100644 index 00000000..64851e17 --- /dev/null +++ b/community/index.md @@ -0,0 +1,72 @@ +--- +layout: default +title: Community Guidelines +--- + +# Community Guidelines + +Sass is more than a technology; Sass is driven by the community of individuals +that power its development and use every day. As a community, we want to embrace +the very differences that have made our collaboration so powerful, and work +together to provide the best environment for learning, growing, and sharing of +ideas. It is imperative that we keep Sass a fun, welcoming, challenging, and +fair place to play. + +As such, the Sass Community Guidelines states our ideals as a community. It's +meant to be a guide on how we work together and conduct ourselves, not a +specific rulebook. It is a way to communicate our existing values to the entire +community, and share our values with the ‘verse. + +## We strive to: + +### BE CONSIDERATE + +Our work will be used by other people, and we in turn will depend on the work of others. Any decision we take will affect users and colleagues, and we should consider them when making decisions. + +### BE OPEN AND INVITING + +Our community has grown immensely because of the diversity that is found within the community. We welcome all individuals regardless of, but not limited to, their gender identity and expression, sexual orientation, preferred relationship model, disability, physical appearance, body size, age, race, or religious affiliation. We take pride in the the richness of experiences that have come to help develop Sass, and want to continue growing our community. In short, everyone is welcome, except those who are unwelcoming. + +### BE RESPECTFUL + +Disagreement is no excuse for poor manners. We work together to resolve conflict, assume good intentions and do our best to act in an empathetic fashion. We don't allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. Harassment of other community members is never okay. + +### TAKE RESPONSIBILITY FOR OUR WORDS AND OUR ACTIONS + +We can all make mistakes; when we do, we take responsibility for them. If someone has been harmed or offended, we listen carefully and respectfully, and work to right the wrong. + +### BE COLLABORATIVE + +What we produce is a complex whole made of many parts; it is the sum of many dreams. Collaboration between teams that each have their own goal and vision is essential; for the whole to be more than the sum of its parts, each part must make an effort to understand the whole. + +Collaboration reduces redundancy and improves the quality of our work. Internally and externally, we celebrate good collaboration. Wherever possible, we work closely with upstream projects and others in the free software community to coordinate our efforts. We prefer to work transparently and involve interested parties as early as possible. + +### VALUE DECISIVENESS, CLARITY AND OPEN COMMUNICATION + +Disagreements, social and technical, are normal, but we do not allow them to persist and fester leaving others uncertain of the agreed direction. + +We expect participants in the project to resolve disagreements constructively. When they cannot, we escalate the matter to either designated leaders at the event or within the community to arbitrate and provide clarity and direction. + +### BE RESPONSIVE AND HELPFUL + +All of us started as new and inexperienced. Even the most experienced of us may forget things. Nobody is expected to be perfect in this community. Questions are encouraged and those who are asked should endeavor to be responsive, courteous, and helpful. When off topic, please direct to the appropriate forum. Even when the question is common and repeatedly asked, even when the documentation explains it, remember that they have only asked it once and they may have read, but not understood. Ultimately, it is better to give no answer than an unfriendly one. + +### STEP DOWN CONSIDERATELY + +When somebody leaves or disengages from the community, we ask that they do so in a way that minimizes disruption to the projects using their published work. They should tell people they are leaving and take the proper steps to ensure that others can pick up where they left off. + +## LICENSE + +Our friends at [Ubuntu][1] and [Drupal][2] have already worked hard to develop +their own community guidelines, and we borrow heavily from them. However, we +have made modifications for our specific needs as a community. + +The Sass Community Guidelines are licensed under the [Creative Commons Attribution-Share Alike 3.0 license][0]. +You may re-use it for your own project, and modify it as you wish, just please +allow others to use your modifications and give credit to [Sass][3], +[Ubuntu][1], and [Drupal][2]. + + [0]: https://creativecommons.org/licenses/by-sa/3.0/us/ + [1]: http://www.ubuntu.com/about/about-ubuntu/conduct + [2]: https://www.drupal.org/dcoc + [3]: http://sass-lang.com/community-guidelines diff --git a/docs/index.md b/docs/index.md index b038ef80..3504434c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ layout: default title: Documentation --- -

scssphp {{ site.current_version }} Documentation

+# scssphp {{ site.current_version }} Documentation ## PHP Interface From 7a8374e88c729a89f89744782372ceae703e6056 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Wed, 29 Jul 2015 21:20:12 -0400 Subject: [PATCH 11/71] Remove unused config parameter --- _config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_config.yml b/_config.yml index 36247952..84ade6cc 100644 --- a/_config.yml +++ b/_config.yml @@ -5,7 +5,6 @@ description: > SCSS compiler written in PHP url: http://leafo.github.io baseurl: /scssphp/ -email: leafot@gmail.com twitter_username: moonscript # Build settings From 6335f034284db5e142982789fbe78a19b1e1039c Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Wed, 29 Jul 2015 21:30:02 -0400 Subject: [PATCH 12/71] Parameterize the Github repo URL --- _config.yml | 1 + _includes/footer.html | 2 +- _includes/header.html | 2 +- index.md | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index 84ade6cc..8089577b 100644 --- a/_config.yml +++ b/_config.yml @@ -5,6 +5,7 @@ description: > SCSS compiler written in PHP url: http://leafo.github.io baseurl: /scssphp/ +repo_url: https://github.com/leafo/scssphp twitter_username: moonscript # Build settings diff --git a/_includes/footer.html b/_includes/footer.html index 861d64d8..3ac16519 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -23,4 +23,4 @@ - Fork me on GitHub + Fork me on GitHub diff --git a/_includes/header.html b/_includes/header.html index 0e1d6a83..af7ab848 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -2,7 +2,7 @@
- +
Download
scssphp-{{ site.current_version }}.tar.gz
diff --git a/index.md b/index.md index ae1288cf..a7b41a3d 100644 --- a/index.md +++ b/index.md @@ -23,10 +23,10 @@ Follow the author on twitter: [@{{ site.twitter_username }}](http://twitter.com/ ## Installing You can always download the latest version here: -
scssphp-{{ site.current_version }}.tar.gz +scssphp-{{ site.current_version }}.tar.gz You can also find the latest source online: - +<{{ site.repo_url }}/> If you use [Packagist][2] for installing packages, then you can update your `composer.json` like so: @@ -250,5 +250,5 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr [0]: http://sass-lang.com/ [1]: http://sass-lang.com/documentation/file.SASS_REFERENCE.html [2]: http://packagist.org/ - [3]: https://github.com/leafo/scssphp/issues - [4]: https://github.com/leafo/scssphp/ + [3]: {{ site.repo_url }}/issues + [4]: {{ site.repo_url }}/ From fcfa700888366204f5c48cf4f77e9dd07da2c6d6 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Sat, 1 Aug 2015 12:10:02 -0400 Subject: [PATCH 13/71] Bump version to v0.1.9 --- _config.yml | 2 +- index.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 8089577b..4eef8bfb 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ # Site settings title: SCSS Compiler in PHP -current_version: 0.1.8 +current_version: 0.1.9 description: > SCSS compiler written in PHP url: http://leafo.github.io diff --git a/index.md b/index.md index a7b41a3d..cfc9a806 100644 --- a/index.md +++ b/index.md @@ -118,6 +118,12 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr ## Changelog +* **0.1.9** -- August 1, 2015 + * Adoption of the Sass Community Guidelines + * Nested selector fixes with lists, interpolated string, and parent selector + * Implement list-separator() and set-nth() built-ins + * Implement {% raw %}@{% endraw %}warn and {% raw %}@{% endraw %}error + * Removed spaceship operator pending discussion with reference implementators * **0.1.8** -- July 18, 2015 * Online documentation moved to http://leafo.github.com/scssphp/ * Fix index() - map support; now returns null (instead of false) when value not found From a51fe91a5735f58ea189ec9ede208fdc61545249 Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Sun, 23 Aug 2015 12:20:41 -0400 Subject: [PATCH 14/71] v0.1.10 released --- .gitignore | 1 + _config.yml | 2 +- index.md | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a0d518ad..fe624fe5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ _site .sass-cache composer.lock pscss.phar +/src/ /vendor/ diff --git a/_config.yml b/_config.yml index 4eef8bfb..407b105b 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ # Site settings title: SCSS Compiler in PHP -current_version: 0.1.9 +current_version: 0.1.10 description: > SCSS compiler written in PHP url: http://leafo.github.io diff --git a/index.md b/index.md index cfc9a806..908659af 100644 --- a/index.md +++ b/index.md @@ -118,6 +118,9 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr ## Changelog +* **0.1.10** -- August 23, 2015 + * Fix 3 year old {% raw %}@{% endraw %}extend bug + * Fix autoloader. (ext) * **0.1.9** -- August 1, 2015 * Adoption of the Sass Community Guidelines * Nested selector fixes with lists, interpolated string, and parent selector From 22111e04cddfc2386e0e665fa82bd968b27092da Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Tue, 25 Aug 2015 11:55:25 -0400 Subject: [PATCH 15/71] v0.2.0 released --- _config.yml | 2 +- index.md | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 407b105b..33bfdddd 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,6 @@ # Site settings title: SCSS Compiler in PHP -current_version: 0.1.10 +current_version: 0.2.0 description: > SCSS compiler written in PHP url: http://leafo.github.io diff --git a/index.md b/index.md index 908659af..ad42fcbe 100644 --- a/index.md +++ b/index.md @@ -38,6 +38,10 @@ If you use [Packagist][2] for installing packages, then you can update your `com } {% endhighlight %} +Note: git archives of stable versions no longer include the `tests/` folder. +To install the unit tests, download the complete package source using `composer`'s +`--prefer-source` option. + ## Language Reference @@ -118,6 +122,10 @@ Find any issues? I'd love to fix them for you, post about them on [the issues tr ## Changelog +* **0.2.0** -- August 25, 2015 + * Smaller git archives + * Detect {% raw %}@{% endraw %}import loops + * Doc blocks everywhere! * **0.1.10** -- August 23, 2015 * Fix 3 year old {% raw %}@{% endraw %}extend bug * Fix autoloader. (ext) From c212dc6e3aef4950d38ba0b61be5391e230c734f Mon Sep 17 00:00:00 2001 From: Anthon Pang Date: Wed, 26 Aug 2015 14:34:37 -0400 Subject: [PATCH 16/71] Remove twitter/social --- _config.yml | 1 - _includes/footer.html | 2 -- _includes/header.html | 7 ------- _sass/_leafo.scss | 5 ----- index.md | 2 -- 5 files changed, 17 deletions(-) diff --git a/_config.yml b/_config.yml index 33bfdddd..121f80a4 100644 --- a/_config.yml +++ b/_config.yml @@ -6,7 +6,6 @@ description: > url: http://leafo.github.io baseurl: /scssphp/ repo_url: https://github.com/leafo/scssphp -twitter_username: moonscript # Build settings markdown: kramdown diff --git a/_includes/footer.html b/_includes/footer.html index 3ac16519..37696acd 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -21,6 +21,4 @@ })(); - - Fork me on GitHub diff --git a/_includes/header.html b/_includes/header.html index af7ab848..c6932ef9 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -16,13 +16,6 @@

scssphp