diff --git a/README.md b/README.md index 29948fbb..7e506333 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Pinecone is a pattern library for the Platform Cooperative Development Kit. -[Read the docs!](https://pinecone.platform.coop/) +[Read the docs →](https://pinecone.platform.coop/) diff --git a/src/assets/styles/layouts/_header.scss b/src/assets/styles/layouts/_header.scss index 59e5dced..3353dd4c 100644 --- a/src/assets/styles/layouts/_header.scss +++ b/src/assets/styles/layouts/_header.scss @@ -218,6 +218,7 @@ [role="banner"] { .inner { margin-left: 0; + width: 100%; } } diff --git a/src/components/02-molecules/00-menu/menu.njk b/src/components/02-molecules/00-menu/menu.njk deleted file mode 100644 index 56d0d753..00000000 --- a/src/components/02-molecules/00-menu/menu.njk +++ /dev/null @@ -1,43 +0,0 @@ -{% render '@brand' %} -
- {% if modifier !== 'home' %} - - {% render '@search', {standAlone: true}, true %} - {% endif %} - -
diff --git a/src/components/_preview.njk b/src/components/_preview.njk index f90b8a38..eaf72e34 100644 --- a/src/components/_preview.njk +++ b/src/components/_preview.njk @@ -5,7 +5,8 @@ - + + @@ -41,6 +42,5 @@
{% if _target.context.inFooter %}{{ yield | safe }}{% else %}{% render '@footer' %}{% endif %}
{% endif %} - diff --git a/src/components/01-atoms/_separator/separator.njk b/src/components/atoms/_separator/separator.njk similarity index 100% rename from src/components/01-atoms/_separator/separator.njk rename to src/components/atoms/_separator/separator.njk diff --git a/src/components/01-atoms/_svg/_svg.config.js b/src/components/atoms/_svg/_svg.config.js similarity index 100% rename from src/components/01-atoms/_svg/_svg.config.js rename to src/components/atoms/_svg/_svg.config.js diff --git a/src/components/01-atoms/_svg/_svg.njk b/src/components/atoms/_svg/_svg.njk similarity index 100% rename from src/components/01-atoms/_svg/_svg.njk rename to src/components/atoms/_svg/_svg.njk diff --git a/src/components/atoms/atoms.config.js b/src/components/atoms/atoms.config.js new file mode 100644 index 00000000..a5dce4c9 --- /dev/null +++ b/src/components/atoms/atoms.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Atoms', + order: 1, +}; diff --git a/src/components/01-atoms/08-badge/badge.config.js b/src/components/atoms/badge/badge.config.js similarity index 91% rename from src/components/01-atoms/08-badge/badge.config.js rename to src/components/atoms/badge/badge.config.js index c587d2d9..04423641 100644 --- a/src/components/01-atoms/08-badge/badge.config.js +++ b/src/components/atoms/badge/badge.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Badge', status: 'wip', + order: 8, context: { label: 'Platform Cooperativism', standAlone: false diff --git a/src/components/01-atoms/08-badge/badge.njk b/src/components/atoms/badge/badge.njk similarity index 100% rename from src/components/01-atoms/08-badge/badge.njk rename to src/components/atoms/badge/badge.njk diff --git a/src/components/01-atoms/09-button/button--tag-button.njk b/src/components/atoms/button/button--tag-button.njk similarity index 100% rename from src/components/01-atoms/09-button/button--tag-button.njk rename to src/components/atoms/button/button--tag-button.njk diff --git a/src/components/01-atoms/09-button/button.config.js b/src/components/atoms/button/button.config.js similarity index 99% rename from src/components/01-atoms/09-button/button.config.js rename to src/components/atoms/button/button.config.js index 14b2c150..f1eb82fc 100644 --- a/src/components/01-atoms/09-button/button.config.js +++ b/src/components/atoms/button/button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Button', status: 'wip', + order: 9, context: { label: 'Filter', labelVisuallyHidden: false, diff --git a/src/components/01-atoms/09-button/button.njk b/src/components/atoms/button/button.njk similarity index 100% rename from src/components/01-atoms/09-button/button.njk rename to src/components/atoms/button/button.njk diff --git a/src/components/01-atoms/06-call-to-action/call-to-action.config.js b/src/components/atoms/call-to-action/call-to-action.config.js similarity index 97% rename from src/components/01-atoms/06-call-to-action/call-to-action.config.js rename to src/components/atoms/call-to-action/call-to-action.config.js index 9a05bdae..a9dcff62 100644 --- a/src/components/01-atoms/06-call-to-action/call-to-action.config.js +++ b/src/components/atoms/call-to-action/call-to-action.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Call to Action', status: 'wip', + order: 6, context: { href: 'https://example.com/call-to-action', label: 'Call to Action', diff --git a/src/components/01-atoms/06-call-to-action/call-to-action.njk b/src/components/atoms/call-to-action/call-to-action.njk similarity index 100% rename from src/components/01-atoms/06-call-to-action/call-to-action.njk rename to src/components/atoms/call-to-action/call-to-action.njk diff --git a/src/components/01-atoms/00-colors/colors.config.js b/src/components/atoms/colors/colors.config.js similarity index 99% rename from src/components/01-atoms/00-colors/colors.config.js rename to src/components/atoms/colors/colors.config.js index 2eb32706..b8d7eae1 100644 --- a/src/components/01-atoms/00-colors/colors.config.js +++ b/src/components/atoms/colors/colors.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Colors', status: 'wip', + order: 1, context: { colors: { brand: [ diff --git a/src/components/01-atoms/00-colors/colors.njk b/src/components/atoms/colors/colors.njk similarity index 100% rename from src/components/01-atoms/00-colors/colors.njk rename to src/components/atoms/colors/colors.njk diff --git a/src/components/01-atoms/03-divider/divider.config.js b/src/components/atoms/divider/divider.config.js similarity index 98% rename from src/components/01-atoms/03-divider/divider.config.js rename to src/components/atoms/divider/divider.config.js index 06f11427..fc5d3a0a 100644 --- a/src/components/01-atoms/03-divider/divider.config.js +++ b/src/components/atoms/divider/divider.config.js @@ -1,6 +1,7 @@ module.exports = { status: 'wip', title: 'Dividers', + order: 4, context: { dividers: [ { diff --git a/src/components/01-atoms/03-divider/divider.njk b/src/components/atoms/divider/divider.njk similarity index 100% rename from src/components/01-atoms/03-divider/divider.njk rename to src/components/atoms/divider/divider.njk diff --git a/src/components/01-atoms/11-form-elements/_checkbox/_checkbox.config.js b/src/components/atoms/form-elements/_checkbox/_checkbox.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_checkbox/_checkbox.config.js rename to src/components/atoms/form-elements/_checkbox/_checkbox.config.js diff --git a/src/components/01-atoms/11-form-elements/_checkbox/_checkbox.njk b/src/components/atoms/form-elements/_checkbox/_checkbox.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_checkbox/_checkbox.njk rename to src/components/atoms/form-elements/_checkbox/_checkbox.njk diff --git a/src/components/01-atoms/11-form-elements/_input/_input.config.js b/src/components/atoms/form-elements/_input/_input.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_input/_input.config.js rename to src/components/atoms/form-elements/_input/_input.config.js diff --git a/src/components/01-atoms/11-form-elements/_input/_input.njk b/src/components/atoms/form-elements/_input/_input.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_input/_input.njk rename to src/components/atoms/form-elements/_input/_input.njk diff --git a/src/components/01-atoms/11-form-elements/_radio-button/_radio-button.config.js b/src/components/atoms/form-elements/_radio-button/_radio-button.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_radio-button/_radio-button.config.js rename to src/components/atoms/form-elements/_radio-button/_radio-button.config.js diff --git a/src/components/01-atoms/11-form-elements/_radio-button/_radio-button.njk b/src/components/atoms/form-elements/_radio-button/_radio-button.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_radio-button/_radio-button.njk rename to src/components/atoms/form-elements/_radio-button/_radio-button.njk diff --git a/src/components/01-atoms/11-form-elements/_select/_select.config.js b/src/components/atoms/form-elements/_select/_select.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_select/_select.config.js rename to src/components/atoms/form-elements/_select/_select.config.js diff --git a/src/components/01-atoms/11-form-elements/_select/_select.njk b/src/components/atoms/form-elements/_select/_select.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_select/_select.njk rename to src/components/atoms/form-elements/_select/_select.njk diff --git a/src/components/01-atoms/11-form-elements/_textarea/_textarea.config.js b/src/components/atoms/form-elements/_textarea/_textarea.config.js similarity index 100% rename from src/components/01-atoms/11-form-elements/_textarea/_textarea.config.js rename to src/components/atoms/form-elements/_textarea/_textarea.config.js diff --git a/src/components/01-atoms/11-form-elements/_textarea/_textarea.njk b/src/components/atoms/form-elements/_textarea/_textarea.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/_textarea/_textarea.njk rename to src/components/atoms/form-elements/_textarea/_textarea.njk diff --git a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js b/src/components/atoms/form-elements/checkboxes/checkboxes.config.js similarity index 78% rename from src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js rename to src/components/atoms/form-elements/checkboxes/checkboxes.config.js index 5e629e5d..f1251561 100644 --- a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.config.js +++ b/src/components/atoms/form-elements/checkboxes/checkboxes.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Checkboxes', status: 'wip', + order: 4, context: { standAlone: false, checkboxes: [ @@ -27,10 +28,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.njk b/src/components/atoms/form-elements/checkboxes/checkboxes.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/13-checkboxes/checkboxes.njk rename to src/components/atoms/form-elements/checkboxes/checkboxes.njk diff --git a/src/components/atoms/form-elements/form-elements.config.js b/src/components/atoms/form-elements/form-elements.config.js new file mode 100644 index 00000000..c27ce591 --- /dev/null +++ b/src/components/atoms/form-elements/form-elements.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Form Elements', + order: 10, +}; diff --git a/src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js b/src/components/atoms/form-elements/inputs/inputs.config.js similarity index 73% rename from src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js rename to src/components/atoms/form-elements/inputs/inputs.config.js index 3592db54..1acfee46 100644 --- a/src/components/01-atoms/11-form-elements/10-inputs/inputs.config.js +++ b/src/components/atoms/form-elements/inputs/inputs.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Text Input', status: 'wip', + order: 1, context: { standAlone: false, inputs: [ @@ -20,10 +21,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Invers', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/10-inputs/inputs.njk b/src/components/atoms/form-elements/inputs/inputs.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/10-inputs/inputs.njk rename to src/components/atoms/form-elements/inputs/inputs.njk diff --git a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js b/src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js similarity index 71% rename from src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js rename to src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js index f62a80a1..91e3bc02 100644 --- a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.config.js +++ b/src/components/atoms/form-elements/radio-buttons/radio-buttons.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Radio Buttons', label: 'Radio Buttons', + order: 5, status: 'wip', context: { standAlone: false, @@ -20,10 +21,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.njk b/src/components/atoms/form-elements/radio-buttons/radio-buttons.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/14-radio-buttons/radio-buttons.njk rename to src/components/atoms/form-elements/radio-buttons/radio-buttons.njk diff --git a/src/components/01-atoms/11-form-elements/12-selects/selects.config.js b/src/components/atoms/form-elements/selects/selects.config.js similarity index 65% rename from src/components/01-atoms/11-form-elements/12-selects/selects.config.js rename to src/components/atoms/form-elements/selects/selects.config.js index 89f33838..e1c79fe2 100644 --- a/src/components/01-atoms/11-form-elements/12-selects/selects.config.js +++ b/src/components/atoms/form-elements/selects/selects.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Selects', status: 'wip', + order: 3, context: { standAlone: false, selects: [ @@ -15,10 +16,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/12-selects/selects.njk b/src/components/atoms/form-elements/selects/selects.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/12-selects/selects.njk rename to src/components/atoms/form-elements/selects/selects.njk diff --git a/src/components/01-atoms/11-form-elements/15-submit/submit.config.js b/src/components/atoms/form-elements/submit/submit.config.js similarity index 97% rename from src/components/01-atoms/11-form-elements/15-submit/submit.config.js rename to src/components/atoms/form-elements/submit/submit.config.js index 33d64ca6..c5d905f6 100644 --- a/src/components/01-atoms/11-form-elements/15-submit/submit.config.js +++ b/src/components/atoms/form-elements/submit/submit.config.js @@ -2,6 +2,7 @@ module.exports = { title: 'Submit Button', label: 'Submit Button', status: 'wip', + order: 6, context: { label: 'Submit', id: 'submit', diff --git a/src/components/01-atoms/11-form-elements/15-submit/submit.njk b/src/components/atoms/form-elements/submit/submit.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/15-submit/submit.njk rename to src/components/atoms/form-elements/submit/submit.njk diff --git a/src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js b/src/components/atoms/form-elements/textareas/textareas.config.js similarity index 79% rename from src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js rename to src/components/atoms/form-elements/textareas/textareas.config.js index 7a1c1cce..a5d5cf3b 100644 --- a/src/components/01-atoms/11-form-elements/11-textareas/textareas.config.js +++ b/src/components/atoms/form-elements/textareas/textareas.config.js @@ -2,6 +2,7 @@ module.exports = { title: 'Text Areas', label: 'Text Areas', status: 'wip', + order: 2, context: { label: 'Text Area', name: 'text', @@ -25,10 +26,10 @@ module.exports = { }, variants: [ { - name: 'Default (Light on Dark)', - label: 'Default (Light on Dark)', + name: 'Default Inverse', + label: 'Default (Inverse)', context: { - bodyClass: 'has-dark-mint-500-background-color' + bodyClass: 'has-blue-500-background-color' } } ] diff --git a/src/components/01-atoms/11-form-elements/11-textareas/textareas.njk b/src/components/atoms/form-elements/textareas/textareas.njk similarity index 100% rename from src/components/01-atoms/11-form-elements/11-textareas/textareas.njk rename to src/components/atoms/form-elements/textareas/textareas.njk diff --git a/src/components/01-atoms/01-icons/icons.config.js b/src/components/atoms/icons/icons.config.js similarity index 99% rename from src/components/01-atoms/01-icons/icons.config.js rename to src/components/atoms/icons/icons.config.js index 27455253..894a597e 100644 --- a/src/components/01-atoms/01-icons/icons.config.js +++ b/src/components/atoms/icons/icons.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Icons', status: 'wip', + order: 2, context: { iconsTitle: 'Icons', icons: [ diff --git a/src/components/01-atoms/01-icons/icons.njk b/src/components/atoms/icons/icons.njk similarity index 100% rename from src/components/01-atoms/01-icons/icons.njk rename to src/components/atoms/icons/icons.njk diff --git a/src/components/01-atoms/04-link/link.config.js b/src/components/atoms/link/link.config.js similarity index 98% rename from src/components/01-atoms/04-link/link.config.js rename to src/components/atoms/link/link.config.js index 528ec291..4972450a 100644 --- a/src/components/01-atoms/04-link/link.config.js +++ b/src/components/atoms/link/link.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Link', status: 'wip', + order: 5, context: { href: '/internal-link', label: 'Link' diff --git a/src/components/01-atoms/04-link/link.njk b/src/components/atoms/link/link.njk similarity index 100% rename from src/components/01-atoms/04-link/link.njk rename to src/components/atoms/link/link.njk diff --git a/src/components/01-atoms/07-tag/tag.config.js b/src/components/atoms/tag/tag.config.js similarity index 91% rename from src/components/01-atoms/07-tag/tag.config.js rename to src/components/atoms/tag/tag.config.js index 447d1a4d..49b42bac 100644 --- a/src/components/01-atoms/07-tag/tag.config.js +++ b/src/components/atoms/tag/tag.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Tag', status: 'wip', + order: 7, context: { label: 'Platform Cooperativism', standAlone: false diff --git a/src/components/01-atoms/07-tag/tag.njk b/src/components/atoms/tag/tag.njk similarity index 100% rename from src/components/01-atoms/07-tag/tag.njk rename to src/components/atoms/tag/tag.njk diff --git a/src/components/01-atoms/02-typography/01-headings/headings.config.js b/src/components/atoms/typography/01-headings/headings.config.js similarity index 100% rename from src/components/01-atoms/02-typography/01-headings/headings.config.js rename to src/components/atoms/typography/01-headings/headings.config.js diff --git a/src/components/01-atoms/02-typography/01-headings/headings.njk b/src/components/atoms/typography/01-headings/headings.njk similarity index 100% rename from src/components/01-atoms/02-typography/01-headings/headings.njk rename to src/components/atoms/typography/01-headings/headings.njk diff --git a/src/components/01-atoms/02-typography/02-paragraphs/paragraphs.config.js b/src/components/atoms/typography/02-paragraphs/paragraphs.config.js similarity index 100% rename from src/components/01-atoms/02-typography/02-paragraphs/paragraphs.config.js rename to src/components/atoms/typography/02-paragraphs/paragraphs.config.js diff --git a/src/components/01-atoms/02-typography/02-paragraphs/paragraphs.njk b/src/components/atoms/typography/02-paragraphs/paragraphs.njk similarity index 100% rename from src/components/01-atoms/02-typography/02-paragraphs/paragraphs.njk rename to src/components/atoms/typography/02-paragraphs/paragraphs.njk diff --git a/src/components/01-atoms/02-typography/03-quotes/quotes.config.js b/src/components/atoms/typography/03-quotes/quotes.config.js similarity index 100% rename from src/components/01-atoms/02-typography/03-quotes/quotes.config.js rename to src/components/atoms/typography/03-quotes/quotes.config.js diff --git a/src/components/01-atoms/02-typography/03-quotes/quotes.njk b/src/components/atoms/typography/03-quotes/quotes.njk similarity index 100% rename from src/components/01-atoms/02-typography/03-quotes/quotes.njk rename to src/components/atoms/typography/03-quotes/quotes.njk diff --git a/src/components/01-atoms/02-typography/04-lists/lists.config.js b/src/components/atoms/typography/04-lists/lists.config.js similarity index 100% rename from src/components/01-atoms/02-typography/04-lists/lists.config.js rename to src/components/atoms/typography/04-lists/lists.config.js diff --git a/src/components/01-atoms/02-typography/04-lists/lists.njk b/src/components/atoms/typography/04-lists/lists.njk similarity index 100% rename from src/components/01-atoms/02-typography/04-lists/lists.njk rename to src/components/atoms/typography/04-lists/lists.njk diff --git a/src/components/01-atoms/02-typography/05-stack/stack.config.js b/src/components/atoms/typography/05-stack/stack.config.js similarity index 100% rename from src/components/01-atoms/02-typography/05-stack/stack.config.js rename to src/components/atoms/typography/05-stack/stack.config.js diff --git a/src/components/01-atoms/02-typography/05-stack/stack.njk b/src/components/atoms/typography/05-stack/stack.njk similarity index 100% rename from src/components/01-atoms/02-typography/05-stack/stack.njk rename to src/components/atoms/typography/05-stack/stack.njk diff --git a/src/components/01-atoms/02-typography/06-repertoire/repertoire.config.js b/src/components/atoms/typography/06-repertoire/repertoire.config.js similarity index 100% rename from src/components/01-atoms/02-typography/06-repertoire/repertoire.config.js rename to src/components/atoms/typography/06-repertoire/repertoire.config.js diff --git a/src/components/01-atoms/02-typography/06-repertoire/repertoire.njk b/src/components/atoms/typography/06-repertoire/repertoire.njk similarity index 100% rename from src/components/01-atoms/02-typography/06-repertoire/repertoire.njk rename to src/components/atoms/typography/06-repertoire/repertoire.njk diff --git a/src/components/atoms/typography/typography.config.js b/src/components/atoms/typography/typography.config.js new file mode 100644 index 00000000..5bf5d48b --- /dev/null +++ b/src/components/atoms/typography/typography.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Typography', + status: 'wip', + order: 3 +}; diff --git a/src/components/03-layouts/02-archive/archive.config.js b/src/components/layouts/archive/archive.config.js similarity index 99% rename from src/components/03-layouts/02-archive/archive.config.js rename to src/components/layouts/archive/archive.config.js index a4c9d016..530a19f3 100644 --- a/src/components/03-layouts/02-archive/archive.config.js +++ b/src/components/layouts/archive/archive.config.js @@ -85,6 +85,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Archive', status: 'wip', + order: 4, context: { bodyClass: 'archive post-type-archive taxonomy', hasMenu: true, diff --git a/src/components/03-layouts/02-archive/archive.njk b/src/components/layouts/archive/archive.njk similarity index 100% rename from src/components/03-layouts/02-archive/archive.njk rename to src/components/layouts/archive/archive.njk diff --git a/src/components/03-layouts/05-favorites/favorites.config.js b/src/components/layouts/favorites/favorites.config.js similarity index 99% rename from src/components/03-layouts/05-favorites/favorites.config.js rename to src/components/layouts/favorites/favorites.config.js index 9cab981b..cab6dca6 100644 --- a/src/components/03-layouts/05-favorites/favorites.config.js +++ b/src/components/layouts/favorites/favorites.config.js @@ -74,6 +74,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Favorites', status: 'wip', + order: 7, context: { bodyClass: 'page page-template-page-favorites', hasMenu: true, diff --git a/src/components/03-layouts/05-favorites/favorites.njk b/src/components/layouts/favorites/favorites.njk similarity index 100% rename from src/components/03-layouts/05-favorites/favorites.njk rename to src/components/layouts/favorites/favorites.njk diff --git a/src/components/03-layouts/04-home/home.config.js b/src/components/layouts/home/home.config.js similarity index 99% rename from src/components/03-layouts/04-home/home.config.js rename to src/components/layouts/home/home.config.js index 6c3a8cb3..833c0c64 100644 --- a/src/components/03-layouts/04-home/home.config.js +++ b/src/components/layouts/home/home.config.js @@ -73,6 +73,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Home', status: 'wip', + order: 2, context: { bodyClass: 'page home', hasMenu: true, diff --git a/src/components/03-layouts/04-home/home.njk b/src/components/layouts/home/home.njk similarity index 100% rename from src/components/03-layouts/04-home/home.njk rename to src/components/layouts/home/home.njk diff --git a/src/components/layouts/layouts.config.js b/src/components/layouts/layouts.config.js new file mode 100644 index 00000000..0eb0ae42 --- /dev/null +++ b/src/components/layouts/layouts.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Layouts', + order: 3, +}; diff --git a/src/components/03-layouts/01-page/page.config.js b/src/components/layouts/page/page.config.js similarity index 91% rename from src/components/03-layouts/01-page/page.config.js rename to src/components/layouts/page/page.config.js index f9ccbc84..78207ba2 100644 --- a/src/components/03-layouts/01-page/page.config.js +++ b/src/components/layouts/page/page.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Page', status: 'wip', + order: 3, context: { bodyClass: 'page', hasMenu: true, diff --git a/src/components/03-layouts/01-page/page.njk b/src/components/layouts/page/page.njk similarity index 100% rename from src/components/03-layouts/01-page/page.njk rename to src/components/layouts/page/page.njk diff --git a/src/components/03-layouts/03-resource/resource.config.js b/src/components/layouts/resource/resource.config.js similarity index 97% rename from src/components/03-layouts/03-resource/resource.config.js rename to src/components/layouts/resource/resource.config.js index a4f2abc6..5568c10c 100644 --- a/src/components/03-layouts/03-resource/resource.config.js +++ b/src/components/layouts/resource/resource.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Resource', status: 'wip', + order: 5, context: { bodyClass: 'single-lc_resource', hasMenu: true, diff --git a/src/components/03-layouts/03-resource/resource.njk b/src/components/layouts/resource/resource.njk similarity index 100% rename from src/components/03-layouts/03-resource/resource.njk rename to src/components/layouts/resource/resource.njk diff --git a/src/components/03-layouts/06-search-results/search-results.config.js b/src/components/layouts/search-results/search-results.config.js similarity index 99% rename from src/components/03-layouts/06-search-results/search-results.config.js rename to src/components/layouts/search-results/search-results.config.js index 542c3636..0efc9773 100644 --- a/src/components/03-layouts/06-search-results/search-results.config.js +++ b/src/components/layouts/search-results/search-results.config.js @@ -85,6 +85,7 @@ for ( let i = 0; i < resourceCount; i++ ) { module.exports = { title: 'Search Results', status: 'wip', + order: 6, context: { bodyClass: 'search search-results', hasMenu: true, diff --git a/src/components/03-layouts/06-search-results/search-results.njk b/src/components/layouts/search-results/search-results.njk similarity index 100% rename from src/components/03-layouts/06-search-results/search-results.njk rename to src/components/layouts/search-results/search-results.njk diff --git a/src/components/layouts/skeleton/README.md b/src/components/layouts/skeleton/README.md new file mode 100644 index 00000000..dcd922af --- /dev/null +++ b/src/components/layouts/skeleton/README.md @@ -0,0 +1,3 @@ +# Skeleton + +This component demonstrates the basic skeleton of a page. Other components should be included as per the HTML comments. diff --git a/src/components/layouts/skeleton/_preview.njk b/src/components/layouts/skeleton/_preview.njk new file mode 100644 index 00000000..6b7aca03 --- /dev/null +++ b/src/components/layouts/skeleton/_preview.njk @@ -0,0 +1 @@ +{{ yield | safe }} diff --git a/src/components/layouts/skeleton/skeleton.config.js b/src/components/layouts/skeleton/skeleton.config.js new file mode 100644 index 00000000..678b22a9 --- /dev/null +++ b/src/components/layouts/skeleton/skeleton.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Skeleton', + status: 'wip', + order: 1, +}; diff --git a/src/components/layouts/skeleton/skeleton.njk b/src/components/layouts/skeleton/skeleton.njk new file mode 100644 index 00000000..775fee71 --- /dev/null +++ b/src/components/layouts/skeleton/skeleton.njk @@ -0,0 +1,35 @@ + + + + + + + + + + + + + Pinecone + + + +
+
+ +
+
+
+
+
+ +
+
+
+ + + diff --git a/src/components/02-molecules/02-accordion/accordion.config.js b/src/components/molecules/accordion/accordion.config.js similarity index 97% rename from src/components/02-molecules/02-accordion/accordion.config.js rename to src/components/molecules/accordion/accordion.config.js index c63af406..e63b159a 100644 --- a/src/components/02-molecules/02-accordion/accordion.config.js +++ b/src/components/molecules/accordion/accordion.config.js @@ -14,6 +14,7 @@ for ( let i = 0; i < paneCount; i++ ) { module.exports = { title: 'Accordion', status: 'wip', + order: 7, context: { panes: paneData, standAlone: false diff --git a/src/components/02-molecules/02-accordion/accordion.njk b/src/components/molecules/accordion/accordion.njk similarity index 100% rename from src/components/02-molecules/02-accordion/accordion.njk rename to src/components/molecules/accordion/accordion.njk diff --git a/src/components/02-molecules/_brand/brand.config.js b/src/components/molecules/brand/brand.config.js similarity index 83% rename from src/components/02-molecules/_brand/brand.config.js rename to src/components/molecules/brand/brand.config.js index 7d689c0b..3712b822 100644 --- a/src/components/02-molecules/_brand/brand.config.js +++ b/src/components/molecules/brand/brand.config.js @@ -1,7 +1,9 @@ module.exports = { title: 'Brand', status: 'wip', + order: 1, context: { + inBanner: true, title: 'Platform Cooperativism Consortium', visuallyHiddenTitle: true, } diff --git a/src/components/02-molecules/_brand/brand.njk b/src/components/molecules/brand/brand.njk similarity index 100% rename from src/components/02-molecules/_brand/brand.njk rename to src/components/molecules/brand/brand.njk diff --git a/src/components/02-molecules/01-card/card--resource.njk b/src/components/molecules/card/card--resource.njk similarity index 100% rename from src/components/02-molecules/01-card/card--resource.njk rename to src/components/molecules/card/card--resource.njk diff --git a/src/components/02-molecules/01-card/card.config.js b/src/components/molecules/card/card.config.js similarity index 99% rename from src/components/02-molecules/01-card/card.config.js rename to src/components/molecules/card/card.config.js index d82132c9..9375e697 100644 --- a/src/components/02-molecules/01-card/card.config.js +++ b/src/components/molecules/card/card.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Card', status: 'wip', + order: 6, context: { title: 'Card', format: 'Card', diff --git a/src/components/02-molecules/01-card/card.njk b/src/components/molecules/card/card.njk similarity index 100% rename from src/components/02-molecules/01-card/card.njk rename to src/components/molecules/card/card.njk diff --git a/src/components/02-molecules/06-dialog/dialog.config.js b/src/components/molecules/dialog/dialog.config.js similarity index 98% rename from src/components/02-molecules/06-dialog/dialog.config.js rename to src/components/molecules/dialog/dialog.config.js index 2fc08e8b..c079bd8c 100644 --- a/src/components/02-molecules/06-dialog/dialog.config.js +++ b/src/components/molecules/dialog/dialog.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Dialog', status: 'wip', + order: 9, context: { buttonIcon: 'delete', buttonLabel: 'Remove favorite', diff --git a/src/components/02-molecules/06-dialog/dialog.njk b/src/components/molecules/dialog/dialog.njk similarity index 100% rename from src/components/02-molecules/06-dialog/dialog.njk rename to src/components/molecules/dialog/dialog.njk diff --git a/src/components/02-molecules/08-disclosure-button/disclosure-button.config.js b/src/components/molecules/disclosure-button/disclosure-button.config.js similarity index 95% rename from src/components/02-molecules/08-disclosure-button/disclosure-button.config.js rename to src/components/molecules/disclosure-button/disclosure-button.config.js index 41ed0a08..17397b50 100644 --- a/src/components/02-molecules/08-disclosure-button/disclosure-button.config.js +++ b/src/components/molecules/disclosure-button/disclosure-button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Details', status: 'wip', + order: 11, context: { label: 'Show details', content: 'Platform cooperatives are an alternative to venture capital-funded and centralized platforms, putting stakeholders before shareholders.' diff --git a/src/components/02-molecules/08-disclosure-button/disclosure-button.njk b/src/components/molecules/disclosure-button/disclosure-button.njk similarity index 100% rename from src/components/02-molecules/08-disclosure-button/disclosure-button.njk rename to src/components/molecules/disclosure-button/disclosure-button.njk diff --git a/src/components/02-molecules/05-filter-list/filter-list.config.js b/src/components/molecules/filter-list/filter-list.config.js similarity index 99% rename from src/components/02-molecules/05-filter-list/filter-list.config.js rename to src/components/molecules/filter-list/filter-list.config.js index 3885c908..bed0c5dd 100644 --- a/src/components/02-molecules/05-filter-list/filter-list.config.js +++ b/src/components/molecules/filter-list/filter-list.config.js @@ -1,6 +1,7 @@ module.exports = { name: 'Filter List', status: 'wip', + order: 7, context: { label: 'Topics', terms: [ diff --git a/src/components/02-molecules/05-filter-list/filter-list.njk b/src/components/molecules/filter-list/filter-list.njk similarity index 100% rename from src/components/02-molecules/05-filter-list/filter-list.njk rename to src/components/molecules/filter-list/filter-list.njk diff --git a/src/components/02-molecules/11-footer/footer.config.js b/src/components/molecules/footer/footer.config.js similarity index 89% rename from src/components/02-molecules/11-footer/footer.config.js rename to src/components/molecules/footer/footer.config.js index bb5afc6c..dde153c9 100644 --- a/src/components/02-molecules/11-footer/footer.config.js +++ b/src/components/molecules/footer/footer.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Footer', status: 'wip', + order: 14, context: { hasFooter: true, inFooter: true diff --git a/src/components/02-molecules/11-footer/footer.njk b/src/components/molecules/footer/footer.njk similarity index 100% rename from src/components/02-molecules/11-footer/footer.njk rename to src/components/molecules/footer/footer.njk diff --git a/src/components/02-molecules/10-info-card/info-card.config.js b/src/components/molecules/info-card/info-card.config.js similarity index 95% rename from src/components/02-molecules/10-info-card/info-card.config.js rename to src/components/molecules/info-card/info-card.config.js index a9107464..9198fe67 100644 --- a/src/components/02-molecules/10-info-card/info-card.config.js +++ b/src/components/molecules/info-card/info-card.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Info Card', status: 'wip', + order: 6, context: { title: 'Change language', icon: 'language', diff --git a/src/components/02-molecules/10-info-card/info-card.njk b/src/components/molecules/info-card/info-card.njk similarity index 100% rename from src/components/02-molecules/10-info-card/info-card.njk rename to src/components/molecules/info-card/info-card.njk diff --git a/src/components/02-molecules/04-link-list/link-list.config.js b/src/components/molecules/link-list/link-list.config.js similarity index 97% rename from src/components/02-molecules/04-link-list/link-list.config.js rename to src/components/molecules/link-list/link-list.config.js index 1af8d34d..a8052a18 100644 --- a/src/components/02-molecules/04-link-list/link-list.config.js +++ b/src/components/molecules/link-list/link-list.config.js @@ -12,6 +12,7 @@ for ( let i = 1; i <= linkCount; i++ ) { module.exports = { title: 'Link List', status: 'wip', + order: 8, context: { standAlone: false, items: items diff --git a/src/components/02-molecules/04-link-list/link-list.njk b/src/components/molecules/link-list/link-list.njk similarity index 100% rename from src/components/02-molecules/04-link-list/link-list.njk rename to src/components/molecules/link-list/link-list.njk diff --git a/src/components/02-molecules/00-menu-button/menu-button.config.js b/src/components/molecules/menu-button/menu-button.config.js similarity index 97% rename from src/components/02-molecules/00-menu-button/menu-button.config.js rename to src/components/molecules/menu-button/menu-button.config.js index ea7236df..dadc41a3 100644 --- a/src/components/02-molecules/00-menu-button/menu-button.config.js +++ b/src/components/molecules/menu-button/menu-button.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Menu Button', status: 'wip', + order: 5, context: { standAlone: false, label: 'Sort by', diff --git a/src/components/02-molecules/00-menu-button/menu-button.njk b/src/components/molecules/menu-button/menu-button.njk similarity index 100% rename from src/components/02-molecules/00-menu-button/menu-button.njk rename to src/components/molecules/menu-button/menu-button.njk diff --git a/src/components/molecules/menu/README.md b/src/components/molecules/menu/README.md new file mode 100644 index 00000000..f2047d7d --- /dev/null +++ b/src/components/molecules/menu/README.md @@ -0,0 +1,15 @@ +# Menu + +The Menu component belongs within the `.container` inside the page header: + +```html +
+
+ +
+ + + +
+
+``` diff --git a/src/components/molecules/menu/menu.config.js b/src/components/molecules/menu/menu.config.js new file mode 100644 index 00000000..50cca1cb --- /dev/null +++ b/src/components/molecules/menu/menu.config.js @@ -0,0 +1,17 @@ +module.exports = { + title: 'Menu', + status: 'wip', + order: 5, + context: { + inBanner: true, + }, + variants: [ + { + 'name': 'home', + 'context': { + bodyClass: 'home', + modifier: 'home' + } + } + ] +}; diff --git a/src/components/molecules/menu/menu.njk b/src/components/molecules/menu/menu.njk new file mode 100644 index 00000000..0884683a --- /dev/null +++ b/src/components/molecules/menu/menu.njk @@ -0,0 +1,8 @@ +{% render '@brand' %} +
+ {% if modifier !== 'home' %} + {% render '@search-button' %} + {% render '@search-form', {standAlone: true}, true %} + {% endif %} + {% render '@nav' %} +
diff --git a/src/components/molecules/molecules.config.js b/src/components/molecules/molecules.config.js new file mode 100644 index 00000000..9d81058c --- /dev/null +++ b/src/components/molecules/molecules.config.js @@ -0,0 +1,4 @@ +module.exports = { + title: 'Molecules', + order: 2, +}; diff --git a/src/components/02-molecules/00-menu/menu.config.js b/src/components/molecules/nav/nav.config.js similarity index 89% rename from src/components/02-molecules/00-menu/menu.config.js rename to src/components/molecules/nav/nav.config.js index e9643d78..5e7c931a 100644 --- a/src/components/02-molecules/00-menu/menu.config.js +++ b/src/components/molecules/nav/nav.config.js @@ -1,6 +1,7 @@ module.exports = { - title: 'Menus', + title: 'Nav', status: 'wip', + order: 4, context: { inBanner: true, menuTitle: 'Menu', @@ -64,14 +65,5 @@ module.exports = { } } }, - }, - variants: [ - { - 'name': 'home', - 'context': { - bodyClass: 'home', - modifier: 'home' - } - } - ] + } }; diff --git a/src/components/molecules/nav/nav.njk b/src/components/molecules/nav/nav.njk new file mode 100644 index 00000000..3d27a613 --- /dev/null +++ b/src/components/molecules/nav/nav.njk @@ -0,0 +1,36 @@ + diff --git a/src/components/02-molecules/06-notification/notification.config.js b/src/components/molecules/notification/notification.config.js similarity index 98% rename from src/components/02-molecules/06-notification/notification.config.js rename to src/components/molecules/notification/notification.config.js index fb426733..892e1688 100644 --- a/src/components/02-molecules/06-notification/notification.config.js +++ b/src/components/molecules/notification/notification.config.js @@ -3,6 +3,7 @@ const faker = require( 'faker' ); module.exports = { title: 'Notification', status: 'wip', + order: 10, context: { icon: 'info', title: 'Notification', diff --git a/src/components/02-molecules/06-notification/notification.njk b/src/components/molecules/notification/notification.njk similarity index 100% rename from src/components/02-molecules/06-notification/notification.njk rename to src/components/molecules/notification/notification.njk diff --git a/src/components/02-molecules/03-pagination/pagination.config.js b/src/components/molecules/pagination/pagination.config.js similarity index 95% rename from src/components/02-molecules/03-pagination/pagination.config.js rename to src/components/molecules/pagination/pagination.config.js index 6f9bfe4f..810d3505 100644 --- a/src/components/02-molecules/03-pagination/pagination.config.js +++ b/src/components/molecules/pagination/pagination.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Pagination', status: 'wip', + order: 13, context: { contentType: 'resources', perPage: 10 diff --git a/src/components/02-molecules/03-pagination/pagination.njk b/src/components/molecules/pagination/pagination.njk similarity index 100% rename from src/components/02-molecules/03-pagination/pagination.njk rename to src/components/molecules/pagination/pagination.njk diff --git a/src/components/02-molecules/09-saved-search/saved-search.config.js b/src/components/molecules/saved-search/saved-search.config.js similarity index 95% rename from src/components/02-molecules/09-saved-search/saved-search.config.js rename to src/components/molecules/saved-search/saved-search.config.js index 84bee070..7ff7854e 100644 --- a/src/components/02-molecules/09-saved-search/saved-search.config.js +++ b/src/components/molecules/saved-search/saved-search.config.js @@ -1,6 +1,7 @@ module.exports = { title: 'Saved Search', status: 'wip', + order: 12, context: { title: 'Cooperative economy paper', searchTerm: 'Cooperative Economy', diff --git a/src/components/02-molecules/09-saved-search/saved-search.njk b/src/components/molecules/saved-search/saved-search.njk similarity index 100% rename from src/components/02-molecules/09-saved-search/saved-search.njk rename to src/components/molecules/saved-search/saved-search.njk diff --git a/src/components/molecules/search-button/search-button.config.js b/src/components/molecules/search-button/search-button.config.js new file mode 100644 index 00000000..096738f6 --- /dev/null +++ b/src/components/molecules/search-button/search-button.config.js @@ -0,0 +1,5 @@ +module.exports = { + title: 'Search Button', + status: 'wip', + order: 2 +}; diff --git a/src/components/molecules/search-button/search-button.njk b/src/components/molecules/search-button/search-button.njk new file mode 100644 index 00000000..b34cc00f --- /dev/null +++ b/src/components/molecules/search-button/search-button.njk @@ -0,0 +1 @@ + diff --git a/src/components/02-molecules/07-search/search.config.js b/src/components/molecules/search-form/search-form.config.js similarity index 93% rename from src/components/02-molecules/07-search/search.config.js rename to src/components/molecules/search-form/search-form.config.js index 0e6a706e..08a12712 100644 --- a/src/components/02-molecules/07-search/search.config.js +++ b/src/components/molecules/search-form/search-form.config.js @@ -1,6 +1,7 @@ module.exports = { - title: 'Search', + title: 'Search Form', status: 'wip', + order: 3, context: { standAlone: false, name: 's', diff --git a/src/components/02-molecules/07-search/search.njk b/src/components/molecules/search-form/search-form.njk similarity index 100% rename from src/components/02-molecules/07-search/search.njk rename to src/components/molecules/search-form/search-form.njk diff --git a/src/docs/01-index.md b/src/docs/01-index.md index 1d0020da..978b1d61 100644 --- a/src/docs/01-index.md +++ b/src/docs/01-index.md @@ -37,4 +37,4 @@ Pinecone is built and deployed automatically to [Netlify](https://netlify.com/) ## Usage - [Django](/docs/usage/django.html) -- [Sage (WordPress)](docs/usage/wordpress.html) +- [Sage 10 (WordPress)](docs/usage/wordpress.html) diff --git a/src/docs/usage/sage.md b/src/docs/usage/sage.md index fff2d89f..0bcf979c 100644 --- a/src/docs/usage/sage.md +++ b/src/docs/usage/sage.md @@ -1,3 +1,76 @@ -# Using Pinecone in a Sage Project +# Using Pinecone in a Sage 10 Project -TODO. +This document assumes that you are using [Sage 10](https://github.com/roots/sage/tree/10.0.0-dev). + +## Prerequisites + +1. Install [Node.js and npm](https://nodejs.org/en/download/). + +2. [Create a package.json](https://docs.npmjs.com/creating-a-package-json-file) file in your project. + +## Installation + +Pinecone must be installed from [GitHub Packages](https://github.com/features/packages). In order to add Pinecone to your project, you'll need to complete the following steps: + +1. [Authenticate to GitHub Packages](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages). + +2. In your project directory, create a file named `.npmrc` with the following contents: + + ```bash + registry=https://npm.pkg.github.com/platform-coop-toolkit + ``` + +3. Install Pinecone: + + ```bash + npm install --save @platform-coop-toolkit/pinecone + ``` + +## Build Configuration + +[Sage 10](https://github.com/roots/sage/tree/10.0.0-dev) uses [Laravel Mix](https://laravel-mix.com). To use Pinecone, your `webpack.mix.js` file should look like this: + +```javascript +const mix = require('laravel-mix'); + +mix.setPublicPath('./dist') + .browserSync('pinecone.test'); // Replace this with your local development URL. + +mix.sass('resources/assets/styles/main.scss', 'styles', { + sassOptions: { + includePaths: [path.join(__dirname, 'node_modules')], + }, +}); + +mix.js('resources/assets/scripts/main.js', 'scripts') + .extract(); + +mix.copy('resources/assets/images', 'dist/images') + .copy('resources/assets/fonts', 'dist/fonts') + .copy('node_modules/@platform-coop-toolkit/pinecone/src/assets/images', 'dist/images') + .copy('node_modules/@platform-coop-toolkit/pinecone/src/assets/fonts', 'dist/fonts'); + +mix.options({ + processCssUrls: false, +}); +``` + +### Sass + +At the top of `resources/assets/styles/main.scss`, add the following line: + +```scss +@import "~@platform-coop-toolkit/pinecone"; +``` + +Pinecone's component styles, Sass functions and utility classes will now be available for use within your theme's Sass. + +### JavaScript + +At the top of `resources/assets/scripts/main.js`, add the following line: + +```javascript +import Pinecone from '@platform-coop-toolkit/pinecone'; +``` + +Pinecone's JavaScript classes will now be available for use within your theme's JavaScript.