Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jan 8, 2019
1 parent 99e74a2 commit c5f7480
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ module.exports = function(eleventyConfig) {
return `<a href="${href}" class="minilink minilink-lower">${text}</a>`;
});

eleventyConfig.addShortcode("addedin", function(version, tag) {
eleventyConfig.addShortcode("addedin", function(version, tag, extraClass) {
if( typeof version !== "string" ) {
tag = version.tag;
version = version.version;
}

tag = tag || "span";

return `<${tag} class="minilink minilink-addedin">New in v${version}</${tag}>`;
return `<${tag} class="minilink minilink-addedin${extraClass ? ` ${extraClass}`: ""}">New in v${version}</${tag}>`;
});

eleventyConfig.addPassthroughCopy("css/fonts");
Expand Down
6 changes: 6 additions & 0 deletions _includes/components/callout.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@
.elv-callout-info:before {
content: "ℹ️ ";
}
.elv-callout-info code {
background-color: #99e6ff;
}
.elv-callout-warn {
background-color: #ffa;
}
.elv-callout-warn:before {
content: "⚠️ ";
}
.elv-callout-warn code {
background-color: #ffff24;
}
.elv-callout:first-child {
margin-top: 0;
}
Expand Down
7 changes: 7 additions & 0 deletions _includes/components/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ code {
-moz-hyphens: manual;
hyphens: manual;
background-color: #efefef;
padding-left: 4px;
padding-right: 4px;
border-radius: .15em;
}
pre code {
border-radius: 0;
}
pre > code {
background-color: transparent;
padding: 0;
}
pre + pre[class*="language-"] {
margin-top: 1em;
Expand Down
4 changes: 4 additions & 0 deletions _includes/components/minilink.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ h4 .minilink {
.minilink-addedin:not(:first-child) {
margin-left: 1em;
}
.minilink-addedin.minilink-inline {
margin: 0 4px;
background-color: #fff;
}

.minilink-lower {
text-transform: none;
Expand Down
4 changes: 2 additions & 2 deletions docs/ignores.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ tags:
---
# Ignore Template Files

Add an `.eleventyignore` file to the _root of your input directory_ for a new line-separated list of files (or globs) that will not be processed by Eleventy. Paths listed in your project’s `.gitignore` file are automatically ignored.
Add an `.eleventyignore` file to your _input directory_ (or your _project root_ {% addedin "0.7.0", "span", "minilink-inline" %}) for a new line-separated list of files (or globs) that will not be processed by Eleventy. Paths listed in your project’s `.gitignore` file are automatically ignored.

Important note: if you do not have a `.gitignore` file in your project, the `node_modules` directory will be ignored automatically.
{% callout "info" %}If you do not have a <code>.gitignore</code> file in your project, the <code>node_modules</code> directory will be ignored automatically.{% endcallout %}

## Example

Expand Down

0 comments on commit c5f7480

Please sign in to comment.