Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2d9791a9b | ||
|
|
0609e16b19 | ||
|
|
1ba85c51b0 | ||
|
|
77c40093a4 | ||
|
|
c30b2fc60b | ||
|
|
b100809c1e | ||
|
|
ba37d523d3 | ||
|
|
7eb00bbd61 | ||
|
|
973520759c | ||
|
|
6101e81d55 | ||
|
|
8d918dadc4 | ||
|
|
33ad934f17 | ||
|
|
87731836ee | ||
|
|
634d2884a2 | ||
|
|
cd896b15d8 | ||
|
|
e9137e591b | ||
|
|
79a8beb61b | ||
|
|
7b3ddfefdf | ||
|
|
1fcda6f988 | ||
|
|
5d022e03d0 | ||
|
|
599712ed58 | ||
|
|
a9cad4f066 | ||
|
|
a612808f2a | ||
|
|
ed7c12b20b | ||
|
|
75b2d514c2 | ||
|
|
01c5700acd | ||
|
|
409d9691b0 | ||
|
|
cb5d8d4ee0 | ||
|
|
1b3cc608bb | ||
|
|
7c2273f23d | ||
|
|
02c109d24f | ||
|
|
da72581be3 | ||
|
|
187c3c38a2 | ||
|
|
28e2885a68 | ||
|
|
281c1288c2 | ||
|
|
c4d14f68f6 | ||
|
|
7f6efbb744 | ||
|
|
696d589fdd | ||
|
|
cb75bc8aed | ||
|
|
f94bc7fbe8 | ||
|
|
0841d49653 | ||
|
|
21a4da0e47 | ||
|
|
fa3647172d | ||
|
|
df2e2c23b3 | ||
|
|
931eedaefa | ||
|
|
f39b15a362 | ||
|
|
19f6d32745 | ||
|
|
7e8700df75 | ||
|
|
2a5cda62b1 | ||
|
|
cc3b21bc86 | ||
|
|
7978376df0 | ||
|
|
1ca7a00d37 | ||
|
|
a4fceb8ac1 | ||
|
|
b291021c2a | ||
|
|
423ba0a18f | ||
|
|
079b3718cb | ||
|
|
f8bb3422ba | ||
|
|
ea5d8fc0b2 | ||
|
|
4196f59c8e | ||
|
|
c4e1cd2e75 | ||
|
|
b6fd84ede1 | ||
|
|
5eefba1bf0 | ||
|
|
95a8c96ce0 | ||
|
|
4a24be73b8 | ||
|
|
6ca184b453 | ||
|
|
a96df5197d | ||
|
|
6d9db31ef0 | ||
|
|
4172237709 | ||
|
|
c36d305fa9 | ||
|
|
41250e7f35 | ||
|
|
cba9e9fbfd | ||
|
|
e09753fa0a | ||
|
|
b4a38ce912 | ||
|
|
3bc95b0343 | ||
|
|
257cc4a7c4 | ||
|
|
47f537b40d | ||
|
|
d535c5d5f6 | ||
|
|
c050f1322d | ||
|
|
d4d716efa3 | ||
|
|
50166ce705 | ||
|
|
d6be62720d | ||
|
|
cf9a908697 | ||
|
|
b111ec17a9 | ||
|
|
9e1a8ec45b | ||
|
|
fc852d3d47 | ||
|
|
7ab03b7192 | ||
|
|
d980884d59 | ||
|
|
061103112e | ||
|
|
e05159c290 | ||
|
|
9529319d78 | ||
|
|
5f3f142c45 | ||
|
|
d9a5efc666 | ||
|
|
61a6ac509a | ||
|
|
869a0e5b73 | ||
|
|
8cc4e0bf48 | ||
|
|
7afdd57c8a | ||
|
|
866fb17d9e | ||
|
|
4b2487722c | ||
|
|
d464128e65 | ||
|
|
f306f11b3f | ||
|
|
181b90e1fb | ||
|
|
fc8ca433c5 | ||
|
|
52f245152d | ||
|
|
9af1e8d548 | ||
|
|
838c9b4788 | ||
|
|
8974732330 | ||
|
|
66db4b92b9 | ||
|
|
fce0c55f2b | ||
|
|
ab09e1bb43 | ||
|
|
cfbec6b90f | ||
|
|
ac929052dd | ||
|
|
6030450ac1 | ||
|
|
7fed4e8eb7 | ||
|
|
5ed73b3f16 | ||
|
|
bf2ac18bcd | ||
|
|
93119a084a | ||
|
|
705c93a08c | ||
|
|
0761cac562 | ||
|
|
05dafce68f | ||
|
|
aeebfaa87c | ||
|
|
3282387b42 | ||
|
|
8d637e0ae3 | ||
|
|
e122e155cc | ||
|
|
ea985a06ec | ||
|
|
3b15297045 | ||
|
|
ab6c416e7e | ||
|
|
9d9e5b7a97 | ||
|
|
2996f08852 | ||
|
|
902f26edb8 | ||
|
|
2ae600eb19 | ||
|
|
370c422a4d | ||
|
|
1f5a89fb9d | ||
|
|
f3fbe28e75 | ||
|
|
4736eb1da0 | ||
|
|
cf604ec33b | ||
|
|
cc2d8ea71d | ||
|
|
a5ca35337b | ||
|
|
3dde1cc729 | ||
|
|
ea6740a5da | ||
|
|
33316e3d25 | ||
|
|
6112dba29e | ||
|
|
fbfc2f9eef | ||
|
|
a3c6a6191f | ||
|
|
d81af1f103 | ||
|
|
e194bc0c7e | ||
|
|
c0cd6d0058 | ||
|
|
2b366ab4e1 | ||
|
|
37aad5d476 | ||
|
|
b8afafb3a2 | ||
|
|
6beaf7099c | ||
|
|
8dcd353e90 | ||
|
|
d5505d2b6f | ||
|
|
84b21b06b7 | ||
|
|
c19db78c5c | ||
|
|
58b8cf8416 | ||
|
|
1570e85fb1 | ||
|
|
7845654225 | ||
|
|
38c2bdbfd8 | ||
|
|
8fc9bccda8 | ||
|
|
93c4fbc4b9 | ||
|
|
d67aa113c8 | ||
|
|
1a2a953dfb | ||
|
|
338df4eb50 | ||
|
|
e0e0fdee4c | ||
|
|
a369b0dc75 | ||
|
|
0883904f95 | ||
|
|
1cc8461f27 | ||
|
|
46c172e041 | ||
|
|
611cecc51a | ||
|
|
b5e1eeb007 | ||
|
|
dc47f82af2 | ||
|
|
f94cbe0296 | ||
|
|
f9132d8998 | ||
|
|
2080469952 | ||
|
|
5d2f34a2d2 | ||
|
|
5e7e15bad9 | ||
|
|
c863ba6e54 | ||
|
|
b814f306d8 | ||
|
|
c4ca06f4b9 | ||
|
|
e8d83de8b7 | ||
|
|
f19e74bc8f | ||
|
|
37da7829cd | ||
|
|
0a9ad5d243 | ||
|
|
d28cb4dea5 | ||
|
|
6c21194c44 | ||
|
|
7bf33e85b9 | ||
|
|
866765b324 | ||
|
|
dddf8656f3 | ||
|
|
4a95a539cb | ||
|
|
9b52f9c61d | ||
|
|
5d5b05d2a2 | ||
|
|
f6ed6f6225 | ||
|
|
c21fa07753 | ||
|
|
3f3145a350 | ||
|
|
12f713677d | ||
|
|
eb1f445050 | ||
|
|
6885a127d7 | ||
|
|
1b311f428f | ||
|
|
78d0b946f7 | ||
|
|
0d87190f36 | ||
|
|
7c863f0094 | ||
|
|
4709e96383 | ||
|
|
0ff9619416 | ||
|
|
38f9861ff2 | ||
|
|
43d05a5718 | ||
|
|
fc193d0b54 | ||
|
|
71f0a2356a | ||
|
|
4a4a2fdbfc | ||
|
|
0e9ebc48cb | ||
|
|
6ed7eab9f8 | ||
|
|
20821e67b0 | ||
|
|
1f4f71636d | ||
|
|
bb39afa125 | ||
|
|
2939d45ecc | ||
|
|
ded8afcc32 | ||
|
|
102cbc8b10 | ||
|
|
46d8cb5efd | ||
|
|
1629f0e4a7 | ||
|
|
0cad75fbb3 | ||
|
|
1509ef7911 | ||
|
|
45c491bec7 | ||
|
|
1cb4f9ebb8 | ||
|
|
d277353c54 | ||
|
|
87c4bbe8be | ||
|
|
ef510063df | ||
|
|
38272fc6b8 | ||
|
|
874326cc41 | ||
|
|
3a632a62e8 | ||
|
|
247bcde42e | ||
|
|
10bc756932 | ||
|
|
3e781220a1 | ||
|
|
0720e42251 | ||
|
|
f1afdf0397 | ||
|
|
1610ed853c | ||
|
|
173f184047 | ||
|
|
91f38f4450 | ||
|
|
192549ef25 | ||
|
|
d59818981b | ||
|
|
46a294b568 | ||
|
|
8e598766f7 | ||
|
|
f372191de5 | ||
|
|
1f5e6609b3 | ||
|
|
bb402eaa46 | ||
|
|
fb0164b0ca | ||
|
|
bc53150b28 | ||
|
|
f9de95a8ad | ||
|
|
3b3905c44f | ||
|
|
edba2c3a88 | ||
|
|
e242554e55 | ||
|
|
709a1e8583 | ||
|
|
1205a8c46c | ||
|
|
67ec264d08 | ||
|
|
13e299a8f3 | ||
|
|
d8be6fd2b5 | ||
|
|
65a3d68dec | ||
|
|
f7a1b1a160 | ||
|
|
cb8cb6f41e | ||
|
|
47a05f3f00 | ||
|
|
6b9afaa8b7 | ||
|
|
15c3abe48b | ||
|
|
4ba7cccdc4 | ||
|
|
e2559db182 | ||
|
|
5a5921474c | ||
|
|
9c318fc3f1 | ||
|
|
b7cc337a77 | ||
|
|
057d3190ea | ||
|
|
f0b979d375 | ||
|
|
3395149c4d | ||
|
|
a7475d3334 | ||
|
|
7a72be67ec | ||
|
|
8b2850c9f9 | ||
|
|
48e2006622 | ||
|
|
100da8b5b2 | ||
|
|
5b4baee3b5 | ||
|
|
822fa4d1f8 | ||
|
|
bf9387c71f | ||
|
|
8eabf8920e | ||
|
|
bb871377bd | ||
|
|
387f8149d6 | ||
|
|
52a791f40b | ||
|
|
97b37ba863 | ||
|
|
5843de91c2 | ||
|
|
c337c7964a | ||
|
|
1d4daaa545 | ||
|
|
1f760c8d1b | ||
|
|
88b80c4f76 | ||
|
|
fe9f90f000 | ||
|
|
031c2aa77e | ||
|
|
3e347970c7 | ||
|
|
984f0dfda7 | ||
|
|
0f2d564837 | ||
|
|
e912ed5b98 | ||
|
|
6d018c1891 | ||
|
|
50b80e95d1 | ||
|
|
8b2837a1bf | ||
|
|
261fb159dd | ||
|
|
2feb3d2ab4 | ||
|
|
160be1dd0b | ||
|
|
8c3fdb2382 | ||
|
|
951b2c7002 | ||
|
|
23447d98ee | ||
|
|
fae4398544 | ||
|
|
71966b688b | ||
|
|
1ef63b55e5 | ||
|
|
b1a5a14173 | ||
|
|
ca6e7e3426 | ||
|
|
bf6bd617e2 | ||
|
|
537d0b28d4 | ||
|
|
cae210c4b9 | ||
|
|
c142f94918 | ||
|
|
d92c75a6b6 | ||
|
|
fc5db3f5d5 | ||
|
|
ab0919cd5c | ||
|
|
4ed938c0ce | ||
|
|
9affa1c82f | ||
|
|
f5f3f2e9d9 | ||
|
|
99ce8ed421 | ||
|
|
0319732b8e | ||
|
|
94dcda2d89 | ||
|
|
8e51d4b8f1 | ||
|
|
7a7428c2f0 | ||
|
|
ede0654d4f | ||
|
|
610e64bb7d | ||
|
|
399cd19472 | ||
|
|
262b6f3c4a | ||
|
|
7b26077a11 | ||
|
|
23349e14f8 | ||
|
|
631db9940c | ||
|
|
cd61120374 | ||
|
|
9de3cade3b | ||
|
|
8ed48c1cd5 | ||
|
|
de3954ac99 | ||
|
|
ec5b255bfb | ||
|
|
63d8d74697 | ||
|
|
0c43a33a3d | ||
|
|
b3410ed8b2 | ||
|
|
69b747474d | ||
|
|
bb01fc8c32 | ||
|
|
55c4f91b8e | ||
|
|
53d4e34ab0 | ||
|
|
47bf229364 | ||
|
|
128977691a | ||
|
|
8494157e64 | ||
|
|
9361c53c43 | ||
|
|
e0099ffa5a | ||
|
|
24999441fc | ||
|
|
a6c6ae1e1c | ||
|
|
e539ccbfbd | ||
|
|
23094d629f | ||
|
|
19372f6470 | ||
|
|
ef361fa174 | ||
|
|
706531b60d | ||
|
|
d4b1eeb6bf |
+22
-10
@@ -2,28 +2,30 @@
|
||||
Before submitting please search open and closed issues at
|
||||
https://github.com/mmistakes/minimal-mistakes/issues to avoid duplication.
|
||||
|
||||
Feel free to use the following as a template and remove or add fields as you see fit. You can convert `[ ]` into `[x]` to check boxes.
|
||||
Feel free to use the following as a template and remove or add fields as you
|
||||
see fit. You can convert `[ ]` into `[x]` completed check boxes.
|
||||
-->
|
||||
|
||||
- [ ] This is a question about using the theme.
|
||||
- [ ] This is a feature request.
|
||||
- [ ] I have updated all gems with `bundle update`.
|
||||
- [ ] I have tested locally with `bundle exec jekyll build`.
|
||||
- [ ] I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
|
||||
- [ ] I believe this to be a bug with the theme.
|
||||
- [ ] I have updated all gems with `bundle update`.
|
||||
- [ ] I have tested locally with `bundle exec jekyll build`.
|
||||
|
||||
---
|
||||
|
||||
## Environment informations
|
||||
|
||||
<!--
|
||||
Please include theme version, `github-pages --version`, and the operating system you are on or tested with.
|
||||
Please include theme version, Jekyll version, whether you are hosting with
|
||||
GitHub Pages, and the operating system you are on or tested with.
|
||||
-->
|
||||
|
||||
- **Minimal Mistakes version:**
|
||||
- **`github-pages` or `jekyll` gem version:**
|
||||
- **Jekyll version:**
|
||||
- **GitHub Pages hosted:** yes/no
|
||||
- **Operating system:**
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Expected behavior
|
||||
@@ -35,11 +37,21 @@
|
||||
## Steps to reproduce the behavior
|
||||
|
||||
<!--
|
||||
Include a link to a public repository or ZIP file so that they can more easily be reproduced. Being able to see your actual files helps troubleshooting as most issues stem from missing YAML Front Matter, a mis-configured `_config.sys` file, or `_posts` content.
|
||||
Include a link to a public repository or ZIP file so that the behavior or bug
|
||||
can easily be reproduced. Being able to see your actual files helps with
|
||||
troubleshooting as most issues stem from invalid/missing YAML Front Matter, a
|
||||
mis-configured _config.sys file, or problematic site content.
|
||||
|
||||
Describe the steps you took for this problem to exist. Such as you cloned the theme, customized `_config.yml`, added your own posts, and started up a Jekyll server locally.
|
||||
Describe the steps you took for this problem to exist. Such as: you cloned the
|
||||
theme, customized _config.yml, added your own posts, and started up a Jekyll
|
||||
server locally.
|
||||
|
||||
If an error occurred on GitHub Pages when pushing, please build locally and provide a complete log by running `bundle exec jekyll --trace --verbose` and including this output in the filed issue.
|
||||
If an error occurred on GitHub Pages when pushing, please test a local version
|
||||
following these setup instructions:
|
||||
https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/
|
||||
|
||||
Then provide a complete log by running `bundle exec jekyll --trace --verbose`
|
||||
and include this output in the filed issue.
|
||||
|
||||
Screenshots can also be included if they help illustrate a behavior.
|
||||
-->
|
||||
@@ -0,0 +1,21 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- "Status: Accepted"
|
||||
- "Status: Under Consideration"
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: "Status: Stale"
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: |
|
||||
This issue has been automatically marked as stale because it has not had recent activity.
|
||||
|
||||
If this is a **bug** and you can still reproduce this error on the `master` branch, please reply with any additional information you have about it in order to keep the issue open.
|
||||
|
||||
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
|
||||
|
||||
This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
+435
-252
File diff suppressed because it is too large
Load Diff
+39
-1
@@ -18,4 +18,42 @@ 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.
|
||||
SOFTWARE.
|
||||
|
||||
Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/)
|
||||
creators Garrett Knoll, Arthur Shlain, and Tracy Tam.
|
||||
Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).
|
||||
|
||||
Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/),
|
||||
Copyright (c) 2017 Dave Gandy.
|
||||
Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL)
|
||||
and [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com).
|
||||
|
||||
Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/),
|
||||
Copyright (c) 2017, Miriam Eric Suzanne.
|
||||
Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause).
|
||||
|
||||
Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/).
|
||||
Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/),
|
||||
Copyright (c) 2013 Dave Rubert and Chris Coyier.
|
||||
FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/).
|
||||
|
||||
Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/),
|
||||
Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com.
|
||||
Magnific Popup is distributed under the terms of the MIT License.
|
||||
|
||||
Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll),
|
||||
Copyright (c) 2017 Karl Swedberg.
|
||||
jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav),
|
||||
Copyright (c) 2015 Luke Jackson.
|
||||
GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array),
|
||||
Copyright (c) 2015 Max White <mushishi78@gmail.com>.
|
||||
Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# [Minimal Mistakes Jekyll Theme](https://mmistakes.github.io/minimal-mistakes/)
|
||||
|
||||
[](https://github.com/mmistakes/minimal-mistakes/releases) [](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE)
|
||||
[](https://github.com/mmistakes/minimal-mistakes/releases) [](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE.txt)
|
||||
|
||||
Minimal Mistakes is a flexible two-column Jekyll theme. Perfect for hosting your personal site, blog, or portfolio on GitHub or self-hosting on your own server. As the name implies --- styling is purposely minimalistic to be enhanced and customized by you :smile:.
|
||||
|
||||
See what's new in the [CHANGELOG](CHANGELOG.md).
|
||||
|
||||
:sparkles: Minimal Mistakes is now available as a [Ruby gem](https://rubygems.org/gems/minimal-mistakes-jekyll). Consult the [Quick-Start Guide](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/) and [this blog post](https://mmistakes.github.io/minimal-mistakes/jekyll/gemified-theme-beta/) to learn how to upgrade.
|
||||
:sparkles: See what's new in the [CHANGELOG](CHANGELOG.md).
|
||||
|
||||
[![Minimal Mistakes live preview][2]][1]
|
||||
|
||||
@@ -17,15 +15,32 @@ See what's new in the [CHANGELOG](CHANGELOG.md).
|
||||
|
||||
## Notable Features
|
||||
|
||||
- "Gemified" for easier install/upgrading
|
||||
- Compatible with Jekyll 3.x and GitHub Pages
|
||||
- Support for Jekyll's built-in Sass/SCSS preprocessor
|
||||
- Several responsive layout options (single, archive index, splash, and paginated home page)
|
||||
- SEO optimized with support for [Twitter Cards](https://dev.twitter.com/cards/overview) and [Open Graph](http://ogp.me/) data
|
||||
- Bundled as a "theme gem" for easier install/upgrading.
|
||||
- Compatible with GitHub Pages.
|
||||
- Support for Jekyll's built-in Sass/SCSS preprocessor.
|
||||
- Nine different skins (color variations).
|
||||
- Several responsive layout options (single, archive index, search, splash, and paginated home page).
|
||||
- Optimized for search engines with support for [Twitter Cards](https://dev.twitter.com/cards/overview) and [Open Graph](http://ogp.me/) data
|
||||
- Optional [header images](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#headers), [custom sidebars](https://mmistakes.github.io/minimal-mistakes/docs/layouts/#sidebars), [table of contents](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#table-of-contents), [galleries](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#gallery), related posts, [breadcrumb links](https://mmistakes.github.io/minimal-mistakes/docs/configuration/#breadcrumb-navigation-beta), [navigation lists](https://mmistakes.github.io/minimal-mistakes/docs/helpers/#navigation-list), and more.
|
||||
- Commenting support (powered by [Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), Google+, [Discourse](https://www.discourse.org/), static-based via [Staticman](https://staticman.net/), and custom).
|
||||
- Commenting support (powered by [Disqus](https://disqus.com/), [Facebook](https://developers.facebook.com/docs/plugins/comments), Google+, [Discourse](https://www.discourse.org/), static-based via [Staticman v1 and v2](https://staticman.net/), and custom).
|
||||
- [Google Analytics](https://www.google.com/analytics/) support.
|
||||
- UI localized text in English (default), Brazilian Portuguese, Chinese, French, German, Italian, Korean, Nepali (Nepalese), Russian, Spanish, and Turkish
|
||||
- UI localized text in English (default), Brazilian Portuguese (Português brasileiro), Chinese, Danish, Dutch, French (Français), German (Deutsch), Greek, Indonesian, Italian (Italiano), Korean, Nepali (Nepalese), Polish, Russian, Spanish (Español), Swedish, Turkish (Türkçe), and Vietnamese.
|
||||
|
||||
## Skins (Color Variations)
|
||||
|
||||
This theme comes in nine different skins (including the default one).
|
||||
|
||||
| `air` | `contrast` | `dark` |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
| `dirt` | `mint` | `sunrise` |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
| `aqua` | `neon` | `plum` |
|
||||
| --- | --- | --- |
|
||||
|  |  |  |
|
||||
|
||||
## Demo Pages
|
||||
|
||||
@@ -37,7 +52,7 @@ See what's new in the [CHANGELOG](CHANGELOG.md).
|
||||
| [Post with a Gallery][gallery-post] | A post showing several images wrapped in `<figure>` elements. |
|
||||
| [Sample Collection Page][sample-collection] | Single page from a collection. |
|
||||
| [Categories Archive][categories-archive] | Posts grouped by category. |
|
||||
| [Tags Archive][tags-archive] | Posts grouped by tags. |
|
||||
| [Tags Archive][tags-archive] | Posts grouped by tag. |
|
||||
|
||||
Additional sample posts are available under [posts archive][year-archive] on the demo site. Source files for these (and the entire demo site) can be found in [`/docs`](docs).
|
||||
|
||||
@@ -50,34 +65,64 @@ Additional sample posts are available under [posts archive][year-archive] on the
|
||||
[tags-archive]: https://mmistakes.github.io/minimal-mistakes/tags/
|
||||
[year-archive]: https://mmistakes.github.io/minimal-mistakes/year-archive/
|
||||
|
||||
## Usage
|
||||
## Installation
|
||||
|
||||
For detailed instructions on how to configure, customize, add content, and more read the [theme's documentation](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/).
|
||||
There are three ways to install the theme: as a Ruby gem (for self-hosted sites), as a Ruby gem + jekyll-remote-theme plugin (GitHub Pages hosted sites), or forking/directly copying all of the theme files into your project.
|
||||
|
||||
**Note:** Gem version of the theme requires Jekyll v3.3+ and is not currently supported on [GitHub Pages](https://pages.github.com/). You can still use the theme with GitHub Pages, you'll just need to install using the old "[repo fork method](https://mmistakes.github.io/minimal-mistakes/docs/installation/)".
|
||||
### Ruby Gem Method
|
||||
|
||||
## Quick Start
|
||||
1. Install the theme as a Ruby Gem by adding it to your `Gemfile` like so:
|
||||
|
||||
Add this line to your Jekyll site's `Gemfile`:
|
||||
```ruby
|
||||
gem "minimal-mistakes-jekyll"
|
||||
```
|
||||
|
||||
```ruby
|
||||
gem "minimal-mistakes-jekyll"
|
||||
```
|
||||
2. Fetch and update bundled gems by running the following [Bundler](http://bundler.io/) command:
|
||||
|
||||
Add this line to your Jekyll site's `_config.yml` file:
|
||||
```bash
|
||||
bundle
|
||||
```
|
||||
|
||||
```yaml
|
||||
theme: minimal-mistakes-jekyll
|
||||
```
|
||||
3. Set the `theme` in your project's Jekyll `_config.yml` file:
|
||||
|
||||
Then run Bundler to install the theme gem and dependencies:
|
||||
|
||||
```bash
|
||||
bundle install
|
||||
```
|
||||
```yaml
|
||||
theme: minimal-mistakes-jekyll
|
||||
```
|
||||
|
||||
To update the theme run `bundle update`.
|
||||
|
||||
## GitHub Pages Compatible Methods
|
||||
|
||||
1. Create/replace the contents of your `Gemfile` with the following:
|
||||
|
||||
```ruby
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "github-pages", group: :jekyll_plugins
|
||||
gem "jekyll-remote-theme"
|
||||
```
|
||||
|
||||
2. Fetch and update bundled gems by running the following [Bundler](http://bundler.io/) command:
|
||||
|
||||
```bash
|
||||
bundle
|
||||
```
|
||||
|
||||
3. Add `remote_theme: "mmistakes/minimal-mistakes"` to your `_config.yml` file.
|
||||
|
||||
4. Add `jekyll-remote-theme` to the `plugins` (previously gems) array in your `_config.yml` file:
|
||||
|
||||
```yaml
|
||||
plugins:
|
||||
- jekyll-remote-theme
|
||||
```
|
||||
|
||||
**Note:** [jekyll-remote-theme](https://github.com/benbalter/jekyll-remote-theme) is currently in beta on GitHub Pages. In my tests it works as advertised, with the occasional failure due to missing `_includes` and `_layouts` --- your results may vary.
|
||||
|
||||
## Usage
|
||||
|
||||
For detailed instructions on how to configure, customize, add/migrate content, and more read the [theme's documentation](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/).
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
@@ -93,8 +138,8 @@ This goes for author sidebar links and "share button" additions -- I have no int
|
||||
When submitting a pull request:
|
||||
|
||||
1. Clone the repo.
|
||||
2. Create a branch off of `master` and give it a meaningful name (e.g. `my-awesome-new-feature`) and describe the feature or fix.
|
||||
3. Open a pull request on GitHub.
|
||||
2. Create a branch off of `master` and give it a meaningful name (e.g. `my-awesome-new-feature`).
|
||||
3. Open a pull request on GitHub and describe the feature or fix.
|
||||
|
||||
Theme documentation and demo pages can be found in the [`/docs`](docs) if submitting improvements, typo corrections, etc.
|
||||
|
||||
@@ -158,3 +203,45 @@ 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.
|
||||
|
||||
Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/)
|
||||
creators Garrett Knoll, Arthur Shlain, and tracy tam.
|
||||
Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).
|
||||
|
||||
Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/),
|
||||
Copyright (c) 2017 Dave Gandy.
|
||||
Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL)
|
||||
and [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com).
|
||||
|
||||
Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/),
|
||||
Copyright (c) 2017, Miriam Eric Suzanne.
|
||||
Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause).
|
||||
|
||||
Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/).
|
||||
Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/),
|
||||
Copyright (c) 2013 Dave Rubert and Chris Coyier.
|
||||
FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/).
|
||||
|
||||
Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/),
|
||||
Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com.
|
||||
Magnific Popup is distributed under the terms of the MIT License.
|
||||
|
||||
Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll),
|
||||
Copyright (c) 2017 Karl Swedberg.
|
||||
jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav),
|
||||
Copyright (c) 2015 Luke Jackson.
|
||||
GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array),
|
||||
Copyright (c) 2015 Max White <mushishi78@gmail.com>.
|
||||
Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
Minimal Mistakes incorporates [@allejo's Pure Liquid Jekyll Table of Contents](https://allejo.io/blog/a-jekyll-toc-in-liquid-only/),
|
||||
Copyright (c) 2017 Vladimir Jimenez.
|
||||
Pure Liquid Jekyll Table of Contents is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
||||
|
||||
@@ -44,6 +44,7 @@ task :preview do
|
||||
|
||||
ENV["LISTEN_GEM_DEBUGGING"] = "1"
|
||||
listener = Listen.to(
|
||||
base.join("_data"),
|
||||
base.join("_includes"),
|
||||
base.join("_layouts"),
|
||||
base.join("_sass"),
|
||||
|
||||
+27
-20
@@ -5,6 +5,8 @@
|
||||
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
||||
# `jekyll serve`. If you change this file, please restart the server process.
|
||||
|
||||
minimal_mistakes_skin : "default" # "air", "aqua", "contrast", "dark", "dirt", "neon", "mint", "plum", "sunrise"
|
||||
|
||||
# Site Settings
|
||||
locale : "en"
|
||||
title : "Site Title"
|
||||
@@ -18,7 +20,7 @@ teaser : # path of fallback teaser image, e.g. "/assets/images
|
||||
# breadcrumbs : false # true, false (default)
|
||||
words_per_minute : 200
|
||||
comments:
|
||||
provider : # false (default), "disqus", "discourse", "facebook", "google-plus", "staticman", "custom"
|
||||
provider : # false (default), "disqus", "discourse", "facebook", "google-plus", "staticman", "staticman_v2" "custom"
|
||||
disqus:
|
||||
shortname : # https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname-
|
||||
discourse:
|
||||
@@ -29,29 +31,33 @@ comments:
|
||||
num_posts : # 5 (default)
|
||||
colorscheme : # "light" (default), "dark"
|
||||
staticman:
|
||||
allowedFields : ['name', 'email', 'url', 'message']
|
||||
branch : "master"
|
||||
commitMessage : "New comment."
|
||||
filename : comment-{@timestamp}
|
||||
format : "yml"
|
||||
moderation : true
|
||||
path : "docs/_data/comments/{options.slug}" # "/_data/comments/{options.slug}" (default)
|
||||
requiredFields : ['name', 'email', 'message']
|
||||
allowedFields : # ['name', 'email', 'url', 'message']
|
||||
branch : # "master"
|
||||
commitMessage : # "New comment."
|
||||
filename : # comment-{@timestamp}
|
||||
format : # "yml"
|
||||
moderation : # true
|
||||
path : # "/_data/comments/{options.slug}" (default)
|
||||
requiredFields : # ['name', 'email', 'message']
|
||||
transforms:
|
||||
email : "md5"
|
||||
email : # "md5"
|
||||
generatedFields:
|
||||
date:
|
||||
type : "date"
|
||||
type : # "date"
|
||||
options:
|
||||
format : "iso8601" # "iso8601" (default), "timestamp-seconds", "timestamp-milliseconds"
|
||||
format : # "iso8601" (default), "timestamp-seconds", "timestamp-milliseconds"
|
||||
reCaptcha:
|
||||
siteKey :
|
||||
secret :
|
||||
atom_feed:
|
||||
path : # blank (default) uses feed.xml
|
||||
search : # true, false (default)
|
||||
|
||||
# SEO Related
|
||||
google_site_verification :
|
||||
bing_site_verification :
|
||||
alexa_site_verification :
|
||||
yandex_site_verification :
|
||||
naver_site_verification :
|
||||
|
||||
# Social Sharing
|
||||
twitter:
|
||||
@@ -90,15 +96,16 @@ author:
|
||||
facebook :
|
||||
foursquare :
|
||||
github :
|
||||
gitlab :
|
||||
google_plus :
|
||||
keybase :
|
||||
instagram :
|
||||
lastfm :
|
||||
linkedin :
|
||||
linkedin : # "john-doe-12345678" (the last part of your profile url, e.g. https://www.linkedin.com/in/john-doe-12345678)
|
||||
pinterest :
|
||||
soundcloud :
|
||||
stackoverflow : # "123456/username" (the last part of your profile url, e.g. http://stackoverflow.com/users/123456/username)
|
||||
steam :
|
||||
stackoverflow : # "123456/username" (the last part of your profile url, e.g. https://stackoverflow.com/users/123456/username)
|
||||
steam : # "steamId" (the last part of your profile url, e.g. https://steamcommunity.com/id/steamId/)
|
||||
tumblr :
|
||||
twitter :
|
||||
vine :
|
||||
@@ -174,11 +181,11 @@ sass:
|
||||
permalink: /:categories/:title/
|
||||
paginate: 5 # amount of posts to show
|
||||
paginate_path: /page:num/
|
||||
timezone: # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
|
||||
# Plugins
|
||||
gems:
|
||||
# Plugins (previously gems:)
|
||||
plugins:
|
||||
- jekyll-paginate
|
||||
- jekyll-sitemap
|
||||
- jekyll-gist
|
||||
@@ -243,4 +250,4 @@ defaults:
|
||||
read_time: true
|
||||
comments: # true
|
||||
share: true
|
||||
related: true
|
||||
related: true
|
||||
|
||||
+345
-39
@@ -40,6 +40,8 @@ en: &DEFAULT_EN
|
||||
comment_success_msg : "Thanks for your comment! It will show on the site once it has been approved."
|
||||
comment_error_msg : "Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again."
|
||||
loading_label : "Loading..."
|
||||
search_placeholder_text : "Enter your search term..."
|
||||
results_found : "Result(s) found"
|
||||
en-US:
|
||||
<<: *DEFAULT_EN
|
||||
en-CA:
|
||||
@@ -78,17 +80,17 @@ es: &DEFAULT_ES
|
||||
email_label : "Email"
|
||||
recent_posts : "Entradas recientes"
|
||||
undefined_wpm : "Parametro words_per_minute (Palabras por minuto) no definido en _config.yml"
|
||||
comment_form_info :
|
||||
comment_form_comment_label :
|
||||
comment_form_md_info :
|
||||
comment_form_name_label :
|
||||
comment_form_email_label :
|
||||
comment_form_website_label :
|
||||
comment_btn_submit :
|
||||
comment_btn_submitted :
|
||||
comment_success_msg :
|
||||
comment_error_msg :
|
||||
loading_label :
|
||||
comment_form_info : "Su dirección de correo no será publicada. Se han resaltado los campos requeridos"
|
||||
comment_form_comment_label : "Comentario"
|
||||
comment_form_md_info : "Markdown está soportado."
|
||||
comment_form_name_label : "Nombre"
|
||||
comment_form_email_label : "Dirección de E-mail"
|
||||
comment_form_website_label : "Sitio web (opcional)"
|
||||
comment_btn_submit : "Enviar Commentario"
|
||||
comment_btn_submitted : "Enviado"
|
||||
comment_success_msg : "Gracias por su comentario!, Este se visualizará en el sitio una vez haya sido aprobado"
|
||||
comment_error_msg : "Lo sentimos, ha ocurrido un error al enviar su comentario. Por favor asegurese que todos los campos han sido diligenciados e intente de nuevo"
|
||||
loading_label : "Cargando..."
|
||||
es-ES:
|
||||
<<: *DEFAULT_ES
|
||||
es-CO:
|
||||
@@ -186,7 +188,6 @@ tr-TR:
|
||||
<<: *DEFAULT_TR
|
||||
|
||||
# Portuguese
|
||||
# -----------------
|
||||
pt: &DEFAULT_PT
|
||||
page : "Página"
|
||||
pagination_previous : "Anterior"
|
||||
@@ -225,6 +226,9 @@ pt: &DEFAULT_PT
|
||||
comment_success_msg : "Obrigado pelo seu comentário! Será visível no site logo que aprovado."
|
||||
comment_error_msg : "Lamento, ocorreu um erro na sua submissão. Por favor verifique se todos os campos obrigatórios estão corretamente preenchidos e tente novamente."
|
||||
loading_label : "A carregar..."
|
||||
pt-PT:
|
||||
<<: *DEFAULT_PT
|
||||
|
||||
# Brazilian Portuguese
|
||||
pt-BR:
|
||||
page : "Página"
|
||||
@@ -235,8 +239,8 @@ pt-BR:
|
||||
menu_label :
|
||||
toc_label : "Nesta página"
|
||||
ext_link_label : "Link direto"
|
||||
less_than : "meno que"
|
||||
minute_read : "minutos de leitura"
|
||||
less_than : "menos que"
|
||||
minute_read : "minuto(s) de leitura"
|
||||
share_on_label : "Compartilhe em"
|
||||
meta_label :
|
||||
tags_label : "Tags:"
|
||||
@@ -244,28 +248,26 @@ pt-BR:
|
||||
date_label : "Atualizado em:"
|
||||
comments_label : "Deixe um comentário"
|
||||
comments_title :
|
||||
more_label : "Aprenda Mais"
|
||||
related_label : "Você Talvez Goste Também"
|
||||
more_label : "Aprenda mais"
|
||||
related_label : "Talvez você goste também"
|
||||
follow_label : "Acompanhe em"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Feito com"
|
||||
website_label : "Site"
|
||||
email_label : "Email"
|
||||
recent_posts : "Postagens recentes"
|
||||
undefined_wpm : "Parâmetro indefinido em word_per_minute no _config.yml"
|
||||
comment_form_info :
|
||||
comment_form_comment_label :
|
||||
comment_form_md_info :
|
||||
comment_form_name_label :
|
||||
comment_form_email_label :
|
||||
comment_form_website_label :
|
||||
comment_btn_submit :
|
||||
comment_btn_submitted :
|
||||
comment_success_msg :
|
||||
comment_error_msg :
|
||||
loading_label :
|
||||
pt-PT:
|
||||
<<: *DEFAULT_PT
|
||||
undefined_wpm : "Parâmetro indefinido em words_per_minute no _config.yml"
|
||||
comment_form_info : "Seu email não será publicado. Os campos obrigatórios estão marcados"
|
||||
comment_form_comment_label : "Comentário"
|
||||
comment_form_md_info : "Markdown é suportado."
|
||||
comment_form_name_label : "Nome"
|
||||
comment_form_email_label : "Email"
|
||||
comment_form_website_label : "Site (opcional)"
|
||||
comment_btn_submit : "Enviar Comentário"
|
||||
comment_btn_submitted : "Enviado"
|
||||
comment_success_msg : "Obrigado pelo seu comentário! Ele aparecerá no site assim que for aprovado."
|
||||
comment_error_msg : "Desculpe, ocorreu um erro no envio. Por favor verifique se todos os campos obrigatórios foram preenchidos e tente novamente."
|
||||
loading_label : "Carregando..."
|
||||
|
||||
# Italian
|
||||
# -----------------
|
||||
@@ -312,7 +314,7 @@ it-IT:
|
||||
|
||||
# Chinese (zh-CN Chinese - China)
|
||||
# -----------------
|
||||
zh: &DEFAULT_ZH
|
||||
zh: &DEFAULT_ZH_HANS
|
||||
page : "页面"
|
||||
pagination_previous : "向前"
|
||||
pagination_next : "向后"
|
||||
@@ -322,12 +324,12 @@ zh: &DEFAULT_ZH
|
||||
toc_label : "在本页上"
|
||||
ext_link_label : "直接链接"
|
||||
less_than : "少于"
|
||||
minute_read : "分钟 阅读"
|
||||
minute_read : "分钟读完"
|
||||
share_on_label : "分享"
|
||||
meta_label :
|
||||
tags_label : "标签:"
|
||||
categories_label : "分类:"
|
||||
date_label : "最新的:"
|
||||
date_label : "更新时间:"
|
||||
comments_label : "留下评论"
|
||||
comments_title : "评论"
|
||||
more_label : "了解更多"
|
||||
@@ -351,13 +353,11 @@ zh: &DEFAULT_ZH
|
||||
comment_error_msg : "很抱歉,您的提交存在错误。请确保所有必填字段都已填写正确,然后再试一次。"
|
||||
loading_label : "正在加载..."
|
||||
zh-CN:
|
||||
<<: *DEFAULT_ZH
|
||||
zh-HK:
|
||||
<<: *DEFAULT_ZH
|
||||
<<: *DEFAULT_ZH_HANS
|
||||
zh-SG:
|
||||
<<: *DEFAULT_ZH
|
||||
<<: *DEFAULT_ZH_HANS
|
||||
# Taiwan (Traditional Chinese)
|
||||
zh-TW:
|
||||
zh-TW: &DEFAULT_ZH_HANT
|
||||
page : "頁面"
|
||||
pagination_previous : "較舊"
|
||||
pagination_next : "較新"
|
||||
@@ -395,7 +395,8 @@ zh-TW:
|
||||
comment_success_msg : "感謝您的留言! 審核後將會顯示在站上。"
|
||||
comment_error_msg : "抱歉,部份資料輸入有問題。請確認資料填寫正確後再試一次。"
|
||||
loading_label : "載入中..."
|
||||
|
||||
zh-HK:
|
||||
<<: *DEFAULT_ZH_HANT
|
||||
# German / Deutsch
|
||||
# -----------------
|
||||
de: &DEFAULT_DE
|
||||
@@ -621,6 +622,311 @@ lt: &DEFAULT_LT
|
||||
lt-LT:
|
||||
<<: *DEFAULT_LT
|
||||
|
||||
# Greek
|
||||
# --------------
|
||||
gr: &DEFAULT_GR
|
||||
page : "Σελίδα"
|
||||
pagination_previous : "Προηγούμενo"
|
||||
pagination_next : "Επόμενo"
|
||||
breadcrumb_home_label : "Αρχική"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Μενού"
|
||||
toc_label : "Περιεχόμενα"
|
||||
ext_link_label : "Εξωτερικός Σύνδεσμος"
|
||||
less_than : "Λιγότερο από"
|
||||
minute_read : "λεπτά ανάγνωσης"
|
||||
share_on_label : "Μοιραστείτε το"
|
||||
meta_label :
|
||||
tags_label : "Ετικέτες:"
|
||||
categories_label : "Κατηγορίες:"
|
||||
date_label : "Ενημερώθηκε:"
|
||||
comments_label : "Αφήστε ένα σχόλιο"
|
||||
comments_title : "Σχόλια"
|
||||
more_label : "Διάβαστε περισσότερα"
|
||||
related_label : "Σχετικές αναρτήσεις"
|
||||
follow_label : "Ακολουθήστε:"
|
||||
feed_label : "RSS Feed"
|
||||
powered_by : "Δημιουργήθηκε με"
|
||||
website_label : "Ιστοσελίδα"
|
||||
email_label : "Email"
|
||||
recent_posts : "Τελευταίες αναρτήσεις"
|
||||
undefined_wpm : "Δεν έχει οριστεί η παράμετρος words_per_minute στο αρχείο _config.yml"
|
||||
comment_form_info : "Η διεύθυνση email σας δεν θα δημοσιευθεί. Τα απαιτούμενα πεδία εμφανίζονται με αστερίσκο"
|
||||
comment_form_comment_label : "Σχόλιο"
|
||||
comment_form_md_info : "Το πεδίο υποστηρίζει Markdown."
|
||||
comment_form_name_label : "Όνομα"
|
||||
comment_form_email_label : "Διεύθυνση email"
|
||||
comment_form_website_label : "Ιστοσελίδα (προαιρετικό)"
|
||||
comment_btn_submit : "Υπόβαλε ένα σχόλιο"
|
||||
comment_btn_submitted : "Έχει υποβληθεί"
|
||||
comment_success_msg : "Ευχαριστούμε για το σχόλιό σας! Θα εμφανιστεί στην ιστοσελίδα αφού εγκριθεί."
|
||||
comment_error_msg : "Λυπούμαστε, παρουσιάστηκε σφάλμα με την υποβολή σας. Παρακαλούμε βεβαιωθείτε ότι έχετε όλα τα απαιτούμενα πεδία συμπληρωμένα και δοκιμάστε ξανά."
|
||||
loading_label : "Φόρτωση..."
|
||||
gr-GR:
|
||||
<<: *DEFAULT_GR
|
||||
|
||||
# Swedish
|
||||
# -----------------
|
||||
sv: &DEFAULT_SV
|
||||
page : "Sidan"
|
||||
pagination_previous : "Föregående"
|
||||
pagination_next : "Nästa"
|
||||
breadcrumb_home_label : "Hem"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Meny ridå"
|
||||
toc_label : "På denna sida"
|
||||
ext_link_label : "Direkt länk"
|
||||
less_than : "mindre än"
|
||||
minute_read : "minut läsning"
|
||||
share_on_label : "Dela på"
|
||||
meta_label :
|
||||
tags_label : "Taggar:"
|
||||
categories_label : "Kategorier:"
|
||||
date_label : "Uppdaterades:"
|
||||
comments_label : "Lämna en kommentar"
|
||||
comments_title : "Kommentarer"
|
||||
more_label : "Lär dig mer"
|
||||
related_label : "Du kanske vill även läsa:"
|
||||
follow_label : "Följ:"
|
||||
feed_label : "Flöde"
|
||||
powered_by : "Framställd med"
|
||||
website_label : "Webbsida"
|
||||
email_label : "E-post"
|
||||
recent_posts : "Senaste inlägg"
|
||||
undefined_wpm : "Odefinerade parametrar words_per_minute i _config.yml"
|
||||
comment_form_info : "Din e-post adress kommer inte att publiceras. Obligatoriska fält är markerade."
|
||||
comment_form_comment_label : "Kommentar"
|
||||
comment_form_md_info : "Använd Markdown för text-formateringen."
|
||||
comment_form_name_label : "Namn"
|
||||
comment_form_email_label : "E-post adress"
|
||||
comment_form_website_label : "Webdsida (valfritt)"
|
||||
comment_btn_submit : "Skicka en kommentar"
|
||||
comment_btn_submitted : "Kommentaren har tagits emot"
|
||||
comment_success_msg : "Tack för din kommentar! Den kommer att visas på sidan så fort den har godkännts."
|
||||
comment_error_msg : "Tyvärr det har blivit något fel i en av fälten, se till att du fyller i alla rutor och försök igen."
|
||||
loading_label : "Laddar..."
|
||||
sv-SE:
|
||||
<<: *DEFAULT_SV
|
||||
sv-FI:
|
||||
<<: *DEFAULT_SV
|
||||
|
||||
# Dutch
|
||||
# -----------------
|
||||
nl: &DEFAULT_NL
|
||||
page : "Pagina"
|
||||
pagination_previous : "Vorige"
|
||||
pagination_next : "Volgende"
|
||||
breadcrumb_home_label : "Home"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Wissel Menu"
|
||||
toc_label : "Op deze pagina"
|
||||
ext_link_label : "Directe Link"
|
||||
less_than : "minder dan"
|
||||
minute_read : "minuut gelezen"
|
||||
share_on_label : "Deel op"
|
||||
meta_label :
|
||||
tags_label : "Labels:"
|
||||
categories_label : "Categorieën:"
|
||||
date_label : "Bijgewerkt:"
|
||||
comments_label : "Laat een reactie achter"
|
||||
comments_title : "Commentaren"
|
||||
more_label : "Meer informatie"
|
||||
related_label : "Bekijk ook eens"
|
||||
follow_label : "Volg:"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Aangedreven door"
|
||||
website_label : "Website"
|
||||
email_label : "Email"
|
||||
recent_posts : "Recente berichten"
|
||||
undefined_wpm : "Niet gedefinieerde parameter words_per_minute bij _config.yml"
|
||||
comment_form_info : "Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd"
|
||||
comment_form_comment_label : "Commentaar"
|
||||
comment_form_md_info : "Markdown wordt ondersteund."
|
||||
comment_form_name_label : "Naam"
|
||||
comment_form_email_label : "E-mailadres"
|
||||
comment_form_website_label : "Website (optioneel)"
|
||||
comment_btn_submit : "Commentaar toevoegen"
|
||||
comment_btn_submitted : "Toegevoegd"
|
||||
comment_success_msg : "Bedankt voor uw reactie! Het zal op de site worden weergegeven zodra het is goedgekeurd."
|
||||
comment_error_msg : "Sorry, er is een fout opgetreden bij uw inzending. Zorg ervoor dat alle vereiste velden zijn voltooid en probeer het opnieuw."
|
||||
loading_label : "Laden..."
|
||||
nl-BE:
|
||||
<<: *DEFAULT_NL
|
||||
nl-NL:
|
||||
<<: *DEFAULT_NL
|
||||
|
||||
# Indonesian
|
||||
# -----------------
|
||||
id: &DEFAULT_ID
|
||||
page : "Halaman"
|
||||
pagination_previous : "Kembali"
|
||||
pagination_next : "Maju"
|
||||
breadcrumb_home_label : "Home"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Menu Toggle"
|
||||
toc_label : "Pada Halaman Ini"
|
||||
ext_link_label : "Link langsung"
|
||||
less_than : "Kurang dari"
|
||||
minute_read : "Waktu baca"
|
||||
share_on_label : "Berbagi di"
|
||||
meta_label :
|
||||
tags_label : "Golongan:"
|
||||
categories_label : "Kategori:"
|
||||
date_label : "Diupdate:"
|
||||
comments_label : "Tinggalkan komentar"
|
||||
comments_title : "Komentar"
|
||||
more_label : "Pelajari lagi"
|
||||
related_label : "Anda juga akan suka"
|
||||
follow_label : "Ikuti:"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Didukung oleh"
|
||||
website_label : "Website"
|
||||
email_label : "Email"
|
||||
recent_posts : "Posting terbaru"
|
||||
undefined_wpm : "Parameter terdeskripsi words_per_minute di _config.yml"
|
||||
comment_form_info : "Email Anda tidak akan dipublish. Kolom yang diperlukan ditandai"
|
||||
comment_form_comment_label : "Komentar"
|
||||
comment_form_md_info : "Markdown disupport."
|
||||
comment_form_name_label : "Nama"
|
||||
comment_form_email_label : "Alamat email"
|
||||
comment_form_website_label : "Website (opsional)"
|
||||
comment_btn_submit : "Submit Komentar"
|
||||
comment_btn_submitted : "Telah disubmit"
|
||||
comment_success_msg : "Terimakasih atas komentar Anda! Komentar ini akan tampil setelah disetujui."
|
||||
comment_error_msg : "Maaf, ada kesalahan pada submisi Anda. Pastikan seluruh kolom sudah dilengkapi dan coba kembali."
|
||||
loading_label : "Sedang meload..."
|
||||
id-ID:
|
||||
<<: *DEFAULT_ID
|
||||
|
||||
# Vietnamese
|
||||
# -----------------
|
||||
vi: &DEFAULT_VI
|
||||
page : "Trang"
|
||||
pagination_previous : "Trước"
|
||||
pagination_next : "Sau"
|
||||
breadcrumb_home_label : "Trang chủ"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Menu"
|
||||
toc_label : "Tại trang này"
|
||||
ext_link_label : "Đường dẫn trực tiếp"
|
||||
less_than : "nhỏ hơn"
|
||||
minute_read : "phút đọc"
|
||||
share_on_label : "Chia sẻ tại"
|
||||
meta_label :
|
||||
tags_label : "Nhãn:"
|
||||
categories_label : "Chủ đề:"
|
||||
date_label : "Cập nhật:"
|
||||
comments_label : "Để lại bình luận"
|
||||
comments_title : "Bình luận"
|
||||
more_label : "Mở rộng"
|
||||
related_label : "Có thể bạn cũng thích"
|
||||
follow_label : "Theo dõi:"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Được hỗ trợ bởi"
|
||||
website_label : "Website"
|
||||
email_label : "Email"
|
||||
recent_posts : "Bài viết mới"
|
||||
undefined_wpm : "Chưa định nghĩa thông số words_per_minute tại _config.yml"
|
||||
comment_form_info : "Email của bạn sẽ được giữ bí mật. Các phần bắt buộc được đánh dấu."
|
||||
comment_form_comment_label : "Bình luận"
|
||||
comment_form_md_info : "Hỗ trợ Markdown."
|
||||
comment_form_name_label : "Tên"
|
||||
comment_form_email_label : "Địa chỉ email"
|
||||
comment_form_website_label : "Website (không bắt buộc)"
|
||||
comment_btn_submit : "Gửi bình luận"
|
||||
comment_btn_submitted : "Đã được gửi"
|
||||
comment_success_msg : "Cảm ơn bạn đã bình luận! Bình luận sẽ xuất hiện sau khi được duyệt."
|
||||
comment_error_msg : "Rất tiếc, có lỗi trong việc gửi bình luận. Hãy đảm bảo toàn bộ các phần bắt buộc đã được điền đầy đủ và thử lại."
|
||||
loading_label : "Đang tải..."
|
||||
vi-VN:
|
||||
<<: *DEFAULT_VI
|
||||
|
||||
# Danish
|
||||
# ------
|
||||
da: &DEFAULT_DA
|
||||
page : "Side"
|
||||
pagination_previous : "Forrige"
|
||||
pagination_next : "Næste"
|
||||
breadcrumb_home_label : "Home"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Vis/skjul menu"
|
||||
toc_label : "På denne side"
|
||||
ext_link_label : "Direkte link"
|
||||
less_than : "mindre end"
|
||||
minute_read : "minutters læsning"
|
||||
share_on_label : "Del på"
|
||||
meta_label :
|
||||
tags_label : "Nøgleord:"
|
||||
categories_label : "Kategorier:"
|
||||
date_label : "Opdateret:"
|
||||
comments_label : "Skriv en kommentar"
|
||||
comments_title : "Kommentarer"
|
||||
more_label : "Lær mere"
|
||||
related_label : "Måske kan du også lide"
|
||||
follow_label : "Følg:"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Drives af"
|
||||
website_label : "Website"
|
||||
email_label : "E-mail"
|
||||
recent_posts : "Seneste indlæg"
|
||||
undefined_wpm : "Parameteren words_per_minute er ikke defineret i _config.yml"
|
||||
comment_form_info : "Din e-mail bliver ikke offentliggjort. Obligatoriske felter er markeret"
|
||||
comment_form_comment_label : "Kommentar"
|
||||
comment_form_md_info : "Markdown er understøttet."
|
||||
comment_form_name_label : "Navn"
|
||||
comment_form_email_label : "E-mail"
|
||||
comment_form_website_label : "Website (frivillig)"
|
||||
comment_btn_submit : "Send kommentar"
|
||||
comment_btn_submitted : "Sendt"
|
||||
comment_success_msg : "Tak for din kommentar! Den bliver vist på siden, så snart den er godkendt."
|
||||
comment_error_msg : "Desværre skete der en fejl. Prøv igen, mens du sørger for at alle obligatoriske felter er udfyldt."
|
||||
loading_label : "Indlæser..."
|
||||
da-DK:
|
||||
<<: *DEFAULT_DA
|
||||
|
||||
# Polish
|
||||
# ------
|
||||
pl: &DEFAULT_PL
|
||||
page : "Strona"
|
||||
pagination_previous : "Poprzednia"
|
||||
pagination_next : "Następna"
|
||||
breadcrumb_home_label : "Strona główna"
|
||||
breadcrumb_separator : "/"
|
||||
menu_label : "Przełącz menu"
|
||||
toc_label : "Spis treści"
|
||||
ext_link_label : "Link bezpośredni"
|
||||
less_than : "mniej niż"
|
||||
minute_read : "minut(y)"
|
||||
share_on_label : "Udostępnij"
|
||||
meta_label :
|
||||
tags_label : "Tagi:"
|
||||
categories_label : "Kategorie:"
|
||||
date_label : "Ostatnia aktualizacja:"
|
||||
comments_label : "Zostaw komentarz"
|
||||
comments_title : "Komentarze"
|
||||
more_label : "Dowiedz się więcej"
|
||||
related_label : "Także może Ci się spodobać"
|
||||
follow_label : "Śledź:"
|
||||
feed_label : "Feed"
|
||||
powered_by : "Powstało dzięki"
|
||||
website_label : "Strona"
|
||||
email_label : "Email"
|
||||
recent_posts : "Najnowsze wpisy"
|
||||
undefined_wpm : "Parametr words_per_minute nie został zdefiniowany w _config.yml."
|
||||
comment_form_info : "Twój adres email nie będzie udostępiony. Wymagane pola są oznaczone."
|
||||
comment_form_comment_label : "Skomentuj"
|
||||
comment_form_md_info : "Markdown jest wspierany"
|
||||
comment_form_name_label : "Imię"
|
||||
comment_form_email_label : "Adres email"
|
||||
comment_form_website_label : "Strona www (opcjonalna)"
|
||||
comment_btn_submit : "Skomentuj"
|
||||
comment_btn_submitted : "Komentarz dodany"
|
||||
comment_success_msg : "Dziękuję za Twój komentarz! Zostanie dodany po akceptacji."
|
||||
comment_error_msg : "Niestety wystąpił błąd. Proszę upewnij się, że wszystkie wymagane pola zostały wypełnione i spróbuj ponownie."
|
||||
loading_label : "Trwa ładowanie strony..."
|
||||
da-PL:
|
||||
<<: *DEFAULT_PL
|
||||
|
||||
# Another locale
|
||||
# --------------
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% if site.analytics.provider and page.analytics != false %}
|
||||
{% if jekyll.environment == 'production' and site.analytics.provider and page.analytics != false %}
|
||||
|
||||
{% case site.analytics.provider %}
|
||||
{% when "google" %}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
{% if author.google_plus %}
|
||||
<li>
|
||||
<a href="https://plus.google.com/+{{ author.google_plus }}" itemprop="sameAs">
|
||||
<a href="https://plus.google.com/{{ author.google_plus }}" itemprop="sameAs">
|
||||
<i class="fa fa-fw fa-google-plus-square" aria-hidden="true"></i> Google+
|
||||
</a>
|
||||
</li>
|
||||
@@ -131,10 +131,18 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if author.gitlab %}
|
||||
<li>
|
||||
<a href="https://gitlab.com/{{ author.gitlab }}" itemprop="sameAs">
|
||||
<i class="fa fa-fw fa-gitlab" aria-hidden="true"></i> GitLab
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if author.stackoverflow %}
|
||||
<li>
|
||||
<a href="https://www.stackoverflow.com/users/{{ author.stackoverflow }}" itemprop="sameAs">
|
||||
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stackoverflow
|
||||
<i class="fa fa-fw fa-stack-overflow" aria-hidden="true"></i> Stack Overflow
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
@@ -198,7 +206,7 @@
|
||||
{% if author.soundcloud %}
|
||||
<li>
|
||||
<a href="https://soundcloud.com/{{ author.soundcloud }}" itemprop="sameAs">
|
||||
<i class="fa fa-fw fa-soundcloud" aria-hidden="true"></i> Soundcloud
|
||||
<i class="fa fa-fw fa-soundcloud" aria-hidden="true"></i> SoundCloud
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% case site.categories.type %}
|
||||
{% case site.category_archive.type %}
|
||||
{% when "liquid" %}
|
||||
{% assign path_type = "#" %}
|
||||
{% when "jekyll-archives" %}
|
||||
@@ -9,7 +9,7 @@
|
||||
{% assign path_type = nil %}
|
||||
{% assign crumb_path = '/' %}
|
||||
{% else %}
|
||||
{% assign crumb_path = site.categories.path %}
|
||||
{% assign crumb_path = site.category_archive.path %}
|
||||
{% endif %}
|
||||
|
||||
<nav class="breadcrumbs">
|
||||
@@ -36,4 +36,4 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
</nav>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<!--[if lt IE 9]>
|
||||
<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
|
||||
<![endif]-->
|
||||
<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
|
||||
<![endif]-->
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
||||
{% endcomment %}
|
||||
{% capture page_categories %}{% for category in page.categories %}{{ category | downcase }}#{{ category }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
||||
{% assign category_hashes = (page_categories | split: ',' | sort:0) %}
|
||||
{% assign category_hashes = page_categories | split: ',' | sort %}
|
||||
|
||||
<p class="page__taxonomy">
|
||||
<strong><i class="fa fa-fw fa-folder-open" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].categories_label | default: "Categories:" }} </strong>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<article id="comment{{ include.index }}" class="js-comment comment" itemprop="comment" itemscope itemtype="http://schema.org/Comment">
|
||||
<div class="comment__avatar-wrapper">
|
||||
<img class="comment__avatar" src="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=80">
|
||||
<img class="comment__avatar" src="https://www.gravatar.com/avatar/{{ include.email }}?d=mm&s=80" alt="{{ include.name }}">
|
||||
</div>
|
||||
<div class="comment__content-wrapper">
|
||||
<h3 class="comment__author" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
@@ -19,4 +19,4 @@
|
||||
</p>
|
||||
<div itemprop="text">{{ include.message | markdownify }}</div>
|
||||
</div>
|
||||
</article>
|
||||
</article>
|
||||
|
||||
@@ -1,22 +1,15 @@
|
||||
{% if site.comments.disqus.shortname %}
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '{{ site.comments.disqus.shortname }}';
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
<script>
|
||||
var disqus_config = function () {
|
||||
this.page.url = "{{ page.url | absolute_url }}"; // Replace PAGE_URL with your page's canonical URL variable
|
||||
this.page.identifier = "{{ page.id }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
||||
};
|
||||
(function() { // DON'T EDIT BELOW THIS LINE
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
{% endif %}
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
{% if site.comments.provider and page.comments %}
|
||||
|
||||
{% case site.comments.provider %}
|
||||
{% when "disqus" %}
|
||||
{% include /comments-providers/disqus.html %}
|
||||
{% when "discourse" %}
|
||||
{% include /comments-providers/discourse.html %}
|
||||
{% when "facebook" %}
|
||||
{% include /comments-providers/facebook.html %}
|
||||
{% when "google-plus" %}
|
||||
{% include /comments-providers/google-plus.html %}
|
||||
{% when "staticman" %}
|
||||
{% include /comments-providers/staticman.html %}
|
||||
{% when "custom" %}
|
||||
{% include /comments-providers/custom.html %}
|
||||
{% when "disqus" %}
|
||||
{% include /comments-providers/disqus.html %}
|
||||
{% when "discourse" %}
|
||||
{% include /comments-providers/discourse.html %}
|
||||
{% when "facebook" %}
|
||||
{% include /comments-providers/facebook.html %}
|
||||
{% when "google-plus" %}
|
||||
{% include /comments-providers/google-plus.html %}
|
||||
{% when "staticman" %}
|
||||
{% include /comments-providers/staticman.html %}
|
||||
{% when "staticman_v2" %}
|
||||
{% include /comments-providers/staticman_v2.html %}
|
||||
{% when "custom" %}
|
||||
{% include /comments-providers/custom.html %}
|
||||
{% endcase %}
|
||||
|
||||
{% endif %}
|
||||
+162
-76
@@ -1,83 +1,169 @@
|
||||
<div class="page__comments">
|
||||
{% capture comments_label %}{{ site.data.ui-text[site.locale].comments_label | default: "Comments" }}{% endcapture %}
|
||||
{% case site.comments.provider %}
|
||||
{% when "discourse" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section id="discourse-comments"></section>
|
||||
{% when "disqus" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section id="disqus_thread"></section>
|
||||
{% when "facebook" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
|
||||
{% when "google-plus" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section class="g-comments" data-href="{{ page.url | absolute_url }}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</section>
|
||||
{% when "staticman" %}
|
||||
<section id="static-comments">
|
||||
{% if site.repository and site.staticman.branch %}
|
||||
<!-- Start static comments -->
|
||||
<div class="js-comments">
|
||||
{% if site.data.comments[page.slug] %}
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
|
||||
{% assign comments = site.data.comments[page.slug] | sort %}
|
||||
{% when "discourse" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section id="discourse-comments"></section>
|
||||
{% when "disqus" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section id="disqus_thread"></section>
|
||||
{% when "facebook" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section class="fb-comments" data-href="{{ page.url | absolute_url }}" data-mobile="true" data-num-posts="{{ site.comments.facebook.num_posts | default: 5 }}" data-width="100%" data-colorscheme="{{ site.comments.facebook.colorscheme | default: 'light' }}"></section>
|
||||
{% when "google-plus" %}
|
||||
<h4 class="page__comments-title">{{ comments_label }}</h4>
|
||||
<section id="g-comments" class="g-comments">Loading Google+ Comments ...</section>
|
||||
<script>
|
||||
function initComment() {
|
||||
gapi.comments.render("g-comments", {
|
||||
href: "{{ page.url | absolute_url }}",
|
||||
width: "624",
|
||||
first_party_property: "BLOGGER",
|
||||
view_type: "FILTERED_POSTMOD"
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<script async type="text/javascript" src="https://apis.google.com/js/plusone.js" onload="initComment()" />
|
||||
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>-->
|
||||
{% when "staticman_v2" %}
|
||||
<section id="static-comments">
|
||||
{% if site.repository and site.staticman.branch %}
|
||||
<!-- Start static comments -->
|
||||
<div class="js-comments">
|
||||
{% if site.data.comments[page.slug] %}
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
|
||||
{% assign comments = site.data.comments[page.slug] | sort %}
|
||||
|
||||
{% for comment in comments %}
|
||||
{% assign email = comment[1].email %}
|
||||
{% assign name = comment[1].name %}
|
||||
{% assign url = comment[1].url %}
|
||||
{% assign date = comment[1].date %}
|
||||
{% assign message = comment[1].message %}
|
||||
{% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- End static comments -->
|
||||
|
||||
<!-- Start new comment form -->
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
|
||||
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
|
||||
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
|
||||
<div class="form__spinner">
|
||||
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
|
||||
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
|
||||
{% for comment in comments %}
|
||||
{% assign email = comment[1].email %}
|
||||
{% assign name = comment[1].name %}
|
||||
{% assign url = comment[1].url %}
|
||||
{% assign date = comment[1].date %}
|
||||
{% assign message = comment[1].message %}
|
||||
{% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- End static comments -->
|
||||
|
||||
<fieldset>
|
||||
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
|
||||
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
|
||||
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
|
||||
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
|
||||
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
|
||||
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
|
||||
</fieldset>
|
||||
<fieldset class="hidden" style="display: none;">
|
||||
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
|
||||
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
|
||||
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
|
||||
</fieldset>
|
||||
<!-- Start comment form alert messaging -->
|
||||
<p class="hidden js-notice">
|
||||
<strong class="js-notice-text"></strong>
|
||||
</p>
|
||||
<!-- End comment form alert messaging -->
|
||||
<fieldset>
|
||||
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- End new comment form -->
|
||||
{% endif %}
|
||||
</section>
|
||||
{% when "custom" %}
|
||||
<section id="custom-comments"></section>
|
||||
<!-- Start new comment form -->
|
||||
<div class="page__comments-form">
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
|
||||
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
|
||||
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v2/entry/{{ site.repository }}/{{ site.staticman.branch }}/comments">
|
||||
<div class="form__spinner">
|
||||
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
|
||||
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
|
||||
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
|
||||
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
|
||||
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
|
||||
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
|
||||
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
|
||||
</div>
|
||||
<div class="form-group hidden" style="display: none;">
|
||||
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
|
||||
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
|
||||
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
|
||||
<input type="hidden" name="options[reCaptcha][siteKey]" value="{{ site.reCaptcha.siteKey }}">
|
||||
<input type="hidden" name="options[reCaptcha][secret]" value="{{ site.reCaptcha.secret }}">
|
||||
</div>
|
||||
<!-- Start comment form alert messaging -->
|
||||
<p class="hidden js-notice">
|
||||
<strong class="js-notice-text"></strong>
|
||||
</p>
|
||||
<!-- End comment form alert messaging -->
|
||||
<div class="form-group">
|
||||
<div class="g-recaptcha" data-sitekey="{{ site.reCaptcha.siteKey }}"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- End new comment form -->
|
||||
{% if site.reCaptcha.siteKey %}<script async src="https://www.google.com/recaptcha/api.js"></script>{% endif %}
|
||||
{% endif %}
|
||||
</section>
|
||||
{% when "staticman" %}
|
||||
<section id="static-comments">
|
||||
{% if site.repository and site.staticman.branch %}
|
||||
<!-- Start static comments -->
|
||||
<div class="js-comments">
|
||||
{% if site.data.comments[page.slug] %}
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_title | default: "Comments" }}</h4>
|
||||
{% assign comments = site.data.comments[page.slug] | sort %}
|
||||
|
||||
{% for comment in comments %}
|
||||
{% assign email = comment[1].email %}
|
||||
{% assign name = comment[1].name %}
|
||||
{% assign url = comment[1].url %}
|
||||
{% assign date = comment[1].date %}
|
||||
{% assign message = comment[1].message %}
|
||||
{% include comment.html index=forloop.index email=email name=name url=url date=date message=message %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- End static comments -->
|
||||
|
||||
<!-- Start new comment form -->
|
||||
<div class="page__comments-form">
|
||||
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
|
||||
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
|
||||
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
|
||||
<div class="form__spinner">
|
||||
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
|
||||
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
|
||||
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
|
||||
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
|
||||
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
|
||||
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
|
||||
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
|
||||
</div>
|
||||
<div class="form-group hidden" style="display: none;">
|
||||
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
|
||||
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
|
||||
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
|
||||
</div>
|
||||
<!-- Start comment form alert messaging -->
|
||||
<p class="hidden js-notice">
|
||||
<strong class="js-notice-text"></strong>
|
||||
</p>
|
||||
<!-- End comment form alert messaging -->
|
||||
<div class="form-group">
|
||||
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- End new comment form -->
|
||||
{% endif %}
|
||||
</section>
|
||||
{% when "custom" %}
|
||||
<section id="custom-comments"></section>
|
||||
{% endcase %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +1,5 @@
|
||||
{% if include.id %}
|
||||
{% assign feature_row = page.[include.id] %}
|
||||
{% assign feature_row = page[include.id] %}
|
||||
{% else %}
|
||||
{% assign feature_row = page.feature_row %}
|
||||
{% endif %}
|
||||
|
||||
@@ -7,16 +7,19 @@
|
||||
<li><a href="https://twitter.com/{{ site.twitter.username }}"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li>
|
||||
{% endif %}
|
||||
{% if site.facebook.username %}
|
||||
<li><a href="https://facebook.com/{{ site.facebook.username }}"><i class="fa fa-fw fa-facebook-square" aria-hidden="true"></i> Facebook</a></li>
|
||||
<li><a href="https://www.facebook.com/{{ site.facebook.username }}"><i class="fa fa-fw fa-facebook-square" aria-hidden="true"></i> Facebook</a></li>
|
||||
{% endif %}
|
||||
{% if site.author.github %}
|
||||
<li><a href="http://github.com/{{ site.author.github }}"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
|
||||
<li><a href="https://github.com/{{ site.author.github }}"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
|
||||
{% endif %}
|
||||
{% if site.author.gitlab %}
|
||||
<li><a href="https://gitlab.com/{{ site.author.gitlab }}"><i class="fa fa-fw fa-gitlab" aria-hidden="true"></i> Gitlab</a></li>
|
||||
{% endif %}
|
||||
{% if site.author.bitbucket %}
|
||||
<li><a href="http://bitbucket.org/{{ site.author.bitbucket }}"><i class="fa fa-fw fa-bitbucket" aria-hidden="true"></i> Bitbucket</a></li>
|
||||
<li><a href="https://bitbucket.org/{{ site.author.bitbucket }}"><i class="fa fa-fw fa-bitbucket" aria-hidden="true"></i> Bitbucket</a></li>
|
||||
{% endif %}
|
||||
<li><a href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | absolute_url }}{% endif %}"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].feed_label | default: "Feed" }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="page__footer-copyright">© {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
|
||||
<div class="page__footer-copyright">© {{ site.time | date: '%Y' }} {{ site.name | default: site.title }}. {{ site.data.ui-text[site.locale].powered_by | default: "Powered by" }} <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{% if include.id %}
|
||||
{% assign gallery = page.[include.id] %}
|
||||
{% assign gallery = page[include.id] %}
|
||||
{% else %}
|
||||
{% assign gallery = page.gallery %}
|
||||
{% endif %}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<!-- Uniq -->
|
||||
{% assign __names = __names | sort %}
|
||||
{% for name in __names | sort %}
|
||||
{% for name in __names %}
|
||||
|
||||
<!-- If not equal to previous then it must be unique as sorted -->
|
||||
{% unless name == previous %}
|
||||
|
||||
+10
-1
@@ -31,4 +31,13 @@
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
{% if site.head_scripts %}
|
||||
{% for script in site.head_scripts %}
|
||||
{% if script contains "://" %}
|
||||
{% capture script_path %}{{ script }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture script_path %}{{ script | absolute_url }}{% endcapture %}
|
||||
{% endif %}
|
||||
<script src="{{ script_path }}"></script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
+14
-2
@@ -10,10 +10,22 @@
|
||||
{% else %}
|
||||
{% assign domain = site.url | append: site.baseurl %}
|
||||
{% endif %}
|
||||
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li>
|
||||
<li class="masthead__menu-item">
|
||||
<a href="{{ domain }}{{ link.url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button><div class="navicon"></div></button>
|
||||
{% if site.search == true %}
|
||||
<button class="search__toggle" type="button">
|
||||
<svg class="icon" width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.99 16">
|
||||
<path d="M15.5,13.12L13.19,10.8a1.69,1.69,0,0,0-1.28-.55l-0.06-.06A6.5,6.5,0,0,0,5.77,0,6.5,6.5,0,0,0,2.46,11.59a6.47,6.47,0,0,0,7.74.26l0.05,0.05a1.65,1.65,0,0,0,.5,1.24l2.38,2.38A1.68,1.68,0,0,0,15.5,13.12ZM6.4,2A4.41,4.41,0,1,1,2,6.4,4.43,4.43,0,0,1,6.4,2Z" transform="translate(-.01)"></path>
|
||||
</svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button class="greedy-nav__toggle" type="button">
|
||||
<span class="visually-hidden">{{ site.data.ui-text[site.locale].menu_label | default: "Toggle Menu" }}</span>
|
||||
<div class="navicon"></div>
|
||||
</button>
|
||||
<ul class="hidden-links hidden"></ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
{% capture overlay_filter %}rgba(0, 0, 0, {{ page.header.overlay_filter }}){% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.header.image_description %}
|
||||
{% assign image_description = page.header.image_description %}
|
||||
{% else %}
|
||||
{% assign image_description = page.title %}
|
||||
{% endif %}
|
||||
|
||||
{% assign image_description = image_description | markdownify | strip_html | strip_newlines | escape_once %}
|
||||
|
||||
<div class="page__hero{% if page.header.overlay_color or page.header.overlay_image %}--overlay{% endif %}"
|
||||
style="{% if page.header.overlay_color %}background-color: {{ page.header.overlay_color | default: 'transparent' }};{% endif %} {% if overlay_img_path %}background-image: {% if overlay_filter %}linear-gradient({{ overlay_filter }}, {{ overlay_filter }}), {% endif %}url('{{ overlay_img_path }}');{% endif %}"
|
||||
>
|
||||
@@ -45,7 +53,7 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<img src="{{ img_path }}" alt="{{ page.title }}" class="page__hero-image">
|
||||
<img src="{{ img_path }}" alt="{{ image_description }}" class="page__hero-image">
|
||||
{% endif %}
|
||||
{% if page.header.caption %}
|
||||
<span class="page__hero-caption">{{ page.header.caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
{% comment %} Link next page {% endcomment %}
|
||||
{% if paginator.next_page %}
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li></a></li>
|
||||
<li><a href="{{ site.paginate_path | replace: ':num', paginator.next_page | replace: '//', '/' | absolute_url }}">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</a></li>
|
||||
{% else %}
|
||||
<li><a href="#" class="disabled"><span aria-hidden="true">{{ site.data.ui-text[site.locale].pagination_next | default: "Next" }}</span></a></li>
|
||||
{% endif %}
|
||||
|
||||
+17
-1
@@ -1,4 +1,20 @@
|
||||
<script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script>
|
||||
{% if site.footer_scripts %}
|
||||
{% for script in site.footer_scripts %}
|
||||
{% if script contains "://" %}
|
||||
{% capture script_path %}{{ script }}{% endcapture %}
|
||||
{% else %}
|
||||
{% capture script_path %}{{ script | absolute_url }}{% endcapture %}
|
||||
{% endif %}
|
||||
<script src="{{ script_path }}"></script>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if site.search == true or page.layout == 'search' %}
|
||||
<script src="{{ '/assets/js/lunr.min.js' | absolute_url }}"></script>
|
||||
<script src="{{ '/assets/js/lunr-en.js' | absolute_url }}"></script>
|
||||
{% endif %}
|
||||
|
||||
{% include analytics.html %}
|
||||
{% include /comments-providers/scripts.html %}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="search-content__inner-wrap">
|
||||
<input type="text" id="search" class="search-input" tabindex="-1" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
|
||||
<div id="results" class="results"></div>
|
||||
</div>
|
||||
+30
-15
@@ -54,21 +54,37 @@
|
||||
<meta property="og:description" content="{{ seo_description }}">
|
||||
{% endif %}
|
||||
|
||||
{% assign page_large_image = page.header.og_image | default: page.header.overlay_image | default: page.header.image %}
|
||||
{% unless page_large_image contains '://' %}
|
||||
{% assign page_large_image = page_large_image | absolute_url %}
|
||||
{% endunless %}
|
||||
{% assign page_large_image = page_large_image | escape %}
|
||||
|
||||
{% assign page_teaser_image = page.header.teaser | default: site.og_image %}
|
||||
{% unless page_teaser_image contains '://' %}
|
||||
{% assign page_teaser_image = page_teaser_image | absolute_url %}
|
||||
{% endunless %}
|
||||
{% assign page_teaser_image = page_teaser_image | escape %}
|
||||
|
||||
{% assign site_og_image = site.og_image %}
|
||||
{% unless site_og_image contains '://' %}
|
||||
{% assign site_og_image = site_og_image | absolute_url %}
|
||||
{% endunless %}
|
||||
{% assign site_og_image = site_og_image | escape %}
|
||||
|
||||
{% if site.twitter.username %}
|
||||
<meta name="twitter:site" content="@{{ site.twitter.username | replace: "@", "" }}">
|
||||
<meta name="twitter:title" content="{{ page.title | default: site.title | markdownify | strip_html | strip_newlines | escape_once }}">
|
||||
<meta name="twitter:description" content="{{ seo_description }}">
|
||||
<meta name="twitter:url" content="{{ canonical_url }}">
|
||||
|
||||
{% if page.header.image %}
|
||||
{% if page_large_image %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | absolute_url }}{% endif %}">
|
||||
<meta name="twitter:image" content="{{ page_large_image }}">
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary">
|
||||
{% if page.header.teaser %}
|
||||
<meta name="twitter:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | absolute_url }}{% endif %}">
|
||||
{% elsif site.og_image %}
|
||||
<meta name="twitter:image" content="{{ site.og_image | absolute_url }}">
|
||||
{% if page_teaser_image %}
|
||||
<meta name="twitter:image" content="{{ page_teaser_image }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -87,14 +103,10 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.header.image %}
|
||||
<meta property="og:image" content="{% if page.header.image contains "://" %}{{ page.header.image }}{% else %}{{ page.header.image | absolute_url }}{% endif %}">
|
||||
{% elsif page.header.overlay_image %}
|
||||
<meta property="og:image" content="{% if page.header.overlay_image contains "://" %}{{ page.header.overlay_image }}{% else %}{{ page.header.overlay_image | absolute_url }}{% endif %}">
|
||||
{% elsif page.header.teaser %}
|
||||
<meta property="og:image" content="{% if page.header.teaser contains "://" %}{{ page.header.teaser }}{% else %}{{ page.header.teaser | absolute_url }}{% endif %}">
|
||||
{% elsif site.og_image %}
|
||||
<meta property="og:image" content="{% if site.og_image contains "://" %}{{ site.og_image }}{% else %}{{ site.og_image | absolute_url }}{% endif %}">
|
||||
{% if page_large_image %}
|
||||
<meta property="og:image" content="{{ page_large_image }}">
|
||||
{% elsif page_teaser_image %}
|
||||
<meta property="og:image" content="{{ page_teaser_image }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.date %}
|
||||
@@ -115,7 +127,7 @@
|
||||
"@context": "http://schema.org",
|
||||
"@type": "Organization",
|
||||
"url": {{ seo_url | jsonify }},
|
||||
"logo": {{ site.og_image | absolute_url | jsonify }}
|
||||
"logo": {{ site_og_image | jsonify }}
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
@@ -144,4 +156,7 @@
|
||||
{% if site.yandex_site_verification %}
|
||||
<meta name="yandex-verification" content="{{ site.yandex_site_verification }}">
|
||||
{% endif %}
|
||||
{% if site.naver-site-verification %}
|
||||
<meta name="naver-site-verification" content="{{ site.naver-site-verification }}">
|
||||
{% endif %}
|
||||
<!-- end SEO -->
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}</h4>
|
||||
{% endif %}
|
||||
|
||||
<a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username }}&{% endif %}text={{ page.title }} {{ page.url | absolute_url }}" class="btn btn--twitter" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
|
||||
<a href="https://twitter.com/intent/tweet?{% if site.twitter.username %}via={{ site.twitter.username | url_encode }}&{% endif %}text={{ page.title | url_encode }}%20{{ page.url | absolute_url | url_encode }}" class="btn btn--twitter" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Twitter"><i class="fa fa-fw fa-twitter" aria-hidden="true"></i><span> Twitter</span></a>
|
||||
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url }}" class="btn btn--facebook" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ page.url | absolute_url | url_encode }}" class="btn btn--facebook" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Facebook"><i class="fa fa-fw fa-facebook" aria-hidden="true"></i><span> Facebook</span></a>
|
||||
|
||||
<a href="https://plus.google.com/share?url={{ page.url | absolute_url }}" class="btn btn--google-plus" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
|
||||
<a href="https://plus.google.com/share?url={{ page.url | absolute_url | url_encode }}" class="btn btn--google-plus" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Google Plus"><i class="fa fa-fw fa-google-plus" aria-hidden="true"></i><span> Google+</span></a>
|
||||
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url }}" class="btn btn--linkedin" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
|
||||
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ page.url | absolute_url | url_encode }}" class="btn btn--linkedin" onclick="window.open(this.href, 'window', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fa fa-fw fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
|
||||
</section>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<!-- modified from http://www.codeofclimber.ru/2015/sorting-site-tags-in-jekyll/ -->
|
||||
{% endcomment %}
|
||||
{% capture page_tags %}{% for tag in page.tags %}{{ tag | downcase }}#{{ tag }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
|
||||
{% assign tag_hashes = (page_tags | split: ',' | sort:0) %}
|
||||
{% assign tag_hashes = page_tags | split: ',' | sort %}
|
||||
|
||||
<p class="page__taxonomy">
|
||||
<strong><i class="fa fa-fw fa-tags" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].tags_label | default: "Tags:" }} </strong>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{% capture tocWorkspace %}
|
||||
{%- comment -%}
|
||||
Version 1.0.2
|
||||
|
||||
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
||||
|
||||
Usage:
|
||||
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
||||
|
||||
Parameters:
|
||||
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
||||
|
||||
Optional Parameters:
|
||||
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
||||
* class (string) : '' - a CSS class assigned to the TOC
|
||||
* id (string) : '' - an ID to assigned to the TOC
|
||||
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
||||
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
||||
|
||||
Output:
|
||||
An unordered list representing the table of contents of a markdown block. This snippet will only generate the table of contents and will NOT output the markdown given to it
|
||||
{%- endcomment -%}
|
||||
|
||||
{% capture my_toc %}{% endcapture %}
|
||||
{% assign minHeader = include.h_min | default: 1 %}
|
||||
{% assign maxHeader = include.h_max | default: 6 %}
|
||||
{% assign nodes = include.html | split: '<h' %}
|
||||
{% assign firstHeader = true %}
|
||||
|
||||
{% for node in nodes %}
|
||||
{% if node == "" %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
||||
|
||||
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
||||
{% continue %}
|
||||
{% endif %}
|
||||
|
||||
{% if firstHeader %}
|
||||
{% assign firstHeader = false %}
|
||||
{% assign minHeader = headerLevel %}
|
||||
{% endif %}
|
||||
|
||||
{% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
|
||||
{% assign _workspace = node | split: '</h' %}
|
||||
|
||||
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
||||
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
||||
{% assign html_id = _idWorkspace[0] %}
|
||||
|
||||
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
||||
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
||||
|
||||
{% assign space = '' %}
|
||||
{% for i in (1..indentAmount) %}
|
||||
{% assign space = space | prepend: ' ' %}
|
||||
{% endfor %}
|
||||
|
||||
{% capture my_toc %}{{ my_toc }}
|
||||
{{ space }}- [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}](#{{ html_id }}){% endcapture %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if include.class %}
|
||||
{% capture my_toc %}{:.{{ include.class }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.id %}
|
||||
{% capture my_toc %}{: #{{ include.id }}}
|
||||
{{ my_toc | lstrip }}{% endcapture %}
|
||||
{% endif %}
|
||||
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<!-- Courtesy of embedresponsively.com //-->
|
||||
<div class="responsive-video-container">
|
||||
{% if video_provider == "vimeo" %}
|
||||
<iframe src="http://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
||||
<iframe src="https://player.vimeo.com/video/{{ video_id }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
|
||||
{% elsif video_provider == "youtube" %}
|
||||
<iframe src="https://www.youtube.com/embed/{{ video_id }}" frameborder="0" allowfullscreen></iframe>
|
||||
{% endif %}
|
||||
|
||||
+11
-3
@@ -3,7 +3,7 @@
|
||||
|
||||
<!doctype html>
|
||||
<!--
|
||||
Minimal Mistakes Jekyll Theme 4.4.0 by Michael Rose
|
||||
Minimal Mistakes Jekyll Theme 4.8.0 by Michael Rose
|
||||
Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
|
||||
Free for personal and commercial use under the MIT license
|
||||
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
|
||||
@@ -19,7 +19,15 @@
|
||||
{% include browser-upgrade.html %}
|
||||
{% include masthead.html %}
|
||||
|
||||
{{ content }}
|
||||
<div class="initial-content">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
{% if site.search == true %}
|
||||
<div class="search-content">
|
||||
{% include search_form.html %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="page__footer">
|
||||
<footer>
|
||||
@@ -31,4 +39,4 @@
|
||||
{% include scripts.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -4,8 +4,6 @@ layout: default
|
||||
|
||||
{% if page.header.overlay_color or page.header.overlay_image or page.header.image %}
|
||||
{% include page__hero.html %}
|
||||
{% elsif page.header.video.id and page.header.video.provider %}
|
||||
{% include page__hero_video.html %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.url != "/" and site.breadcrumbs %}
|
||||
@@ -21,6 +19,14 @@ layout: default
|
||||
{% unless page.header.overlay_color or page.header.overlay_image %}
|
||||
<h1 class="page__title">{{ page.title }}</h1>
|
||||
{% endunless %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
<form>
|
||||
<input type="input" id="search" class="search-input" placeholder="{{ site.data.ui-text[site.locale].search_placeholder_text | default: 'Enter your search term...' }}" />
|
||||
</form>
|
||||
|
||||
<div id="results"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+21
-3
@@ -34,8 +34,16 @@ layout: default
|
||||
{% endunless %}
|
||||
|
||||
<section class="page__content" itemprop="text">
|
||||
{% if page.toc %}
|
||||
<aside class="sidebar__right">
|
||||
<nav class="toc">
|
||||
<header><h4 class="nav__title"><i class="fa fa-{{ page.toc_icon | default: 'file-text' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
||||
{% include toc.html sanitize=true html=content h_min=2 h_max=3 class="toc__menu" %}
|
||||
</nav>
|
||||
</aside>
|
||||
{% endif %}
|
||||
{{ content }}
|
||||
{% if page.link %}<div><a href="{{ page.link }}" class="btn">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
|
||||
{% if page.link %}<div><a href="{{ page.link }}" class="btn btn--primary">{{ site.data.ui-text[site.locale].ext_link_label | default: "Direct Link" }}</a></div>{% endif %}
|
||||
</section>
|
||||
|
||||
<footer class="page__meta">
|
||||
@@ -55,12 +63,12 @@ layout: default
|
||||
{% include post_pagination.html %}
|
||||
</div>
|
||||
|
||||
{% if site.comments.provider and page.comments %}
|
||||
{% if jekyll.environment == 'production' and site.comments.provider and page.comments %}
|
||||
{% include comments.html %}
|
||||
{% endif %}
|
||||
</article>
|
||||
|
||||
{% comment %}<!-- only show related on a post page when not disabled -->{% endcomment %}
|
||||
{% comment %}<!-- only show related on a post page when `related: true` -->{% endcomment %}
|
||||
{% if page.id and page.related and site.related_posts.size > 0 %}
|
||||
<div class="page__related">
|
||||
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
|
||||
@@ -70,5 +78,15 @@ layout: default
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% comment %}<!-- otherwise show recent posts if no related when `related: true` -->{% endcomment %}
|
||||
{% elsif page.id and page.related %}
|
||||
<div class="page__related">
|
||||
<h4 class="page__related-title">{{ site.data.ui-text[site.locale].related_label | default: "You May Also Enjoy" }}</h4>
|
||||
<div class="grid__wrapper">
|
||||
{% for post in site.posts limit:4 %}
|
||||
{% include archive-single.html type="grid" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Minimal Mistakes Jekyll Theme 4.4.0 by Michael Rose
|
||||
* Minimal Mistakes Jekyll Theme 4.8.0 by Michael Rose
|
||||
* Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
|
||||
* Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt)
|
||||
*/
|
||||
@@ -28,6 +28,7 @@
|
||||
@import "minimal-mistakes/masthead";
|
||||
@import "minimal-mistakes/navigation";
|
||||
@import "minimal-mistakes/footer";
|
||||
@import "minimal-mistakes/search";
|
||||
@import "minimal-mistakes/syntax";
|
||||
|
||||
/* Utility classes */
|
||||
@@ -37,4 +38,4 @@
|
||||
@import "minimal-mistakes/page";
|
||||
@import "minimal-mistakes/archive";
|
||||
@import "minimal-mistakes/sidebar";
|
||||
@import "minimal-mistakes/print";
|
||||
@import "minimal-mistakes/print";
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
.archive {
|
||||
margin-bottom: 2em;
|
||||
|
||||
@include breakpoint($medium) {
|
||||
@include span(12 of 12);
|
||||
@include breakpoint($large) {
|
||||
float: right;
|
||||
width: calc(100% - #{$right-sidebar-width-narrow});
|
||||
padding-right: $right-sidebar-width-narrow;
|
||||
}
|
||||
|
||||
@include breakpoint($large) {
|
||||
@include span(10 of 12 last);
|
||||
@include prefix(0.5 of 12);
|
||||
@include breakpoint($x-large) {
|
||||
width: calc(100% - #{$right-sidebar-width});
|
||||
padding-right: $right-sidebar-width;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -24,7 +26,7 @@
|
||||
margin: 1.414em 0 0;
|
||||
padding-bottom: 0.5em;
|
||||
font-size: $type-size-5;
|
||||
color: mix(#fff, $gray, 25%);
|
||||
color: $muted-text-color;
|
||||
border-bottom: 1px solid $border-color;
|
||||
|
||||
+ .list__item .archive__item-title {
|
||||
@@ -35,6 +37,9 @@
|
||||
.archive__item-title {
|
||||
margin-bottom: 0.25em;
|
||||
font-family: $sans-serif-narrow;
|
||||
line-height: initial;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
a + a {
|
||||
opacity: 0.5;
|
||||
@@ -43,7 +48,6 @@
|
||||
|
||||
/* remove border*/
|
||||
.page__content {
|
||||
|
||||
.archive__item-title {
|
||||
margin-top: 1em;
|
||||
border-bottom: none;
|
||||
@@ -77,37 +81,81 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
List view
|
||||
========================================================================== */
|
||||
|
||||
.list__item {
|
||||
@include breakpoint($medium) {
|
||||
padding-right: $right-sidebar-width-narrow;
|
||||
}
|
||||
|
||||
@include breakpoint($large) {
|
||||
padding-right: $right-sidebar-width;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
padding-right: $right-sidebar-width-wide;
|
||||
}
|
||||
|
||||
.page__meta {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Grid view
|
||||
========================================================================== */
|
||||
|
||||
.archive {
|
||||
.grid__wrapper {
|
||||
/* extend grid elements to the right */
|
||||
|
||||
@include breakpoint($large) {
|
||||
margin-right: -1 * $right-sidebar-width-narrow;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
margin-right: -1 * $right-sidebar-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.grid__item {
|
||||
margin-bottom: 2em;
|
||||
|
||||
@include breakpoint($small) {
|
||||
float: left;
|
||||
width: span(5 of 10);
|
||||
|
||||
&:nth-child(2n + 1) {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:nth-child(2n + 2) {
|
||||
clear: none;
|
||||
margin-left: gutter(of 10);
|
||||
}
|
||||
}
|
||||
|
||||
@include breakpoint($medium) {
|
||||
margin-left: 0; /* override margin*/
|
||||
margin-right: 0; /* override margin*/
|
||||
width: span(3 of 12);
|
||||
|
||||
&:nth-child(2n + 1) {
|
||||
clear: none;
|
||||
}
|
||||
|
||||
&:nth-child(4n + 1) {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
&:nth-child(4n + 2) {
|
||||
clear: none;
|
||||
margin-left: gutter(1 of 12);
|
||||
}
|
||||
|
||||
&:nth-child(4n + 3) {
|
||||
clear: none;
|
||||
margin-left: gutter(1 of 12);
|
||||
}
|
||||
|
||||
&:nth-child(4n + 4) {
|
||||
clear: none;
|
||||
margin-left: gutter(1 of 12);
|
||||
}
|
||||
}
|
||||
|
||||
.page__meta {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
@@ -119,31 +167,23 @@
|
||||
|
||||
.archive__item-excerpt {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@include breakpoint($small) {
|
||||
@include gallery(5 of 10);
|
||||
.archive__item-teaser {
|
||||
max-height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@include breakpoint($medium) {
|
||||
margin-left: 0; /* reset before mixin does its thing*/
|
||||
margin-right: 0; /* reset before mixin does its thing*/
|
||||
@include gallery(2.5 of 10);
|
||||
|
||||
.archive__item-teaser {
|
||||
max-height: 120px;
|
||||
}
|
||||
|
||||
.archive__item-excerpt {
|
||||
@include breakpoint($medium) {
|
||||
display: block;
|
||||
font-size: $type-size-6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.archive__item-teaser {
|
||||
@include breakpoint($small) {
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
@include breakpoint($medium) {
|
||||
max-height: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Features
|
||||
@@ -160,8 +200,24 @@
|
||||
font-size: 1.25rem;
|
||||
|
||||
@include breakpoint($small) {
|
||||
float: left;
|
||||
margin-bottom: 0;
|
||||
@include gallery(4 of 12);
|
||||
width: span(4 of 12);
|
||||
|
||||
&:nth-child(3n + 1) {
|
||||
clear: both;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:nth-child(3n + 2) {
|
||||
clear: none;
|
||||
margin-left: gutter(of 12);
|
||||
}
|
||||
|
||||
&:nth-child(3n + 3) {
|
||||
clear: none;
|
||||
margin-left: gutter(of 12);
|
||||
}
|
||||
|
||||
.feature__item-teaser {
|
||||
max-height: 200px;
|
||||
@@ -170,7 +226,11 @@
|
||||
}
|
||||
|
||||
&--left {
|
||||
@include full();
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
font-size: 1.25rem;
|
||||
|
||||
.archive__item-teaser {
|
||||
@@ -179,19 +239,25 @@
|
||||
|
||||
@include breakpoint($small) {
|
||||
.archive__item-teaser {
|
||||
@include span(5 of 12);
|
||||
float: left;
|
||||
width: span(5 of 12);
|
||||
}
|
||||
|
||||
.archive__item-body {
|
||||
@include span(7 of 12 last);
|
||||
@include prefix(0.5 of 12);
|
||||
@include suffix(1 of 12);
|
||||
float: right;
|
||||
padding-left: gutter(0.5 of 12);
|
||||
padding-right: gutter(1 of 12);
|
||||
width: span(7 of 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--right {
|
||||
@include full();
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
font-size: 1.25rem;
|
||||
|
||||
.archive__item-teaser {
|
||||
@@ -202,19 +268,25 @@
|
||||
text-align: right;
|
||||
|
||||
.archive__item-teaser {
|
||||
@include span(5 of 12 rtl);
|
||||
float: right;
|
||||
width: span(5 of 12);
|
||||
}
|
||||
|
||||
.archive__item-body {
|
||||
@include span(7 of 12 last rtl);
|
||||
@include prefix(0.5 of 12);
|
||||
@include suffix(1 of 12);
|
||||
float: right;
|
||||
width: span(7 of 12);
|
||||
padding-left: gutter(0.5 of 12);
|
||||
padding-right: gutter(1 of 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--center {
|
||||
@include full();
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
font-size: 1.25rem;
|
||||
|
||||
.archive__item-teaser {
|
||||
@@ -235,4 +307,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,12 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 2em 0 0.5em;
|
||||
line-height: 1.2;
|
||||
font-family: $header-font-family;
|
||||
@@ -53,7 +58,8 @@ h6 {
|
||||
font-size: $type-size-6;
|
||||
}
|
||||
|
||||
small, .small {
|
||||
small,
|
||||
.small {
|
||||
font-size: $type-size-6;
|
||||
}
|
||||
|
||||
@@ -76,7 +82,15 @@ del a {
|
||||
|
||||
/* reduce orphans and widows when printing */
|
||||
|
||||
p, pre, blockquote, ul, ol, dl, figure, table, fieldset {
|
||||
p,
|
||||
pre,
|
||||
blockquote,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
figure,
|
||||
table,
|
||||
fieldset {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
@@ -118,13 +132,28 @@ a {
|
||||
|
||||
&:hover,
|
||||
&:active {
|
||||
color: $link-color-hover;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: $link-color-visited;
|
||||
}
|
||||
}
|
||||
|
||||
/* buttons */
|
||||
|
||||
button:focus {
|
||||
@extend %tab-focus;
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
tt, code, kbd, samp, pre {
|
||||
tt,
|
||||
code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
font-family: $monospace;
|
||||
}
|
||||
|
||||
@@ -141,11 +170,12 @@ td > code {
|
||||
padding-bottom: 0.1rem;
|
||||
font-size: $type-size-6;
|
||||
background: $code-background-color;
|
||||
border: 1px solid $lighter-gray;
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $border-radius;
|
||||
box-shadow: $box-shadow;
|
||||
|
||||
&:before, &:after {
|
||||
&:before,
|
||||
&:after {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0"; /* non-breaking space*/
|
||||
}
|
||||
@@ -182,9 +212,9 @@ figure {
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
-webkit-box-align: start;
|
||||
align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin: 2em 0;
|
||||
|
||||
@@ -236,32 +266,26 @@ figure {
|
||||
|
||||
figcaption {
|
||||
margin-bottom: 0.5em;
|
||||
color: mix(#fff, $text-color, 25%);
|
||||
color: $muted-text-color;
|
||||
font-family: $caption-font-family;
|
||||
font-size: $type-size-6;
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid $light-gray;
|
||||
-webkit-transition: $global-transition;
|
||||
transition: $global-transition;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
border-bottom-color: #000;
|
||||
color: $link-color-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Fix IE9 SVG bug */
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Navigation lists
|
||||
========================================================================== */
|
||||
@@ -309,7 +333,28 @@ nav {
|
||||
Global animation transition
|
||||
========================================================================== */
|
||||
|
||||
b, i, strong, em, blockquote, p, q, span, figure, img, h1, h2, header, input, a, tr, td, form button, input[type="submit"], .btn, .highlight, .archive__item-teaser {
|
||||
b,
|
||||
i,
|
||||
strong,
|
||||
em,
|
||||
blockquote,
|
||||
p,
|
||||
q,
|
||||
span,
|
||||
figure,
|
||||
img,
|
||||
h1,
|
||||
h2,
|
||||
header,
|
||||
input,
|
||||
a,
|
||||
tr,
|
||||
td,
|
||||
form button,
|
||||
input[type="submit"],
|
||||
.btn,
|
||||
.highlight,
|
||||
.archive__item-teaser {
|
||||
-webkit-transition: $global-transition;
|
||||
transition: $global-transition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,19 @@
|
||||
========================================================================== */
|
||||
|
||||
.btn {
|
||||
/* default button */
|
||||
/* default */
|
||||
display: inline-block;
|
||||
margin-bottom: 0.25em;
|
||||
padding: 0.5em 1em;
|
||||
color: #fff !important;
|
||||
font-family: $sans-serif;
|
||||
font-size: $type-size-6;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background-color: $primary-color;
|
||||
border: 0 !important;
|
||||
border-width: 0;
|
||||
border-radius: $border-radius;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(white, #000, 20%);
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
@@ -34,8 +28,41 @@
|
||||
margin-left: -0.5em; /* override for hidden text*/
|
||||
}
|
||||
|
||||
/* fills width of parent container */
|
||||
/* button colors */
|
||||
$buttoncolors:
|
||||
(primary, $primary-color),
|
||||
(inverse, #fff),
|
||||
(light-outline, transparent),
|
||||
(success, $success-color),
|
||||
(warning, $warning-color),
|
||||
(danger, $danger-color),
|
||||
(info, $info-color),
|
||||
(facebook, $facebook-color),
|
||||
(twitter, $twitter-color),
|
||||
(google-plus, $google-plus-color),
|
||||
(linkedin, $linkedin-color);
|
||||
|
||||
@each $buttoncolor, $color in $buttoncolors {
|
||||
&--#{$buttoncolor} {
|
||||
@include yiq-contrasted($color);
|
||||
@if ($buttoncolor == inverse) {
|
||||
border: 1px solid $border-color;
|
||||
}
|
||||
@if ($buttoncolor == light-outline) {
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@include yiq-contrasted(mix(#000, $color, 20%));
|
||||
}
|
||||
|
||||
&:visited {
|
||||
@include yiq-contrasted($color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* fills width of parent container */
|
||||
&--block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -45,68 +72,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* for dark backgrounds */
|
||||
|
||||
&--inverse {
|
||||
color: $gray !important;
|
||||
border: 1px solid $light-gray !important; /* override*/
|
||||
background-color: #fff;
|
||||
|
||||
&:hover {
|
||||
color: #fff !important;
|
||||
border-color: $gray;
|
||||
}
|
||||
}
|
||||
|
||||
/* light outline */
|
||||
|
||||
&--light-outline {
|
||||
border: 1px solid #fff !important; /* override*/
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* information */
|
||||
|
||||
&--info {
|
||||
background-color: $info-color;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(#000, $info-color, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
/* warning */
|
||||
|
||||
&--warning {
|
||||
background-color: $warning-color;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(#000, $warning-color, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
/* success */
|
||||
|
||||
&--success {
|
||||
background-color: $success-color;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(#000, $success-color, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
/* danger */
|
||||
|
||||
&--danger {
|
||||
background-color: $danger-color;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(#000, $danger-color, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
/* disabled */
|
||||
|
||||
&--disabled {
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
@@ -115,38 +81,17 @@
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
/* social buttons */
|
||||
|
||||
$social:
|
||||
(facebook, $facebook-color),
|
||||
(twitter, $twitter-color),
|
||||
(google-plus, $google-plus-color),
|
||||
(linkedin, $linkedin-color);
|
||||
|
||||
@each $socialnetwork, $color in $social {
|
||||
&--#{$socialnetwork} {
|
||||
background-color: $color;
|
||||
|
||||
&:hover {
|
||||
background-color: mix(#000, $color, 20%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* extra large button */
|
||||
|
||||
&--x-large {
|
||||
font-size: $type-size-4;
|
||||
}
|
||||
|
||||
/* large button */
|
||||
|
||||
&--large {
|
||||
font-size: $type-size-5;
|
||||
}
|
||||
|
||||
/* small button */
|
||||
|
||||
&--small {
|
||||
font-size: $type-size-7;
|
||||
}
|
||||
|
||||
@@ -3,28 +3,31 @@
|
||||
========================================================================== */
|
||||
|
||||
.page__footer {
|
||||
@include full();
|
||||
@include clearfix;
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
/* sticky footer fix start */
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
height: auto;
|
||||
/* sticky footer fix end */
|
||||
margin-top: 3em;
|
||||
color: mix(#fff, $gray, 25%);
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
color: $muted-text-color;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.45s;
|
||||
animation-delay: 0.45s;
|
||||
background-color: $lighter-gray;
|
||||
border-top: 1px solid $light-gray;
|
||||
background-color: $footer-background-color;
|
||||
|
||||
footer {
|
||||
@include container;
|
||||
@include clearfix;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 2em;
|
||||
max-width: 100%;
|
||||
padding: 0 1em 2em;
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
@@ -42,7 +45,7 @@
|
||||
}
|
||||
|
||||
.fa {
|
||||
color: mix(#fff, $gray, 25%);
|
||||
color: $muted-text-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
form {
|
||||
margin: 0 0 5px 0;
|
||||
padding: 1em;
|
||||
background-color: $form-background-color;
|
||||
|
||||
fieldset {
|
||||
margin-bottom: 5px;
|
||||
@@ -19,7 +21,6 @@ form {
|
||||
padding: 0;
|
||||
color: $text-color;
|
||||
border: 0;
|
||||
border-bottom: 1px solid mix(#fff, #000, 80%);
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@@ -80,14 +81,10 @@ select {
|
||||
padding: 0.25em;
|
||||
margin-bottom: 0.5em;
|
||||
color: $text-color;
|
||||
background-color: #fff;
|
||||
border: 1px solid mix(#fff, #000, 80%);
|
||||
background-color: $background-color;
|
||||
border: $border-color;
|
||||
border-radius: $border-radius;
|
||||
box-shadow: $box-shadow;
|
||||
|
||||
&:hover {
|
||||
border-color: mix(#fff, $primary-color, 50%);
|
||||
}
|
||||
}
|
||||
|
||||
.input-mini {
|
||||
@@ -199,10 +196,9 @@ input[type="hidden"] {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Disabled state
|
||||
========================================================================== */
|
||||
Disabled state
|
||||
========================================================================== */
|
||||
|
||||
input[disabled],
|
||||
select[disabled],
|
||||
@@ -214,16 +210,17 @@ textarea[readonly] {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Focus & active state
|
||||
========================================================================== */
|
||||
Focus & active state
|
||||
========================================================================== */
|
||||
|
||||
input:focus,
|
||||
textarea:focus {
|
||||
border-color: $primary-color;
|
||||
outline: 0;
|
||||
outline: thin dotted \9;
|
||||
box-shadow: inset 0 1px 3px rgba($text-color, 0.06),
|
||||
0 0 5px rgba($primary-color, 0.7);
|
||||
}
|
||||
|
||||
input[type="file"]:focus,
|
||||
@@ -233,14 +230,13 @@ select:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Help text
|
||||
========================================================================== */
|
||||
Help text
|
||||
========================================================================== */
|
||||
|
||||
.help-block,
|
||||
.help-inline {
|
||||
color: $info-color;
|
||||
color: $muted-text-color;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
@@ -255,10 +251,19 @@ select:focus {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
.form-group
|
||||
========================================================================== */
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 5px;
|
||||
padding: 0;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
.form-inline
|
||||
========================================================================== */
|
||||
.form-inline
|
||||
========================================================================== */
|
||||
|
||||
.form-inline input,
|
||||
.form-inline textarea,
|
||||
@@ -283,12 +288,12 @@ select:focus {
|
||||
.form-inline .checkbox input[type="checkbox"] {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 3px; }
|
||||
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/*
|
||||
.form-search
|
||||
========================================================================== */
|
||||
.form-search
|
||||
========================================================================== */
|
||||
|
||||
.form-search input,
|
||||
.form-search textarea,
|
||||
@@ -323,13 +328,12 @@ select:focus {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
.form--loading
|
||||
========================================================================== */
|
||||
.form--loading
|
||||
========================================================================== */
|
||||
|
||||
.form--loading:before {
|
||||
content: '';
|
||||
content: "";
|
||||
}
|
||||
|
||||
.form--loading .form__spinner {
|
||||
@@ -354,11 +358,9 @@ select:focus {
|
||||
z-index: 11;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Google search form
|
||||
========================================================================== */
|
||||
Google search form
|
||||
========================================================================== */
|
||||
|
||||
#goog-fixurl {
|
||||
ul {
|
||||
@@ -382,10 +384,10 @@ select:focus {
|
||||
color: #000;
|
||||
border-width: 2px !important;
|
||||
border-style: solid !important;
|
||||
border-color: lighten(#000,50);
|
||||
border-color: $border-color;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
#goog-wm-sb {
|
||||
@extend .btn;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,20 +5,22 @@
|
||||
.masthead {
|
||||
position: relative;
|
||||
border-bottom: 1px solid $border-color;
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
z-index: 20;
|
||||
|
||||
&__inner-wrap {
|
||||
@include container;
|
||||
@include clearfix;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 1em;
|
||||
max-width: 100%;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
justify-content: space-between;
|
||||
padding: 1em 1em 1em;
|
||||
justify-content: space-between;
|
||||
font-family: $sans-serif-narrow;
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
@@ -41,13 +43,17 @@
|
||||
padding: 0.5rem 0;
|
||||
align-self: stretch;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.masthead__menu {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
|
||||
.site-nav {
|
||||
margin-left: 0;
|
||||
@@ -74,4 +80,4 @@
|
||||
padding-right: 2em;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,43 @@
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Compass YIQ Color Contrast
|
||||
https://github.com/easy-designs/yiq-color-contrast
|
||||
========================================================================== */
|
||||
|
||||
@function yiq-is-light(
|
||||
$color,
|
||||
$threshold: $yiq-contrasted-threshold
|
||||
) {
|
||||
$red: red($color);
|
||||
$green: green($color);
|
||||
$blue: blue($color);
|
||||
|
||||
$yiq: (($red*299)+($green*587)+($blue*114))/1000;
|
||||
|
||||
@if $yiq-debug { @debug $yiq, $threshold; }
|
||||
|
||||
@return if($yiq >= $threshold, true, false);
|
||||
}
|
||||
|
||||
@function yiq-contrast-color(
|
||||
$color,
|
||||
$dark: $yiq-contrasted-dark-default,
|
||||
$light: $yiq-contrasted-light-default,
|
||||
$threshold: $yiq-contrasted-threshold
|
||||
) {
|
||||
@return if(yiq-is-light($color, $threshold), $yiq-contrasted-dark-default, $yiq-contrasted-light-default);
|
||||
}
|
||||
|
||||
@mixin yiq-contrasted(
|
||||
$background-color,
|
||||
$dark: $yiq-contrasted-dark-default,
|
||||
$light: $yiq-contrasted-light-default,
|
||||
$threshold: $yiq-contrasted-threshold
|
||||
) {
|
||||
background-color: $background-color;
|
||||
color: yiq-contrast-color($background-color, $dark, $light, $threshold);
|
||||
}
|
||||
@@ -7,17 +7,16 @@
|
||||
========================================================================== */
|
||||
|
||||
.breadcrumbs {
|
||||
@include container;
|
||||
@include clearfix;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
padding-left: 2em;
|
||||
padding-right: 2em;
|
||||
font-family: $sans-serif;
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
-webkit-animation-delay: 0.30s;
|
||||
animation-delay: 0.30s;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s;
|
||||
|
||||
@include breakpoint($large) {
|
||||
padding-left: 1em;
|
||||
@@ -34,11 +33,12 @@
|
||||
font-size: $type-size-6;
|
||||
|
||||
@include breakpoint($large) {
|
||||
@include span(10 of 12 last);
|
||||
float: right;
|
||||
width: span(10 of 12);
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
@include prefix(0.5 of 12);
|
||||
padding-left: gutter(0.5 of 12);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,16 +51,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Post pagination navigation links
|
||||
========================================================================== */
|
||||
Post pagination navigation links
|
||||
========================================================================== */
|
||||
|
||||
.pagination {
|
||||
@include full();
|
||||
@include clearfix();
|
||||
float: left;
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
width: 100%;
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
@@ -84,21 +84,22 @@
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: mix(#fff, $gray, 25%);
|
||||
border: 1px solid $light-gray;
|
||||
color: $muted-text-color;
|
||||
border: 1px solid mix(#000, $border-color, 25%);
|
||||
border-radius: 0;
|
||||
|
||||
&:hover {
|
||||
color: $link-color-hover;
|
||||
}
|
||||
|
||||
&.current {
|
||||
&.current,
|
||||
&.current.disabled {
|
||||
color: #fff;
|
||||
background: $primary-color;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: mix(#fff, $gray, 75%);
|
||||
color: rgba($muted-text-color, 0.5);
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
@@ -132,12 +133,12 @@
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: $link-color;
|
||||
border: 1px solid $light-gray;
|
||||
color: $muted-text-color;
|
||||
border: 1px solid mix(#000, $border-color, 25%);
|
||||
border-radius: $border-radius;
|
||||
|
||||
&:hover {
|
||||
color: $link-color-hover;
|
||||
@include yiq-contrasted($muted-text-color);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
@@ -152,7 +153,7 @@
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: mix(#fff, $gray, 75%);
|
||||
color: rgba($muted-text-color, 0.5);
|
||||
pointer-events: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
@@ -168,17 +169,16 @@
|
||||
border-top: 1px solid $border-color;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Priority plus navigation
|
||||
========================================================================== */
|
||||
Priority plus navigation
|
||||
========================================================================== */
|
||||
|
||||
.greedy-nav {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
align-items: center;
|
||||
background: $background-color;
|
||||
|
||||
a {
|
||||
@@ -197,7 +197,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
&__toggle {
|
||||
padding: 0 0.5rem;
|
||||
align-self: stretch;
|
||||
border: 0;
|
||||
@@ -211,21 +211,14 @@
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
-webkit-box-pack: end;
|
||||
justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
padding-right: 2rem;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
-webkit-box-flex: 0;
|
||||
flex: none;
|
||||
|
||||
&:last-child {
|
||||
a {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
flex: none;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -237,18 +230,18 @@
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 4px;
|
||||
background: mix(#fff, $primary-color, 50%);
|
||||
background: $primary-color;
|
||||
width: 100%;
|
||||
-webkit-transition: $global-transition;
|
||||
transition: $global-transition;
|
||||
-webkit-transform: scaleX(0) translate3d(0, 0 , 0);
|
||||
transform: scaleX(0) translate3d(0, 0 , 0); /* hide*/
|
||||
-webkit-transform: scaleX(0) translate3d(0, 0, 0);
|
||||
transform: scaleX(0) translate3d(0, 0, 0); /* hide*/
|
||||
}
|
||||
|
||||
&:hover:before {
|
||||
-webkit-transform: scaleX(1);
|
||||
-ms-transform: scaleX(1);
|
||||
transform: scaleX(1); /* reveal*/
|
||||
-ms-transform: scaleX(1);
|
||||
transform: scaleX(1); /* reveal*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,7 +254,7 @@
|
||||
padding: 5px;
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $border-radius;
|
||||
background: #fff;
|
||||
background: $background-color;
|
||||
box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);
|
||||
|
||||
&.hidden {
|
||||
@@ -275,7 +268,7 @@
|
||||
|
||||
&:hover {
|
||||
color: $masthead-link-color-hover;
|
||||
background: mix(#fff, $primary-color, 75%);
|
||||
background: $navicon-link-color-hover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +293,7 @@
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 0 10px 10px;
|
||||
border-color: #fff transparent;
|
||||
border-color: $background-color transparent;
|
||||
display: block;
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -316,10 +309,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Navigation list
|
||||
========================================================================== */
|
||||
Navigation list
|
||||
========================================================================== */
|
||||
|
||||
.nav__list {
|
||||
margin-bottom: 1.5em;
|
||||
@@ -330,7 +322,6 @@
|
||||
}
|
||||
|
||||
@include breakpoint(max-width ($large - 1px)) {
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
@@ -347,7 +338,7 @@
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: '';
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
top: 1.25em;
|
||||
@@ -361,8 +352,8 @@
|
||||
|
||||
&:after {
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -391,14 +382,14 @@
|
||||
/* on hover show expand*/
|
||||
label:hover:after {
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
input:checked + label:hover:after {
|
||||
-webkit-transform: rotate(0);
|
||||
-ms-transform: rotate(0);
|
||||
transform: rotate(0);
|
||||
-ms-transform: rotate(0);
|
||||
transform: rotate(0);
|
||||
}
|
||||
|
||||
ul {
|
||||
@@ -433,14 +424,7 @@
|
||||
margin-left: -0.5em;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
background: $primary-color;
|
||||
border-radius: $border-radius;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@include breakpoint(max-width ($large - 1px)) {
|
||||
@@ -452,8 +436,8 @@
|
||||
-webkit-transition: 0.3s ease-in-out;
|
||||
transition: 0.3s ease-in-out;
|
||||
-webkit-transform: translate(0, 10%);
|
||||
-ms-transform: translate(0, 10%);
|
||||
transform: translate(0, 10%);
|
||||
-ms-transform: translate(0, 10%);
|
||||
transform: translate(0, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,8 +450,8 @@
|
||||
opacity: 1;
|
||||
margin-top: 1em;
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,17 +474,16 @@
|
||||
border-bottom: 1px solid $border-color;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Table of contents navigation
|
||||
========================================================================== */
|
||||
Table of contents navigation
|
||||
========================================================================== */
|
||||
|
||||
.toc {
|
||||
font-family: $sans-serif-narrow;
|
||||
color: $gray;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
background-color: #fff;
|
||||
background-color: $background-color;
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $border-radius;
|
||||
box-shadow: $box-shadow;
|
||||
@@ -524,15 +507,14 @@
|
||||
a {
|
||||
display: block;
|
||||
padding: 0.5rem 1rem;
|
||||
color: $gray;
|
||||
color: $muted-text-color;
|
||||
font-size: $type-size-7;
|
||||
font-weight: bold;
|
||||
line-height: 1.5;
|
||||
border-bottom: 1px solid $border-color;
|
||||
|
||||
&:hover {
|
||||
color: #000;
|
||||
background: $lighter-gray;
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,7 +525,7 @@
|
||||
}
|
||||
|
||||
li ul > li a {
|
||||
padding-left: 2rem;
|
||||
padding-left: 1.75rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@@ -555,4 +537,4 @@
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@mixin notice($notice-color) {
|
||||
margin: 2em 0 !important; /* override*/
|
||||
padding: 1em;
|
||||
color: $dark-gray;
|
||||
font-family: $global-font-family;
|
||||
font-size: $type-size-6 !important;
|
||||
text-indent: initial; /* override*/
|
||||
|
||||
@@ -3,15 +3,17 @@
|
||||
========================================================================== */
|
||||
|
||||
#main {
|
||||
@include container;
|
||||
@include clearfix;
|
||||
margin-left: auto;
|
||||
margin-top: 2em;
|
||||
margin-right: auto;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
-webkit-animation-delay: 0.35s;
|
||||
animation-delay: 0.35s;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
max-width: 100%;
|
||||
-webkit-animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
max-width: $x-large;
|
||||
@@ -20,18 +22,32 @@
|
||||
|
||||
.page {
|
||||
@include breakpoint($large) {
|
||||
@include span(10 of 12 last);
|
||||
@include prefix(0.5 of 12);
|
||||
@include suffix(2 of 12);
|
||||
float: right;
|
||||
width: calc(100% - #{$right-sidebar-width-narrow});
|
||||
padding-right: $right-sidebar-width-narrow;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
width: calc(100% - #{$right-sidebar-width});
|
||||
padding-right: $right-sidebar-width;
|
||||
}
|
||||
|
||||
.page__inner-wrap {
|
||||
@include full();
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
|
||||
.page__content,
|
||||
.page__meta,
|
||||
.page__share {
|
||||
@include full();
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,13 +67,14 @@
|
||||
}
|
||||
|
||||
.page__content {
|
||||
|
||||
h2 {
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid $border-color;
|
||||
}
|
||||
|
||||
p, li, dl {
|
||||
p,
|
||||
li,
|
||||
dl {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
@@ -74,9 +91,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
|
||||
a:not(.btn) {
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
|
||||
@@ -113,10 +128,10 @@
|
||||
position: relative;
|
||||
margin-bottom: 2em;
|
||||
@include clearfix;
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.25s;
|
||||
animation-delay: 0.25s;
|
||||
animation-delay: 0.25s;
|
||||
|
||||
&--overlay {
|
||||
position: relative;
|
||||
@@ -126,10 +141,10 @@
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
-webkit-animation: intro 0.3s both;
|
||||
animation: intro 0.3s both;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.25s;
|
||||
animation-delay: 0.25s;
|
||||
animation-delay: 0.25s;
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
@@ -226,14 +241,13 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Page meta
|
||||
========================================================================== */
|
||||
|
||||
.page__meta {
|
||||
margin-top: 2em;
|
||||
color: mix(#fff, $gray, 25%);
|
||||
color: $muted-text-color;
|
||||
font-family: $sans-serif;
|
||||
font-size: $type-size-6;
|
||||
|
||||
@@ -252,7 +266,6 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Page taxonomy
|
||||
========================================================================== */
|
||||
@@ -273,7 +286,7 @@
|
||||
margin-bottom: 8px;
|
||||
padding: 5px 10px;
|
||||
text-decoration: none;
|
||||
border: 1px solid $light-gray;
|
||||
border: 1px solid mix(#000, $border-color, 25%);
|
||||
border-radius: $border-radius;
|
||||
|
||||
&:hover {
|
||||
@@ -282,13 +295,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Comments
|
||||
========================================================================== */
|
||||
|
||||
.page__comments {
|
||||
@include full();
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.page__comments-title {
|
||||
@@ -301,8 +317,6 @@
|
||||
}
|
||||
|
||||
.page__comments-form {
|
||||
padding: 1em;
|
||||
background: $lighter-gray;
|
||||
-webkit-transition: $global-transition;
|
||||
transition: $global-transition;
|
||||
|
||||
@@ -379,20 +393,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Related
|
||||
========================================================================== */
|
||||
|
||||
.page__related {
|
||||
@include clearfix();
|
||||
float: left;
|
||||
margin-top: 2em;
|
||||
padding-top: 1em;
|
||||
border-top: 1px solid $border-color;
|
||||
@include clearfix();
|
||||
float: left;
|
||||
|
||||
@include breakpoint($large) {
|
||||
@include pre(2.5 of 12);
|
||||
float: right;
|
||||
width: calc(100% - #{$right-sidebar-width-narrow});
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
width: calc(100% - #{$right-sidebar-width});
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -405,4 +423,4 @@
|
||||
margin-bottom: 10px;
|
||||
font-size: $type-size-6;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,20 @@
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
min-height: auto !important;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
margin: 0 auto;
|
||||
background: #fff !important;
|
||||
color: #000 !important;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
margin: 0 auto;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
@@ -185,6 +186,16 @@
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
#main {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.page {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.page-break,
|
||||
.page-break-before {
|
||||
page-break-before: always;
|
||||
@@ -228,11 +239,14 @@
|
||||
.pagination,
|
||||
.ads,
|
||||
.page__footer,
|
||||
.page__comments-form,
|
||||
.author__avatar,
|
||||
.author__content,
|
||||
.author__urls-wrapper,
|
||||
.nav__list,
|
||||
.sidebar,
|
||||
.adsbygoogle {
|
||||
display: none !important;
|
||||
height: 1px !important;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
STYLE RESETS
|
||||
========================================================================== */
|
||||
|
||||
@include border-box-sizing;
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html {
|
||||
/* apply a natural box layout model to all elements */
|
||||
@@ -172,7 +172,7 @@ input[type="checkbox"] {
|
||||
}
|
||||
|
||||
input[type="search"] { /* Appearance in Safari/Chrome*/
|
||||
box-sizing: content-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* ==========================================================================
|
||||
SEARCH
|
||||
========================================================================== */
|
||||
|
||||
.layout--search {
|
||||
.archive__item-teaser {
|
||||
margin-bottom: 0.25em;
|
||||
}
|
||||
}
|
||||
|
||||
.search__toggle {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
border: 0;
|
||||
outline: none;
|
||||
color: $muted-text-color;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
-webkit-transition: 0.2s;
|
||||
transition: 0.2s;
|
||||
|
||||
&:hover {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.search-content {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
|
||||
&__inner-wrap {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
-webkit-animation: $intro-transition;
|
||||
animation: $intro-transition;
|
||||
-webkit-animation-delay: 0.15s;
|
||||
animation-delay: 0.15s;
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
max-width: $x-large;
|
||||
}
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
font-size: $type-size-3;
|
||||
|
||||
@include breakpoint($large) {
|
||||
font-size: $type-size-2;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
font-size: $type-size-1;
|
||||
}
|
||||
}
|
||||
|
||||
&.is--visible {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.results__found {
|
||||
margin-top: 0.5em;
|
||||
font-size: $type-size-6;
|
||||
}
|
||||
|
||||
.archive__item {
|
||||
margin-bottom: 2em;
|
||||
|
||||
@include breakpoint($large) {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.archive__item-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.archive__item-excerpt {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
@@ -7,14 +7,20 @@
|
||||
========================================================================== */
|
||||
|
||||
.sidebar {
|
||||
@include clearfix();
|
||||
margin-bottom: 1em;
|
||||
-webkit-transform: translate3d(0, 0 , 0);
|
||||
transform: translate3d(0, 0 , 0);
|
||||
|
||||
@include clearfix();
|
||||
margin-bottom: 1em;
|
||||
@include breakpoint(max-width $large) {
|
||||
/* fix z-index order of follow links */
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@include breakpoint($large) {
|
||||
@include span(2 of 12);
|
||||
float: left;
|
||||
width: calc(#{$right-sidebar-width-narrow} - 1em);
|
||||
opacity: 0.75;
|
||||
-webkit-transition: opacity 0.2s ease-in-out;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
@@ -22,10 +28,16 @@
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.sticky {
|
||||
overflow-y: auto;
|
||||
/* calculate height of nav list */
|
||||
height: calc(100vh - 90px - 2em); // viewport height - approx. masthead height - main content top margin
|
||||
}
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
padding-right: 0;
|
||||
width: calc(#{$right-sidebar-width} - 1em);
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
@@ -48,15 +60,31 @@
|
||||
margin-bottom: 1em;
|
||||
|
||||
@include breakpoint($large) {
|
||||
position: relative;
|
||||
float: right;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: $right-sidebar-width-narrow;
|
||||
margin-left: span(0.5 of 12);
|
||||
margin-right: -1 * $right-sidebar-width-narrow;
|
||||
padding-left: 1em;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
width: $right-sidebar-width;
|
||||
margin-right: -1 * $right-sidebar-width;
|
||||
}
|
||||
}
|
||||
|
||||
.splash .sidebar__right {
|
||||
|
||||
@include breakpoint($large) {
|
||||
position: relative;
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
@include breakpoint($x-large) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,11 +189,15 @@
|
||||
list-style-type: none;
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $border-radius;
|
||||
background: #fff;
|
||||
background: $background-color;
|
||||
z-index: -1;
|
||||
box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);
|
||||
cursor: default;
|
||||
|
||||
&.is--visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@include breakpoint($large) {
|
||||
display: block;
|
||||
position: relative;
|
||||
@@ -202,7 +234,7 @@
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 0 10px 10px;
|
||||
border-color: #fff transparent;
|
||||
border-color: $background-color transparent;
|
||||
z-index: 1;
|
||||
|
||||
@include breakpoint($large) {
|
||||
|
||||
@@ -7,7 +7,7 @@ figure.highlight {
|
||||
position: relative;
|
||||
margin-bottom: 1em;
|
||||
font-family: $monospace;
|
||||
font-size: $type-size-7;
|
||||
font-size: $type-size-6;
|
||||
line-height: 1.8;
|
||||
border: 1px solid $border-color;
|
||||
border-radius: $border-radius;
|
||||
@@ -19,7 +19,7 @@ figure.highlight {
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0.5em;
|
||||
background-color: $lighter-gray;
|
||||
background-color: $border-color;
|
||||
content: "\f121";
|
||||
font-family: "fontawesome" !important;
|
||||
line-height: 1;
|
||||
@@ -27,7 +27,7 @@ figure.highlight {
|
||||
speak: none;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
pre.highlight {
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ figure.highlight {
|
||||
/* line numbers*/
|
||||
&.gutter {
|
||||
padding-right: 1em;
|
||||
color: $light-gray;
|
||||
color: rgba($muted-text-color, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,9 @@ figure.highlight {
|
||||
}
|
||||
}
|
||||
|
||||
.highlight pre { width: 100%; }
|
||||
.highlight pre {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
Solarized Light
|
||||
@@ -76,71 +78,209 @@ figure.highlight {
|
||||
green #859900 operators, other keywords
|
||||
========================================================================== */
|
||||
|
||||
.highlight .c { color: #93a1a1 } /* Comment */
|
||||
.highlight .err { color: #586e75 } /* Error */
|
||||
.highlight .g { color: #586e75 } /* Generic */
|
||||
.highlight .k { color: #859900 } /* Keyword */
|
||||
.highlight .l { color: #586e75 } /* Literal */
|
||||
.highlight .n { color: #586e75 } /* Name */
|
||||
.highlight .o { color: #859900 } /* Operator */
|
||||
.highlight .x { color: #cb4b16 } /* Other */
|
||||
.highlight .p { color: #586e75 } /* Punctuation */
|
||||
.highlight .cm { color: #93a1a1 } /* Comment.Multiline */
|
||||
.highlight .cp { color: #859900 } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #93a1a1 } /* Comment.Single */
|
||||
.highlight .cs { color: #859900 } /* Comment.Special */
|
||||
.highlight .gd { color: #2aa198 } /* Generic.Deleted */
|
||||
.highlight .ge { color: #586e75; font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #dc322f } /* Generic.Error */
|
||||
.highlight .gh { color: #cb4b16 } /* Generic.Heading */
|
||||
.highlight .gi { color: #859900 } /* Generic.Inserted */
|
||||
.highlight .go { color: #586e75 } /* Generic.Output */
|
||||
.highlight .gp { color: #586e75 } /* Generic.Prompt */
|
||||
.highlight .gs { color: #586e75; font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #cb4b16 } /* Generic.Subheading */
|
||||
.highlight .gt { color: #586e75 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #cb4b16 } /* Keyword.Constant */
|
||||
.highlight .kd { color: #22b3eb } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #859900 } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #859900 } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #22b3eb } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #dc322f } /* Keyword.Type */
|
||||
.highlight .ld { color: #586e75 } /* Literal.Date */
|
||||
.highlight .m { color: #2aa198 } /* Literal.Number */
|
||||
.highlight .s { color: #2aa198 } /* Literal.String */
|
||||
.highlight .na { color: #586e75 } /* Name.Attribute */
|
||||
.highlight .nb { color: #B58900 } /* Name.Builtin */
|
||||
.highlight .nc { color: #22b3eb } /* Name.Class */
|
||||
.highlight .no { color: #cb4b16 } /* Name.Constant */
|
||||
.highlight .nd { color: #22b3eb } /* Name.Decorator */
|
||||
.highlight .ni { color: #cb4b16 } /* Name.Entity */
|
||||
.highlight .ne { color: #cb4b16 } /* Name.Exception */
|
||||
.highlight .nf { color: #22b3eb } /* Name.Function */
|
||||
.highlight .nl { color: #586e75 } /* Name.Label */
|
||||
.highlight .nn { color: #586e75 } /* Name.Namespace */
|
||||
.highlight .nx { color: #586e75 } /* Name.Other */
|
||||
.highlight .py { color: #586e75 } /* Name.Property */
|
||||
.highlight .nt { color: #22b3eb } /* Name.Tag */
|
||||
.highlight .nv { color: #22b3eb } /* Name.Variable */
|
||||
.highlight .ow { color: #859900 } /* Operator.Word */
|
||||
.highlight .w { color: #586e75 } /* Text.Whitespace */
|
||||
.highlight .mf { color: #2aa198 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #2aa198 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #2aa198 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #2aa198 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #93a1a1 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #2aa198 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #586e75 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #2aa198 } /* Literal.String.Double */
|
||||
.highlight .se { color: #cb4b16 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #586e75 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #2aa198 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #2aa198 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #dc322f } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #2aa198 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #2aa198 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #22b3eb } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #22b3eb } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #22b3eb } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #22b3eb } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #2aa198 } /* Literal.Number.Integer.Long */
|
||||
.highlight .c {
|
||||
color: #93a1a1;
|
||||
} /* Comment */
|
||||
.highlight .err {
|
||||
color: #586e75;
|
||||
} /* Error */
|
||||
.highlight .g {
|
||||
color: #586e75;
|
||||
} /* Generic */
|
||||
.highlight .k {
|
||||
color: #859900;
|
||||
} /* Keyword */
|
||||
.highlight .l {
|
||||
color: #586e75;
|
||||
} /* Literal */
|
||||
.highlight .n {
|
||||
color: #586e75;
|
||||
} /* Name */
|
||||
.highlight .o {
|
||||
color: #859900;
|
||||
} /* Operator */
|
||||
.highlight .x {
|
||||
color: #cb4b16;
|
||||
} /* Other */
|
||||
.highlight .p {
|
||||
color: #586e75;
|
||||
} /* Punctuation */
|
||||
.highlight .cm {
|
||||
color: #93a1a1;
|
||||
} /* Comment.Multiline */
|
||||
.highlight .cp {
|
||||
color: #859900;
|
||||
} /* Comment.Preproc */
|
||||
.highlight .c1 {
|
||||
color: #93a1a1;
|
||||
} /* Comment.Single */
|
||||
.highlight .cs {
|
||||
color: #859900;
|
||||
} /* Comment.Special */
|
||||
.highlight .gd {
|
||||
color: #2aa198;
|
||||
} /* Generic.Deleted */
|
||||
.highlight .ge {
|
||||
color: #586e75;
|
||||
font-style: italic;
|
||||
} /* Generic.Emph */
|
||||
.highlight .gr {
|
||||
color: #dc322f;
|
||||
} /* Generic.Error */
|
||||
.highlight .gh {
|
||||
color: #cb4b16;
|
||||
} /* Generic.Heading */
|
||||
.highlight .gi {
|
||||
color: #859900;
|
||||
} /* Generic.Inserted */
|
||||
.highlight .go {
|
||||
color: #586e75;
|
||||
} /* Generic.Output */
|
||||
.highlight .gp {
|
||||
color: #586e75;
|
||||
} /* Generic.Prompt */
|
||||
.highlight .gs {
|
||||
color: #586e75;
|
||||
font-weight: bold;
|
||||
} /* Generic.Strong */
|
||||
.highlight .gu {
|
||||
color: #cb4b16;
|
||||
} /* Generic.Subheading */
|
||||
.highlight .gt {
|
||||
color: #586e75;
|
||||
} /* Generic.Traceback */
|
||||
.highlight .kc {
|
||||
color: #cb4b16;
|
||||
} /* Keyword.Constant */
|
||||
.highlight .kd {
|
||||
color: #22b3eb;
|
||||
} /* Keyword.Declaration */
|
||||
.highlight .kn {
|
||||
color: #859900;
|
||||
} /* Keyword.Namespace */
|
||||
.highlight .kp {
|
||||
color: #859900;
|
||||
} /* Keyword.Pseudo */
|
||||
.highlight .kr {
|
||||
color: #22b3eb;
|
||||
} /* Keyword.Reserved */
|
||||
.highlight .kt {
|
||||
color: #dc322f;
|
||||
} /* Keyword.Type */
|
||||
.highlight .ld {
|
||||
color: #586e75;
|
||||
} /* Literal.Date */
|
||||
.highlight .m {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number */
|
||||
.highlight .s {
|
||||
color: #2aa198;
|
||||
} /* Literal.String */
|
||||
.highlight .na {
|
||||
color: #586e75;
|
||||
} /* Name.Attribute */
|
||||
.highlight .nb {
|
||||
color: #b58900;
|
||||
} /* Name.Builtin */
|
||||
.highlight .nc {
|
||||
color: #22b3eb;
|
||||
} /* Name.Class */
|
||||
.highlight .no {
|
||||
color: #cb4b16;
|
||||
} /* Name.Constant */
|
||||
.highlight .nd {
|
||||
color: #22b3eb;
|
||||
} /* Name.Decorator */
|
||||
.highlight .ni {
|
||||
color: #cb4b16;
|
||||
} /* Name.Entity */
|
||||
.highlight .ne {
|
||||
color: #cb4b16;
|
||||
} /* Name.Exception */
|
||||
.highlight .nf {
|
||||
color: #22b3eb;
|
||||
} /* Name.Function */
|
||||
.highlight .nl {
|
||||
color: #586e75;
|
||||
} /* Name.Label */
|
||||
.highlight .nn {
|
||||
color: #586e75;
|
||||
} /* Name.Namespace */
|
||||
.highlight .nx {
|
||||
color: #586e75;
|
||||
} /* Name.Other */
|
||||
.highlight .py {
|
||||
color: #586e75;
|
||||
} /* Name.Property */
|
||||
.highlight .nt {
|
||||
color: #22b3eb;
|
||||
} /* Name.Tag */
|
||||
.highlight .nv {
|
||||
color: #22b3eb;
|
||||
} /* Name.Variable */
|
||||
.highlight .ow {
|
||||
color: #859900;
|
||||
} /* Operator.Word */
|
||||
.highlight .w {
|
||||
color: #586e75;
|
||||
} /* Text.Whitespace */
|
||||
.highlight .mf {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number.Float */
|
||||
.highlight .mh {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number.Hex */
|
||||
.highlight .mi {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number.Integer */
|
||||
.highlight .mo {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number.Oct */
|
||||
.highlight .sb {
|
||||
color: #93a1a1;
|
||||
} /* Literal.String.Backtick */
|
||||
.highlight .sc {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Char */
|
||||
.highlight .sd {
|
||||
color: #586e75;
|
||||
} /* Literal.String.Doc */
|
||||
.highlight .s2 {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Double */
|
||||
.highlight .se {
|
||||
color: #cb4b16;
|
||||
} /* Literal.String.Escape */
|
||||
.highlight .sh {
|
||||
color: #586e75;
|
||||
} /* Literal.String.Heredoc */
|
||||
.highlight .si {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Interpol */
|
||||
.highlight .sx {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Other */
|
||||
.highlight .sr {
|
||||
color: #dc322f;
|
||||
} /* Literal.String.Regex */
|
||||
.highlight .s1 {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Single */
|
||||
.highlight .ss {
|
||||
color: #2aa198;
|
||||
} /* Literal.String.Symbol */
|
||||
.highlight .bp {
|
||||
color: #22b3eb;
|
||||
} /* Name.Builtin.Pseudo */
|
||||
.highlight .vc {
|
||||
color: #22b3eb;
|
||||
} /* Name.Variable.Class */
|
||||
.highlight .vg {
|
||||
color: #22b3eb;
|
||||
} /* Name.Variable.Global */
|
||||
.highlight .vi {
|
||||
color: #22b3eb;
|
||||
} /* Name.Variable.Instance */
|
||||
.highlight .il {
|
||||
color: #2aa198;
|
||||
} /* Literal.Number.Integer.Long */
|
||||
|
||||
@@ -8,7 +8,6 @@ table {
|
||||
font-family: $global-font-family;
|
||||
font-size: $type-size-6;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid $light-gray;
|
||||
|
||||
& + table {
|
||||
margin-top: 1em;
|
||||
@@ -16,23 +15,23 @@ table {
|
||||
}
|
||||
|
||||
thead {
|
||||
background-color: $lighter-gray;
|
||||
border-bottom: 1px solid $light-gray;
|
||||
background-color: $border-color;
|
||||
border-bottom: 2px solid mix(#000, $border-color, 25%);
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 0.5em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
border-right: 1px solid $light-gray;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0.5em;
|
||||
border-bottom: 1px solid $light-gray;
|
||||
border-right: 1px solid $light-gray;
|
||||
border-bottom: 1px solid mix(#000, $border-color, 25%);
|
||||
}
|
||||
|
||||
tr, td, th {
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
vertical-align: middle;
|
||||
}
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
/* http://www.456bereastreet.com/archive/200711/screen_readers_sometimes_ignore_displaynone/ */
|
||||
|
||||
.hidden {
|
||||
.hidden,
|
||||
.is--hidden {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
@@ -46,7 +47,7 @@ body:hover .visually-hidden button {
|
||||
/* screen readers */
|
||||
|
||||
.screen-reader-text:focus,
|
||||
.screen-reader-shortcut:focus {
|
||||
.screen-reader-shortcut:focus {
|
||||
clip: auto !important;
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
@@ -57,10 +58,9 @@ body:hover .visually-hidden button {
|
||||
background: #fff;
|
||||
z-index: 100000;
|
||||
text-decoration: none;
|
||||
box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
|
||||
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Skip links
|
||||
========================================================================== */
|
||||
@@ -79,7 +79,6 @@ body:hover .visually-hidden button {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Type
|
||||
========================================================================== */
|
||||
@@ -104,19 +103,21 @@ body:hover .visually-hidden button {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Alignment
|
||||
========================================================================== */
|
||||
|
||||
/* clearfix */
|
||||
|
||||
.cf { clear: both; }
|
||||
|
||||
.wrapper {
|
||||
@include container();
|
||||
.cf {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
Images
|
||||
@@ -159,7 +160,7 @@ body:hover .visually-hidden button {
|
||||
/* file page content container */
|
||||
|
||||
.full {
|
||||
@include breakpoint($large){
|
||||
@include breakpoint($large) {
|
||||
margin-right: -1 * span(2.5 of 12) !important;
|
||||
}
|
||||
}
|
||||
@@ -183,7 +184,7 @@ body:hover .visually-hidden button {
|
||||
|
||||
.social-icons {
|
||||
.fa {
|
||||
color: #000;
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
.fa-behance,
|
||||
@@ -191,6 +192,11 @@ body:hover .visually-hidden button {
|
||||
color: $behance-color;
|
||||
}
|
||||
|
||||
.fa-bitbucket,
|
||||
.fa-bitbucket-square {
|
||||
color: $bitbucket-color;
|
||||
}
|
||||
|
||||
.fa-dribbble {
|
||||
color: $dribbble-color;
|
||||
}
|
||||
@@ -284,7 +290,6 @@ body:hover .visually-hidden button {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Navicons
|
||||
========================================================================== */
|
||||
@@ -324,26 +329,26 @@ body:hover .visually-hidden button {
|
||||
background: transparent;
|
||||
|
||||
/* overlay the lines by setting both their top values to 0*/
|
||||
&:before, &:after{
|
||||
&:before,
|
||||
&:after {
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
top: 0;
|
||||
width: $navicon-width;
|
||||
}
|
||||
|
||||
/* rotate the lines to form the x shape*/
|
||||
&:before{
|
||||
-webkit-transform: rotate3d(0,0,1,45deg);
|
||||
transform: rotate3d(0,0,1,45deg);
|
||||
&:before {
|
||||
-webkit-transform: rotate3d(0, 0, 1, 45deg);
|
||||
transform: rotate3d(0, 0, 1, 45deg);
|
||||
}
|
||||
&:after{
|
||||
-webkit-transform: rotate3d(0,0,1,-45deg);
|
||||
transform: rotate3d(0,0,1,-45deg);
|
||||
&:after {
|
||||
-webkit-transform: rotate3d(0, 0, 1, -45deg);
|
||||
transform: rotate3d(0, 0, 1, -45deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sticky, fixed to top content
|
||||
========================================================================== */
|
||||
@@ -361,7 +366,6 @@ body:hover .visually-hidden button {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Wells
|
||||
========================================================================== */
|
||||
@@ -376,7 +380,6 @@ body:hover .visually-hidden button {
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Modals
|
||||
========================================================================== */
|
||||
@@ -431,7 +434,6 @@ body:hover .visually-hidden button {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Footnotes
|
||||
========================================================================== */
|
||||
@@ -444,7 +446,9 @@ body:hover .visually-hidden button {
|
||||
.footnotes {
|
||||
color: mix(#fff, $gray, 25%);
|
||||
|
||||
ol, li, p {
|
||||
ol,
|
||||
li,
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
font-size: $type-size-6;
|
||||
}
|
||||
@@ -459,7 +463,6 @@ a.reversefootnote {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Required
|
||||
========================================================================== */
|
||||
@@ -469,14 +472,14 @@ a.reversefootnote {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Google Custom Search Engine
|
||||
========================================================================== */
|
||||
|
||||
.gsc-control-cse {
|
||||
|
||||
table, tr, td {
|
||||
table,
|
||||
tr,
|
||||
td {
|
||||
border: 0; /* remove table borders widget */
|
||||
}
|
||||
}
|
||||
@@ -506,8 +509,8 @@ a.reversefootnote {
|
||||
|
||||
// full screen video fixes
|
||||
:-webkit-full-screen-ancestor {
|
||||
.masthead,
|
||||
.page__footer {
|
||||
.masthead,
|
||||
.page__footer {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,123 +6,132 @@
|
||||
Typography
|
||||
========================================================================== */
|
||||
|
||||
$doc-font-size : 16 !default;
|
||||
$doc-font-size : 16 !default;
|
||||
|
||||
/* paragraph indention */
|
||||
$paragraph-indent : false !default; // true, false (default)
|
||||
$indent-var : 1.3em !default;
|
||||
$paragraph-indent : false !default; // true, false (default)
|
||||
$indent-var : 1.3em !default;
|
||||
|
||||
/* system typefaces */
|
||||
$serif : Georgia, Times, serif !default;
|
||||
$sans-serif : -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif !default;
|
||||
$monospace : Monaco, Consolas, "Lucida Console", monospace !default;
|
||||
$serif : Georgia, Times, serif !default;
|
||||
$sans-serif : -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", Arial, sans-serif !default;
|
||||
$monospace : Monaco, Consolas, "Lucida Console", monospace !default;
|
||||
|
||||
/* sans serif typefaces */
|
||||
$sans-serif-narrow : $sans-serif !default;
|
||||
$helvetica : Helvetica, "Helvetica Neue", Arial, sans-serif !default;
|
||||
$sans-serif-narrow : $sans-serif !default;
|
||||
$helvetica : Helvetica, "Helvetica Neue", Arial, sans-serif !default;
|
||||
|
||||
/* serif typefaces */
|
||||
$georgia : Georgia, serif !default;
|
||||
$times : Times, serif !default;
|
||||
$bodoni : "Bodoni MT", serif !default;
|
||||
$calisto : "Calisto MT", serif !default;
|
||||
$garamond : Garamond, serif !default;
|
||||
$georgia : Georgia, serif !default;
|
||||
$times : Times, serif !default;
|
||||
$bodoni : "Bodoni MT", serif !default;
|
||||
$calisto : "Calisto MT", serif !default;
|
||||
$garamond : Garamond, serif !default;
|
||||
|
||||
$global-font-family : $sans-serif !default;
|
||||
$header-font-family : $sans-serif !default;
|
||||
$caption-font-family : $serif !default;
|
||||
$global-font-family : $sans-serif !default;
|
||||
$header-font-family : $sans-serif !default;
|
||||
$caption-font-family : $serif !default;
|
||||
|
||||
/* type scale */
|
||||
$type-size-1 : 2.441em !default; // ~39.056px
|
||||
$type-size-2 : 1.953em !default; // ~31.248px
|
||||
$type-size-3 : 1.563em !default; // ~25.008px
|
||||
$type-size-4 : 1.25em !default; // ~20px
|
||||
$type-size-5 : 1em !default; // ~16px
|
||||
$type-size-6 : 0.75em !default; // ~12px
|
||||
$type-size-7 : 0.6875em !default; // ~11px
|
||||
$type-size-8 : 0.625em !default; // ~10px
|
||||
$type-size-1 : 2.441em !default; // ~39.056px
|
||||
$type-size-2 : 1.953em !default; // ~31.248px
|
||||
$type-size-3 : 1.563em !default; // ~25.008px
|
||||
$type-size-4 : 1.25em !default; // ~20px
|
||||
$type-size-5 : 1em !default; // ~16px
|
||||
$type-size-6 : 0.75em !default; // ~12px
|
||||
$type-size-7 : 0.6875em !default; // ~11px
|
||||
$type-size-8 : 0.625em !default; // ~10px
|
||||
|
||||
|
||||
/*
|
||||
Colors
|
||||
========================================================================== */
|
||||
|
||||
$gray : #7a8288 !default;
|
||||
$dark-gray : mix(#000, $gray, 40%) !default;
|
||||
$darker-gray : mix(#000, $gray, 60%) !default;
|
||||
$light-gray : mix(#fff, $gray, 50%) !default;
|
||||
$lighter-gray : mix(#fff, $gray, 90%) !default;
|
||||
$gray : #7a8288 !default;
|
||||
$dark-gray : mix(#000, $gray, 40%) !default;
|
||||
$darker-gray : mix(#000, $gray, 60%) !default;
|
||||
$light-gray : mix(#fff, $gray, 50%) !default;
|
||||
$lighter-gray : mix(#fff, $gray, 90%) !default;
|
||||
|
||||
$body-color : #fff !default;
|
||||
$background-color : #fff !default;
|
||||
$code-background-color : #fafafa !default;
|
||||
$code-background-color-dark : $light-gray !default;
|
||||
$text-color : $dark-gray !default;
|
||||
$border-color : $lighter-gray !default;
|
||||
$background-color : #fff !default;
|
||||
$code-background-color : #fafafa !default;
|
||||
$code-background-color-dark : $light-gray !default;
|
||||
$text-color : $dark-gray !default;
|
||||
$muted-text-color : mix(#fff, $text-color, 35%) !default;
|
||||
$border-color : $lighter-gray !default;
|
||||
$form-background-color : $lighter-gray !default;
|
||||
$footer-background-color : $lighter-gray !default;
|
||||
|
||||
$primary-color : #7a8288 !default;
|
||||
$success-color : #62c462 !default;
|
||||
$warning-color : #f89406 !default;
|
||||
$danger-color : #ee5f5b !default;
|
||||
$info-color : #52adc8 !default;
|
||||
$primary-color : #7a8288 !default;
|
||||
$success-color : #62c462 !default;
|
||||
$warning-color : #f89406 !default;
|
||||
$danger-color : #ee5f5b !default;
|
||||
$info-color : #52adc8 !default;
|
||||
|
||||
/* YIQ color contrast */
|
||||
$yiq-contrasted-dark-default : $dark-gray !default;
|
||||
$yiq-contrasted-light-default : #fff !default;
|
||||
$yiq-contrasted-threshold : 175 !default;
|
||||
$yiq-debug : false !default;
|
||||
|
||||
/* brands */
|
||||
$behance-color : #1769FF !default;
|
||||
$dribbble-color : #ea4c89 !default;
|
||||
$facebook-color : #3b5998 !default;
|
||||
$flickr-color : #ff0084 !default;
|
||||
$foursquare-color : #0072b1 !default;
|
||||
$github-color : #171516 !default;
|
||||
$google-plus-color : #dd4b39 !default;
|
||||
$instagram-color : #517fa4 !default;
|
||||
$lastfm-color : #d51007 !default;
|
||||
$linkedin-color : #007bb6 !default;
|
||||
$pinterest-color : #cb2027 !default;
|
||||
$rss-color : #fa9b39 !default;
|
||||
$soundcloud-color : #ff3300 !default;
|
||||
$stackoverflow-color : #fe7a15 !default;
|
||||
$tumblr-color : #32506d !default;
|
||||
$twitter-color : #55acee !default;
|
||||
$vimeo-color : #1ab7ea !default;
|
||||
$vine-color : #00bf8f !default;
|
||||
$youtube-color : #bb0000 !default;
|
||||
$xing-color : #006567 !default;
|
||||
|
||||
$behance-color : #1769FF !default;
|
||||
$bitbucket-color : #205081 !default;
|
||||
$dribbble-color : #ea4c89 !default;
|
||||
$facebook-color : #3b5998 !default;
|
||||
$flickr-color : #ff0084 !default;
|
||||
$foursquare-color : #0072b1 !default;
|
||||
$github-color : #171516 !default;
|
||||
$google-plus-color : #dd4b39 !default;
|
||||
$instagram-color : #517fa4 !default;
|
||||
$lastfm-color : #d51007 !default;
|
||||
$linkedin-color : #007bb6 !default;
|
||||
$pinterest-color : #cb2027 !default;
|
||||
$rss-color : #fa9b39 !default;
|
||||
$soundcloud-color : #ff3300 !default;
|
||||
$stackoverflow-color : #fe7a15 !default;
|
||||
$tumblr-color : #32506d !default;
|
||||
$twitter-color : #55acee !default;
|
||||
$vimeo-color : #1ab7ea !default;
|
||||
$vine-color : #00bf8f !default;
|
||||
$youtube-color : #bb0000 !default;
|
||||
$xing-color : #006567 !default;
|
||||
|
||||
/* links */
|
||||
$link-color : $info-color !default;
|
||||
$link-color-hover : mix(#000, $link-color, 25%) !default;
|
||||
$link-color-visited : mix(#fff, $link-color, 25%) !default;
|
||||
$masthead-link-color : $primary-color !default;
|
||||
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
|
||||
|
||||
$link-color : $info-color !default;
|
||||
$link-color-hover : mix(#000, $link-color, 25%) !default;
|
||||
$link-color-visited : mix(#fff, $link-color, 25%) !default;
|
||||
$masthead-link-color : $primary-color !default;
|
||||
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
|
||||
$navicon-link-color-hover : mix(#fff, $primary-color, 75%) !default;
|
||||
|
||||
/*
|
||||
Breakpoints
|
||||
========================================================================== */
|
||||
|
||||
$small : 600px !default;
|
||||
$medium : 768px !default;
|
||||
$medium-wide : 900px !default;
|
||||
$large : 1024px !default;
|
||||
$x-large : 1280px !default;
|
||||
$small : 600px !default;
|
||||
$medium : 768px !default;
|
||||
$medium-wide : 900px !default;
|
||||
$large : 1024px !default;
|
||||
$x-large : 1280px !default;
|
||||
|
||||
|
||||
/*
|
||||
Grid
|
||||
========================================================================== */
|
||||
|
||||
$right-sidebar-width-narrow : 200px !default;
|
||||
$right-sidebar-width : 300px !default;
|
||||
$right-sidebar-width-wide : 400px !default;
|
||||
$right-sidebar-width-narrow : 200px !default;
|
||||
$right-sidebar-width : 300px !default;
|
||||
$right-sidebar-width-wide : 400px !default;
|
||||
|
||||
|
||||
/*
|
||||
Other
|
||||
========================================================================== */
|
||||
|
||||
$border-radius : 4px !default;
|
||||
$box-shadow : 0 1px 1px rgba(0, 0, 0, 0.125) !default;
|
||||
$navicon-width : 1.5rem !default;
|
||||
$navicon-height : 0.25rem !default;
|
||||
$global-transition : all 0.2s ease-in-out !default;
|
||||
$border-radius : 4px !default;
|
||||
$box-shadow : 0 1px 1px rgba(0, 0, 0, 0.125) !default;
|
||||
$navicon-width : 1.5rem !default;
|
||||
$navicon-height : 0.25rem !default;
|
||||
$global-transition : all 0.2s ease-in-out !default;
|
||||
$intro-transition : intro 0.3s both !default;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* ==========================================================================
|
||||
Air skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #eeeeee !default;
|
||||
$text-color: #222831 !default;
|
||||
$muted-text-color: #393e46 !default;
|
||||
$primary-color: #0092ca !default;
|
||||
$border-color: mix(#fff, #393e46, 75%) !default;
|
||||
$footer-background-color: $primary-color !default;
|
||||
$link-color: #393e46 !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: $text-color !default;
|
||||
$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default;
|
||||
|
||||
.page__footer {
|
||||
color: #fff !important; // override
|
||||
}
|
||||
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/* ==========================================================================
|
||||
Aqua skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$gray : #1976d2 !default;
|
||||
$dark-gray : mix(#000, $gray, 40%) !default;
|
||||
$darker-gray : mix(#000, $gray, 60%) !default;
|
||||
$light-gray : mix(#fff, $gray, 50%) !default;
|
||||
$lighter-gray : mix(#fff, $gray, 90%) !default;
|
||||
|
||||
$body-color : #fff !default;
|
||||
$background-color : #f0fff0 !default;
|
||||
$code-background-color : $lighter-gray !default;
|
||||
$code-background-color-dark : $light-gray !default;
|
||||
$text-color : $dark-gray !default;
|
||||
$border-color : $lighter-gray !default;
|
||||
|
||||
$primary-color : $gray !default;
|
||||
$success-color : #27ae60 !default;
|
||||
$warning-color : #e67e22 !default;
|
||||
$danger-color : #c0392b !default;
|
||||
$info-color : #03a9f4 !default;
|
||||
|
||||
/* links */
|
||||
$link-color : $info-color !default;
|
||||
$link-color-hover : mix(#000, $link-color, 25%) !default;
|
||||
$link-color-visited : mix(#fff, $link-color, 25%) !default;
|
||||
$masthead-link-color : $primary-color !default;
|
||||
$masthead-link-color-hover : mix(#000, $primary-color, 25%) !default;
|
||||
@@ -0,0 +1,34 @@
|
||||
/* ==========================================================================
|
||||
Contrast skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$text-color: #000 !default;
|
||||
$muted-text-color: $text-color !default;
|
||||
$primary-color: #ff0000 !default;
|
||||
$border-color: mix(#fff, $text-color, 75%) !default;
|
||||
$footer-background-color: #000 !default;
|
||||
$link-color: #0000ff !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: $text-color !default;
|
||||
$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default;
|
||||
|
||||
.page__content {
|
||||
|
||||
.notice,
|
||||
.notice--primary,
|
||||
.notice--info,
|
||||
.notice--warning,
|
||||
.notice--success,
|
||||
.notice--danger {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
|
||||
.page__footer {
|
||||
color: #fff !important; // override
|
||||
}
|
||||
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* ==========================================================================
|
||||
Dark skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #252a34 !default;
|
||||
$text-color: #eaeaea !default;
|
||||
$primary-color: #00adb5 !default;
|
||||
$border-color: mix(#fff, $background-color, 20%) !default;
|
||||
$code-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$code-background-color-dark: mix(#000, $background-color, 20%) !default;
|
||||
$form-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$footer-background-color: mix(#000, $background-color, 30%) !default;
|
||||
$link-color: mix($primary-color, $text-color, 40%) !default;
|
||||
$link-color-hover: mix(#fff, $link-color, 25%) !default;
|
||||
$link-color-visited: mix(#000, $link-color, 25%) !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
||||
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
||||
|
||||
.author__urls.social-icons .fa,
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Default skin
|
||||
========================================================================== */
|
||||
|
||||
// Intentionally left blank
|
||||
@@ -0,0 +1,15 @@
|
||||
/* ==========================================================================
|
||||
Dirt skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #f3f3f3 !default;
|
||||
$text-color: #343434 !default;
|
||||
$muted-text-color: #8e8b82 !default;
|
||||
$primary-color: #343434 !default;
|
||||
$border-color: #e9dcbe !default;
|
||||
$footer-background-color: #e9dcbe !default;
|
||||
$link-color: #343434 !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: $text-color !default;
|
||||
$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default;
|
||||
@@ -0,0 +1,23 @@
|
||||
/* ==========================================================================
|
||||
Mint skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #f3f6f6 !default;
|
||||
$text-color: #40514e !default;
|
||||
$muted-text-color: #40514e !default;
|
||||
$primary-color: #11999e !default;
|
||||
$border-color: mix(#fff, #40514e, 75%) !default;
|
||||
$footer-background-color: #30e3ca !default;
|
||||
$link-color: #11999e !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: $text-color !default;
|
||||
$navicon-link-color-hover: mix(#fff, $text-color, 80%) !default;
|
||||
|
||||
.page__footer {
|
||||
color: #fff !important; // override
|
||||
}
|
||||
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/* ==========================================================================
|
||||
Neon skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #141010 !default;
|
||||
$text-color: #fff6fb !default;
|
||||
$primary-color: #f21368 !default;
|
||||
$border-color: mix(#fff, $background-color, 20%) !default;
|
||||
$code-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$code-background-color-dark: mix(#000, $background-color, 20%) !default;
|
||||
$form-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$footer-background-color: mix($primary-color, #000, 10%) !default;
|
||||
$link-color: $primary-color !default;
|
||||
$link-color-hover: mix(#fff, $link-color, 25%) !default;
|
||||
$link-color-visited: mix(#000, $link-color, 25%) !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
||||
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
||||
|
||||
.author__urls.social-icons .fa,
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* next/previous buttons */
|
||||
.pagination--pager {
|
||||
color: $text-color;
|
||||
background-color: $primary-color;
|
||||
border-color: transparent;
|
||||
|
||||
&:visited {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/* ==========================================================================
|
||||
Plum skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$background-color: #521477 !default;
|
||||
$text-color: #fffd86 !default;
|
||||
$primary-color: #c327ab !default;
|
||||
$border-color: mix(#fff, $background-color, 20%) !default;
|
||||
$code-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$code-background-color-dark: mix(#000, $background-color, 20%) !default;
|
||||
$form-background-color: mix(#000, $background-color, 15%) !default;
|
||||
$footer-background-color: mix(#000, $background-color, 25%) !default;
|
||||
$link-color: $primary-color !default;
|
||||
$link-color-hover: mix(#fff, $link-color, 25%) !default;
|
||||
$link-color-visited: mix(#000, $link-color, 25%) !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
||||
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
||||
|
||||
.author__urls.social-icons .fa,
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.page__content {
|
||||
a,
|
||||
a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/* next/previous buttons */
|
||||
.pagination--pager {
|
||||
color: $text-color;
|
||||
background-color: $primary-color;
|
||||
border-color: transparent;
|
||||
|
||||
&:visited {
|
||||
color: $text-color;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/* ==========================================================================
|
||||
Sunrise skin
|
||||
========================================================================== */
|
||||
|
||||
/* Colors */
|
||||
$dark-gray: #0e2431 !default;
|
||||
$background-color: #e8d5b7 !default;
|
||||
$text-color: #000 !default;
|
||||
$muted-text-color: $dark-gray !default;
|
||||
$primary-color: #fc3a52 !default;
|
||||
$border-color: mix(#000, $background-color, 20%) !default;
|
||||
$code-background-color: mix(#fff, $background-color, 20%) !default;
|
||||
$code-background-color-dark: mix(#000, $background-color, 10%) !default;
|
||||
$form-background-color: mix(#fff, $background-color, 15%) !default;
|
||||
$footer-background-color: #f9b248 !default;
|
||||
$link-color: mix(#000, $primary-color, 10%) !default;
|
||||
$link-color-hover: mix(#fff, $link-color, 25%) !default;
|
||||
$link-color-visited: mix(#000, $link-color, 25%) !default;
|
||||
$masthead-link-color: $text-color !default;
|
||||
$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;
|
||||
$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;
|
||||
|
||||
.author__urls.social-icons .fa,
|
||||
.page__footer-follow .social-icons .fa {
|
||||
color: inherit;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Susy (Prefixed)
|
||||
// ===============
|
||||
|
||||
$susy-version: 3;
|
||||
|
||||
@import 'susy/utilities';
|
||||
@import 'susy/su-validate';
|
||||
@import 'susy/su-math';
|
||||
@import 'susy/settings';
|
||||
@import 'susy/normalize';
|
||||
@import 'susy/parse';
|
||||
@import 'susy/syntax-helpers';
|
||||
@import 'susy/api';
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
// Susy
|
||||
// ====
|
||||
// Susy (Un-Prefixed)
|
||||
// ==================
|
||||
|
||||
@import 'susy/language/susy';
|
||||
@import 'susy-prefix';
|
||||
@import 'susy/unprefix';
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// Susy
|
||||
// ====
|
||||
|
||||
@import 'susy/language/susyone';
|
||||
@@ -0,0 +1,5 @@
|
||||
// SVG Grid Background
|
||||
// ===================
|
||||
|
||||
@import 'svg-grid/prefix';
|
||||
@import 'svg-grid/svg-unprefix';
|
||||
@@ -0,0 +1,7 @@
|
||||
// Prefixed SVG Plugin
|
||||
// ===================
|
||||
|
||||
@import 'svg-settings';
|
||||
@import 'svg-utilities';
|
||||
@import 'svg-grid-math';
|
||||
@import 'svg-api';
|
||||
@@ -0,0 +1,114 @@
|
||||
/// Plugin: SVG Grid Image
|
||||
/// ======================
|
||||
/// @group plugin_svg-grid
|
||||
/// @see susy-svg-grid
|
||||
|
||||
|
||||
|
||||
/// ## Overview
|
||||
/// If you want to generate svg-backgrounds
|
||||
/// for help visualizing and debugging your grids,
|
||||
/// import the SVG Grid Plugin.
|
||||
///
|
||||
/// The plugin adds `svg-grid-colors` setting
|
||||
/// to your global defaults,
|
||||
/// which you can override in `$susy`.
|
||||
/// It also provides you with a new function,
|
||||
/// `susy-svg-grid()`,
|
||||
/// which will return inline svg for use in
|
||||
/// backgrounds or generated content.
|
||||
///
|
||||
/// This function come with an unprefixed alias by default,
|
||||
/// using the `svg-grid` import.
|
||||
/// If you only only want prefixed versions of the API,
|
||||
/// import the `svg-grid/prefix` partial instead.
|
||||
///
|
||||
/// @group plugin_svg-grid
|
||||
///
|
||||
/// @example scss - importing the plugin
|
||||
/// // The full path to import Susy will depend on your setup…
|
||||
///
|
||||
/// // unprefixed
|
||||
/// @import 'plugins/svg-grid';
|
||||
///
|
||||
/// // prefixed
|
||||
/// @import 'plugins/svg-grid/prefix';
|
||||
///
|
||||
/// @example scss - generating background grids
|
||||
/// .grid {
|
||||
/// background: susy-svg-grid() no-repeat scroll;
|
||||
/// }
|
||||
|
||||
|
||||
|
||||
// SVG Grid
|
||||
// --------
|
||||
/// Return inline svg-data in to display the grid.
|
||||
///
|
||||
/// @group plugin_svg-grid
|
||||
///
|
||||
/// @param {Map | List} $grid [$susy] -
|
||||
/// Map or shorthand defining the current grid
|
||||
/// @param {Color | List | null} $colors [null] -
|
||||
/// Column color, or list of colors for column-gradient,
|
||||
/// used to override the global `svg-grid-colors` setting
|
||||
/// @param {Length | null} $offset [null] -
|
||||
/// Manually override the default grid-image offset,
|
||||
/// to account for grid edges
|
||||
///
|
||||
/// @return {String} -
|
||||
/// CSS inline-data SVG string, in `url(<svg>)` format,
|
||||
/// for use in image or content properties
|
||||
/// @example scss
|
||||
/// .grid {
|
||||
/// background: susy-svg-grid() no-repeat scroll;
|
||||
/// }
|
||||
@function susy-svg-grid(
|
||||
$grid: $susy,
|
||||
$colors: null,
|
||||
$offset: null
|
||||
) {
|
||||
// Grid parsing & normalizing
|
||||
$grid: susy-compile($grid, $context-only: true);
|
||||
|
||||
// Color and gradient handling
|
||||
$gradient: '';
|
||||
|
||||
@if (not $colors) {
|
||||
$colors: susy-get('svg-grid-colors');
|
||||
}
|
||||
|
||||
@if length($colors) > 1 {
|
||||
$gradient: _susy-svg-gradient($colors);
|
||||
$colors: 'url(%23susy-svg-gradient)';
|
||||
} @else {
|
||||
$colors: _susy-svg-color($colors);
|
||||
}
|
||||
|
||||
// Get a default image-width
|
||||
$span: (
|
||||
'span': map-get($grid, 'columns'),
|
||||
'spread': map-get($grid, 'container-spread'),
|
||||
);
|
||||
$span: map-merge($grid, $span);
|
||||
$image-width: su-call('su-span', $span);
|
||||
$image-width: if((type-of($image-width) == 'number'), $image-width, 100%);
|
||||
|
||||
// SVG construction
|
||||
$columns: map-get($grid, 'columns');
|
||||
$offset: $offset or _susy-svg-offset($grid);
|
||||
|
||||
$attrs: 'fill="#{$colors}" width="#{$image-width}"';
|
||||
$svg: 'data:image/svg+xml,';
|
||||
$svg: $svg + '%3Csvg xmlns="http://www.w3.org/2000/svg" #{$attrs} %3E';
|
||||
$svg: $svg + $gradient;
|
||||
|
||||
@for $column from 1 through length($columns) {
|
||||
$width: susy-span(1 narrow at $column, $grid);
|
||||
$x: _susy-svg-column-position($column, $grid);
|
||||
|
||||
$svg: $svg + _susy-svg-rect($x, $width, $offset);
|
||||
}
|
||||
|
||||
@return url('#{$svg}%3C/svg%3E');
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// SVG Grid Math
|
||||
// =============
|
||||
|
||||
|
||||
|
||||
// SVG Column Position
|
||||
// -------------------
|
||||
/// Determine the proper horizontal position
|
||||
/// for a column rectangle
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {Integer} $column -
|
||||
/// 1-indexed column location on the grid
|
||||
/// @param {Map} $grid -
|
||||
/// Normalized settings map representing the current grid
|
||||
///
|
||||
/// @return {Length} -
|
||||
/// Horizontal position of svg column rectangle,
|
||||
/// as distance from the grid edge
|
||||
@function _susy-svg-column-position(
|
||||
$column,
|
||||
$grid
|
||||
) {
|
||||
$x: $column - 1;
|
||||
|
||||
@if ($x > 0) {
|
||||
$x: susy-span(first $x wide, $grid);
|
||||
}
|
||||
|
||||
@return $x;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SVG Offset
|
||||
// ----------
|
||||
/// Determine if a grid image needs to be offset,
|
||||
/// to account for edge gutters.
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {Map} $grid -
|
||||
/// Normalized settings map representing the current grid
|
||||
///
|
||||
/// @return {Length | null} -
|
||||
/// Expected distance from container edge to first column,
|
||||
/// based on spread values and gutter-widths
|
||||
@function _susy-svg-offset(
|
||||
$grid
|
||||
) {
|
||||
$columns: su-valid-columns(map-get($grid, 'columns'));
|
||||
$gutters: su-valid-gutters(map-get($grid, 'gutters'));
|
||||
$container: su-valid-spread(map-get($grid, 'container-spread')) + 1;
|
||||
|
||||
@if ($container == 0) {
|
||||
@return null;
|
||||
}
|
||||
|
||||
$gutter: su-call('su-gutter', $grid);
|
||||
|
||||
@if (type-of($gutter) == 'string') {
|
||||
@return 'calc(#{$container} * #{$gutter} / 2)';
|
||||
}
|
||||
|
||||
@return $container * $gutter / 2;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// SVG Settings
|
||||
// ============
|
||||
|
||||
|
||||
// Susy SVG Defaults
|
||||
// =================
|
||||
/// This plugin adds the `svg-grid-colors` property
|
||||
/// and default value to `$_susy-defaults` —
|
||||
/// you can override that value in `$susy`
|
||||
/// or any other grid settings map.
|
||||
/// @group plugin_svg-grid
|
||||
$_susy-defaults: map-merge((
|
||||
'svg-grid-colors': hsla(120, 50%, 50%, 0.5) hsla(120, 50%, 75%, 0.5),
|
||||
), $_susy-defaults);
|
||||
@@ -0,0 +1,18 @@
|
||||
// Unprefix Susy SVG Grid
|
||||
// ======================
|
||||
|
||||
|
||||
|
||||
// SVG Grid
|
||||
// --------
|
||||
/// Un-prefixed alias for `susy-svg-grid`
|
||||
///
|
||||
/// @group plugin_svg-grid
|
||||
/// @alias susy-svg-grid
|
||||
@function svg-grid(
|
||||
$grid: $susy,
|
||||
$colors: susy-get('svg-grid-colors'),
|
||||
$offset: null
|
||||
) {
|
||||
@return susy-svg-grid($grid, $colors, $offset);
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// SVG Utilities
|
||||
// =============
|
||||
|
||||
|
||||
|
||||
// SVG Validate Units
|
||||
// ------------------
|
||||
/// Make sure a length is supported in svg
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {Length} $length -
|
||||
/// The length to validate
|
||||
/// @param {String} $name [null] -
|
||||
/// Optional name of length origin,
|
||||
/// for error reporting
|
||||
///
|
||||
/// @return {Length} -
|
||||
/// An svg-validated length, or comparable valid length
|
||||
@function _susy-svg-validate-units(
|
||||
$length,
|
||||
$name: null
|
||||
) {
|
||||
$_svg-units: ('em', 'ex', 'px', 'pt', 'pc', 'cm', 'mm', 'in', '%');
|
||||
$string: type-of($length) == 'string';
|
||||
|
||||
@if ($length == 0) or ($string) or index($_svg-units, unit($length)) {
|
||||
@return $length;
|
||||
}
|
||||
|
||||
@return _susy-error(
|
||||
'`#{unit($length)}` #{$name} units are not supported in SVG',
|
||||
'_susy-svg-validate-units');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SVG Rect
|
||||
// --------
|
||||
/// Build a single svg rectangle
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {Length} $x -
|
||||
/// Horizontal position for the rectangle
|
||||
/// @param {Length} $width -
|
||||
/// Width of the rectangle
|
||||
/// @param {Length} $offset [null] -
|
||||
/// Offset the rectangle, to account for edge gutters
|
||||
///
|
||||
/// @return {String} -
|
||||
/// Escaped string representing one svg rectangle
|
||||
@function _susy-svg-rect(
|
||||
$x,
|
||||
$width,
|
||||
$offset: null
|
||||
) {
|
||||
$x: _susy-svg-validate-units($x);
|
||||
$width: _susy-svg-validate-units($width);
|
||||
$offset: if($offset == 0, null, $offset);
|
||||
|
||||
@if (type-of($offset) == 'number') and (type-of($x) == 'number') {
|
||||
@if comparable($x, $offset) {
|
||||
$x: $x + $offset;
|
||||
} @else {
|
||||
$x: 'calc(#{$x} + #{$offset})';
|
||||
}
|
||||
} @else if $offset and ($x != 0) {
|
||||
$x: 'calc(#{$x} + #{$offset})';
|
||||
} @else if $offset {
|
||||
$x: $offset;
|
||||
}
|
||||
|
||||
@return '%3Crect x="#{$x}" width="#{$width}" height="100%"/%3E';
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SVG Color
|
||||
// ---------
|
||||
/// Stringify colors, and escape hex symbol
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {Color} $color -
|
||||
/// Color to stringify and escape
|
||||
///
|
||||
/// @return {String} -
|
||||
/// Escaped string value of color
|
||||
@function _susy-svg-color(
|
||||
$color
|
||||
) {
|
||||
$color: inspect($color); // convert to string
|
||||
|
||||
@if (str-index($color, '#') == 1) {
|
||||
$color: '%23' + str-slice($color, 2);
|
||||
}
|
||||
|
||||
@return $color;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// SVG Gradient
|
||||
// ------------
|
||||
/// Create a multi-color svg gradient
|
||||
///
|
||||
/// @access private
|
||||
///
|
||||
/// @param {List} $colors -
|
||||
/// List of colors to be equally spaced from `0%` to `100%`
|
||||
/// in each column rectangle
|
||||
///
|
||||
/// @return {String} -
|
||||
/// Escaped string representing one svg gradient
|
||||
/// (`id="susy-svg-gradient"`)
|
||||
@function _susy-svg-gradient(
|
||||
$colors
|
||||
) {
|
||||
$gradient: '%3Cdefs%3E%3ClinearGradient spreadMethod="pad"';
|
||||
$gradient: '#{$gradient} id="susy-svg-gradient"';
|
||||
$gradient: '#{$gradient} x1="0%" y1="0%" x2="100%" y2="0%"%3E';
|
||||
|
||||
@for $i from 1 through length($colors) {
|
||||
$color: _susy-svg-color(nth($colors, $i));
|
||||
$offset: percentage(($i - 1) / (length($colors) - 1));
|
||||
$stop: '%3Cstop offset="#{$offset}" style="stop-color:#{$color};" /%3E';
|
||||
|
||||
$gradient: $gradient + $stop;
|
||||
}
|
||||
|
||||
@return $gradient + '%3C/linearGradient%3E%3C/defs%3E';
|
||||
}
|
||||
+318
@@ -0,0 +1,318 @@
|
||||
/// Susy3 API Functions
|
||||
/// ===================
|
||||
/// These three functions form the core of Susy's
|
||||
/// layout-building grid API.
|
||||
///
|
||||
/// - Use `span()` and `gutter()` to return any grid-width,
|
||||
/// and apply the results wherever you need them:
|
||||
/// CSS `width`, `margin`, `padding`, `flex-basis`, `transform`, etc.
|
||||
/// - For asymmetrical-fluid grids,
|
||||
/// `slice()` can help manage your nesting context.
|
||||
///
|
||||
/// All three functions come with an unprefixed alias by default,
|
||||
/// using the `susy` import.
|
||||
/// Import the `susy-prefix` partial instead,
|
||||
/// if you only only want prefixed versions of the API.
|
||||
///
|
||||
/// This is a thin syntax-sugar shell around
|
||||
/// the "Su" core-math functions: `su-span`, `su-gutter`, and `su-slice`.
|
||||
/// If you prefer the more constrained syntax of the math engine,
|
||||
/// you are welcome to use those functions instead.
|
||||
///
|
||||
/// @group b-api
|
||||
/// @see susy-span
|
||||
/// @see susy-gutter
|
||||
/// @see susy-slice
|
||||
/// @see su-span
|
||||
/// @see su-gutter
|
||||
/// @see su-slice
|
||||
|
||||
|
||||
|
||||
/// ## Shorthand
|
||||
///
|
||||
/// All functions draw on the same shorthand syntax in two parts,
|
||||
/// seperated by the word `of`.
|
||||
///
|
||||
/// ### Span Syntax: `<width>` [`<location>` `<spread>`]
|
||||
/// The first part describes the
|
||||
/// **span** width, location, and spread in any order.
|
||||
/// Only the width is required:
|
||||
///
|
||||
/// - `span(2)` will return the width of 2 columns.
|
||||
/// - `span(3 wide)` will return 3-columns, with an additional gutter.
|
||||
/// - location is only needed with asymmetrical grids,
|
||||
/// where `span(3 at 2)` will return the width of
|
||||
/// specific columns on the grid.
|
||||
/// Since these are functions, they will not handle placement for you.
|
||||
///
|
||||
/// ### Context Syntax: `[of <columns> <container-spread> <gutters>]`
|
||||
/// The second half of Susy's shorthand
|
||||
/// describes the grid-**context** –
|
||||
/// available columns, container-spread, and optional gutter override –
|
||||
/// in any order.
|
||||
/// All of these settings have globally-defined defaults:
|
||||
///
|
||||
/// - `span(2 of 6)` will set the context to
|
||||
/// a slice of 6 columns from the global grid.
|
||||
/// More details below.
|
||||
/// - `span(2 of 12 wide)` changes the container-spread
|
||||
/// as well as the column-context.
|
||||
/// - `span(2 of 12 set-gutters 0.5em)`
|
||||
/// will override the global gutters setting
|
||||
/// for this one calculation.
|
||||
///
|
||||
/// A single unitless number for `columns`
|
||||
/// will be treated as a slice of the parent grid.
|
||||
/// On a grid with `columns: susy-repeat(12, 120px)`,
|
||||
/// the shorthand `of 4` will use the parent `120px` column-width.
|
||||
/// You can also be more explicit,
|
||||
/// and say `of susy-repeat(4, 100px)`.
|
||||
/// If you are using asymmetrical grids,
|
||||
/// like `columns: (1 1 2 3 5 8)`,
|
||||
/// Susy can't slice it for you without knowing which columns you want.
|
||||
/// The `slice` function accepts exactly the same syntax as `span`,
|
||||
/// but returns a list of columns rather than a width.
|
||||
/// Use it in your context like `of slice(first 3)`.
|
||||
///
|
||||
/// @group b-api
|
||||
|
||||
|
||||
|
||||
// Susy Span
|
||||
// ---------
|
||||
/// This is the primary function in Susy —
|
||||
/// used to return the width of a span across one or more columns,
|
||||
/// and any relevant gutters along the way.
|
||||
/// With the default settings,
|
||||
/// `span(3)` will return the width of 3 columns,
|
||||
/// and the 2 intermediate gutters.
|
||||
/// This can be used to set the `width` property of grid elements,
|
||||
/// or `margin` and `padding`
|
||||
/// to push, pull, and pad your elements.
|
||||
///
|
||||
/// - This is a thin syntax-sugar shell around
|
||||
/// the core-math `su-span()` function.
|
||||
/// - The un-prefixed alias `span()` is available by default.
|
||||
///
|
||||
/// @group b-api
|
||||
/// @see su-span
|
||||
/// @see $susy
|
||||
///
|
||||
/// @param {list} $span -
|
||||
/// Shorthand expression to define the width of the span,
|
||||
/// optionally containing:
|
||||
/// - a count, length, or column-list span.
|
||||
/// - `at $n`, `first`, or `last` location on asymmetrical grids,
|
||||
/// where `at 1 == first`,
|
||||
/// and `last` will calculate the proper location
|
||||
/// based on columns and span.
|
||||
/// - `narrow`, `wide`, or `wider` for optionally spreading
|
||||
/// across adjacent gutters.
|
||||
/// - `of $n <spread>` for available grid columns
|
||||
/// and spread of the container.
|
||||
/// Span counts like `of 6` are valid
|
||||
/// in the context of symmetrical grids,
|
||||
/// where Susy can safely infer a slice of the parent columns.
|
||||
/// - and `set-gutters $n` to override global gutter settings.
|
||||
///
|
||||
/// @param {map} $config [()] -
|
||||
/// Optional map of Susy grid configuration settings.
|
||||
/// See `$susy` documentation for details.
|
||||
///
|
||||
/// @return {length} -
|
||||
/// Calculated length value, using the units given,
|
||||
/// or converting to `%` for fraction-based grids,
|
||||
/// or a full `calc` function when units/fractions
|
||||
/// are not comparable outside the browser.
|
||||
///
|
||||
/// @example scss - span half the grid
|
||||
/// .foo {
|
||||
/// // the result is a bit under 50% to account for gutters
|
||||
/// width: susy-span(6 of 12);
|
||||
/// }
|
||||
///
|
||||
/// @example scss - span a specific segment of asymmetrical grid
|
||||
/// .foo {
|
||||
/// width: susy-span(3 at 3 of (1 2 3 5 8));
|
||||
/// }
|
||||
@function susy-span(
|
||||
$span,
|
||||
$config: ()
|
||||
) {
|
||||
$output: susy-compile($span, $config);
|
||||
|
||||
@if map-get($output, 'span') {
|
||||
@return su-call('su-span', $output);
|
||||
}
|
||||
|
||||
$actual: '[#{type-of($span)}] `#{inspect($span)}`';
|
||||
@return _susy-error(
|
||||
'Unable to determine span value from #{$actual}.',
|
||||
'susy-span');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Susy Gutter
|
||||
// -----------
|
||||
/// The gutter function returns
|
||||
/// the width of a single gutter on your grid,
|
||||
/// to be applied where you see fit –
|
||||
/// on `margins`, `padding`, `transform`, or element `width`.
|
||||
///
|
||||
/// - This is a thin syntax-sugar shell around
|
||||
/// the core-math `su-gutter()` function.
|
||||
/// - The un-prefixed alias `gutter()` is available by default.
|
||||
///
|
||||
/// @group b-api
|
||||
/// @see su-gutter
|
||||
/// @see $susy
|
||||
///
|
||||
/// @param {list | number} $context [null] -
|
||||
/// Optional context for nested gutters,
|
||||
/// including shorthand for
|
||||
/// `columns`, `gutters`, and `container-spread`
|
||||
/// (additional shorthand will be ignored)
|
||||
///
|
||||
/// @param {map} $config [()] -
|
||||
/// Optional map of Susy grid configuration settings.
|
||||
/// See `$susy` documentation for details.
|
||||
///
|
||||
/// @return {length} -
|
||||
/// Width of a gutter as `%` of current context,
|
||||
/// or in the units defined by `column-width` when available
|
||||
///
|
||||
/// @example scss - add gutters before or after an element
|
||||
/// .floats {
|
||||
/// float: left;
|
||||
/// width: span(3 of 6);
|
||||
/// margin-left: gutter(of 6);
|
||||
/// }
|
||||
///
|
||||
/// @example scss - add gutters to padding
|
||||
/// .flexbox {
|
||||
/// flex: 1 1 span(3 wide of 6 wide);
|
||||
/// padding: gutter(of 6) / 2;
|
||||
/// }
|
||||
///
|
||||
@function susy-gutter(
|
||||
$context: susy-get('columns'),
|
||||
$config: ()
|
||||
) {
|
||||
$context: susy-compile($context, $config, 'context-only');
|
||||
|
||||
@return su-call('su-gutter', $context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Susy Slice
|
||||
// ----------
|
||||
/// Working with asymmetrical grids (un-equal column widths)
|
||||
/// can be challenging –
|
||||
/// expecially when they involve fluid/fractional elements.
|
||||
/// Describing a context `of (15em 6em 6em 6em 15em)` is a lot
|
||||
/// to put inside the span or gutter function shorthand.
|
||||
/// This slice function returns a sub-slice of asymmetrical columns to use
|
||||
/// for a nested context.
|
||||
/// `slice(3 at 2)` will give you a subset of the global grid,
|
||||
/// spanning 3 columns, starting with the second.
|
||||
///
|
||||
/// - This is a thin syntax-sugar shell around
|
||||
/// the core-math `su-slice()` function.
|
||||
/// - The un-prefixed alias `slice()` is available by default.
|
||||
///
|
||||
/// @group b-api
|
||||
/// @see su-slice
|
||||
/// @see $susy
|
||||
///
|
||||
/// @param {list} $span -
|
||||
/// Shorthand expression to define the subset span, optionally containing:
|
||||
/// - `at $n`, `first`, or `last` location on asymmetrical grids;
|
||||
/// - `of $n <spread>` for available grid columns
|
||||
/// and spread of the container
|
||||
/// - Span-counts like `of 6` are only valid
|
||||
/// in the context of symmetrical grids
|
||||
/// - Valid spreads include `narrow`, `wide`, or `wider`
|
||||
///
|
||||
/// @param {map} $config [()] -
|
||||
/// Optional map of Susy grid configuration settings.
|
||||
/// See `$susy` documentation for details.
|
||||
///
|
||||
/// @return {list} -
|
||||
/// Subset list of columns for use for a nested context
|
||||
///
|
||||
/// @example scss - Return a nested segment of asymmetrical grid
|
||||
/// $context: susy-slice(3 at 3 of (1 2 3 5 8));
|
||||
/// /* $context: #{$context}; */
|
||||
@function susy-slice(
|
||||
$span,
|
||||
$config: ()
|
||||
) {
|
||||
$span: susy-compile($span, $config);
|
||||
|
||||
@return su-call('su-slice', $span);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// ## Building Grids
|
||||
/// The web has come a long way
|
||||
/// since the days of double-margin-hacks
|
||||
/// and inconsistent subpixel rounding.
|
||||
/// In addition to floats and tables,
|
||||
/// we can now use much more powerful tools,
|
||||
/// like flexbox and CSS grid,
|
||||
/// to build more interesting and responsive layouts.
|
||||
///
|
||||
/// With Susy3, we hope you'll start moving in that direction.
|
||||
/// You can still build classic 12-column Grid Systems,
|
||||
/// and we'll help you get there,
|
||||
/// but Susy3 is primarily designed for a grid-math-on-demand
|
||||
/// approach to layout:
|
||||
/// applying our functions only where you really need grid math.
|
||||
/// Read the [intro article by OddBird][welcome] for more details.
|
||||
///
|
||||
/// [welcome]: http://oddbird.net/2017/06/28/susy3/
|
||||
///
|
||||
/// @group b-api
|
||||
/// @link http://oddbird.net/2017/06/28/susy3/ Article: Welcome to Susy3
|
||||
///
|
||||
/// @example scss - floats
|
||||
/// .float {
|
||||
/// width: span(3);
|
||||
/// margin-right: gutter();
|
||||
/// }
|
||||
///
|
||||
/// @example scss - flexbox
|
||||
/// .flexbox {
|
||||
/// flex: 1 1 span(3);
|
||||
/// // half a gutter on either side…
|
||||
/// padding: 0 gutter() / 2;
|
||||
/// }
|
||||
///
|
||||
/// @example scss - pushing and pulling
|
||||
/// .push-3 {
|
||||
/// margin-left: span(3 wide);
|
||||
/// }
|
||||
///
|
||||
/// .pull-3 {
|
||||
/// margin-left: 0 - span(3 wide);
|
||||
/// }
|
||||
///
|
||||
/// @example scss - building an attribute system
|
||||
/// // markup example: <div data-span="last 3"></div>
|
||||
/// [data-span] {
|
||||
/// float: left;
|
||||
///
|
||||
/// &:not([data-span*='last']) {
|
||||
/// margin-right: gutter();
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// @for $span from 1 through length(susy-get('columns')) {
|
||||
/// [data-span*='#{$span}'] {
|
||||
/// width: span($span);
|
||||
/// }
|
||||
/// }
|
||||
@@ -0,0 +1,261 @@
|
||||
/// Syntax Normalization
|
||||
/// ====================
|
||||
/// Susy is divided into two layers:
|
||||
/// "Su" provides the core math functions with a stripped-down syntax,
|
||||
/// while "Susy" adds global settings, shorthand syntax,
|
||||
/// and other helpers.
|
||||
/// Each setting (e.g. span, location, columns, spread, etc.)
|
||||
/// has a single canonical syntax in Su.
|
||||
///
|
||||
/// This normalization module helps translate between those layers,
|
||||
/// transforming parsed Susy input into
|
||||
/// values that Su will understand.
|
||||
///
|
||||
/// @group x-normal
|
||||
///
|
||||
/// @see susy-normalize
|
||||
/// @see susy-normalize-span
|
||||
/// @see susy-normalize-columns
|
||||
/// @see susy-normalize-spread
|
||||
/// @see susy-normalize-location
|
||||
|
||||
|
||||
|
||||
// Susy Normalize
|
||||
// --------------
|
||||
/// Normalize the values in a configuration map.
|
||||
/// In addition to the global `$susy` properties,
|
||||
/// this map can include local span-related imformation,
|
||||
/// like `span` and `location`.
|
||||
///
|
||||
/// Normalization does not check that values are valid,
|
||||
/// which will happen in the Su math layer.
|
||||
/// These functions merely look for known Susy syntax –
|
||||
/// returning a map with those shorthand values
|
||||
/// converted into low-level data for Su.
|
||||
/// For example `span: all` and `location: first`
|
||||
/// will be converted into specific numbers.
|
||||
///
|
||||
/// @group x-normal
|
||||
/// @see $susy
|
||||
/// @see susy-parse
|
||||
///
|
||||
/// @param {map} $config -
|
||||
/// Map of Susy configuration settings to normalize.
|
||||
/// See `$susy` and `susy-parse()` documentation for details.
|
||||
/// @param {map | null} $context [null] -
|
||||
/// Map of Susy configuration settings to use as global reference,
|
||||
/// or `null` to use global settings.
|
||||
///
|
||||
/// @return {map} -
|
||||
/// Map of Susy configuration settings,
|
||||
/// with all values normalized for Su math functions.
|
||||
@function susy-normalize(
|
||||
$config,
|
||||
$context: null
|
||||
) {
|
||||
// Spread
|
||||
@each $setting in ('spread', 'container-spread') {
|
||||
$value: map-get($config, $setting);
|
||||
|
||||
@if $value {
|
||||
$value: susy-normalize-spread($value);
|
||||
$config: map-merge($config, ($setting: $value));
|
||||
}
|
||||
}
|
||||
|
||||
// Columns
|
||||
$columns: map-get($config, 'columns');
|
||||
|
||||
@if $columns {
|
||||
$columns: susy-normalize-columns($columns, $context);
|
||||
$config: map-merge($config, ('columns': $columns));
|
||||
}
|
||||
|
||||
@if not $columns {
|
||||
$map: type-of($context) == 'map';
|
||||
$columns: if($map, map-get($context, 'columns'), null);
|
||||
$columns: $columns or susy-get('columns');
|
||||
}
|
||||
|
||||
// Span
|
||||
$span: map-get($config, 'span');
|
||||
|
||||
@if $span {
|
||||
$span: susy-normalize-span($span, $columns);
|
||||
$config: map-merge($config, ('span': $span));
|
||||
}
|
||||
|
||||
// Location
|
||||
$location: map-get($config, 'location');
|
||||
|
||||
@if $location {
|
||||
$location: susy-normalize-location($span, $location, $columns);
|
||||
$config: map-merge($config, ('location': $location));
|
||||
}
|
||||
|
||||
@return $config;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Normalize Span
|
||||
// --------------
|
||||
/// Normalize `span` shorthand for Su.
|
||||
/// Su span syntax allows an explicit length (e.g. `3em`),
|
||||
/// unitless column-span number (e.g. `3` columns),
|
||||
/// or an explicit list of columns (e.g. `(3 5 8)`).
|
||||
///
|
||||
/// Susy span syntax also allows the `all` keyword,
|
||||
/// which will be converted to a slice of the context
|
||||
/// in normalization.
|
||||
///
|
||||
/// @group x-normal
|
||||
///
|
||||
/// @param {number | list | 'all'} $span -
|
||||
/// Span value to normalize.
|
||||
/// @param {list} $columns -
|
||||
/// Normalized list of columns in the grid
|
||||
///
|
||||
/// @return {number | list} -
|
||||
/// Number or list value for `$span`
|
||||
@function susy-normalize-span(
|
||||
$span,
|
||||
$columns: susy-get('columns')
|
||||
) {
|
||||
@if ($span == 'all') {
|
||||
@return length($columns);
|
||||
}
|
||||
|
||||
@return $span;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Normalize Columns
|
||||
// -----------------
|
||||
/// Normalize `column` shorthand for Su.
|
||||
/// Su column syntax only allows column lists (e.g. `120px 1 1 1 120px`).
|
||||
///
|
||||
/// Susy span syntax also allows a unitless `slice` number (e.g `of 5`),
|
||||
/// which will be converted to a slice of the context
|
||||
/// in normalization.
|
||||
///
|
||||
/// @group x-normal
|
||||
///
|
||||
/// @param {list | integer} $columns -
|
||||
/// List of available columns,
|
||||
/// or unitless integer representing a slice of
|
||||
/// the available context.
|
||||
/// @param {map | null} $context [null] -
|
||||
/// Map of Susy configuration settings to use as global reference,
|
||||
/// or `null` to access global settings.
|
||||
///
|
||||
/// @return {list} -
|
||||
/// Columns list value, normalized for Su input.
|
||||
///
|
||||
/// @throws
|
||||
/// when attempting to access a slice of asymmetrical context
|
||||
@function susy-normalize-columns(
|
||||
$columns,
|
||||
$context: null
|
||||
) {
|
||||
$context: $context or susy-settings();
|
||||
|
||||
@if type-of($columns) == 'list' {
|
||||
@return _susy-flatten($columns);
|
||||
}
|
||||
|
||||
@if (type-of($columns) == 'number') and (unitless($columns)) {
|
||||
$span: $columns;
|
||||
$context: map-get($context, 'columns');
|
||||
$symmetrical: susy-repeat(length($context), nth($context, 1));
|
||||
|
||||
@if ($context == $symmetrical) {
|
||||
@return susy-repeat($span, nth($context, 1));
|
||||
} @else {
|
||||
$actual: 'of `#{$span}`';
|
||||
$columns: 'grid-columns `#{$context}`';
|
||||
@return _susy-error(
|
||||
'context-slice #{$actual} can not be determined based on #{$columns}.',
|
||||
'susy-normalize-columns');
|
||||
}
|
||||
}
|
||||
|
||||
@return $columns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Normalize Spread
|
||||
// ----------------
|
||||
/// Normalize `spread` shorthand for Su.
|
||||
/// Su spread syntax only allows the numbers `-1`, `0`, or `1` –
|
||||
/// representing the number of gutters covered
|
||||
/// in relation to columns spanned.
|
||||
///
|
||||
/// Susy spread syntax also allows keywords for each value –
|
||||
/// `narrow` for `-1`, `wide` for `0`, or `wider` for `1` –
|
||||
/// which will be converted to their respective integers
|
||||
/// in normalization.
|
||||
///
|
||||
/// @group x-normal
|
||||
///
|
||||
/// @param {0 | 1 | -1 | 'narrow' | 'wide' | 'wider'} $spread -
|
||||
/// Spread across adjacent gutters, relative to a column-count —
|
||||
/// either `narrow` (-1), `wide` (0), or `wider` (1)
|
||||
///
|
||||
/// @return {number} -
|
||||
/// Numeric value for `$spread`
|
||||
@function susy-normalize-spread(
|
||||
$spread
|
||||
) {
|
||||
$normal-spread: (
|
||||
'narrow': -1,
|
||||
'wide': 0,
|
||||
'wider': 1,
|
||||
);
|
||||
|
||||
@return map-get($normal-spread, $spread) or $spread;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Normalize Location
|
||||
// ------------------
|
||||
/// Normalize `location` shorthand for Su.
|
||||
/// Su location syntax requires the (1-indexed) number for a column.
|
||||
///
|
||||
/// Susy also allows the `first` and `last` keywords,
|
||||
/// where `first` is always `1`,
|
||||
/// and `last` is calculated based on span and column values.
|
||||
/// Both keywords are normalized into an integer index
|
||||
/// in normalization.
|
||||
///
|
||||
/// @group x-normal
|
||||
///
|
||||
/// @param {number} $span -
|
||||
/// Number of grid-columns to be spanned
|
||||
/// @param {integer | 'first' | 'last'} $location -
|
||||
/// Starting (1-indexed) column position of a span,
|
||||
/// or a named location keyword.
|
||||
/// @param {list} $columns -
|
||||
/// Already-normalized list of columns in the grid.
|
||||
///
|
||||
/// @return {integer} -
|
||||
/// Numeric value for `$location`
|
||||
@function susy-normalize-location(
|
||||
$span,
|
||||
$location,
|
||||
$columns
|
||||
) {
|
||||
$count: length($columns);
|
||||
$normal-locations: (
|
||||
'first': 1,
|
||||
'alpha': 1,
|
||||
'last': $count - $span + 1,
|
||||
'omega': $count - $span + 1,
|
||||
);
|
||||
|
||||
@return map-get($normal-locations, $location) or $location;
|
||||
}
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
/// Shorthand Syntax Parser
|
||||
/// =======================
|
||||
/// The syntax parser converts [shorthand syntax][short]
|
||||
/// into a map of settings that can be compared/merged with
|
||||
/// other config maps and global setting.
|
||||
///
|
||||
/// [short]: b-api.html
|
||||
///
|
||||
/// @group x-parser
|
||||
|
||||
|
||||
|
||||
// Parse
|
||||
// -----
|
||||
/// The `parse` function provides all the syntax-sugar in Susy,
|
||||
/// converting user shorthand
|
||||
/// into a usable map of keys and values
|
||||
/// that can be normalized and passed to Su.
|
||||
///
|
||||
/// @group x-parser
|
||||
/// @see $susy
|
||||
///
|
||||
/// @param {list} $shorthand -
|
||||
/// Shorthand expression to define the width of the span,
|
||||
/// optionally containing:
|
||||
/// - a count, length, or column-list span;
|
||||
/// - `at $n`, `first`, or `last` location on asymmetrical grids;
|
||||
/// - `narrow`, `wide`, or `wider` for optionally spreading
|
||||
/// across adjacent gutters;
|
||||
/// - `of $n <spread>` for available grid columns
|
||||
/// and spread of the container
|
||||
/// (span counts like `of 6` are only valid
|
||||
/// in the context of symmetrical grids);
|
||||
/// - and `set-gutters $n` to override global gutter settings
|
||||
/// @param {bool} $context-only [false] -
|
||||
/// Allow the parser to ignore span and span-spread values,
|
||||
/// only parsing context and container-spread.
|
||||
/// This makes it possible to accept spanless values,
|
||||
/// like the `gutters()` syntax.
|
||||
/// When parsing context-only,
|
||||
/// the `of` indicator is optional.
|
||||
///
|
||||
/// @return {map} -
|
||||
/// Map of span and grid settings
|
||||
/// parsed from shorthand input –
|
||||
/// including all the properties available globally –
|
||||
/// `columns`, `gutters`, `spread`, `container-spread` –
|
||||
/// along with the span-specific properties
|
||||
/// `span`, and `location`.
|
||||
///
|
||||
/// @throw
|
||||
/// when a shorthand value is not recognized
|
||||
@function susy-parse(
|
||||
$shorthand,
|
||||
$context-only: false
|
||||
) {
|
||||
$parse-error: 'Unknown shorthand property:';
|
||||
$options: (
|
||||
'first': 'location',
|
||||
'last': 'location',
|
||||
'alpha': 'location',
|
||||
'omega': 'location',
|
||||
'narrow': 'spread',
|
||||
'wide': 'spread',
|
||||
'wider': 'spread',
|
||||
);
|
||||
|
||||
$return: ();
|
||||
$span: null;
|
||||
$columns: null;
|
||||
|
||||
$of: null;
|
||||
$next: false;
|
||||
|
||||
// Allow context-only shorthand, without span
|
||||
@if ($context-only) and (not index($shorthand, 'of')) {
|
||||
@if su-valid-columns($shorthand, 'fail-silent') {
|
||||
$shorthand: 'of' $shorthand;
|
||||
} @else {
|
||||
$shorthand: join('of', $shorthand);
|
||||
}
|
||||
}
|
||||
|
||||
// loop through the shorthand list
|
||||
@for $i from 1 through length($shorthand) {
|
||||
$item: nth($shorthand, $i);
|
||||
$type: type-of($item);
|
||||
$error: false;
|
||||
$details: '[#{$type}] `#{$item}`';
|
||||
|
||||
// if we know what's supposed to be coming next…
|
||||
@if $next {
|
||||
|
||||
// Add to the return map
|
||||
$return: map-merge($return, ($next: $item));
|
||||
|
||||
// Reset next to `false`
|
||||
$next: false;
|
||||
|
||||
} @else { // If we don't know what's supposed to be coming…
|
||||
|
||||
// Keywords…
|
||||
@if ($type == 'string') {
|
||||
// Check the map for keywords…
|
||||
@if map-has-key($options, $item) {
|
||||
$setting: map-get($options, $item);
|
||||
|
||||
// Spread could be on the span or the container…
|
||||
@if ($setting == 'spread') and ($of) {
|
||||
$return: map-merge($return, ('container-spread': $item));
|
||||
} @else {
|
||||
$return: map-merge($return, ($setting: $item));
|
||||
}
|
||||
|
||||
} @else if ($item == 'all') {
|
||||
// `All` is a span shortcut
|
||||
$span: 'all';
|
||||
} @else if ($item == 'at') {
|
||||
// Some keywords setup what's next…
|
||||
$next: 'location';
|
||||
} @else if ($item == 'set-gutters') {
|
||||
$next: 'gutters';
|
||||
} @else if ($item == 'of') {
|
||||
$of: true;
|
||||
} @else {
|
||||
$error: true;
|
||||
}
|
||||
|
||||
} @else if ($type == 'number') or ($type == 'list') { // Numbers & lists…
|
||||
|
||||
@if not ($span or $of) {
|
||||
// We don't have a span, and we're not expecting context…
|
||||
$span: $item;
|
||||
} @else if ($of) and (not $columns) {
|
||||
// We are expecting context…
|
||||
$columns: $item;
|
||||
} @else {
|
||||
$error: true;
|
||||
}
|
||||
|
||||
} @else {
|
||||
$error: true;
|
||||
}
|
||||
}
|
||||
|
||||
@if $error {
|
||||
@return _susy-error('#{$parse-error} #{$details}', 'susy-parse');
|
||||
}
|
||||
}
|
||||
|
||||
// If we have span, merge it in
|
||||
@if $span {
|
||||
$return: map-merge($return, ('span': $span));
|
||||
}
|
||||
|
||||
// If we have columns, merge them in
|
||||
@if $columns {
|
||||
$return: map-merge($return, ('columns': $columns));
|
||||
}
|
||||
|
||||
// Return the map of settings…
|
||||
@return $return;
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
/// Susy3 Configuration
|
||||
/// ===================
|
||||
/// Susy3 has 4 core settings, in a single settings map.
|
||||
/// You'll notice a few differences from Susy2:
|
||||
///
|
||||
/// **Columns** no longer accept a single number, like `12`,
|
||||
/// but use a syntax more similar to the new
|
||||
/// CSS [grid-template-columns][columns] –
|
||||
/// a list of relative sizes for each column on the grid.
|
||||
/// Unitless numbers in Susy act very similar to `fr` units in CSS,
|
||||
/// and the `susy-repeat()` function (similar to the css `repeat()`)
|
||||
/// helps quickly establish equal-width columns.
|
||||
///
|
||||
/// [columns]: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns
|
||||
///
|
||||
/// - `susy-repeat(12)` will create 12 fluid, equal-width columns
|
||||
/// - `susy-repeat(6, 120px)` will create 6 equal `120px`-wide columns
|
||||
/// - `120px susy-repeat(4) 120px` will create 6 columns,
|
||||
/// the first and last are `120px`,
|
||||
/// while the middle 4 are equal fractions of the remainder.
|
||||
/// Susy will output `calc()` values in order to achieve this.
|
||||
///
|
||||
/// **Gutters** haven't changed –
|
||||
/// a single fraction or explicit width –
|
||||
/// but the `calc()` output feature
|
||||
/// means you can now use any combination of units and fractions
|
||||
/// to create static-gutters on a fluid grid, etc.
|
||||
///
|
||||
/// **Spread** existed in the Susy2 API as a span option,
|
||||
/// and was otherwise handled behind the scenes.
|
||||
/// Now we're giving you full control over all spread issues.
|
||||
/// You can find a more [detailed explanation of spread on the blog][spread].
|
||||
///
|
||||
/// [spread]: http://oddbird.net/2017/06/13/susy-spread/
|
||||
///
|
||||
/// You can access your global settings at any time
|
||||
/// with the `susy-settings()` function,
|
||||
/// or grab a single setting from the global scope
|
||||
/// with `susy-get('columns')`, `susy-get('gutters')` etc.
|
||||
///
|
||||
/// @group a-config
|
||||
/// @link http://oddbird.net/2017/06/13/susy-spread/
|
||||
/// Article: Understanding Spread in Susy3
|
||||
///
|
||||
/// @see $susy
|
||||
/// @see susy-settings
|
||||
/// @see susy-get
|
||||
|
||||
|
||||
|
||||
// Susy
|
||||
// ----
|
||||
/// The grid is defined in a single map variable,
|
||||
/// with four initial properties:
|
||||
/// `columns`, `gutters`, `spread` and `container-spread`.
|
||||
/// Anything you put in the root `$susy` variable map
|
||||
/// will be treated as a global project default.
|
||||
/// You can create similar configuration maps
|
||||
/// under different variable names,
|
||||
/// to override the defaults as-needed.
|
||||
///
|
||||
/// @group a-config
|
||||
/// @type Map
|
||||
///
|
||||
/// @see $_susy-defaults
|
||||
/// @see {function} susy-repeat
|
||||
/// @link
|
||||
/// https://codepen.io/mirisuzanne/pen/EgmJJp?editors=1100
|
||||
/// Spread examples on CodePen
|
||||
///
|
||||
/// @prop {list} columns -
|
||||
/// Columns are described by a list of numbers,
|
||||
/// representing the relative width of each column.
|
||||
/// The syntax is a simplified version of CSS native
|
||||
/// `grid-template-columns`,
|
||||
/// expecting a list of grid-column widths.
|
||||
/// Unitless numbers create fractional fluid columns
|
||||
/// (similar to the CSS-native `fr` unit),
|
||||
/// while length values (united numbers)
|
||||
/// are used to define static columns.
|
||||
/// You can mix-and match units and fractions,
|
||||
/// to create a mixed grid.
|
||||
/// Susy will generate `calc()` values when necessary,
|
||||
/// to make all your units work together.
|
||||
///
|
||||
/// Use the `susy-repeat($count, $value)` function
|
||||
/// to more easily repetative columns,
|
||||
/// similar to the CSS-native `repeat()`.
|
||||
///
|
||||
/// - `susy-repeat(8)`:
|
||||
/// an 8-column, symmetrical, fluid grid.
|
||||
/// <br />Identical to `(1 1 1 1 1 1 1 1)`.
|
||||
/// - `susy-repeat(6, 8em)`:
|
||||
/// a 6-column, symmetrical, em-based grid.
|
||||
/// <br />Identical to `(8em 8em 8em 8em 8em 8em)`.
|
||||
/// - `(300px susy-repeat(4) 300px)`:
|
||||
/// a 6-column, asymmetrical, mixed fluid/static grid
|
||||
/// using `calc()` output.
|
||||
/// <br />Identical to `(300px 1 1 1 1 300px)`.
|
||||
///
|
||||
/// **NOTE** that `12` is no longer a valid 12-column grid definition,
|
||||
/// and you must list all the columns individually
|
||||
/// (or by using the `susy-repeat()` function).
|
||||
///
|
||||
/// @prop {number} gutters -
|
||||
/// Gutters are defined as a single width,
|
||||
/// or fluid ratio, similar to the native-CSS
|
||||
/// `grid-column-gap` syntax.
|
||||
/// Similar to columns,
|
||||
/// gutters can use any valid CSS length unit,
|
||||
/// or unitless numbers to define a relative fraction.
|
||||
///
|
||||
/// - `0.5`:
|
||||
/// a fluid gutter, half the size of a single-fraction column.
|
||||
/// - `1em`:
|
||||
/// a static gutter, `1em` wide.
|
||||
///
|
||||
/// Mix static gutters with fluid columns, or vice versa,
|
||||
/// and Susy will generate the required `calc()` to make it work.
|
||||
///
|
||||
/// @prop {string} spread [narrow] -
|
||||
/// Spread of an element across adjacent gutters:
|
||||
/// either `narrow` (none), `wide` (one), or `wider` (two)
|
||||
///
|
||||
/// - Both spread settings default to `narrow`,
|
||||
/// the most common use-case.
|
||||
/// A `narrow` spread only has gutters *between* columns
|
||||
/// (one less gutter than columns).
|
||||
/// This is how all css-native grids work,
|
||||
/// and most margin-based grid systems.
|
||||
/// - A `wide` spread includes the same number of gutters as columns,
|
||||
/// spanning across a single side-gutter.
|
||||
/// This is how most padding-based grid systems often work,
|
||||
/// and is also useful for pushing and pulling elements into place.
|
||||
/// - The rare `wider` spread includes gutters
|
||||
/// on both sides of the column-span
|
||||
/// (one more gutters than columns).
|
||||
///
|
||||
/// @prop {string} container-spread [narrow] -
|
||||
/// Spread of a container around adjacent gutters:
|
||||
/// either `narrow` (none), `wide` (one), or `wider` (two).
|
||||
/// See `spread` property for details.
|
||||
///
|
||||
/// @since 3.0.0-beta.1 -
|
||||
/// `columns` setting no longer accepts numbers
|
||||
/// (e.g. `12`) for symmetrical fluid grids,
|
||||
/// or the initial `12 x 120px` syntax for
|
||||
/// symmetrical fixed-unit grids.
|
||||
/// Use `susy-repeat(12)` or `susy-repeat(12, 120px)` instead.
|
||||
///
|
||||
/// @example scss - default values
|
||||
/// // 4 symmetrical, fluid columns
|
||||
/// // gutters are 1/4 the size of a column
|
||||
/// // elements span 1 less gutter than columns
|
||||
/// // containers span 1 less gutter as well
|
||||
/// $susy: (
|
||||
/// 'columns': susy-repeat(4),
|
||||
/// 'gutters': 0.25,
|
||||
/// 'spread': 'narrow',
|
||||
/// 'container-spread': 'narrow',
|
||||
/// );
|
||||
///
|
||||
/// @example scss - inside-static gutters
|
||||
/// // 6 symmetrical, fluid columns…
|
||||
/// // gutters are static, triggering calc()…
|
||||
/// // elements span equal columns & gutters…
|
||||
/// // containers span equal columns & gutters…
|
||||
/// $susy: (
|
||||
/// 'columns': susy-repeat(6),
|
||||
/// 'gutters': 0.5em,
|
||||
/// 'spread': 'wide',
|
||||
/// 'container-spread': 'wide',
|
||||
/// );
|
||||
$susy: () !default;
|
||||
|
||||
|
||||
|
||||
// Susy Repeat
|
||||
// -----------
|
||||
/// Similar to the `repeat(<count>, <value>)` function
|
||||
/// that is available in native CSS Grid templates,
|
||||
/// the `susy-repeat()` function helps generate repetative layouts
|
||||
/// by repeating any value a given number of times.
|
||||
/// Where Susy previously allowed `8` as a column definition
|
||||
/// for 8 equal columns, you should now use `susy-repeat(8)`.
|
||||
///
|
||||
/// @group a-config
|
||||
///
|
||||
/// @param {integer} $count -
|
||||
/// The number of repetitions, e.g. `12` for a 12-column grid.
|
||||
/// @param {*} $value [1] -
|
||||
/// The value to be repeated.
|
||||
/// Technically any value can be repeated here,
|
||||
/// but the function exists to repeat column-width descriptions:
|
||||
/// e.g. the default `1` for single-fraction fluid columns,
|
||||
/// `5em` for a static column,
|
||||
/// or even `5em 120px` if you are alternating column widths.
|
||||
///
|
||||
/// @return {list} -
|
||||
/// List of repeated values
|
||||
///
|
||||
/// @example scss
|
||||
/// // 12 column grid, with 5em columns
|
||||
/// $susy: (
|
||||
/// columns: susy-repeat(12, 5em),
|
||||
/// );
|
||||
///
|
||||
/// @example scss
|
||||
/// // asymmetrical 5-column grid
|
||||
/// $susy: (
|
||||
/// columns: 20px susy-repeat(3, 100px) 20px,
|
||||
/// );
|
||||
///
|
||||
/// /* result: #{susy-get('columns')} */
|
||||
@function susy-repeat(
|
||||
$count,
|
||||
$value: 1
|
||||
) {
|
||||
$return: ();
|
||||
|
||||
@for $i from 1 through $count {
|
||||
$return: join($return, $value);
|
||||
}
|
||||
|
||||
@return $return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Susy Defaults
|
||||
// -------------
|
||||
/// Configuration map of Susy factory defaults.
|
||||
/// Do not override this map directly –
|
||||
/// use `$susy` for user and project setting overrides.
|
||||
///
|
||||
/// @access private
|
||||
/// @type Map
|
||||
///
|
||||
/// @see $susy
|
||||
///
|
||||
/// @prop {number | list} columns [susy-repeat(4)]
|
||||
/// @prop {number} gutters [0.25]
|
||||
/// @prop {string} spread ['narrow']
|
||||
/// @prop {string} container-spread ['narrow']
|
||||
$_susy-defaults: (
|
||||
'columns': susy-repeat(4),
|
||||
'gutters': 0.25,
|
||||
'spread': 'narrow',
|
||||
'container-spread': 'narrow',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Susy Settings
|
||||
// -------------
|
||||
/// Return a combined map of Susy settings,
|
||||
/// based on the factory defaults (`$_susy-defaults`),
|
||||
/// user-defined project configuration (`$susy`),
|
||||
/// and any local overrides required –
|
||||
/// such as a configuration map passed into a function.
|
||||
///
|
||||
/// @group a-config
|
||||
///
|
||||
/// @param {maps} $overrides… -
|
||||
/// Optional map override of global configuration settings.
|
||||
/// See `$susy` above for properties.
|
||||
///
|
||||
/// @return {map} -
|
||||
/// Combined map of Susy configuration settings,
|
||||
/// in order of specificity:
|
||||
/// any `$overrides...`,
|
||||
/// then `$susy` project settings,
|
||||
/// and finally the `$_susy-defaults`
|
||||
///
|
||||
/// @example scss - global settings
|
||||
/// @each $key, $value in susy-settings() {
|
||||
/// /* #{$key}: #{$value} */
|
||||
/// }
|
||||
///
|
||||
/// @example scss - local settings
|
||||
/// $local: ('columns': 1 2 3 5 8);
|
||||
///
|
||||
/// @each $key, $value in susy-settings($local) {
|
||||
/// /* #{$key}: #{$value} */
|
||||
/// }
|
||||
@function susy-settings(
|
||||
$overrides...
|
||||
) {
|
||||
$settings: map-merge($_susy-defaults, $susy);
|
||||
|
||||
@each $config in $overrides {
|
||||
$settings: map-merge($settings, $config);
|
||||
}
|
||||
|
||||
@return $settings;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Susy Get
|
||||
// --------
|
||||
/// Return the current global value of any Susy setting
|
||||
///
|
||||
/// @group a-config
|
||||
///
|
||||
/// @param {string} $key -
|
||||
/// Setting to retrieve from the configuration.
|
||||
///
|
||||
/// @return {*} -
|
||||
/// Value mapped to `$key` in the configuration maps,
|
||||
/// in order of specificity:
|
||||
/// `$susy`, then `$_susy-defaults`
|
||||
///
|
||||
/// @example scss -
|
||||
/// /* columns: #{susy-get('columns')} */
|
||||
/// /* gutters: #{susy-get('gutters')} */
|
||||
@function susy-get(
|
||||
$key
|
||||
) {
|
||||
$settings: susy-settings();
|
||||
|
||||
@if not map-has-key($settings, $key) {
|
||||
@return _susy-error(
|
||||
'There is no Susy setting called `#{$key}`',
|
||||
'susy-get');
|
||||
}
|
||||
|
||||
@return map-get($settings, $key);
|
||||
}
|
||||
@@ -0,0 +1,441 @@
|
||||
/// Grid Math Engine
|
||||
/// ================
|
||||
/// The `su` functions give you direct access to the math layer,
|
||||
/// without any syntax-sugar like shorthand parsing, and normalization.
|
||||
/// If you prefer named arguments, and stripped-down syntax,
|
||||
/// you can use these functions directly in your code –
|
||||
/// replacing `span`, `gutter`, and `slice`.
|
||||
///
|
||||
/// These functions are also useful
|
||||
/// for building mixins or other extensions to Susy.
|
||||
/// Apply the Susy syntax to new mixins and functions,
|
||||
/// using our "Plugin Helpers",
|
||||
/// or write your own syntax and pass the normalized results along
|
||||
/// to `su` for compilation.
|
||||
///
|
||||
/// @group su-math
|
||||
///
|
||||
/// @see su-span
|
||||
/// @see su-gutter
|
||||
/// @see su-slice
|
||||
/// @ignore _su-sum
|
||||
/// @ignore _su-calc-span
|
||||
/// @ignore _su-calc-sum
|
||||
/// @ignore _su-needs-calc-output
|
||||
|
||||
|
||||
|
||||
// Su Span
|
||||
// -------
|
||||
/// Calculates and returns a CSS-ready span width,
|
||||
/// based on normalized span and context data –
|
||||
/// a low-level version of `susy-span`,
|
||||
/// with all of the logic and none of the syntax sugar.
|
||||
///
|
||||
/// - Grids defined with unitless numbers will return `%` values.
|
||||
/// - Grids defined with comparable units
|
||||
/// will return a value in the units provided.
|
||||
/// - Grids defined with a mix of units,
|
||||
/// or a combination of untiless numbers and unit-lengths,
|
||||
/// will return a `calc()` string.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @see susy-span
|
||||
///
|
||||
/// @param {number | list} $span -
|
||||
/// Number or list of grid columns to span
|
||||
/// @param {list} $columns -
|
||||
/// List of columns available
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter in column-comparable units
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `span` count
|
||||
/// @param {0 | 1 | -1} $container-spread [$spread] -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `columns` count
|
||||
/// @param {integer} $location [1] -
|
||||
/// Optional position of sub-span among full set of columns
|
||||
///
|
||||
/// @return {length} -
|
||||
/// Relative or static length of a span on the grid
|
||||
@function su-span(
|
||||
$span,
|
||||
$columns,
|
||||
$gutters,
|
||||
$spread,
|
||||
$container-spread: $spread,
|
||||
$location: 1
|
||||
) {
|
||||
$span: su-valid-span($span);
|
||||
$columns: su-valid-columns($columns);
|
||||
$gutters: su-valid-gutters($gutters);
|
||||
$spread: su-valid-spread($spread);
|
||||
|
||||
@if (type-of($span) == 'number') {
|
||||
@if (not unitless($span)) {
|
||||
@return $span;
|
||||
}
|
||||
|
||||
$location: su-valid-location($span, $location, $columns);
|
||||
$span: su-slice($span, $columns, $location, $validate: false);
|
||||
}
|
||||
|
||||
@if _su-needs-calc-output($span, $columns, $gutters, $spread, not 'validate') {
|
||||
@return _su-calc-span($span, $columns, $gutters, $spread, $container-spread, not 'validate');
|
||||
}
|
||||
|
||||
$span-width: _su-sum($span, $gutters, $spread, $validate: false);
|
||||
|
||||
@if unitless($span-width) {
|
||||
$container-spread: su-valid-spread($container-spread);
|
||||
$container: _su-sum($columns, $gutters, $container-spread, $validate: false);
|
||||
@return percentage($span-width / $container);
|
||||
}
|
||||
|
||||
@return $span-width;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Su Gutter
|
||||
// ---------
|
||||
/// Calculates and returns a CSS-ready gutter width,
|
||||
/// based on normalized grid data –
|
||||
/// a low-level version of `susy-gutter`,
|
||||
/// with all of the logic and none of the syntax sugar.
|
||||
///
|
||||
/// - Grids defined with unitless numbers will return `%` values.
|
||||
/// - Grids defined with comparable units
|
||||
/// will return a value in the units provided.
|
||||
/// - Grids defined with a mix of units,
|
||||
/// or a combination of untiless numbers and unit-lengths,
|
||||
/// will return a `calc()` string.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @see susy-gutter
|
||||
///
|
||||
/// @param {list} $columns -
|
||||
/// List of columns in the grid
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter in column-comparable units
|
||||
/// @param {0 | 1 | -1} $container-spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `columns` count
|
||||
///
|
||||
/// @return {length} -
|
||||
/// Relative or static length of one gutter in a grid
|
||||
@function su-gutter(
|
||||
$columns,
|
||||
$gutters,
|
||||
$container-spread
|
||||
) {
|
||||
@if (type-of($gutters) == 'number') {
|
||||
@if ($gutters == 0) or (not unitless($gutters)) {
|
||||
@return $gutters;
|
||||
}
|
||||
}
|
||||
|
||||
@if _su-needs-calc-output($gutters, $columns, $gutters, -1, not 'validate') {
|
||||
@return _su-calc-span($gutters, $columns, $gutters, -1, $container-spread, not 'validate');
|
||||
}
|
||||
|
||||
$container: _su-sum($columns, $gutters, $container-spread);
|
||||
@return percentage($gutters / $container);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Su Slice
|
||||
// --------
|
||||
/// Returns a list of columns
|
||||
/// based on a given span/location slice of the grid –
|
||||
/// a low-level version of `susy-slice`,
|
||||
/// with all of the logic and none of the syntax sugar.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @see susy-slice
|
||||
///
|
||||
/// @param {number} $span -
|
||||
/// Number of grid columns to span
|
||||
/// @param {list} $columns -
|
||||
/// List of columns in the grid
|
||||
/// @param {number} $location [1] -
|
||||
/// Starting index of a span in the list of columns
|
||||
/// @param {bool} $validate [true] -
|
||||
/// Check that arguments are valid before proceeding
|
||||
///
|
||||
/// @return {list} -
|
||||
/// Subset list of grid columns, based on span and location
|
||||
@function su-slice(
|
||||
$span,
|
||||
$columns,
|
||||
$location: 1,
|
||||
$validate: true
|
||||
) {
|
||||
@if $validate {
|
||||
$columns: su-valid-columns($columns);
|
||||
$location: su-valid-location($span, $location, $columns);
|
||||
}
|
||||
|
||||
$floor: floor($span);
|
||||
$sub-columns: ();
|
||||
|
||||
@for $i from $location to ($location + $floor) {
|
||||
$sub-columns: append($sub-columns, nth($columns, $i));
|
||||
}
|
||||
|
||||
@if $floor != $span {
|
||||
$remainder: $span - $floor;
|
||||
$column: $location + $floor;
|
||||
$sub-columns: append($sub-columns, nth($columns, $column) * $remainder);
|
||||
}
|
||||
|
||||
@return $sub-columns;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Su Sum
|
||||
// ------
|
||||
/// Get the total sum of column-units in a layout.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @access private
|
||||
///
|
||||
/// @param {list} $columns -
|
||||
/// List of columns in the grid
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter in column-comparable units
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `columns` count
|
||||
/// @param {bool} $validate [true] -
|
||||
/// Check that arguments are valid before proceeding
|
||||
///
|
||||
/// @return {number} -
|
||||
/// Total sum of column-units in a grid
|
||||
@function _su-sum(
|
||||
$columns,
|
||||
$gutters,
|
||||
$spread,
|
||||
$validate: true
|
||||
) {
|
||||
@if $validate {
|
||||
$columns: su-valid-span($columns);
|
||||
$gutters: su-valid-gutters($gutters);
|
||||
$spread: su-valid-spread($spread);
|
||||
}
|
||||
|
||||
// Calculate column-sum
|
||||
$column-sum: 0;
|
||||
@each $column in $columns {
|
||||
$column-sum: $column-sum + $column;
|
||||
}
|
||||
|
||||
$gutter-sum: (ceil(length($columns)) + $spread) * $gutters;
|
||||
$total: if(($gutter-sum > 0), $column-sum + $gutter-sum, $column-sum);
|
||||
|
||||
@return $total;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Su Calc
|
||||
// -------
|
||||
/// Return a usable span width as a `calc()` function,
|
||||
/// in order to create mixed-unit grids.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @access private
|
||||
///
|
||||
/// @param {number | list} $span -
|
||||
/// Pre-sliced list of grid columns to span
|
||||
/// @param {list} $columns -
|
||||
/// List of columns available
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter in column-comparable units
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `span` count
|
||||
/// @param {0 | 1 | -1} $container-spread [$spread] -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `columns` count
|
||||
/// @param {bool} $validate [true] -
|
||||
/// Check that arguments are valid before proceeding
|
||||
///
|
||||
/// @return {length} -
|
||||
/// Relative or static length of a span on the grid
|
||||
@function _su-calc-span(
|
||||
$span,
|
||||
$columns,
|
||||
$gutters,
|
||||
$spread,
|
||||
$container-spread: $spread,
|
||||
$validate: true
|
||||
) {
|
||||
@if $validate {
|
||||
$span: su-valid-span($span);
|
||||
$columns: su-valid-columns($columns);
|
||||
$gutters: su-valid-gutters($gutters);
|
||||
$spread: su-valid-spread($spread);
|
||||
$container-spread: su-valid-spread($container-spread);
|
||||
}
|
||||
|
||||
// Span and context
|
||||
$span: _su-calc-sum($span, $gutters, $spread, not 'validate');
|
||||
$context: _su-calc-sum($columns, $gutters, $container-spread, not 'validate');
|
||||
|
||||
// Fixed and fluid
|
||||
$fixed-span: map-get($span, 'fixed');
|
||||
$fluid-span: map-get($span, 'fluid');
|
||||
$fixed-context: map-get($context, 'fixed');
|
||||
$fluid-context: map-get($context, 'fluid');
|
||||
|
||||
$calc: '#{$fixed-span}';
|
||||
$fluid-calc: '(100% - #{$fixed-context})';
|
||||
|
||||
// Fluid-values
|
||||
@if (not $fluid-span) {
|
||||
$fluid-calc: null;
|
||||
} @else if ($fluid-span != $fluid-context) {
|
||||
$fluid-span: '* #{$fluid-span}';
|
||||
$fluid-context: if($fluid-context, '/ #{$fluid-context}', '');
|
||||
$fluid-calc: '(#{$fluid-calc $fluid-context $fluid-span})';
|
||||
}
|
||||
|
||||
@if $fluid-calc {
|
||||
$calc: if(($calc != ''), '#{$calc} + ', '');
|
||||
$calc: '#{$calc + $fluid-calc}';
|
||||
}
|
||||
|
||||
@return calc(#{unquote($calc)});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Su Calc-Sum
|
||||
// -----------
|
||||
/// Get the total sum of fixed and fluid column-units
|
||||
/// for creating a mixed-unit layout with `calc()` values.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @access private
|
||||
///
|
||||
/// @param {list} $columns -
|
||||
/// List of columns available
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter in column-comparable units
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `span` count
|
||||
/// @param {bool} $validate [true] -
|
||||
/// Check that arguments are valid before proceeding
|
||||
///
|
||||
/// @return {map} -
|
||||
/// Map with `fixed` and `fluid` keys
|
||||
/// containing the proper math as strings
|
||||
@function _su-calc-sum(
|
||||
$columns,
|
||||
$gutters,
|
||||
$spread,
|
||||
$validate: true
|
||||
) {
|
||||
@if $validate {
|
||||
$columns: su-valid-span($columns);
|
||||
$gutters: su-valid-gutters($gutters);
|
||||
$spread: su-valid-spread($spread);
|
||||
}
|
||||
|
||||
$fluid: 0;
|
||||
$fixed: ();
|
||||
$calc: null;
|
||||
|
||||
// Gutters
|
||||
$gutters: $gutters * (length($columns) + $spread);
|
||||
|
||||
// Columns
|
||||
@each $col in append($columns, $gutters) {
|
||||
@if unitless($col) {
|
||||
$fluid: $fluid + $col;
|
||||
} @else {
|
||||
$fixed: _su-map-add-units($fixed, $col);
|
||||
}
|
||||
}
|
||||
|
||||
// Compile Fixed Units
|
||||
@each $unit, $total in $fixed {
|
||||
@if ($total != (0 * $total)) {
|
||||
$calc: if($calc, '#{$calc} + #{$total}', '#{$total}');
|
||||
}
|
||||
}
|
||||
|
||||
// Calc null or string
|
||||
@if $calc {
|
||||
$calc: if(str-index($calc, '+'), '(#{$calc})', '#{$calc}');
|
||||
}
|
||||
|
||||
// Fluid 0 => null
|
||||
$fluid: if(($fluid == 0), null, $fluid);
|
||||
|
||||
|
||||
// Return map
|
||||
$return: (
|
||||
'fixed': $calc,
|
||||
'fluid': $fluid,
|
||||
);
|
||||
|
||||
@return $return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Needs Calc
|
||||
// ----------
|
||||
/// Check if `calc()` will be needed in defining a span,
|
||||
/// if the necessary units in a grid are not comparable.
|
||||
///
|
||||
/// @group su-math
|
||||
/// @access private
|
||||
///
|
||||
/// @param {list} $span -
|
||||
/// Slice of columns to span
|
||||
/// @param {list} $columns -
|
||||
/// List of available columns in the grid
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters spanned,
|
||||
/// relative to `span` count
|
||||
/// @param {bool} $validate [true] -
|
||||
/// Check that arguments are valid before proceeding
|
||||
///
|
||||
/// @return {bool} -
|
||||
/// `True` when units do not match, and `calc()` will be required
|
||||
@function _su-needs-calc-output(
|
||||
$span,
|
||||
$columns,
|
||||
$gutters,
|
||||
$spread,
|
||||
$validate: true
|
||||
) {
|
||||
@if $validate {
|
||||
$span: su-valid-span($span);
|
||||
$columns: su-valid-columns($columns);
|
||||
$gutters: su-valid-gutters($gutters);
|
||||
}
|
||||
|
||||
$has-gutter: if((length($span) > 1) or ($spread >= 0), true, false);
|
||||
$check: if($has-gutter, append($span, $gutters), $span);
|
||||
$safe-span: _su-is-comparable($check...);
|
||||
|
||||
@if ($safe-span == 'static') {
|
||||
@return false;
|
||||
} @else if (not $safe-span) {
|
||||
@return true;
|
||||
}
|
||||
|
||||
$safe-fluid: _su-is-comparable($gutters, $columns...);
|
||||
|
||||
@return not $safe-fluid;
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
/// Validation
|
||||
/// ==========
|
||||
/// Each argument to Su has a single canonical syntax.
|
||||
/// These validation functions check to ensure
|
||||
/// that each argument is valid,
|
||||
/// in order to provide useful errors
|
||||
/// before attempting to calculate the results/
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @see su-valid-columns
|
||||
/// @see su-valid-gutters
|
||||
/// @see su-valid-spread
|
||||
/// @see su-valid-location
|
||||
|
||||
|
||||
|
||||
// Valid Span
|
||||
// ----------
|
||||
/// Check that the `span` argument
|
||||
/// is a number, length, or column-list
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @param {number | list} $span -
|
||||
/// Number of columns, or length of span
|
||||
///
|
||||
/// @return {number | list} -
|
||||
/// Validated `$span` number, length, or columns list
|
||||
///
|
||||
/// @throw
|
||||
/// when span value is not a number, or valid column list
|
||||
@function su-valid-span(
|
||||
$span
|
||||
) {
|
||||
$type: type-of($span);
|
||||
@if ($type == 'number') {
|
||||
@return $span;
|
||||
} @else if ($type == 'list') and su-valid-columns($span, 'silent-failure') {
|
||||
@return $span;
|
||||
}
|
||||
|
||||
$actual: '[#{type-of($span)}] `#{inspect($span)}`';
|
||||
@return _susy-error(
|
||||
'#{$actual} is not a valid number, length, or column-list for $span.',
|
||||
'su-valid-span');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Valid Columns
|
||||
// -------------
|
||||
/// Check that the `columns` argument is a valid
|
||||
/// list of column-lengths
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @param {list} $columns -
|
||||
/// List of column-lengths
|
||||
/// @param {bool} $silent-failure [true] -
|
||||
/// Set false to return null on failure
|
||||
///
|
||||
/// @return {list} -
|
||||
/// Validated `$columns` list
|
||||
///
|
||||
/// @throw
|
||||
/// when column value is not a valid list of numbers
|
||||
@function su-valid-columns(
|
||||
$columns,
|
||||
$silent-failure: false
|
||||
) {
|
||||
@if (type-of($columns) == 'list') {
|
||||
$fail: false;
|
||||
|
||||
@each $col in $columns {
|
||||
@if (type-of($col) != 'number') {
|
||||
$fail: true;
|
||||
}
|
||||
}
|
||||
|
||||
@if not $fail {
|
||||
@return $columns;
|
||||
}
|
||||
}
|
||||
|
||||
// Silent Failure
|
||||
@if $silent-failure {
|
||||
@return null;
|
||||
}
|
||||
|
||||
// Error Message
|
||||
$actual: '[#{type-of($columns)}] `#{inspect($columns)}`';
|
||||
|
||||
@return _susy-error(
|
||||
'#{$actual} is not a valid list of numbers for $columns.',
|
||||
'su-valid-columns');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Valid Gutters
|
||||
// -------------
|
||||
/// Check that the `gutters` argument is a valid number
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @param {number} $gutters -
|
||||
/// Width of a gutter
|
||||
///
|
||||
/// @return {number} -
|
||||
/// Validated `$gutters` number
|
||||
///
|
||||
/// @throw
|
||||
/// when gutter value is not a number
|
||||
@function su-valid-gutters(
|
||||
$gutters
|
||||
) {
|
||||
$type: type-of($gutters);
|
||||
|
||||
@if ($type == 'number') {
|
||||
@return $gutters;
|
||||
}
|
||||
|
||||
$actual: '[#{$type}] `#{inspect($gutters)}`';
|
||||
@return _susy-error(
|
||||
'#{$actual} is not a number or length for $gutters.',
|
||||
'su-valid-gutters');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Valid Spread
|
||||
// ------------
|
||||
/// Check that the `spread` argument is a valid
|
||||
/// intiger between `-1` and `1`
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @param {0 | 1 | -1} $spread -
|
||||
/// Number of gutters to include in a span,
|
||||
/// relative to the number columns
|
||||
///
|
||||
/// @return {0 | 1 | -1} -
|
||||
/// Validated `$spread` number
|
||||
///
|
||||
/// @throw
|
||||
/// when spread value is not a valid spread
|
||||
@function su-valid-spread(
|
||||
$spread
|
||||
) {
|
||||
@if index(0 1 -1, $spread) {
|
||||
@return $spread;
|
||||
}
|
||||
|
||||
$actual: '[#{type-of($spread)}] `#{inspect($spread)}`';
|
||||
@return _susy-error(
|
||||
'#{$actual} is not a normalized [0 | 1 | -1] value for `$spread`.',
|
||||
'su-valid-spread');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Valid Location
|
||||
// --------------
|
||||
/// Check that the `location` argument is a valid number,
|
||||
/// within the scope of available columns
|
||||
///
|
||||
/// @group x-validation
|
||||
///
|
||||
/// @param {number} $span -
|
||||
/// Number of grid-columns to be spanned
|
||||
/// @param {integer | string} $location -
|
||||
/// Starting (1-indexed) column-position of that span
|
||||
/// @param {list} $columns -
|
||||
/// List of available columns in the grid
|
||||
///
|
||||
/// @return {integer} -
|
||||
/// Validated `$location` intiger
|
||||
///
|
||||
/// @throw
|
||||
/// when location value is not a valid index,
|
||||
/// given the context and span.
|
||||
@function su-valid-location(
|
||||
$span,
|
||||
$location,
|
||||
$columns
|
||||
) {
|
||||
$count: length($columns);
|
||||
|
||||
@if $location {
|
||||
@if (type-of($location) != 'number') or (not unitless($location)) {
|
||||
$actual: '[#{type-of($location)}] `#{$location}`';
|
||||
@return _susy-error(
|
||||
'#{$actual} is not a unitless number for $location.',
|
||||
'su-valid-location');
|
||||
} @else if (round($location) != $location) {
|
||||
@return _susy-error(
|
||||
'Location (`#{$location}`) must be a 1-indexed intiger position.',
|
||||
'su-valid-location');
|
||||
} @else if ($location > $count) or ($location < 1) {
|
||||
@return _susy-error(
|
||||
'Position `#{$location}` does not exist in grid `#{$columns}`.',
|
||||
'su-valid-location');
|
||||
} @else if ($location + $span - 1 > $count) {
|
||||
$details: 'grid `#{$columns}` for span `#{$span}` at `#{$location}`';
|
||||
@return _susy-error(
|
||||
'There are not enough columns in #{$details}.',
|
||||
'su-valid-location');
|
||||
}
|
||||
}
|
||||
|
||||
@return $location;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// Su
|
||||
// ==
|
||||
|
||||
@import "su/utilities";
|
||||
@import "su/settings";
|
||||
@import "su/validation";
|
||||
@import "su/grid";
|
||||
@@ -0,0 +1,191 @@
|
||||
/// Syntax Utilities for Extending Susy
|
||||
/// ===================================
|
||||
/// There are many steps involved
|
||||
/// when translating between the Susy syntax layer,
|
||||
/// and the Su core math.
|
||||
/// That entire process can be condensed with these two functions.
|
||||
/// For anyone that wants to access the full power of Susy,
|
||||
/// and build their own plugins, functions, or mixins –
|
||||
/// this is the primary API for compiling user input,
|
||||
/// and accessing the core math.
|
||||
///
|
||||
/// This is the same technique we use internally,
|
||||
/// to keep our API layer simple and light-weight.
|
||||
/// Every function accepts two arguments,
|
||||
/// a "shorthand" description of the span or context,
|
||||
/// and an optional settings-map to override global defaults.
|
||||
///
|
||||
/// - Use `susy-compile()` to parse, merge, and normalize
|
||||
/// all the user settings into a single map.
|
||||
/// - Then use `su-call()` to call one of the core math functions,
|
||||
/// with whatever data is needed for that function.
|
||||
///
|
||||
/// @group plugin-utils
|
||||
/// @see susy-compile
|
||||
/// @see su-call
|
||||
///
|
||||
/// @example scss - Susy API `gutter` function
|
||||
/// @function susy-gutter(
|
||||
/// $context: susy-get('columns'),
|
||||
/// $config: ()
|
||||
/// ) {
|
||||
/// // compile and normalize all user arguments and global settings
|
||||
/// $context: susy-compile($context, $config, 'context-only');
|
||||
/// // call `su-gutter` with the appropriate data
|
||||
/// @return su-call('su-gutter', $context);
|
||||
/// }
|
||||
///
|
||||
/// @example scss - Sample `span` mixin for floated grids
|
||||
/// @mixin span(
|
||||
/// $span,
|
||||
/// $config: ()
|
||||
/// ) {
|
||||
/// $context: susy-compile($span, $config);
|
||||
/// width: su-call('su-span', $context);
|
||||
///
|
||||
/// @if index($span, 'last') {
|
||||
/// float: right;
|
||||
/// } @else {
|
||||
/// float: left;
|
||||
/// margin-right: su-call('su-gutter', $context);
|
||||
/// }
|
||||
/// }
|
||||
|
||||
|
||||
|
||||
// Compile
|
||||
// -------
|
||||
/// Susy's syntax layer has various moving parts,
|
||||
/// with syntax-parsing for the grid/span shorthand,
|
||||
/// and normalization for each of the resulting values.
|
||||
/// The compile function rolls this all together
|
||||
/// in a single call –
|
||||
/// for quick access from our internal API functions,
|
||||
/// or any additional functions and mixins you add to your project.
|
||||
/// Pass user input and configuration maps to the compiler,
|
||||
/// and it will hand back a map of values ready for Su.
|
||||
/// Combine this with the `su-call` function
|
||||
/// to quickly parse, normalize, and process grid calculations.
|
||||
///
|
||||
/// @group plugin-utils
|
||||
/// @see su-call
|
||||
///
|
||||
/// @param {list | map} $shorthand -
|
||||
/// Shorthand expression to define the width of the span,
|
||||
/// optionally containing:
|
||||
/// - a count, length, or column-list span;
|
||||
/// - `at $n`, `first`, or `last` location on asymmetrical grids;
|
||||
/// - `narrow`, `wide`, or `wider` for optionally spreading
|
||||
/// across adjacent gutters;
|
||||
/// - `of $n <spread>` for available grid columns
|
||||
/// and spread of the container
|
||||
/// (span counts like `of 6` are only valid
|
||||
/// in the context of symmetrical grids);
|
||||
/// - and `set-gutters $n` to override global gutter settings
|
||||
/// @param {map} $config [null] -
|
||||
/// Optional map of Susy grid configuration settings
|
||||
/// @param {bool} $context-only [false] -
|
||||
/// Allow the parser to ignore span and span-spread values,
|
||||
/// only parsing context and container-spread
|
||||
///
|
||||
/// @return {map} -
|
||||
/// Parsed and normalized map of settings,
|
||||
/// based on global and local configuration,
|
||||
/// alongwith shorthad adjustments.
|
||||
///
|
||||
/// @example scss -
|
||||
/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px;
|
||||
/// $grid-data: susy-compile($user-input, $susy);
|
||||
///
|
||||
/// @each $key, $value in $grid-data {
|
||||
/// /* #{$key}: #{$value}, */
|
||||
/// }
|
||||
@function susy-compile(
|
||||
$short,
|
||||
$config: null,
|
||||
$context-only: false
|
||||
) {
|
||||
// Get and normalize config
|
||||
$config: if($config, susy-settings($config), susy-settings());
|
||||
$normal-config: susy-normalize($config);
|
||||
|
||||
// Parse and normalize shorthand
|
||||
@if (type-of($short) != 'map') and (length($short) > 0) {
|
||||
$short: susy-parse($short, $context-only);
|
||||
}
|
||||
|
||||
$normal-short: susy-normalize($short, $normal-config);
|
||||
|
||||
// Merge and return
|
||||
@return map-merge($normal-config, $normal-short);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Call
|
||||
// ----
|
||||
/// The Susy parsing and normalization process
|
||||
/// results in a map of configuration settings,
|
||||
/// much like the global `$susy` settings map.
|
||||
/// In order to pass that information along to Su math functions,
|
||||
/// the proper values have to be picked out,
|
||||
/// and converted to arguments.
|
||||
///
|
||||
/// The `su-call` function streamlines that process,
|
||||
/// weeding out the unnecessary data,
|
||||
/// and passing the rest along to Su in the proper format.
|
||||
/// Combine this with `susy-compile` to quickly parse,
|
||||
/// normalize, and process grid calculations.
|
||||
///
|
||||
/// @group plugin-utils
|
||||
///
|
||||
/// @require su-span
|
||||
/// @require su-gutter
|
||||
/// @require su-slice
|
||||
/// @see susy-compile
|
||||
///
|
||||
/// @param {'su-span' | 'su-gutter' | 'su-slice'} $name -
|
||||
/// Name of the Su math function to call.
|
||||
/// @param {map} $config -
|
||||
/// Parsed and normalized map of Susy configuration settings
|
||||
/// to use for math-function arguments.
|
||||
///
|
||||
/// @return {*} -
|
||||
/// Results of the function being called.
|
||||
///
|
||||
/// @example scss -
|
||||
/// $user-input: 3 wide of susy-repeat(6, 120px) set-gutters 10px;
|
||||
/// $grid-data: susy-compile($user-input, $susy);
|
||||
///
|
||||
/// .su-span {
|
||||
/// width: su-call('su-span', $grid-data);
|
||||
/// }
|
||||
@function su-call(
|
||||
$name,
|
||||
$config
|
||||
) {
|
||||
$grid-function-args: (
|
||||
'su-span': ('span', 'columns', 'gutters', 'spread', 'container-spread', 'location'),
|
||||
'su-gutter': ('columns', 'gutters', 'container-spread'),
|
||||
'su-slice': ('span', 'columns', 'location'),
|
||||
);
|
||||
|
||||
$args: map-get($grid-function-args, $name);
|
||||
|
||||
@if not $args {
|
||||
$options: 'Try one of these: #{map-keys($grid-function-args)}';
|
||||
@return _susy-error(
|
||||
'#{$name} is not a public Su function. #{$options}',
|
||||
'su-call');
|
||||
}
|
||||
|
||||
$call: if(function-exists('get-function'), get-function($name), $name);
|
||||
$output: ();
|
||||
|
||||
@each $arg in $args {
|
||||
$value: map-get($config, $arg);
|
||||
$output: if($value, map-merge($output, ($arg: $value)), $output);
|
||||
}
|
||||
|
||||
@return call($call, $output...);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Unprefix Susy
|
||||
// =============
|
||||
|
||||
|
||||
// Span
|
||||
// ----
|
||||
/// Un-prefixed alias for `susy-span`
|
||||
/// (available by default)
|
||||
///
|
||||
/// @group api
|
||||
/// @alias susy-span
|
||||
///
|
||||
/// @param {list} $span
|
||||
/// @param {map} $config [()]
|
||||
@function span(
|
||||
$span,
|
||||
$config: ()
|
||||
) {
|
||||
@return susy-span($span, $config);
|
||||
}
|
||||
|
||||
|
||||
// Gutter
|
||||
// ------
|
||||
/// Un-prefixed alias for `susy-gutter`
|
||||
/// (available by default)
|
||||
///
|
||||
/// @group api
|
||||
/// @alias susy-gutter
|
||||
///
|
||||
/// @param {integer | list} $context [null] -
|
||||
/// @param {map} $config [()]
|
||||
@function gutter(
|
||||
$context: susy-get('columns'),
|
||||
$config: ()
|
||||
) {
|
||||
@return susy-gutter($context, $config);
|
||||
}
|
||||
|
||||
|
||||
// Slice
|
||||
// -----
|
||||
/// Un-prefixed alias for `susy-slice`
|
||||
/// (available by default)
|
||||
///
|
||||
/// @group api
|
||||
/// @alias susy-slice
|
||||
///
|
||||
/// @param {list} $span
|
||||
/// @param {map} $config [()]
|
||||
@function slice(
|
||||
$span,
|
||||
$config: ()
|
||||
) {
|
||||
@return susy-slice($span, $config);
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
// Sass Utilities
|
||||
// ==============
|
||||
// - Susy Error Output Override [variable]
|
||||
// - Susy Error [function]
|
||||
|
||||
|
||||
|
||||
// Susy Error Output Override
|
||||
// --------------------------
|
||||
/// Turn off error output for testing
|
||||
/// @group x-utility
|
||||
/// @access private
|
||||
$_susy-error-output-override: false !default;
|
||||
|
||||
|
||||
|
||||
// Susy Error
|
||||
// ----------
|
||||
/// Optionally return error messages without failing,
|
||||
/// as a way to test error cases
|
||||
///
|
||||
/// @group x-utility
|
||||
/// @access private
|
||||
///
|
||||
/// @param {string} $message -
|
||||
/// A useful error message, explaining the problem
|
||||
/// @param {string} $source -
|
||||
/// The original source of the error for debugging
|
||||
/// @param {bool} $override [$_susy-error-output-override] -
|
||||
/// Optionally return the error rather than failing
|
||||
/// @return {string} -
|
||||
/// Combined error with source and message
|
||||
/// @throws When `$override == true`
|
||||
@function _susy-error(
|
||||
$message,
|
||||
$source,
|
||||
$override: $_susy-error-output-override
|
||||
) {
|
||||
@if $override {
|
||||
@return 'ERROR [#{$source}] #{$message}';
|
||||
}
|
||||
|
||||
@error '[#{$source}] #{$message}';
|
||||
}
|
||||
|
||||
|
||||
// Su Is Comparable
|
||||
// ----------------
|
||||
/// Check that the units in a grid are comparable
|
||||
///
|
||||
/// @group x-validation
|
||||
/// @access private
|
||||
///
|
||||
/// @param {numbers} $lengths… -
|
||||
/// Arglist of all the number values to compare
|
||||
/// (columns, gutters, span, etc)
|
||||
///
|
||||
/// @return {'fluid' | 'static' | false} -
|
||||
/// The type of span (fluid or static) when units match,
|
||||
/// or `false` for mismatched units
|
||||
@function _su-is-comparable(
|
||||
$lengths...
|
||||
) {
|
||||
$first: nth($lengths, 1);
|
||||
|
||||
@if (length($lengths) == 1) {
|
||||
@return if(unitless($first), 'fluid', 'static');
|
||||
}
|
||||
|
||||
@for $i from 2 through length($lengths) {
|
||||
$comp: nth($lengths, $i);
|
||||
|
||||
$fail: not comparable($first, $comp);
|
||||
$fail: $fail or (unitless($first) and not unitless($comp));
|
||||
$fail: $fail or (unitless($comp) and not unitless($first));
|
||||
|
||||
@if $fail {
|
||||
@return false;
|
||||
}
|
||||
}
|
||||
|
||||
@return if(unitless($first), 'fluid', 'static');
|
||||
}
|
||||
|
||||
|
||||
// Su Map Add Units
|
||||
// ----------------
|
||||
/// The calc features use a map of units and values
|
||||
/// to compile the proper algorythm.
|
||||
/// This function adds a new value to any comparable existing unit/value,
|
||||
/// or adds a new unit/value pair to the map
|
||||
///
|
||||
/// @group x-utility
|
||||
/// @access private
|
||||
///
|
||||
/// @param {map} $map -
|
||||
/// A map of unit/value pairs, e.g. ('px': 120px)
|
||||
/// @param {length} $value -
|
||||
/// A new length to be added to the map
|
||||
/// @return {map} -
|
||||
/// The updated map, with new value added
|
||||
///
|
||||
/// @example scss -
|
||||
/// $map: (0px: 120px);
|
||||
/// $map: _su-map-add-units($map, 1in); // add a comparable unit
|
||||
/// $map: _su-map-add-units($map, 3vw); // add a new unit
|
||||
///
|
||||
/// @each $units, $value in $map {
|
||||
/// /* #{$units}: #{$value} */
|
||||
/// }
|
||||
@function _su-map-add-units(
|
||||
$map,
|
||||
$value
|
||||
) {
|
||||
$unit: $value * 0;
|
||||
$has: map-get($map, $unit) or 0;
|
||||
|
||||
@if ($has == 0) {
|
||||
@each $try, $could in $map {
|
||||
$match: comparable($try, $value);
|
||||
$unit: if($match, $try, $unit);
|
||||
$has: if($match, $could, $has);
|
||||
}
|
||||
}
|
||||
|
||||
@return map-merge($map, ($unit: $has + $value));
|
||||
}
|
||||
|
||||
|
||||
// Susy Flatten
|
||||
// ------------
|
||||
/// Flatten a multidimensional list
|
||||
///
|
||||
/// @group x-utility
|
||||
/// @access private
|
||||
///
|
||||
/// @param {list} $list -
|
||||
/// The list to be flattened
|
||||
/// @return {list} -
|
||||
/// The flattened list
|
||||
///
|
||||
/// @example scss -
|
||||
/// $list: 120px (30em 30em) 120px;
|
||||
/// /* #{_susy-flatten($list)} */
|
||||
@function _susy-flatten(
|
||||
$list
|
||||
) {
|
||||
$flat: ();
|
||||
|
||||
// Don't iterate over maps
|
||||
@if (type-of($list) == 'map') {
|
||||
@return $list;
|
||||
}
|
||||
|
||||
// Iterate over lists (or single items)
|
||||
@each $item in $list {
|
||||
@if (type-of($item) == 'list') {
|
||||
$item: _susy-flatten($item);
|
||||
$flat: join($flat, $item);
|
||||
} @else {
|
||||
$flat: append($flat, $item);
|
||||
}
|
||||
}
|
||||
|
||||
// Return flattened list
|
||||
@return $flat;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
// Susy Next Syntax
|
||||
// ================
|
||||
|
||||
$susy-version: 2.1;
|
||||
|
||||
@import "../su";
|
||||
@import "../output/float";
|
||||
|
||||
@import "susy/settings";
|
||||
@import "susy/validation";
|
||||
@import "susy/grids";
|
||||
@import "susy/box-sizing";
|
||||
@import "susy/context";
|
||||
@import "susy/background";
|
||||
@import "susy/container";
|
||||
@import "susy/span";
|
||||
@import "susy/gutters";
|
||||
@import "susy/isolate";
|
||||
@import "susy/gallery";
|
||||
@import "susy/rows";
|
||||
@import "susy/margins";
|
||||
@import "susy/padding";
|
||||
@import "susy/bleed";
|
||||
@import "susy/breakpoint-plugin";
|
||||
@@ -1,13 +0,0 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Partials
|
||||
|
||||
$susy-version: 1.5;
|
||||
|
||||
@import "susyone/settings";
|
||||
@import "susyone/functions";
|
||||
@import "susyone/grid";
|
||||
@import "susyone/isolation";
|
||||
@import "susyone/padding";
|
||||
@import "susyone/margin";
|
||||
@import "susyone/media";
|
||||
@import "susyone/background";
|
||||
@@ -1,385 +0,0 @@
|
||||
// Background Grid Syntax
|
||||
// ======================
|
||||
|
||||
$susy-overlay-grid-head-exists: false;
|
||||
|
||||
|
||||
// Show Grid/s
|
||||
// -----------
|
||||
// Show grid on any element using either background or overlay.
|
||||
// - [$grid] : <settings>
|
||||
@mixin show-grid(
|
||||
$grid: $susy
|
||||
) {
|
||||
$inspect: $grid;
|
||||
$_output: debug-get(output, $grid);
|
||||
|
||||
@include susy-inspect(show-grid, $inspect);
|
||||
@if $_output == overlay and susy-get(debug image, $grid) != hide {
|
||||
@include overlay-grid($grid);
|
||||
} @else {
|
||||
@include background-grid($grid);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin show-grids(
|
||||
$grid: $susy
|
||||
) {
|
||||
@include show-grid($grid);
|
||||
}
|
||||
|
||||
// Background Grid
|
||||
// ---------------
|
||||
// Show a grid background on any element.
|
||||
// - [$grid] : <settings>
|
||||
@mixin background-grid(
|
||||
$grid: $susy
|
||||
) {
|
||||
$inspect : $grid;
|
||||
$_output : get-background($grid);
|
||||
|
||||
@if length($_output) > 0 {
|
||||
$_flow: susy-get(flow, $grid);
|
||||
|
||||
$_image: ();
|
||||
@each $name, $layer in map-get($_output, image) {
|
||||
$_direction: if($name == baseline, to bottom, to to($_flow));
|
||||
$_image: append($_image, linear-gradient($_direction, $layer), comma);
|
||||
}
|
||||
$_output: map-merge($_output, (image: $_image));
|
||||
|
||||
@include background-grid-output($_output...);
|
||||
@include susy-inspect(background-grid, $inspect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Overlay Grid
|
||||
// ------------
|
||||
// Generate an icon to trigger grid-overlays on any given elements.
|
||||
// $grids... : <selector> [<settings>] [, <selector>]*
|
||||
@mixin overlay-grid (
|
||||
$grid: $susy
|
||||
) {
|
||||
@if not($susy-overlay-grid-head-exists) {
|
||||
@at-root head { @include overlay-head($grid); }
|
||||
@at-root head:before { @include overlay-trigger; }
|
||||
@at-root head:hover { @include overlay-trigger-hover; }
|
||||
$susy-overlay-grid-head-exists: true !global;
|
||||
}
|
||||
|
||||
head:hover ~ &,
|
||||
head:hover ~ body & {
|
||||
position: relative;
|
||||
&:before {
|
||||
@include grid-overlay-base;
|
||||
@include background-grid($grid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// [Private] Overlay Trigger
|
||||
// -------------------------
|
||||
@mixin overlay-trigger {
|
||||
content: "|||";
|
||||
display: block;
|
||||
padding: 5px 10px;
|
||||
font: {
|
||||
family: sans-serif;
|
||||
size: 16px;
|
||||
weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// [Private] Overlay Trigger Hover
|
||||
// -------------------------------
|
||||
@mixin overlay-trigger-hover {
|
||||
background: rgba(white, .5);
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
// [Private] Overlay Head
|
||||
// ----------------------
|
||||
// <head> styles to create grid overlay toggle
|
||||
@mixin overlay-head (
|
||||
$grid: $susy
|
||||
) {
|
||||
$_toggle: debug-get(toggle, $grid);
|
||||
$_horz: null;
|
||||
$_vert: null;
|
||||
|
||||
@each $side in $_toggle {
|
||||
$_horz: if($side == left or $side == right, $side, $_horz);
|
||||
$_vert: if($side == top or $side == bottom, $side, $_vert);
|
||||
}
|
||||
|
||||
display: block;
|
||||
position: fixed;
|
||||
#{$_horz}: 10px;
|
||||
#{$_vert}: 10px;
|
||||
z-index: 999;
|
||||
color: #333;
|
||||
background: rgba(white, .25);
|
||||
}
|
||||
|
||||
|
||||
// [Private] Grid Overlay Base
|
||||
// ---------------------------
|
||||
// Base styles for generating a grid overlay
|
||||
@mixin grid-overlay-base() {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
content: " ";
|
||||
z-index: 998;
|
||||
}
|
||||
|
||||
|
||||
// Get Symmetrical Background
|
||||
// --------------------------
|
||||
// - $grid: <map>
|
||||
@function get-background-sym(
|
||||
$grid
|
||||
) {
|
||||
$grid : parse-grid($grid);
|
||||
$_gutters : susy-get(gutters, $grid);
|
||||
$_column-width : susy-get(column-width, $grid);
|
||||
$_math : susy-get(math, $grid);
|
||||
|
||||
$_color : debug-get(color);
|
||||
$_trans : transparent;
|
||||
$_light : lighten($_color, 15%);
|
||||
|
||||
$_end : 1 + $_gutters;
|
||||
$_after : percentage(1/$_end);
|
||||
$_stops : ();
|
||||
$_size : span(1 $grid wide);
|
||||
|
||||
@if is-inside($grid) {
|
||||
$_stops: $_color, $_light;
|
||||
} @else if is-split($grid) {
|
||||
$_split: $_gutters/2;
|
||||
$_before: percentage($_split/$_end);
|
||||
$_after: percentage((1 + $_split)/$_end);
|
||||
$_stops: $_trans $_before, $_color $_before, $_light $_after, $_trans $_after;
|
||||
} @else {
|
||||
$_stops: $_color, $_light $_after, $_trans $_after;
|
||||
}
|
||||
|
||||
@if $_math == static {
|
||||
$_size: valid-column-math($_math, $_column-width) * $_end;
|
||||
}
|
||||
|
||||
$_output: (
|
||||
image: (columns: $_stops),
|
||||
size: $_size,
|
||||
);
|
||||
|
||||
@return $_output;
|
||||
}
|
||||
|
||||
|
||||
// Get Asymmetrical Inside
|
||||
// -----------------------
|
||||
// - $grid: <settings>
|
||||
@function get-asym-inside(
|
||||
$grid
|
||||
) {
|
||||
$grid : parse-grid($grid);
|
||||
$_columns : susy-get(columns, $grid);
|
||||
|
||||
$_color : debug-get(color);
|
||||
$_light : lighten($_color, 15%);
|
||||
$_stops : ();
|
||||
|
||||
@for $location from 1 through susy-count($_columns) {
|
||||
$this-stop: ();
|
||||
|
||||
@if $location == 1 {
|
||||
$this-stop: append($this-stop, $_color, comma);
|
||||
} @else {
|
||||
$start: parse-span(1 at $location $grid);
|
||||
$start: get-isolation($start);
|
||||
$this-stop: append($this-stop, $_color $start, comma);
|
||||
}
|
||||
|
||||
@if $location == susy-count($_columns) {
|
||||
$this-stop: append($this-stop, $_light, comma);
|
||||
} @else {
|
||||
$_end: parse-span(1 at ($location + 1) $grid);
|
||||
$_end: get-isolation($_end);
|
||||
$this-stop: append($this-stop, $_light $_end, comma);
|
||||
}
|
||||
|
||||
$_stops: join($_stops, $this-stop, comma);
|
||||
}
|
||||
|
||||
@return $_stops;
|
||||
}
|
||||
|
||||
|
||||
// Get Asymmetrical Split
|
||||
// ----------------------
|
||||
// - $grid: <settings>
|
||||
@function get-asym-split(
|
||||
$grid
|
||||
) {
|
||||
$grid : parse-grid($grid);
|
||||
$_columns : susy-get(columns, $grid);
|
||||
|
||||
$_color : debug-get(color);
|
||||
$_light : lighten($_color, 15%);
|
||||
$_stops : ();
|
||||
|
||||
@for $location from 1 through susy-count($_columns) {
|
||||
$this-stop: ();
|
||||
|
||||
$start: parse-span(1 at $location $grid);
|
||||
$start: get-isolation($start);
|
||||
$this-stop: append($this-stop, transparent $start, comma);
|
||||
$this-stop: append($this-stop, $_color $start, comma);
|
||||
|
||||
$_end: $start + span(1 at $location $grid);
|
||||
$this-stop: append($this-stop, $_light $_end, comma);
|
||||
$this-stop: append($this-stop, transparent $_end, comma);
|
||||
|
||||
$_stops: join($_stops, $this-stop, comma);
|
||||
}
|
||||
|
||||
@return $_stops;
|
||||
}
|
||||
|
||||
|
||||
// Get Asymmetrical Outside
|
||||
// ------------------------
|
||||
// - $grid: <settings>
|
||||
@function get-asym-outside(
|
||||
$grid
|
||||
) {
|
||||
$grid : parse-grid($grid);
|
||||
$_columns : susy-get(columns, $grid);
|
||||
|
||||
$_color : debug-get(color);
|
||||
$_light : lighten($_color, 15%);
|
||||
$_trans : transparent;
|
||||
$_stops : ();
|
||||
|
||||
@for $location from 1 through susy-count($_columns) {
|
||||
$this-stop: ();
|
||||
|
||||
@if $location == 1 {
|
||||
$this-stop: append($this-stop, $_color, comma);
|
||||
} @else {
|
||||
$start: parse-span(1 at $location $grid);
|
||||
$start: get-isolation($start);
|
||||
$this-stop: append($this-stop, $_color $start, comma);
|
||||
}
|
||||
|
||||
@if $location == susy-count($_columns) {
|
||||
$this-stop: append($this-stop, $_light, comma);
|
||||
} @else {
|
||||
$gutter: get-span-width(first $location $grid);
|
||||
|
||||
$_end: parse-span(1 at ($location + 1) $grid);
|
||||
$_end: get-isolation($_end);
|
||||
|
||||
$gutter: $_light $gutter, $_trans $gutter, $_trans $_end;
|
||||
$this-stop: join($this-stop, $gutter, comma);
|
||||
}
|
||||
|
||||
$_stops: join($_stops, $this-stop, comma);
|
||||
}
|
||||
|
||||
@return $_stops;
|
||||
}
|
||||
|
||||
|
||||
// Get Asymmetrical Background
|
||||
// ---------------------------
|
||||
// - $grid: <settings>
|
||||
@function get-background-asym(
|
||||
$grid
|
||||
) {
|
||||
$_stops: ();
|
||||
|
||||
@if is-inside($grid) {
|
||||
$_stops: get-asym-inside($grid);
|
||||
} @else if is-split($grid) {
|
||||
$_stops: get-asym-split($grid);
|
||||
} @else {
|
||||
$_stops: get-asym-outside($grid);
|
||||
}
|
||||
|
||||
@return (image: (columns: $_stops));
|
||||
}
|
||||
|
||||
|
||||
// Get Background
|
||||
// --------------
|
||||
// - $grid: <settings>
|
||||
@function get-background(
|
||||
$grid
|
||||
) {
|
||||
$grid : parse-grid($grid);
|
||||
$_show : susy-get(debug image, $grid);
|
||||
$_return : ();
|
||||
|
||||
@if $_show and $_show != 'hide' {
|
||||
$_columns: susy-get(columns, $grid);
|
||||
|
||||
@if $_show != 'show-baseline' {
|
||||
$_sym: is-symmetrical($_columns);
|
||||
$_return: if($_sym, get-background-sym($grid), get-background-asym($grid));
|
||||
$_return: map-merge($_return, (clip: content-box));
|
||||
}
|
||||
|
||||
@if $_show != 'show-columns'
|
||||
and global-variable-exists(base-line-height)
|
||||
and type-of($base-line-height) == 'number'
|
||||
and not unitless($base-line-height) {
|
||||
$_color: variable-exists('grid-background-baseline-color');
|
||||
$_color: if($_color, $grid-background-baseline-color, #000);
|
||||
|
||||
$_image: map-get($_return, image);
|
||||
$_size: map-get($_return, size);
|
||||
$_baseline: (baseline: ($_color 1px, transparent 1px));
|
||||
$_baseline-size: 100% $base-line-height;
|
||||
|
||||
$_return: map-merge($_return, (
|
||||
image: if($_image, map-merge($_image, $_baseline), $_baseline),
|
||||
size: if($_size, ($_size, $_baseline-size), $_baseline-size),
|
||||
));
|
||||
|
||||
@if $_show == 'show' {
|
||||
$_clip: map-get($_return, clip);
|
||||
$_return: map-merge($_return, (clip: join($_clip, border-box, comma)));
|
||||
}
|
||||
} @else if $_show == 'show-baseline' {
|
||||
@warn 'Please provide a $base-line-height with the desired height and units';
|
||||
}
|
||||
}
|
||||
|
||||
@if map-get($_return, image) {
|
||||
$_return: map-merge($_return, (flow: susy-get(flow, $grid)));
|
||||
}
|
||||
|
||||
@return $_return;
|
||||
}
|
||||
|
||||
|
||||
// Get Debug
|
||||
// ---------
|
||||
// Return the value of a debug setting
|
||||
// - $key: <setting>
|
||||
@function debug-get(
|
||||
$key,
|
||||
$grid: $susy
|
||||
) {
|
||||
$key: join(debug, $key, space);
|
||||
@return susy-get($key, $grid);
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
// Bleed Syntax
|
||||
// ============
|
||||
|
||||
// Bleed
|
||||
// -----
|
||||
// Add negative margins, and equal positive padding to create bleed.
|
||||
// - $bleed : <span>
|
||||
@mixin bleed(
|
||||
$bleed: 0 gutter()
|
||||
) {
|
||||
$inspect : $bleed;
|
||||
$output : get-bleed($bleed);
|
||||
|
||||
@if susy-get(global-box-sizing) != content-box {
|
||||
$output: map-merge((box-sizing: content-box), $output);
|
||||
}
|
||||
|
||||
@include susy-inspect(bleed, $inspect);
|
||||
@include output($output);
|
||||
}
|
||||
|
||||
|
||||
// Bleed-x
|
||||
// -------
|
||||
// Shortcut for horizontal bleed.
|
||||
// - $bleed : <span>
|
||||
@mixin bleed-x(
|
||||
$bleed: gutter()
|
||||
) {
|
||||
$bleed : parse-span($bleed);
|
||||
$trbl : susy-get(span, $bleed);
|
||||
|
||||
@if length($trbl) == 1 {
|
||||
$bleed: map-merge($bleed, (span: 0 nth($trbl, 1)));
|
||||
} @else if length($trbl) == 2 {
|
||||
$bleed: map-merge($bleed, (span: 0 nth($trbl, 2) 0 nth($trbl, 1)));
|
||||
} @else {
|
||||
@warn 'bleed-x only takes 2 lengths, but #{length($trbl)} were passed.';
|
||||
}
|
||||
|
||||
@include bleed($bleed);
|
||||
}
|
||||
|
||||
|
||||
// Bleed-y
|
||||
// -------
|
||||
// Shortcut for vertical bleed.
|
||||
// - $bleed : <span>
|
||||
@mixin bleed-y(
|
||||
$bleed: if(function-exists(rhythm), rhythm(1), 1em)
|
||||
) {
|
||||
$bleed : parse-span($bleed);
|
||||
$trbl : susy-get(span, $bleed);
|
||||
|
||||
@if length($trbl) == 1 {
|
||||
$bleed: map-merge($bleed, (span: nth($trbl, 1) 0));
|
||||
} @else if length($trbl) == 2 {
|
||||
$bleed: map-merge($bleed, (span: nth($trbl, 1) 0 nth($trbl, 2) 0));
|
||||
} @else {
|
||||
@warn 'bleed-y only takes 2 lengths, but #{length($trbl)} were passed.';
|
||||
}
|
||||
|
||||
@include bleed($bleed);
|
||||
}
|
||||
|
||||
|
||||
// Get Bleed
|
||||
// ---------
|
||||
// Return bleed output values
|
||||
// - $bleed: <span>
|
||||
@function get-bleed(
|
||||
$bleed
|
||||
) {
|
||||
$bleed : map-merge((spread: wide), parse-span($bleed));
|
||||
$trbl : susy-get(span, $bleed);
|
||||
$short : null;
|
||||
$output : ();
|
||||
|
||||
@for $i from 1 through length($trbl) {
|
||||
$this: nth($trbl, $i);
|
||||
$new: ();
|
||||
$margin: null;
|
||||
$padding: null;
|
||||
$padding-x: null;
|
||||
|
||||
@if $this > 0 {
|
||||
$this: map-merge($bleed, (span: $this));
|
||||
$margin: span($this);
|
||||
$padding: $margin;
|
||||
$padding-x: $padding;
|
||||
}
|
||||
|
||||
@if $margin and $margin > 0 {
|
||||
$margin: - $margin;
|
||||
|
||||
@if is-inside($this) {
|
||||
$gutter: gutter($this);
|
||||
$join: if($gutter and comparable($padding, $gutter), true, false);
|
||||
$padding-x: if($join and $padding > 0, $padding + $gutter, $padding);
|
||||
}
|
||||
}
|
||||
|
||||
@if $i == 1 {
|
||||
$new: (
|
||||
margin-top: $margin,
|
||||
padding-top: $padding,
|
||||
margin-right: $margin,
|
||||
padding-right: $padding-x,
|
||||
margin-bottom: $margin,
|
||||
padding-bottom: $padding,
|
||||
margin-left: $margin,
|
||||
padding-left: $padding-x,
|
||||
);
|
||||
} @else if $i == 2 {
|
||||
$new: (
|
||||
margin-right: $margin,
|
||||
padding-right: $padding-x,
|
||||
margin-left: $margin,
|
||||
padding-left: $padding-x,
|
||||
);
|
||||
} @else if $i == 3 {
|
||||
$new: (
|
||||
margin-bottom: $margin,
|
||||
padding-bottom: $padding,
|
||||
);
|
||||
} @else if $i == 4 {
|
||||
$new: (
|
||||
margin-left: $margin,
|
||||
padding-left: $padding-x,
|
||||
);
|
||||
}
|
||||
|
||||
$output: map-merge($output, $new);
|
||||
}
|
||||
|
||||
@each $prop, $value in $output {
|
||||
$output: if($value == 0, map-merge($output, ($prop: null)), $output);
|
||||
}
|
||||
|
||||
@return bleed-shorthand($output);
|
||||
}
|
||||
|
||||
// Bleed Shorthand
|
||||
// ---------------
|
||||
// Convert bleed output into shorthand when possible.
|
||||
// - $bleed: <output map>
|
||||
@function bleed-shorthand(
|
||||
$bleed
|
||||
) {
|
||||
$margin: ();
|
||||
$padding: ();
|
||||
$return: ();
|
||||
|
||||
@each $key, $value in $bleed {
|
||||
@if str-index($key, margin) {
|
||||
$margin: map-merge($margin, ($key: $value));
|
||||
} @else if str-index($key, padding) > 0 {
|
||||
$padding: map-merge($padding, ($key: $value));
|
||||
}
|
||||
}
|
||||
|
||||
$props: (
|
||||
margin: $margin,
|
||||
padding: $padding,
|
||||
);
|
||||
|
||||
@each $name, $map in $props {
|
||||
$four: if(length(map-keys($map)) == 4, true, false);
|
||||
$null: if(index(map-values($map), null), true, false);
|
||||
|
||||
@if $four and not($null) {
|
||||
$top: map-get($map, '#{$name}-top');
|
||||
$right: map-get($map, '#{$name}-right');
|
||||
$bottom: map-get($map, '#{$name}-bottom');
|
||||
$left: map-get($map, '#{$name}-left');
|
||||
|
||||
$tb: if($top == $bottom, $top, null);
|
||||
$rl: if($right == $left, $right, null);
|
||||
$all: if($tb == $rl, $tb, null);
|
||||
|
||||
$new: if($all, $all, null);
|
||||
|
||||
@if not($new) {
|
||||
@if $tb and $rl {
|
||||
$new: $tb $rl;
|
||||
} @else if $rl {
|
||||
$new: $top $rl $bottom;
|
||||
} @else {
|
||||
$new: $top $right $bottom $left;
|
||||
}
|
||||
}
|
||||
|
||||
$return: map-merge($return, ($name: $new));
|
||||
} @else {
|
||||
$return: map-merge($return, $map);
|
||||
}
|
||||
}
|
||||
|
||||
@return $return;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// Susy Box Sizing
|
||||
// =================
|
||||
|
||||
// Global Box Sizing
|
||||
// -----------------
|
||||
// Set a box model globally on all elements.
|
||||
// - [$box]: border-box | content-box
|
||||
// - [$inherit]: true | false
|
||||
@mixin global-box-sizing(
|
||||
$box: susy-get(global-box-sizing),
|
||||
$inherit: false
|
||||
) {
|
||||
$inspect: $box;
|
||||
|
||||
@if $inherit {
|
||||
@at-root {
|
||||
html { @include output((box-sizing: $box)); }
|
||||
*, *:before, *:after { box-sizing: inherit; }
|
||||
}
|
||||
} @else {
|
||||
*, *:before, *:after { @include output((box-sizing: $box)); }
|
||||
}
|
||||
|
||||
@include susy-inspect(global-box-sizing, $inspect);
|
||||
@include update-box-model($box);
|
||||
}
|
||||
|
||||
// Border Box Sizing
|
||||
// -----------------
|
||||
// A legacy shortcut...
|
||||
// - [$inherit]: true | false
|
||||
@mixin border-box-sizing(
|
||||
$inherit: false
|
||||
) {
|
||||
@include global-box-sizing(border-box, $inherit);
|
||||
}
|
||||
|
||||
// Update Box Model
|
||||
// ----------------
|
||||
// PRIVATE: Updates global box model setting
|
||||
@mixin update-box-model(
|
||||
$box
|
||||
) {
|
||||
@if $box != susy-get(global-box-sizing) {
|
||||
@include susy-set(global-box-sizing, $box);
|
||||
}
|
||||
}
|
||||
-185
@@ -1,185 +0,0 @@
|
||||
// Breakpoint Integration
|
||||
// ======================
|
||||
|
||||
$susy-media: () !default;
|
||||
$susy-media-fallback: false !default;
|
||||
|
||||
$_susy-media-context: ();
|
||||
|
||||
|
||||
// Susy Breakpoint
|
||||
// ---------------
|
||||
// Change grids at different media query breakpoints.
|
||||
// - $query : <min-width> [<max-width>] | <property> <value> | <map>
|
||||
// - $layout : <settings>
|
||||
// - $no-query : <boolean> | <selector>
|
||||
@mixin susy-breakpoint(
|
||||
$query,
|
||||
$layout: false,
|
||||
$no-query: $susy-media-fallback
|
||||
) {
|
||||
@include susy-media-router($query, $no-query) {
|
||||
@if $layout {
|
||||
@include with-layout($layout) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Susy Media
|
||||
// ----------
|
||||
// - $query: <min-width> [<max-width>] | <property> <value>
|
||||
// - $no-query: <boolean> | <selector>
|
||||
@mixin susy-media(
|
||||
$query,
|
||||
$no-query: $susy-media-fallback
|
||||
) {
|
||||
$old-context: $_susy-media-context;
|
||||
$name: if(map-has-key($susy-media, $query), $query, null);
|
||||
$query: susy-get-media($query);
|
||||
$query: susy-parse-media($query);
|
||||
|
||||
@include susy-media-context($query, $name);
|
||||
|
||||
@if $no-query and type-of($no-query) != string {
|
||||
@content;
|
||||
} @else {
|
||||
@media #{susy-render-media($query)} {
|
||||
@content;
|
||||
}
|
||||
|
||||
@if type-of($no-query) == string {
|
||||
#{$no-query} & {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include susy-media-context($old-context, $clean: true);
|
||||
}
|
||||
|
||||
|
||||
// Media Router
|
||||
// ------------
|
||||
// Rout media arguments to the correct mixin.
|
||||
@mixin susy-media-router(
|
||||
$query,
|
||||
$no-query: $susy-media-fallback
|
||||
) {
|
||||
@if susy-support(breakpoint, (mixin: breakpoint), $warn: false) {
|
||||
@include breakpoint($query, $no-query) {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@include susy-media($query, $no-query) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update Context
|
||||
// -------------
|
||||
// Set the new media context
|
||||
@mixin susy-media-context(
|
||||
$query,
|
||||
$name: null,
|
||||
$clean: false
|
||||
) {
|
||||
$query: map-merge((name: $name), $query);
|
||||
|
||||
@if $clean {
|
||||
$_susy-media-context: $query !global;
|
||||
} @else {
|
||||
$_susy-media-context: map-merge($_susy-media-context, $query) !global;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Media Context
|
||||
// -------------
|
||||
// Return the full media context, or a single media property (e.g. min-width)
|
||||
@function susy-media-context(
|
||||
$property: false
|
||||
) {
|
||||
@if $property {
|
||||
@return map-get($_susy-media-context, $property);
|
||||
} @else {
|
||||
@return $_susy-media-context;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Get Media
|
||||
// ---------
|
||||
// Return a named media-query from $susy-media.
|
||||
// - $name: <key>
|
||||
@function susy-get-media(
|
||||
$name
|
||||
) {
|
||||
@if map-has-key($susy-media, $name) {
|
||||
$map-value: map-get($susy-media, $name);
|
||||
@if ($name == $map-value) {
|
||||
$name: $map-value;
|
||||
} @else {
|
||||
$name: susy-get-media($map-value);
|
||||
}
|
||||
}
|
||||
|
||||
@return $name;
|
||||
}
|
||||
|
||||
|
||||
// Render Media
|
||||
// ------------
|
||||
// Build a media-query string from various media settings
|
||||
@function susy-render-media(
|
||||
$query
|
||||
) {
|
||||
$output: null;
|
||||
@each $property, $value in $query {
|
||||
$string: null;
|
||||
|
||||
@if $property == media {
|
||||
$string: $value;
|
||||
} @else {
|
||||
$string: '(#{$property}: #{$value})';
|
||||
}
|
||||
|
||||
$output: if($output, '#{$output} and #{$string}', $string);
|
||||
}
|
||||
|
||||
@return $output;
|
||||
}
|
||||
|
||||
|
||||
// Parse Media
|
||||
// -----------
|
||||
// Return parsed media-query settings based on shorthand
|
||||
@function susy-parse-media(
|
||||
$query
|
||||
) {
|
||||
$mq: null;
|
||||
@if type-of($query) == map {
|
||||
$mq: $query;
|
||||
} @else if type-of($query) == number {
|
||||
$mq: (min-width: $query);
|
||||
} @else if type-of($query) == list and length($query) == 2 {
|
||||
@if type-of(nth($query, 1)) == number {
|
||||
$mq: (
|
||||
min-width: min($query...),
|
||||
max-width: max($query...),
|
||||
);
|
||||
} @else {
|
||||
$mq: (nth($query, 1): nth($query, 2));
|
||||
}
|
||||
} @else {
|
||||
$mq: (media: '#{$query}');
|
||||
}
|
||||
|
||||
@return $mq;
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
// Container Syntax
|
||||
// ================
|
||||
|
||||
// Container [mixin]
|
||||
// -----------------
|
||||
// Set a container element
|
||||
// - [$layout] : <settings>
|
||||
@mixin container(
|
||||
$layout: $susy
|
||||
) {
|
||||
$inspect : $layout;
|
||||
$layout : parse-grid($layout);
|
||||
|
||||
$_width : get-container-width($layout);
|
||||
$_justify : parse-container-position(susy-get(container-position, $layout));
|
||||
$_property : if(susy-get(math, $layout) == static, width, max-width);
|
||||
|
||||
$_box : susy-get(box-sizing, $layout);
|
||||
|
||||
@if $_box {
|
||||
@include output((box-sizing: $_box));
|
||||
}
|
||||
|
||||
@include susy-inspect(container, $inspect);
|
||||
@include float-container($_width, $_justify, $_property);
|
||||
@include show-grid($layout);
|
||||
}
|
||||
|
||||
// Container [function]
|
||||
// --------------------
|
||||
// Return container width
|
||||
// - [$layout] : <settings>
|
||||
@function container(
|
||||
$layout: $susy
|
||||
) {
|
||||
$layout: parse-grid($layout);
|
||||
@return get-container-width($layout);
|
||||
}
|
||||
|
||||
// Get Container Width
|
||||
// -------------------
|
||||
// Calculate the container width
|
||||
// - [$layout]: <settings>
|
||||
@function get-container-width(
|
||||
$layout: $susy
|
||||
) {
|
||||
$layout : parse-grid($layout);
|
||||
$_width : susy-get(container, $layout);
|
||||
$_column-width : susy-get(column-width, $layout);
|
||||
$_math : susy-get(math, $layout);
|
||||
|
||||
@if not($_width) or $_width == auto {
|
||||
@if valid-column-math($_math, $_column-width) {
|
||||
$_columns : susy-get(columns, $layout);
|
||||
$_gutters : susy-get(gutters, $layout);
|
||||
$_spread : if(is-split($layout), wide, narrow);
|
||||
$_width : susy-sum($_columns, $_gutters, $_spread) * $_column-width;
|
||||
} @else {
|
||||
$_width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@return $_width;
|
||||
}
|
||||
|
||||
// Parse Container Position
|
||||
// ------------------------
|
||||
// Parse the $container-position into margin values.
|
||||
// - [$justify] : left | center | right | <length> [<length>]
|
||||
@function parse-container-position(
|
||||
$justify: map-get($susy-defaults, container-position)
|
||||
) {
|
||||
$_return: if($justify == left, 0, auto) if($justify == right, 0, auto);
|
||||
|
||||
@if not(index(left right center, $justify)) {
|
||||
$_return: nth($justify, 1);
|
||||
$_return: $_return if(length($justify) > 1, nth($justify, 2), $_return);
|
||||
}
|
||||
|
||||
@return $_return;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
// Context Syntax
|
||||
// ==============
|
||||
|
||||
// Nested [function]
|
||||
// -----------------
|
||||
// Return a subset grid for nested context.
|
||||
// - $context : <span>
|
||||
@function nested(
|
||||
$context
|
||||
) {
|
||||
$context : parse-span($context);
|
||||
$span : susy-get(span, $context);
|
||||
$location : get-location($context);
|
||||
$columns : susy-get(columns, $context);
|
||||
|
||||
@return susy-slice($span, $location, $columns);
|
||||
}
|
||||
|
||||
// Nested [mixin]
|
||||
// --------------
|
||||
// Use a subset grid for a nested context
|
||||
// - $context : <span>
|
||||
// - @content : <content>
|
||||
@mixin nested(
|
||||
$context
|
||||
) {
|
||||
$inspect : $context;
|
||||
$context : parse-span($context);
|
||||
$old : susy-get(columns);
|
||||
$susy : map-merge($susy, (columns: nested($context))) !global;
|
||||
|
||||
@include susy-inspect(nested, $inspect);
|
||||
@content;
|
||||
|
||||
$susy : map-merge($susy, (columns: $old)) !global;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
// Gallery Syntax
|
||||
// ==============
|
||||
|
||||
// Gallery
|
||||
// -------
|
||||
// Create an isolated gallery
|
||||
// - $span : <span>
|
||||
// - [$selector] : child | of-type
|
||||
@mixin gallery(
|
||||
$span,
|
||||
$selector: child
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : parse-span($span);
|
||||
$span : map-merge($span, (location: 1));
|
||||
|
||||
$n : susy-get(span, $span);
|
||||
$columns : susy-get(columns, $span);
|
||||
$context : susy-count($columns);
|
||||
$flow : susy-get(flow, $span);
|
||||
|
||||
$inside : is-inside($span);
|
||||
$from : from($flow);
|
||||
$line : floor($context / $n);
|
||||
$symmetrical : is-symmetrical($columns);
|
||||
|
||||
$output: (
|
||||
width : null,
|
||||
float : from,
|
||||
margin-before : null,
|
||||
margin-after : null,
|
||||
padding-before : null,
|
||||
padding-after : null,
|
||||
flow : $flow,
|
||||
);
|
||||
|
||||
@if $inside {
|
||||
$gutters: get-gutters($span);
|
||||
$output: map-merge($output, (
|
||||
padding-before: map-get($gutters, before),
|
||||
padding-after: map-get($gutters, after),
|
||||
));
|
||||
}
|
||||
|
||||
@if $symmetrical {
|
||||
$output: map-merge($output, (width: get-span-width($span)));
|
||||
}
|
||||
|
||||
$box : susy-get(box-sizing, $span);
|
||||
$global-box : if(susy-get(global-box-sizing) == 'border-box', true, false);
|
||||
|
||||
@include susy-inspect(gallery, $inspect);
|
||||
|
||||
// Collective Output
|
||||
@if $box == border-box or ($inside and not($box) and not($global-box)) {
|
||||
@include output((box-sizing: border-box));
|
||||
} @else if $box == content-box {
|
||||
@include output((box-sizing: content-box));
|
||||
}
|
||||
|
||||
@include float-span-output($output...);
|
||||
|
||||
// Individual Loop
|
||||
@for $item from 1 through $line {
|
||||
$nth: '#{$line}n + #{$item}';
|
||||
&:nth-#{$selector}(#{$nth}) {
|
||||
// Individual Prep
|
||||
$output: (
|
||||
width : if($symmetrical, null, get-span-width($span)),
|
||||
float : null,
|
||||
margin-before : get-isolation($span),
|
||||
margin-after : -100%,
|
||||
padding-before : null,
|
||||
padding-after : null,
|
||||
flow : $flow,
|
||||
);
|
||||
|
||||
// Individual Output
|
||||
@include float-span-output($output...);
|
||||
|
||||
@if get-edge($span) == first {
|
||||
@include break;
|
||||
@include first($span);
|
||||
} @else {
|
||||
@include nobreak;
|
||||
}
|
||||
|
||||
// Individual Location Increment
|
||||
$location: get-location($span) + $n;
|
||||
$location: if($location > $context, 1, $location);
|
||||
$span: map-merge($span, (location: $location));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
// Grid Syntax
|
||||
// ===========
|
||||
|
||||
|
||||
// Layout
|
||||
// ------
|
||||
// Set a new layout using a shorthand
|
||||
// - $layout: <settings>
|
||||
// - $clean: boolean
|
||||
@mixin layout(
|
||||
$layout,
|
||||
$clean: false
|
||||
) {
|
||||
$inspect : $layout;
|
||||
$susy : _get-layout($layout, $clean) !global;
|
||||
|
||||
@include susy-inspect(layout, $inspect);
|
||||
}
|
||||
|
||||
|
||||
// Use Grid
|
||||
// --------
|
||||
// Use an arbitrary layout for a section of code
|
||||
// - $layout: <settings>
|
||||
// - $clean: boolean
|
||||
@mixin with-layout(
|
||||
$layout,
|
||||
$clean: false
|
||||
) {
|
||||
$inspect : $layout;
|
||||
$old : $susy;
|
||||
$susy : _get-layout($layout, $clean) !global;
|
||||
|
||||
@include susy-inspect(with-layout, $inspect);
|
||||
|
||||
@content;
|
||||
|
||||
$susy: $old !global;
|
||||
}
|
||||
|
||||
|
||||
// Layout
|
||||
// ------
|
||||
// Return a parsed layout map based on shorthand syntax
|
||||
// - $layout: <settings>
|
||||
@function layout(
|
||||
$layout: $susy
|
||||
) {
|
||||
@return parse-grid($layout);
|
||||
}
|
||||
|
||||
|
||||
// Get Layout
|
||||
// ----------
|
||||
// Return a new layout based on current and given settings
|
||||
// - $layout: <settings>
|
||||
// - $clean: boolean
|
||||
@function _get-layout(
|
||||
$layout,
|
||||
$clean: false
|
||||
) {
|
||||
$layout: layout($layout);
|
||||
@return if($clean, $layout, _susy-deep-merge($susy, $layout));
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
// Gutter Syntax
|
||||
// =============
|
||||
|
||||
|
||||
// Gutters
|
||||
// -------
|
||||
// Set gutters on an element.
|
||||
// - [$span] : <settings>
|
||||
@mixin gutters(
|
||||
$span: $susy
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : parse-gutters($span);
|
||||
$_gutters : get-gutters($span);
|
||||
|
||||
$_output: (
|
||||
before: map-get($_gutters, before),
|
||||
after: map-get($_gutters, after),
|
||||
flow: susy-get(flow, $span),
|
||||
);
|
||||
|
||||
@include susy-inspect(gutters, $inspect);
|
||||
|
||||
@if is-inside($span) {
|
||||
@include padding-output($_output...);
|
||||
} @else {
|
||||
@include margin-output($_output...);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin gutter(
|
||||
$span: $susy
|
||||
) {
|
||||
@include gutters($span);
|
||||
}
|
||||
|
||||
|
||||
// Gutter
|
||||
// ------
|
||||
// Return the width of a gutter.
|
||||
// - [$span] : <settings>
|
||||
@function gutter(
|
||||
$span: $susy
|
||||
) {
|
||||
$span: parse-gutters($span);
|
||||
|
||||
$_gutters: get-gutters($span);
|
||||
$_gutters: map-get($_gutters, before) or map-get($_gutters, after);
|
||||
|
||||
@return $_gutters;
|
||||
}
|
||||
|
||||
@function gutters(
|
||||
$span: $susy
|
||||
) {
|
||||
@return gutter($span);
|
||||
}
|
||||
|
||||
|
||||
// Get Gutter Width
|
||||
// ----------------
|
||||
// Return gutter width.
|
||||
// - [$context]: <context>
|
||||
@function get-gutter-width(
|
||||
$context: $susy
|
||||
) {
|
||||
$context : parse-gutters($context);
|
||||
|
||||
$_gutters : susy-get(gutters, $context);
|
||||
$_gutter : susy-get(gutter-override, $context);
|
||||
|
||||
@if $_gutters and ($_gutters > 0) and not($_gutter) {
|
||||
$_column-width: susy-get(column-width, $context);
|
||||
$_math: gutter-math($context);
|
||||
@if $_math == static {
|
||||
$_gutter: $_gutters * valid-column-math($_math, $_column-width);
|
||||
} @else {
|
||||
$_columns : susy-get(columns, $context);
|
||||
$_spread : if(is-split($context), wide, susy-get(spread, $context));
|
||||
$_gutter : percentage($_gutters / susy-sum($_columns, $_gutters, $_spread));
|
||||
}
|
||||
}
|
||||
|
||||
$_gutter: if($_gutter == 'no-gutters' or $_gutter == 'no-gutter', null, $_gutter);
|
||||
|
||||
@return $_gutter;
|
||||
}
|
||||
|
||||
|
||||
// Get Gutters
|
||||
// -----------
|
||||
// Return before and after gutter values.
|
||||
// - [$context]: <context>
|
||||
@function get-gutters(
|
||||
$context: $susy
|
||||
) {
|
||||
$context : parse-gutters($context);
|
||||
|
||||
$_gutter-position : susy-get(gutter-position, $context);
|
||||
$_gutter : get-gutter-width($context);
|
||||
|
||||
$_return : (before: null, after: null);
|
||||
|
||||
@if is-split($context) and $_gutter {
|
||||
$_gutter: $_gutter / 2;
|
||||
$_return: map-merge($_return, (before: $_gutter, after: $_gutter));
|
||||
} @else {
|
||||
$_return: map-merge($_return, ($_gutter-position: $_gutter));
|
||||
}
|
||||
|
||||
@return $_return;
|
||||
}
|
||||
|
||||
|
||||
// Is Inside
|
||||
// ---------
|
||||
// Returns true if gutters are inside.
|
||||
// $context: <context>
|
||||
@function is-inside(
|
||||
$context
|
||||
) {
|
||||
$_inside: inside inside-static;
|
||||
$_gutter-position: susy-get(gutter-position, $context);
|
||||
|
||||
@return if(index($_inside, $_gutter-position), true, false);
|
||||
}
|
||||
|
||||
|
||||
// Is Split
|
||||
// --------
|
||||
// Returns true if gutters are split.
|
||||
// $context: <context>
|
||||
@function is-split(
|
||||
$context
|
||||
) {
|
||||
$_split: split inside inside-static;
|
||||
$_gutter-position: susy-get(gutter-position, $context);
|
||||
|
||||
@return if(index($_split, $_gutter-position), true, false);
|
||||
}
|
||||
|
||||
|
||||
// Gutter Math
|
||||
// -----------
|
||||
// Return the math to use for gutter calculations
|
||||
// $context: <context>
|
||||
@function gutter-math(
|
||||
$context: $susy
|
||||
) {
|
||||
$_return : susy-get(math, $context);
|
||||
$_return : if(susy-get(gutter-position, $context) == inside-static, static, $_return);
|
||||
|
||||
@return $_return;
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// Isolation Syntax
|
||||
// ================
|
||||
|
||||
|
||||
// Isolate [Mixin]
|
||||
// ---------------
|
||||
// Set isolation as an override.
|
||||
// - $location: <span>
|
||||
@mixin isolate(
|
||||
$isolate: 1
|
||||
) {
|
||||
$inspect: $isolate;
|
||||
|
||||
$output: (
|
||||
push: isolate($isolate),
|
||||
flow: susy-get(flow, $isolate),
|
||||
);
|
||||
|
||||
@include susy-inspect(isolate, $inspect);
|
||||
@include isolate-output($output...);
|
||||
}
|
||||
|
||||
|
||||
// Isolate [function]
|
||||
// ------------------
|
||||
// Return an isolation offset width.
|
||||
// - $location: <span>
|
||||
@function isolate(
|
||||
$isolate: 1
|
||||
) {
|
||||
$isolate: parse-span($isolate);
|
||||
$isolation: susy-get(span, $isolate);
|
||||
|
||||
@if $isolation and not(get-location($isolate)) {
|
||||
$new: (
|
||||
span: null,
|
||||
location: $isolation,
|
||||
);
|
||||
$isolate: map-merge($isolate, $new);
|
||||
}
|
||||
|
||||
@return get-isolation($isolate);
|
||||
}
|
||||
|
||||
|
||||
// Get Isolation
|
||||
// -------------
|
||||
// Return the isolation offset width
|
||||
// - $input: <map>
|
||||
@function get-isolation(
|
||||
$input
|
||||
) {
|
||||
$location : get-location($input);
|
||||
$columns : susy-get(columns, $input);
|
||||
$width : null;
|
||||
|
||||
@if type-of($location) == number and not(unitless($location)) {
|
||||
$width: $location;
|
||||
} @else if $location {
|
||||
$push: $location - 1;
|
||||
@if $push > 0 {
|
||||
$push: map-merge($input, (
|
||||
span: $push,
|
||||
location: 1,
|
||||
spread: wide,
|
||||
));
|
||||
$width: get-span-width($push);
|
||||
}
|
||||
}
|
||||
|
||||
@if susy-get(gutter-position, $input) == split
|
||||
and susy-get(gutters, $input) > 0 {
|
||||
$width: if($width == null, gutters($input), $width + gutters($input));
|
||||
}
|
||||
|
||||
@return $width or 0;
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
// Margin Syntax
|
||||
// =============
|
||||
|
||||
// Pre
|
||||
// ---
|
||||
// Add spanning-margins before an element.
|
||||
// - $span : <span>
|
||||
@mixin pre(
|
||||
$span
|
||||
) {
|
||||
$inspect: $span;
|
||||
$span : map-merge((spread: wide), parse-span($span));
|
||||
$flow : susy-get(flow, $span);
|
||||
$split : if(susy-get(gutter-position, $span) == split, true, false);
|
||||
$gutter : gutter($span);
|
||||
$span : span($span);
|
||||
$width : if($split and $gutter, $span + $gutter, $span);
|
||||
|
||||
@include susy-inspect(pre, $inspect);
|
||||
@include margin-output($width, null, $flow);
|
||||
}
|
||||
|
||||
// Post
|
||||
// ----
|
||||
// Add spanning-margins after an element.
|
||||
// - $span : <span>
|
||||
@mixin post(
|
||||
$span
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : map-merge((spread: wide), parse-span($span));
|
||||
$flow : susy-get(flow, $span);
|
||||
$split : if(susy-get(gutter-position, $span) == split, true, false);
|
||||
$width : if($split, span($span) + gutter($span), span($span));
|
||||
|
||||
@include susy-inspect(post, $inspect);
|
||||
@include margin-output(null, $width, $flow);
|
||||
}
|
||||
|
||||
// Push
|
||||
// ----
|
||||
// Simple synonymn for pre.
|
||||
// - $span : <span>
|
||||
@mixin push(
|
||||
$span
|
||||
) {
|
||||
@include pre($span);
|
||||
}
|
||||
|
||||
// Pull
|
||||
// ----
|
||||
// Add negative spanning-margins before an element.
|
||||
// - $span : <span>
|
||||
@mixin pull(
|
||||
$span
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : map-merge((spread: wide), parse-span($span));
|
||||
$flow : susy-get(flow, $span);
|
||||
$split : if(susy-get(gutter-position, $span) == split, true, false);
|
||||
$width : if($split, 0 - span($span) + gutter($span), 0 - span($span));
|
||||
|
||||
@include susy-inspect(pull, $inspect);
|
||||
@include margin-output($width, null, $flow);
|
||||
}
|
||||
|
||||
// Squish
|
||||
// ------
|
||||
// Add spanning-margins before and after an element.
|
||||
// - $pre : <span>
|
||||
// - [$post] : <span>
|
||||
@mixin squish(
|
||||
$pre,
|
||||
$post: false
|
||||
) {
|
||||
$inspect : ($pre, $post);
|
||||
$pre : map-merge((spread: wide), parse-span($pre));
|
||||
|
||||
@if $post {
|
||||
$post: map-merge((spread: wide), parse-span($post));
|
||||
} @else {
|
||||
$span: susy-get(span, $pre);
|
||||
@if length($span) > 1 {
|
||||
$pre: map-merge($pre, (span: nth($span, 1)));
|
||||
$post: map-merge($pre, (span: nth($span, 2)));
|
||||
} @else {
|
||||
$post: $pre;
|
||||
}
|
||||
}
|
||||
|
||||
@include susy-inspect(squish, $inspect);
|
||||
@include pre($pre);
|
||||
@include post($post);
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
// Padding Syntax
|
||||
// ==============
|
||||
|
||||
// Prefix
|
||||
// ------
|
||||
// Add spanning-padding before an element.
|
||||
// - $span : <span>
|
||||
@mixin prefix(
|
||||
$span
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : map-merge((spread: wide), parse-span($span));
|
||||
$flow : susy-get(flow, $span);
|
||||
$width : span($span);
|
||||
|
||||
@if is-inside($span) {
|
||||
$gutter: gutter($span);
|
||||
$width: if($gutter and comparable($width, $gutter), $width + $gutter, $width);
|
||||
}
|
||||
|
||||
@include susy-inspect(prefix, $inspect);
|
||||
@include padding-output($width, null, $flow);
|
||||
}
|
||||
|
||||
// Suffix
|
||||
// ------
|
||||
// Add spanning-padding after an element.
|
||||
// - $span : <span>
|
||||
@mixin suffix(
|
||||
$span
|
||||
) {
|
||||
$inspect : $span;
|
||||
$span : map-merge((spread: wide), parse-span($span));
|
||||
$flow : susy-get(flow, $span);
|
||||
$width : span($span);
|
||||
|
||||
@if is-inside($span) {
|
||||
$gutter: gutter($span);
|
||||
$width: if($gutter and comparable($width, $gutter), $width + $gutter, $width);
|
||||
}
|
||||
|
||||
@include susy-inspect(suffix, $inspect);
|
||||
@include padding-output(null, $width, $flow);
|
||||
}
|
||||
|
||||
// Pad
|
||||
// ---
|
||||
// Add spanning-padding before and after an element.
|
||||
// - $pre : <span>
|
||||
// - [$post] : <span>
|
||||
@mixin pad(
|
||||
$pre,
|
||||
$post: false
|
||||
) {
|
||||
$inspect : ($pre, $post);
|
||||
$pre : map-merge((spread: wide), parse-span($pre));
|
||||
|
||||
@if $post {
|
||||
$post: map-merge((spread: wide), parse-span($post));
|
||||
} @else {
|
||||
$span: susy-get(span, $pre);
|
||||
@if length($span) > 1 {
|
||||
$pre: map-merge($pre, (span: nth($span, 1)));
|
||||
$post: map-merge($pre, (span: nth($span, 2)));
|
||||
} @else {
|
||||
$post: $pre;
|
||||
}
|
||||
}
|
||||
|
||||
@include susy-inspect(pad, $inspect);
|
||||
@include prefix($pre);
|
||||
@include suffix($post);
|
||||
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
// Row Start & End
|
||||
// ===============
|
||||
|
||||
// Break
|
||||
// -----
|
||||
// Apply to any element that should force a line break.
|
||||
@mixin break {
|
||||
@include output((clear: both));
|
||||
}
|
||||
|
||||
|
||||
// NoBreak
|
||||
// -------
|
||||
// Cancel the break() effect, e.g. when using media queries.
|
||||
@mixin nobreak {
|
||||
@include output((clear: none));
|
||||
}
|
||||
|
||||
|
||||
// Full
|
||||
// ----
|
||||
// - [$context]: <layout shorthand>
|
||||
@mixin full(
|
||||
$context: $susy
|
||||
) {
|
||||
$inspect : $context;
|
||||
@include susy-inspect(full, $inspect);
|
||||
@include span(full of parse-grid($context) break);
|
||||
}
|
||||
|
||||
|
||||
// First
|
||||
// -----
|
||||
// - [$context]: <settings>
|
||||
@mixin first(
|
||||
$context: $susy
|
||||
) {
|
||||
$inspect : $context;
|
||||
$context : parse-grid($context);
|
||||
$flow : susy-get(flow, $context);
|
||||
|
||||
@include susy-inspect(first, $inspect);
|
||||
@if not(is-split($context)) {
|
||||
@include float-first($flow);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin alpha(
|
||||
$context: $susy
|
||||
) {
|
||||
@include first($context);
|
||||
}
|
||||
|
||||
|
||||
// Last
|
||||
// ----
|
||||
// - [$context]: <settings>
|
||||
@mixin last(
|
||||
$context: $susy
|
||||
) {
|
||||
$inspect : $context;
|
||||
$context : parse-grid($context);
|
||||
|
||||
@include susy-inspect(last, $inspect);
|
||||
|
||||
$output: (
|
||||
flow: susy-get(flow, $context),
|
||||
last-flow: susy-get(last-flow, $context),
|
||||
margin: if(is-split($context), null, 0),
|
||||
);
|
||||
|
||||
@include float-last($output...);
|
||||
}
|
||||
|
||||
@mixin omega(
|
||||
$context: $susy
|
||||
) {
|
||||
@include last($context);
|
||||
}
|
||||
|
||||
|
||||
// Get Edge
|
||||
// --------
|
||||
// Calculate edge value based on location, if possible
|
||||
@function get-edge(
|
||||
$span
|
||||
) {
|
||||
$span : parse-span($span);
|
||||
$edge : susy-get(edge, $span);
|
||||
|
||||
@if not($edge) {
|
||||
$count: susy-count(susy-get(columns, $span));
|
||||
$location: susy-get(location, $span);
|
||||
$n: susy-get(span, $span);
|
||||
|
||||
$number: if(type-of($location) == number, true, false);
|
||||
$index: if($number and unitless($location), true, false);
|
||||
|
||||
@if $n == $count {
|
||||
$edge: full;
|
||||
} @else if $location and $n and $index {
|
||||
@if $location == 1 {
|
||||
$edge: if($n == $count, full, first);
|
||||
} @else if $location + $n - 1 == $count {
|
||||
$edge: last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if $edge == alpha or $edge == omega {
|
||||
$edge: if($edge == alpha, first, last);
|
||||
}
|
||||
|
||||
@return $edge;
|
||||
}
|
||||
|
||||
|
||||
// Get Location
|
||||
// ------------
|
||||
// Calculate location value based on edge, if possible
|
||||
@function get-location(
|
||||
$span
|
||||
) {
|
||||
$span : parse-span($span);
|
||||
$location : susy-get(location, $span);
|
||||
$edge : get-edge($span);
|
||||
$n : susy-get(span, $span);
|
||||
|
||||
@if $edge and not($location) and type-of($n) == number and unitless($n) {
|
||||
@if $edge == first {
|
||||
$location: 1;
|
||||
} @else if $edge == last {
|
||||
$location: susy-count(susy-get(columns, $span)) - $n + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@return $location
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user