From ecda8ff57bdfc29c779e2137b318b15f3c2fe66c Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 17:52:23 -0500 Subject: [PATCH 01/78] initial commit, setting up Jekyll --- .gitignore | 41 ++++++- images/rails.png | Bin 11119 -> 0 bytes images/ruby.png | Bin 5557 -> 0 bytes images/rubygems.png | Bin 9252 -> 0 bytes index.html | 288 +++----------------------------------------- 5 files changed, 57 insertions(+), 272 deletions(-) delete mode 100644 images/rails.png delete mode 100644 images/ruby.png delete mode 100644 images/rubygems.png diff --git a/.gitignore b/.gitignore index ca35be0..7e4b3b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,40 @@ -_site +_site/ +.sass-cache/ + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db \ No newline at end of file diff --git a/images/rails.png b/images/rails.png deleted file mode 100644 index 2ca83815bfea3de134c06184f84d830475e4911d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11119 zcmV-#E0ENQP)4Tx0C=38Q+HUC_ZB|i_hk=OLfG)Jmu!ImA|tE_ z$Pihg5Rw34gb)%y#f69pRumNxoJdu~g4GI0orvO~D7a@qiilc^Ra`jkAKa(4eR}Wh z?fcjJyyu+f{LXpL4}cL8CXwc%Y5+M>g*-agACFH+#L2yY0u@N$1RxOR%fe>`#Q*^C z19^CUbg)1C0k3ZW0swH;E+i7i;s1lWP$pLZAdvvzA`<5d0gzGv$SzdK6adH=0I*ZD zWC{S3003-xd_p1ssto|_^hrJi0NAOM+!p}Yq8zCR0F40vnJ7mj0zkU}U{!%qECRs7 z0HCZuA}$2Lt^t5qwlYT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-8?^3mVJW*Mc~EgJyq{1|l+C6DWaizp8{=M0VC<5*_a5>r3%gcmzGnN6SNbwQ)o9_BoQG%VaXRGKX064RSRKBAk2BtfFfY+ ziRXFr{r{H6zAFf-RkAc@`nFry|AQYuhY_XmrZ3CNP(xp$wDijW?yfG;S~$z>zN-*X zl*Y#BoL->RNvU2Y40O(tC4Iz!3d3Prgp9Olj#3z}MU`x%a5O%}bw7O%QNN4U8i(ch zC;o!vN1kTuU3XC3wjCSCfWxFI)y-Q9#VMllg!@RB&j7Hmw@A?qeDO|)-r5TH|K^9e zkA+X#9m5WwZ zIq}EHN<`%+yU)J9CWnDMixi^V$3UGqtH{vbay{^b)Ow^L*k1A7I;_J(RVk zl=KL~2&4L(KefU`_x)F*MuT{H1#K1OdY$8+dw}+7zevl^A4Lp=VaSEUhxy`%KZG@g z&V}<}3_+mjo?YaN_x&0=Dlxjr8BsVaohJ^X6XDp${(v)o_gTnHv4vkmNLE+4@Wro? zEVO*!fycI%8oHSQ+$ZHH8e6hvDbUT5qHi53j?6)v#yQIfK^P&TNV9~<8n) zORS5qX1yHwut^b?%AmkxDc0nT*i7)RCVvz@bi`#SulNi`$_H!^nr9Iv`RZ z9dUH8II?>F>6VN68E9|TIUW0;8VP1C7Ap#EewX?QYB`cql+aLM_>E{gM2a@$^!$C z$S?&nP)afcSPUn{Pm60dAQ*n=)FQM9<$i{88^IbJ#=&}KIMq*BGNdQV0001rNklY48 zKXAMf_vV$}>C#zx9V{zgKc$@ct^d+mcxLqb{}0Xs)jIY`$0h&(002ovPDHLkV1mBH Bgk}H$ diff --git a/images/ruby.png b/images/ruby.png deleted file mode 100644 index 258dad85c7d4e2bd2ae06d190188e45a9a7483c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5557 zcmV;m6-w%fP)(Kx{bqlQr<4uB!r@ggSiBVUtkSkdobiS2#E0KEBl}Y1W7n;xcK|y6>>sMa_xE+rc@2Il zS$gU<=_3zaDTfZWHXb`bwt5m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z48u?k3=Gi4NJJMGnvnT8XVv#yg z(uu;>i$?G#!o^Gou( +--- +layout: default +--- - - - +
- Liquid Templating language - - - - - - -
- - -
- - -
-

Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for - unique designs. For this we developed Liquid which allows our customers complete design freedom while - maintaining the integrity of our servers.

- -

Liquid has been in production use since June 2006 and is now used by many - other hosted web applications.

- -

It was developed for usage in Ruby on Rails web applications and - integrates seamlessly as a plugin but it also works excellently as a stand alone library.

- -

What does it look like?

- -

Example snippet:

- - - - - -
-
-<ul id="products">
-  {% for product in products %}
-    <li>
-      <h2>{{ product.title }}</h2>
-      Only {{ product.price | format_as_money }}
-
-      <p>{{ product.description | prettyprint | truncate: 200  }}</p>
-
-    </li>
-  {% endfor %}
-</ul>
-
-
- -

Code to render

- - - - - -
-
-Liquid::Template.parse(template).render 'products' => Product.find(:all)
-
- -
- -

How do I get it?

- - - - - - - - - - - - - - - - - - - - - - - - - -
Rubygems -

Rubygems

- -

gem install liquid

-
Ruby on Rails -

Ruby on Rails plugin

-

Rails 3.0

-

Add gem 'liquid' to your Gemfile.

- -

Rails 2.3

-

./script/plugin install \ -   git://github.com/Shopify/liquid.git

-
Ruby -

Download Release

- -

from RubyGems

-
Ruby -

Git Clone

- -

from Github

-
-
- -
- Liquid is a sponsored and made possible by constant development from Shopify. -
-
- - -
- - +
From 955a1fae98fcc6b0e50aba4a2f453fc06fb54a07 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 17:53:33 -0500 Subject: [PATCH 02/78] Forgot to add files... --- _config.yml | 14 ++ _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-01-26-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 +++ 14 files changed, 782 insertions(+) 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-01-26-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 diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2f03e74 --- /dev/null +++ b/_config.yml @@ -0,0 +1,14 @@ +# 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 diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..be3976f --- /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 0000000..47057b5 --- /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 0000000..cfe381f --- /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 0000000..e4ab96f --- /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 0000000..74c1a11 --- /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 0000000..a2b4e52 --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,15 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+ +
+ +
+ {{ content }} +
+ +
diff --git a/_posts/2015-01-26-welcome-to-jekyll.markdown b/_posts/2015-01-26-welcome-to-jekyll.markdown new file mode 100644 index 0000000..e48eead --- /dev/null +++ b/_posts/2015-01-26-welcome-to-jekyll.markdown @@ -0,0 +1,25 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2015-01-26 17:50:59 +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 0000000..e5fd0fd --- /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 0000000..def56f8 --- /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 0000000..e36627d --- /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 0000000..3ed64bb --- /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 0000000..beee4e3 --- /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 0000000..a6628bd --- /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 %} + + From e661b5a2759df196b000fb06c472d7f8f8349a6f Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 20:19:33 -0500 Subject: [PATCH 03/78] big gutting job --- _includes/footer.html | 37 ------- _includes/header.html | 27 ----- _layouts/default.html | 8 +- _sass/_base.scss | 38 +------ _sass/_layout.scss | 236 ------------------------------------------ css/main.scss | 7 +- 6 files changed, 7 insertions(+), 346 deletions(-) delete mode 100644 _includes/header.html delete mode 100644 _sass/_layout.scss diff --git a/_includes/footer.html b/_includes/footer.html index be3976f..9944f68 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -11,43 +11,6 @@
  • {{ site.email }}
  • - - - - diff --git a/_includes/header.html b/_includes/header.html deleted file mode 100644 index cfe381f..0000000 --- a/_includes/header.html +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/_layouts/default.html b/_layouts/default.html index e4ab96f..8c8758f 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -5,12 +5,8 @@ - {% include header.html %} - -
    -
    - {{ content }} -
    +
    + {{ content }}
    {% include footer.html %} diff --git a/_sass/_base.scss b/_sass/_base.scss index e5fd0fd..29b16d0 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -8,8 +8,6 @@ dl, dd, ol, ul, figure { padding: 0; } - - /** * Basic styling */ @@ -23,8 +21,6 @@ body { -webkit-text-size-adjust: 100%; } - - /** * Set `margin-bottom` to maintain vertical rhythm */ @@ -35,8 +31,6 @@ ul, ol, dl, figure, margin-bottom: $spacing-unit / 2; } - - /** * Images */ @@ -45,8 +39,6 @@ img { vertical-align: middle; } - - /** * Figures */ @@ -58,8 +50,6 @@ figcaption { font-size: $small-font-size; } - - /** * Lists */ @@ -74,8 +64,6 @@ li { } } - - /** * Headings */ @@ -83,8 +71,6 @@ h1, h2, h3, h4, h5, h6 { font-weight: 300; } - - /** * Links */ @@ -153,6 +139,8 @@ pre { /** * Wrapper */ + + /* .wrapper { max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); @@ -170,35 +158,15 @@ pre { } } - +*/ /** * 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 def56f8..0000000 --- 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/css/main.scss b/css/main.scss index beee4e3..a86c568 100755 --- a/css/main.scss +++ b/css/main.scss @@ -27,8 +27,6 @@ $content-width: 800px; $on-palm: 600px; $on-laptop: 800px; - - // Using media queries with like this: // @include media-query($on-palm) { // .wrapper { @@ -42,11 +40,10 @@ $on-laptop: 800px; } } - - // Import partials from `sass_dir` (defaults to `_sass`) @import "base", - "layout", "syntax-highlighting" ; + + From 79ec1506dea803f3ce367b5d3a07755f81cb3f96 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 20:32:10 -0500 Subject: [PATCH 04/78] cleaning up stylesheets --- _layouts/default.html | 9 ++++----- _sass/_base.scss | 15 +++++++-------- css/main.scss | 41 ++++++++++++++++++++++++++++++++++------- 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 8c8758f..fe34e10 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,13 +4,12 @@ {% include head.html %} - -
    + +
    {{ content }}
    - - {% include footer.html %} - diff --git a/_sass/_base.scss b/_sass/_base.scss index 29b16d0..fd11f18 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -16,8 +16,7 @@ body { font-size: $base-font-size; line-height: $base-line-height; font-weight: 300; - color: $text-color; - background-color: $background-color; + color: $color-slate; -webkit-text-size-adjust: 100%; } @@ -75,15 +74,15 @@ h1, h2, h3, h4, h5, h6 { * Links */ a { - color: $brand-color; + // color: $brand-color; text-decoration: none; &:visited { - color: darken($brand-color, 15%); + // color: darken($brand-color, 15%); } &:hover { - color: $text-color; + // color: $text-color; text-decoration: underline; } } @@ -94,8 +93,8 @@ a { * Blockquotes */ blockquote { - color: $grey-color; - border-left: 4px solid $grey-color-light; + //color: $grey-color; + // border-left: 4px solid $grey-color-light; padding-left: $spacing-unit / 2; font-size: 18px; letter-spacing: -1px; @@ -114,7 +113,7 @@ blockquote { pre, code { font-size: 15px; - border: 1px solid $grey-color-light; + // border: 1px solid $grey-color-light; border-radius: 3px; background-color: #eef; } diff --git a/css/main.scss b/css/main.scss index a86c568..2e7c180 100755 --- a/css/main.scss +++ b/css/main.scss @@ -1,8 +1,8 @@ --- -# Only the main Sass file needs front matter (the dashes are enough) +# Liquid Docs Main Styles --- -@charset "utf-8"; +@charset "utf-8"; // Our variables @@ -10,20 +10,26 @@ $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: 40px; -$spacing-unit: 30px; +// Liquid Docs Blues. 1 --> 5, lightest --> darkest. -$text-color: #111; -$background-color: #fdfdfd; -$brand-color: #2a7ae2; +$color-blue-1: #E8F8FF; +$color-blue-2: #B4DCED; +$color-blue-3: #91C9E8; +$color-blue-4: #67B8DE; +$color-blue-5: #3399CC; +$color-white: #fff; +$color-slate: #5E5E5E; +/* $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; @@ -47,3 +53,24 @@ $on-laptop: 800px; ; +/***** Layout Styles ******/ + + +* { + box-sizing: border-box; +} + +body { + display: flex; +} + +.sidebar { + background: $color-blue-5; + flex: 0 1 250px; + height: 100vh; + padding: $spacing-unit; +} + +.content { + +} From a8dc349f010e9b2d59764ac3f6f98d74e06592e7 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 20:41:04 -0500 Subject: [PATCH 05/78] starting sidebar coding --- _includes/head.html | 1 + _layouts/default.html | 2 +- css/main.scss | 25 ++++++++++++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 47057b5..df8b5a5 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -7,6 +7,7 @@ + diff --git a/_layouts/default.html b/_layouts/default.html index fe34e10..009b03e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -5,7 +5,7 @@
    {{ content }} diff --git a/css/main.scss b/css/main.scss index 2e7c180..4590be8 100755 --- a/css/main.scss +++ b/css/main.scss @@ -4,9 +4,8 @@ @charset "utf-8"; - // Our variables -$base-font-family: Helvetica, Arial, sans-serif; +$base-font-family: 'Droid Sans', sans-serif; $base-font-size: 16px; $small-font-size: $base-font-size * 0.875; $base-line-height: 1.5; @@ -53,7 +52,6 @@ $on-laptop: 800px; ; -/***** Layout Styles ******/ * { @@ -64,13 +62,30 @@ body { display: flex; } +/***** Sidebar ******/ + + .sidebar { background: $color-blue-5; flex: 0 1 250px; height: 100vh; - padding: $spacing-unit; } +.sidebar--logo { + font-size: $base-font-size * 2; + font-weight: bold; + text-align: center; + padding: $spacing-unit; + border-bottom: 1px solid $color-blue-4; + a { + color: $color-white; + } +} + + +/***** Content ******/ + .content { - + padding: $spacing-unit; + flex: 0 1 auto; } From fe4253f8724dbbb08866dfa87d3328d777f9fce5 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Mon, 26 Jan 2015 20:58:06 -0500 Subject: [PATCH 06/78] Realized I don't need flexbox. Position fixed sidebar Refactoring Cleaned up some styles --- _layouts/default.html | 19 ++- _posts/2015-01-26-welcome-to-jekyll.markdown | 24 ++- _sass/_base.scss | 154 +++++-------------- css/main.scss | 109 +++++++++++-- index.html | 25 +-- 5 files changed, 176 insertions(+), 155 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 009b03e..ed90a1b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,9 +6,26 @@
    - {{ content }} +
    + {{ content }} +
    diff --git a/_posts/2015-01-26-welcome-to-jekyll.markdown b/_posts/2015-01-26-welcome-to-jekyll.markdown index e48eead..e6af1b9 100644 --- a/_posts/2015-01-26-welcome-to-jekyll.markdown +++ b/_posts/2015-01-26-welcome-to-jekyll.markdown @@ -1,14 +1,28 @@ --- layout: post -title: "Welcome to Jekyll!" +title: "Test Post" date: 2015-01-26 17:50:59 -categories: jekyll update +categories: liquid docs yo --- -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. +# Heading 1 -Jekyll also offers powerful support for code snippets: +## Heading 2 + +### Heading 3 + +#### Heading 4 + +This is a dummy paragraph. 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. + +This is a dummy paragraph. 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. + +This is a dummy paragraph. 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. + + +> Blockquote + +Code snippet: {% highlight ruby %} def print_hi(name) diff --git a/_sass/_base.scss b/_sass/_base.scss index fd11f18..55c42ec 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -12,160 +12,88 @@ dl, dd, ol, ul, figure { * Basic styling */ body { - font-family: $base-font-family; - font-size: $base-font-size; - line-height: $base-line-height; - font-weight: 300; - color: $color-slate; - -webkit-text-size-adjust: 100%; + font-family: $base-font-family; + font-size: $base-font-size; + line-height: $base-line-height; + font-weight: 300; + color: $color-slate; + -webkit-text-size-adjust: 100%; } -/** - * Set `margin-bottom` to maintain vertical rhythm - */ +/** 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; + margin-bottom: $spacing-unit / 2; } -/** - * Images - */ +/** Images */ + img { - max-width: 100%; - vertical-align: middle; + max-width: 100%; + vertical-align: middle; } -/** - * Figures - */ +/** Figures */ + figure > img { - display: block; + display: block; } figcaption { - font-size: $small-font-size; + font-size: $small-font-size; } -/** - * Lists - */ +/** Lists */ ul, ol { - margin-left: $spacing-unit; + margin-left: $spacing-unit; } li { - > ul, - > ol { - margin-bottom: 0; - } + > ul, > ol { + margin-bottom: 0; + } } -/** - * Headings - */ +/** Headings */ + h1, h2, h3, h4, h5, h6 { - font-weight: 300; + font-weight: 300; } -/** - * Links - */ +/** Links */ a { - // color: $brand-color; + color: $color-blue-5; text-decoration: none; &:visited { - // color: darken($brand-color, 15%); + color: #609; } &:hover { - // color: $text-color; text-decoration: underline; } } +/** Wrapper */ -/** - * 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; - } + max-width: $content-width; + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; } -*/ - -/** - * Clearfix - */ +/** Clearfix */ %clearfix { - &:after { - content: ""; - display: table; - clear: both; - } + &:after { + content: ""; + display: table; + clear: both; + } } diff --git a/css/main.scss b/css/main.scss index 4590be8..21185a8 100755 --- a/css/main.scss +++ b/css/main.scss @@ -28,9 +28,10 @@ $grey-color-dark: darken($grey-color, 25%); */ // Width of the content area -$content-width: 800px; +$sidebar-width: 250px; +$content-width: 900px; $on-palm: 600px; -$on-laptop: 800px; +$on-laptop: 900px; // Using media queries with like this: // @include media-query($on-palm) { @@ -39,16 +40,17 @@ $on-laptop: 800px; // padding-left: $spacing-unit / 2; // } // } + @mixin media-query($device) { - @media screen and (max-width: $device) { - @content; - } + @media screen and (max-width: $device) { + @content; + } } // Import partials from `sass_dir` (defaults to `_sass`) @import - "base", - "syntax-highlighting" + "base", + "syntax-highlighting" ; @@ -58,17 +60,16 @@ $on-laptop: 800px; box-sizing: border-box; } -body { - display: flex; -} - -/***** Sidebar ******/ - +/*============================================================================ + Sidebar + ==============================================================================*/ .sidebar { background: $color-blue-5; - flex: 0 1 250px; + //flex: 0 0 250px; + width: $sidebar-width; height: 100vh; + position: fixed; } .sidebar--logo { @@ -77,15 +78,89 @@ body { text-align: center; padding: $spacing-unit; border-bottom: 1px solid $color-blue-4; + a { color: $color-white; } } +.sidebar--nav { + padding: $spacing-unit / 2; -/***** Content ******/ + > ul { + margin: 0; + } + + li { + list-style: none; + + a { + color: $color-white; + } + } + +} + + +/*============================================================================ + Content & Markdown Styles + ==============================================================================*/ .content { - padding: $spacing-unit; - flex: 0 1 auto; + padding: $spacing-unit $spacing-unit $spacing-unit ($spacing-unit + $sidebar-width); + + h1 { + font-size: 2em; + } + + h2 { + font-size: 2em; + text-decoration: underline; + } + + h3 { + font-size: 1.5em; + } + + h4 { + font-size: 1.5em; + text-decoration: underline; + } + + blockquote { + color: lighten($color-slate, 20); + border-left: 4px solid lighten($color-slate, 20); + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } + } + + pre, code { + font-size: 15px; + border: 1px solid $color-blue-2; + border-radius: 3px; + background-color: lighten($color-blue-1, 0.9); + } + + code { + padding: 1px 5px; + } + + pre { + padding: 8px 12px; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } + } + } + + diff --git a/index.html b/index.html index 83d9398..30173a4 100644 --- a/index.html +++ b/index.html @@ -2,22 +2,9 @@ layout: default --- -
    - -

    Posts

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

      - {{ post.title }} -

      -
    • - {% endfor %} -
    - -

    subscribe via RSS

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

    + {{ post.title }} +

    + {{ post.content }} +{% endfor %} From 1fad0e2638a414c80663b9be88fdce6f51b72d59 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Tue, 27 Jan 2015 15:06:23 -0500 Subject: [PATCH 07/78] Further work on the homepage --- _layouts/post.html | 1 - _posts/2015-01-26-welcome-to-jekyll.markdown | 39 -------- _sass/_base.scss | 71 +++++++++++---- css/main.scss | 94 ++++++++------------ index.html | 23 +++-- 5 files changed, 110 insertions(+), 118 deletions(-) delete mode 100644 _posts/2015-01-26-welcome-to-jekyll.markdown diff --git a/_layouts/post.html b/_layouts/post.html index a2b4e52..74c1a11 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -5,7 +5,6 @@ layout: default

    {{ page.title }}

    -
    diff --git a/_posts/2015-01-26-welcome-to-jekyll.markdown b/_posts/2015-01-26-welcome-to-jekyll.markdown deleted file mode 100644 index e6af1b9..0000000 --- a/_posts/2015-01-26-welcome-to-jekyll.markdown +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: post -title: "Test Post" -date: 2015-01-26 17:50:59 -categories: liquid docs yo ---- - -# Heading 1 - -## Heading 2 - -### Heading 3 - -#### Heading 4 - -This is a dummy paragraph. 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. - -This is a dummy paragraph. 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. - -This is a dummy paragraph. 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. - - -> Blockquote - -Code snippet: - -{% 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 index 55c42ec..56564b2 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -77,23 +77,60 @@ a { } } -/** Wrapper */ - - -.wrapper { - max-width: $content-width; - margin-right: auto; - margin-left: auto; - padding-right: $spacing-unit; - padding-left: $spacing-unit; - @extend %clearfix; +h1 { + font-size: 2em; } -/** Clearfix */ -%clearfix { - &:after { - content: ""; - display: table; - clear: both; - } +h2 { + font-size: 2em; + text-decoration: underline; +} + +h3 { + font-size: 1.5em; +} + +h4 { + font-size: 1.5em; + text-decoration: underline; +} + +blockquote { + color: lighten($color-slate, 20); + border-left: 2px solid lighten($color-slate, 20); + padding-left: $spacing-unit / 2; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + +pre, code { + font-size: 15px; + border: 1px solid $color-blue-2; + border-radius: 3px; + background-color: lighten($color-blue-1, 0.9); +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + +hr { + display: block; + height: 1px; + border: 0; + background-color: lighten($color-slate, 40%); } diff --git a/css/main.scss b/css/main.scss index 21185a8..a0be935 100755 --- a/css/main.scss +++ b/css/main.scss @@ -53,13 +53,28 @@ $on-laptop: 900px; "syntax-highlighting" ; - - - * { box-sizing: border-box; } +/** Clearfix */ +%clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} + +.wrapper { + max-width: $content-width; + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; +} + /*============================================================================ Sidebar ==============================================================================*/ @@ -89,6 +104,16 @@ $on-laptop: 900px; > ul { margin: 0; + + > li { + margin-bottom: $spacing-unit; + } + + ul { + li { + margin-top: $spacing-unit/2; + } + } } li { @@ -109,58 +134,17 @@ $on-laptop: 900px; .content { padding: $spacing-unit $spacing-unit $spacing-unit ($spacing-unit + $sidebar-width); - h1 { - font-size: 2em; - } - - h2 { - font-size: 2em; - text-decoration: underline; - } - - h3 { - font-size: 1.5em; - } - - h4 { - font-size: 1.5em; - text-decoration: underline; - } - - blockquote { - color: lighten($color-slate, 20); - border-left: 4px solid lighten($color-slate, 20); - padding-left: $spacing-unit / 2; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; - - > :last-child { - margin-bottom: 0; - } - } - - pre, code { - font-size: 15px; - border: 1px solid $color-blue-2; - border-radius: 3px; - background-color: lighten($color-blue-1, 0.9); - } - - code { - padding: 1px 5px; - } - - pre { - padding: 8px 12px; - - > code { - border: 0; - padding-right: 0; - padding-left: 0; - } - } - } +/*============================================================================ + Index + ==============================================================================*/ + +.home--banner { + h1 { + text-align: center; + font-weight: bold; + font-size: 5em; + } +} diff --git a/index.html b/index.html index 30173a4..cee2f88 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,20 @@ layout: default --- -{% for post in site.posts %} -

    - {{ post.title }} -

    - {{ post.content }} -{% endfor %} +
    + +
    +

    Liquid

    +
    Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.
    +
    + +
    + + {% for post in site.posts %} +

    + {{ post.title }} +

    + {{ post.content }} + {% endfor %} + +
    From 67865368aadddc14748a378e072199ab3ba1d6bf Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Tue, 27 Jan 2015 15:29:13 -0500 Subject: [PATCH 08/78] Homepage work + Readme --- _sass/_base.scss | 7 ++++--- css/main.scss | 14 +++++++++++--- index.html | 10 ++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/_sass/_base.scss b/_sass/_base.scss index 56564b2..c967d2d 100644 --- a/_sass/_base.scss +++ b/_sass/_base.scss @@ -96,8 +96,8 @@ h4 { } blockquote { - color: lighten($color-slate, 20); - border-left: 2px solid lighten($color-slate, 20); + color: lighten($color-slate, 30%); + border-left: 2px solid lighten($color-slate, 50%); padding-left: $spacing-unit / 2; letter-spacing: -1px; font-style: italic; @@ -132,5 +132,6 @@ hr { display: block; height: 1px; border: 0; - background-color: lighten($color-slate, 40%); + background-color: lighten($color-slate, 50%); + margin-bottom: $spacing-unit/2; } diff --git a/css/main.scss b/css/main.scss index a0be935..991e44b 100755 --- a/css/main.scss +++ b/css/main.scss @@ -100,16 +100,23 @@ $on-laptop: 900px; } .sidebar--nav { - padding: $spacing-unit / 2; + padding: $spacing-unit/2 $spacing-unit; > ul { margin: 0; > li { - margin-bottom: $spacing-unit; + margin-bottom: $spacing-unit / 2; + + a { + + } + } ul { + margin-left: $spacing-unit/2; + li { margin-top: $spacing-unit/2; } @@ -142,8 +149,9 @@ $on-laptop: 900px; ==============================================================================*/ .home--banner { + text-align: center; + h1 { - text-align: center; font-weight: bold; font-size: 5em; } diff --git a/index.html b/index.html index cee2f88..818b912 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,20 @@ layout: default

    Liquid

    Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.
    + +

    +

    Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers. + + +

    Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

    + +

    It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

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

    {{ post.title }} From 26f12734f8eb4d82b8eff8db2c64d5ef0ccb130e Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Tue, 27 Jan 2015 15:30:23 -0500 Subject: [PATCH 09/78] adding readme --- README.md | 8 +++++++ _posts/2015-01-26-test-post.markdown | 34 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 README.md create mode 100644 _posts/2015-01-26-test-post.markdown diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0442bf --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# New Liquid Docs + +To run, follow these steps: + +1. Download ZIP or clone in GitHub +2. Navigate to `liquid` folder +3. Run `jekyll watch` +4. Open `http://127.0.0.1:4000` in your browser diff --git a/_posts/2015-01-26-test-post.markdown b/_posts/2015-01-26-test-post.markdown new file mode 100644 index 0000000..2a4d36b --- /dev/null +++ b/_posts/2015-01-26-test-post.markdown @@ -0,0 +1,34 @@ +--- +layout: post +title: "Test Post" +date: 2015-01-26 17:50:59 +categories: liquid docs yo +--- + +# Heading 1 + +## Heading 2 + +### Heading 3 + +#### Heading 4 + +This is a dummy paragraph... 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. + +> Blockquote + +Code snippet: + +{% 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 From 447dd346c17721c721e2f778d0796c55ed9f41be Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Tue, 27 Jan 2015 16:50:51 -0500 Subject: [PATCH 10/78] further work on index.md --- css/main.scss | 26 +++++++++++++++++++------- index.html | 15 ++++----------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/css/main.scss b/css/main.scss index 991e44b..bd0769a 100755 --- a/css/main.scss +++ b/css/main.scss @@ -101,28 +101,30 @@ $on-laptop: 900px; .sidebar--nav { padding: $spacing-unit/2 $spacing-unit; + font-weight: bold; + //First Level Links > ul { margin: 0; > li { margin-bottom: $spacing-unit / 2; - - a { - - } - } + // Second Level Links ul { margin-left: $spacing-unit/2; + font-weight: normal; + font-size: 0.9em; li { - margin-top: $spacing-unit/2; + margin-top: $spacing-unit/4; } } + } + // Styles for both First and SecondLevel Links li { list-style: none; @@ -140,9 +142,19 @@ $on-laptop: 900px; .content { padding: $spacing-unit $spacing-unit $spacing-unit ($spacing-unit + $sidebar-width); - } +.btn { + color: $color-white; + display: inline-block; + background: $color-blue-5; + padding: $spacing-unit/4 $spacing-unit/2; + border-radius: 4px; +} + +.btn:visited { + color: $color-white; +} /*============================================================================ Index diff --git a/index.html b/index.html index 818b912..45d5a2a 100644 --- a/index.html +++ b/index.html @@ -13,19 +13,12 @@ layout: default
    -

    Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers. + Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers. + Liquid has been in production use since June 2006 and is now used by many other hosted web applications. -

    Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

    + It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library. -

    It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

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

    - {{ post.title }} -

    - {{ post.content }} - {% endfor %} + # What does it look like?

    From 5f1624d6f58bff156f6db348cda53b61fa4a1eee Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 13 Mar 2015 15:28:30 -0700 Subject: [PATCH 11/78] Initial munge of the site. --- _config.yml | 24 ++++++++++++------------ _data/site.yml | 6 ++++++ _includes/footer.html | 5 ++--- _includes/head.html | 4 ++-- _layouts/default.html | 11 ++++++----- about.md | 11 ----------- feed.xml | 4 ++-- 7 files changed, 30 insertions(+), 35 deletions(-) create mode 100644 _data/site.yml delete mode 100644 about.md diff --git a/_config.yml b/_config.yml index 2f03e74..bcde8b4 100644 --- a/_config.yml +++ b/_config.yml @@ -1,14 +1,14 @@ -# 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 +baseurl: "" # the subpath of your site, e.g. /blog/ +url: "http://liquidmarkup.org" # the base hostname & protocol for your site markdown: kramdown +collections: + filters: + output: true + +defaults: + - + scope: + type: filters + values: + layout: page diff --git a/_data/site.yml b/_data/site.yml new file mode 100644 index 0000000..9c60ea9 --- /dev/null +++ b/_data/site.yml @@ -0,0 +1,6 @@ +# Site settings +title: Liquid Templating Engine +description: > # this means to ignore newlines until "baseurl:" + Liquid is a template language and accompanying rendering engine. + It is built for security, so is perfect for rendering custom + templates from your users. diff --git a/_includes/footer.html b/_includes/footer.html index 9944f68..f17a4e4 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -2,13 +2,12 @@
    - + diff --git a/_includes/head.html b/_includes/head.html index df8b5a5..9a126ca 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -3,8 +3,8 @@ - {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} - + {% if page.title %}{{ page.title }} – {% endif %}{{ site.data.site.title }} + diff --git a/_layouts/default.html b/_layouts/default.html index ed90a1b..929ea56 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -8,14 +8,15 @@

    Liquid

    diff --git a/node_modules/.bin/csswring b/node_modules/.bin/csswring new file mode 120000 index 0000000..04f1f5f --- /dev/null +++ b/node_modules/.bin/csswring @@ -0,0 +1 @@ +../csswring/bin/csswring \ No newline at end of file diff --git a/node_modules/autoprefixer-core/ChangeLog.md b/node_modules/autoprefixer-core/ChangeLog.md new file mode 100644 index 0000000..0d67f75 --- /dev/null +++ b/node_modules/autoprefixer-core/ChangeLog.md @@ -0,0 +1,493 @@ +## 5.1.8 +* Fix gradients in `mask` and `mask-image` properties. +* Fix old webkit prefix on some unsupported gradients. + +## 5.1.7 +* Fix placeholder selector (by Vincent De Oliveira). + +## 5.1.6 +* Use official `::placeholder-shown` selector (by Vincent De Oliveira). + +## 5.1.5 +* Add transition support for CSS Masks properties. + +## 5.1.4 +* Use `-webkit-` prefix for Opera Mobile 24. + +## 5.1.3 +* Add IE support for `image-rendering: crisp-edges`. + +## 5.1.2 +* Add never existed `@-ms-keyframes` to common mistake. + +## 5.1.1 +* Safer value split in `flex` hack. + +## 5.1 “Jianyuan” +* Add support for resolution media query (by 一丝). +* Higher accuracy while removing prefixes in values. +* Add support for logical properties (by 一丝). +* Add `@viewport` support. +* Add `text-overflow` support (by 一丝). +* Add `text-emphasis` support (by 一丝). +* Add `image-rendering: crisp-edges` support. +* Add `text-align-last` support. +* Return `autoprefixer.defaults` as alias to current `browserslist.defaults`. +* Save code style while adding prefixes to `@keyframes` and `@viewport`. +* Do not remove `-webkit-background-clip` with non-spec `text` value. +* Fix `-webkit-filter` in `transition`. +* Better support for browser versions joined on Can I Use + like `ios_saf 7.0-7.1` (by Vincent De Oliveira). +* Fix compatibility with `postcss-import` (by Jason Kuhrt). +* Fix Flexbox prefixes for BlackBerry and UC Browser. +* Fix gradient prefixes for old Chrome. + +## 5.0 “Pravda vítězí” +* Use PostCSS 4.0. +* Use Browserslist to parse browsers queries. +* Use global `browserslist` config. +* Add `> 5% in US` query to select browsers by usage in some country. +* Add `object-fit` and `object-position` properties support. +* Add CSS Shape properties support. +* Fix UC Browser name in debug info. +* Remove `autoprefixer.defaults` and use defaults from Browserslist. + +## 4.0.2 +* Remove `o-border-radius`, which is common mistake in legacy CSS. + +## 4.0.1 +* Fix `@supports` support with brackets in values (by Vincent De Oliveira). + +## 4.0 “Indivisibiliter ac Inseparabiliter” +* Become 2.5 times fatser by new PostCSS 3.0 parser. +* Do not remove outdated prefixes by `remove: false` option. +* `map.inline` and `map.sourcesContent` options are now `true` by default. +* Add `box-decoration-break` support. +* Do not add old `-webkit-` prefix for gradients with `px` units. +* Use previous source map to show origin source of CSS syntax error. +* Use `from` option from previous source map `file` field. +* Set `to` value to `from` if `to` option is missing. +* Trim Unicode BOM on source maps parsing. +* Parse at-rules without spaces like `@import"file"`. +* Better previous `sourceMappingURL` annotation comment cleaning. +* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. + +## 3.1.2 +* Update Firefox ESR version from 24 to 31. + +## 3.1.1 +* Use Flexbox 2009 spec for Android stock browser < 4.4. + +## 3.1 “Satyameva Jayate” +* Do not remove comments from prefixed values (by Eitan Rousso). +* Allow Safari 6.1 to use final Flexbox spec (by John Kreitlow). +* Fix `filter` value in `transition` in Webkits. +* Show greetings if your browsers don’t require any prefixes. +* Add `<=` and `<` browsers requirement (by Andreas Lind). + +## 3.0.1 +* Fix `autoprefixer.postcss` in callbacks. + +## 3.0 “Liberté, Égalité, Fraternité” +* Project was split to autoprefixer (with CLI) and autoprefixer-core. +* `autoprefixer()` now receives only `options` object with `browsers` key. +* GNU format for syntax error messages from PostCSS 2.2. + +## 2.2 “Mobilis in mobili” +* Allow to disable Autoprefixer for some rule by control comment. +* Use PostCSS 2.1 with Safe Mode option and broken source line + in CSS syntax error messages. + +## 2.1.1 +* Fix `-webkit-background-size` hack for `contain` and `cover` values. +* Don’t add `-webkit-` prefix to `filter` with SVG (by Vincent De Oliveira). + +## 2.1 “Eleftheria i thanatos” +* Add support for `clip-path` and `mask` properties. +* Return `-webkit-` prefix to `filter` with SVG URI. + +## 2.0.2 +* Add readable names for new browsers from 2.0 release. +* Don’t add `-webkit-` prefix to `filter` with SVG URI. +* Don’t add `-o-` prefix 3D transforms. + +## 2.0.1 +* Save declaration style, when clone declaration to prefix. + +## 2.0 “Hongik Ingan” +* Based on PostCSS 1.0. + See [options changes](https://github.com/postcss/postcss/releases/tag/1.0.0). +* Restore visual cascade after declaration removing. +* Enable visual cascade by default. +* Prefix declareation in `@supports` at-rule conditions. +* Add all browsers from Can I Use: `ie_mob`, `and_chr`, `and_ff`, + `op_mob` and `op_mini`. +* Allow to use latest Autoprefixer from GitHub by npm. +* Add `--no-cascade`, `--annotation` and `--sources-content` options to binary. + +## 1.3.1 +* Fix gradient hack, when `background` property contains color. + +## 1.3 “Tenka Fubu” +* Add `text-size-adjust` support. +* Add `background-size` to support Android 2. + +## 1.2 “Meiji” +* Use Can I Use data from official `caniuse-db` npm package. +* Remove package data update from binary. +* Use increment value instead of current date in minor versions. + +## 1.1 “Nutrisco et extingo” +* Add source map annotation comment support. +* Add inline source map support. +* Autodetect previous source map. +* Fix source maps support on Windows. +* Fix source maps support in subdirectory. +* Prefix selector even if it is already prefixed by developer. +* Add option `cascade` to create nice visual cascade of prefixes. +* Fix flexbox support for IE 10 (by Roland Warmerdam). +* Better `break-inside` support. +* Fix prefixing, when two same properties are near. + +### 20140222: +* Add `touch-action` support. + +### 20140226: +* Chrome 33 is moved to released versions. +* Add Chrome 36 data. + +### 20140302: +* Add `text-decoration-*` properties support. +* Update browsers usage statistics. +* Use new PostCSS version. + +### 20140319: +* Check already prefixed properties after current declaration. +* Normalize spaces before already prefixed check. +* Firefox 28 is moved to released versions. +* Add Firefox 31 data. +* Add some Blackberry data. + +### 20140327: +* Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support + animations. +* Update BlackBerry 10 data. + +### 20140403: +* Update browsers usage statistics. +* Opera 20 is moved to released versions. +* Add Opera 22 data. + +### 20140410: +* Chrome 34 is moved to released versions. +* Add Chrome 37 data. +* Fix Chrome 36 data. + +### 20140429: +* Fix `display: inline-flex` support by 2009 spec. +* Fix old WebKit gradient converter (by Sergey Belov). +* Fix CSS 3 cursors data (by Nick Schonning). + +### 20140430: +* Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes. +* Firefox 29 is moved to released versions. +* Add Firefox 32 data. + +### 20140510 +* Do not add `-ms-` prefix for `transform` with 3D functions. +* Update browsers global usage statistics. + +### 20140512 +* Remove unnecessary `-moz-` prefix for `wavy` in `text-decoration`. +* Update Safari data for font properties. + +### 20140521 +* Chrome 36 is moved to released versions. +* Add Chrome 38 data. + +### 20140523 +* Opera 21 is moved to released versions. +* Add Opera 23 data. + +### 20140605 +* Allow to parse gradients without space between color and position. +* Add iOS 8, Safari 8 and Android 4.4.3 data. +* Update browsers usage statistics. + +## 1.0 “Plus ultra” +* Source map support. +* Save origin indents and code formatting. +* Change CSS parser to PostCSS. +* Preserve vendor-prefixed properties put right after unprefixed ones. +* Rename `compile()` to `process()` and return result object, + instead of CSS string. +* Rename `inspect()` to `info()`. +* Add in binary `-d` option to specify output directory. +* Binary now will not concat output files. +* Allow to select last versions for specified browser. +* Add full browser names aliases: `firefox`, `explorer` and `blackberry`. +* Ignore case in browser names. +* Change license to MIT. +* Add prefixes inside custom at-rules. +* Add only necessary prefixes to selector inside prefixed at-rule. +* Safer backgrounds list parser in gradient hack. +* Prefix `@keyframes` inside `@media`. +* Don’t prefix values for CSS3 PIE properties. +* Binary now shows file name in syntax error. +* Use browserify to build standalone version. + +### 20131225: +* Fix deprecated API convertor. +* Add `::placeholder` support for Firefix >= 18. +* Fix vendor prefixes order. + +### 20140103: +* Add `-webkit-` prefix for `sticky` position. +* Update browsers popularity statistics. + +### 20140109: +* Add selectors and at-rules sections to debug info. +* Fix outdated prefixes cleaning. + +### 20140110: +* Add `Firefox ESR` browser requirement. +* Opera 18 is moved to released versions. +* Add Opera 20 data. + +### 20140117: +* Chrome 32 is moved to released versions. +* Add Opera 34 data. + +### 20140130: +* Fix flexbox properties names in transitions. +* Add Chrome 35 and Firefox 29 data. + +### 20140203: +* Android 4.4 stock browser and Opera 19 are moved to released versions. +* Add Opera 21 data. +* Update browsers usage statistics. + +### 20140213: +* Add case insensitive to IE’s filter hack (by Dominik Schilling). +* Improve selector prefixing in some rare cases (by Simon Lydell). +* Firefox 27 is moved to released versions. +* Add Firefox 30 data. + +## 0.8 “Unbowed, Unbent, Unbroken” +* Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1" + instead of just "last 2 browsers"). +* Keep vendor prefixes without unprefixed version (like vendor-specific hacks). +* Convert gradients to old WebKit syntax (actual for Android 2.3). +* Better support for several syntaxes with one prefix (like Flexbox and + gradients in WebKit). +* Add intrinsic and extrinsic sizing values support. +* Remove never existed prefixes from common mistakes (like -ms-transition). +* Add Opera 17 data. +* Fix selector prefixes order. +* Fix browser versions order in inspect. + +### 20130903: +* Fix old WebKit gradients convertor on rgba() colors. +* Allow to write old direction syntax in gradients. + +### 20130906: +* Fix direction syntax in radial gradients. +* Don’t prefix IE filter with modern syntax. + +### 20130911: +* Fix parsing property name with spaces. + +### 20130919: +* Fix processing custom framework prefixes (by Johannes J. Schmidt). +* Concat outputs if several files compiled to one output. +* Decrease standalone build size by removing unnecessary Binary class. +* iOS 7 is moved to released versions. +* Clean up binary code (by Simon Lydell). + +### 20130923: +* Firefox 24 is moved to released versions. + +### 20131001: +* Add support for grab, grabbing, zoom-in and zoom-out cursor values. + +### 20131006: +* Chrome 30 is moved to released versions. + +### 20131007: +* Don’t add another prefixes in rule with prefixed selector. + +### 20131009: +* Opera 17 is moved to released versions. + +### 20131015: +* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov). + +### 20131017: +* Fix @host at-rule parsing. + +### 20131020: +* IE 11 and Andrid 4.3 is moved to released versions. +* Add Opera 18 data. +* Add @namespace support. +* Sort browser versions in data file. + +### 20131029: +* Add Safari 6.1 data. +* Add fx alias for Firefox. + +### 20131104: +* Update Android future version to 4.4. +* Google Chrome 32 added to future versions list. +* Firefox 25 now is actual version, 27 and 28 added to future versions. +* Browsers statistics are updated. + +### 20131205: +* Google Chrome 33 added to future releases list. +* Google Chrome 31 moved to current releases list. + +### 20131209: +* Use old webkit gradients for old iOS and Safari (by Chad von Nau). +* Fix direction conversion for old webkit gradients (by Chad von Nau). +* Update browsers popularity statistics. + +### 20131213: +* Firefox ESR in default browsers was changed to 24 version. +* Firefox 26 was moved to current releases list. +* Firefox 28 was added to future releases list. + +## 0.7 “We Do Not Sow” +* Add vendor prefixes to selectors. +* Add ::selection and ::placeholder selectors support. +* Allow to load support data from Can I Use pull requests. +* Remove deprecated API. + +### 20130806: +* Add hyphens support. + +### 20130807: +* Add tab-size support. +* Add :fullscreen support. + +### 20130808: +* Allow to select browser versions by > and >= operator. +* Fix flex properties in transition. + +### 20130810: +* Add Firefox 25 data. + +### 20130824: +* Add Chrome 31 and 30 data. +* Fix CSS comments parsing (by vladkens). + +## 0.6 “As High As Honor” +* New faster API, which cache preprocessed data. Old API is deprecated. +* A lot of perfomance improvements. +* Add Opera 15 -webkit- prefix support. +* Update Chrome 29 and Safari 7 prefixes data. +* Add minor browsers in popularity select. +* Better syntax error messages. + +### 20130721: +* Add Chrome 30 data. + +### 20130728: +* Don’t remove non-standard -webkit-background-clip: text. +* Don’t remove IE hack on CSS parse. + +### 20130729: +* Add Opera 16 data. +* Fix “Invalid range in character class” error on Firefox. + +### 20130730: +* Fix correct clone comments inside keyframes (by Alexey Plutalov). +* Fix angle recalculation in gradients (by Roman Komarov). + +### 20130731: +* Add border-image support. + +## 0.5 “Ours is the Fury” +* Rewrite Autoprefixer to be more flexible. +* Use css, instead of Rework, to fix CSS parsing errors faster. +* Fix a lot of CSS parsing errors. + +### 20130616: +* More useful message for CSS parsing errors. +* Remove old WebKit gradient syntax. +* Fix parsing error on comment with braces. + +### 20130617: +* Remove old Mozilla border-radius. +* Don’t prefix old IE filter. +* Remove old background-clip, background-size and background-origin prefixes. +* Speed up regexps in values. +* Allow to hack property declarations. + +### 20130625: +* Convert flexbox properties to 2009 and 2012 specifications. +* Improve messages on syntax errors. + +### 20130626: +* Add Firefox 24 data. +* Add prefixes for font-feature-settings. + +### 20130629: +* Fix convert flex properties to old box-flex. + +## 0.4 “Winter Is Coming” +* Remove outdated prefixes. +* Add border-radius and box-shadow properties to database. +* Change degrees in webkit gradients. + +### 20130515: +* Add old syntax in gradient direction. +* Add old syntax for display: flex. +* Update browser global usage statistics. + +### 20130521: +* Add Firefox 23 data. + +### 20130524: +* Add Chrome 29 data. + +### 20130528: +* Fix compatibilty with Rework from git master. +* Add minor browsers to data, which can be selected only directly. + +### 20130530: +* Add Opera 15 and iOS 6.1 data. +* Fix iOS versions in properties and values data. + +### 20130603: +* Use latest Rework 0.15 with a lot of CSS parsing fixes. +* Update browsers usage statistics. + +## 0.3 “Growing Strong” +* Rename `autoprefixer.filter()` to `autoprefixer.rework()`. +* Use own filters instead of Rework’s `prefix` and `prefixValue`. +* Smarter value prefixer without false match “order” in “border”. +* 40% faster. +* Don’t add unnecessary properties instead of Rework’s `prefixValue`. +* Don’t change properties order. +* Sort properties and values in inspect output. +* Add main to component config (by Jonathan Ong). +* Fix documentation (by Sergey Leschina and Mark Vasilkov). + +### 20130424: +* Fix value override in prefixer. + +### 20130427: +* Prefix several same values in one property. +* Fix Windows support in binary. +* Improve print errors in binary. + +### 20130502: +* Don’t add -webkit- prefix to IE filter. +* Don’t duplicate prefixes on second run. + +## 0.2 “Hear Me Roar!” +* Update parse libraries. +* Use component package manager to build standalone script. +* Add inspect to standalone script. + +## 0.1 “Fire and Blood” +* Initial release. diff --git a/node_modules/autoprefixer-core/LICENSE b/node_modules/autoprefixer-core/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/node_modules/autoprefixer-core/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/autoprefixer-core/README.md b/node_modules/autoprefixer-core/README.md new file mode 100644 index 0000000..97a5e96 --- /dev/null +++ b/node_modules/autoprefixer-core/README.md @@ -0,0 +1,194 @@ +# Autoprefixer Core [![Build Status](https://travis-ci.org/postcss/autoprefixer-core.svg)](https://travis-ci.org/postcss/autoprefixer-core) + + + +[PostCSS] plugin to parse CSS and add vendor prefixes using values +from [Can I Use]. + +This is core package to build Autoprefixer plugin for some environment +(like [grunt‑autoprefixer]). For end-user documentation, features +and plugins list visit [main Autoprefixer] project. + + +Sponsored by Evil Martians + + +[grunt‑autoprefixer]: https://github.com/nDmitry/grunt-autoprefixer +[main Autoprefixer]: https://github.com/postcss/autoprefixer +[Can I Use]: http://caniuse.com/ +[PostCSS]: https://github.com/postcss/postcss + +## Quick Example + +Write your CSS rules without vendor prefixes (in fact, forget about them +entirely): + +```css +:fullscreen a { + display: flex +} +``` + +Process your CSS by Autoprefixer: + +```js +var autoprefixer = require('autoprefixer-core'); +var prefixed = autoprefixer.process(css).css; +``` + +It will use the data based on current browser popularity and property support +to apply prefixes for you: + +```css +:-webkit-full-screen a { + display: -webkit-box; + display: -webkit-flex; + display: flex +} +:-moz-full-screen a { + display: flex +} +:-ms-fullscreen a { + display: -ms-flexbox; + display: flex +} +:fullscreen a { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex +} +``` + +## Usage + +To process your CSS you need to make 2 steps: + +1. Build processor for your options and browsers supported in your project. +2. Process CSS throw this processor. + +Function `autoprefixer(options)` returns new processor object: + +```js +var processor = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false }); +``` + +There are 2 options: + +* `browsers` (array): list of browsers, which are supported in your project. + You can directly specify browser version (like `iOS 7`) or use selections + (like `last 2 version` or `> 5%`). See [Browserslist docs] for available + queries and default value. +* `cascade` (boolean): should Autoprefixer uses [Visual Cascade], + if CSS will be uncompressed. + +Processor object had: + +* `.process(css, opts)` method, which will add prefixes to `css`. +* `.info()` method, which returns debug information: which browsers are selected + and which properties will be prefixed +* `.postcss` property returns [PostCSS] processor to use in chain + with other [PostCSS processors]. + +You can use processor object to process several CSS files +to increase perfomance. + +There are `autoprefixer.process()`, `autoprefixer.info()` +and `autoprefixer.postcss` shortcuts, which use default browsers and options. + +[PostCSS processors]: https://github.com/postcss/postcss#built-with-postcss +[Browserslist docs]: https://github.com/ai/browserslist +[Visual Cascade]: https://github.com/postcss/autoprefixer#visual-cascade +[PostCSS]: https://github.com/postcss/postcss + +## CSS Processing + +Method `process(css, opts)` from Autoprefixer processor is a PostCSS’s method. + +You must set `from` and `to` options with file names to generates corrects +source maps and useful error messages. + +Options: + +* `from` (path): file path to origin CSS files. +* `to` (path): file path to future CSS file, which will + contain processed CSS with prefixes. +* `safe` (boolean): enables [Safe Mode] in PostCSS. By default `false`. +* `map` contains options for source maps: + + * `inline: false` to force save map to separated file, instead of inline it + to CSS in special comment by base64. + * `prev` (string or object): map content from previous processing step + (like Sass compilation). + + If you set `map: false`, PostCSS will remove source map. + +You can read more about the source map options in [PostCSS documentation]. + +[PostCSS documentation]: https://github.com/postcss/postcss#source-map-1 +[Safe Mode]: https://github.com/postcss/postcss#safe-mode + +## PostCSS Chain + +You parse CSS only once and then process it through array of PostCSS processors. + +For example, you can use [gulp-postcss]: + +```js +var postcss = require('gulp-postcss'); +var sourcemaps = require('gulp-sourcemaps'); + +gulp.task('css', function () { + var processors = [ + require('autoprefixer')('last 1 version'), + require('css-mqpacker'), + require('csswring') + ]; + return gulp.src('./src/style.css') + .pipe(sourcemaps.init()) + .pipe(postcss(processors)) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('./dest')); +}); +``` + +[gulp-postcss]: https://github.com/w0rm/gulp-postcss + +## Safe Mode + +PostCSS has a special safe mode to parse broken CSS. If you set the `safe: true` +option to the `process` method, it will parse `a {` as `a {}`: + +```js +autoprefixer.process('a {'); // will throw “Unclosed block” +autoprefixer.process('a {', { safe: true }); // will process as a closed block +``` + +It is useful for legacy code when using several hacks, or interactive +tools with live input, like [Autoprefixer demo]. + +[Autoprefixer demo]: http://simevidas.jsbin.com/gufoko/quiet + +## Cleaning + +By default, Autoprefixer not only add new prefixes, but also remove outdated. +You can remove this behaviour by `remove: false` option: + +```js +autoprefixer() + .process('a { -webkit-border-radius: 2px; border-radius: 2px }'); +// remove outdated -webkit-border-radius + +autoprefixer({ remove: false }) + .process('a { -webkit-border-radius: 2px; border-radius: 2px }'); +// keeps -webkit-border-radius +``` + +## Debug + +You can check which browsers are selected and which properties will be prefixed: + +```js +info = autoprefixer({ browsers: ['last 1 version'] }).info(); +console.log(info); +``` diff --git a/node_modules/autoprefixer-core/data/prefixes.js b/node_modules/autoprefixer-core/data/prefixes.js new file mode 100644 index 0000000..1c6b8b2 --- /dev/null +++ b/node_modules/autoprefixer-core/data/prefixes.js @@ -0,0 +1,433 @@ +(function() { + var add, crispedges, feature, flexbox, gradients, logicalProps, prefix, resolution, result, sort, textDecoration, + slice = [].slice; + + sort = function(array) { + return array.sort(function(a, b) { + a = a.split(' '); + b = b.split(' '); + if (a[0] > b[0]) { + return 1; + } else if (a[0] < b[0]) { + return -1; + } else { + return parseFloat(a[1]) - parseFloat(b[1]); + } + }); + }; + + feature = function(data, opts, callback) { + var browser, match, need, ref, ref1, support, version, versions; + if (!callback) { + ref = [opts, {}], callback = ref[0], opts = ref[1]; + } + match = opts.match || /\sx($|\s)/; + need = []; + ref1 = data.stats; + for (browser in ref1) { + versions = ref1[browser]; + for (version in versions) { + support = versions[version]; + if (support.match(match)) { + need.push(browser + ' ' + version); + } + } + } + return callback(sort(need)); + }; + + result = {}; + + prefix = function() { + var data, i, j, k, len, name, names, results; + names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; + results = []; + for (k = 0, len = names.length; k < len; k++) { + name = names[k]; + result[name] = {}; + results.push((function() { + var results1; + results1 = []; + for (i in data) { + results1.push(result[name][i] = data[i]); + } + return results1; + })()); + } + return results; + }; + + add = function() { + var data, j, k, len, name, names, results; + names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; + results = []; + for (k = 0, len = names.length; k < len; k++) { + name = names[k]; + results.push(result[name].browsers = sort(result[name].browsers.concat(data.browsers))); + } + return results; + }; + + module.exports = result; + + feature(require('caniuse-db/features-json/border-radius'), function(browsers) { + return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', { + mistakes: ['-ms-', '-o-'], + transition: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-boxshadow'), function(browsers) { + return prefix('box-shadow', { + transition: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-animation'), function(browsers) { + return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', { + mistakes: ['-ms-'], + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-transitions'), function(browsers) { + return prefix('transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function', { + mistakes: ['-ms-'], + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/transforms2d'), function(browsers) { + return prefix('transform', 'transform-origin', { + transition: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/transforms3d'), function(browsers) { + prefix('perspective', 'perspective-origin', { + transition: true, + browsers: browsers + }); + return prefix('transform-style', 'backface-visibility', { + browsers: browsers + }); + }); + + gradients = require('caniuse-db/features-json/css-gradients'); + + feature(gradients, { + match: /y\sx/ + }, function(browsers) { + return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { + props: ['background', 'background-image', 'border-image', 'list-style', 'list-style-image', 'content', 'mask-image', 'mask'], + mistakes: ['-ms-'], + browsers: browsers + }); + }); + + feature(gradients, { + match: /a\sx/ + }, function(browsers) { + browsers = browsers.map(function(i) { + if (/op/.test(i)) { + return i; + } else { + return i + " old"; + } + }); + return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css3-boxsizing'), function(browsers) { + return prefix('box-sizing', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-filters'), function(browsers) { + return prefix('filter', { + transition: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/multicolumn'), function(browsers) { + prefix('columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', { + transition: true, + browsers: browsers + }); + return prefix('column-count', 'column-rule-style', 'column-span', 'column-fill', 'break-before', 'break-after', 'break-inside', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/user-select-none'), function(browsers) { + return prefix('user-select', { + browsers: browsers + }); + }); + + flexbox = require('caniuse-db/features-json/flexbox'); + + feature(flexbox, { + match: /a\sx/ + }, function(browsers) { + browsers = browsers.map(function(i) { + if (/ie|firefox/.test(i)) { + return i; + } else { + return i + " 2009"; + } + }); + prefix('display-flex', 'inline-flex', { + props: ['display'], + browsers: browsers + }); + prefix('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { + transition: true, + browsers: browsers + }); + return prefix('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { + browsers: browsers + }); + }); + + feature(flexbox, { + match: /y\sx/ + }, function(browsers) { + add('display-flex', 'inline-flex', { + browsers: browsers + }); + add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { + browsers: browsers + }); + return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/calc'), function(browsers) { + return prefix('calc', { + props: ['*'], + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/background-img-opts'), function(browsers) { + return prefix('background-clip', 'background-origin', 'background-size', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/font-feature'), function(browsers) { + return prefix('font-feature-settings', 'font-variant-ligatures', 'font-language-override', 'font-kerning', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/border-image'), function(browsers) { + return prefix('border-image', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-selection'), function(browsers) { + return prefix('::selection', { + selector: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) { + browsers = browsers.map(function(i) { + var name, ref, version; + ref = i.split(' '), name = ref[0], version = ref[1]; + if (name === 'firefox' && parseFloat(version) <= 18) { + return i + ' old'; + } else { + return i; + } + }); + return prefix(':placeholder-shown', '::placeholder', { + selector: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-hyphens'), function(browsers) { + return prefix('hyphens', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/fullscreen'), function(browsers) { + return prefix(':fullscreen', { + selector: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css3-tabsize'), function(browsers) { + return prefix('tab-size', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/intrinsic-width'), function(browsers) { + return prefix('max-content', 'min-content', 'fit-content', 'fill-available', { + props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height'], + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css3-cursors-newer'), function(browsers) { + prefix('zoom-in', 'zoom-out', { + props: ['cursor'], + browsers: browsers.concat(['chrome 3']) + }); + return prefix('grab', 'grabbing', { + props: ['cursor'], + browsers: browsers.concat(['firefox 24', 'firefox 25', 'firefox 26']) + }); + }); + + feature(require('caniuse-db/features-json/css-sticky'), function(browsers) { + return prefix('sticky', { + props: ['position'], + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/pointer'), function(browsers) { + return prefix('touch-action', { + browsers: browsers + }); + }); + + textDecoration = require('caniuse-db/features-json/text-decoration'); + + feature(textDecoration, function(browsers) { + return prefix('text-decoration-style', { + browsers: browsers + }); + }); + + feature(textDecoration, { + match: /y\sx($|\s)/ + }, function(browsers) { + return prefix('text-decoration-line', 'text-decoration-color', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/text-size-adjust'), function(browsers) { + return prefix('text-size-adjust', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-masks'), function(browsers) { + prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', { + browsers: browsers + }); + return prefix('clip-path', 'mask', 'mask-position', 'mask-size', { + transition: true, + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-boxdecorationbreak'), function(brwsrs) { + return prefix('box-decoration-break', { + browsers: brwsrs + }); + }); + + feature(require('caniuse-db/features-json/object-fit'), function(browsers) { + return prefix('object-fit', 'object-position', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-shapes'), function(browsers) { + return prefix('shape-margin', 'shape-outside', 'shape-image-threshold', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/text-overflow'), function(browsers) { + return prefix('text-overflow', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/text-emphasis'), function(browsers) { + return prefix('text-emphasis', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-deviceadaptation'), function(browsers) { + return prefix('@viewport', { + browsers: browsers + }); + }); + + resolution = require('caniuse-db/features-json/css-media-resolution'); + + feature(resolution, { + match: /( x($| )|a #3)/ + }, function(browsers) { + return prefix('@resolution', { + browsers: browsers + }); + }); + + feature(require('caniuse-db/features-json/css-text-align-last'), function(browsers) { + return prefix('text-align-last', { + browsers: browsers + }); + }); + + crispedges = require('caniuse-db/features-json/css-crisp-edges'); + + feature(crispedges, { + match: /y x/ + }, function(browsers) { + return prefix('crisp-edges', { + props: ['image-rendering'], + browsers: browsers + }); + }); + + feature(crispedges, { + match: /a x/ + }, function(browsers) { + return prefix('image-rendering', { + browsers: browsers + }); + }); + + logicalProps = require('caniuse-db/features-json/css-logical-props'); + + feature(logicalProps, function(browsers) { + return prefix('border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', { + transition: true, + browsers: browsers + }); + }); + + feature(logicalProps, { + match: /x\s#2/ + }, function(browsers) { + return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', { + transition: true, + browsers: browsers + }); + }); + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/at-rule.js b/node_modules/autoprefixer-core/lib/at-rule.js new file mode 100644 index 0000000..9b51076 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/at-rule.js @@ -0,0 +1,51 @@ +(function() { + var AtRule, Prefixer, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Prefixer = require('./prefixer'); + + AtRule = (function(superClass) { + extend(AtRule, superClass); + + function AtRule() { + return AtRule.__super__.constructor.apply(this, arguments); + } + + AtRule.prototype.add = function(rule, prefix) { + var already, cloned, prefixed; + prefixed = prefix + rule.name; + already = rule.parent.some(function(i) { + return i.name === prefixed && i.params === rule.params; + }); + if (already) { + return; + } + cloned = this.clone(rule, { + name: prefixed + }); + return rule.parent.insertBefore(rule, cloned); + }; + + AtRule.prototype.process = function(node) { + var j, len, parent, prefix, ref, results; + parent = this.parentPrefix(node); + ref = this.prefixes; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; + if (parent && parent !== prefix) { + continue; + } + results.push(this.add(node, prefix)); + } + return results; + }; + + return AtRule; + + })(Prefixer); + + module.exports = AtRule; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/autoprefixer.js b/node_modules/autoprefixer-core/lib/autoprefixer.js new file mode 100644 index 0000000..1e41c04 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/autoprefixer.js @@ -0,0 +1,109 @@ +(function() { + var Autoprefixer, Browsers, Prefixes, autoprefixer, browserslist, infoCache, isPlainObject, postcss, + slice = [].slice, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; + + browserslist = require('browserslist'); + + postcss = require('postcss'); + + Browsers = require('./browsers'); + + Prefixes = require('./prefixes'); + + infoCache = null; + + isPlainObject = function(obj) { + return Object.prototype.toString.apply(obj) === '[object Object]'; + }; + + autoprefixer = function() { + var options, reqs; + reqs = 1 <= arguments.length ? slice.call(arguments, 0) : []; + if (reqs.length === 1 && isPlainObject(reqs[0])) { + options = reqs[0]; + reqs = void 0; + } else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) { + reqs = void 0; + } else if (reqs.length <= 2 && (reqs[0] instanceof Array || (reqs[0] == null))) { + options = reqs[1]; + reqs = reqs[0]; + } else if (typeof reqs[reqs.length - 1] === 'object') { + options = reqs.pop(); + } + if ((options != null ? options.browsers : void 0) != null) { + reqs = options.browsers; + } + return new Autoprefixer(autoprefixer.data, reqs, options); + }; + + autoprefixer.data = { + browsers: require('caniuse-db/data').agents, + prefixes: require('../data/prefixes') + }; + + Autoprefixer = (function() { + function Autoprefixer(data, reqs1, options1) { + this.data = data; + this.reqs = reqs1; + this.options = options1 != null ? options1 : {}; + this.postcss = bind(this.postcss, this); + } + + Autoprefixer.prototype.process = function(str, options) { + if (options == null) { + options = {}; + } + return postcss(this.postcss).process(str, options); + }; + + Autoprefixer.prototype.postcss = function(css) { + var prefixes; + prefixes = this.prefixes({ + from: css.source.input.file + }); + if (this.options.remove !== false) { + prefixes.processor.remove(css); + } + return prefixes.processor.add(css); + }; + + Autoprefixer.prototype.prefixes = function(opts) { + var browsers; + browsers = new Browsers(autoprefixer.data.browsers, this.reqs, opts); + return new Prefixes(autoprefixer.data.prefixes, browsers, this.options); + }; + + Autoprefixer.prototype.info = function(opts) { + infoCache || (infoCache = require('./info')); + return infoCache(this.prefixes(opts)); + }; + + return Autoprefixer; + + })(); + + autoprefixer.defaults = browserslist.defaults; + + autoprefixer.loadDefault = function() { + return this.defaultCache || (this.defaultCache = autoprefixer()); + }; + + autoprefixer.process = function(str, options) { + if (options == null) { + options = {}; + } + return this.loadDefault().process(str, options); + }; + + autoprefixer.postcss = function(css) { + return autoprefixer.loadDefault().postcss(css); + }; + + autoprefixer.info = function() { + return this.loadDefault().info(); + }; + + module.exports = autoprefixer; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/browsers.js b/node_modules/autoprefixer-core/lib/browsers.js new file mode 100644 index 0000000..45906b7 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/browsers.js @@ -0,0 +1,83 @@ +(function() { + var Browsers, browserslist, utils; + + browserslist = require('browserslist'); + + utils = require('./utils'); + + Browsers = (function() { + Browsers.prefixes = function() { + var data, i, name; + if (this.prefixesCache) { + return this.prefixesCache; + } + data = require('caniuse-db/data').agents; + return this.prefixesCache = utils.uniq((function() { + var results; + results = []; + for (name in data) { + i = data[name]; + results.push("-" + i.prefix + "-"); + } + return results; + })()).sort(function(a, b) { + return b.length - a.length; + }); + }; + + Browsers.withPrefix = function(value) { + if (!this.prefixesRegexp) { + this.prefixesRegexp = RegExp("" + (this.prefixes().join('|'))); + } + return this.prefixesRegexp.test(value); + }; + + function Browsers(data1, requirements, options) { + this.data = data1; + this.options = options; + this.selected = this.parse(requirements); + } + + Browsers.prototype.parse = function(requirements) { + var ref; + return browserslist(requirements, { + path: (ref = this.options) != null ? ref.from : void 0 + }); + }; + + Browsers.prototype.browsers = function(criteria) { + var browser, data, ref, selected, versions; + selected = []; + ref = this.data; + for (browser in ref) { + data = ref[browser]; + versions = criteria(data).map(function(version) { + return browser + " " + version; + }); + selected = selected.concat(versions); + } + return selected; + }; + + Browsers.prototype.prefix = function(browser) { + var data, name, prefix, ref, version; + ref = browser.split(' '), name = ref[0], version = ref[1]; + data = this.data[name]; + if (data.prefix_exceptions) { + prefix = data.prefix_exceptions[version]; + } + prefix || (prefix = data.prefix); + return '-' + prefix + '-'; + }; + + Browsers.prototype.isSelected = function(browser) { + return this.selected.indexOf(browser) !== -1; + }; + + return Browsers; + + })(); + + module.exports = Browsers; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/declaration.js b/node_modules/autoprefixer-core/lib/declaration.js new file mode 100644 index 0000000..91b411d --- /dev/null +++ b/node_modules/autoprefixer-core/lib/declaration.js @@ -0,0 +1,153 @@ +(function() { + var Browsers, Declaration, Prefixer, utils, vendor, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Prefixer = require('./prefixer'); + + Browsers = require('./browsers'); + + vendor = require('postcss/lib/vendor'); + + utils = require('./utils'); + + Declaration = (function(superClass) { + extend(Declaration, superClass); + + function Declaration() { + return Declaration.__super__.constructor.apply(this, arguments); + } + + Declaration.prototype.check = function(decl) { + return true; + }; + + Declaration.prototype.prefixed = function(prop, prefix) { + return prefix + prop; + }; + + Declaration.prototype.normalize = function(prop) { + return prop; + }; + + Declaration.prototype.otherPrefixes = function(value, prefix) { + var j, len, other, ref; + ref = Browsers.prefixes(); + for (j = 0, len = ref.length; j < len; j++) { + other = ref[j]; + if (other === prefix) { + continue; + } + if (value.indexOf(other) !== -1) { + return true; + } + } + return false; + }; + + Declaration.prototype.set = function(decl, prefix) { + decl.prop = this.prefixed(decl.prop, prefix); + return decl; + }; + + Declaration.prototype.needCascade = function(decl) { + return decl._autoprefixerCascade || (decl._autoprefixerCascade = this.all.options.cascade !== false && decl.style('before').indexOf('\n') !== -1); + }; + + Declaration.prototype.maxPrefixed = function(prefixes, decl) { + var j, len, max, prefix; + if (decl._autoprefixerMax) { + return decl._autoprefixerMax; + } + max = 0; + for (j = 0, len = prefixes.length; j < len; j++) { + prefix = prefixes[j]; + prefix = utils.removeNote(prefix); + if (prefix.length > max) { + max = prefix.length; + } + } + return decl._autoprefixerMax = max; + }; + + Declaration.prototype.calcBefore = function(prefixes, decl, prefix) { + var before, diff, i, j, max, ref; + if (prefix == null) { + prefix = ''; + } + before = decl.style('before'); + max = this.maxPrefixed(prefixes, decl); + diff = max - utils.removeNote(prefix).length; + for (i = j = 0, ref = diff; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + before += ' '; + } + return before; + }; + + Declaration.prototype.restoreBefore = function(decl) { + var lines, min; + lines = decl.style('before').split("\n"); + min = lines[lines.length - 1]; + this.all.group(decl).up(function(prefixed) { + var array, last; + array = prefixed.style('before').split("\n"); + last = array[array.length - 1]; + if (last.length < min.length) { + return min = last; + } + }); + lines[lines.length - 1] = min; + return decl.before = lines.join("\n"); + }; + + Declaration.prototype.insert = function(decl, prefix, prefixes) { + var cloned; + cloned = this.set(this.clone(decl), prefix); + if (!cloned) { + return; + } + if (this.needCascade(decl)) { + cloned.before = this.calcBefore(prefixes, decl, prefix); + } + return decl.parent.insertBefore(decl, cloned); + }; + + Declaration.prototype.add = function(decl, prefix, prefixes) { + var already, prefixed; + prefixed = this.prefixed(decl.prop, prefix); + already = this.all.group(decl).up(function(i) { + return i.prop === prefixed; + }); + already || (already = this.all.group(decl).down(function(i) { + return i.prop === prefixed; + })); + if (already || this.otherPrefixes(decl.value, prefix)) { + return; + } + return this.insert(decl, prefix, prefixes); + }; + + Declaration.prototype.process = function(decl) { + var prefixes; + if (this.needCascade(decl)) { + prefixes = Declaration.__super__.process.apply(this, arguments); + if (prefixes != null ? prefixes.length : void 0) { + this.restoreBefore(decl); + return decl.before = this.calcBefore(prefixes, decl); + } + } else { + return Declaration.__super__.process.apply(this, arguments); + } + }; + + Declaration.prototype.old = function(prop, prefix) { + return [this.prefixed(prop, prefix)]; + }; + + return Declaration; + + })(Prefixer); + + module.exports = Declaration; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/align-content.js b/node_modules/autoprefixer-core/lib/hacks/align-content.js new file mode 100644 index 0000000..627c91e --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/align-content.js @@ -0,0 +1,57 @@ +(function() { + var AlignContent, Declaration, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + AlignContent = (function(superClass) { + extend(AlignContent, superClass); + + function AlignContent() { + return AlignContent.__super__.constructor.apply(this, arguments); + } + + AlignContent.names = ['align-content', 'flex-line-pack']; + + AlignContent.oldValues = { + 'flex-end': 'end', + 'flex-start': 'start', + 'space-between': 'justify', + 'space-around': 'distribute' + }; + + AlignContent.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012) { + return prefix + 'flex-line-pack'; + } else { + return AlignContent.__super__.prefixed.apply(this, arguments); + } + }; + + AlignContent.prototype.normalize = function(prop) { + return 'align-content'; + }; + + AlignContent.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec === 2012) { + decl.value = AlignContent.oldValues[decl.value] || decl.value; + return AlignContent.__super__.set.call(this, decl, prefix); + } else if (spec === 'final') { + return AlignContent.__super__.set.apply(this, arguments); + } + }; + + return AlignContent; + + })(Declaration); + + module.exports = AlignContent; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/align-items.js b/node_modules/autoprefixer-core/lib/hacks/align-items.js new file mode 100644 index 0000000..cae3ef1 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/align-items.js @@ -0,0 +1,57 @@ +(function() { + var AlignItems, Declaration, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + AlignItems = (function(superClass) { + extend(AlignItems, superClass); + + function AlignItems() { + return AlignItems.__super__.constructor.apply(this, arguments); + } + + AlignItems.names = ['align-items', 'flex-align', 'box-align']; + + AlignItems.oldValues = { + 'flex-end': 'end', + 'flex-start': 'start' + }; + + AlignItems.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return prefix + 'box-align'; + } else if (spec === 2012) { + return prefix + 'flex-align'; + } else { + return AlignItems.__super__.prefixed.apply(this, arguments); + } + }; + + AlignItems.prototype.normalize = function(prop) { + return 'align-items'; + }; + + AlignItems.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec === 2009 || spec === 2012) { + decl.value = AlignItems.oldValues[decl.value] || decl.value; + return AlignItems.__super__.set.call(this, decl, prefix); + } else { + return AlignItems.__super__.set.apply(this, arguments); + } + }; + + return AlignItems; + + })(Declaration); + + module.exports = AlignItems; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/align-self.js b/node_modules/autoprefixer-core/lib/hacks/align-self.js new file mode 100644 index 0000000..7103cf7 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/align-self.js @@ -0,0 +1,55 @@ +(function() { + var AlignSelf, Declaration, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + AlignSelf = (function(superClass) { + extend(AlignSelf, superClass); + + function AlignSelf() { + return AlignSelf.__super__.constructor.apply(this, arguments); + } + + AlignSelf.names = ['align-self', 'flex-item-align']; + + AlignSelf.oldValues = { + 'flex-end': 'end', + 'flex-start': 'start' + }; + + AlignSelf.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012) { + return prefix + 'flex-item-align'; + } else { + return AlignSelf.__super__.prefixed.apply(this, arguments); + } + }; + + AlignSelf.prototype.normalize = function(prop) { + return 'align-self'; + }; + + AlignSelf.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec === 2012) { + decl.value = AlignSelf.oldValues[decl.value] || decl.value; + return AlignSelf.__super__.set.call(this, decl, prefix); + } else if (spec === 'final') { + return AlignSelf.__super__.set.apply(this, arguments); + } + }; + + return AlignSelf; + + })(Declaration); + + module.exports = AlignSelf; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/background-size.js b/node_modules/autoprefixer-core/lib/hacks/background-size.js new file mode 100644 index 0000000..6109b0a --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/background-size.js @@ -0,0 +1,32 @@ +(function() { + var BackgroundSize, Declaration, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + BackgroundSize = (function(superClass) { + extend(BackgroundSize, superClass); + + function BackgroundSize() { + return BackgroundSize.__super__.constructor.apply(this, arguments); + } + + BackgroundSize.names = ['background-size']; + + BackgroundSize.prototype.set = function(decl, prefix) { + var value; + value = decl.value.toLowerCase(); + if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') { + decl.value = decl.value + ' ' + decl.value; + } + return BackgroundSize.__super__.set.call(this, decl, prefix); + }; + + return BackgroundSize; + + })(Declaration); + + module.exports = BackgroundSize; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/block-logical.js b/node_modules/autoprefixer-core/lib/hacks/block-logical.js new file mode 100644 index 0000000..261cab2 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/block-logical.js @@ -0,0 +1,35 @@ +(function() { + var BlockLogical, Declaration, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + BlockLogical = (function(superClass) { + extend(BlockLogical, superClass); + + function BlockLogical() { + return BlockLogical.__super__.constructor.apply(this, arguments); + } + + BlockLogical.names = ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']; + + BlockLogical.prototype.prefixed = function(prop, prefix) { + return prefix + (prop.indexOf('-start') !== -1 ? prop.replace('-block-start', '-before') : prop.replace('-block-end', '-after')); + }; + + BlockLogical.prototype.normalize = function(prop) { + if (prop.indexOf('-before') !== -1) { + return prop.replace('-before', '-block-start'); + } else { + return prop.replace('-after', '-block-end'); + } + }; + + return BlockLogical; + + })(Declaration); + + module.exports = BlockLogical; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/border-image.js b/node_modules/autoprefixer-core/lib/hacks/border-image.js new file mode 100644 index 0000000..a08f36b --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/border-image.js @@ -0,0 +1,28 @@ +(function() { + var BorderImage, Declaration, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + BorderImage = (function(superClass) { + extend(BorderImage, superClass); + + function BorderImage() { + return BorderImage.__super__.constructor.apply(this, arguments); + } + + BorderImage.names = ['border-image']; + + BorderImage.prototype.set = function(decl, prefix) { + decl.value = decl.value.replace(/\s+fill(\s)/, '$1'); + return BorderImage.__super__.set.call(this, decl, prefix); + }; + + return BorderImage; + + })(Declaration); + + module.exports = BorderImage; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/border-radius.js b/node_modules/autoprefixer-core/lib/hacks/border-radius.js new file mode 100644 index 0000000..71452e3 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/border-radius.js @@ -0,0 +1,56 @@ +(function() { + var BorderRadius, Declaration, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + BorderRadius = (function(superClass) { + var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver; + + extend(BorderRadius, superClass); + + function BorderRadius() { + return BorderRadius.__super__.constructor.apply(this, arguments); + } + + BorderRadius.names = ['border-radius']; + + BorderRadius.toMozilla = {}; + + BorderRadius.toNormal = {}; + + ref = ['top', 'bottom']; + for (i = 0, len = ref.length; i < len; i++) { + ver = ref[i]; + ref1 = ['left', 'right']; + for (j = 0, len1 = ref1.length; j < len1; j++) { + hor = ref1[j]; + normal = "border-" + ver + "-" + hor + "-radius"; + mozilla = "border-radius-" + ver + hor; + BorderRadius.names.push(normal); + BorderRadius.names.push(mozilla); + BorderRadius.toMozilla[normal] = mozilla; + BorderRadius.toNormal[mozilla] = normal; + } + } + + BorderRadius.prototype.prefixed = function(prop, prefix) { + if (prefix === '-moz-') { + return prefix + (BorderRadius.toMozilla[prop] || prop); + } else { + return BorderRadius.__super__.prefixed.apply(this, arguments); + } + }; + + BorderRadius.prototype.normalize = function(prop) { + return BorderRadius.toNormal[prop] || prop; + }; + + return BorderRadius; + + })(Declaration); + + module.exports = BorderRadius; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/break-inside.js b/node_modules/autoprefixer-core/lib/hacks/break-inside.js new file mode 100644 index 0000000..2122aac --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/break-inside.js @@ -0,0 +1,54 @@ +(function() { + var BreakInside, Declaration, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + BreakInside = (function(superClass) { + extend(BreakInside, superClass); + + function BreakInside() { + return BreakInside.__super__.constructor.apply(this, arguments); + } + + BreakInside.names = ['break-inside', 'page-break-inside', 'column-break-inside']; + + BreakInside.prototype.prefixed = function(prop, prefix) { + if (prefix === '-webkit-') { + return prefix + 'column-break-inside'; + } else if (prefix === '-moz-') { + return 'page-break-inside'; + } else { + return BreakInside.__super__.prefixed.apply(this, arguments); + } + }; + + BreakInside.prototype.normalize = function() { + return 'break-inside'; + }; + + BreakInside.prototype.set = function(decl, prefix) { + if (decl.value === 'avoid-column' || decl.value === 'avoid-page') { + decl.value = 'avoid'; + } + return BreakInside.__super__.set.apply(this, arguments); + }; + + BreakInside.prototype.insert = function(decl, prefix, prefixes) { + if (decl.value === 'avoid-region') { + + } else if (decl.value === 'avoid-page' && prefix === '-webkit-') { + + } else { + return BreakInside.__super__.insert.apply(this, arguments); + } + }; + + return BreakInside; + + })(Declaration); + + module.exports = BreakInside; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/crisp-edges.js b/node_modules/autoprefixer-core/lib/hacks/crisp-edges.js new file mode 100644 index 0000000..bb04dc0 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/crisp-edges.js @@ -0,0 +1,31 @@ +(function() { + var CrispEdges, Value, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Value = require('../value'); + + CrispEdges = (function(superClass) { + extend(CrispEdges, superClass); + + function CrispEdges() { + return CrispEdges.__super__.constructor.apply(this, arguments); + } + + CrispEdges.names = ['crisp-edges']; + + CrispEdges.prototype.replace = function(string, prefix) { + if (prefix === '-webkit-') { + return string.replace(this.regexp(), '$1-webkit-optimize-contrast'); + } else { + return CrispEdges.__super__.replace.apply(this, arguments); + } + }; + + return CrispEdges; + + })(Value); + + module.exports = CrispEdges; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/display-flex.js b/node_modules/autoprefixer-core/lib/hacks/display-flex.js new file mode 100644 index 0000000..87a1455 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/display-flex.js @@ -0,0 +1,68 @@ +(function() { + var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + OldValue = require('../old-value'); + + Value = require('../value'); + + OldDisplayFlex = (function(superClass) { + extend(OldDisplayFlex, superClass); + + function OldDisplayFlex(unprefixed, prefixed1) { + this.unprefixed = unprefixed; + this.prefixed = prefixed1; + } + + OldDisplayFlex.prototype.check = function(value) { + return value === this.name; + }; + + return OldDisplayFlex; + + })(OldValue); + + DisplayFlex = (function(superClass) { + extend(DisplayFlex, superClass); + + DisplayFlex.names = ['display-flex', 'inline-flex']; + + function DisplayFlex(name, prefixes) { + DisplayFlex.__super__.constructor.apply(this, arguments); + if (name === 'display-flex') { + this.name = 'flex'; + } + } + + DisplayFlex.prototype.check = function(decl) { + return decl.value === this.name; + }; + + DisplayFlex.prototype.prefixed = function(prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0); + }; + + DisplayFlex.prototype.replace = function(string, prefix) { + return this.prefixed(prefix); + }; + + DisplayFlex.prototype.old = function(prefix) { + var prefixed; + prefixed = this.prefixed(prefix); + if (prefixed) { + return new OldValue(this.name, prefixed); + } + }; + + return DisplayFlex; + + })(Value); + + module.exports = DisplayFlex; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/fill-available.js b/node_modules/autoprefixer-core/lib/hacks/fill-available.js new file mode 100644 index 0000000..f7d92c9 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/fill-available.js @@ -0,0 +1,41 @@ +(function() { + var FillAvailable, OldValue, Value, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + OldValue = require('../old-value'); + + Value = require('../value'); + + FillAvailable = (function(superClass) { + extend(FillAvailable, superClass); + + function FillAvailable() { + return FillAvailable.__super__.constructor.apply(this, arguments); + } + + FillAvailable.names = ['fill-available']; + + FillAvailable.prototype.replace = function(string, prefix) { + if (prefix === '-moz-') { + return string.replace(this.regexp(), '$1-moz-available$3'); + } else { + return FillAvailable.__super__.replace.apply(this, arguments); + } + }; + + FillAvailable.prototype.old = function(prefix) { + if (prefix === '-moz-') { + return new OldValue(this.name, '-moz-available'); + } else { + return FillAvailable.__super__.old.apply(this, arguments); + } + }; + + return FillAvailable; + + })(Value); + + module.exports = FillAvailable; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/filter-value.js b/node_modules/autoprefixer-core/lib/hacks/filter-value.js new file mode 100644 index 0000000..40c4b44 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/filter-value.js @@ -0,0 +1,69 @@ +(function() { + var FilterValue, OldFilterValue, OldValue, Value, utils, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + OldValue = require('../old-value'); + + Value = require('../value'); + + utils = require('../utils'); + + OldFilterValue = (function(superClass) { + extend(OldFilterValue, superClass); + + function OldFilterValue() { + return OldFilterValue.__super__.constructor.apply(this, arguments); + } + + OldFilterValue.prototype.clean = function(decl) { + return decl.value = utils.editList(decl.value, (function(_this) { + return function(props) { + if (props.every(function(i) { + return i.indexOf(_this.unprefixed) !== 0; + })) { + return props; + } + return props.filter(function(i) { + return i.indexOf(_this.prefixed) === -1; + }); + }; + })(this)); + }; + + return OldFilterValue; + + })(OldValue); + + FilterValue = (function(superClass) { + extend(FilterValue, superClass); + + function FilterValue() { + return FilterValue.__super__.constructor.apply(this, arguments); + } + + FilterValue.names = ['filter']; + + FilterValue.prototype.replace = function(value, prefix) { + if (prefix === '-webkit-') { + if (value.indexOf('-webkit-filter') === -1) { + return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value; + } else { + return value; + } + } else { + return FilterValue.__super__.replace.apply(this, arguments); + } + }; + + FilterValue.prototype.old = function(prefix) { + return new OldFilterValue(this.name, prefix + this.name); + }; + + return FilterValue; + + })(Value); + + module.exports = FilterValue; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/filter.js b/node_modules/autoprefixer-core/lib/hacks/filter.js new file mode 100644 index 0000000..213cb13 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/filter.js @@ -0,0 +1,29 @@ +(function() { + var Declaration, Filter, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + Filter = (function(superClass) { + extend(Filter, superClass); + + function Filter() { + return Filter.__super__.constructor.apply(this, arguments); + } + + Filter.names = ['filter']; + + Filter.prototype.check = function(decl) { + var v; + v = decl.value; + return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1; + }; + + return Filter; + + })(Declaration); + + module.exports = Filter; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-basis.js b/node_modules/autoprefixer-core/lib/hacks/flex-basis.js new file mode 100644 index 0000000..62ec0f9 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-basis.js @@ -0,0 +1,47 @@ +(function() { + var Declaration, FlexBasis, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + FlexBasis = (function(superClass) { + extend(FlexBasis, superClass); + + function FlexBasis() { + return FlexBasis.__super__.constructor.apply(this, arguments); + } + + FlexBasis.names = ['flex-basis', 'flex-preferred-size']; + + FlexBasis.prototype.normalize = function() { + return 'flex-basis'; + }; + + FlexBasis.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012) { + return prefix + 'flex-preferred-size'; + } else { + return FlexBasis.__super__.prefixed.apply(this, arguments); + } + }; + + FlexBasis.prototype.set = function(decl, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012 || spec === 'final') { + return FlexBasis.__super__.set.apply(this, arguments); + } + }; + + return FlexBasis; + + })(Declaration); + + module.exports = FlexBasis; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-direction.js b/node_modules/autoprefixer-core/lib/hacks/flex-direction.js new file mode 100644 index 0000000..e0f3cfa --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-direction.js @@ -0,0 +1,71 @@ +(function() { + var Declaration, FlexDirection, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + FlexDirection = (function(superClass) { + extend(FlexDirection, superClass); + + function FlexDirection() { + return FlexDirection.__super__.constructor.apply(this, arguments); + } + + FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient']; + + FlexDirection.prototype.normalize = function(prop) { + return 'flex-direction'; + }; + + FlexDirection.prototype.insert = function(decl, prefix, prefixes) { + var already, cloned, dir, orient, ref, spec, value; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + already = decl.parent.some(function(i) { + return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'; + }); + if (already) { + return; + } + value = decl.value; + orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical'; + dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal'; + cloned = this.clone(decl); + cloned.prop = prefix + 'box-orient'; + cloned.value = orient; + if (this.needCascade(decl)) { + cloned.before = this.calcBefore(prefixes, decl, prefix); + } + decl.parent.insertBefore(decl, cloned); + cloned = this.clone(decl); + cloned.prop = prefix + 'box-direction'; + cloned.value = dir; + if (this.needCascade(decl)) { + cloned.before = this.calcBefore(prefixes, decl, prefix); + } + return decl.parent.insertBefore(decl, cloned); + } else { + return FlexDirection.__super__.insert.apply(this, arguments); + } + }; + + FlexDirection.prototype.old = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return [prefix + 'box-orient', prefix + 'box-direction']; + } else { + return FlexDirection.__super__.old.apply(this, arguments); + } + }; + + return FlexDirection; + + })(Declaration); + + module.exports = FlexDirection; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-flow.js b/node_modules/autoprefixer-core/lib/hacks/flex-flow.js new file mode 100644 index 0000000..a929cbe --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-flow.js @@ -0,0 +1,35 @@ +(function() { + var Declaration, FlexFlow, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + FlexFlow = (function(superClass) { + extend(FlexFlow, superClass); + + function FlexFlow() { + return FlexFlow.__super__.constructor.apply(this, arguments); + } + + FlexFlow.names = ['flex-flow']; + + FlexFlow.prototype.set = function(decl, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012) { + return FlexFlow.__super__.set.apply(this, arguments); + } else if (spec === 'final') { + return FlexFlow.__super__.set.apply(this, arguments); + } + }; + + return FlexFlow; + + })(Declaration); + + module.exports = FlexFlow; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-grow.js b/node_modules/autoprefixer-core/lib/hacks/flex-grow.js new file mode 100644 index 0000000..5bd598f --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-grow.js @@ -0,0 +1,41 @@ +(function() { + var Declaration, Flex, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + Flex = (function(superClass) { + extend(Flex, superClass); + + function Flex() { + return Flex.__super__.constructor.apply(this, arguments); + } + + Flex.names = ['flex-grow', 'flex-positive']; + + Flex.prototype.normalize = function() { + return 'flex'; + }; + + Flex.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return prefix + 'box-flex'; + } else if (spec === 2012) { + return prefix + 'flex-positive'; + } else { + return Flex.__super__.prefixed.apply(this, arguments); + } + }; + + return Flex; + + })(Declaration); + + module.exports = Flex; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-shrink.js b/node_modules/autoprefixer-core/lib/hacks/flex-shrink.js new file mode 100644 index 0000000..66610d6 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-shrink.js @@ -0,0 +1,47 @@ +(function() { + var Declaration, FlexShrink, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + FlexShrink = (function(superClass) { + extend(FlexShrink, superClass); + + function FlexShrink() { + return FlexShrink.__super__.constructor.apply(this, arguments); + } + + FlexShrink.names = ['flex-shrink', 'flex-negative']; + + FlexShrink.prototype.normalize = function() { + return 'flex-shrink'; + }; + + FlexShrink.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012) { + return prefix + 'flex-negative'; + } else { + return FlexShrink.__super__.prefixed.apply(this, arguments); + } + }; + + FlexShrink.prototype.set = function(decl, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2012 || spec === 'final') { + return FlexShrink.__super__.set.apply(this, arguments); + } + }; + + return FlexShrink; + + })(Declaration); + + module.exports = FlexShrink; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-spec.js b/node_modules/autoprefixer-core/lib/hacks/flex-spec.js new file mode 100644 index 0000000..59ec38e --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-spec.js @@ -0,0 +1,11 @@ +(function() { + module.exports = function(prefix) { + var spec; + spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0; + if (prefix === '-webkit- 2009') { + prefix = '-webkit-'; + } + return [spec, prefix]; + }; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-values.js b/node_modules/autoprefixer-core/lib/hacks/flex-values.js new file mode 100644 index 0000000..856c783 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-values.js @@ -0,0 +1,37 @@ +(function() { + var FlexValues, OldValue, Value, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + OldValue = require('../old-value'); + + Value = require('../value'); + + FlexValues = (function(superClass) { + extend(FlexValues, superClass); + + function FlexValues() { + return FlexValues.__super__.constructor.apply(this, arguments); + } + + FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis']; + + FlexValues.prototype.prefixed = function(prefix) { + return this.all.prefixed(this.name, prefix); + }; + + FlexValues.prototype.replace = function(string, prefix) { + return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3'); + }; + + FlexValues.prototype.old = function(prefix) { + return new OldValue(this.name, this.prefixed(prefix)); + }; + + return FlexValues; + + })(Value); + + module.exports = FlexValues; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex-wrap.js b/node_modules/autoprefixer-core/lib/hacks/flex-wrap.js new file mode 100644 index 0000000..6d13542 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex-wrap.js @@ -0,0 +1,33 @@ +(function() { + var Declaration, FlexWrap, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + FlexWrap = (function(superClass) { + extend(FlexWrap, superClass); + + function FlexWrap() { + return FlexWrap.__super__.constructor.apply(this, arguments); + } + + FlexWrap.names = ['flex-wrap']; + + FlexWrap.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec !== 2009) { + return FlexWrap.__super__.set.apply(this, arguments); + } + }; + + return FlexWrap; + + })(Declaration); + + module.exports = FlexWrap; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/flex.js b/node_modules/autoprefixer-core/lib/hacks/flex.js new file mode 100644 index 0000000..baee68a --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/flex.js @@ -0,0 +1,58 @@ +(function() { + var Declaration, Flex, flexSpec, list, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + list = require('postcss/lib/list'); + + Flex = (function(superClass) { + extend(Flex, superClass); + + function Flex() { + return Flex.__super__.constructor.apply(this, arguments); + } + + Flex.names = ['flex', 'box-flex']; + + Flex.oldValues = { + 'auto': '1', + 'none': '0' + }; + + Flex.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return prefix + 'box-flex'; + } else { + return Flex.__super__.prefixed.apply(this, arguments); + } + }; + + Flex.prototype.normalize = function() { + return 'flex'; + }; + + Flex.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec === 2009) { + decl.value = list.space(decl.value)[0]; + decl.value = Flex.oldValues[decl.value] || decl.value; + return Flex.__super__.set.call(this, decl, prefix); + } else { + return Flex.__super__.set.apply(this, arguments); + } + }; + + return Flex; + + })(Declaration); + + module.exports = Flex; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/fullscreen.js b/node_modules/autoprefixer-core/lib/hacks/fullscreen.js new file mode 100644 index 0000000..d7a3ccd --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/fullscreen.js @@ -0,0 +1,33 @@ +(function() { + var Fullscreen, Selector, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Selector = require('../selector'); + + Fullscreen = (function(superClass) { + extend(Fullscreen, superClass); + + function Fullscreen() { + return Fullscreen.__super__.constructor.apply(this, arguments); + } + + Fullscreen.names = [':fullscreen']; + + Fullscreen.prototype.prefixed = function(prefix) { + if ('-webkit-' === prefix) { + return ':-webkit-full-screen'; + } else if ('-moz-' === prefix) { + return ':-moz-full-screen'; + } else { + return ":" + prefix + "fullscreen"; + } + }; + + return Fullscreen; + + })(Selector); + + module.exports = Fullscreen; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/gradient.js b/node_modules/autoprefixer-core/lib/hacks/gradient.js new file mode 100644 index 0000000..e1e42d8 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/gradient.js @@ -0,0 +1,234 @@ +(function() { + var Gradient, OldValue, Value, isDirection, list, utils, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + OldValue = require('../old-value'); + + Value = require('../value'); + + utils = require('../utils'); + + list = require('postcss/lib/list'); + + isDirection = /top|left|right|bottom/gi; + + Gradient = (function(superClass) { + extend(Gradient, superClass); + + function Gradient() { + return Gradient.__super__.constructor.apply(this, arguments); + } + + Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']; + + Gradient.prototype.replace = function(string, prefix) { + return list.space(string).map((function(_this) { + return function(value) { + var after, args, close, params; + if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') { + return value; + } + close = value.lastIndexOf(')'); + after = value.slice(close + 1); + args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9); + params = list.comma(args); + params = _this.newDirection(params); + if (prefix === '-webkit- old') { + return _this.oldWebkit(value, args, params, after); + } else { + _this.convertDirection(params); + return prefix + _this.name + '(' + params.join(', ') + ')' + after; + } + }; + })(this)).join(' '); + }; + + Gradient.prototype.directions = { + top: 'bottom', + left: 'right', + bottom: 'top', + right: 'left' + }; + + Gradient.prototype.oldDirections = { + 'top': 'left bottom, left top', + 'left': 'right top, left top', + 'bottom': 'left top, left bottom', + 'right': 'left top, right top', + 'top right': 'left bottom, right top', + 'top left': 'right bottom, left top', + 'right top': 'left bottom, right top', + 'right bottom': 'left top, right bottom', + 'bottom right': 'left top, right bottom', + 'bottom left': 'right top, left bottom', + 'left top': 'right bottom, left top', + 'left bottom': 'right top, left bottom' + }; + + Gradient.prototype.newDirection = function(params) { + var first, value; + first = params[0]; + if (first.indexOf('to ') === -1 && isDirection.test(first)) { + first = first.split(' '); + first = (function() { + var j, len, results; + results = []; + for (j = 0, len = first.length; j < len; j++) { + value = first[j]; + results.push(this.directions[value.toLowerCase()] || value); + } + return results; + }).call(this); + params[0] = 'to ' + first.join(' '); + } + return params; + }; + + Gradient.prototype.oldWebkit = function(value, args, params, after) { + if (args.indexOf('px') !== -1) { + return value; + } + if (this.name !== 'linear-gradient') { + return value; + } + if (params[0] && params[0].indexOf('deg') !== -1) { + return value; + } + if (args.indexOf('-corner') !== -1) { + return value; + } + if (args.indexOf('-side') !== -1) { + return value; + } + params = this.oldDirection(params); + params = this.colorStops(params); + return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after; + }; + + Gradient.prototype.convertDirection = function(params) { + if (params.length > 0) { + if (params[0].slice(0, 3) === 'to ') { + return params[0] = this.fixDirection(params[0]); + } else if (params[0].indexOf('deg') !== -1) { + return params[0] = this.fixAngle(params[0]); + } else if (params[0].indexOf(' at ') !== -1) { + return this.fixRadial(params); + } + } + }; + + Gradient.prototype.fixDirection = function(param) { + var value; + param = param.split(' '); + param.splice(0, 1); + param = (function() { + var j, len, results; + results = []; + for (j = 0, len = param.length; j < len; j++) { + value = param[j]; + results.push(this.directions[value.toLowerCase()] || value); + } + return results; + }).call(this); + return param.join(' '); + }; + + Gradient.prototype.roundFloat = function(float, digits) { + return parseFloat(float.toFixed(digits)); + }; + + Gradient.prototype.fixAngle = function(param) { + param = parseFloat(param); + param = Math.abs(450 - param) % 360; + param = this.roundFloat(param, 3); + return param + "deg"; + }; + + Gradient.prototype.oldDirection = function(params) { + var direction; + if (params.length === 0) { + params; + } + if (params[0].indexOf('to ') !== -1) { + direction = params[0].replace(/^to\s+/, ''); + direction = this.oldDirections[direction]; + params[0] = direction; + return params; + } else { + direction = this.oldDirections.bottom; + return [direction].concat(params); + } + }; + + Gradient.prototype.colorStops = function(params) { + return params.map(function(param, i) { + var color, match, position, ref; + if (i === 0) { + return param; + } + ref = list.space(param), color = ref[0], position = ref[1]; + if (position == null) { + match = param.match(/^(.*\))(\d.*)$/); + if (match) { + color = match[1]; + position = match[2]; + } + } + if (position && position.indexOf(')') !== -1) { + color += ' ' + position; + position = void 0; + } + if (i === 1 && (position === void 0 || position === '0%')) { + return "from(" + color + ")"; + } else if (i === params.length - 1 && (position === void 0 || position === '100%')) { + return "to(" + color + ")"; + } else if (position) { + return "color-stop(" + position + ", " + color + ")"; + } else { + return "color-stop(" + color + ")"; + } + }); + }; + + Gradient.prototype.fixRadial = function(params) { + var first; + first = params[0].split(/\s+at\s+/); + return params.splice(0, 1, first[1], first[0]); + }; + + Gradient.prototype.old = function(prefix) { + var regexp, string, type; + if (prefix === '-webkit-') { + type = this.name === 'linear-gradient' ? 'linear' : 'radial'; + string = '-gradient'; + regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false); + return new OldValue(this.name, prefix + this.name, string, regexp); + } else { + return Gradient.__super__.old.apply(this, arguments); + } + }; + + Gradient.prototype.add = function(decl, prefix) { + var p; + p = decl.prop; + if (p.indexOf('mask') !== -1) { + if (prefix === '-webkit-' || prefix === '-webkit- old') { + return Gradient.__super__.add.apply(this, arguments); + } + } else if (p === 'list-style' || p === 'list-style-image' || p === 'content') { + if (prefix === '-webkit-' || prefix === '-webkit- old') { + return Gradient.__super__.add.apply(this, arguments); + } + } else { + return Gradient.__super__.add.apply(this, arguments); + } + }; + + return Gradient; + + })(Value); + + module.exports = Gradient; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/image-rendering.js b/node_modules/autoprefixer-core/lib/hacks/image-rendering.js new file mode 100644 index 0000000..b1ccd9a --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/image-rendering.js @@ -0,0 +1,49 @@ +(function() { + var Declaration, ImageRendering, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + ImageRendering = (function(superClass) { + extend(ImageRendering, superClass); + + function ImageRendering() { + return ImageRendering.__super__.constructor.apply(this, arguments); + } + + ImageRendering.names = ['image-rendering', 'interpolation-mode']; + + ImageRendering.prototype.check = function(decl) { + return decl.value === 'crisp-edges'; + }; + + ImageRendering.prototype.prefixed = function(prop, prefix) { + if (prefix === '-ms-') { + return '-ms-interpolation-mode'; + } else { + return ImageRendering.__super__.prefixed.apply(this, arguments); + } + }; + + ImageRendering.prototype.set = function(decl, prefix) { + if (prefix === '-ms-') { + decl.prop = '-ms-interpolation-mode'; + decl.value = 'nearest-neighbor'; + return decl; + } else { + return ImageRendering.__super__.set.apply(this, arguments); + } + }; + + ImageRendering.prototype.normalize = function(prop) { + return 'image-rendering'; + }; + + return ImageRendering; + + })(Declaration); + + module.exports = ImageRendering; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/inline-logical.js b/node_modules/autoprefixer-core/lib/hacks/inline-logical.js new file mode 100644 index 0000000..7a698fe --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/inline-logical.js @@ -0,0 +1,31 @@ +(function() { + var Declaration, InlineLogical, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + InlineLogical = (function(superClass) { + extend(InlineLogical, superClass); + + function InlineLogical() { + return InlineLogical.__super__.constructor.apply(this, arguments); + } + + InlineLogical.names = ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end']; + + InlineLogical.prototype.prefixed = function(prop, prefix) { + return prefix + prop.replace('-inline', ''); + }; + + InlineLogical.prototype.normalize = function(prop) { + return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2'); + }; + + return InlineLogical; + + })(Declaration); + + module.exports = InlineLogical; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/justify-content.js b/node_modules/autoprefixer-core/lib/hacks/justify-content.js new file mode 100644 index 0000000..eed29eb --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/justify-content.js @@ -0,0 +1,62 @@ +(function() { + var Declaration, JustifyContent, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + JustifyContent = (function(superClass) { + extend(JustifyContent, superClass); + + function JustifyContent() { + return JustifyContent.__super__.constructor.apply(this, arguments); + } + + JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack']; + + JustifyContent.oldValues = { + 'flex-end': 'end', + 'flex-start': 'start', + 'space-between': 'justify', + 'space-around': 'distribute' + }; + + JustifyContent.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return prefix + 'box-pack'; + } else if (spec === 2012) { + return prefix + 'flex-pack'; + } else { + return JustifyContent.__super__.prefixed.apply(this, arguments); + } + }; + + JustifyContent.prototype.normalize = function(prop) { + return 'justify-content'; + }; + + JustifyContent.prototype.set = function(decl, prefix) { + var spec, value; + spec = flexSpec(prefix)[0]; + if (spec === 2009 || spec === 2012) { + value = JustifyContent.oldValues[decl.value] || decl.value; + decl.value = value; + if (spec !== 2009 || value !== 'distribute') { + return JustifyContent.__super__.set.call(this, decl, prefix); + } + } else if (spec === 'final') { + return JustifyContent.__super__.set.apply(this, arguments); + } + }; + + return JustifyContent; + + })(Declaration); + + module.exports = JustifyContent; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/order.js b/node_modules/autoprefixer-core/lib/hacks/order.js new file mode 100644 index 0000000..592b064 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/order.js @@ -0,0 +1,52 @@ +(function() { + var Declaration, Order, flexSpec, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + flexSpec = require('./flex-spec'); + + Declaration = require('../declaration'); + + Order = (function(superClass) { + extend(Order, superClass); + + function Order() { + return Order.__super__.constructor.apply(this, arguments); + } + + Order.names = ['order', 'flex-order', 'box-ordinal-group']; + + Order.prototype.prefixed = function(prop, prefix) { + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; + if (spec === 2009) { + return prefix + 'box-ordinal-group'; + } else if (spec === 2012) { + return prefix + 'flex-order'; + } else { + return Order.__super__.prefixed.apply(this, arguments); + } + }; + + Order.prototype.normalize = function(prop) { + return 'order'; + }; + + Order.prototype.set = function(decl, prefix) { + var spec; + spec = flexSpec(prefix)[0]; + if (spec === 2009) { + decl.value = (parseInt(decl.value) + 1).toString(); + return Order.__super__.set.call(this, decl, prefix); + } else { + return Order.__super__.set.apply(this, arguments); + } + }; + + return Order; + + })(Declaration); + + module.exports = Order; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/placeholder.js b/node_modules/autoprefixer-core/lib/hacks/placeholder.js new file mode 100644 index 0000000..423d202 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/placeholder.js @@ -0,0 +1,39 @@ +(function() { + var Placeholder, Selector, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Selector = require('../selector'); + + Placeholder = (function(superClass) { + extend(Placeholder, superClass); + + function Placeholder() { + return Placeholder.__super__.constructor.apply(this, arguments); + } + + Placeholder.names = [':placeholder-shown', '::placeholder']; + + Placeholder.prototype.possible = function() { + return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old'); + }; + + Placeholder.prototype.prefixed = function(prefix) { + if ('-webkit-' === prefix) { + return '::-webkit-input-placeholder'; + } else if ('-ms-' === prefix) { + return ':-ms-input-placeholder'; + } else if ('-moz- old' === prefix) { + return ':-moz-placeholder'; + } else { + return "::" + prefix + "placeholder"; + } + }; + + return Placeholder; + + })(Selector); + + module.exports = Placeholder; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/transform-decl.js b/node_modules/autoprefixer-core/lib/hacks/transform-decl.js new file mode 100644 index 0000000..295a6ec --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/transform-decl.js @@ -0,0 +1,66 @@ +(function() { + var Declaration, TransformDecl, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + TransformDecl = (function(superClass) { + extend(TransformDecl, superClass); + + function TransformDecl() { + return TransformDecl.__super__.constructor.apply(this, arguments); + } + + TransformDecl.names = ['transform', 'transform-origin']; + + TransformDecl.functions3d = ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'perspective']; + + TransformDecl.prototype.keykrameParents = function(decl) { + var parent; + parent = decl.parent; + while (parent) { + if (parent.type === 'atrule' && parent.name === 'keyframes') { + return true; + } + parent = parent.parent; + } + return false; + }; + + TransformDecl.prototype.contain3d = function(decl) { + var func, i, len, ref; + if (decl.prop === 'transform-origin') { + return false; + } + ref = TransformDecl.functions3d; + for (i = 0, len = ref.length; i < len; i++) { + func = ref[i]; + if (decl.value.indexOf(func + "(") !== -1) { + return true; + } + } + return false; + }; + + TransformDecl.prototype.insert = function(decl, prefix, prefixes) { + if (prefix === '-ms-') { + if (!this.contain3d(decl) && !this.keykrameParents(decl)) { + return TransformDecl.__super__.insert.apply(this, arguments); + } + } else if (prefix === '-o-') { + if (!this.contain3d(decl)) { + return TransformDecl.__super__.insert.apply(this, arguments); + } + } else { + return TransformDecl.__super__.insert.apply(this, arguments); + } + }; + + return TransformDecl; + + })(Declaration); + + module.exports = TransformDecl; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/hacks/transform-value.js b/node_modules/autoprefixer-core/lib/hacks/transform-value.js new file mode 100644 index 0000000..8f74d65 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/hacks/transform-value.js @@ -0,0 +1,31 @@ +(function() { + var TransformValue, Value, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Value = require('../value'); + + TransformValue = (function(superClass) { + extend(TransformValue, superClass); + + function TransformValue() { + return TransformValue.__super__.constructor.apply(this, arguments); + } + + TransformValue.names = ['transform']; + + TransformValue.prototype.replace = function(value, prefix) { + if (prefix === '-ms-') { + return value; + } else { + return TransformValue.__super__.replace.apply(this, arguments); + } + }; + + return TransformValue; + + })(Value); + + module.exports = TransformValue; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/info.js b/node_modules/autoprefixer-core/lib/info.js new file mode 100644 index 0000000..b6bb1a3 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/info.js @@ -0,0 +1,122 @@ +(function() { + var capitalize, names, prefix; + + capitalize = function(str) { + return str.slice(0, 1).toUpperCase() + str.slice(1); + }; + + names = { + ie: 'IE', + ie_mob: 'IE Mobile', + ios_saf: 'iOS', + op_mini: 'Opera Mini', + op_mob: 'Opera Mobile', + and_chr: 'Chrome for Android', + and_ff: 'Firefox for Android', + and_uc: 'UC for Android' + }; + + prefix = function(name, transition, prefixes) { + var out; + out = ' ' + name + (transition ? '*' : '') + ': '; + out += prefixes.map(function(i) { + return i.replace(/^-(.*)-$/g, '$1'); + }).join(', '); + out += "\n"; + return out; + }; + + module.exports = function(prefixes) { + var atrules, browser, data, j, k, l, len, len1, len2, list, name, needTransition, out, props, ref, ref1, ref2, ref3, ref4, ref5, ref6, selector, selectors, string, transitionProp, useTransition, value, values, version, versions; + if (prefixes.browsers.selected.length === 0) { + return "No browsers selected"; + } + versions = []; + ref = prefixes.browsers.selected; + for (j = 0, len = ref.length; j < len; j++) { + browser = ref[j]; + ref1 = browser.split(' '), name = ref1[0], version = ref1[1]; + name = names[name] || capitalize(name); + if (versions[name]) { + versions[name].push(version); + } else { + versions[name] = [version]; + } + } + out = "Browsers:\n"; + for (browser in versions) { + list = versions[browser]; + list = list.sort(function(a, b) { + return parseFloat(b) - parseFloat(a); + }); + out += ' ' + browser + ': ' + list.join(', ') + "\n"; + } + atrules = ''; + ref2 = prefixes.add; + for (name in ref2) { + data = ref2[name]; + if (name[0] === '@' && data.prefixes) { + atrules += prefix(name, false, data.prefixes); + } + } + if (atrules !== '') { + out += "\nAt-Rules:\n" + atrules; + } + selectors = ''; + ref3 = prefixes.add.selectors; + for (k = 0, len1 = ref3.length; k < len1; k++) { + selector = ref3[k]; + if (selector.prefixes) { + selectors += prefix(selector.name, false, selector.prefixes); + } + } + if (selectors !== '') { + out += "\nSelectors:\n" + selectors; + } + values = ''; + props = ''; + useTransition = false; + needTransition = (ref4 = prefixes.add.transition) != null ? ref4.prefixes : void 0; + ref5 = prefixes.add; + for (name in ref5) { + data = ref5[name]; + if (name[0] !== '@' && data.prefixes) { + transitionProp = needTransition && prefixes.data[name].transition; + if (transitionProp) { + useTransition = true; + } + props += prefix(name, transitionProp, data.prefixes); + } + if (!data.values) { + continue; + } + if (prefixes.transitionProps.some(function(i) { + return i === name; + })) { + continue; + } + ref6 = data.values; + for (l = 0, len2 = ref6.length; l < len2; l++) { + value = ref6[l]; + string = prefix(value.name, false, value.prefixes); + if (values.indexOf(string) === -1) { + values += string; + } + } + } + if (useTransition) { + props += " * - can be used in transition\n"; + } + if (props !== '') { + out += "\nProperties:\n" + props; + } + if (values !== '') { + out += "\nValues:\n" + values; + } + if (atrules === '' && selectors === '' && props === '' && values === '') { + out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.'; + } + return out; + }; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/old-selector.js b/node_modules/autoprefixer-core/lib/old-selector.js new file mode 100644 index 0000000..732d9dc --- /dev/null +++ b/node_modules/autoprefixer-core/lib/old-selector.js @@ -0,0 +1,68 @@ +(function() { + var OldSelector; + + OldSelector = (function() { + function OldSelector(selector, prefix1) { + var i, len, prefix, ref; + this.prefix = prefix1; + this.prefixed = selector.prefixed(this.prefix); + this.regexp = selector.regexp(this.prefix); + this.prefixeds = []; + ref = selector.possible(); + for (i = 0, len = ref.length; i < len; i++) { + prefix = ref[i]; + this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]); + } + this.unprefixed = selector.name; + this.nameRegexp = selector.regexp(); + } + + OldSelector.prototype.isHack = function(rule) { + var before, i, index, len, ref, ref1, regexp, rules, some, string; + index = rule.parent.index(rule) + 1; + rules = rule.parent.nodes; + while (index < rules.length) { + before = rules[index].selector; + if (!before) { + return true; + } + if (before.indexOf(this.unprefixed) !== -1 && before.match(this.nameRegexp)) { + return false; + } + some = false; + ref = this.prefixeds; + for (i = 0, len = ref.length; i < len; i++) { + ref1 = ref[i], string = ref1[0], regexp = ref1[1]; + if (before.indexOf(string) !== -1 && before.match(regexp)) { + some = true; + break; + } + } + if (!some) { + return true; + } + index += 1; + } + return true; + }; + + OldSelector.prototype.check = function(rule) { + if (rule.selector.indexOf(this.prefixed) === -1) { + return false; + } + if (!rule.selector.match(this.regexp)) { + return false; + } + if (this.isHack(rule)) { + return false; + } + return true; + }; + + return OldSelector; + + })(); + + module.exports = OldSelector; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/old-value.js b/node_modules/autoprefixer-core/lib/old-value.js new file mode 100644 index 0000000..58651e6 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/old-value.js @@ -0,0 +1,30 @@ +(function() { + var OldValue, utils; + + utils = require('./utils'); + + OldValue = (function() { + function OldValue(unprefixed, prefixed, string, regexp) { + this.unprefixed = unprefixed; + this.prefixed = prefixed; + this.string = string; + this.regexp = regexp; + this.regexp || (this.regexp = utils.regexp(this.prefixed)); + this.string || (this.string = this.prefixed); + } + + OldValue.prototype.check = function(value) { + if (value.indexOf(this.string) !== -1) { + return !!value.match(this.regexp); + } else { + return false; + } + }; + + return OldValue; + + })(); + + module.exports = OldValue; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/prefixer.js b/node_modules/autoprefixer-core/lib/prefixer.js new file mode 100644 index 0000000..b8966ca --- /dev/null +++ b/node_modules/autoprefixer-core/lib/prefixer.js @@ -0,0 +1,119 @@ +(function() { + var Browsers, Prefixer, clone, utils, vendor, + hasProp = {}.hasOwnProperty; + + Browsers = require('./browsers'); + + utils = require('./utils'); + + vendor = require('postcss/lib/vendor'); + + clone = function(obj, parent) { + var cloned, i, value; + if (typeof obj !== 'object') { + return obj; + } + cloned = new obj.constructor(); + for (i in obj) { + if (!hasProp.call(obj, i)) continue; + value = obj[i]; + if (i === 'parent' && typeof value === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (i === 'source') { + cloned[i] = value; + } else if (value instanceof Array) { + cloned[i] = value.map(function(i) { + return clone(i, cloned); + }); + } else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') { + cloned[i] = clone(value, cloned); + } + } + return cloned; + }; + + Prefixer = (function() { + Prefixer.hack = function(klass) { + var j, len, name, ref, results; + this.hacks || (this.hacks = {}); + ref = klass.names; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + name = ref[j]; + results.push(this.hacks[name] = klass); + } + return results; + }; + + Prefixer.load = function(name, prefixes, all) { + var klass, ref; + klass = (ref = this.hacks) != null ? ref[name] : void 0; + if (klass) { + return new klass(name, prefixes, all); + } else { + return new this(name, prefixes, all); + } + }; + + Prefixer.clone = function(node, overrides) { + var cloned, name; + cloned = clone(node); + for (name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + }; + + function Prefixer(name1, prefixes1, all1) { + this.name = name1; + this.prefixes = prefixes1; + this.all = all1; + } + + Prefixer.prototype.parentPrefix = function(node) { + var prefix; + prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent); + if (Browsers.prefixes().indexOf(prefix) === -1) { + prefix = false; + } + return node._autoprefixerPrefix = prefix; + }; + + Prefixer.prototype.process = function(node) { + var added, j, k, len, len1, parent, prefix, prefixes, ref; + if (!this.check(node)) { + return; + } + parent = this.parentPrefix(node); + prefixes = []; + ref = this.prefixes; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; + if (parent && parent !== utils.removeNote(prefix)) { + continue; + } + prefixes.push(prefix); + } + added = []; + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; + if (this.add(node, prefix, added.concat([prefix]))) { + added.push(prefix); + } + } + return added; + }; + + Prefixer.prototype.clone = function(node, overrides) { + return Prefixer.clone(node, overrides); + }; + + return Prefixer; + + })(); + + module.exports = Prefixer; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/prefixes.js b/node_modules/autoprefixer-core/lib/prefixes.js new file mode 100644 index 0000000..e55d852 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/prefixes.js @@ -0,0 +1,368 @@ +(function() { + var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Value, declsCache, utils, vendor; + + Declaration = require('./declaration'); + + Resolution = require('./resolution'); + + Processor = require('./processor'); + + Supports = require('./supports'); + + Browsers = require('./browsers'); + + Selector = require('./selector'); + + AtRule = require('./at-rule'); + + Value = require('./value'); + + utils = require('./utils'); + + vendor = require('postcss/lib/vendor'); + + Selector.hack(require('./hacks/fullscreen')); + + Selector.hack(require('./hacks/placeholder')); + + Declaration.hack(require('./hacks/flex')); + + Declaration.hack(require('./hacks/order')); + + Declaration.hack(require('./hacks/filter')); + + Declaration.hack(require('./hacks/flex-flow')); + + Declaration.hack(require('./hacks/flex-grow')); + + Declaration.hack(require('./hacks/flex-wrap')); + + Declaration.hack(require('./hacks/align-self')); + + Declaration.hack(require('./hacks/flex-basis')); + + Declaration.hack(require('./hacks/align-items')); + + Declaration.hack(require('./hacks/flex-shrink')); + + Declaration.hack(require('./hacks/break-inside')); + + Declaration.hack(require('./hacks/border-image')); + + Declaration.hack(require('./hacks/align-content')); + + Declaration.hack(require('./hacks/border-radius')); + + Declaration.hack(require('./hacks/block-logical')); + + Declaration.hack(require('./hacks/inline-logical')); + + Declaration.hack(require('./hacks/transform-decl')); + + Declaration.hack(require('./hacks/flex-direction')); + + Declaration.hack(require('./hacks/image-rendering')); + + Declaration.hack(require('./hacks/justify-content')); + + Declaration.hack(require('./hacks/background-size')); + + Value.hack(require('./hacks/gradient')); + + Value.hack(require('./hacks/crisp-edges')); + + Value.hack(require('./hacks/flex-values')); + + Value.hack(require('./hacks/display-flex')); + + Value.hack(require('./hacks/filter-value')); + + Value.hack(require('./hacks/fill-available')); + + Value.hack(require('./hacks/transform-value')); + + declsCache = {}; + + Prefixes = (function() { + function Prefixes(data1, browsers, options) { + var ref; + this.data = data1; + this.browsers = browsers; + this.options = options != null ? options : {}; + ref = this.preprocess(this.select(this.data)), this.add = ref[0], this.remove = ref[1]; + this.processor = new Processor(this); + } + + Prefixes.prototype.transitionProps = ['transition', 'transition-property']; + + Prefixes.prototype.cleaner = function() { + var empty; + if (!this.cleanerCache) { + if (this.browsers.selected.length) { + empty = new Browsers(this.browsers.data, []); + this.cleanerCache = new Prefixes(this.data, empty, this.options); + } else { + return this; + } + } + return this.cleanerCache; + }; + + Prefixes.prototype.select = function(list) { + var add, all, data, name, notes, selected; + selected = { + add: {}, + remove: {} + }; + for (name in list) { + data = list[name]; + add = data.browsers.map(function(i) { + var params; + params = i.split(' '); + return { + browser: params[0] + ' ' + params[1], + note: params[2] + }; + }); + notes = add.filter(function(i) { + return i.note; + }).map((function(_this) { + return function(i) { + return _this.browsers.prefix(i.browser) + ' ' + i.note; + }; + })(this)); + notes = utils.uniq(notes); + add = add.filter((function(_this) { + return function(i) { + return _this.browsers.isSelected(i.browser); + }; + })(this)).map((function(_this) { + return function(i) { + var prefix; + prefix = _this.browsers.prefix(i.browser); + if (i.note) { + return prefix + ' ' + i.note; + } else { + return prefix; + } + }; + })(this)); + add = this.sort(utils.uniq(add)); + all = data.browsers.map((function(_this) { + return function(i) { + return _this.browsers.prefix(i); + }; + })(this)); + if (data.mistakes) { + all = all.concat(data.mistakes); + } + all = all.concat(notes); + all = utils.uniq(all); + if (add.length) { + selected.add[name] = add; + if (add.length < all.length) { + selected.remove[name] = all.filter(function(i) { + return add.indexOf(i) === -1; + }); + } + } else { + selected.remove[name] = all; + } + } + return selected; + }; + + Prefixes.prototype.sort = function(prefixes) { + return prefixes.sort(function(a, b) { + var aLength, bLength; + aLength = utils.removeNote(a).length; + bLength = utils.removeNote(b).length; + if (aLength === bLength) { + return b.length - a.length; + } else { + return bLength - aLength; + } + }); + }; + + Prefixes.prototype.preprocess = function(selected) { + var add, j, k, l, len, len1, len2, len3, len4, len5, len6, m, n, name, o, old, olds, p, prefix, prefixed, prefixes, prop, props, ref, ref1, ref2, remove, selector, value, values; + add = { + selectors: [], + '@supports': new Supports(this) + }; + ref = selected.add; + for (name in ref) { + prefixes = ref[name]; + if (name === '@keyframes' || name === '@viewport') { + add[name] = new AtRule(name, prefixes, this); + } else if (name === '@resolution') { + add[name] = new Resolution(name, prefixes, this); + } else if (this.data[name].selector) { + add.selectors.push(Selector.load(name, prefixes, this)); + } else { + props = this.data[name].transition ? this.transitionProps : this.data[name].props; + if (props) { + value = Value.load(name, prefixes, this); + for (j = 0, len = props.length; j < len; j++) { + prop = props[j]; + if (!add[prop]) { + add[prop] = { + values: [] + }; + } + add[prop].values.push(value); + } + } + if (!this.data[name].props) { + values = ((ref1 = add[name]) != null ? ref1.values : void 0) || []; + add[name] = Declaration.load(name, prefixes, this); + add[name].values = values; + } + } + } + remove = { + selectors: [] + }; + ref2 = selected.remove; + for (name in ref2) { + prefixes = ref2[name]; + if (this.data[name].selector) { + selector = Selector.load(name, prefixes); + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; + remove.selectors.push(selector.old(prefix)); + } + } else if (name === '@keyframes' || name === '@viewport') { + for (l = 0, len2 = prefixes.length; l < len2; l++) { + prefix = prefixes[l]; + prefixed = '@' + prefix + name.slice(1); + remove[prefixed] = { + remove: true + }; + } + } else if (name === '@resolution') { + remove[name] = new Resolution(name, prefixes, this); + } else { + props = this.data[name].transition ? this.transitionProps : this.data[name].props; + if (props) { + value = Value.load(name, [], this); + for (m = 0, len3 = prefixes.length; m < len3; m++) { + prefix = prefixes[m]; + old = value.old(prefix); + if (old) { + for (n = 0, len4 = props.length; n < len4; n++) { + prop = props[n]; + if (!remove[prop]) { + remove[prop] = {}; + } + if (!remove[prop].values) { + remove[prop].values = []; + } + remove[prop].values.push(old); + } + } + } + } + if (!this.data[name].props) { + for (o = 0, len5 = prefixes.length; o < len5; o++) { + prefix = prefixes[o]; + prop = vendor.unprefixed(name); + olds = this.decl(name).old(name, prefix); + for (p = 0, len6 = olds.length; p < len6; p++) { + prefixed = olds[p]; + if (!remove[prefixed]) { + remove[prefixed] = {}; + } + remove[prefixed].remove = true; + } + } + } + } + } + return [add, remove]; + }; + + Prefixes.prototype.decl = function(prop) { + var decl; + decl = declsCache[prop]; + if (decl) { + return decl; + } else { + return declsCache[prop] = Declaration.load(prop); + } + }; + + Prefixes.prototype.unprefixed = function(prop) { + prop = vendor.unprefixed(prop); + return this.decl(prop).normalize(prop); + }; + + Prefixes.prototype.prefixed = function(prop, prefix) { + prop = vendor.unprefixed(prop); + return this.decl(prop).prefixed(prop, prefix); + }; + + Prefixes.prototype.values = function(type, prop) { + var data, global, ref, ref1, values; + data = this[type]; + global = (ref = data['*']) != null ? ref.values : void 0; + values = (ref1 = data[prop]) != null ? ref1.values : void 0; + if (global && values) { + return utils.uniq(global.concat(values)); + } else { + return global || values || []; + } + }; + + Prefixes.prototype.group = function(decl) { + var checker, index, length, rule, unprefixed; + rule = decl.parent; + index = rule.index(decl); + length = rule.nodes.length; + unprefixed = this.unprefixed(decl.prop); + checker = (function(_this) { + return function(step, callback) { + var other; + index += step; + while (index >= 0 && index < length) { + other = rule.nodes[index]; + if (other.type === 'decl') { + if (step === -1 && other.prop === unprefixed) { + if (!Browsers.withPrefix(other.value)) { + break; + } + } + if (_this.unprefixed(other.prop) !== unprefixed) { + break; + } else if (callback(other) === true) { + return true; + } + if (step === +1 && other.prop === unprefixed) { + if (!Browsers.withPrefix(other.value)) { + break; + } + } + } + index += step; + } + return false; + }; + })(this); + return { + up: function(callback) { + return checker(-1, callback); + }, + down: function(callback) { + return checker(+1, callback); + } + }; + }; + + return Prefixes; + + })(); + + module.exports = Prefixes; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/processor.js b/node_modules/autoprefixer-core/lib/processor.js new file mode 100644 index 0000000..6f27b49 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/processor.js @@ -0,0 +1,213 @@ +(function() { + var Processor, Value, utils, vendor; + + vendor = require('postcss/lib/vendor'); + + Value = require('./value'); + + utils = require('./utils'); + + Processor = (function() { + function Processor(prefixes) { + this.prefixes = prefixes; + } + + Processor.prototype.add = function(css) { + var keyframes, resolution, supports, viewport; + resolution = this.prefixes.add['@resolution']; + keyframes = this.prefixes.add['@keyframes']; + viewport = this.prefixes.add['@viewport']; + supports = this.prefixes.add['@supports']; + css.eachAtRule((function(_this) { + return function(rule) { + if (rule.name === 'keyframes') { + if (!_this.disabled(rule)) { + return keyframes != null ? keyframes.process(rule) : void 0; + } + } else if (rule.name === 'viewport') { + if (!_this.disabled(rule)) { + return viewport != null ? viewport.process(rule) : void 0; + } + } else if (rule.name === 'supports') { + if (!_this.disabled(rule)) { + return supports.process(rule); + } + } else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) { + if (!_this.disabled(rule)) { + return resolution != null ? resolution.process(rule) : void 0; + } + } + }; + })(this)); + css.eachRule((function(_this) { + return function(rule) { + var j, len, ref, results, selector; + if (_this.disabled(rule)) { + return; + } + ref = _this.prefixes.add.selectors; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + selector = ref[j]; + results.push(selector.process(rule)); + } + return results; + }; + })(this)); + css.eachDecl((function(_this) { + return function(decl) { + var prefix; + prefix = _this.prefixes.add[decl.prop]; + if (prefix && prefix.prefixes) { + if (!_this.disabled(decl)) { + return prefix.process(decl); + } + } + }; + })(this)); + return css.eachDecl((function(_this) { + return function(decl) { + var j, len, ref, unprefixed, value; + if (_this.disabled(decl)) { + return; + } + unprefixed = _this.prefixes.unprefixed(decl.prop); + ref = _this.prefixes.values('add', unprefixed); + for (j = 0, len = ref.length; j < len; j++) { + value = ref[j]; + value.process(decl); + } + return Value.save(_this.prefixes, decl); + }; + })(this)); + }; + + Processor.prototype.remove = function(css) { + var checker, j, len, ref, resolution; + resolution = this.prefixes.remove['@resolution']; + css.eachAtRule((function(_this) { + return function(rule, i) { + if (_this.prefixes.remove['@' + rule.name]) { + if (!_this.disabled(rule)) { + return rule.parent.remove(i); + } + } else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) { + return resolution != null ? resolution.clean(rule) : void 0; + } + }; + })(this)); + ref = this.prefixes.remove.selectors; + for (j = 0, len = ref.length; j < len; j++) { + checker = ref[j]; + css.eachRule((function(_this) { + return function(rule, i) { + if (checker.check(rule)) { + if (!_this.disabled(rule)) { + return rule.parent.remove(i); + } + } + }; + })(this)); + } + return css.eachDecl((function(_this) { + return function(decl, i) { + var k, len1, notHack, ref1, ref2, rule, unprefixed; + if (_this.disabled(decl)) { + return; + } + rule = decl.parent; + unprefixed = _this.prefixes.unprefixed(decl.prop); + if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) { + notHack = _this.prefixes.group(decl).down(function(other) { + return other.prop === unprefixed; + }); + if (notHack && !_this.withHackValue(decl)) { + if (decl.style('before').indexOf("\n") > -1) { + _this.reduceSpaces(decl); + } + rule.remove(i); + return; + } + } + ref2 = _this.prefixes.values('remove', unprefixed); + for (k = 0, len1 = ref2.length; k < len1; k++) { + checker = ref2[k]; + if (checker.check(decl.value)) { + unprefixed = checker.unprefixed; + notHack = _this.prefixes.group(decl).down(function(other) { + return other.value.indexOf(unprefixed) !== -1; + }); + if (notHack) { + rule.remove(i); + return; + } else if (checker.clean) { + checker.clean(decl); + return; + } + } + } + }; + })(this)); + }; + + Processor.prototype.withHackValue = function(decl) { + return decl.prop === '-webkit-background-clip' && decl.value === 'text'; + }; + + Processor.prototype.disabled = function(node) { + var status; + if (node._autoprefixerDisabled != null) { + return node._autoprefixerDisabled; + } else if (node.nodes) { + status = void 0; + node.each(function(i) { + if (i.type !== 'comment') { + return; + } + if (i.text === 'autoprefixer: off') { + status = false; + return false; + } else if (i.text === 'autoprefixer: on') { + status = true; + return false; + } + }); + return node._autoprefixerDisabled = status != null ? !status : node.parent ? this.disabled(node.parent) : false; + } else { + return node._autoprefixerDisabled = this.disabled(node.parent); + } + }; + + Processor.prototype.reduceSpaces = function(decl) { + var diff, parts, prevMin, stop; + stop = false; + this.prefixes.group(decl).up(function(other) { + return stop = true; + }); + if (stop) { + return; + } + parts = decl.style('before').split("\n"); + prevMin = parts[parts.length - 1].length; + diff = false; + return this.prefixes.group(decl).down(function(other) { + var last; + parts = other.style('before').split("\n"); + last = parts.length - 1; + if (parts[last].length > prevMin) { + if (diff === false) { + diff = parts[last].length - prevMin; + } + parts[last] = parts[last].slice(0, -diff); + return other.before = parts.join("\n"); + } + }); + }; + + return Processor; + + })(); + + module.exports = Processor; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/resolution.js b/node_modules/autoprefixer-core/lib/resolution.js new file mode 100644 index 0000000..44147ce --- /dev/null +++ b/node_modules/autoprefixer-core/lib/resolution.js @@ -0,0 +1,98 @@ +(function() { + var Prefixer, Resolution, n2f, regexp, split, utils, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Prefixer = require('./prefixer'); + + utils = require('./utils'); + + n2f = require('num2fraction'); + + regexp = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi)/gi; + + split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i; + + Resolution = (function(superClass) { + extend(Resolution, superClass); + + function Resolution() { + return Resolution.__super__.constructor.apply(this, arguments); + } + + Resolution.prototype.prefixName = function(prefix, name) { + return name = prefix === '-moz-' ? name + '--moz-device-pixel-ratio' : prefix + name + '-device-pixel-ratio'; + }; + + Resolution.prototype.prefixQuery = function(prefix, name, colon, value, units) { + if (units === 'dpi') { + value = Number(value / 96); + } + if (prefix === '-o-') { + value = n2f(value); + } + return this.prefixName(prefix, name) + colon + value; + }; + + Resolution.prototype.clean = function(rule) { + var j, len, prefix, ref; + if (!this.bad) { + this.bad = []; + ref = this.prefixes; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; + this.bad.push(this.prefixName(prefix, 'min')); + this.bad.push(this.prefixName(prefix, 'max')); + } + } + return rule.params = utils.editList(rule.params, (function(_this) { + return function(queries) { + return queries.filter(function(query) { + return _this.bad.every(function(i) { + return query.indexOf(i) === -1; + }); + }); + }; + })(this)); + }; + + Resolution.prototype.process = function(rule) { + var parent, prefixes; + parent = this.parentPrefix(rule); + prefixes = parent ? [parent] : this.prefixes; + return rule.params = utils.editList(rule.params, (function(_this) { + return function(origin, prefixed) { + var j, k, len, len1, prefix, processed, query; + for (j = 0, len = origin.length; j < len; j++) { + query = origin[j]; + if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) { + prefixed.push(query); + continue; + } + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; + if (prefix === '-moz-' && rule.params.indexOf('dpi') !== -1) { + continue; + } else { + processed = query.replace(regexp, function(str) { + var parts; + parts = str.match(split); + return _this.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]); + }); + prefixed.push(processed); + } + } + prefixed.push(query); + } + return utils.uniq(prefixed); + }; + })(this)); + }; + + return Resolution; + + })(Prefixer); + + module.exports = Resolution; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/selector.js b/node_modules/autoprefixer-core/lib/selector.js new file mode 100644 index 0000000..07866fd --- /dev/null +++ b/node_modules/autoprefixer-core/lib/selector.js @@ -0,0 +1,117 @@ +(function() { + var Browsers, OldSelector, Prefixer, Selector, utils, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + OldSelector = require('./old-selector'); + + Prefixer = require('./prefixer'); + + Browsers = require('./browsers'); + + utils = require('./utils'); + + Selector = (function(superClass) { + extend(Selector, superClass); + + function Selector(name1, prefixes, all) { + this.name = name1; + this.prefixes = prefixes; + this.all = all; + this.regexpCache = {}; + } + + Selector.prototype.check = function(rule) { + if (rule.selector.indexOf(this.name) !== -1) { + return !!rule.selector.match(this.regexp()); + } else { + return false; + } + }; + + Selector.prototype.prefixed = function(prefix) { + return this.name.replace(/^([^\w]*)/, '$1' + prefix); + }; + + Selector.prototype.regexp = function(prefix) { + var name; + if (this.regexpCache[prefix]) { + return this.regexpCache[prefix]; + } + name = prefix ? this.prefixed(prefix) : this.name; + return this.regexpCache[prefix] = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi"); + }; + + Selector.prototype.possible = function() { + return Browsers.prefixes(); + }; + + Selector.prototype.prefixeds = function(rule) { + var i, len, prefix, prefixeds, ref; + if (rule._autoprefixerPrefixeds) { + return rule._autoprefixerPrefixeds; + } + prefixeds = {}; + ref = this.possible(); + for (i = 0, len = ref.length; i < len; i++) { + prefix = ref[i]; + prefixeds[prefix] = this.replace(rule.selector, prefix); + } + return rule._autoprefixerPrefixeds = prefixeds; + }; + + Selector.prototype.already = function(rule, prefixeds, prefix) { + var before, index, key, prefixed, some; + index = rule.parent.index(rule) - 1; + while (index >= 0) { + before = rule.parent.nodes[index]; + if (before.type !== 'rule') { + return false; + } + some = false; + for (key in prefixeds) { + prefixed = prefixeds[key]; + if (before.selector === prefixed) { + if (prefix === key) { + return true; + } else { + some = true; + break; + } + } + } + if (!some) { + return false; + } + index -= 1; + } + return false; + }; + + Selector.prototype.replace = function(selector, prefix) { + return selector.replace(this.regexp(), '$1' + this.prefixed(prefix)); + }; + + Selector.prototype.add = function(rule, prefix) { + var cloned, prefixeds; + prefixeds = this.prefixeds(rule); + if (this.already(rule, prefixeds, prefix)) { + return; + } + cloned = this.clone(rule, { + selector: prefixeds[prefix] + }); + return rule.parent.insertBefore(rule, cloned); + }; + + Selector.prototype.old = function(prefix) { + return new OldSelector(this, prefix); + }; + + return Selector; + + })(Prefixer); + + module.exports = Selector; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/supports.js b/node_modules/autoprefixer-core/lib/supports.js new file mode 100644 index 0000000..b89476a --- /dev/null +++ b/node_modules/autoprefixer-core/lib/supports.js @@ -0,0 +1,115 @@ +(function() { + var Prefixes, Supports, Value, findCondition, findDecl, list, postcss, split, utils; + + Prefixes = require('./prefixes'); + + Value = require('./value'); + + utils = require('./utils'); + + postcss = require('postcss'); + + list = require('postcss/lib/list'); + + split = /\(\s*([^\(\):]+)\s*:([^\)]+)/; + + findDecl = /\(\s*([^\(\):]+)\s*:\s*(.+)\s*\)/g; + + findCondition = /(not\s*)?\(\s*([^\(\):]+)\s*:\s*(.+?(?!\s*or\s*).+?)\s*\)*\s*\)\s*or\s*/gi; + + Supports = (function() { + function Supports(all1) { + this.all = all1; + } + + Supports.prototype.virtual = function(prop, value) { + var rule; + rule = postcss.parse('a{}').first; + rule.append({ + prop: prop, + value: value, + before: '' + }); + return rule; + }; + + Supports.prototype.prefixed = function(prop, value) { + var decl, j, k, len, len1, prefixer, ref, ref1, rule; + rule = this.virtual(prop, value); + prefixer = this.all.add[prop]; + if (prefixer != null) { + if (typeof prefixer.process === "function") { + prefixer.process(rule.first); + } + } + ref = rule.nodes; + for (j = 0, len = ref.length; j < len; j++) { + decl = ref[j]; + ref1 = this.all.values('add', prop); + for (k = 0, len1 = ref1.length; k < len1; k++) { + value = ref1[k]; + value.process(decl); + } + Value.save(this.all, decl); + } + return rule.nodes; + }; + + Supports.prototype.clean = function(params) { + return params.replace(findCondition, (function(_this) { + return function(all) { + var _, check, checker, j, len, prop, ref, ref1, ref2, unprefixed, value; + if (all.slice(0, 3).toLowerCase() === 'not') { + return all; + } + ref = all.match(split), _ = ref[0], prop = ref[1], value = ref[2]; + unprefixed = _this.all.unprefixed(prop); + if ((ref1 = _this.all.cleaner().remove[prop]) != null ? ref1.remove : void 0) { + check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':'); + if (check.test(params)) { + return ''; + } + } + ref2 = _this.all.cleaner().values('remove', unprefixed); + for (j = 0, len = ref2.length; j < len; j++) { + checker = ref2[j]; + if (checker.check(value)) { + return ''; + } + } + return all; + }; + })(this)).replace(/\(\s*\((.*)\)\s*\)/g, '($1)'); + }; + + Supports.prototype.process = function(rule) { + rule.params = this.clean(rule.params); + return rule.params = rule.params.replace(findDecl, (function(_this) { + return function(all, prop, value) { + var i, stringed; + stringed = (function() { + var j, len, ref, results; + ref = this.prefixed(prop, value); + results = []; + for (j = 0, len = ref.length; j < len; j++) { + i = ref[j]; + results.push("(" + i.prop + ": " + i.value + ")"); + } + return results; + }).call(_this); + if (stringed.length === 1) { + return stringed[0]; + } else { + return '(' + stringed.join(' or ') + ')'; + } + }; + })(this)); + }; + + return Supports; + + })(); + + module.exports = Supports; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/utils.js b/node_modules/autoprefixer-core/lib/utils.js new file mode 100644 index 0000000..4334cca --- /dev/null +++ b/node_modules/autoprefixer-core/lib/utils.js @@ -0,0 +1,57 @@ +(function() { + var list; + + list = require('postcss/lib/list'); + + module.exports = { + error: function(text) { + var err; + err = new Error(text); + err.autoprefixer = true; + throw err; + }, + uniq: function(array) { + var filtered, i, j, len; + filtered = []; + for (j = 0, len = array.length; j < len; j++) { + i = array[j]; + if (filtered.indexOf(i) === -1) { + filtered.push(i); + } + } + return filtered; + }, + removeNote: function(string) { + if (string.indexOf(' ') === -1) { + return string; + } else { + return string.split(' ')[0]; + } + }, + escapeRegexp: function(string) { + return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&'); + }, + regexp: function(word, escape) { + if (escape == null) { + escape = true; + } + if (escape) { + word = this.escapeRegexp(word); + } + return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi"); + }, + editList: function(value, callback) { + var changed, join, origin; + origin = list.comma(value); + changed = callback(origin, []); + if (origin === changed) { + return value; + } else { + join = value.match(/,\s*/); + join = join ? join[0] : ', '; + return changed.join(join); + } + } + }; + +}).call(this); diff --git a/node_modules/autoprefixer-core/lib/value.js b/node_modules/autoprefixer-core/lib/value.js new file mode 100644 index 0000000..6f9bd52 --- /dev/null +++ b/node_modules/autoprefixer-core/lib/value.js @@ -0,0 +1,103 @@ +(function() { + var OldValue, Prefixer, Value, utils, vendor, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Prefixer = require('./prefixer'); + + OldValue = require('./old-value'); + + utils = require('./utils'); + + vendor = require('postcss/lib/vendor'); + + Value = (function(superClass) { + extend(Value, superClass); + + function Value() { + return Value.__super__.constructor.apply(this, arguments); + } + + Value.save = function(prefixes, decl) { + var already, cloned, prefix, prefixed, propPrefix, ref, results, rule, trimmed, value; + ref = decl._autoprefixerValues; + results = []; + for (prefix in ref) { + value = ref[prefix]; + if (value === decl.value) { + continue; + } + propPrefix = vendor.prefix(decl.prop); + if (propPrefix === prefix) { + results.push(decl.value = value); + } else if (propPrefix === '-pie-') { + continue; + } else { + prefixed = prefixes.prefixed(decl.prop, prefix); + rule = decl.parent; + if (rule.every(function(i) { + return i.prop !== prefixed; + })) { + trimmed = value.replace(/\s+/, ' '); + already = rule.some(function(i) { + return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed; + }); + if (!already) { + if (value.indexOf('-webkit-filter') !== -1 && (decl.prop === 'transition' || decl.prop === 'trasition-property')) { + results.push(decl.value = value); + } else { + cloned = this.clone(decl, { + value: value + }); + results.push(decl.parent.insertBefore(decl, cloned)); + } + } else { + results.push(void 0); + } + } else { + results.push(void 0); + } + } + } + return results; + }; + + Value.prototype.check = function(decl) { + var value; + value = decl.value; + if (value.indexOf(this.name) !== -1) { + return !!value.match(this.regexp()); + } else { + return false; + } + }; + + Value.prototype.regexp = function() { + return this.regexpCache || (this.regexpCache = utils.regexp(this.name)); + }; + + Value.prototype.replace = function(string, prefix) { + return string.replace(this.regexp(), '$1' + prefix + '$2'); + }; + + Value.prototype.add = function(decl, prefix) { + var ref, value; + decl._autoprefixerValues || (decl._autoprefixerValues = {}); + value = decl._autoprefixerValues[prefix] || ((ref = decl._value) != null ? ref.raw : void 0) || decl.value; + value = this.replace(value, prefix); + if (value) { + return decl._autoprefixerValues[prefix] = value; + } + }; + + Value.prototype.old = function(prefix) { + return new OldValue(this.name, prefix + this.name); + }; + + return Value; + + })(Prefixer); + + module.exports = Value; + +}).call(this); diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/.npmignore b/node_modules/autoprefixer-core/node_modules/browserslist/.npmignore new file mode 100644 index 0000000..1aa2d59 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/.npmignore @@ -0,0 +1,8 @@ +.gitignore + +node_modules/ + +test/ +.travis.yml + +gulpfile.js diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/ChangeLog.md b/node_modules/autoprefixer-core/node_modules/browserslist/ChangeLog.md new file mode 100644 index 0000000..fe4ee0c --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/ChangeLog.md @@ -0,0 +1,15 @@ +## 0.2 +* Return Can I Use joined versions as `ios_saf 7.0-7.1`. + +## 0.1.3 +* Better work with Can I Use joined versions like `ios_saf 7.0-7.1`. +* Browserslist now understands `ios_saf 7.0` or `ios_saf 7`. + +## 0.1.2 +* Do not create global `browserslist` var (by Maxime Thirouin). + +## 0.1.1 +* Sort browsers by name and version. + +## 0.1 +* Initial release. diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/LICENSE b/node_modules/autoprefixer-core/node_modules/browserslist/LICENSE new file mode 100644 index 0000000..1ae47a2 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2014 Andrey Sitnik + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/README.md b/node_modules/autoprefixer-core/node_modules/browserslist/README.md new file mode 100644 index 0000000..dd95701 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/README.md @@ -0,0 +1,100 @@ +# Browserslist [![Build Status](https://travis-ci.org/ai/browserslist.svg)](https://travis-ci.org/ai/browserslist) + +Get browser versions that match given criteria. +Useful for tools like [Autoprefixer]. + +You can select browsers by passing a string. This library will use Can I Use +data to return the appropriate list of all matching versions. + +For example, the last version of each major browser and version, +with a usage of over 5% in global usage statistics: + +```js +browserslist('> 5%, last 1 version'); +//=> ['and_chr 40', 'chrome 40', 'chrome 39', 'firefox 35', 'firefox 34', +// 'ie 11', 'ie_mob 11', 'ios_saf 8.1', 'opera 26', 'safari 8'] +``` + +If you don't provide an argument, Browserslist will look for a `browserslist` +config file in current or parent directories. + +If no config file is found, Browserslist will use the default list: +`> 1%, last 2 versions, Firefox ESR, Opera 12.1`. + + +Sponsored by Evil Martians + + +[Autoprefixer]: https://github.com/postcss/autoprefixer + +## Queries + +You can specify the browsers by queries (case insensitive): + +* `last 2 versions`: the last 2 versions for each major browser. +* `last 2 Chrome versions`: the last 2 versions of Chrome browser. +* `> 5%`: versions selected by global usage statistics. +* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code]. +* `Firefox > 20`: versions of Firefox newer than 20. +* `Firefox >= 20`: versions of Firefox newer than or equal to 20. +* `Firefox < 20`: versions of Firefox less than 20. +* `Firefox <= 20`: versions of Firefox less than or equal to 20. +* `Firefox ESR`: the latest [Firefox ESR] version. +* `iOS 7`: the iOS browser version 7 directly. + +Blackberry and Android WebView will not be used in `last n versions`. +You should add them by name. + +[two-letter country codes]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + +## Browsers + +Names are case insensitive: + +* `Android` for Android WebView. +* `BlackBerry` or `bb` for Blackberry browser. +* `Chrome` for Google Chrome. +* `Firefox` or `ff` for Mozilla Firefox. +* `Explorer` or `ie` for Internet Explorer. +* `iOS` or `ios_saf` for iOS Safari. +* `Opera` for Opera. +* `Safari` for desktop Safari. +* `OperaMobile` or `op_mob` for Opera Mobile. +* `OperaMini` or `op_mini` for Opera Mini. +* `ChromeAndroid` or `and_chr` for Chrome for Android + (mostly same as common `Chrome`). +* `FirefoxAndroid` or `and_ff` for Firefox for Android. +* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile. + + +## Usage + +```js +var browserslist = require('browserslist'); + +// Your CSS/JS build tool code +var process = function (css, opts) { + var browsers = browserslist(opts.browsers, { path: opts.file }); + // Your code to add features for selected browsers +} +``` + +If a list is missing, Browserslist will look for a config file. +You can provide a `path` option (that can be a file) to find the config file +relatively to it. + +Queries can be a string `"> 5%, last 1 version"` +or and array `['> 5%', 'last 1 version']`. + +## Config File + +Browserslist’s config should be named `browserslist` and have browsers queries +split by a new line. You can write a comment after `#`: + +```yaml +# Browsers that we support + +> 1% +Last 2 versions +IE 8 # sorry +``` diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/index.js b/node_modules/autoprefixer-core/node_modules/browserslist/index.js new file mode 100644 index 0000000..17f82e8 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/index.js @@ -0,0 +1,327 @@ +var caniuse = require('caniuse-db/data').agents; +var path = require('path'); +var fs = require('fs'); + +var uniq = function (array) { + var filtered = []; + for ( var i = 0; i < array.length; i++ ) { + if ( filtered.indexOf(array[i]) == -1 ) filtered.push(array[i]); + } + return filtered; +}; + +normalizeVersion = function (data, version) { + if ( data.versions.indexOf(version) != -1 ) { + return version; + } else { + var alias = browserslist.versionAliases[data.name][version]; + if ( alias ) return alias; + } +}; + +// Return array of browsers by selection queries: +// +// browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8'] +var browserslist = function (selections, opts) { + if ( typeof(opts) == 'undefined' ) opts = { }; + + if ( typeof(selections) == 'undefined' || selections === null ) { + var config = browserslist.readConfig(opts.path); + if ( config === false ) { + selections = browserslist.defaults; + } else { + selections = config; + } + } + + if ( typeof(selections) == 'string' ) { + selections = selections.split(/,\s*/); + } + + var result = []; + + var query, match, array, used; + selections.forEach(function (selection) { + if ( selection.trim() === '' ) return; + used = false; + + for ( var i in browserslist.queries ) { + query = browserslist.queries[i]; + match = selection.match(query.regexp); + if ( match ) { + array = query.select.apply(browserslist, match.slice(1)); + result = result.concat(array); + used = true; + break; + } + } + + if ( !used ) { + throw 'Unknown browser query `' + selection + '`'; + } + }); + + return uniq(result).sort(function (name1, name2) { + name1 = name1.split(' '); + name2 = name2.split(' '); + if ( name1[0] == name2[0] ) { + return parseFloat(name2[1]) - parseFloat(name1[1]); + } else { + return name1[0].localeCompare(name2[0]); + } + }); +}; + +// Will be filled by Can I Use data below +browserslist.data = { }; +browserslist.usage = { + global: { } +}; + +// Default browsers query +browserslist.defaults = [ + '> 1%', + 'last 2 versions', + 'Firefox ESR', + 'Opera 12.1' +]; + +// What browsers will be used in `last n version` query +browserslist.major = ['safari', 'opera', 'ios_saf', 'ie_mob', 'ie', + 'firefox', 'chrome']; + +// Browser names aliases +browserslist.aliases = { + fx: 'firefox', + ff: 'firefox', + ios: 'ios_saf', + explorer: 'ie', + blackberry: 'bb', + explorermobile: 'ie_mob', + operamini: 'op_mini', + operamobile: 'op_mob', + chromeandroid: 'and_chr', + firefoxandroid: 'and_ff' +}; + +// Aliases ot work with joined versions like `ios_saf 7.0-7.1` +browserslist.versionAliases = { }; + +// Get browser data by alias or case insensitive name +browserslist.byName = function (name) { + name = name.toLowerCase(); + name = browserslist.aliases[name] || name; + + var data = browserslist.data[name]; + if ( !data ) throw 'Unknown browser ' + name; + return data; +}; + +// Find config, read file and parse it +browserslist.readConfig = function (from) { + if ( from === false ) return false; + if ( !fs.readFileSync ) return false; + if ( typeof(from) == 'undefined' ) from = '.'; + + var dirs = path.resolve(from).split(path.sep); + var config, stat; + while ( dirs.length ) { + config = dirs.concat(['browserslist']).join(path.sep); + + if ( fs.existsSync(config) && fs.lstatSync(config).isFile() ) { + return browserslist.parseConfig( fs.readFileSync(config) ); + } + + dirs.pop(); + } + + return false; +}; + +// Return array of queries from config content +browserslist.parseConfig = function (string) { + return string.toString() + .replace(/#[^\n]*/g, '') + .split(/\n/) + .map(function (i) { + return i.trim(); + }) + .filter(function (i) { + return i !== ''; + }); +}; + +browserslist.queries = { + + lastVersions: { + regexp: /^last (\d+) versions?$/i, + select: function (versions) { + var selected = []; + browserslist.major.forEach(function (name) { + var data = browserslist.byName(name); + var array = data.released.slice(-versions); + + array = array.map(function (v) { + return data.name + ' ' + v; + }); + selected = selected.concat(array); + }); + return selected; + } + }, + + lastByBrowser: { + regexp: /^last (\d+) (\w+) versions?$/i, + select: function (versions, name) { + var data = browserslist.byName(name); + return data.released.slice(-versions).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + globalStatistics: { + regexp: /^> (\d+\.?\d*)%$/, + select: function (popularity) { + popularity = parseFloat(popularity); + var result = []; + + for ( var version in browserslist.usage.global ) { + if ( browserslist.usage.global[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + countryStatistics: { + regexp: /^> (\d+\.?\d*)% in (\w\w)$/, + select: function (popularity, country) { + popularity = parseFloat(popularity); + country = country.toUpperCase(); + var result = []; + + var usage = browserslist.usage[country]; + if ( !usage ) { + usage = { }; + var data = require('caniuse-db/region-usage-json/' + country); + for ( var i in data.data ) { + fillUsage(usage, i, data.data[i]); + } + browserslist.usage[country] = usage; + } + + for ( var version in usage ) { + if ( usage[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + versions: { + regexp: /^(\w+) (>=?|<=?)\s*([\d\.]+)/, + select: function (name, sign, version) { + var data = browserslist.byName(name); + version = parseFloat(version); + + var filter; + if ( sign == '>' ) { + filter = function (v) { + return parseFloat(v) > version; + }; + } else if ( sign == '>=' ) { + filter = function (v) { + return parseFloat(v) >= version; + }; + } else if ( sign == '<' ) { + filter = function (v) { + return parseFloat(v) < version; + }; + } else if ( sign == '<=' ) { + filter = function (v) { + return parseFloat(v) <= version; + }; + } + + return data.released.filter(filter).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + esr: { + regexp: /^(firefox|ff|fx) esr$/i, + select: function (versions) { + return ['firefox 31']; + } + }, + + direct: { + regexp: /^(\w+) ([\d\.]+)$/, + select: function (name, version) { + var data = browserslist.byName(name); + var alias = normalizeVersion(data, version); + if ( alias ) { + version = alias; + } else { + if ( version.indexOf('.') == -1 ) { + alias = version + '.0'; + } else if ( /\.0$/.test(version) ) { + alias = version.replace(/\.0$/, ''); + } + alias = normalizeVersion(data, alias); + if ( alias ) { + version = alias; + } else { + throw 'Unknown version ' + version + ' of ' + name; + } + } + + return [data.name + ' ' + version]; + } + } + +}; + +// Get and convert Can I Use data + +var normalize = function (versions) { + return versions.filter(function (version) { + return typeof(version) == 'string'; + }); +}; + +var fillUsage = function (result, name, data) { + for ( var i in data ) { + result[name + ' ' + i] = data[i]; + } +}; + +for ( var name in caniuse ) { + browserslist.data[name] = { + name: name, + versions: normalize(caniuse[name].versions), + released: normalize(caniuse[name].versions.slice(0, -3)) + }; + fillUsage(browserslist.usage.global, name, caniuse[name].usage_global); + + browserslist.versionAliases[name] = { }; + for ( var i = 0; i < caniuse[name].versions.length; i++ ) { + if ( !caniuse[name].versions[i] ) continue; + var full = caniuse[name].versions[i]; + + if ( full.indexOf('-') != -1 ) { + var interval = full.split('-'); + for ( var j = 0; j < interval.length; j++ ) { + browserslist.versionAliases[name][ interval[j] ] = full; + } + } + } +} + +module.exports = browserslist; diff --git a/node_modules/autoprefixer-core/node_modules/browserslist/package.json b/node_modules/autoprefixer-core/node_modules/browserslist/package.json new file mode 100644 index 0000000..f06e852 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/browserslist/package.json @@ -0,0 +1,59 @@ +{ + "name": "browserslist", + "version": "0.2.0", + "description": "Get browsers versions that matches given criterias like in Autoprefixer", + "keywords": [ + "caniuse", + "browsers" + ], + "author": { + "name": "Andrey Sitnik", + "email": "andrey@sitnik.ru" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/ai/browserslist.git" + }, + "dependencies": { + "caniuse-db": "^1.0.30000054" + }, + "devDependencies": { + "jshint-stylish": "1.0.0", + "gulp-jshint": "1.9.0", + "gulp-mocha": "2.0.0", + "mocha": "2.1.0", + "chai": "1.10.0", + "gulp": "3.8.10" + }, + "scripts": { + "test": "gulp" + }, + "gitHead": "c6b2e8770f7dace8e2ba0642bcd85aa5c923579e", + "bugs": { + "url": "https://github.com/ai/browserslist/issues" + }, + "homepage": "https://github.com/ai/browserslist", + "_id": "browserslist@0.2.0", + "_shasum": "e5b7cf311cccb70772cd22d4f61c7bb80523ecd2", + "_from": "browserslist@~0.2.0", + "_npmVersion": "2.1.18", + "_nodeVersion": "0.10.33", + "_npmUser": { + "name": "ai", + "email": "andrey@sitnik.ru" + }, + "maintainers": [ + { + "name": "ai", + "email": "andrey@sitnik.ru" + } + ], + "dist": { + "shasum": "e5b7cf311cccb70772cd22d4f61c7bb80523ecd2", + "tarball": "http://registry.npmjs.org/browserslist/-/browserslist-0.2.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/browserslist/-/browserslist-0.2.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/autoprefixer-core/node_modules/caniuse-db/.npmignore b/node_modules/autoprefixer-core/node_modules/caniuse-db/.npmignore new file mode 100644 index 0000000..c23eb6f --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/caniuse-db/.npmignore @@ -0,0 +1,8 @@ +.gitignore +.gitattributes + +.travis.yml +validator/ + +Contributing.md +sample-data.json diff --git a/node_modules/autoprefixer-core/node_modules/caniuse-db/CONTRIBUTING.md b/node_modules/autoprefixer-core/node_modules/caniuse-db/CONTRIBUTING.md new file mode 100644 index 0000000..c638f4e --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/caniuse-db/CONTRIBUTING.md @@ -0,0 +1,87 @@ +# Contributing to the caniuse data + +## Filing issues + +Issues can be filed on existing **caniuse support data** or on **site functionality**. If you'd like to propose a new web technology feature to be added, please submit/vote for the issue on [Google Moderator](http://www.google.com/moderator/#15/e=ae425&t=ae425.40) rather than submitting an issue. This way features can be added based on the popularity of the feature. + +## Caniuse data + +The `features-json` directory includes JSON files for every feature found on [the caniuse.com website](http://caniuse.com/). +Maintaining these files on GitHub allows anyone to update or contribute to the support data on the site. + +**Note:** when submitting a patch, don’t modify the minified `data.json` file in the root — that is done automatically. Only modify the contents of the `features-json` directory. + +### How it works + +The data on the site is stored in a database. +This data is periodically exported to the JSON files on GitHub. +Once a change or new file here has been approved, it is integrated back into the database +and the subsequent export files should be the same as the imported ones. +Not too confusing, I hope. :) + +### Supported changes + +Currently the following feature information can be modified: +* **title** — Feature name (used for the title of the table) +* **description** — Brief description of feature +* **spec** — Spec URL +* **status** — Spec status, one of the following: + * `ls` - WHATWG Living Standard + * `rec` - W3C Recommendation + * `pr` - W3C Proposed Recommendation + * `cr` - W3C Candidate Recommendation + * `wd` - W3C Working Draft + * `other` - Non-W3C, but reputable + * `unoff` - Unofficial or W3C "Note" +* **links** — Array of "link" objects consisting of URL and short description of link +* **bugs** — Array of "bug" objects consisting of a bug description +* **categories** — Array of categories, any of the following: + * `HTML5` + * `CSS` + * `CSS2` + * `CSS3` + * `SVG` + * `PNG` + * `JS API` + * `Canvas` + * `DOM` + * `Other` +* **stats** — The collection of support data for a given set of browsers/versions. Only the support value strings can be modified. Values are space-separated characters with these meanings, and must answer the question "*Can I use* the feature by default?": + * `y` - (**Y**)es, supported by default + * `a` - (**A**)lmost supported (aka Partial support) + * `n` - (**N**)o support, or disabled by default + * `p` - No support, but has (**P**)olyfill + * `u` - Support (**u**)nknown + * `x` - Requires prefi(**x**) to work + * `d` - (**D**)isabled by default (need to enable flag or something) + * `#n` - Where n is a number, starting with 1, corresponds to the **notes_by_num** note. For example: `"42":"y #1"` means version 42 is supported by default and see note 1. +* **notes** — Notes on feature support, often to explain what partial support refers to +* **notes_by_num** - Map of numbers corresponding to notes. Used in conjection with the #n notation under **stats**. Each key should be a number (no hash), the value is the related note. For example: `"1": "Foo"` +* **ucprefix** — Prefix should start with an uppercase letter +* **parent** — ID of parent feature +* **keywords** — Comma separated words that will match the feature in a search +* **ie_id** — Comma separated IDs used by [status.modern.ie](http://status.modern.ie) - Each ID is the string in the feature's URL +* **chrome_id** — Comma separated IDs used by [chromestatus.com](http://chromestatus.com) - Each ID is the number in the feature's URL +* **shown** — Whether or not feature is ready to be shown on the site. This can be left as false if the support data or information for other fields is still being collected + +### Adding a feature + +To add a feature, simply add another JSON file, following the [example](/sample-data.json), to the `features-json` directory with the base file name as the feature ID (only alphanumeric characters and hyphens please). If you want to submit a feature but don't have all information available for it yet, make sure you set the "shown" flag to false. + +### Unsupported changes + +Currently it is not possible to: +* Add a new browser or browser version (this will be made possible later) +* Add a test for any given feature (should also come later) +* Add any object properties not already defined above +* Modify the **usage\_perc\_y** or **usage\_perc\_a** values (these values are generated) + +### Testing +Make sure you have NodeJS installed on your system. + +Run + +`node validator/validate-jsons.js` + +If something is wrong, it will throw an error. +Everything is ok otherwise. diff --git a/node_modules/autoprefixer-core/node_modules/caniuse-db/README.md b/node_modules/autoprefixer-core/node_modules/caniuse-db/README.md new file mode 100644 index 0000000..009bef4 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/caniuse-db/README.md @@ -0,0 +1,13 @@ +This repo contains raw data from the caniuse.com support tables. It serves two purposes: + +1. The ability for anyone interested to update or add to the support data on the site. If you are interested in this, please read the [CONTRIBUTING file](CONTRIBUTING.md). + +2. Access to the site's data for other projects. For this use the [data.json](data.json) file which includes all support data. + +The data in this repo is available for use under a CC BY 3.0 license (http://creativecommons.org/licenses/by/3.0/). For attribution just mention somewhere that the source is caniuse.com. While usage of the data for alternative tools, visualizations, etc. is encouraged, it is not permitted to use it directly to create another browser support website. If you have any questions about using the data for your project please contact me here: http://a.deveria.com/contact + +Thanks, + +Alexis Deveria +
    http://caniuse.com +
    http://a.deveria.com diff --git a/node_modules/autoprefixer-core/node_modules/caniuse-db/data.json b/node_modules/autoprefixer-core/node_modules/caniuse-db/data.json new file mode 100644 index 0000000..c361324 --- /dev/null +++ b/node_modules/autoprefixer-core/node_modules/caniuse-db/data.json @@ -0,0 +1 @@ +{"eras":{"e-37":"37 versions back","e-36":"36 versions back","e-35":"35 versions back","e-34":"34 versions back","e-33":"33 versions back","e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.104359,"7":0.125231,"8":2.90119,"9":1.82281,"10":1.44016,"11":8.02175,"TP":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11","TP",null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.013404,"3":0.040212,"3.5":0.013404,"3.6":0.093828,"4":0.020106,"5":0.013404,"6":0.020106,"7":0.013404,"8":0.046914,"9":0.013404,"10":0.026808,"11":0.03351,"12":0.053616,"13":0.020106,"14":0.026808,"15":0.03351,"16":0.046914,"17":0.03351,"18":0.03351,"19":0.026808,"20":0.03351,"21":0.053616,"22":0.026808,"23":0.040212,"24":0.060318,"25":0.060318,"26":0.046914,"27":0.127338,"28":0.046914,"29":0.073722,"30":0.10053,"31":0.455736,"32":0.281484,"33":0.174252,"34":0.321696,"35":8.93377,"36":0.717114,"37":0.020106,"38":0,"39":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.013404,"5":0.013404,"6":0.013404,"7":0.006702,"8":0.013404,"9":0.006702,"10":0.026808,"11":0.080424,"12":0.03351,"13":0.020106,"14":0.020106,"15":0.020106,"16":0.013404,"17":0.013404,"18":0.03351,"19":0.013404,"20":0.013404,"21":0.073722,"22":0.080424,"23":0.020106,"24":0.053616,"25":0.026808,"26":0.053616,"27":0.053616,"28":0.046914,"29":0.080424,"30":0.127338,"31":0.750624,"32":0.080424,"33":0.288186,"34":0.227868,"35":0.388716,"36":0.6702,"37":0.817644,"38":0.683604,"39":1.97039,"40":27.3777,"41":0.187656,"42":0.174252,"43":0,"44":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.060318,"5":0.120636,"5.1":0.36861,"6":0.073722,"6.1":0.261378,"7":0.361908,"7.1":0.589776,"8":1.327},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","7.1","8",null,null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9":0.0082,"9.5-9.6":0.00685,"10.0-10.1":0.020106,"10.5":0.008392,"10.6":0.007296,"11":0.014996,"11.1":0.008219,"11.5":0.006702,"11.6":0.013404,"12":0.013404,"12.1":0.227868,"15":0.00685,"16":0.00685,"17":0.00685,"18":0.006702,"19":0.006597,"20":0.013404,"21":0.006597,"22":0.006597,"23":0.013434,"24":0.006702,"25":0.013404,"26":0.03351,"27":0.697008,"28":0.013404,"29":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9","9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29",null],"prefix_exceptions":{"9":"o","9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11":"o","11.1":"o","11.5":"o","11.6":"o","12":"o","12.1":"o"}},"ios_saf":{"browser":"iOS Safari","abbr":"iOS","prefix":"webkit","type":"mobile","usage_global":{"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.0412818,"6.0-6.1":0.126742,"7.0-7.1":1.6042,"8":0.344739,"8.1":5.09577},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0-7.1","8","8.1",null,null,null]},"op_mini":{"browser":"Opera Mini","abbr":"O.Mini","prefix":"o","type":"mobile","usage_global":{"5.0-8.0":2.82765},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.0-8.0",null,null,null]},"android":{"browser":"Android Browser","abbr":"And.","prefix":"webkit","type":"mobile","usage_global":{"2.1":0,"2.2":0,"2.3":0.124295,"3":0,"4":0.251206,"4.1":0.809224,"4.2-4.3":1.36986,"4.4":2.55916,"4.4.3-4.4.4":1.17884,"37":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4","4.4.3-4.4.4","37",null,null,null]},"op_mob":{"browser":"Opera Mobile","abbr":"O.Mob","prefix":"o","type":"mobile","usage_global":{"10":0,"11":0,"11.1":0,"11.5":0,"12":0.0040598,"12.1":0.0243588,"24":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10","11","11.1","11.5","12","12.1","24",null,null,null],"prefix_exceptions":{"24":"webkit"}},"bb":{"browser":"Blackberry Browser","abbr":"BB","prefix":"webkit","type":"mobile","usage_global":{"7":0.0816255,"10":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null,null]},"and_chr":{"browser":"Chrome for Android","abbr":"Chr/And.","prefix":"webkit","type":"mobile","usage_global":{"41":10.5137},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"41",null,null,null]},"and_ff":{"browser":"Firefox for Android","abbr":"FF/And.","prefix":"moz","type":"mobile","usage_global":{"36":0.13192},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"36",null,null,null]},"ie_mob":{"browser":"IE Mobile","abbr":"IE.Mob","prefix":"ms","type":"mobile","usage_global":{"10":0.224915,"11":0.477559},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10","11",null,null,null]},"and_uc":{"browser":"UC Browser for Android","abbr":"UC","prefix":"webkit","type":"mobile","usage_global":{"9.9":3.84217},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.9",null,null,null],"prefix_exceptions":{"9.9":"webkit"}}},"statuses":{"rec":"W3C Recommendation","pr":"W3C Proposed Recommendation","cr":"W3C Candidate Recommendation","wd":"W3C Working Draft","ls":"WHATWG Living Standard","other":"Other","unoff":"Unofficial / Note"},"cats":{"CSS":["CSS3","CSS","CSS2"],"HTML5":["Canvas","HTML5"],"JS API":["JS API"],"Other":["PNG","Other","DOM"],"SVG":["SVG"]},"updated":1427431772,"data":{"png-alpha":{"title":"PNG alpha transparency","description":"Semi-transparent areas in PNG files","spec":"http://www.w3.org/TR/PNG/","status":"rec","links":[{"url":"http://en.wikipedia.org/wiki/Portable_Network_Graphics","title":"Wikipedia"},{"url":"http://dillerdesign.com/experiment/DD_belatedPNG/","title":"Workaround for IE6"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"p","7":"y","8":"y","9":"y","10":"y","11":"y","TP":"y"},"firefox":{"2":"y","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y"},"safari":{"3.1":"y","3.2":"y","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y"},"opera":{"9":"y","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"y"},"android":{"2.1":"y","2.2":"y","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","37":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"y"},"and_chr":{"41":"y"},"and_ff":{"36":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"9.9":"y"}},"notes":"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.","notes_by_num":{},"usage_perc_y":97.08,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"apng":{"title":"Animated PNG (APNG)","description":"Like animated GIFs, but allowing 24-bit colors and alpha transparency","spec":"https://wiki.mozilla.org/APNG_Specification","status":"unoff","links":[{"url":"http://en.wikipedia.org/wiki/APNG","title":"Wikipedia"},{"url":"https://github.com/davidmz/apng-canvas","title":"Polyfill using canvas"},{"url":"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp","title":"Chrome extension providing support"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","TP":"n"},"firefox":{"2":"n","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y"},"chrome":{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n","40":"n","41":"n","42":"n","43":"n","44":"n"},"safari":{"3.1":"n","3.2":"n","4":"n","5":"n","5.1":"n","6":"n","6.1":"n","7":"n","7.1":"n","8":"y"},"opera":{"9":"n","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n"},"ios_saf":{"3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"n"},"android":{"2.1":"n","2.2":"n","2.3":"n","3":"n","4":"n","4.1":"n","4.2-4.3":"n","4.4":"n","4.4.3-4.4.4":"n","37":"n"},"bb":{"7":"n","10":"n"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"n"},"and_chr":{"41":"n"},"and_ff":{"36":"y"},"ie_mob":{"10":"n","11":"n"},"and_uc":{"9.9":"n"}},"notes":"Where support for APNG is missing, only the first frame is displayed","notes_by_num":{},"usage_perc_y":19.44,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"video":{"title":"Video element","description":"Method of playing videos on webpages (without requiring a plug-in).","spec":"https://html.spec.whatwg.org/multipage/embedded-content.html#the-video-element","status":"ls","links":[{"url":"https://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/","title":"Detailed article on video/audio elements"},{"url":"http://webmproject.org","title":"WebM format information"},{"url":"http://camendesign.co.uk/code/video_for_everybody","title":"Video for Everybody"},{"url":"http://diveintohtml5.info/video.html","title":"Video on the Web - includes info on Android support"},{"url":"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video","title":"has.js test"},{"url":"http://docs.webplatform.org/wiki/html/elements/video","title":"WebPlatform Docs"}],"categories":["HTML5"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y","TP":"y"},"firefox":{"2":"n","3":"n","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y"},"safari":{"3.1":"n","3.2":"n","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y"},"opera":{"9":"n","9.5-9.6":"n","10.0-10.1":"n","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"n"},"android":{"2.1":"a","2.2":"a","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","37":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"n","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"y"},"and_chr":{"41":"y"},"and_ff":{"36":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"9.9":"y"}},"notes":"Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires [specific handling](http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/) to run the video element.","notes_by_num":{},"usage_perc_y":91.12,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"
    + +In Liquid, you must instead use the split filter to break a single string into an array of substrings. See here for examples. + + + + + + + +## EmptyDrop + +An EmptyDrop object is returned whenever you try to access a non-existent object (for example, a collection, page or blog that was deleted or hidden) by [handle](/themes/liquid-documentation/basics/handle). In the example below, page_1, page_2 and page_3 are all EmptyDrop objects. + +{% highlight html %}{% raw %} +{% assign variable = "hello" %} +{% assign page_1 = pages[variable] %} +{% assign page_2 = pages["i-do-not-exist-in-your-store"] %} +{% assign page_3 = pages.this-handle-does-not-belong-to-any-page %} +{% endraw %}{% endhighlight %} + +EmptyDrop objects only have one attribute, empty?, which is always true. + +Collections and pages that _do_ exist do not have an empty? attribute. Their empty? is “falsy”, which means that calling it inside an if statement will return false. When using an unless statement on existing collections and pages, empty? will return true. + +#### Applications in themes + +Using the empty? attribute, you can check to see if a page exists or not _before_ accessing any of its other attributes. + +{% highlight html %}{% raw %} +{% unless pages.frontpage.empty? %} + +

    {{ pages.frontpage.title }}

    +
    {{ pages.frontpage.content }}
    +{% endunless %} +{% endraw %}{% endhighlight %} + +It is important to see if a page exists or not first to avoid outputting empty HTML elements to the page, as follows: + +{% highlight html %}{% raw %} +

    +
    +{% endraw %}{% endhighlight %} + +You can perform the same verification with collections as well: + +{% highlight html %}{% raw %} +{% unless collections.frontpage.empty? %} + {% for product in collections.frontpage.products %} + {% include 'product-grid-item' %} + {% else %} +

    We do have a 'frontpage' collection but it's empty.

    + {% endfor %} +{% endunless %} +{% endraw %}{% endhighlight %} + + + + + + + diff --git a/_config.yml b/_config.yml index d42a8a7..0c56828 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,8 @@ url: "http://liquidmarkup.org" # the base hostname & protocol for your site markdown: kramdown permalink: /:year/:month/:day/:basename:output_ext collections: + basics: + output: true filters: output: true tags: @@ -13,9 +15,3 @@ exclude: - CNAME - node_modules keep_files: ['css'] -defaults: - - - scope: - path: "" - values: - layout: "default" diff --git a/basics/index.html b/basics/index.html new file mode 100644 index 0000000..bd04fd4 --- /dev/null +++ b/basics/index.html @@ -0,0 +1,12 @@ +--- +layout: default +--- + +{% for doc in site.collections["basics"].docs %} +
    +

    {{ doc.title }}

    +
    + {{ doc.content }} +
    +
    +{% endfor %} From d4c1429ea71ef38fafc26972c0f7d73c3724337d Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Thu, 27 Aug 2015 00:21:28 -0400 Subject: [PATCH 41/78] Added missing dependency for Autoprefixer in package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 163c9ea..316b602 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "liquid-docs", "version": "0.1.0", "devDependencies": { + "autoprefixer-core": "^5.2.1", "grunt": "~0.4.1", "grunt-autoprefixer": "^3.0.3", "grunt-concurrent": "^1.0.0", From 57ccbd48982b09b2771fedd0e6584b1474ed779d Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 28 Aug 2015 12:28:11 -0400 Subject: [PATCH 42/78] Re-organizing basics content, starting to remove Shopify-specific content --- Gruntfile.js | 4 +--- _basics/handle.md | 13 +++-------- _basics/operators.md | 11 +++------ _basics/temp-index.md | 40 -------------------------------- _basics/true-and-false.md | 4 ---- _includes/home-banner.html | 8 +++++++ _sass/modules/_page-content.scss | 4 ++++ basics/index.html | 2 +- filters/index.html | 2 +- index.html | 25 -------------------- index.md | 34 +++++++++++++++++++++++++++ tags/index.html | 2 +- 12 files changed, 56 insertions(+), 93 deletions(-) delete mode 100644 _basics/temp-index.md create mode 100644 _includes/home-banner.html delete mode 100644 index.html create mode 100644 index.md diff --git a/Gruntfile.js b/Gruntfile.js index a197524..ba8dd39 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,12 +15,10 @@ require('load-grunt-tasks')(grunt); atBegin: true } }, - jekyll: { - files: ['index.html', '_includes/*.html', '_filters/*.*', '_layouts/*.*', '_posts/*.*'], + files: ['index.md', '_includes/*.html', '_filters/*.*', '_layouts/*.*', '_tags/*.*', '_basics/*.*'], tasks: ['shell:jekyllBuild'] } - }, sass: { diff --git a/_basics/handle.md b/_basics/handle.md index 55e0e63..2538fa3 100644 --- a/_basics/handle.md +++ b/_basics/handle.md @@ -2,16 +2,9 @@ title: Handles --- -# Handles +### What is a handle - - - - - -## What is a handle - -The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, link list) has a handle. +The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). For example, a page with the title "About Us" can be accessed in Liquid via its handle about-us as shown below: @@ -20,7 +13,7 @@ For example, a page with the title "About Us" can be accessed in Liquid via its {{ pages.about-us.content }} {% endraw %}{% endhighlight %} -## How are my handles created? +### How are my handles created? A product with the title "Shirt" will automatically be given the handle **shirt**. If there is already a product with the handle "Shirt", the handle will auto-increment. In other words, all "Shirt" products created after the first one will receive the handle **shirt-1**, **shirt-2**, and so on. diff --git a/_basics/operators.md b/_basics/operators.md index 0f5b7cc..2d63208 100644 --- a/_basics/operators.md +++ b/_basics/operators.md @@ -2,14 +2,9 @@ title: Operators --- -# Operators +Liquid has access to all of the logical and comparison operators. - - -Liquid has access to all of the logical and comparison operators. These can be used in tags such as if and unless. - - -## Basic Operators +### Basic Operators @@ -77,7 +72,7 @@ Operators can be chained together. -## Contains operator +### Contains operator contains checks for the presence of a substring inside a string. diff --git a/_basics/temp-index.md b/_basics/temp-index.md deleted file mode 100644 index ae46193..0000000 --- a/_basics/temp-index.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Basics ---- - - -# Introduction - -Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. - - - -Liquid uses a combination of _tags_, _objects_, and _filters_ to load dynamic content. They are used inside Liquid _template files_, which are a group of files that make up a theme. For more information on the available templates, please see Theme Development. - -## Tags - -Tags make up the programming logic that tells templates what to do. - -{% raw %} -{% if user.name == 'elvis' %} - Hey Elvis -{% endif %} -{% endraw %} - - - - - - - - -## Filters - -Filters are used to modify the output of strings, numbers, variables, and objects. - -{% raw %} -{{ 'sales' | append: '.jpg' }} -{% endraw %} -

    -Read more › -

    \ No newline at end of file diff --git a/_basics/true-and-false.md b/_basics/true-and-false.md index a3ef1d5..e4f3bd5 100644 --- a/_basics/true-and-false.md +++ b/_basics/true-and-false.md @@ -2,10 +2,6 @@ title: Truthy and Falsy --- -# Truthy and Falsy in Liquid - - - In programming, we describe “truthy” and “falsy” as anything that returns true or false, respectively, when used inside an if statement. ## What is truthy? diff --git a/_includes/home-banner.html b/_includes/home-banner.html new file mode 100644 index 0000000..06a5c5b --- /dev/null +++ b/_includes/home-banner.html @@ -0,0 +1,8 @@ +
    +

    Liquid

    +

    Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.

    +

    + Download + View on Github +

    +
    diff --git a/_sass/modules/_page-content.scss b/_sass/modules/_page-content.scss index 40918e1..2f6a530 100644 --- a/_sass/modules/_page-content.scss +++ b/_sass/modules/_page-content.scss @@ -12,3 +12,7 @@ p { .content__item { margin-bottom: $spacing-unit * 2; } + + .content__header { + font-weight: bold; + } diff --git a/basics/index.html b/basics/index.html index bd04fd4..ec015db 100644 --- a/basics/index.html +++ b/basics/index.html @@ -4,7 +4,7 @@ layout: default {% for doc in site.collections["basics"].docs %}
    -

    {{ doc.title }}

    +

    {{ doc.title }}

    {{ doc.content }}
    diff --git a/filters/index.html b/filters/index.html index a7141df..54a693d 100644 --- a/filters/index.html +++ b/filters/index.html @@ -4,7 +4,7 @@ layout: default {% for doc in site.collections["filters"].docs %}
    -

    {{ doc.title }}

    +

    {{ doc.title }}

    {{ doc.content }}
    diff --git a/index.html b/index.html deleted file mode 100644 index 81d9e91..0000000 --- a/index.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: default ---- - -
    - -
    -

    Liquid

    -

    Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.

    -

    - Download - View on Github -

    -
    - -

    Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.

    - -

    Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

    - -

    It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

    - - # What does it look like??? - - -
    diff --git a/index.md b/index.md new file mode 100644 index 0000000..6426b8b --- /dev/null +++ b/index.md @@ -0,0 +1,34 @@ +--- +layout: default +--- + +{% include home-banner.html %} + +

    Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.

    + +

    Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

    + +

    It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

    + +Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. + +Liquid uses a combination of _tags_, _objects_, and _filters_ to load dynamic content. They are used inside Liquid _template files_, which are a group of files that make up a theme. For more information on the available templates, please see Theme Development. + +## Tags + +Tags make up the programming logic that tells templates what to do. + +{% raw %} +{% if user.name == 'elvis' %} + Hey Elvis +{% endif %} +{% endraw %} + + +## Filters + +Filters are used to modify the output of strings, numbers, variables, and objects. + +{% raw %} +{{ 'sales' | append: '.jpg' }} +{% endraw %} diff --git a/tags/index.html b/tags/index.html index d0fdac2..febf7ef 100644 --- a/tags/index.html +++ b/tags/index.html @@ -4,7 +4,7 @@ layout: default {% for doc in site.collections["tags"].docs %}
    -

    {{ doc.title }}

    +

    {{ doc.title }}

    {{ doc.content }}
    From 67b80e35f93bc99d69addf5a4d76b87c3a5476be Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 28 Aug 2015 15:45:28 -0400 Subject: [PATCH 43/78] Adding tags, removing custom Liquid --- _basics/types.md | 15 +- _sass/main.scss | 2 +- _sass/modules/_base.scss | 11 + _sass/modules/_content-area.scss | 13 + _sass/modules/_page-content.scss | 18 -- _tags/control-flow-tags.md | 147 ++++++++++ _tags/iteration-tags.md | 489 +++++++++++++++++++++++++++++++ _tags/join.md | 11 - _tags/last.md | 11 - _tags/lstrip.md | 9 - _tags/temp-index.md | 15 + _tags/theme-tags.md | 450 ++++++++++++++++++++++++++++ _tags/variable-tags.md | 199 +++++++++++++ index.md | 30 +- 14 files changed, 1336 insertions(+), 84 deletions(-) create mode 100644 _sass/modules/_content-area.scss delete mode 100644 _sass/modules/_page-content.scss create mode 100644 _tags/control-flow-tags.md create mode 100644 _tags/iteration-tags.md delete mode 100644 _tags/join.md delete mode 100644 _tags/last.md delete mode 100644 _tags/lstrip.md create mode 100644 _tags/temp-index.md create mode 100644 _tags/theme-tags.md create mode 100644 _tags/variable-tags.md diff --git a/_basics/types.md b/_basics/types.md index 4713b91..b4e1925 100644 --- a/_basics/types.md +++ b/_basics/types.md @@ -2,13 +2,11 @@ title: Types --- -# Types - Liquid objects can return one of six types: String, Number, Boolean, Nil, Array, or EmptyDrop. Liquid variables can be initialized by using the assign or capture tags. -## Strings +### Strings Strings are declared by wrapping the variable's value in single or double quotes. @@ -19,7 +17,7 @@ Strings are declared by wrapping the variable's value in single or double quotes
    -## Numbers +### Numbers Numbers include floats and integers. @@ -31,7 +29,7 @@ Numbers include floats and integers. -## Booleans +### Booleans Booleans are either true or false. No quotations are necessary when declaring a boolean. @@ -44,7 +42,7 @@ Booleans are either true or false. No quotations are necessary when declaring a -## Nil +### Nil Nil is an empty value that is returned when Liquid code has no results. It is **not** a string with the characters "nil". @@ -75,10 +73,7 @@ Tracking number: - - - -## Arrays +### Arrays Arrays hold a list of variables of all types. diff --git a/_sass/main.scss b/_sass/main.scss index 73d7933..3705bbe 100755 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -9,7 +9,7 @@ @import "modules/layout"; @import "modules/buttons"; @import "modules/home-banner"; -@import "modules/page-content"; +@import "modules/content-area"; @import "vendors/syntax-highlighting"; diff --git a/_sass/modules/_base.scss b/_sass/modules/_base.scss index e749242..f5b5fd3 100644 --- a/_sass/modules/_base.scss +++ b/_sass/modules/_base.scss @@ -173,3 +173,14 @@ table { padding: 6px 13px; } } + +td { + code { + border: none; + background: none; + } +} + +p { + line-height: 1.8; +} diff --git a/_sass/modules/_content-area.scss b/_sass/modules/_content-area.scss new file mode 100644 index 0000000..58300a3 --- /dev/null +++ b/_sass/modules/_content-area.scss @@ -0,0 +1,13 @@ + +.content__item { + margin-bottom: $spacing-unit * 2; + + h3 { + text-decoration: underline; + } + +} + +.content__header { +font-weight: bold; +} diff --git a/_sass/modules/_page-content.scss b/_sass/modules/_page-content.scss deleted file mode 100644 index 2f6a530..0000000 --- a/_sass/modules/_page-content.scss +++ /dev/null @@ -1,18 +0,0 @@ -td { - code { - border: none; - background: none; - } -} - -p { - line-height: 1.8; -} - -.content__item { - margin-bottom: $spacing-unit * 2; -} - - .content__header { - font-weight: bold; - } diff --git a/_tags/control-flow-tags.md b/_tags/control-flow-tags.md new file mode 100644 index 0000000..6429835 --- /dev/null +++ b/_tags/control-flow-tags.md @@ -0,0 +1,147 @@ +--- +title: Control Flow Tags +--- + +# Control Flow Tags + +Control Flow tags determine which block of code should be executed based on different conditions. + + +### if + +

    Executes a block of code only if a certain condition is met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% if product.title == 'Awesome Shoes' %} + These shoes are awesome! +{% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are awesome! +{% endraw %}{% endhighlight %} +
    + + +### elsif / else + +

    Adds more conditions within an if or unless block.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% if customer.name == 'kevin' %} + Hey Kevin! + {% elsif customer.name == 'anonymous' %} + Hey Anonymous! + {% else %} + Hi Stranger! + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +Hey Anonymous! +{% endraw %}{% endhighlight %} +
    + + + + + +### case/when + +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign handle = 'cake' %} +{% case handle %} + {% when 'cake' %} + This is a cake + {% when 'cookie' %} + This is a cookie + {% else %} + This is not a cake nor a cookie +{% endcase %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +This is a cake +{% endraw %}{% endhighlight %} +
    + + + + + + + + + + + + + +### unless + +

    Similar to if, but executes a block of code only if a certain condition is not met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% unless product.title == 'Awesome Shoes' %} + These shoes are not awesome. + {% endunless %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are not awesome. +{% endraw %}{% endhighlight %} +
    + +This would be the equivalent of doing the following: + +
    +{% highlight html %}{% raw %} + {% if product.title != 'Awesome Shoes' %} + These shoes are not awesome. + {% endif %} +{% endraw %}{% endhighlight %} +
    + + + + + + + + + + + + + diff --git a/_tags/iteration-tags.md b/_tags/iteration-tags.md new file mode 100644 index 0000000..0581d0f --- /dev/null +++ b/_tags/iteration-tags.md @@ -0,0 +1,489 @@ +--- +title: Iteration Tags +--- + +# Iteration Tags + +Iteration Tags are used to run a block of code repeatedly. + + + +### for + +Repeatedly executes a block of code. For a full list of attributes available within a `for` loop, see [forloop (object)](/themes/liquid-documentation/objects/for-loops). + +`for` loops can output a maximum of 50 results per page. In cases where there are more than 50 results, use the [paginate](/themes/liquid-documentation/tags/theme-tags/#paginate) tag to split them across multiple pages. + +

    Input

    +
    +{% highlight liquid %}{% raw %} + {% for product in collection.products %} + {{ product.title }} + {% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight text %} +hat shirt pants +{% endhighlight %} +
    + +### break + +Causes the loop to stop iterating when it encounters the `break` tag. + +

    Input

    +
    +{% highlight liquid %}{% raw %} + {% for i in (1..5) %} + {% if i == 4 %} + {% break %} + {% else %} + {{ i }} + {% endif %} + {% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight text %} +1 2 3 +{% endhighlight %} +
    + +### continue + +Causes the loop to skip the current iteration when it encounters the `continue` tag. + +

    Input

    +
    +{% highlight liquid %}{% raw %} + {% for i in (1..5) %} + {% if i == 4 %} + {% continue %} + {% else %} + {{ i }} + {% endif %} + {% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight text %} +1 2 3 5 +{% endhighlight %} +
    + +
    + +

    parameters for

    + +

    limit

    +Exits the for loop at a specific index. +

    +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% for item in array limit:2 %} + {{ item }} + {% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +1 2 +{% endraw %}{% endhighlight %} +
    + + +

    offset

    +Starts the for loop at a specific index. +

    +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% for item in array offset:2 %} + {{ item }} + {% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +3 4 5 6 +{% endraw %}{% endhighlight %} +
    + +

    range

    +Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers. +

    +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign num = 4 %} +{% for i in (1..num) %} + {{ i }} +{% endfor %} + +{% for i in (3..5) %} + {{ i }} +{% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +1 2 3 4 +3 4 5 +{% endraw %}{% endhighlight %} +
    + + +

    reversed +

    +Reverses the order of the for loop. +

    +

    Input

    +
    +{% highlight html %}{% raw %} + +{% for item in array reversed %} + {{ item }} +{% endfor %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +6 5 4 3 2 1 +{% endraw %}{% endhighlight %} +
    + +
    + + + + + + + + + + + + + + + + + + + + + +### cycle + +Loops through a group of strings and outputs them in the order that they were passed as parameters. Each time cycle is called, the next string that was passed as a parameter is output. + +cycle must be used within a for loop block. + + +

    Input

    +
    +{% highlight html %}{% raw %} +{% cycle 'one', 'two', 'three' %} +{% cycle 'one', 'two', 'three' %} +{% cycle 'one', 'two', 'three' %} +{% cycle 'one', 'two', 'three' %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +one +two +three +one +{% endraw %}{% endhighlight %} +
    + +Uses for cycle include: + +- applying odd/even classes to rows in a table +- applying a unique class to the last product thumbnail in a row + +
    + +

    parameters cycle

    + + +cycle accepts a parameter called cycle group in cases where you need multiple cycle blocks in one template. If no name is supplied for the cycle group, then it is assumed that multiple calls with the same parameters are one group. + +

    The example below shows why cycle groups are necessary when there are multiple instances of the cycle block.

    + +
    +{% highlight html %}{% raw %} +
      +{% for product in collections.collection-1.products %} + + + {{ product.featured_image.alt }} + + +{% endfor %} +
    +
      +{% for product in collections.collection-2.products %} + + + {{ product.featured_image.alt }} + + +{% endfor %} +
    +{% endraw %}{% endhighlight %} +
    + +

    In the code above, if the first collection only has two products, the second collection loop will continue the cycle where the first one left off. This will result in this undesired output:

    + +
    +{% highlight html %}{% raw %} +
      +
    • +
    +
      +
    • +
    • +
    • +
    • +
    +{% endraw %}{% endhighlight %} +
    + +

    To avoid this, cycle groups are used for each cycle block, as shown below.

    + +
    +{% highlight html %}{% raw %} +
      +{% for product in collections.collection-1.products %} + + + {{ product.featured_image.alt }} + + +{% endfor %} +
    +
      +{% for product in collections.collection-2.products %} + + + {{ product.featured_image.alt }} + + +{% endfor %} +
    +{% endraw %}{% endhighlight %} +
    + +

    With the code above, the two cycle blocks are independent of each other. The result is shown below:

    + +
    +{% highlight html %}{% raw %} +
      +
    • +
    • +
    + +
      +
    • +
    • +
    • +
    • +
    +{% endraw %}{% endhighlight %} +
    + +
    + + + + + + + + + +### tablerow + +

    Generates an HTML <table>. Must be wrapped in an opening <table> and closing </table> HTML tags. For a full list of attributes available within a tablerow loop, see tablerow (object).

    + + +

    Input

    + +
    +{% highlight html %}{% raw %} +
    +{% tablerow product in collection.products %} + {{ product.title }} +{% endtablerow %} +
    +{% endraw %}{% endhighlight %} +
    + + +

    Output

    + +
    +{% highlight html %}{% raw %} + + + + + + + + + +
    + Cool Shirt + + Alien Poster + + Batman Poster + + Bullseye Shirt + + Another Classic Vinyl + + Awesome Jeans +
    +{% endraw %}{% endhighlight %} +
    + + +
    + +

    parameters tablerow

    + + +

    cols

    + +Defines how many columns the tables should have. +

    +

    Input

    + +
    +{% highlight html %}{% raw %} +{% tablerow product in collection.products cols:2 %} + {{ product.title }} +{% endtablerow %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} + + + + + + + + + + + + + +
    + Cool Shirt + + Alien Poster +
    + Batman Poster + + Bullseye Shirt +
    + Another Classic Vinyl + + Awesome Jeans +
    +{% endraw %}{% endhighlight %} +
    + +

    limit

    + +Exits the tablerow after a specific index. +

    +
    +{% highlight html %}{% raw %} +{% tablerow product in collection.products cols:2 limit:3 %} + {{ product.title }} +{% endtablerow %} +{% endraw %}{% endhighlight %} +
    + + +

    offset

    + +Starts the tablerow after a specific index. +

    +
    +{% highlight html %}{% raw %} +{% tablerow product in collection.products cols:2 offset:3 %} + {{ product.title }} +{% endtablerow %} +{% endraw %}{% endhighlight %} +
    + + +

    range

    + +Defines a range of numbers to loop through. The range can be defined by both literal and variable numbers. +

    + + +
    +{% highlight html %}{% raw %} + + +{% assign num = 4 %} + +{% tablerow i in (1..num) %} + {{ i }} +{% endtablerow %} +
    + + + + +{% tablerow i in (3..5) %} + {{ i }} +{% endtablerow %} +
    +{% endraw %}{% endhighlight %} +
    + +
    + + diff --git a/_tags/join.md b/_tags/join.md deleted file mode 100644 index c74c1b9..0000000 --- a/_tags/join.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: join ---- - -`join` joins the elements of an array, using the character you provide. - -| Code | Output | -|-------------------------------------------------------:|:-------------------| -| {% raw %}`{{ product.tags | join: ', ' }}`{% endraw %} | `"sale, mens, womens, awesome` | - -In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`. diff --git a/_tags/last.md b/_tags/last.md deleted file mode 100644 index 1a311b0..0000000 --- a/_tags/last.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: last ---- - -Return the last element of an array. - -| Code | Output | -|-------------------------------------------------------:|:-------------------| -| {% raw %}`{{ product.tags | last }}`{% endraw %} | `"awesome"` | - -In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`. diff --git a/_tags/lstrip.md b/_tags/lstrip.md deleted file mode 100644 index 3ab4fc0..0000000 --- a/_tags/lstrip.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: lstrip ---- - -Strips all whitespace (tabs, spaces, and newlines) from the left side of a string. - -| Code | Output | -|-------------------------------------------------------:|:-------------------| -| {% raw %}`{{ ' too many spaces ' | lstrip }}`{% endraw %} | `"too many spaces "` | diff --git a/_tags/temp-index.md b/_tags/temp-index.md new file mode 100644 index 0000000..9938738 --- /dev/null +++ b/_tags/temp-index.md @@ -0,0 +1,15 @@ +--- +title: Tags +--- + + +Liquid _tags_ are the programming logic that tells templates what to do. Tags are wrapped in: {% %}. + +Certain tags, such as for and cycle can take on parameters. Details for each parameter can be found in their respective sections. + +Tags can be broken down into four categories: + +- [Control Flow Tags](/themes/liquid-documentation/tags/control-flow-tags/) +- [Iteration Tags](/themes/liquid-documentation/tags/iteration-tags/) +- [Theme Tags](/themes/liquid-documentation/tags/theme-tags/) +- [Variable Tags](/themes/liquid-documentation/tags/variable-tags/) \ No newline at end of file diff --git a/_tags/theme-tags.md b/_tags/theme-tags.md new file mode 100644 index 0000000..dcc729f --- /dev/null +++ b/_tags/theme-tags.md @@ -0,0 +1,450 @@ +--- +layout: default +title: Theme Tags +landing_as_article: true + +nav: + group: Liquid Documentation + weight: 1 +--- + +# Theme Tags + +Theme Tags have various functions, including: + +- Outputting template-specific HTML markup +- Telling the theme which layout and snippets to use +- Splitting a returned array into multiple pages. + + + + + + +### comment + +

    Allows you to leave un-rendered code inside a Liquid template. Any text within the opening and closing comment blocks will not be output, and any Liquid code within will not be executed.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + My name is {% comment %}super{% endcomment %} Shopify. +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +My name is Shopify. +{% endraw %}{% endhighlight %} +
    + + + + + + + + + + +### include + +Inserts a snippet from the **snippets** folder of a theme. + +{% highlight html %}{% raw %} +{% include 'snippet-name' %} +{% endraw %}{% endhighlight %} + +Note that the .liquid extension is omitted in the above code. + +When a snippet is included, the code inside it will have access to the variables within its parent template. + +

    Including multiple variables in a snippet

    + +There are two ways to include multiple variables in a snippet. You can assign and include them on different lines: + +{% highlight html %}{% raw %} +{% assign snippet_variable = 'this is it' %} +{% assign snippet_variable_two = 'this is also it' %} +{% include 'snippet' %} +{% endraw %}{% endhighlight %} + +Or you can consolidate them into one line of code: + +{% highlight html %}{% raw %} +{% include 'snippet', snippet_variable: 'this is it', snippet_variable_two: 'this is also it' %} +{% endraw %}{% endhighlight %} + + +

    parameters include

    + + + +#### with + +The with parameter assigns a value to a variable inside a snippet that shares the same name as the snippet. + +For example, we can have a snippet named **color.liquid** which contains the following: + +{% highlight html %}{% raw %} +color: '{{ color }}' +shape: '{{ shape }}' +{% endraw %}{% endhighlight %} + +Within **theme.liquid**, we can include the **color.liquid** snippet as follows: + +{% highlight html %}{% raw %} +{% assign shape = 'circle' %} +{% include 'color' %} +{% include 'color' with 'red' %} +{% include 'color' with 'blue' %} +{% assign shape = 'square' %} +{% include 'color' with 'red' %} +{% endraw %}{% endhighlight %} + +The output will be: + +{% highlight html %}{% raw %} +color: shape: 'circle' +color: 'red' shape: 'circle' +color: 'blue' shape: 'circle' +color: 'red' shape: 'square' +{% endraw %}{% endhighlight %} + + + + + + + + + + + +### form + +Creates an HTML <form> element with all the necessary attributes (action, id, etc.) and <input> to submit the form successfully. + +

    parameters form

    + + +#### activate_customer_password + +Generates a form for activating a customer account on the activate_account.liquid template. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'activate_customer_password' %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + + +#### new_comment + + +Generates a form for creating a new comment in the article.liquid template. Requires the article object as a parameter. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form "new_comment", article %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + +#### contact + +Generates a form for submitting an email through the Liquid contact form. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'contact' %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + +#### create_customer + +Generates a form for creating a new customer account on the register.liquid template. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'create_customer' %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + + +#### customer_address +Generates a form for creating or editing customer account addresses on the addresses.liquid template. When creating a new address, include the parameter customer.new_address. When editing an existing address, include the parameter address. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'customer_address', customer.new_address %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + + +#### customer_login + +Generates a form for logging into Customer Accounts on the login.liquid template. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'customer_login' %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + + +#### recover_customer_password + +Generates a form for recovering a lost password on the login.liquid template. + +

    Input

    +
    +{% highlight html %}{% raw %} +{% form 'recover_customer_password' %} +... +{% endform %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +
    + + + ... +
    +{% endraw %}{% endhighlight %} +
    + + + + + + + + + + + + + + + + +### layout + +Loads an alternate template file from the **layout** folder of a theme. If no alternate layout is defined, the **theme.liquid** template is loaded by default. + +{% highlight html %}{% raw %} + +{% layout 'alternate' %} +{% endraw %}{% endhighlight %} + +If you don't want **any** layout to be used on a specific template, you can use none. + +{% highlight html %}{% raw %} +{% layout none %} +{% endraw %}{% endhighlight %} + + + + + + + + + + + + + + + + +### paginate + +Splitting products, blog articles, and search results across multiple pages is a necessary component of theme design as you are limited to 50 results per page in any for loop. + +The paginate tag works in conjunction with the for tag to split content into numerous pages. It must wrap a for tag block that loops through an array, as shown in the example below: + +{% highlight html %}{% raw %} +{% paginate collection.products by 5 %} + {% for product in collection.products %} + + {% endfor %} +{% endpaginate %} +{% endraw %}{% endhighlight %} + +The by parameter is followed by an integer between 1 and 50 that tells the paginate tag how many results it should output per page. + + +Within paginate tags, you can access attributes of the paginate object. This includes the attributes to output the links required to navigate within the generated pages. + + +{% comment %} + +Accessing any attributes of the array you are paginating before the opening paginate tag will cause errors. To avoid this, make sure any variables + + +**Bad Example** +
    +{% highlight html %}{% raw %} +{{ collection.title }} +{% paginate collection.products by 5 %} + {% for product in collection.products %} + {{ product.title }} + {% endfor %} +{% endpaginate %} +{% endraw %}{% endhighlight %} +
    + + +**Good Example** +
    +{% highlight html %}{% raw %} +{% paginate collection.products by 5 %} + {% for product in collection.products %} + + {% endfor %} +{% endpaginate %} +{% endraw %}{% endhighlight %} +
    + +{% endcomment %} + + + + + + + + + + + + + + + + + + + + +### raw + +

    Allows output of Liquid code on a page without being parsed.

    + +

    Input

    + +
    +
    {% raw %}{{ 5 | plus: 6 }}{% endraw %} is equal to 11.
    +
    + +

    Output

    + +
    +
    {{ 5 | plus: 6 }} is equal to 11.
    +
    + + + diff --git a/_tags/variable-tags.md b/_tags/variable-tags.md new file mode 100644 index 0000000..f358cf1 --- /dev/null +++ b/_tags/variable-tags.md @@ -0,0 +1,199 @@ +--- +title: Variable Tags +--- + +# Variable Tags + +Variable Tags are used to create new Liquid variables. + + + + +### assign + +

    Creates a new variable.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% assign my_variable = false %} + {% if my_variable != true %} + This statement is valid. + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} + This statement is valid. +{% endraw %}{% endhighlight %} +
    + +Use quotations ("") to save the variable as a string. + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign foo = "bar" %} +{{ foo }} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +bar +{% endraw %}{% endhighlight %} +
    + + +### capture + +

    Captures the string inside of the opening and closing tags and assigns it to a variable. Variables created through {% capture %} are strings.

    + + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% capture my_variable %}I am being captured.{% endcapture %} +{{ my_variable }} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +I am being captured. +{% endraw %}{% endhighlight %} +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +### increment + +Creates a new number variable, and increases its value by one every time it is called. The initial value is 0. + +

    Input

    + +{% highlight html %}{% raw %} +{% increment variable %} +{% increment variable %} +{% increment variable %} +{% endraw %}{% endhighlight %} + +

    Output

    + +
    +{% highlight html %}{% raw %} +0 +1 +2 +{% endraw %}{% endhighlight %} +
    + +Variables created through the increment tag are independent from variables created through assign or capture. + +In the example below, a variable named "var" is created through assign. The increment tag is then used several times on a variable with the same name. However, note that the increment tag does not affect the value of "var" that was created through assign. + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign var = 10 %} +{% increment var %} +{% increment var %} +{% increment var %} +{{ var }} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +0 +1 +2 +10 +{% endraw %}{% endhighlight %} +
    + + + + + + + + +### decrement + +Creates a new number variable, and decreases its value by one every time it is called. The initial value is -1. + +

    Input

    + +{% highlight html %}{% raw %} +{% decrement variable %} +{% decrement variable %} +{% decrement variable %} +{% endraw %}{% endhighlight %} + +

    Output

    + +
    +{% highlight html %}{% raw %} +-1 +-2 +-3 +{% endraw %}{% endhighlight %} +
    + +Like increment, variables declared inside decrement are independent from variables created through assign or capture. + + + + + diff --git a/index.md b/index.md index 6426b8b..55ba52b 100644 --- a/index.md +++ b/index.md @@ -4,31 +4,13 @@ layout: default {% include home-banner.html %} -

    Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.

    - -

    Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

    - -

    It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

    - -Liquid is an open-source, Ruby-based template language created by Shopify. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. - -Liquid uses a combination of _tags_, _objects_, and _filters_ to load dynamic content. They are used inside Liquid _template files_, which are a group of files that make up a theme. For more information on the available templates, please see Theme Development. - -## Tags - -Tags make up the programming logic that tells templates what to do. - -{% raw %} -{% if user.name == 'elvis' %} - Hey Elvis -{% endif %} -{% endraw %} -## Filters -Filters are used to modify the output of strings, numbers, variables, and objects. +## What is Liquid? -{% raw %} -{{ 'sales' | append: '.jpg' }} -{% endraw %} +Liquid is an open-source, Ruby-based template language created by [Shopify](http://www.shopify.com). It is the backbone of Shopify themes and is used to load dynamic content on storefronts. + +Liquid has been in production use since June 2006 and is now used by many other hosted web applications. + +It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library. \ No newline at end of file From c744422d0ef60f78530a6abf8ee561edb523b5f7 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Thu, 15 Oct 2015 11:45:13 -0400 Subject: [PATCH 44/78] Added a bunch of missing filters, made some of the copy more consistent --- Gruntfile.js | 1 - _filters/append.md | 2 +- _filters/capitalize.md | 2 +- _filters/default.md | 6 +++--- _filters/divided_by.md | 2 +- _filters/downcase.md | 4 ++-- _filters/first.md | 3 +-- _filters/modulo.md | 4 ++-- _filters/reverse.md | 12 ++++++++++++ _filters/strip_html.md | 8 ++++++++ _filters/strip_newlines.md | 2 ++ _filters/times.md | 6 ++++++ _sass/modules/_base.scss | 1 + _tags/control-flow-tags.md | 4 +--- _tags/iteration-tags.md | 4 +--- _tags/theme-tags.md | 9 +-------- _tags/variable-tags.md | 4 +--- 17 files changed, 44 insertions(+), 30 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ba8dd39..a1b7acc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,7 +43,6 @@ require('load-grunt-tasks')(grunt); } }, - postcss: { options: { map: true, diff --git a/_filters/append.md b/_filters/append.md index cfc7901..33b25f3 100644 --- a/_filters/append.md +++ b/_filters/append.md @@ -16,7 +16,7 @@ It can also be used with variables: {% highlight liquid %} {% raw %} {% assign filename = "/index.html" %} -{{ product.url | append:filename }} +{{ product.url | append: filename }} {% endraw %} # => "#{product.url}/index.html" {% endhighlight %} diff --git a/_filters/capitalize.md b/_filters/capitalize.md index 41da42b..c91af9c 100644 --- a/_filters/capitalize.md +++ b/_filters/capitalize.md @@ -2,7 +2,7 @@ title: capitalize --- -`capitalize` ensures the first character of your string is capitalized. +`capitalize` makes the first character of your string capitalized. | Input | Output | |:-----------------------------------------------------------|:-----------------| diff --git a/_filters/default.md b/_filters/default.md index fa24f7a..0726fad 100644 --- a/_filters/default.md +++ b/_filters/default.md @@ -2,11 +2,11 @@ title: default --- -`default` offers a means of having a fall-back value in case your value doesn't exist. +`default` offers a means of having a fallback in case your value doesn't exist. {% highlight liquid %} {% raw %} -{{ product_price | default:2.99 }} +{{ product_price | default: 2.99 }} // => outputs "2.99" {% assign product_price = 4.99 %} @@ -14,7 +14,7 @@ title: default // => outputs "4.99" {% assign product_price = "" %} -{{ product_price | default:2.99 }} +{{ product_price | default: 2.99 }} // => outputs "2.99" {% endraw %} {% endhighlight %} diff --git a/_filters/divided_by.md b/_filters/divided_by.md index ba26b26..7c8e52c 100644 --- a/_filters/divided_by.md +++ b/_filters/divided_by.md @@ -2,7 +2,7 @@ title: divided_by --- -This filter divides its input by its parameter. +This filter divides its input by its argument. | Code | Output | |:--------------------------------------------------|:-------| diff --git a/_filters/downcase.md b/_filters/downcase.md index 979e31f..91ce71c 100644 --- a/_filters/downcase.md +++ b/_filters/downcase.md @@ -2,10 +2,10 @@ title: downcase --- -This filter makes the entire input string the lower case version of each character within. +`downcase` makes each character in a string lowercase. | Code | Output | |:-------------------------------------------------------|:-----------------| | {% raw %}`{{ "Peter Parker" | downcase }}`{% endraw %} | `"peter parker"` | -It doesn't modify strings which are already entirely lowercase. It works with anything that has a `#to_s` method. +It doesn't modify strings which are already entirely lowercase. diff --git a/_filters/first.md b/_filters/first.md index 200b5a8..11228b7 100644 --- a/_filters/first.md +++ b/_filters/first.md @@ -2,10 +2,9 @@ title: first --- -Return the first element of an array. +Returns the first element of an array. For example, if you have an array called `product.tags` that resolves to: `["sale", "mens", "womens", "awesome"]`: | Code | Output | |:-------------------------------------------------------|:-------------------| | {% raw %}`{{ product.tags | first }}`{% endraw %} | `"sale"` | -In the sample above, assume that `product.tags` resolves to: `["sale", "mens", "womens", "awesome"]`. diff --git a/_filters/modulo.md b/_filters/modulo.md index c9b70b2..0d9b4e3 100644 --- a/_filters/modulo.md +++ b/_filters/modulo.md @@ -2,8 +2,8 @@ title: modulo --- -Performs a modulo operation (eg., fetches the remainder). +Performs a modulo operation, i.e. returns the remainder. | Code | Output | |:-------------------------------------------------------|:-------------------| -| {% raw %}`{{ 2 | modulo: 2 }}`{% endraw %} | `1` | +| {% raw %}`{{ 3 | modulo: 2 }}`{% endraw %} | `1` | diff --git a/_filters/reverse.md b/_filters/reverse.md index 3d0fe8a..baa3dbb 100644 --- a/_filters/reverse.md +++ b/_filters/reverse.md @@ -1,3 +1,15 @@ --- title: reverse --- + +Reverses the order of an array. + +{% highlight liquid %} +{% raw %} +{{ product.tags }} +// ['cool', 'sale', 'purple', 'awesome'] + +{{ product.tags | reverse }} +// ['awesome', 'purple', 'sale', 'cool'] +{% endraw %} +{% endhighlight %} diff --git a/_filters/strip_html.md b/_filters/strip_html.md index 1fdfb48..7def051 100644 --- a/_filters/strip_html.md +++ b/_filters/strip_html.md @@ -1,3 +1,11 @@ --- title: strip_html --- + +

    Strips all HTML tags from a string.

    + +

    Input

    + +| Code | Output | +|:-------------------------------------------------------|:-------------------| +| {% raw %}`{{ "

    Hello

    World" | strip_html }}`{% endraw %} | `Hello World` | diff --git a/_filters/strip_newlines.md b/_filters/strip_newlines.md index 9d3949d..619eb73 100644 --- a/_filters/strip_newlines.md +++ b/_filters/strip_newlines.md @@ -1,3 +1,5 @@ --- title: strip_newlines --- + +Removes any line breaks/newlines from a string. diff --git a/_filters/times.md b/_filters/times.md index 9589b44..407e030 100644 --- a/_filters/times.md +++ b/_filters/times.md @@ -1,3 +1,9 @@ --- title: times --- + +Multiplies two numbers. + +| Code | Output | +|:-------------------------------------------------------|:-------------------| +| {% raw %}`{{ 200 | times: 2 }}`{% endraw %} | `400` | diff --git a/_sass/modules/_base.scss b/_sass/modules/_base.scss index f5b5fd3..ddd20ac 100644 --- a/_sass/modules/_base.scss +++ b/_sass/modules/_base.scss @@ -123,6 +123,7 @@ code { pre { padding: 8px 12px; + word-wrap: break-word; > code { border: 0; diff --git a/_tags/control-flow-tags.md b/_tags/control-flow-tags.md index 6429835..a8909e8 100644 --- a/_tags/control-flow-tags.md +++ b/_tags/control-flow-tags.md @@ -1,9 +1,7 @@ --- -title: Control Flow Tags +title: Control Flow --- -# Control Flow Tags - Control Flow tags determine which block of code should be executed based on different conditions. diff --git a/_tags/iteration-tags.md b/_tags/iteration-tags.md index 0581d0f..3cee979 100644 --- a/_tags/iteration-tags.md +++ b/_tags/iteration-tags.md @@ -1,9 +1,7 @@ --- -title: Iteration Tags +title: Iteration --- -# Iteration Tags - Iteration Tags are used to run a block of code repeatedly. diff --git a/_tags/theme-tags.md b/_tags/theme-tags.md index dcc729f..e8fe70f 100644 --- a/_tags/theme-tags.md +++ b/_tags/theme-tags.md @@ -1,14 +1,7 @@ --- -layout: default -title: Theme Tags -landing_as_article: true - -nav: - group: Liquid Documentation - weight: 1 +title: Theme --- -# Theme Tags Theme Tags have various functions, including: diff --git a/_tags/variable-tags.md b/_tags/variable-tags.md index f358cf1..50a7685 100644 --- a/_tags/variable-tags.md +++ b/_tags/variable-tags.md @@ -1,9 +1,7 @@ --- -title: Variable Tags +title: Variable --- -# Variable Tags - Variable Tags are used to create new Liquid variables. From 34def78926193de806e63ba4520a5f3ce2ecf7b6 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Thu, 15 Oct 2015 13:16:36 -0400 Subject: [PATCH 45/78] Added remainder of missing Filters --- _filters/size.md | 18 ++++++++++++++++++ _filters/sort.md | 20 ++++++++++++++++++++ _filters/uniq.md | 1 + _filters/url_encode.md | 6 ++++++ 4 files changed, 45 insertions(+) diff --git a/_filters/size.md b/_filters/size.md index 52d97ca..7711f14 100644 --- a/_filters/size.md +++ b/_filters/size.md @@ -1,3 +1,21 @@ --- title: size --- + +

    Returns the size of a string or an array.

    + + +| Code | Output | +|:-------------------------------------------------------|:-------------------| +| {% raw %}`{{ 'is this a 30 character string?' | size }}`{% endraw %} | `30` | + + +`size` can be used in dot notation, in cases where it needs to be used inside a tag. + +
    +{% highlight html %}{% raw %} +{% if collections.frontpage.products.size > 10 %} + There are more than 10 products in this collection! +{% endif %} +{% endraw %}{% endhighlight %} +
    diff --git a/_filters/sort.md b/_filters/sort.md index 1e5011c..c6805f2 100644 --- a/_filters/sort.md +++ b/_filters/sort.md @@ -1,3 +1,23 @@ --- title: sort --- + +Sorts items in an array by a property of an item in the array. The order of the sorted array is case-sensitive. + +

    Input

    +
    +{% highlight html %}{% raw %} + +{% assign products = collection.products | sort: 'title' %} +{% for product in products %} + {{ product.title }} +{% endfor %}{% endraw %}{% endhighlight %} +
    + +

    Output

    +
    +{% highlight html %}{% raw %} +A B a b +{% endraw %}{% endhighlight %} +
    + diff --git a/_filters/uniq.md b/_filters/uniq.md index 7ce25a6..84b7703 100644 --- a/_filters/uniq.md +++ b/_filters/uniq.md @@ -16,3 +16,4 @@ title: uniq orange apple banana {% endraw %}{% endhighlight %} + diff --git a/_filters/url_encode.md b/_filters/url_encode.md index 133ff80..989a795 100644 --- a/_filters/url_encode.md +++ b/_filters/url_encode.md @@ -1,3 +1,9 @@ --- title: url_encode --- + +Converts any URL-unsafe characters in a string into percent-encoded characters. + +| Code | Output | +|:-------------------------------------------------------|:-------------------| +| {% raw %}`{{ 'john@liquid.com' | url_encode }}`{% endraw %} | `john%40liquid.com` | From ea54777dd213e905615d61156905fb9d7a2c79df Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Thu, 15 Oct 2015 13:43:26 -0400 Subject: [PATCH 46/78] Intro page and small handles update --- _basics/handle.md | 53 +++++++++------------------- index.md | 90 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 102 insertions(+), 41 deletions(-) diff --git a/_basics/handle.md b/_basics/handle.md index 2538fa3..e348450 100644 --- a/_basics/handle.md +++ b/_basics/handle.md @@ -2,54 +2,37 @@ title: Handles --- -### What is a handle +A handle is used to access the attributes of a Liquid object. By default, the handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). -The handle is used to access the attributes of a Liquid object. By default, it is the object's title in lowercase with any spaces and special characters replaced by hyphens (-). +For example, a page with the title "About Us" can be accessed in Liquid via its handle `about-us` as shown below: -For example, a page with the title "About Us" can be accessed in Liquid via its handle about-us as shown below: - -{% highlight html %}{% raw %} +{% highlight liquid %} +{% raw %} {{ pages.about-us.content }} -{% endraw %}{% endhighlight %} +{% endraw %} +{% endhighlight %} -### How are my handles created? +## Creating handles -A product with the title "Shirt" will automatically be given the handle **shirt**. If there is already a product with the handle "Shirt", the handle will auto-increment. In other words, all "Shirt" products created after the first one will receive the handle **shirt-1**, **shirt-2**, and so on. +An object with the title "Shirt" will automatically be given the handle `shirt`. If there is already an object with the handle `shirt`, the handle will auto-increment. In other words, "Shirt" objects created after the first one will receive the handle `shirt-1`, `shirt-2`, and so on. -{{ '/themes/handle-2.jpg' | image }} +Whitespace in titles is replaced by hyphens in handles. For example, the title "My Shiny New Title" will be given the handle `my-shiny-new-title`. -Whitespaces in a title are replaced by hyphens in the handle. For example, the title "*My Shiny New Title*" will result in a handle called **my-shiny-new-title**. - -{{ '/themes/handle-3.jpg' | image }} - -The handle will also determine the URL of that object. For example, a page with the handle "about-us" would have the url: [http://yourshop.myshopify.com/pages/about-us](http://yourshop.myshopify.com/pages/about-us) - -Shop designs often rely on a static handle for a page, product, or linklist. In order to preserve design elements and avoid broken links, if you modify the title of an object, **Shopify will not automatically update the handle.** - -For example, if you were to change your page title from "About Us" to "About Shopify" ... - -{{ '/themes/handle-4.jpg' | image }} - -... your handle will still be **about-us**. - -{{ '/themes/handle-5.jpg' | image }} - -However, you can change an object's handle manually by changing the value for the "URL & Handle" text box. - -{{ '/themes/handle-6.jpg' | image }} +Handles also determine the URL of their corresponding objects. For example, a page with the handle `about-us` would have the url `/pages/about-us`. +Websites often rely on static handles for pages, posts, or objects. To preserve design elements and avoid broken links, if you modify the title of an object, **its handle is not automatically updated**. For example, if you were to change a page title from "About Us" to "About This Website", its handle would still be `about-us`. +You can change an object's handle manually (how?) ## Accessing attributes via the handle", "attributes-handle - -In many cases you may know the handle of a object whose attributes you want to access. You can access its attributes by pluralizing the name of the object, then using either the square bracket ( [ ] ) or dot ( . ) notation. +In many cases you may know the handle of a object whose attributes you want to access. You can access its attributes by pluralizing the name of the object, then using either the square bracket ( [ ] ) or dot ( . ) notation.

    Input

    {% highlight html %}{% raw %} -{{ pages.about-us.title }} +{{ pages.about-us.title }} {{ pages["about-us"].title }} {% endraw %}{% endhighlight %}
    @@ -62,9 +45,9 @@ About Us {% endraw %}{% endhighlight %} -In the example above, notice that we are using pages as opposed to page. +In the example above, notice that we are using `pages` as opposed to `page`. -You can also pass in Customize theme page objects using this notation. This is handy for theme designers who wish to give the users of their themes the ability to select which content to display in their theme. +You can also pass in Customize theme page objects using this notation. This is handy for theme designers who wish to give the users of their themes the ability to select which content to display in their theme.

    Input

    @@ -83,7 +66,3 @@ Cool T-Shirt Wicked Socks {% endraw %}{% endhighlight %}
    - - - - diff --git a/index.md b/index.md index 55ba52b..5fa664e 100644 --- a/index.md +++ b/index.md @@ -4,13 +4,95 @@ layout: default {% include home-banner.html %} +Liquid is an open-source template language created by [Shopify](https://www.shopify.com) and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. Liquid is also used in static site genrators like [Jekyll](http://jekyllrb.com). +Liquid has been in production use since June 2006 and is now used by many other hosted web applications. +It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works well as a stand alone library. -## What is Liquid? +## Introduction -Liquid is an open-source, Ruby-based template language created by [Shopify](http://www.shopify.com). It is the backbone of Shopify themes and is used to load dynamic content on storefronts. +Liquid is a language for writing and rendering templates. This means that you can reduce code duplication by displaying and manipulating content on web pages without changing a site's code. -Liquid has been in production use since June 2006 and is now used by many other hosted web applications. +### Objects -It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library. \ No newline at end of file +**Objects** tell Liquid where to show content on a page. + +Objects and variable names are denoted by double curly braces: `{% raw %}{{{% endraw %}` and `{% raw %}}}{% endraw %}`. + +For example, you can show basic content like a page title using a Liquid object: + +| Liquid | Output | +|:----------------------------------------|:---------| +| {% raw %}`{{ page.title }}`{% endraw %} | Overview | + +In this case, Liquid is rendering the content of an object called `page.title`, and that object contains the text `Overview`. + +[Filters](/filters) can change the way objects are printed. + +### Tags + +**Tags** create the logic for your template, including variable assignment, conditionals, and loops. + +Tags are denoted by curly braces and percent signs: `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}`. + +Tag markup does not resolve to text. This means that you can assign variables and create conditionals and loops without showing any of the Liquid logic on the page. + +#### Conditionals + +For example, you can change what information Liquid shows using conditionals: + +

    Liquid

    +
    +{% highlight liquid %} +{% raw %} + +{% if user %} + Hello {{ user.name }}! +{% endif %} + +{% endraw %} +{% endhighlight %} +
    + +

    Output

    +
    +{% highlight text %} +Hello Adam! +{% endhighlight %} +
    + +This conditional statement `if user` checks to see if an object called `user` exists. If the condition is *true* (that is, if `user` exists), Liquid shows any content that is contained between the `if` and `endif` tags. + +In this case, our user's `name` is Adam, so the template prints `Hello Adam!`. + +#### Loops + +You can also use tags to loop over a list or array of objects: + +

    Liquid

    +
    +{% highlight liquid %} +{% raw %} + +{% for item in collection %} + I have a {{ item }} +{% endfor %} + +{% endraw %} +{% endhighlight %} +
    + +

    Output

    +
    +{% highlight text %} +I have a shirt +I have a pants +I have a banana +I have a bucket +{% endhighlight %} +
    + +The statement `for item in collection` tells Liquid to show the content between the `for` and `endfor` tags one time for every `item` in the `collection` object. + +You can use any arbitrary name (this example used `item`) to reference the items to loop through. From 68e39b624acd3dcd26a20124afe9c4e090971a33 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Thu, 15 Oct 2015 16:29:00 -0400 Subject: [PATCH 47/78] Adjusting layout so that every Basics and Tags' content output their own pages --- _basics/{handle.md => handles.md} | 0 ...{true-and-false.md => truthy-and-falsy.md} | 0 _config.yml | 8 +++ _layouts/default.html | 58 ++++++++++++++----- .../{control-flow-tags.md => control-flow.md} | 25 +++----- _tags/{iteration-tags.md => iteration.md} | 0 _tags/temp-index.md | 15 ----- _tags/{theme-tags.md => theme.md} | 0 _tags/{variable-tags.md => variable.md} | 0 tags/index.html | 10 +--- 10 files changed, 62 insertions(+), 54 deletions(-) rename _basics/{handle.md => handles.md} (100%) rename _basics/{true-and-false.md => truthy-and-falsy.md} (100%) rename _tags/{control-flow-tags.md => control-flow.md} (90%) rename _tags/{iteration-tags.md => iteration.md} (100%) delete mode 100644 _tags/temp-index.md rename _tags/{theme-tags.md => theme.md} (100%) rename _tags/{variable-tags.md => variable.md} (100%) diff --git a/_basics/handle.md b/_basics/handles.md similarity index 100% rename from _basics/handle.md rename to _basics/handles.md diff --git a/_basics/true-and-false.md b/_basics/truthy-and-falsy.md similarity index 100% rename from _basics/true-and-false.md rename to _basics/truthy-and-falsy.md diff --git a/_config.yml b/_config.yml index 0c56828..914ffa2 100644 --- a/_config.yml +++ b/_config.yml @@ -6,12 +6,20 @@ permalink: /:year/:month/:day/:basename:output_ext collections: basics: output: true + permalink: /basics/:path/ filters: output: true tags: output: true + permalink: /tags/:path/ exclude: - README.md - CNAME - node_modules keep_files: ['css'] +defaults: + - + scope: + path: "" # an empty string here means all files in the project + values: + layout: "default" diff --git a/_layouts/default.html b/_layouts/default.html index c644d60..09a097c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -21,21 +21,49 @@ Liquid diff --git a/_tags/control-flow-tags.md b/_tags/control-flow.md similarity index 90% rename from _tags/control-flow-tags.md rename to _tags/control-flow.md index a8909e8..035582e 100644 --- a/_tags/control-flow-tags.md +++ b/_tags/control-flow.md @@ -2,12 +2,12 @@ title: Control Flow --- -Control Flow tags determine which block of code should be executed based on different conditions. +Control Flow tags determine which block of code should be executed based on different conditions. -### if +## if -

    Executes a block of code only if a certain condition is met.

    +

    Executes a block of code only if a certain condition is met.

    Input

    @@ -28,9 +28,9 @@ These shoes are awesome! -### elsif / else +## elsif / else -

    Adds more conditions within an if or unless block.

    +

    Adds more conditions within an if or unless block.

    Input

    @@ -58,10 +58,9 @@ Hey Anonymous! +## case/when -### case/when - -

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    Input

    @@ -93,15 +92,9 @@ This is a cake +## unless - - - - - -### unless - -

    Similar to if, but executes a block of code only if a certain condition is not met.

    +

    Similar to if, but executes a block of code only if a certain condition is not met.

    Input

    diff --git a/_tags/iteration-tags.md b/_tags/iteration.md similarity index 100% rename from _tags/iteration-tags.md rename to _tags/iteration.md diff --git a/_tags/temp-index.md b/_tags/temp-index.md deleted file mode 100644 index 9938738..0000000 --- a/_tags/temp-index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Tags ---- - - -Liquid _tags_ are the programming logic that tells templates what to do. Tags are wrapped in: {% %}. - -Certain tags, such as for and cycle can take on parameters. Details for each parameter can be found in their respective sections. - -Tags can be broken down into four categories: - -- [Control Flow Tags](/themes/liquid-documentation/tags/control-flow-tags/) -- [Iteration Tags](/themes/liquid-documentation/tags/iteration-tags/) -- [Theme Tags](/themes/liquid-documentation/tags/theme-tags/) -- [Variable Tags](/themes/liquid-documentation/tags/variable-tags/) \ No newline at end of file diff --git a/_tags/theme-tags.md b/_tags/theme.md similarity index 100% rename from _tags/theme-tags.md rename to _tags/theme.md diff --git a/_tags/variable-tags.md b/_tags/variable.md similarity index 100% rename from _tags/variable-tags.md rename to _tags/variable.md diff --git a/tags/index.html b/tags/index.html index febf7ef..925fb36 100644 --- a/tags/index.html +++ b/tags/index.html @@ -2,11 +2,5 @@ layout: default --- -{% for doc in site.collections["tags"].docs %} -
    -

    {{ doc.title }}

    -
    - {{ doc.content }} -
    -
    -{% endfor %} +Tags here. + From d63213d46325f01ff016b52ff6136e7dc2eaeb0f Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Thu, 15 Oct 2015 14:52:13 -0400 Subject: [PATCH 48/78] Minor updates, switch Pigments to Rouge --- _basics/handles.md | 36 +++++--------------- _basics/operators.md | 72 +++++++++++----------------------------- _config.yml | 1 + _sass/modules/_base.scss | 4 +++ 4 files changed, 33 insertions(+), 80 deletions(-) diff --git a/_basics/handles.md b/_basics/handles.md index e348450..c91e45a 100644 --- a/_basics/handles.md +++ b/_basics/handles.md @@ -13,7 +13,7 @@ For example, a page with the title "About Us" can be accessed in Liquid via its {% endraw %} {% endhighlight %} -## Creating handles +### Creating handles An object with the title "Shirt" will automatically be given the handle `shirt`. If there is already an object with the handle `shirt`, the handle will auto-increment. In other words, "Shirt" objects created after the first one will receive the handle `shirt-1`, `shirt-2`, and so on. @@ -23,46 +23,28 @@ Handles also determine the URL of their corresponding objects. For example, a pa Websites often rely on static handles for pages, posts, or objects. To preserve design elements and avoid broken links, if you modify the title of an object, **its handle is not automatically updated**. For example, if you were to change a page title from "About Us" to "About This Website", its handle would still be `about-us`. -You can change an object's handle manually (how?) +You can change an object's handle manually (TK how to change a handle manually) -## Accessing attributes via the handle", "attributes-handle +### Accessing handle attributes In many cases you may know the handle of a object whose attributes you want to access. You can access its attributes by pluralizing the name of the object, then using either the square bracket ( [ ] ) or dot ( . ) notation.

    Input

    -{% highlight html %}{% raw %} +{% highlight liquid %} +{% raw %} {{ pages.about-us.title }} {{ pages["about-us"].title }} -{% endraw %}{% endhighlight %} +{% endraw %} +{% endhighlight %}

    Output

    -{% highlight html %}{% raw %} +{% highlight text %} About Us About Us -{% endraw %}{% endhighlight %} +{% endhighlight %}
    In the example above, notice that we are using `pages` as opposed to `page`. - -You can also pass in Customize theme page objects using this notation. This is handy for theme designers who wish to give the users of their themes the ability to select which content to display in their theme. - -

    Input

    -
    -{% highlight html %}{% raw %} -{% for product in collections[settings.home_featured_collection].products %} - {{ product.title }} -{% endfor %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    -
    -{% highlight html %}{% raw %} -Awesome Shoes -Cool T-Shirt -Wicked Socks -{% endraw %}{% endhighlight %} -
    diff --git a/_basics/operators.md b/_basics/operators.md index 2d63208..6719aa5 100644 --- a/_basics/operators.md +++ b/_basics/operators.md @@ -2,7 +2,7 @@ title: Operators --- -Liquid has access to all of the logical and comparison operators. +Liquid includes many logical and comparison operators. ### Basic Operators @@ -17,7 +17,7 @@ Liquid has access to all of the logical and comparison operators. does not equal -
    >
    +
    >
    greater than @@ -25,9 +25,8 @@ Liquid has access to all of the logical and comparison operators. less than -
    >=
    - greater than or equal to - +
    >=
    + greater than or equal to
    <=
    @@ -35,84 +34,51 @@ Liquid has access to all of the logical and comparison operators.
    or
    - condition A or condition B + logical or
    and
    - condition A and condition B + logical and - + -**Examples:** +For example:
    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% if product.title == "Awesome Shoes" %} - These shoes are awesome! + These shoes are awesome! {% endif %} {% endraw %}{% endhighlight %}
    -Operators can be chained together. +You can use multiple operators in a tag:
    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% if product.type == "Shirt" or product.type == "Shoes" %} - This is a shirt or a shoe. + This is a shirt or a pair of shoes. {% endif %} {% endraw %}{% endhighlight %}
    +### contains +`contains` checks for the presence of a substring inside a string. - - - - - - -### Contains operator - -contains checks for the presence of a substring inside a string. - - -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% if product.title contains 'Pack' %} This product's title contains the word Pack. {% endif %} {% endraw %}{% endhighlight %} +`contains` can also check for the presence of a string in an array of strings. -contains can also check for the presence of a string in an array of strings. - -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% if product.tags contains 'Hello' %} This product has been tagged with 'Hello'. {% endif %} {% endraw %}{% endhighlight %} - -You **cannot** check for the presence of an object in an array of objects using contains. This will not work: - -{% highlight html %}{% raw %} -{% if product.collections contains 'Sale' %} - One of the collections this product belongs to is the Sale collection. -{% endif %} -{% endraw %}{% endhighlight %} - -This will work: - -{% highlight html %}{% raw %} -{% assign in_sale_collection = false %} -{% for collection in product.collections %} - {% if in_sale_collection == false and collection.title == 'Sale' %} - {% assign in_sale_collection = true %} - {% endif %} -{% endfor %} -{% if in_sale_collection %} - One of the collections this product belongs to is the Sale collection. -{% endif %} -{% endraw %}{% endhighlight %} - - \ No newline at end of file +`contains` is can only search strings. You cannot use it to check for an object in an array of objects. diff --git a/_config.yml b/_config.yml index 914ffa2..e87ace9 100644 --- a/_config.yml +++ b/_config.yml @@ -2,6 +2,7 @@ baseurl: "" # the subpath of your site, e.g. /blog/ url: "http://liquidmarkup.org" # the base hostname & protocol for your site markdown: kramdown +highlighter: rouge permalink: /:year/:month/:day/:basename:output_ext collections: basics: diff --git a/_sass/modules/_base.scss b/_sass/modules/_base.scss index ddd20ac..81fcdee 100644 --- a/_sass/modules/_base.scss +++ b/_sass/modules/_base.scss @@ -173,6 +173,10 @@ table { border: 1px solid #ddd; padding: 6px 13px; } + /* Don't use a margin on code samples within tables */ + pre { + margin-bottom: 0; + } } td { From f2a1925033e8c570f8d813af913bad7ea70b476d Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Thu, 15 Oct 2015 17:00:22 -0400 Subject: [PATCH 49/78] Updates to types and truthiness --- _basics/truthy-and-falsy.md | 36 ++-------- _basics/types.md | 133 +++++++++++++++--------------------- 2 files changed, 62 insertions(+), 107 deletions(-) diff --git a/_basics/truthy-and-falsy.md b/_basics/truthy-and-falsy.md index e4f3bd5..bbacdc7 100644 --- a/_basics/truthy-and-falsy.md +++ b/_basics/truthy-and-falsy.md @@ -4,9 +4,9 @@ title: Truthy and Falsy In programming, we describe “truthy” and “falsy” as anything that returns true or false, respectively, when used inside an if statement. -## What is truthy? +## What is truthy? -All values in Liquid are truthy, with the exception of nil and false. +All values in Liquid are truthy, with the exception of `nil` and `false`. In the example below, the text “Tobi” is not a boolean, but it is truthy in a conditional: @@ -17,7 +17,7 @@ This will always be true. {% endif %} {% endraw %}{% endhighlight %} -[Strings](/themes/liquid-documentation/basics/types/#strings), even when empty, are truthy. The example below will result in empty HTML tags if settings.fp_heading is empty: +[Strings](/themes/liquid-documentation/basics/types/#strings), even when empty, are truthy. The example below will result in empty HTML tags if `settings.fp_heading` is empty:

    Input

    {% highlight html %}{% raw %} @@ -32,7 +32,7 @@ This will always be true.

    {% endraw %}{% endhighlight %} -To avoid this, you can check to see if the string is blank, as follows: +To avoid this, you can check to see if the string is blank, as follows:
    {% highlight html %}{% raw %} @@ -44,7 +44,7 @@ To avoid this, you can check to see if the string is blank, as foll
    -An [EmptyDrop](/themes/liquid-documentation/basics/types/#empty-drop) is also truthy. In the example below, if settings.page is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an undesirable empty <div>: +An [EmptyDrop](/themes/liquid-documentation/basics/types/#empty-drop) is also truthy. In the example below, if `settings.page` is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an undesirable empty <div>:

    Input

    {% highlight html %}{% raw %} @@ -62,7 +62,7 @@ An [EmptyDrop](/themes/liquid-documentation/basics/types/#empty-drop) is also tr ## What is falsy? -The only values that are falsy in Liquid are nil and false. +The only values that are falsy in Liquid are `nil` and `false`. [nil](/themes/liquid-documentation/basics/types/#nil) is returned when a Liquid object doesn't have anything to return. For example, if a collection doesn't have a collection image, collection.image will be set to nil. Since that is “falsy”, you can do this: @@ -76,7 +76,7 @@ The value false is returned through many Liquid object properties such ## Summary -The table below summarizes what is truthy or falsy in Liquid. +The table below summarizes what is truthy or falsy in Liquid. | | truthy | falsy | | ------------- |:-------------:|:-------------:| @@ -93,25 +93,3 @@ The table below summarizes what is truthy or falsy in Liquid. | collection with no products | × | | | page | × | | | EmptyDrop | × | | - - - - - - - - - - - - - - - - - - - - - - diff --git a/_basics/types.md b/_basics/types.md index b4e1925..da10c96 100644 --- a/_basics/types.md +++ b/_basics/types.md @@ -2,152 +2,129 @@ title: Types --- -Liquid objects can return one of six types: String, Number, Boolean, Nil, Array, or EmptyDrop. Liquid variables can be initialized by using the assign or capture tags. +Liquid objects can return one of six types: +- [string](#string) +- [number](#number) +- boolean +- nil +- array +- EmptyDrop +Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags. -### Strings +### String -Strings are declared by wrapping the variable's value in single or double quotes. +Strings are declared by wrapping a variable's value in single or double quotes. -
    +{% highlight liquid %} {% raw %} {% assign my_string = "Hello World!" %} {% endraw %} -
    +{% endhighlight %} +### Number -### Numbers +Numbers include floats and integers. -Numbers include floats and integers. - -
    +{% highlight liquid %} {% raw %} -{% assign my_num = 25 %} +{% assign my_int = 25 %} +{% assign my_float = 39.756 %} {% endraw %} -
    - - +{% endhighlight %} ### Booleans -Booleans are either true or false. No quotations are necessary when declaring a boolean. +Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean. -
    +{% highlight liquid %} {% raw %} {% assign foo = true %} {% assign bar = false %} {% endraw %} -
    - - +{% endhighlight %} ### Nil -Nil is an empty value that is returned when Liquid code has no results. It is **not** a string with the characters "nil". +Nil is a special empty value that is returned when Liquid code has no results. It is **not** a string with the characters "nil". -Nil is treated as false in the conditions of {% if %} blocks and other Liquid tags that check for the truthfulness of a statement. The example below shows a situation where a fulfillment does not yet have a tracking number entered. The if statement would not render the included text within it. +Nil is treated as false in the conditions of `if` blocks and other Liquid tags that check the truthfulness of a statement. +In the following example, if the user does not exist (that is, `user` returns `nil`), Liquid will not print the greeting: + +{% highlight liquid %} {% raw %} -{% if fulfillment.tracking_numbers %} -We have a tracking number! +{% if user %} + Hello {{ user.name }}! {% endif %} {% endraw %} +{% endhighlight %} -Any tags or outputs that return nil will not show anything on the screen. +Tags or outputs that return `nil` will not print anything to the page.

    Input

    {% highlight html %}{% raw %} -Tracking number: {{ fulfillment.tracking_numbers }} +The current user is {{ user.name }} {% endraw %}{% endhighlight %}

    Output

    -
    {% highlight html %}{% raw %} -Tracking number: +The current user is {% endraw %}{% endhighlight %} -
    - - - ### Arrays -Arrays hold a list of variables of all types. +Arrays hold lists of variables of any type. -#### Accessing all items in an array +#### Accessing items in arrays -To access items in an array, you can loop through each item in the array using a for tag or a tablerow tag. +To access items in an array, you can loop through each item in the array using a [for](/tags/#for) or [tablerow](/tags/#tablerow) tag.

    Input

    -
    {% highlight html %}{% raw %} - -{% for tag in product.tags %} - {{ tag }} + +{% for user in site.users %} + {{ user }} {% endfor %} {% endraw %}{% endhighlight %} -

    Output

    -
    {% highlight html %}{% raw %} -sale summer spring wholesale +Tobi Lina Tetsuro Adam {% endraw %}{% endhighlight %} -
    #### Accessing a specific item in an array -You can use square brackets ( [ ] ) notation to access a specific item in an array. Array indexing starts at zero. +You can use square bracket `[ ]` notation to access a specific item in an array. Array indexing starts at zero.

    Input

    -
    {% highlight html %}{% raw %} - -{{ product.tags[0] }} -{{ product.tags[1] }} -{{ product.tags[2] }} -{{ product.tags[3] }} + +{{ site.users[0] }} +{{ site.users[1] }} +{{ site.users[3] }} {% endraw %}{% endhighlight %} -

    Output

    -
    {% highlight html %}{% raw %} -sale -summer -spring -wholesale +Tobi +Lina +Adam {% endraw %}{% endhighlight %} -
    - #### Initializing an array -It is not possible to initialize an array in Liquid. For example, in Javascript you could do something like this: - -
    -{% highlight html %}{% raw %} - -{% endraw %}{% endhighlight %} -
    - -In Liquid, you must instead use the split filter to break a single string into an array of substrings. See here for examples. - - - - - +It is not possible to initialize an array using only Liquid. +You can, howver, use the [split](/filters/#split) filter to break a single string into an array of substrings. ## EmptyDrop -An EmptyDrop object is returned whenever you try to access a non-existent object (for example, a collection, page or blog that was deleted or hidden) by [handle](/themes/liquid-documentation/basics/handle). In the example below, page_1, page_2 and page_3 are all EmptyDrop objects. +An EmptyDrop object is returned whenever you try to access a non-existent object (for example, a collection, page or blog that was deleted or hidden) by [handle](/basics/#Handles). In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects. {% highlight html %}{% raw %} {% assign variable = "hello" %} @@ -156,13 +133,13 @@ An EmptyDrop object is returned whenever you try to access a non-existent object {% assign page_3 = pages.this-handle-does-not-belong-to-any-page %} {% endraw %}{% endhighlight %} -EmptyDrop objects only have one attribute, empty?, which is always true. +EmptyDrop objects only have one attribute, empty?, which is always true. -Collections and pages that _do_ exist do not have an empty? attribute. Their empty? is “falsy”, which means that calling it inside an if statement will return false. When using an unless statement on existing collections and pages, empty? will return true. +Collections and pages that _do_ exist do not have an empty? attribute. Their empty? is “falsy”, which means that calling it inside an if statement will return false. When using an unless statement on existing collections and pages, empty? will return true. #### Applications in themes -Using the empty? attribute, you can check to see if a page exists or not _before_ accessing any of its other attributes. +Using the empty? attribute, you can check to see if a page exists or not _before_ accessing any of its other attributes. {% highlight html %}{% raw %} {% unless pages.frontpage.empty? %} @@ -172,14 +149,14 @@ Using the empty? attribute, you can check to see if a page exists o {% endunless %} {% endraw %}{% endhighlight %} -It is important to see if a page exists or not first to avoid outputting empty HTML elements to the page, as follows: +It is important to see if a page exists or not first to avoid outputting empty HTML elements to the page, as follows: {% highlight html %}{% raw %}

    {% endraw %}{% endhighlight %} -You can perform the same verification with collections as well: +You can perform the same verification with collections as well: {% highlight html %}{% raw %} {% unless collections.frontpage.empty? %} From 0147832a64dc237feda2affa6b61127398e05b44 Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Fri, 16 Oct 2015 10:53:23 -0400 Subject: [PATCH 50/78] Polishing up boolean logic and types --- _basics/truthy-and-falsy.md | 79 +++++++++++++------------------------ _basics/types.md | 79 ++++++++++++++----------------------- 2 files changed, 57 insertions(+), 101 deletions(-) diff --git a/_basics/truthy-and-falsy.md b/_basics/truthy-and-falsy.md index bbacdc7..dddee83 100644 --- a/_basics/truthy-and-falsy.md +++ b/_basics/truthy-and-falsy.md @@ -2,77 +2,53 @@ title: Truthy and Falsy --- -In programming, we describe “truthy” and “falsy” as anything that returns true or false, respectively, when used inside an if statement. +In programming, anything that returns `true` in a conditional is called **truthy**. Anything that returns `false` in a conditional is called **falsy**. All object types can be described as either truthy or falsy. -## What is truthy? +## Truthy -All values in Liquid are truthy, with the exception of `nil` and `false`. +All values in Liquid are truthy except `nil` and `false`. -In the example below, the text “Tobi” is not a boolean, but it is truthy in a conditional: +In the example below, the text "Tobi" is not a boolean, but it is truthy in a conditional: -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% assign tobi = 'Tobi' %} -{% if tobi %} -This will always be true. + +{% if tobi == true %} + This condition will always be true. {% endif %} {% endraw %}{% endhighlight %} -[Strings](/themes/liquid-documentation/basics/types/#strings), even when empty, are truthy. The example below will result in empty HTML tags if `settings.fp_heading` is empty: +[Strings](/basics/types/#string), even when empty, are truthy. The example below will result in empty HTML tags if `settings.fp_heading` is empty:

    Input

    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% if settings.fp_heading %} -

    {{ settings.fp_heading }}

    +

    {{ settings.fp_heading }}

    {% endif %} {% endraw %}{% endhighlight %} -

    Output

    {% highlight html %}{% raw %}

    {% endraw %}{% endhighlight %} -To avoid this, you can check to see if the string is blank, as follows: - -
    -{% highlight html %}{% raw %} -{% unless settings.fp_heading == blank %} -

    {{ settings.fp_heading }}

    -{% endunless %} -{% endraw %}{% endhighlight %} -
    - -
    - -An [EmptyDrop](/themes/liquid-documentation/basics/types/#empty-drop) is also truthy. In the example below, if `settings.page` is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an undesirable empty <div>: +[EmptyDrops](/basics/types/#emptydrop) are also truthy. In the example below, if `settings.page` is an empty string or set to a hidden or deleted object, you will end up with an EmptyDrop. The result is an empty `
    `:

    Input

    {% highlight html %}{% raw %} {% if pages[settings.page] %} -
    {{ pages[settings.page].content }}
    +
    {{ pages[settings.page].content }}
    {% endif %} {% endraw %}{% endhighlight %} -

    Output

    {% highlight html %}{% raw %}
    {% endraw %}{% endhighlight %} +## Falsy -## What is falsy? - -The only values that are falsy in Liquid are `nil` and `false`. - -[nil](/themes/liquid-documentation/basics/types/#nil) is returned when a Liquid object doesn't have anything to return. For example, if a collection doesn't have a collection image, collection.image will be set to nil. Since that is “falsy”, you can do this: - -{% highlight html %}{% raw %} -{% if collection.image %} - -{% endif %} -{% endraw %}{% endhighlight %} - -The value false is returned through many Liquid object properties such as product.available. +The falsy values in Liquid are [nil](/basics/types/#nil) and [false](/basics/types/#boolean). ## Summary @@ -80,16 +56,15 @@ The table below summarizes what is truthy or falsy in Liquid. | | truthy | falsy | | ------------- |:-------------:|:-------------:| -| true | × | | -| false | | × | -| nil | | × | -| string | × | | -| empty string | × | | -| 0 | × | | -| 1 or 2 or 3.14 | × | | -| array | × | | -| empty array | × | | -| collection | × | | -| collection with no products | × | | -| page | × | | -| EmptyDrop | × | | +| true | • | | +| false | | • | +| nil | | • | +| string | • | | +| empty string | • | | +| 0 | • | | +| integer | • | | +| float | • | | +| array | • | | +| empty array | • | | +| page | • | | +| EmptyDrop | • | | diff --git a/_basics/types.md b/_basics/types.md index da10c96..711b8a8 100644 --- a/_basics/types.md +++ b/_basics/types.md @@ -2,14 +2,14 @@ title: Types --- -Liquid objects can return one of six types: +Liquid objects can have one of six types: - [string](#string) - [number](#number) -- boolean -- nil -- array -- EmptyDrop +- [boolean](#boolean) +- [nil](#nil) +- [array](#array) +- [EmptyDrop](#emptydrop) Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags. @@ -34,7 +34,7 @@ Numbers include floats and integers. {% endraw %} {% endhighlight %} -### Booleans +### Boolean Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean. @@ -65,26 +65,26 @@ Tags or outputs that return `nil` will not print anything to the page.

    Input

    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} The current user is {{ user.name }} {% endraw %}{% endhighlight %}

    Output

    -{% highlight html %}{% raw %} +{% highlight text %}{% raw %} The current user is {% endraw %}{% endhighlight %} -### Arrays +### Array Arrays hold lists of variables of any type. #### Accessing items in arrays -To access items in an array, you can loop through each item in the array using a [for](/tags/#for) or [tablerow](/tags/#tablerow) tag. +To access all of the items in an array, you can loop through each item in the array using a [for](/tags/#for) or [tablerow](/tags/#tablerow) tag.

    Input

    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% for user in site.users %} {{ user }} @@ -92,17 +92,17 @@ To access items in an array, you can loop through each item in the array using a {% endraw %}{% endhighlight %}

    Output

    -{% highlight html %}{% raw %} +{% highlight text %}{% raw %} Tobi Lina Tetsuro Adam {% endraw %}{% endhighlight %} -#### Accessing a specific item in an array +#### Accessing specific items in arrays You can use square bracket `[ ]` notation to access a specific item in an array. Array indexing starts at zero.

    Input

    -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {{ site.users[0] }} {{ site.users[1] }} @@ -110,67 +110,48 @@ You can use square bracket `[ ]` notation to access a specific item in an array. {% endraw %}{% endhighlight %}

    Output

    -{% highlight html %}{% raw %} +{% highlight text %}{% raw %} Tobi Lina Adam {% endraw %}{% endhighlight %} -#### Initializing an array +#### Initializing arrays -It is not possible to initialize an array using only Liquid. +You cannot initialize arrays using pure Liquid. -You can, howver, use the [split](/filters/#split) filter to break a single string into an array of substrings. +You can, however, use the [split](/filters/#split) filter to break a single string into an array of substrings. ## EmptyDrop -An EmptyDrop object is returned whenever you try to access a non-existent object (for example, a collection, page or blog that was deleted or hidden) by [handle](/basics/#Handles). In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects. +An EmptyDrop object is returned if you try to access a deleted object (such as a page or post) by its [handle](/basics/#Handles). In the example below, `page_1`, `page_2` and `page_3` are all EmptyDrop objects. -{% highlight html %}{% raw %} +{% highlight liquid %}{% raw %} {% assign variable = "hello" %} {% assign page_1 = pages[variable] %} -{% assign page_2 = pages["i-do-not-exist-in-your-store"] %} -{% assign page_3 = pages.this-handle-does-not-belong-to-any-page %} +{% assign page_2 = pages["does-not-exist"] %} +{% assign page_3 = pages.this-handle-does-not-exist %} {% endraw %}{% endhighlight %} -EmptyDrop objects only have one attribute, empty?, which is always true. +EmptyDrop objects only have one attribute, `empty?`, which is always *true*. -Collections and pages that _do_ exist do not have an empty? attribute. Their empty? is “falsy”, which means that calling it inside an if statement will return false. When using an unless statement on existing collections and pages, empty? will return true. +Collections and pages that *do* exist do not have an `empty?` attribute. Their `empty?` is “falsy”, which means that calling it inside an if statement will return *false*. When using an unless statement on existing collections and pages, `empty?` will return `true`. -#### Applications in themes +#### Checking for emptiness -Using the empty? attribute, you can check to see if a page exists or not _before_ accessing any of its other attributes. +Using the `empty?` attribute, you can check to see if an object exists or not before you access any of its attributes. -{% highlight html %}{% raw %} -{% unless pages.frontpage.empty? %} - +{% highlight liquid %}{% raw %} +{% unless pages.about.empty? %} +

    {{ pages.frontpage.title }}

    {{ pages.frontpage.content }}
    {% endunless %} {% endraw %}{% endhighlight %} -It is important to see if a page exists or not first to avoid outputting empty HTML elements to the page, as follows: +If you don't check for emptiness first, Liquid may print empty HTML elements to the page: {% highlight html %}{% raw %}

    {% endraw %}{% endhighlight %} - -You can perform the same verification with collections as well: - -{% highlight html %}{% raw %} -{% unless collections.frontpage.empty? %} - {% for product in collections.frontpage.products %} - {% include 'product-grid-item' %} - {% else %} -

    We do have a 'frontpage' collection but it's empty.

    - {% endfor %} -{% endunless %} -{% endraw %}{% endhighlight %} - - - - - - - From ffe3ee375494e5dfc70de6923a3054f7c8b445c5 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 16 Oct 2015 11:16:34 -0400 Subject: [PATCH 51/78] WIP --- _config.yml | 1 - _tags/control-flow.md | 138 ------------------------------- _tags/control-flow/case-when | 27 ++++++ _tags/control-flow/elsif-else.md | 26 ++++++ _tags/control-flow/if.md | 21 +++++ _tags/control-flow/index.html | 15 ++++ _tags/control-flow/unless.md | 31 +++++++ basics/index.html | 8 -- tags/index.html | 7 +- 9 files changed, 126 insertions(+), 148 deletions(-) delete mode 100644 _tags/control-flow.md create mode 100644 _tags/control-flow/case-when create mode 100644 _tags/control-flow/elsif-else.md create mode 100644 _tags/control-flow/if.md create mode 100644 _tags/control-flow/index.html create mode 100644 _tags/control-flow/unless.md diff --git a/_config.yml b/_config.yml index 914ffa2..870f8e1 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,6 @@ collections: output: true tags: output: true - permalink: /tags/:path/ exclude: - README.md - CNAME diff --git a/_tags/control-flow.md b/_tags/control-flow.md deleted file mode 100644 index 035582e..0000000 --- a/_tags/control-flow.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Control Flow ---- - -Control Flow tags determine which block of code should be executed based on different conditions. - - -## if - -

    Executes a block of code only if a certain condition is met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% if product.title == 'Awesome Shoes' %} - These shoes are awesome! -{% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are awesome! -{% endraw %}{% endhighlight %} -
    - - -## elsif / else - -

    Adds more conditions within an if or unless block.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - - {% if customer.name == 'kevin' %} - Hey Kevin! - {% elsif customer.name == 'anonymous' %} - Hey Anonymous! - {% else %} - Hi Stranger! - {% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -Hey Anonymous! -{% endraw %}{% endhighlight %} -
    - - - - -## case/when - -

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% assign handle = 'cake' %} -{% case handle %} - {% when 'cake' %} - This is a cake - {% when 'cookie' %} - This is a cookie - {% else %} - This is not a cake nor a cookie -{% endcase %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -This is a cake -{% endraw %}{% endhighlight %} -
    - - - - - - - -## unless - -

    Similar to if, but executes a block of code only if a certain condition is not met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - {% unless product.title == 'Awesome Shoes' %} - These shoes are not awesome. - {% endunless %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are not awesome. -{% endraw %}{% endhighlight %} -
    - -This would be the equivalent of doing the following: - -
    -{% highlight html %}{% raw %} - {% if product.title != 'Awesome Shoes' %} - These shoes are not awesome. - {% endif %} -{% endraw %}{% endhighlight %} -
    - - - - - - - - - - - - - diff --git a/_tags/control-flow/case-when b/_tags/control-flow/case-when new file mode 100644 index 0000000..f79ea84 --- /dev/null +++ b/_tags/control-flow/case-when @@ -0,0 +1,27 @@ +## case/when + +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign handle = 'cake' %} +{% case handle %} + {% when 'cake' %} + This is a cake + {% when 'cookie' %} + This is a cookie + {% else %} + This is not a cake nor a cookie +{% endcase %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +This is a cake +{% endraw %}{% endhighlight %} +
    diff --git a/_tags/control-flow/elsif-else.md b/_tags/control-flow/elsif-else.md new file mode 100644 index 0000000..e08623d --- /dev/null +++ b/_tags/control-flow/elsif-else.md @@ -0,0 +1,26 @@ +## elsif / else + +

    Adds more conditions within an if or unless block.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% if customer.name == 'kevin' %} + Hey Kevin! + {% elsif customer.name == 'anonymous' %} + Hey Anonymous! + {% else %} + Hi Stranger! + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +Hey Anonymous! +{% endraw %}{% endhighlight %} +
    diff --git a/_tags/control-flow/if.md b/_tags/control-flow/if.md new file mode 100644 index 0000000..f41b842 --- /dev/null +++ b/_tags/control-flow/if.md @@ -0,0 +1,21 @@ +## if + +

    Executes a block of code only if a certain condition is met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% if product.title == 'Awesome Shoes' %} + These shoes are awesome! +{% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are awesome! +{% endraw %}{% endhighlight %} +
    diff --git a/_tags/control-flow/index.html b/_tags/control-flow/index.html new file mode 100644 index 0000000..7fca750 --- /dev/null +++ b/_tags/control-flow/index.html @@ -0,0 +1,15 @@ +--- +layout: default +--- + +CONTROL FLOW HERE + sss + +{% for doc in site.collections["tags"].docs %} +
    +

    {{ doc.title }}

    +
    + {{ doc.content }} +
    +
    +{% endfor %} diff --git a/_tags/control-flow/unless.md b/_tags/control-flow/unless.md new file mode 100644 index 0000000..3733404 --- /dev/null +++ b/_tags/control-flow/unless.md @@ -0,0 +1,31 @@ +## unless + +

    Similar to if, but executes a block of code only if a certain condition is not met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% unless product.title == 'Awesome Shoes' %} + These shoes are not awesome. + {% endunless %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are not awesome. +{% endraw %}{% endhighlight %} +
    + +This would be the equivalent of doing the following: + +
    +{% highlight html %}{% raw %} + {% if product.title != 'Awesome Shoes' %} + These shoes are not awesome. + {% endif %} +{% endraw %}{% endhighlight %} +
    diff --git a/basics/index.html b/basics/index.html index ec015db..1ab753a 100644 --- a/basics/index.html +++ b/basics/index.html @@ -2,11 +2,3 @@ layout: default --- -{% for doc in site.collections["basics"].docs %} -
    -

    {{ doc.title }}

    -
    - {{ doc.content }} -
    -
    -{% endfor %} diff --git a/tags/index.html b/tags/index.html index 925fb36..f0cf854 100644 --- a/tags/index.html +++ b/tags/index.html @@ -2,5 +2,10 @@ layout: default --- -Tags here. +sss +{{ site.collections["tags"] }} + +{% for doc in site.collections["tags"].docs %} + +{% endfor %} From ce1d460d8a3d784a340930972dcdca3d89c3120b Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 16 Oct 2015 11:19:03 -0400 Subject: [PATCH 52/78] Change config file to use pygments, not rouge --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 2c44043..4f73e6e 100644 --- a/_config.yml +++ b/_config.yml @@ -2,7 +2,7 @@ baseurl: "" # the subpath of your site, e.g. /blog/ url: "http://liquidmarkup.org" # the base hostname & protocol for your site markdown: kramdown -highlighter: rouge +highlighter: pygments permalink: /:year/:month/:day/:basename:output_ext collections: basics: From f0c7a601c3b31338dbb653894a72371efa523b1b Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 16 Oct 2015 11:46:03 -0400 Subject: [PATCH 53/78] Remove h2 classes to make the styles work in other pages --- _basics/types.md | 10 +++++----- _sass/modules/_content-area.scss | 12 ++++++++---- filters/index.html | 8 +++----- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/_basics/types.md b/_basics/types.md index 711b8a8..7b56831 100644 --- a/_basics/types.md +++ b/_basics/types.md @@ -13,7 +13,7 @@ Liquid objects can have one of six types: Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags. -### String +## String Strings are declared by wrapping a variable's value in single or double quotes. @@ -23,7 +23,7 @@ Strings are declared by wrapping a variable's value in single or double quotes. {% endraw %} {% endhighlight %} -### Number +## Number Numbers include floats and integers. @@ -34,7 +34,7 @@ Numbers include floats and integers. {% endraw %} {% endhighlight %} -### Boolean +## Boolean Booleans are either `true` or `false`. No quotations are necessary when declaring a boolean. @@ -45,7 +45,7 @@ Booleans are either `true` or `false`. No quotations are necessary when declarin {% endraw %} {% endhighlight %} -### Nil +## Nil Nil is a special empty value that is returned when Liquid code has no results. It is **not** a string with the characters "nil". @@ -75,7 +75,7 @@ The current user is {{ user.name }} The current user is {% endraw %}{% endhighlight %} -### Array +## Array Arrays hold lists of variables of any type. diff --git a/_sass/modules/_content-area.scss b/_sass/modules/_content-area.scss index 58300a3..3344bba 100644 --- a/_sass/modules/_content-area.scss +++ b/_sass/modules/_content-area.scss @@ -1,13 +1,17 @@ - .content__item { margin-bottom: $spacing-unit * 2; h3 { text-decoration: underline; } - } -.content__header { -font-weight: bold; +.content__list { + h2 { + font-weight: bold; + + &:not(:first-child) { + margin-top: $spacing-unit * 2; + } + } } diff --git a/filters/index.html b/filters/index.html index 54a693d..43d6324 100644 --- a/filters/index.html +++ b/filters/index.html @@ -3,10 +3,8 @@ layout: default --- {% for doc in site.collections["filters"].docs %} -
    -

    {{ doc.title }}

    -
    - {{ doc.content }} -
    +

    {{ doc.title }}

    +
    + {{ doc.content }}
    {% endfor %} From 8e3dcf49ba60d0edd4b27ab9a3a215532f311523 Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Fri, 4 Dec 2015 18:56:07 -0500 Subject: [PATCH 54/78] Moving to single collection --- _config.yml | 23 +++++++++----- {_basics => _docs/basics}/handles.md | 0 {_basics => _docs/basics}/operators.md | 0 {_basics => _docs/basics}/truthy-and-falsy.md | 0 {_basics => _docs/basics}/types.md | 0 {_filters => _docs/filters}/append.md | 0 {_filters => _docs/filters}/capitalize.md | 0 {_filters => _docs/filters}/ceil.md | 0 {_filters => _docs/filters}/date.md | 0 {_filters => _docs/filters}/default.md | 0 {_filters => _docs/filters}/divided_by.md | 0 {_filters => _docs/filters}/downcase.md | 0 {_filters => _docs/filters}/escape.md | 0 {_filters => _docs/filters}/escape_once.md | 0 {_filters => _docs/filters}/first.md | 0 {_filters => _docs/filters}/floor.md | 0 {_filters => _docs/filters}/join.md | 0 {_filters => _docs/filters}/last.md | 0 {_filters => _docs/filters}/lstrip.md | 0 {_filters => _docs/filters}/map.md | 0 {_filters => _docs/filters}/minus.md | 0 {_filters => _docs/filters}/modulo.md | 0 {_filters => _docs/filters}/newline_to_br.md | 0 {_filters => _docs/filters}/plus.md | 0 {_filters => _docs/filters}/prepend.md | 0 {_filters => _docs/filters}/remove.md | 0 {_filters => _docs/filters}/remove_first.md | 0 {_filters => _docs/filters}/replace.md | 0 {_filters => _docs/filters}/replace_first.md | 0 {_filters => _docs/filters}/reverse.md | 0 {_filters => _docs/filters}/round.md | 0 {_filters => _docs/filters}/rstrip.md | 0 {_filters => _docs/filters}/size.md | 0 {_filters => _docs/filters}/slice.md | 0 {_filters => _docs/filters}/sort.md | 0 {_filters => _docs/filters}/split.md | 0 {_filters => _docs/filters}/strip.md | 0 {_filters => _docs/filters}/strip_html.md | 0 {_filters => _docs/filters}/strip_newlines.md | 0 {_filters => _docs/filters}/times.md | 0 {_filters => _docs/filters}/truncate.md | 0 {_filters => _docs/filters}/truncatewords.md | 0 {_filters => _docs/filters}/uniq.md | 0 {_filters => _docs/filters}/upcase.md | 0 {_filters => _docs/filters}/url_encode.md | 0 {_tags => _docs/tags}/control-flow/case-when | 0 .../tags}/control-flow/elsif-else.md | 0 {_tags => _docs/tags}/control-flow/if.md | 0 {_tags => _docs/tags}/control-flow/index.html | 0 {_tags => _docs/tags}/control-flow/unless.md | 0 {_tags => _docs/tags}/iteration.md | 0 {_tags => _docs/tags}/theme.md | 0 {_tags => _docs/tags}/variable.md | 0 _layouts/default.html | 30 +++++++++++-------- 54 files changed, 33 insertions(+), 20 deletions(-) rename {_basics => _docs/basics}/handles.md (100%) rename {_basics => _docs/basics}/operators.md (100%) rename {_basics => _docs/basics}/truthy-and-falsy.md (100%) rename {_basics => _docs/basics}/types.md (100%) rename {_filters => _docs/filters}/append.md (100%) rename {_filters => _docs/filters}/capitalize.md (100%) rename {_filters => _docs/filters}/ceil.md (100%) rename {_filters => _docs/filters}/date.md (100%) rename {_filters => _docs/filters}/default.md (100%) rename {_filters => _docs/filters}/divided_by.md (100%) rename {_filters => _docs/filters}/downcase.md (100%) rename {_filters => _docs/filters}/escape.md (100%) rename {_filters => _docs/filters}/escape_once.md (100%) rename {_filters => _docs/filters}/first.md (100%) rename {_filters => _docs/filters}/floor.md (100%) rename {_filters => _docs/filters}/join.md (100%) rename {_filters => _docs/filters}/last.md (100%) rename {_filters => _docs/filters}/lstrip.md (100%) rename {_filters => _docs/filters}/map.md (100%) rename {_filters => _docs/filters}/minus.md (100%) rename {_filters => _docs/filters}/modulo.md (100%) rename {_filters => _docs/filters}/newline_to_br.md (100%) rename {_filters => _docs/filters}/plus.md (100%) rename {_filters => _docs/filters}/prepend.md (100%) rename {_filters => _docs/filters}/remove.md (100%) rename {_filters => _docs/filters}/remove_first.md (100%) rename {_filters => _docs/filters}/replace.md (100%) rename {_filters => _docs/filters}/replace_first.md (100%) rename {_filters => _docs/filters}/reverse.md (100%) rename {_filters => _docs/filters}/round.md (100%) rename {_filters => _docs/filters}/rstrip.md (100%) rename {_filters => _docs/filters}/size.md (100%) rename {_filters => _docs/filters}/slice.md (100%) rename {_filters => _docs/filters}/sort.md (100%) rename {_filters => _docs/filters}/split.md (100%) rename {_filters => _docs/filters}/strip.md (100%) rename {_filters => _docs/filters}/strip_html.md (100%) rename {_filters => _docs/filters}/strip_newlines.md (100%) rename {_filters => _docs/filters}/times.md (100%) rename {_filters => _docs/filters}/truncate.md (100%) rename {_filters => _docs/filters}/truncatewords.md (100%) rename {_filters => _docs/filters}/uniq.md (100%) rename {_filters => _docs/filters}/upcase.md (100%) rename {_filters => _docs/filters}/url_encode.md (100%) rename {_tags => _docs/tags}/control-flow/case-when (100%) rename {_tags => _docs/tags}/control-flow/elsif-else.md (100%) rename {_tags => _docs/tags}/control-flow/if.md (100%) rename {_tags => _docs/tags}/control-flow/index.html (100%) rename {_tags => _docs/tags}/control-flow/unless.md (100%) rename {_tags => _docs/tags}/iteration.md (100%) rename {_tags => _docs/tags}/theme.md (100%) rename {_tags => _docs/tags}/variable.md (100%) diff --git a/_config.yml b/_config.yml index 4f73e6e..68a1a6c 100644 --- a/_config.yml +++ b/_config.yml @@ -5,21 +5,28 @@ markdown: kramdown highlighter: pygments permalink: /:year/:month/:day/:basename:output_ext collections: - basics: - output: true - permalink: /basics/:path/ - filters: - output: true - tags: + docs: output: true + permalink: /docs/:path/ exclude: - README.md - CNAME - node_modules keep_files: ['css'] defaults: - - - scope: + - scope: path: "" # an empty string here means all files in the project values: layout: "default" + - scope: + path: "docs/basics" + values: + type: "basics" + - scope: + path: "docs/filters" + values: + type: "filters" + - scope: + path: "docs/tags" + values: + type: "tags" diff --git a/_basics/handles.md b/_docs/basics/handles.md similarity index 100% rename from _basics/handles.md rename to _docs/basics/handles.md diff --git a/_basics/operators.md b/_docs/basics/operators.md similarity index 100% rename from _basics/operators.md rename to _docs/basics/operators.md diff --git a/_basics/truthy-and-falsy.md b/_docs/basics/truthy-and-falsy.md similarity index 100% rename from _basics/truthy-and-falsy.md rename to _docs/basics/truthy-and-falsy.md diff --git a/_basics/types.md b/_docs/basics/types.md similarity index 100% rename from _basics/types.md rename to _docs/basics/types.md diff --git a/_filters/append.md b/_docs/filters/append.md similarity index 100% rename from _filters/append.md rename to _docs/filters/append.md diff --git a/_filters/capitalize.md b/_docs/filters/capitalize.md similarity index 100% rename from _filters/capitalize.md rename to _docs/filters/capitalize.md diff --git a/_filters/ceil.md b/_docs/filters/ceil.md similarity index 100% rename from _filters/ceil.md rename to _docs/filters/ceil.md diff --git a/_filters/date.md b/_docs/filters/date.md similarity index 100% rename from _filters/date.md rename to _docs/filters/date.md diff --git a/_filters/default.md b/_docs/filters/default.md similarity index 100% rename from _filters/default.md rename to _docs/filters/default.md diff --git a/_filters/divided_by.md b/_docs/filters/divided_by.md similarity index 100% rename from _filters/divided_by.md rename to _docs/filters/divided_by.md diff --git a/_filters/downcase.md b/_docs/filters/downcase.md similarity index 100% rename from _filters/downcase.md rename to _docs/filters/downcase.md diff --git a/_filters/escape.md b/_docs/filters/escape.md similarity index 100% rename from _filters/escape.md rename to _docs/filters/escape.md diff --git a/_filters/escape_once.md b/_docs/filters/escape_once.md similarity index 100% rename from _filters/escape_once.md rename to _docs/filters/escape_once.md diff --git a/_filters/first.md b/_docs/filters/first.md similarity index 100% rename from _filters/first.md rename to _docs/filters/first.md diff --git a/_filters/floor.md b/_docs/filters/floor.md similarity index 100% rename from _filters/floor.md rename to _docs/filters/floor.md diff --git a/_filters/join.md b/_docs/filters/join.md similarity index 100% rename from _filters/join.md rename to _docs/filters/join.md diff --git a/_filters/last.md b/_docs/filters/last.md similarity index 100% rename from _filters/last.md rename to _docs/filters/last.md diff --git a/_filters/lstrip.md b/_docs/filters/lstrip.md similarity index 100% rename from _filters/lstrip.md rename to _docs/filters/lstrip.md diff --git a/_filters/map.md b/_docs/filters/map.md similarity index 100% rename from _filters/map.md rename to _docs/filters/map.md diff --git a/_filters/minus.md b/_docs/filters/minus.md similarity index 100% rename from _filters/minus.md rename to _docs/filters/minus.md diff --git a/_filters/modulo.md b/_docs/filters/modulo.md similarity index 100% rename from _filters/modulo.md rename to _docs/filters/modulo.md diff --git a/_filters/newline_to_br.md b/_docs/filters/newline_to_br.md similarity index 100% rename from _filters/newline_to_br.md rename to _docs/filters/newline_to_br.md diff --git a/_filters/plus.md b/_docs/filters/plus.md similarity index 100% rename from _filters/plus.md rename to _docs/filters/plus.md diff --git a/_filters/prepend.md b/_docs/filters/prepend.md similarity index 100% rename from _filters/prepend.md rename to _docs/filters/prepend.md diff --git a/_filters/remove.md b/_docs/filters/remove.md similarity index 100% rename from _filters/remove.md rename to _docs/filters/remove.md diff --git a/_filters/remove_first.md b/_docs/filters/remove_first.md similarity index 100% rename from _filters/remove_first.md rename to _docs/filters/remove_first.md diff --git a/_filters/replace.md b/_docs/filters/replace.md similarity index 100% rename from _filters/replace.md rename to _docs/filters/replace.md diff --git a/_filters/replace_first.md b/_docs/filters/replace_first.md similarity index 100% rename from _filters/replace_first.md rename to _docs/filters/replace_first.md diff --git a/_filters/reverse.md b/_docs/filters/reverse.md similarity index 100% rename from _filters/reverse.md rename to _docs/filters/reverse.md diff --git a/_filters/round.md b/_docs/filters/round.md similarity index 100% rename from _filters/round.md rename to _docs/filters/round.md diff --git a/_filters/rstrip.md b/_docs/filters/rstrip.md similarity index 100% rename from _filters/rstrip.md rename to _docs/filters/rstrip.md diff --git a/_filters/size.md b/_docs/filters/size.md similarity index 100% rename from _filters/size.md rename to _docs/filters/size.md diff --git a/_filters/slice.md b/_docs/filters/slice.md similarity index 100% rename from _filters/slice.md rename to _docs/filters/slice.md diff --git a/_filters/sort.md b/_docs/filters/sort.md similarity index 100% rename from _filters/sort.md rename to _docs/filters/sort.md diff --git a/_filters/split.md b/_docs/filters/split.md similarity index 100% rename from _filters/split.md rename to _docs/filters/split.md diff --git a/_filters/strip.md b/_docs/filters/strip.md similarity index 100% rename from _filters/strip.md rename to _docs/filters/strip.md diff --git a/_filters/strip_html.md b/_docs/filters/strip_html.md similarity index 100% rename from _filters/strip_html.md rename to _docs/filters/strip_html.md diff --git a/_filters/strip_newlines.md b/_docs/filters/strip_newlines.md similarity index 100% rename from _filters/strip_newlines.md rename to _docs/filters/strip_newlines.md diff --git a/_filters/times.md b/_docs/filters/times.md similarity index 100% rename from _filters/times.md rename to _docs/filters/times.md diff --git a/_filters/truncate.md b/_docs/filters/truncate.md similarity index 100% rename from _filters/truncate.md rename to _docs/filters/truncate.md diff --git a/_filters/truncatewords.md b/_docs/filters/truncatewords.md similarity index 100% rename from _filters/truncatewords.md rename to _docs/filters/truncatewords.md diff --git a/_filters/uniq.md b/_docs/filters/uniq.md similarity index 100% rename from _filters/uniq.md rename to _docs/filters/uniq.md diff --git a/_filters/upcase.md b/_docs/filters/upcase.md similarity index 100% rename from _filters/upcase.md rename to _docs/filters/upcase.md diff --git a/_filters/url_encode.md b/_docs/filters/url_encode.md similarity index 100% rename from _filters/url_encode.md rename to _docs/filters/url_encode.md diff --git a/_tags/control-flow/case-when b/_docs/tags/control-flow/case-when similarity index 100% rename from _tags/control-flow/case-when rename to _docs/tags/control-flow/case-when diff --git a/_tags/control-flow/elsif-else.md b/_docs/tags/control-flow/elsif-else.md similarity index 100% rename from _tags/control-flow/elsif-else.md rename to _docs/tags/control-flow/elsif-else.md diff --git a/_tags/control-flow/if.md b/_docs/tags/control-flow/if.md similarity index 100% rename from _tags/control-flow/if.md rename to _docs/tags/control-flow/if.md diff --git a/_tags/control-flow/index.html b/_docs/tags/control-flow/index.html similarity index 100% rename from _tags/control-flow/index.html rename to _docs/tags/control-flow/index.html diff --git a/_tags/control-flow/unless.md b/_docs/tags/control-flow/unless.md similarity index 100% rename from _tags/control-flow/unless.md rename to _docs/tags/control-flow/unless.md diff --git a/_tags/iteration.md b/_docs/tags/iteration.md similarity index 100% rename from _tags/iteration.md rename to _docs/tags/iteration.md diff --git a/_tags/theme.md b/_docs/tags/theme.md similarity index 100% rename from _tags/theme.md rename to _docs/tags/theme.md diff --git a/_tags/variable.md b/_docs/tags/variable.md similarity index 100% rename from _tags/variable.md rename to _docs/tags/variable.md diff --git a/_layouts/default.html b/_layouts/default.html index 09a097c..62d066c 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -27,10 +27,12 @@
  • Basics

  • @@ -41,10 +43,12 @@
  • Tags

  • @@ -55,10 +59,12 @@
  • Filters

  • From 88e774cb401383b2a4ec61aeeb824fe63437b7fc Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 4 Dec 2015 19:21:57 -0500 Subject: [PATCH 55/78] CSS adjustments to headers --- _layouts/default.html | 1 + _sass/modules/_base.scss | 14 ++++----- _sass/modules/_content-area.scss | 6 ++++ docs/tags/control-flow/case-when.md | 32 ++++++++++++++++++++ docs/tags/control-flow/elsif-else.md | 26 ++++++++++++++++ docs/tags/control-flow/if.md | 21 +++++++++++++ {_docs => docs}/tags/control-flow/index.html | 3 +- docs/tags/control-flow/unless.md | 31 +++++++++++++++++++ docs/tags/index.html | 11 +++++++ tags/control-flow/case-when.md | 32 ++++++++++++++++++++ tags/control-flow/elsif-else.md | 26 ++++++++++++++++ tags/control-flow/if.md | 21 +++++++++++++ tags/control-flow/index.html | 14 +++++++++ tags/control-flow/unless.md | 31 +++++++++++++++++++ 14 files changed, 260 insertions(+), 9 deletions(-) create mode 100644 docs/tags/control-flow/case-when.md create mode 100644 docs/tags/control-flow/elsif-else.md create mode 100644 docs/tags/control-flow/if.md rename {_docs => docs}/tags/control-flow/index.html (91%) create mode 100644 docs/tags/control-flow/unless.md create mode 100644 docs/tags/index.html create mode 100644 tags/control-flow/case-when.md create mode 100644 tags/control-flow/elsif-else.md create mode 100644 tags/control-flow/if.md create mode 100644 tags/control-flow/index.html create mode 100644 tags/control-flow/unless.md diff --git a/_layouts/default.html b/_layouts/default.html index 62d066c..0be6b65 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -75,6 +75,7 @@
    +

    {{ page.title }}

    {{ content }}
    diff --git a/_sass/modules/_base.scss b/_sass/modules/_base.scss index 81fcdee..a2569c0 100644 --- a/_sass/modules/_base.scss +++ b/_sass/modules/_base.scss @@ -82,22 +82,22 @@ a { } h1 { - font-size: 2.5em; -} - -h2 { font-size: 2em; } -h3 { +h2 { font-size: 1.5em; } -h4 { - font-size: 1.5em; +h3 { + font-size: 1em; text-decoration: underline; } +h4 { + font-size: 1em; +} + blockquote { color: lighten($color-slate, 30%); border-left: 2px solid lighten($color-slate, 50%); diff --git a/_sass/modules/_content-area.scss b/_sass/modules/_content-area.scss index 3344bba..7edc6a1 100644 --- a/_sass/modules/_content-area.scss +++ b/_sass/modules/_content-area.scss @@ -7,8 +7,14 @@ } .content__list { + + h1 { + font-weight: bold; + } + h2 { font-weight: bold; + text-decoration: underline; &:not(:first-child) { margin-top: $spacing-unit * 2; diff --git a/docs/tags/control-flow/case-when.md b/docs/tags/control-flow/case-when.md new file mode 100644 index 0000000..ddc67c8 --- /dev/null +++ b/docs/tags/control-flow/case-when.md @@ -0,0 +1,32 @@ +--- +category: control-flow +--- + + +## case/when + +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign handle = 'cake' %} +{% case handle %} + {% when 'cake' %} + This is a cake + {% when 'cookie' %} + This is a cookie + {% else %} + This is not a cake nor a cookie +{% endcase %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +This is a cake +{% endraw %}{% endhighlight %} +
    diff --git a/docs/tags/control-flow/elsif-else.md b/docs/tags/control-flow/elsif-else.md new file mode 100644 index 0000000..e08623d --- /dev/null +++ b/docs/tags/control-flow/elsif-else.md @@ -0,0 +1,26 @@ +## elsif / else + +

    Adds more conditions within an if or unless block.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% if customer.name == 'kevin' %} + Hey Kevin! + {% elsif customer.name == 'anonymous' %} + Hey Anonymous! + {% else %} + Hi Stranger! + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +Hey Anonymous! +{% endraw %}{% endhighlight %} +
    diff --git a/docs/tags/control-flow/if.md b/docs/tags/control-flow/if.md new file mode 100644 index 0000000..f41b842 --- /dev/null +++ b/docs/tags/control-flow/if.md @@ -0,0 +1,21 @@ +## if + +

    Executes a block of code only if a certain condition is met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% if product.title == 'Awesome Shoes' %} + These shoes are awesome! +{% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are awesome! +{% endraw %}{% endhighlight %} +
    diff --git a/_docs/tags/control-flow/index.html b/docs/tags/control-flow/index.html similarity index 91% rename from _docs/tags/control-flow/index.html rename to docs/tags/control-flow/index.html index 7fca750..9d08db0 100644 --- a/_docs/tags/control-flow/index.html +++ b/docs/tags/control-flow/index.html @@ -2,8 +2,7 @@ layout: default --- -CONTROL FLOW HERE - sss +TAGS! {% for doc in site.collections["tags"].docs %}
    diff --git a/docs/tags/control-flow/unless.md b/docs/tags/control-flow/unless.md new file mode 100644 index 0000000..3733404 --- /dev/null +++ b/docs/tags/control-flow/unless.md @@ -0,0 +1,31 @@ +## unless + +

    Similar to if, but executes a block of code only if a certain condition is not met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% unless product.title == 'Awesome Shoes' %} + These shoes are not awesome. + {% endunless %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are not awesome. +{% endraw %}{% endhighlight %} +
    + +This would be the equivalent of doing the following: + +
    +{% highlight html %}{% raw %} + {% if product.title != 'Awesome Shoes' %} + These shoes are not awesome. + {% endif %} +{% endraw %}{% endhighlight %} +
    diff --git a/docs/tags/index.html b/docs/tags/index.html new file mode 100644 index 0000000..f0cf854 --- /dev/null +++ b/docs/tags/index.html @@ -0,0 +1,11 @@ +--- +layout: default +--- + +sss + +{{ site.collections["tags"] }} + +{% for doc in site.collections["tags"].docs %} + +{% endfor %} diff --git a/tags/control-flow/case-when.md b/tags/control-flow/case-when.md new file mode 100644 index 0000000..ddc67c8 --- /dev/null +++ b/tags/control-flow/case-when.md @@ -0,0 +1,32 @@ +--- +category: control-flow +--- + + +## case/when + +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign handle = 'cake' %} +{% case handle %} + {% when 'cake' %} + This is a cake + {% when 'cookie' %} + This is a cookie + {% else %} + This is not a cake nor a cookie +{% endcase %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +This is a cake +{% endraw %}{% endhighlight %} +
    diff --git a/tags/control-flow/elsif-else.md b/tags/control-flow/elsif-else.md new file mode 100644 index 0000000..e08623d --- /dev/null +++ b/tags/control-flow/elsif-else.md @@ -0,0 +1,26 @@ +## elsif / else + +

    Adds more conditions within an if or unless block.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% if customer.name == 'kevin' %} + Hey Kevin! + {% elsif customer.name == 'anonymous' %} + Hey Anonymous! + {% else %} + Hi Stranger! + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +Hey Anonymous! +{% endraw %}{% endhighlight %} +
    diff --git a/tags/control-flow/if.md b/tags/control-flow/if.md new file mode 100644 index 0000000..f41b842 --- /dev/null +++ b/tags/control-flow/if.md @@ -0,0 +1,21 @@ +## if + +

    Executes a block of code only if a certain condition is met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% if product.title == 'Awesome Shoes' %} + These shoes are awesome! +{% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are awesome! +{% endraw %}{% endhighlight %} +
    diff --git a/tags/control-flow/index.html b/tags/control-flow/index.html new file mode 100644 index 0000000..9d08db0 --- /dev/null +++ b/tags/control-flow/index.html @@ -0,0 +1,14 @@ +--- +layout: default +--- + +TAGS! + +{% for doc in site.collections["tags"].docs %} +
    +

    {{ doc.title }}

    +
    + {{ doc.content }} +
    +
    +{% endfor %} diff --git a/tags/control-flow/unless.md b/tags/control-flow/unless.md new file mode 100644 index 0000000..3733404 --- /dev/null +++ b/tags/control-flow/unless.md @@ -0,0 +1,31 @@ +## unless + +

    Similar to if, but executes a block of code only if a certain condition is not met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% unless product.title == 'Awesome Shoes' %} + These shoes are not awesome. + {% endunless %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are not awesome. +{% endraw %}{% endhighlight %} +
    + +This would be the equivalent of doing the following: + +
    +{% highlight html %}{% raw %} + {% if product.title != 'Awesome Shoes' %} + These shoes are not awesome. + {% endif %} +{% endraw %}{% endhighlight %} +
    From a55d6386908a030469e56b9281b18709b60d212e Mon Sep 17 00:00:00 2001 From: Adam Hollett Date: Fri, 4 Dec 2015 19:50:03 -0500 Subject: [PATCH 56/78] Why use collections at all? Fixing control flow too --- _config.yml | 10 +- _docs/tags/control-flow/case-when | 27 ----- _docs/tags/control-flow/elsif-else.md | 26 ----- _docs/tags/control-flow/if.md | 21 ---- _docs/tags/control-flow/unless.md | 31 ----- _layouts/default.html | 18 ++- {_docs/basics => basics}/handles.md | 0 {_docs/basics => basics}/operators.md | 0 {_docs/basics => basics}/truthy-and-falsy.md | 0 {_docs/basics => basics}/types.md | 0 {_docs/filters => filters}/append.md | 0 {_docs/filters => filters}/capitalize.md | 0 {_docs/filters => filters}/ceil.md | 0 {_docs/filters => filters}/date.md | 0 {_docs/filters => filters}/default.md | 0 {_docs/filters => filters}/divided_by.md | 0 {_docs/filters => filters}/downcase.md | 0 {_docs/filters => filters}/escape.md | 0 {_docs/filters => filters}/escape_once.md | 0 {_docs/filters => filters}/first.md | 0 {_docs/filters => filters}/floor.md | 0 {_docs/filters => filters}/join.md | 0 {_docs/filters => filters}/last.md | 0 {_docs/filters => filters}/lstrip.md | 0 {_docs/filters => filters}/map.md | 0 {_docs/filters => filters}/minus.md | 0 {_docs/filters => filters}/modulo.md | 0 {_docs/filters => filters}/newline_to_br.md | 0 {_docs/filters => filters}/plus.md | 0 {_docs/filters => filters}/prepend.md | 0 {_docs/filters => filters}/remove.md | 0 {_docs/filters => filters}/remove_first.md | 0 {_docs/filters => filters}/replace.md | 0 {_docs/filters => filters}/replace_first.md | 0 {_docs/filters => filters}/reverse.md | 0 {_docs/filters => filters}/round.md | 0 {_docs/filters => filters}/rstrip.md | 0 {_docs/filters => filters}/size.md | 0 {_docs/filters => filters}/slice.md | 0 {_docs/filters => filters}/sort.md | 0 {_docs/filters => filters}/split.md | 0 {_docs/filters => filters}/strip.md | 0 {_docs/filters => filters}/strip_html.md | 0 {_docs/filters => filters}/strip_newlines.md | 0 {_docs/filters => filters}/times.md | 0 {_docs/filters => filters}/truncate.md | 0 {_docs/filters => filters}/truncatewords.md | 0 {_docs/filters => filters}/uniq.md | 0 {_docs/filters => filters}/upcase.md | 0 {_docs/filters => filters}/url_encode.md | 0 tags/control-flow/case-when.md | 32 ------ tags/control-flow/elsif-else.md | 26 ----- tags/control-flow/if.md | 21 ---- tags/control-flow/index.html | 14 --- tags/control-flow/unless.md | 31 ----- tags/control.flow.md | 113 +++++++++++++++++++ {_docs/tags => tags}/iteration.md | 0 {_docs/tags => tags}/theme.md | 0 {_docs/tags => tags}/variable.md | 0 59 files changed, 128 insertions(+), 242 deletions(-) delete mode 100644 _docs/tags/control-flow/case-when delete mode 100644 _docs/tags/control-flow/elsif-else.md delete mode 100644 _docs/tags/control-flow/if.md delete mode 100644 _docs/tags/control-flow/unless.md rename {_docs/basics => basics}/handles.md (100%) rename {_docs/basics => basics}/operators.md (100%) rename {_docs/basics => basics}/truthy-and-falsy.md (100%) rename {_docs/basics => basics}/types.md (100%) rename {_docs/filters => filters}/append.md (100%) rename {_docs/filters => filters}/capitalize.md (100%) rename {_docs/filters => filters}/ceil.md (100%) rename {_docs/filters => filters}/date.md (100%) rename {_docs/filters => filters}/default.md (100%) rename {_docs/filters => filters}/divided_by.md (100%) rename {_docs/filters => filters}/downcase.md (100%) rename {_docs/filters => filters}/escape.md (100%) rename {_docs/filters => filters}/escape_once.md (100%) rename {_docs/filters => filters}/first.md (100%) rename {_docs/filters => filters}/floor.md (100%) rename {_docs/filters => filters}/join.md (100%) rename {_docs/filters => filters}/last.md (100%) rename {_docs/filters => filters}/lstrip.md (100%) rename {_docs/filters => filters}/map.md (100%) rename {_docs/filters => filters}/minus.md (100%) rename {_docs/filters => filters}/modulo.md (100%) rename {_docs/filters => filters}/newline_to_br.md (100%) rename {_docs/filters => filters}/plus.md (100%) rename {_docs/filters => filters}/prepend.md (100%) rename {_docs/filters => filters}/remove.md (100%) rename {_docs/filters => filters}/remove_first.md (100%) rename {_docs/filters => filters}/replace.md (100%) rename {_docs/filters => filters}/replace_first.md (100%) rename {_docs/filters => filters}/reverse.md (100%) rename {_docs/filters => filters}/round.md (100%) rename {_docs/filters => filters}/rstrip.md (100%) rename {_docs/filters => filters}/size.md (100%) rename {_docs/filters => filters}/slice.md (100%) rename {_docs/filters => filters}/sort.md (100%) rename {_docs/filters => filters}/split.md (100%) rename {_docs/filters => filters}/strip.md (100%) rename {_docs/filters => filters}/strip_html.md (100%) rename {_docs/filters => filters}/strip_newlines.md (100%) rename {_docs/filters => filters}/times.md (100%) rename {_docs/filters => filters}/truncate.md (100%) rename {_docs/filters => filters}/truncatewords.md (100%) rename {_docs/filters => filters}/uniq.md (100%) rename {_docs/filters => filters}/upcase.md (100%) rename {_docs/filters => filters}/url_encode.md (100%) delete mode 100644 tags/control-flow/case-when.md delete mode 100644 tags/control-flow/elsif-else.md delete mode 100644 tags/control-flow/if.md delete mode 100644 tags/control-flow/index.html delete mode 100644 tags/control-flow/unless.md create mode 100644 tags/control.flow.md rename {_docs/tags => tags}/iteration.md (100%) rename {_docs/tags => tags}/theme.md (100%) rename {_docs/tags => tags}/variable.md (100%) diff --git a/_config.yml b/_config.yml index 68a1a6c..e4682e2 100644 --- a/_config.yml +++ b/_config.yml @@ -4,10 +4,6 @@ url: "http://liquidmarkup.org" # the base hostname & protocol for your site markdown: kramdown highlighter: pygments permalink: /:year/:month/:day/:basename:output_ext -collections: - docs: - output: true - permalink: /docs/:path/ exclude: - README.md - CNAME @@ -19,14 +15,14 @@ defaults: values: layout: "default" - scope: - path: "docs/basics" + path: "basics" values: type: "basics" - scope: - path: "docs/filters" + path: "filters" values: type: "filters" - scope: - path: "docs/tags" + path: "tags" values: type: "tags" diff --git a/_docs/tags/control-flow/case-when b/_docs/tags/control-flow/case-when deleted file mode 100644 index f79ea84..0000000 --- a/_docs/tags/control-flow/case-when +++ /dev/null @@ -1,27 +0,0 @@ -## case/when - -

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% assign handle = 'cake' %} -{% case handle %} - {% when 'cake' %} - This is a cake - {% when 'cookie' %} - This is a cookie - {% else %} - This is not a cake nor a cookie -{% endcase %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -This is a cake -{% endraw %}{% endhighlight %} -
    diff --git a/_docs/tags/control-flow/elsif-else.md b/_docs/tags/control-flow/elsif-else.md deleted file mode 100644 index e08623d..0000000 --- a/_docs/tags/control-flow/elsif-else.md +++ /dev/null @@ -1,26 +0,0 @@ -## elsif / else - -

    Adds more conditions within an if or unless block.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - - {% if customer.name == 'kevin' %} - Hey Kevin! - {% elsif customer.name == 'anonymous' %} - Hey Anonymous! - {% else %} - Hi Stranger! - {% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -Hey Anonymous! -{% endraw %}{% endhighlight %} -
    diff --git a/_docs/tags/control-flow/if.md b/_docs/tags/control-flow/if.md deleted file mode 100644 index f41b842..0000000 --- a/_docs/tags/control-flow/if.md +++ /dev/null @@ -1,21 +0,0 @@ -## if - -

    Executes a block of code only if a certain condition is met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% if product.title == 'Awesome Shoes' %} - These shoes are awesome! -{% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are awesome! -{% endraw %}{% endhighlight %} -
    diff --git a/_docs/tags/control-flow/unless.md b/_docs/tags/control-flow/unless.md deleted file mode 100644 index 3733404..0000000 --- a/_docs/tags/control-flow/unless.md +++ /dev/null @@ -1,31 +0,0 @@ -## unless - -

    Similar to if, but executes a block of code only if a certain condition is not met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - {% unless product.title == 'Awesome Shoes' %} - These shoes are not awesome. - {% endunless %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are not awesome. -{% endraw %}{% endhighlight %} -
    - -This would be the equivalent of doing the following: - -
    -{% highlight html %}{% raw %} - {% if product.title != 'Awesome Shoes' %} - These shoes are not awesome. - {% endif %} -{% endraw %}{% endhighlight %} -
    diff --git a/_layouts/default.html b/_layouts/default.html index 0be6b65..28a03eb 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -27,11 +27,13 @@
  • Basics

    @@ -43,11 +45,13 @@
  • Tags

    @@ -59,11 +63,13 @@
  • Filters

    diff --git a/_docs/basics/handles.md b/basics/handles.md similarity index 100% rename from _docs/basics/handles.md rename to basics/handles.md diff --git a/_docs/basics/operators.md b/basics/operators.md similarity index 100% rename from _docs/basics/operators.md rename to basics/operators.md diff --git a/_docs/basics/truthy-and-falsy.md b/basics/truthy-and-falsy.md similarity index 100% rename from _docs/basics/truthy-and-falsy.md rename to basics/truthy-and-falsy.md diff --git a/_docs/basics/types.md b/basics/types.md similarity index 100% rename from _docs/basics/types.md rename to basics/types.md diff --git a/_docs/filters/append.md b/filters/append.md similarity index 100% rename from _docs/filters/append.md rename to filters/append.md diff --git a/_docs/filters/capitalize.md b/filters/capitalize.md similarity index 100% rename from _docs/filters/capitalize.md rename to filters/capitalize.md diff --git a/_docs/filters/ceil.md b/filters/ceil.md similarity index 100% rename from _docs/filters/ceil.md rename to filters/ceil.md diff --git a/_docs/filters/date.md b/filters/date.md similarity index 100% rename from _docs/filters/date.md rename to filters/date.md diff --git a/_docs/filters/default.md b/filters/default.md similarity index 100% rename from _docs/filters/default.md rename to filters/default.md diff --git a/_docs/filters/divided_by.md b/filters/divided_by.md similarity index 100% rename from _docs/filters/divided_by.md rename to filters/divided_by.md diff --git a/_docs/filters/downcase.md b/filters/downcase.md similarity index 100% rename from _docs/filters/downcase.md rename to filters/downcase.md diff --git a/_docs/filters/escape.md b/filters/escape.md similarity index 100% rename from _docs/filters/escape.md rename to filters/escape.md diff --git a/_docs/filters/escape_once.md b/filters/escape_once.md similarity index 100% rename from _docs/filters/escape_once.md rename to filters/escape_once.md diff --git a/_docs/filters/first.md b/filters/first.md similarity index 100% rename from _docs/filters/first.md rename to filters/first.md diff --git a/_docs/filters/floor.md b/filters/floor.md similarity index 100% rename from _docs/filters/floor.md rename to filters/floor.md diff --git a/_docs/filters/join.md b/filters/join.md similarity index 100% rename from _docs/filters/join.md rename to filters/join.md diff --git a/_docs/filters/last.md b/filters/last.md similarity index 100% rename from _docs/filters/last.md rename to filters/last.md diff --git a/_docs/filters/lstrip.md b/filters/lstrip.md similarity index 100% rename from _docs/filters/lstrip.md rename to filters/lstrip.md diff --git a/_docs/filters/map.md b/filters/map.md similarity index 100% rename from _docs/filters/map.md rename to filters/map.md diff --git a/_docs/filters/minus.md b/filters/minus.md similarity index 100% rename from _docs/filters/minus.md rename to filters/minus.md diff --git a/_docs/filters/modulo.md b/filters/modulo.md similarity index 100% rename from _docs/filters/modulo.md rename to filters/modulo.md diff --git a/_docs/filters/newline_to_br.md b/filters/newline_to_br.md similarity index 100% rename from _docs/filters/newline_to_br.md rename to filters/newline_to_br.md diff --git a/_docs/filters/plus.md b/filters/plus.md similarity index 100% rename from _docs/filters/plus.md rename to filters/plus.md diff --git a/_docs/filters/prepend.md b/filters/prepend.md similarity index 100% rename from _docs/filters/prepend.md rename to filters/prepend.md diff --git a/_docs/filters/remove.md b/filters/remove.md similarity index 100% rename from _docs/filters/remove.md rename to filters/remove.md diff --git a/_docs/filters/remove_first.md b/filters/remove_first.md similarity index 100% rename from _docs/filters/remove_first.md rename to filters/remove_first.md diff --git a/_docs/filters/replace.md b/filters/replace.md similarity index 100% rename from _docs/filters/replace.md rename to filters/replace.md diff --git a/_docs/filters/replace_first.md b/filters/replace_first.md similarity index 100% rename from _docs/filters/replace_first.md rename to filters/replace_first.md diff --git a/_docs/filters/reverse.md b/filters/reverse.md similarity index 100% rename from _docs/filters/reverse.md rename to filters/reverse.md diff --git a/_docs/filters/round.md b/filters/round.md similarity index 100% rename from _docs/filters/round.md rename to filters/round.md diff --git a/_docs/filters/rstrip.md b/filters/rstrip.md similarity index 100% rename from _docs/filters/rstrip.md rename to filters/rstrip.md diff --git a/_docs/filters/size.md b/filters/size.md similarity index 100% rename from _docs/filters/size.md rename to filters/size.md diff --git a/_docs/filters/slice.md b/filters/slice.md similarity index 100% rename from _docs/filters/slice.md rename to filters/slice.md diff --git a/_docs/filters/sort.md b/filters/sort.md similarity index 100% rename from _docs/filters/sort.md rename to filters/sort.md diff --git a/_docs/filters/split.md b/filters/split.md similarity index 100% rename from _docs/filters/split.md rename to filters/split.md diff --git a/_docs/filters/strip.md b/filters/strip.md similarity index 100% rename from _docs/filters/strip.md rename to filters/strip.md diff --git a/_docs/filters/strip_html.md b/filters/strip_html.md similarity index 100% rename from _docs/filters/strip_html.md rename to filters/strip_html.md diff --git a/_docs/filters/strip_newlines.md b/filters/strip_newlines.md similarity index 100% rename from _docs/filters/strip_newlines.md rename to filters/strip_newlines.md diff --git a/_docs/filters/times.md b/filters/times.md similarity index 100% rename from _docs/filters/times.md rename to filters/times.md diff --git a/_docs/filters/truncate.md b/filters/truncate.md similarity index 100% rename from _docs/filters/truncate.md rename to filters/truncate.md diff --git a/_docs/filters/truncatewords.md b/filters/truncatewords.md similarity index 100% rename from _docs/filters/truncatewords.md rename to filters/truncatewords.md diff --git a/_docs/filters/uniq.md b/filters/uniq.md similarity index 100% rename from _docs/filters/uniq.md rename to filters/uniq.md diff --git a/_docs/filters/upcase.md b/filters/upcase.md similarity index 100% rename from _docs/filters/upcase.md rename to filters/upcase.md diff --git a/_docs/filters/url_encode.md b/filters/url_encode.md similarity index 100% rename from _docs/filters/url_encode.md rename to filters/url_encode.md diff --git a/tags/control-flow/case-when.md b/tags/control-flow/case-when.md deleted file mode 100644 index ddc67c8..0000000 --- a/tags/control-flow/case-when.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -category: control-flow ---- - - -## case/when - -

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% assign handle = 'cake' %} -{% case handle %} - {% when 'cake' %} - This is a cake - {% when 'cookie' %} - This is a cookie - {% else %} - This is not a cake nor a cookie -{% endcase %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -This is a cake -{% endraw %}{% endhighlight %} -
    diff --git a/tags/control-flow/elsif-else.md b/tags/control-flow/elsif-else.md deleted file mode 100644 index e08623d..0000000 --- a/tags/control-flow/elsif-else.md +++ /dev/null @@ -1,26 +0,0 @@ -## elsif / else - -

    Adds more conditions within an if or unless block.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - - {% if customer.name == 'kevin' %} - Hey Kevin! - {% elsif customer.name == 'anonymous' %} - Hey Anonymous! - {% else %} - Hi Stranger! - {% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -Hey Anonymous! -{% endraw %}{% endhighlight %} -
    diff --git a/tags/control-flow/if.md b/tags/control-flow/if.md deleted file mode 100644 index f41b842..0000000 --- a/tags/control-flow/if.md +++ /dev/null @@ -1,21 +0,0 @@ -## if - -

    Executes a block of code only if a certain condition is met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} -{% if product.title == 'Awesome Shoes' %} - These shoes are awesome! -{% endif %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are awesome! -{% endraw %}{% endhighlight %} -
    diff --git a/tags/control-flow/index.html b/tags/control-flow/index.html deleted file mode 100644 index 9d08db0..0000000 --- a/tags/control-flow/index.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default ---- - -TAGS! - -{% for doc in site.collections["tags"].docs %} -
    -

    {{ doc.title }}

    -
    - {{ doc.content }} -
    -
    -{% endfor %} diff --git a/tags/control-flow/unless.md b/tags/control-flow/unless.md deleted file mode 100644 index 3733404..0000000 --- a/tags/control-flow/unless.md +++ /dev/null @@ -1,31 +0,0 @@ -## unless - -

    Similar to if, but executes a block of code only if a certain condition is not met.

    - -

    Input

    - -
    -{% highlight html %}{% raw %} - {% unless product.title == 'Awesome Shoes' %} - These shoes are not awesome. - {% endunless %} -{% endraw %}{% endhighlight %} -
    - -

    Output

    - -
    -{% highlight html %}{% raw %} -These shoes are not awesome. -{% endraw %}{% endhighlight %} -
    - -This would be the equivalent of doing the following: - -
    -{% highlight html %}{% raw %} - {% if product.title != 'Awesome Shoes' %} - These shoes are not awesome. - {% endif %} -{% endraw %}{% endhighlight %} -
    diff --git a/tags/control.flow.md b/tags/control.flow.md new file mode 100644 index 0000000..881df7d --- /dev/null +++ b/tags/control.flow.md @@ -0,0 +1,113 @@ +--- +--- + +TAGS! + +## case/when + +

    Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% assign handle = 'cake' %} +{% case handle %} + {% when 'cake' %} + This is a cake + {% when 'cookie' %} + This is a cookie + {% else %} + This is not a cake nor a cookie +{% endcase %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +This is a cake +{% endraw %}{% endhighlight %} +
    + +## if + +

    Executes a block of code only if a certain condition is met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} +{% if product.title == 'Awesome Shoes' %} + These shoes are awesome! +{% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are awesome! +{% endraw %}{% endhighlight %} +
    + +## elsif / else + +

    Adds more conditions within an if or unless block.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + + {% if customer.name == 'kevin' %} + Hey Kevin! + {% elsif customer.name == 'anonymous' %} + Hey Anonymous! + {% else %} + Hi Stranger! + {% endif %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +Hey Anonymous! +{% endraw %}{% endhighlight %} +
    + +## unless + +

    Similar to if, but executes a block of code only if a certain condition is not met.

    + +

    Input

    + +
    +{% highlight html %}{% raw %} + {% unless product.title == 'Awesome Shoes' %} + These shoes are not awesome. + {% endunless %} +{% endraw %}{% endhighlight %} +
    + +

    Output

    + +
    +{% highlight html %}{% raw %} +These shoes are not awesome. +{% endraw %}{% endhighlight %} +
    + +This would be the equivalent of doing the following: + +
    +{% highlight html %}{% raw %} + {% if product.title != 'Awesome Shoes' %} + These shoes are not awesome. + {% endif %} +{% endraw %}{% endhighlight %} +
    diff --git a/_docs/tags/iteration.md b/tags/iteration.md similarity index 100% rename from _docs/tags/iteration.md rename to tags/iteration.md diff --git a/_docs/tags/theme.md b/tags/theme.md similarity index 100% rename from _docs/tags/theme.md rename to tags/theme.md diff --git a/_docs/tags/variable.md b/tags/variable.md similarity index 100% rename from _docs/tags/variable.md rename to tags/variable.md From 1504e5ad89f6d3126209aed2486c2247b6ed9760 Mon Sep 17 00:00:00 2001 From: Tetsuro Date: Fri, 4 Dec 2015 19:51:46 -0500 Subject: [PATCH 57/78] Updating CSS for sidebar --- _layouts/default.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_layouts/default.html b/_layouts/default.html index 0be6b65..c1ece51 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -61,8 +61,9 @@