From d2f98103c45b64387eea612a6a0869c272d8f8d8 Mon Sep 17 00:00:00 2001 From: Heydon Pickering Date: Tue, 15 Aug 2017 17:47:49 +0100 Subject: [PATCH] snippets and flexbox testing tables --- content/patterns/writing/snippets.md | 15 + docs/css/styles.css | 30 +- docs/index.html | 16 + docs/index.xml | 10 + docs/js/dom-scripts.js | 2 +- docs/patterns/coding/code-blocks/index.html | 16 + .../patterns/coding/color-palettes/index.html | 16 + docs/patterns/coding/command-line/index.html | 16 + .../patterns/coding/demo-embedding/index.html | 16 + docs/patterns/coding/file-trees/index.html | 16 + docs/patterns/coding/index.html | 16 + docs/patterns/coding/tested/index.html | 23 +- .../coding/writing-inline-demos/index.html | 16 + docs/patterns/index.html | 16 + docs/patterns/installation/index.html | 16 + docs/patterns/library-setup/index.html | 16 + .../media/including-images/index.html | 16 + .../media/including-videos/index.html | 16 + docs/patterns/media/index.html | 16 + docs/patterns/printing/index.html | 16 + docs/patterns/serving/index.html | 16 + .../writing/expandable-sections/index.html | 16 + docs/patterns/writing/index.html | 28 ++ docs/patterns/writing/index.xml | 10 + .../writing/library-structure/index.html | 16 + .../writing/markdown-and-metadata/index.html | 16 + .../writing/notes-and-warnings/index.html | 16 + docs/patterns/writing/references/index.html | 16 + docs/patterns/writing/snippets/index.html | 415 ++++++++++++++++++ .../writing/tables-of-contents/index.html | 16 + docs/print-version/index.html | 52 ++- docs/service-worker.js | 2 +- docs/sitemap.xml | 4 + docs/tags/markdown/index.html | 16 + docs/tags/metadata/index.html | 16 + snippets/visually-hidden.md | 15 + themes/infusion/layouts/partials/svg.html | 7 + .../infusion/layouts/shortcodes/snippet.html | 4 + .../infusion/layouts/shortcodes/tested.html | 7 +- themes/infusion/static/css/styles.css | 30 +- themes/infusion/static/js/dom-scripts.js | 2 +- 41 files changed, 1008 insertions(+), 32 deletions(-) create mode 100644 content/patterns/writing/snippets.md create mode 100644 docs/patterns/writing/snippets/index.html create mode 100644 snippets/visually-hidden.md create mode 100644 themes/infusion/layouts/shortcodes/snippet.html diff --git a/content/patterns/writing/snippets.md b/content/patterns/writing/snippets.md new file mode 100644 index 0000000..81e7bf5 --- /dev/null +++ b/content/patterns/writing/snippets.md @@ -0,0 +1,15 @@ ++++ +title = "Snippets" ++++ + +A lot of the time, your larger patterns will share some common techniques and utilities. For this reason, **Infusion** lets you save snippets of markdown in a **snippets** folder, alongside the main content folder. + +The example `visually-hidden.md` snippet describes the CSS needed to create content that is visually hidden but still available to screen readers. Since this is a technique/utility you are likely to use often, it's nice to be able to just drop a snippet into your markdown content. The `snippet` shortcode lets you do exactly that: + +{{}} +{{% snippet file="visually-hidden.md" %}} +{{}} + +{{% note %}} +To make your snippets truly reusable, try to write them in such a way that they make sense independent of surrounding text, a little bit like this note does. +{{% /note %}} diff --git a/docs/css/styles.css b/docs/css/styles.css index 5f93684..9e16ab3 100644 --- a/docs/css/styles.css +++ b/docs/css/styles.css @@ -1,5 +1,4 @@ /* fonts */ - @font-face { font-family: 'Miriam Libre'; src: url('fonts/miriamlibre-bold.woff2') format('woff2'), url('fonts/miriamlibre-bold.woff') format('woff'); @@ -198,14 +197,23 @@ th:empty { .tested { text-align: center; } -.tested td { - vertical-align: top; +.tested tr { + display: flex; + flex-flow: row wrap; +} +.tested td, .tested th { + vertical-align: middle; overflow: hidden; + flex: 1 0 auto; + border: 0; + outline: 2px solid; + outline-offset: -1px; } .tested th { + width: 100%; background-color: #111; - border-color: #111; color: #fff; + outline-color: #111; } .tested img { max-width: 3rem; @@ -484,7 +492,8 @@ pre[class*=language-] code * { .token.string, .token.char, .token.builtin, -.token.inserted { +.token.inserted, +.token.important { color: #111; } .token.operator, @@ -636,7 +645,8 @@ p:empty { /* SVG icons */ a svg, button svg, -h1 svg { +h1 svg, +th svg { height: 0.75em; width: auto; margin-right: 0.25em; @@ -645,6 +655,7 @@ h1 svg, li > svg, h2 a svg { height: 1em; + width: auto; vertical-align: middle; } h1 svg { @@ -816,13 +827,6 @@ h1 svg { code { word-break: break-all; } - .tested th, - .tested td { - display: block; - } - .tested td + td { - border-top: 0; - } } @media print { .wrapper:not(.print-version) .intro-and-nav, diff --git a/docs/index.html b/docs/index.html index f48dd9c..7327ffe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -118,6 +118,13 @@ + + + + + + +
@@ -237,6 +244,15 @@ +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • - +
    Tested successfully using + + Tested using + diff --git a/docs/patterns/coding/writing-inline-demos/index.html b/docs/patterns/coding/writing-inline-demos/index.html index dae7dad..c8cf9de 100644 --- a/docs/patterns/coding/writing-inline-demos/index.html +++ b/docs/patterns/coding/writing-inline-demos/index.html @@ -115,6 +115,13 @@ + + + + + + +
    @@ -234,6 +241,15 @@ +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • +

    + + + Snippets + +

    +
  • + +
  • diff --git a/docs/patterns/writing/index.xml b/docs/patterns/writing/index.xml index 4a9ace3..0ad1c0f 100644 --- a/docs/patterns/writing/index.xml +++ b/docs/patterns/writing/index.xml @@ -61,6 +61,16 @@ Notes You may wish to pick out some content in your pattern’s document I can reference the {{% pattern "Notes & warnings" %}} pattern here. This saves you having to worry about pathing and decorates the generated link with a bookmark icon, identifying the link as a pattern reference visually. + + Snippets + https://thepaciellogroup.github.io/infusion/patterns/writing/snippets/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://thepaciellogroup.github.io/infusion/patterns/writing/snippets/ + A lot of the time, your larger patterns will share some common techniques and utilities. For this reason, Infusion lets you save snippets of markdown in a snippets folder, alongside the main content folder. +The example visually-hidden.md snippet describes the CSS needed to create content that is visually hidden but still available to screen readers. Since this is a technique/utility you are likely to use often, it’s nice to be able to just drop a snippet into your markdown content. + + Tables of contents https://thepaciellogroup.github.io/infusion/patterns/writing/tables-of-contents/ diff --git a/docs/patterns/writing/library-structure/index.html b/docs/patterns/writing/library-structure/index.html index c3fce52..e93e136 100644 --- a/docs/patterns/writing/library-structure/index.html +++ b/docs/patterns/writing/library-structure/index.html @@ -115,6 +115,13 @@ + + + + + + +

  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + Snippets | Infusion + + + + + + + skip to content + + + + + + + + + + W3C + SVG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + + + + diff --git a/docs/patterns/writing/tables-of-contents/index.html b/docs/patterns/writing/tables-of-contents/index.html index d3797f1..7c7f04b 100644 --- a/docs/patterns/writing/tables-of-contents/index.html +++ b/docs/patterns/writing/tables-of-contents/index.html @@ -115,6 +115,13 @@ + + + + + + +
    @@ -234,6 +241,15 @@
  • +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • + +
    +

    + + Snippets +

    +

    A lot of the time, your larger patterns will share some common techniques and utilities. For this reason, Infusion lets you save snippets of markdown in a snippets folder, alongside the main content folder.

    + +

    The example visually-hidden.md snippet describes the CSS needed to create content that is visually hidden but still available to screen readers. Since this is a technique/utility you are likely to use often, it’s nice to be able to just drop a snippet into your markdown content. The snippet shortcode lets you do exactly that:

    + +
    
    +{{% snippet file="visually-hidden.md" %}}
    +
    + + + + +
    @@ -1994,7 +2039,12 @@ npm run start - +
    Tested successfully using + + Tested using + diff --git a/docs/service-worker.js b/docs/service-worker.js index c958217..37bbfcc 100644 --- a/docs/service-worker.js +++ b/docs/service-worker.js @@ -37,7 +37,7 @@ /* eslint-disable indent, no-unused-vars, no-multiple-empty-lines, max-nested-callbacks, space-before-function-paren, quotes, comma-spacing */ 'use strict'; -var precacheConfig = [["browserconfig.xml","67c3113b1574fecc6015d56d774e1d38"],["categories/index.xml","1c183b48cab635f689386c900b9dc4aa"],["css/fonts/miriamlibre-bold.woff","96496f6f06535d25b3bcba876917ca35"],["css/fonts/miriamlibre-bold.woff2","668defa44d9a74dd709ce0c826a5eb11"],["css/images/arrow_effect.svg","1434d178461f70c16b77acb4bdbc51e3"],["css/images/icon-tick.svg","35d4d4728ea80d254508b2bca4109d70"],["css/images/stripe.svg","fa3f32a026b6a1bb04ee98d963432e15"],["css/prism.css","004029c8c70ed2bbaa5d9debcf14f8c7"],["css/styles.css","7dfc22ef50f5d488a66fdb9ae3637711"],["images/android-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/android-icon-192x192.png","4c07782e52e0ab714074e6d3d69dc3ec"],["images/android-icon-36x36.png","3b2cd8c925a66bf84c89b68bb30e5f62"],["images/android-icon-48x48.png","45dc386eea1d8a46216a8b6de9b156c6"],["images/android-icon-72x72.png","b04c64637efed2b04fa900ddfcbfe75d"],["images/android-icon-96x96.png","bd9c126a4d6baf7ce442122ce0e89e11"],["images/apple-icon-114x114.png","72e127d6f01dfcd2ba2340141babc536"],["images/apple-icon-120x120.png","bc7cd9e36869e66aaca78412207bf723"],["images/apple-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/apple-icon-152x152.png","567c64205576865b5e5d06c849613ca2"],["images/apple-icon-180x180.png","6b8734c446bf02ab50be598b4c01ec9c"],["images/apple-icon-57x57.png","f8c586086752c78870820b6190d6b42b"],["images/apple-icon-60x60.png","6e88df111e506bcd5501bed4ff10542e"],["images/apple-icon-72x72.png","b04c64637efed2b04fa900ddfcbfe75d"],["images/apple-icon-76x76.png","d8666e0ac256f39f8c5c628486bd71fb"],["images/apple-icon-precomposed.png","725f6cec25256abb1db10385e0724400"],["images/apple-icon.png","725f6cec25256abb1db10385e0724400"],["images/bad_design_system.png","9c0e87a34e7d842b0e2831dc947249aa"],["images/browser-chrome-android.svg","3100b2a9c5f0e34982c717fc2aa46d73"],["images/browser-chrome.svg","fa39b4be6727525330e928f582fbe80a"],["images/browser-edge.svg","9e8265ab8f6a701587a4271dd3aa6a73"],["images/browser-firefox-android.svg","452df7b9e83c70a07e8e03b4e8dab9c4"],["images/browser-firefox.svg","d3093eda664be3d0cc6d791e1386420f"],["images/browser-ie.svg","13e192cf2b3fe17e7049a49b7d085caa"],["images/browser-opera.svg","95d65630c9f7deef6a3098af8f5baf9f"],["images/browser-safari-ios.svg","f729e629ec998ec40d313495d7257741"],["images/browser-safari.svg","523ee9491f5a937b8975f4d23aa77f62"],["images/favicon-16x16.png","7a99c20d6c00babddd26d03607b8721d"],["images/favicon-32x32.png","129881474a1bf130027bff7a1e89febd"],["images/favicon-96x96.png","bd9c126a4d6baf7ce442122ce0e89e11"],["images/favicon.ico","81c46feedbfcc6c6dc9495e4fd5adfad"],["images/icon-info.svg","53a6c555ce41f818556c71ab0dfc533b"],["images/icon-tag.svg","f067bbbc072941b2a0335679300bfc6c"],["images/icon-warning.svg","2a4322abbee9aed694fadb50e98a1f61"],["images/logo.svg","50293a256b796b9a737f1969d511a98e"],["images/ms-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/ms-icon-150x150.png","e73370837ab9060772a18d62aaacd0f0"],["images/ms-icon-310x310.png","8a7143516b929702e3309bb537a99c5c"],["images/ms-icon-70x70.png","d7c6e7368733d53b5f979546d5aa4fe9"],["images/open_in_desktop.png","e899d6679b011aa7b0e783683d90d99b"],["images/samsung_homescreen.png","5ef40e64a18f966ce5c9084a024256db"],["images/serve_from_docs.png","15ae9eac3737a21593ebe00a9312bf9e"],["index.html","6e51fc4bb49bd923a2fbaac90b820b27"],["index.xml","2a603e3a11f08dae8a4582907dca5666"],["js/dom-scripts.js","be84f5565f3472e08e51b86a5ac85b72"],["js/prism.js","0c1fb8d3a69ee7c91dbf0f361ded7763"],["js/service-worker-registration.js","d60f01dc1393cbaaf4f7435339074d5e"],["manifest.json","a5b36b0278884dc524eac11896806bb2"],["patterns/coding/code-blocks/index.html","72c1e94cfa9b0ac5aca125932724a94d"],["patterns/coding/color-palettes/index.html","8d5c2dabcf72453e2a13b9f47a0c4a60"],["patterns/coding/command-line/index.html","33d1994639ebc6cbb354e3289c0564b7"],["patterns/coding/demo-embedding/index.html","c527c9bca874141044c2aa0761ce5299"],["patterns/coding/file-trees/index.html","9e43b75e6d5d3065024796540de90e79"],["patterns/coding/index.html","1b278f2c39700635e54b70dd782634b0"],["patterns/coding/index.xml","e11bf497278eb4a47803f3af0a5ed566"],["patterns/coding/tested/index.html","40b9ee5526b5fec7e05b02f3718da19a"],["patterns/coding/writing-inline-demos/index.html","f6b29ac3bd9a08778f250f2f04e51d62"],["patterns/index.html","0b73577457ebebf5956687769fe215d1"],["patterns/index.xml","001756a56c7778509768d8d71ca43a91"],["patterns/installation/index.html","f580499a972b1552e0715868ab1c9d70"],["patterns/library-setup/index.html","2d36af6ad84d5db242225f4f83fce7dd"],["patterns/media/including-images/index.html","e90d6866d3d385b2e8ba528108aadf80"],["patterns/media/including-videos/index.html","2be349deeb85f94e41878700f1d61c5a"],["patterns/media/index.html","31e3080e8ebcbcba45adda727bfc905f"],["patterns/media/index.xml","69e133cec08e19eeb33cb005e90590e3"],["patterns/printing/index.html","9121cd1a49b8a6e989f57581deddd3cd"],["patterns/serving/index.html","27bb353bd882483c69d710f838a3ff85"],["patterns/writing/expandable-sections/index.html","1d2c2d84873893ad19a7893d56769d5d"],["patterns/writing/index.html","eafd965c78fe4be7823541d931fad5cc"],["patterns/writing/index.xml","af7c991a32f7de340b6a8ceda3522f06"],["patterns/writing/library-structure/index.html","085222a74508d30e0395f4845d46f30f"],["patterns/writing/markdown-and-metadata/index.html","97255ddfe184413df489899026e2e30e"],["patterns/writing/notes-and-warnings/index.html","7d893fae0a799f63f34f4e3eab72e81b"],["patterns/writing/references/index.html","3948dc5a2493804e7a1d55d81c048e75"],["patterns/writing/tables-of-contents/index.html","dad2ea42ca5bdeec497c1c40a879ab57"],["print-version/index.html","a5cd0644e947cd26036097fc8645ac59"],["sitemap.xml","7bd6e05a0352d5a1c9fd6a0f65b3ecbf"],["tags/index.xml","7445f2e8ccc722d44e7533263233d2df"],["tags/markdown/index.html","6a9012ec9f833d3ac05551b510add1a5"],["tags/markdown/index.xml","7df48ac337fc803de40eec42599a31cd"],["tags/metadata/index.html","99f81decbff01acc594a40e304acf184"],["tags/metadata/index.xml","eca9cfe9cd6561660ff341d5ded73b06"]]; +var precacheConfig = [["browserconfig.xml","67c3113b1574fecc6015d56d774e1d38"],["categories/index.xml","1c183b48cab635f689386c900b9dc4aa"],["css/fonts/miriamlibre-bold.woff","96496f6f06535d25b3bcba876917ca35"],["css/fonts/miriamlibre-bold.woff2","668defa44d9a74dd709ce0c826a5eb11"],["css/images/arrow_effect.svg","1434d178461f70c16b77acb4bdbc51e3"],["css/images/icon-tick.svg","35d4d4728ea80d254508b2bca4109d70"],["css/images/stripe.svg","fa3f32a026b6a1bb04ee98d963432e15"],["css/prism.css","004029c8c70ed2bbaa5d9debcf14f8c7"],["css/styles.css","8c94b5f2d6ba87129ffbaab81a7593d6"],["images/android-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/android-icon-192x192.png","4c07782e52e0ab714074e6d3d69dc3ec"],["images/android-icon-36x36.png","3b2cd8c925a66bf84c89b68bb30e5f62"],["images/android-icon-48x48.png","45dc386eea1d8a46216a8b6de9b156c6"],["images/android-icon-72x72.png","b04c64637efed2b04fa900ddfcbfe75d"],["images/android-icon-96x96.png","bd9c126a4d6baf7ce442122ce0e89e11"],["images/apple-icon-114x114.png","72e127d6f01dfcd2ba2340141babc536"],["images/apple-icon-120x120.png","bc7cd9e36869e66aaca78412207bf723"],["images/apple-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/apple-icon-152x152.png","567c64205576865b5e5d06c849613ca2"],["images/apple-icon-180x180.png","6b8734c446bf02ab50be598b4c01ec9c"],["images/apple-icon-57x57.png","f8c586086752c78870820b6190d6b42b"],["images/apple-icon-60x60.png","6e88df111e506bcd5501bed4ff10542e"],["images/apple-icon-72x72.png","b04c64637efed2b04fa900ddfcbfe75d"],["images/apple-icon-76x76.png","d8666e0ac256f39f8c5c628486bd71fb"],["images/apple-icon-precomposed.png","725f6cec25256abb1db10385e0724400"],["images/apple-icon.png","725f6cec25256abb1db10385e0724400"],["images/bad_design_system.png","9c0e87a34e7d842b0e2831dc947249aa"],["images/browser-chrome-android.svg","3100b2a9c5f0e34982c717fc2aa46d73"],["images/browser-chrome.svg","fa39b4be6727525330e928f582fbe80a"],["images/browser-edge.svg","9e8265ab8f6a701587a4271dd3aa6a73"],["images/browser-firefox-android.svg","452df7b9e83c70a07e8e03b4e8dab9c4"],["images/browser-firefox.svg","d3093eda664be3d0cc6d791e1386420f"],["images/browser-ie.svg","13e192cf2b3fe17e7049a49b7d085caa"],["images/browser-opera.svg","95d65630c9f7deef6a3098af8f5baf9f"],["images/browser-safari-ios.svg","f729e629ec998ec40d313495d7257741"],["images/browser-safari.svg","523ee9491f5a937b8975f4d23aa77f62"],["images/favicon-16x16.png","7a99c20d6c00babddd26d03607b8721d"],["images/favicon-32x32.png","129881474a1bf130027bff7a1e89febd"],["images/favicon-96x96.png","bd9c126a4d6baf7ce442122ce0e89e11"],["images/favicon.ico","81c46feedbfcc6c6dc9495e4fd5adfad"],["images/icon-info.svg","53a6c555ce41f818556c71ab0dfc533b"],["images/icon-tag.svg","f067bbbc072941b2a0335679300bfc6c"],["images/icon-warning.svg","2a4322abbee9aed694fadb50e98a1f61"],["images/logo.svg","50293a256b796b9a737f1969d511a98e"],["images/ms-icon-144x144.png","43e1f47f182b13d0dee15f510213e928"],["images/ms-icon-150x150.png","e73370837ab9060772a18d62aaacd0f0"],["images/ms-icon-310x310.png","8a7143516b929702e3309bb537a99c5c"],["images/ms-icon-70x70.png","d7c6e7368733d53b5f979546d5aa4fe9"],["images/open_in_desktop.png","e899d6679b011aa7b0e783683d90d99b"],["images/samsung_homescreen.png","5ef40e64a18f966ce5c9084a024256db"],["images/serve_from_docs.png","15ae9eac3737a21593ebe00a9312bf9e"],["index.html","124e8f24e34b3a1d95ab22efadd4cbfb"],["index.xml","a0cd42d9297d2c39ebf3fd6ca6f01365"],["js/dom-scripts.js","664894bfd23d4962ad84b6d0c74c9f47"],["js/prism.js","0c1fb8d3a69ee7c91dbf0f361ded7763"],["js/service-worker-registration.js","d60f01dc1393cbaaf4f7435339074d5e"],["manifest.json","a5b36b0278884dc524eac11896806bb2"],["patterns/coding/code-blocks/index.html","68c08a7b966c4cb729540b722db4270b"],["patterns/coding/color-palettes/index.html","aeee2f5b94e2fc6de21db391f5dceb22"],["patterns/coding/command-line/index.html","63296d35816d2d88d33c8ac9597cdb4e"],["patterns/coding/demo-embedding/index.html","54ff4658d32863b9889a9e7f49796ab6"],["patterns/coding/file-trees/index.html","b17896a6c0fa82ad7d682964379736a8"],["patterns/coding/index.html","e3db23fa9d9912a0c013a65b7d84346f"],["patterns/coding/index.xml","e11bf497278eb4a47803f3af0a5ed566"],["patterns/coding/tested/index.html","d24ee6036386eba298c8760f949e3922"],["patterns/coding/writing-inline-demos/index.html","60b729739c723144be17ff8ea1bf877b"],["patterns/index.html","6c60fbecaaf6ef38025940285f27f2bc"],["patterns/index.xml","001756a56c7778509768d8d71ca43a91"],["patterns/installation/index.html","82f1de678c6802aad3b264540346740c"],["patterns/library-setup/index.html","0c1e76b6c48d7a3516ff2054263bb471"],["patterns/media/including-images/index.html","05652693e7388f2b8cf0852ac152f08a"],["patterns/media/including-videos/index.html","a6769adc9adde7d76ddc455c606b0319"],["patterns/media/index.html","50d75869f7b8364d76d0a399e6bc1f6d"],["patterns/media/index.xml","69e133cec08e19eeb33cb005e90590e3"],["patterns/printing/index.html","cf8d46a3f58869ed329b5ba84a44ebb1"],["patterns/serving/index.html","35113dd460f055aaa8d8ee0a0c45e1da"],["patterns/writing/expandable-sections/index.html","62e714305b27a13625d6213d97b2e74e"],["patterns/writing/index.html","fc6faeed8c0d5488779b51b07d57112b"],["patterns/writing/index.xml","691ef930c108f300ab46d63e88be2b55"],["patterns/writing/library-structure/index.html","e8b436e8798188498c56d5d5e526675f"],["patterns/writing/markdown-and-metadata/index.html","bd01f8fd4239c35d62fd3753a4b2e085"],["patterns/writing/notes-and-warnings/index.html","acd8c7e9ed1af6e2fdff487d2edaf6a8"],["patterns/writing/references/index.html","996c1dbc169c5adb88d75e517d906dc7"],["patterns/writing/snippets/index.html","718ad3055cd5d7d36b575d6e8e005595"],["patterns/writing/tables-of-contents/index.html","e14e97e0ba72aecb592c9a1bbb3a8df3"],["print-version/index.html","10bf0f1657496dee70d289244178233a"],["sitemap.xml","5e45bc70692bcb388496bd4831d6431b"],["tags/index.xml","7445f2e8ccc722d44e7533263233d2df"],["tags/markdown/index.html","cf5dc153f8501850c872eef9ddabad62"],["tags/markdown/index.xml","7df48ac337fc803de40eec42599a31cd"],["tags/metadata/index.html","36add4244f679859b493910ca961a43b"],["tags/metadata/index.xml","eca9cfe9cd6561660ff341d5ded73b06"]]; var cacheName = 'sw-precache-v3-sw-precache-' + (self.registration ? self.registration.scope : ''); diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 9890648..7a9c347 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -112,6 +112,10 @@ https://thepaciellogroup.github.io/infusion/patterns/writing/references/ + + https://thepaciellogroup.github.io/infusion/patterns/writing/snippets/ + + https://thepaciellogroup.github.io/infusion/patterns/writing/tables-of-contents/ diff --git a/docs/tags/markdown/index.html b/docs/tags/markdown/index.html index ff32ec4..9a63cc3 100644 --- a/docs/tags/markdown/index.html +++ b/docs/tags/markdown/index.html @@ -115,6 +115,13 @@ + + + + + + +
    @@ -234,6 +241,15 @@ +
  • + + + Snippets + +
  • +
  • +
  • + + + Snippets + +
  • +
  • diff --git a/themes/infusion/layouts/shortcodes/snippet.html b/themes/infusion/layouts/shortcodes/snippet.html new file mode 100644 index 0000000..6cf97e1 --- /dev/null +++ b/themes/infusion/layouts/shortcodes/snippet.html @@ -0,0 +1,4 @@ +{{$file := .Get "file"}} +{{ $contents := (printf "/snippets/%s" $file) | readFile }} +{{ $commented := add "\r\n" $contents }} +{{ $commented | markdownify }} diff --git a/themes/infusion/layouts/shortcodes/tested.html b/themes/infusion/layouts/shortcodes/tested.html index c67ea3d..2dc9c70 100644 --- a/themes/infusion/layouts/shortcodes/tested.html +++ b/themes/infusion/layouts/shortcodes/tested.html @@ -3,7 +3,12 @@ {{ $tested := split $tested "," }} - + {{ range $tested }}
    Tested successfully using + + Tested using + {{ if in . "+" }} diff --git a/themes/infusion/static/css/styles.css b/themes/infusion/static/css/styles.css index 5f93684..9e16ab3 100644 --- a/themes/infusion/static/css/styles.css +++ b/themes/infusion/static/css/styles.css @@ -1,5 +1,4 @@ /* fonts */ - @font-face { font-family: 'Miriam Libre'; src: url('fonts/miriamlibre-bold.woff2') format('woff2'), url('fonts/miriamlibre-bold.woff') format('woff'); @@ -198,14 +197,23 @@ th:empty { .tested { text-align: center; } -.tested td { - vertical-align: top; +.tested tr { + display: flex; + flex-flow: row wrap; +} +.tested td, .tested th { + vertical-align: middle; overflow: hidden; + flex: 1 0 auto; + border: 0; + outline: 2px solid; + outline-offset: -1px; } .tested th { + width: 100%; background-color: #111; - border-color: #111; color: #fff; + outline-color: #111; } .tested img { max-width: 3rem; @@ -484,7 +492,8 @@ pre[class*=language-] code * { .token.string, .token.char, .token.builtin, -.token.inserted { +.token.inserted, +.token.important { color: #111; } .token.operator, @@ -636,7 +645,8 @@ p:empty { /* SVG icons */ a svg, button svg, -h1 svg { +h1 svg, +th svg { height: 0.75em; width: auto; margin-right: 0.25em; @@ -645,6 +655,7 @@ h1 svg, li > svg, h2 a svg { height: 1em; + width: auto; vertical-align: middle; } h1 svg { @@ -816,13 +827,6 @@ h1 svg { code { word-break: break-all; } - .tested th, - .tested td { - display: block; - } - .tested td + td { - border-top: 0; - } } @media print { .wrapper:not(.print-version) .intro-and-nav, diff --git a/themes/infusion/static/js/dom-scripts.js b/themes/infusion/static/js/dom-scripts.js index cd35df4..ee21490 100644 --- a/themes/infusion/static/js/dom-scripts.js +++ b/themes/infusion/static/js/dom-scripts.js @@ -84,7 +84,7 @@ (function () { if (window.matchMedia('(-ms-high-contrast: none), (-ms-high-contrast: active)').matches) { // Get all the SVGs on the page except the symbol defs - var svgs = document.querySelectorAll('a svg, button svg, h1 svg, .tags svg'); + var svgs = document.querySelectorAll('a svg, button svg, h1 svg, .tags svg, th svg'); // ... iterate over SVGs Array.prototype.forEach.call(svgs, function(svg) { // Set preserveAspectRatio to 'XMidYMin slice'