diff --git a/eleventy.config.js b/eleventy.config.js index 98afeae..5bce407 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -7,7 +7,6 @@ const mdDefList = require("markdown-it-deflist"); const mdToc = require("markdown-it-table-of-contents"); const mdAnchor = require("markdown-it-anchor"); const nunjucksDate = require("nunjucks-date"); -const markdownIt = require("markdown-it"); function addEleventyPlugins(eleventyConfig) { eleventyConfig.addPlugin(eleventyNavigationPlugin); @@ -31,9 +30,6 @@ function configureMarkdown(eleventyConfig) { } function addFilters(eleventyConfig) { - let md = new markdownIt(); - - eleventyConfig.addFilter("renderMarkdown", (mdString) => md.render(mdString)); eleventyConfig.addFilter("log", (value) => console.log(value)); eleventyConfig.addFilter("date", nunjucksDate); eleventyConfig.addFilter("IsNotPage", (collection, url) => @@ -62,7 +58,6 @@ module.exports = function (eleventyConfig) { files: "./_site/css/**/*.css", }); - eleventyConfig.addPassthroughCopy("src/img"); eleventyConfig.addPassthroughCopy({ "node_modules/prism-themes/themes/prism-material-light.min.css": "css/prism-material-light.min.css", diff --git a/src/_includes/posts-list.njk b/src/_includes/posts-list.njk index 891dd50..40df637 100644 --- a/src/_includes/posts-list.njk +++ b/src/_includes/posts-list.njk @@ -29,7 +29,7 @@ {% endfor %} -

{{ post.data.description | renderMarkdown | safe }}

+

{{ post.data.description }}

{% endfor %} {% else %} diff --git a/src/img/BasicDescriptionList.png b/src/img/BasicDescriptionList.png deleted file mode 100644 index c26cfd0..0000000 Binary files a/src/img/BasicDescriptionList.png and /dev/null differ diff --git a/src/img/ColumnsDescriptionList.png b/src/img/ColumnsDescriptionList.png deleted file mode 100644 index 13d469a..0000000 Binary files a/src/img/ColumnsDescriptionList.png and /dev/null differ diff --git a/src/posts/DescriptionListStyling.md b/src/posts/DescriptionListStyling.md deleted file mode 100644 index 1947eff..0000000 --- a/src/posts/DescriptionListStyling.md +++ /dev/null @@ -1,191 +0,0 @@ ---- -title: Description List Styling -description: Some styling for `
` elements beyond the basics I usually see -tags: [ Programming, CSS ] ---- - -The `
` element is useful for displaying metadata or a read only version of a form. The basic way of styling these is to make `
` elements bold and make `
` and `
` block elements. These styles allow some more complex ways of displaying a description list. - -## Default Basic Styles - -These are some basic styles to use by default: - -Basic Description List Styles - -```html -
-
Term 1
-
Term 1 description
- -
Term 2
-
Term 2 description 1
-
Term 2 description 2
-
-``` - -```scss -dl { - margin-block-start: 0; - margin-block-end: 0; - margin-bottom: 1em; -} - -dt { - font-weight: bold; - line-height: 1.75; -} - -dd { - margin-inline-start: 0; - margin-left: 1em; - line-height: 1.75; -} - -// Add spacing between dd elements -dd + dd { - margin-top: 0.5em; -} -``` - -## Side-By-Side Columns - -This styling will put the `
` elements in one column and the `
` elements into another. This can cause issues on small screens, so it supports breakpoints where it will fall back to the default style. - -Side-By-Side Columns Description List Styles - -```html -
-
Term 1
-
Term 1 description
- -
Term 2
-
Term 2 description 1
-
Term 2 description 2
- -
Term 3
-
Term 3 description 1
-
Term 3 description 2
-
-``` - -```scss -$columns-base-name: dl-columns; -$wsu-breakpoint-map: ( - "phone-small": 450px, - "phone": 576px, - "tablet": 768px, - "tablet-medium": 860px, - "tablet-large": 992px, - "desktop": 1260px, - "ultrawide": 1600px, - "xultrawide": 1900px, - "xxultrawide": 2400px -); - -@each $name, $value in $wsu-breakpoint-map { - @media (min-width: #{$value}) { - dl.#{$columns-base-name}-#{$name} { - display: grid; - grid-template-columns: auto 1fr; - gap: 0 1rem; - - & > dt { - grid-column: 1; - } - - & > dd { - grid-column: 2; - margin-left: 0; - margin-top: 0; - } - - // Allow going back to the default stacked style - div.escape-columns { - grid-column: span 2; - - dt { - margin-top: 0.5em; - } - - dd { - margin-left: 1em; - } - - dt, - dd { - display: block; - } - } - } - } -} -``` - -You can also mix this with the default stacked style: - -Mixed Description List Styles - -```html -
-
Term 1
-
Term 1 description
- -
Term 2
-
Term 2 description 1
-
Term 2 description 2
- -
-
Term 3
-
-
Here's a block of code
-
-
-
-``` - -## Index List - -This styling is for a list of links with a description. This is particularly useful for index pages that have an actual list of pages. - -Mixed Description List Styles - -```html -
-
Page 1
-
A description of page 1
- -
Page 2
-
A description of page 2
- -
Page 3
-
A description of page 3
-
-``` - -```scss -dl.index-list { - dt { - display: inline; - - &:after { - content: " - "; - } - } - - dd { - display: inline; - margin-left: 0; - - &:not(:last-child):after { - // Display each dt/dd pair on separate lines - content: ""; - display: block; - margin-bottom: 1em; - } - } -} -```