-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from oddbird/homepage
Add homepage, global navigation, get involved, community guidelines, and install pages.
- Loading branch information
Showing
37 changed files
with
1,168 additions
and
1,298 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
'use strict'; | ||
|
||
const formatDistanceToNow = require('date-fns/formatDistanceToNow'); | ||
const yaml = require('js-yaml'); | ||
const markdown = require('markdown-it'); | ||
const markdownDefList = require('markdown-it-deflist'); | ||
const typogrify = require('typogr'); | ||
const { EleventyRenderPlugin } = require('@11ty/eleventy'); | ||
|
||
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */ | ||
module.exports = (eleventyConfig) => { | ||
eleventyConfig.addPassthroughCopy('source/assets/dist'); | ||
eleventyConfig.addPassthroughCopy('source/assets/img'); | ||
eleventyConfig.addPassthroughCopy('source/favicon.ico'); | ||
|
||
eleventyConfig.setLiquidOptions({ | ||
jsTruthy: true, | ||
}); | ||
eleventyConfig.setUseGitIgnore(false); | ||
|
||
const mdown = markdown({ | ||
html: true, | ||
typographer: true, | ||
}).use(markdownDefList); | ||
|
||
eleventyConfig.setLibrary('md', mdown); | ||
eleventyConfig.addDataExtension('yml, yaml', (contents) => | ||
yaml.load(contents), | ||
); | ||
|
||
// Paired shortcodes... | ||
eleventyConfig.addPairedLiquidShortcode('markdown', (content) => | ||
mdown.render(content), | ||
); | ||
|
||
eleventyConfig.addPairedLiquidShortcode('markdownInline', (content) => | ||
mdown.renderInline(content), | ||
); | ||
|
||
eleventyConfig.addPairedLiquidShortcode('typogr', (content) => | ||
typogrify.typogrify(content), | ||
); | ||
|
||
// Filters... | ||
eleventyConfig.addLiquidFilter('formatDistanceToNow', (date) => { | ||
return formatDistanceToNow(new Date(date)); | ||
}); | ||
|
||
eleventyConfig.addLiquidFilter('markdown', (content) => | ||
mdown.render(content), | ||
); | ||
|
||
eleventyConfig.addLiquidFilter('markdownInline', (content) => | ||
mdown.renderInline(content), | ||
); | ||
|
||
eleventyConfig.addLiquidFilter('typogr', (content) => | ||
typogrify.typogrify(content), | ||
); | ||
|
||
eleventyConfig.addLiquidFilter('isTypedoc', (page) => | ||
page.url.startsWith('/documentation/js-api/'), | ||
); | ||
|
||
eleventyConfig.addPlugin(EleventyRenderPlugin); | ||
|
||
// settings | ||
return { | ||
dir: { | ||
input: 'source', | ||
includes: '_includes', | ||
layouts: '_layouts', | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- heading: Black Lives Matter | ||
body: > | ||
Sass stands with the protesters against police violence. We encourage our | ||
users to **get in the streets and join them if you can**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<nav class="sl-c-list-horizontal-wrapper"> | ||
|
||
- [Sass on GitHub](https://github.com/sass) | ||
- [Website Source Code](https://github.com/sass/sass-site) | ||
- [Style Guide](/styleguide) | ||
- [Community Guidelines](/community-guidelines) | ||
|
||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<header | ||
class="sl-r-banner" | ||
itemtype="http://schema.org/WPHeader" | ||
itemscope="itemscope" | ||
role="banner"> | ||
{% for alert in alerts | default: [] %} | ||
<div class="sl-c-alert sl-c-alert--special"> | ||
<div class="sl-l-container"> | ||
<h2 class="sl-c-alert-title">{{ alert.heading }}</h2> | ||
{{ alert.body | markdown }} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
<div class="sl-c-pop-stripe"></div> | ||
<div class="sl-l-container"> | ||
<div class="sl-l-grid sl-l-grid--full sl-l-large-grid--fit sl-l-large-grid--center sl-l-large-grid--gutters"> | ||
<p class="sl-l-grid__column sl-r-banner__brand"> | ||
<a href="/"><img height="48" alt="Sass" src="/assets/img/logos/logo.svg"></a> | ||
</p> | ||
|
||
{% renderFile 'source/_includes/header_nav.md' %} | ||
</div> | ||
</div> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<nav | ||
class="sl-r-banner__navigation sl-l-grid__column sl-l-large-grid sl-l-large-grid__column--auto-size sl-c-list-horizontal-wrapper" | ||
itemtype="http://schema.org/SiteNavigationElement" | ||
itemscope="itemscope" | ||
role="navigation" | ||
aria-label="Site navigation"> | ||
|
||
- [Install](/install) | ||
- [Learn Sass](/guide) | ||
- [Blog](/blog) | ||
- [Documentation](/documentation) | ||
- [Get Involved](/community) | ||
- <div id="docsearch"></div> | ||
|
||
</nav> |
Oops, something went wrong.