Skip to content

Commit

Permalink
feat: reorganize components, make menu more granular (#254)
Browse files Browse the repository at this point in the history
* feat: reorganize components, make menu more granular
  * Add skeleton layout and docs
  * Fix menu alignment on large screens
* chore(docs): friendlier link
* chore(docs): add instructions for use with Sage 10
  • Loading branch information
Ned Zimmerman committed Feb 20, 2020
1 parent c220f9b commit 4893f71
Show file tree
Hide file tree
Showing 117 changed files with 281 additions and 76 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
1 change: 1 addition & 0 deletions src/assets/styles/layouts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
[role="banner"] {
.inner {
margin-left: 0;
width: 100%;
}
}

Expand Down
43 changes: 0 additions & 43 deletions src/components/02-molecules/00-menu/menu.njk

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/_preview.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>
<script src="{{ '/scripts/pinecone.umd.js' | path }}"></script>
<script src="{{ '/scripts/pinecone.umd.js' | path }}" defer></script>
<script src="{{ '/scripts/pinecone.js' | path }}" defer></script>
<link rel="stylesheet" href="{{ '/styles/pinecone.css' | path }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/images/apple-touch-icon.png' | path }}">
<link rel="icon" href="{{ '/images/favicon.png' | path }}" >
Expand Down Expand Up @@ -41,6 +42,5 @@
<div class="container">{% if _target.context.inFooter %}{{ yield | safe }}{% else %}{% render '@footer' %}{% endif %}</div>
</footer>
{% endif %}
<script src="{{ '/scripts/pinecone.js' | path }}"></script>
</body>
</html>
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/components/atoms/atoms.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
title: 'Atoms',
order: 1,
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Badge',
status: 'wip',
order: 8,
context: {
label: 'Platform Cooperativism',
standAlone: false
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Button',
status: 'wip',
order: 9,
context: {
label: 'Filter',
labelVisuallyHidden: false,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Colors',
status: 'wip',
order: 1,
context: {
colors: {
brand: [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
status: 'wip',
title: 'Dividers',
order: 4,
context: {
dividers: [
{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Checkboxes',
status: 'wip',
order: 4,
context: {
standAlone: false,
checkboxes: [
Expand All @@ -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'
}
}
]
Expand Down
4 changes: 4 additions & 0 deletions src/components/atoms/form-elements/form-elements.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
title: 'Form Elements',
order: 10,
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Text Input',
status: 'wip',
order: 1,
context: {
standAlone: false,
inputs: [
Expand All @@ -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'
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Radio Buttons',
label: 'Radio Buttons',
order: 5,
status: 'wip',
context: {
standAlone: false,
Expand All @@ -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'
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Selects',
status: 'wip',
order: 3,
context: {
standAlone: false,
selects: [
Expand All @@ -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'
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
title: 'Submit Button',
label: 'Submit Button',
status: 'wip',
order: 6,
context: {
label: 'Submit',
id: 'submit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
title: 'Text Areas',
label: 'Text Areas',
status: 'wip',
order: 2,
context: {
label: 'Text Area',
name: 'text',
Expand All @@ -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'
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Icons',
status: 'wip',
order: 2,
context: {
iconsTitle: 'Icons',
icons: [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Link',
status: 'wip',
order: 5,
context: {
href: '/internal-link',
label: 'Link'
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Tag',
status: 'wip',
order: 7,
context: {
label: 'Platform Cooperativism',
standAlone: false
Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions src/components/atoms/typography/typography.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
title: 'Typography',
status: 'wip',
order: 3
};
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions src/components/layouts/layouts.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
title: 'Layouts',
order: 3,
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Page',
status: 'wip',
order: 3,
context: {
bodyClass: 'page',
hasMenu: true,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Resource',
status: 'wip',
order: 5,
context: {
bodyClass: 'single-lc_resource',
hasMenu: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions src/components/layouts/skeleton/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Skeleton

This component demonstrates the basic skeleton of a page. Other components should be included as per the HTML comments.
1 change: 1 addition & 0 deletions src/components/layouts/skeleton/_preview.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ yield | safe }}
5 changes: 5 additions & 0 deletions src/components/layouts/skeleton/skeleton.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
title: 'Skeleton',
status: 'wip',
order: 1,
};
35 changes: 35 additions & 0 deletions src/components/layouts/skeleton/skeleton.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>
<script src="{{ '/scripts/pinecone.umd.js' | path }}" defer></script>
<script src="{{ '/scripts/pinecone.js' | path }}" defer></script>
<link rel="stylesheet" href="{{ '/styles/pinecone.css' | path }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/images/apple-touch-icon.png' | path }}">
<link rel="icon" href="{{ '/images/favicon.png' | path }}" >
<title>Pinecone</title>
</head>

<body>
<header role="banner">
<div class="container">
<!-- Menu component goes here (brand, search button, search form, and nav) -->
</div>
</header>
<div class="wrap container" role="document">
<div class="content">
<main>
<!-- Content goes here -->
</main>
</div>
</div>
<footer class="content-info">
<div class="container">
<!-- Footer component goes here -->
</div>
</footer>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ for ( let i = 0; i < paneCount; i++ ) {
module.exports = {
title: 'Accordion',
status: 'wip',
order: 7,
context: {
panes: paneData,
standAlone: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module.exports = {
title: 'Brand',
status: 'wip',
order: 1,
context: {
inBanner: true,
title: 'Platform Cooperativism Consortium',
visuallyHiddenTitle: true,
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
title: 'Card',
status: 'wip',
order: 6,
context: {
title: 'Card',
format: 'Card',
Expand Down
File renamed without changes.
Loading

0 comments on commit 4893f71

Please sign in to comment.