You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idfive Component Library (ICL) is a comprehensive wireframe and component library that serves as the foundation for Accelerator projects. It provides standardized design patterns, components, and layouts that ensure consistency across all idfive projects.
8
8
9
-
For complete technical documentation on ICL implementation, build process, and development workflow, see the **[ICL Technical Documentation](/docs/front-end/pattern-lab)**.
9
+
For complete technical documentation on ICL implementation, build process, and development workflow, see the **[ICL Technical Documentation](/docs/front-end/idfive-component-library)**.
10
10
11
11
## Design Resources
12
12
@@ -20,7 +20,7 @@ The ICL directly influences Accelerator project structure and provides the found
20
20
21
21
-**Header Configuration**: Site Options reference ICL Header Types (Full vs Hybrid)
22
22
-**Component Sync**: ICL components are manually synced to both [Drupal Accelerator](https://dev-idfive-drupal-accelerator.pantheonsite.io/) and [WordPress Accelerator](https://dev-idfive-accelerator.pantheonsite.io/) sites
23
-
-**Pattern Library**: All Accelerator components follow ICL design patterns established in the [Pattern Lab environment](/docs/front-end/pattern-lab)
23
+
-**Pattern Library**: All Accelerator components follow ICL design patterns established in the [Pattern Lab environment](/docs/front-end/idfive-component-library)
24
24
-**Wireframe Foundation**: Project wireframes are built using ICL components
25
25
-**Consistency Standards**: Ensures all projects maintain idfive design standards
26
26
@@ -29,7 +29,7 @@ The ICL directly influences Accelerator project structure and provides the found
29
29
### Header Types
30
30
31
31
-**Full Header**: Complete navigation with all elements visible
32
-
-**Hybrid Header**: Streamlined navigation with selective element display
32
+
-**Hybrid Header**: Streamlined navigation with selective element display
33
33
-**Mobile Navigation**: Responsive navigation patterns for mobile devices
34
34
35
35
### Content Components
@@ -55,7 +55,7 @@ The ICL is built using modern frontend tools and is available as a Pattern Lab e
55
55
-**Component Library**: TypeScript modules with accessibility utilities
56
56
-**Staging Environment**: Available at [staging site](https://staging2.idfive.com/idfive-pattern-lab-starter/public/?p=pages-welcome) (username/password: `guest`)
57
57
58
-
For complete setup instructions, build process, and component documentation, see **[ICL Technical Documentation](/docs/front-end/pattern-lab)**.
58
+
For complete setup instructions, build process, and component documentation, see **[ICL Technical Documentation](/docs/front-end/idfive-component-library)**.
59
59
60
60
## Usage Guidelines
61
61
@@ -68,7 +68,7 @@ When working with Accelerator projects:
68
68
69
69
## Related Resources
70
70
71
-
-**[ICL Technical Documentation](/docs/front-end/pattern-lab)** - Complete setup, build process, and component development guide
72
-
-[Accelerator Overview](/docs/accelerator/overview) - Project overview and design resources
71
+
-**[ICL Technical Documentation](/docs/front-end/idfive-component-library)** - Complete setup, build process, and component development guide
72
+
-[Accelerator Overview](/docs/accelerator/overview) - Project overview and design resources
73
73
-[Site Options](/docs/accelerator/site-options) - Configuration options that reference ICL header types
74
74
-[Customization Guidelines](/docs/accelerator/customization) - How to customize while maintaining ICL consistency
Copy file name to clipboardExpand all lines: docs/front-end/01-idfive-component-library.mdx
+35-7Lines changed: 35 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,15 @@ import TabItem from "@theme/TabItem";
12
12
## Overview (What's Included)
13
13
14
14
<TabsgroupId="icl-versions">
15
-
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)"default>
15
+
<TabItemvalue="v3.0"label="ICL Version 3+ (Astro)"default>
16
+
-[Astro](https://astro.build/) static site generator framework
17
+
- Includes (out of the box):
18
+
-[Vite](https://vite.dev/)
19
+
-[PostCSS](https://postcss.org/)
20
+
-[Typescript](https://www.typescriptlang.org/)
21
+
</TabItem>
22
+
23
+
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)">
16
24
-[Pattern Lab](https://patternlab.io/) to display components and pages, specifically the [Node Version](https://github.com/pattern-lab/) with twig
17
25
-[Vite](https://vite.dev/) build tool, also includes:
18
26
-[PostCSS](https://postcss.org/)
@@ -61,7 +69,11 @@ patternlab-node). The site navigation is typically on the left side of the page
61
69
## Build
62
70
63
71
<TabsgroupId="icl-versions">
64
-
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)"default>
72
+
<TabItemvalue="v3.0"label="ICL Version 3+ (Astro)"default>
73
+
- Run `npm run build`
74
+
- To preview the build (`/dist` directory) run `npm run preview`
75
+
</TabItem>
76
+
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)">
65
77
**No build step is needed** - the js and css are being built and optimized continuously.
66
78
- Run `npm run develop`
67
79
</TabItem>
@@ -77,14 +89,30 @@ patternlab-node). The site navigation is typically on the left side of the page
77
89
78
90
## Folder Structure
79
91
80
-
The source directory contains the main working areas for the library. More information can be found [here](https://patternlab.io/docs/editing-pattern-lab-source-files/).
81
-
82
92
<TabsgroupId="icl-versions">
83
-
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)"default>
93
+
<TabItemvalue="v3.0"label="ICL Version 3+ (Astro)"default>
94
+
-**dist** is the build folder, the static assets and pages are re-created here when `npm run build` is run
95
+
-**public** static folder where images and favicons (any assets needed) can be placed and accessed as needed
96
+
-**src**:
97
+
-**assets**:
98
+
-**CSS** contains css partial files, compiled into `index.css` (see [css documentation](/docs/front-end/css) for more information)
99
+
-**JS** contains all typescript modules:
100
+
-**components** contains individual modules for respective components (when required for functionality)
101
+
-**utilities** contains helpful accessibility functions that can be used to simply certain tasks
102
+
-**main.ts** imports all functions and calls init functions for each (this file gets compiled into one on build)
103
+
-**components** contains the `.astro` source files for components
104
+
-**data**:
105
+
-**global.json** data for use throughout site that will not change, for example the site header and site footer data
106
+
-***.json** data used for all pages of the site, as well as variations on pages (see kitchen sink or home for example)
107
+
-**icl-utils** contains utility scripts for ICL usage, not to intended to be edited unless absolutely needed
108
+
-**layouts/Layout.astro** the main page structure layout that is used on every page of the site
109
+
-**pages** contains the `.astro` source files for pages. The files in the `/components` subdirectory are solely for display in the ICL Pages/Component list view only and not intended to be edited
110
+
</TabItem>
111
+
<TabItemvalue="v2.0"label="ICL Version 2+ (Vite/PostCSS)">
84
112
-**Annotations** is not in use, but can be used as an alternate way of documenting components (insead of placing the documentation in the respective component folder)
85
113
-**Data** contains global data, currently the starter library consists of `data.json` which holds data for global components such as the site-header and site-footer (this prevents the data from needing to be repeated for multiple instances). This can be re-organized/customized to suit developer needs
86
114
-**Meta** contains the header and footer code that gets applied to all patterns and pages. `_head.twig` contains all of the html and header starting code and `_foot.twig` for footer and ending html code/tags - more info can be found [here](https://patternlab.io/docs/modifying-the-pattern-header-and-footer/)
87
-
-**Patterns** contains the bulk of the code in use (components, core & pages). The three directories in here correlate to what is seen in the browser interface and are documented [above](pattern-lab#interface)
115
+
-**Patterns** contains the bulk of the code in use (components, core & pages). The three directories in here correlate to what is seen in the browser interface and are documented [above](idfive-component-library#interface)
88
116
-**CSS** contains css partial files, compiled into `index.css` (see [css documentation](/docs/front-end/css) for more information)
89
117
-**Fonts** is empty by default (Google Fonts are linked to in `_head.twig` for the sarter version), but local fonts can be added to this directory
90
118
-**Images** contains all starter images, as well as icons and svgs
@@ -98,7 +126,7 @@ The source directory contains the main working areas for the library. More infor
98
126
-**Annotations** is not in use, but can be used as an alternate way of documenting components (insead of placing the documentation in the respective component folder)
99
127
-**Data** contains global data, currently the starter library consists of `data.json` which holds data for global components such as the site-header and site-footer (this prevents the data from needing to be repeated for multiple instances). This can be re-organized/customized to suit developer needs
100
128
-**Meta** contains the header and footer code that gets applied to all patterns and pages. `_head.twig` contains all of the html and header starting code and `_foot.twig` for footer and ending html code/tags - more info can be found [here](https://patternlab.io/docs/modifying-the-pattern-header-and-footer/)
101
-
-**Patterns** contains the bulk of the code in use (components, core & pages). The three directories in here correlate to what is seen in the browser interface and are documented [above](pattern-lab#interface)
129
+
-**Patterns** contains the bulk of the code in use (components, core & pages). The three directories in here correlate to what is seen in the browser interface and are documented [above](idfive-component-library#interface)
102
130
-**CSS** contains the scss partial files, compiled into `index.scss` (see [css documentation](/docs/front-end/css) for more information)
103
131
-**Fonts** is empty by default (Google Fonts are linked to in `_head.twig` for the sarter version), but local fonts can be added to this directory
104
132
-**Images** contains all starter images, as well as icons and svgs
Copy file name to clipboardExpand all lines: docs/front-end/03-page-layout.md
+51-60Lines changed: 51 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,72 +1,60 @@
1
1
# Layout & Page Structure
2
2
3
3
## Page Structure
4
-
The overall page structure in the [ICL / Pattern Lab Starter](/docs/front-end/pattern-lab) is controlled by `source/_patterns/pages/page-structure.twig`:
4
+
5
+
The overall page structure in the [ICL / Pattern Lab Starter](/docs/front-end/idfive-component-library) is controlled by `source/_patterns/pages/page-structure.twig`:
5
6
6
7
```html
7
8
<divclass="off-canvas">
8
9
<divclass="max-bound">
9
-
{% include "@components/emergency-alert/emergency-alert.twig" %}
10
-
{% include "@components/site-header/site-header.twig" %}
11
-
<mainid="main-content">
12
-
{% block hero %}
13
-
{% endblock %}
10
+
{% include "@components/emergency-alert/emergency-alert.twig" %} {% include
<!-- Include End Of Page Call To Action (if needed, if not - leave blank) -->
45
38
{% endblock %}
46
39
```
47
40
48
41
### Modifying Page Structure
42
+
49
43
New blocks can be added as needed to insert different elements per page. For example if a unique site-header and site-footer were needed, `page-structure.twig` could be modified to
50
44
51
45
```html
52
46
<divclass="off-canvas">
53
47
<divclass="max-bound">
54
-
{% include "@components/emergency-alert/emergency-alert.twig" %}
55
-
{% block header %}{% endblock %}
56
-
<mainid="main-content">
57
-
{% block hero %}
58
-
{% endblock %}
48
+
{% include "@components/emergency-alert/emergency-alert.twig" %} {% block
<!-- Include End Of Page Call To Action (if needed, if not - leave blank) -->
76
+
{% endblock %} {% block footer %}
77
+
<!-- Include Footer -->
96
78
{% endblock %}
97
79
```
98
80
@@ -103,6 +85,7 @@ Usage in the page in this example:
103
85
`<div class="outer-pad">` is a direct descendent of the `<main>` tag and is used to match the left and right spacing seen in the design reference (differs per project). The value will typically change according to screen-width and could also change per page template-type.
104
86
105
87
The inline padding (left and right) custom property values `--outer-padding` can be updated in `base.scss`. The value is changed based on screen width with media queries. One or two values can be used, if two values are used, the first is left padding and the second is right padding. For example:
88
+
106
89
```scss
107
90
// outer padding mobile
108
91
--outer-padding: #{rem(30)};
@@ -119,6 +102,7 @@ The inline padding (left and right) custom property values `--outer-padding` can
119
102
```
120
103
121
104
Outer-pad is a placeholder selector (so that it can be re-used) and is applied in **placeholders.scss**:
105
+
122
106
```scss
123
107
%outer-pad {
124
108
padding-inline: var(--outer-padding);
@@ -132,6 +116,7 @@ Outer-pad is a placeholder selector (so that it can be re-used) and is applied i
132
116
}
133
117
}
134
118
```
119
+
135
120
It's applied to `.outer-pad` in **layout.scss**:
136
121
137
122
```scss
@@ -141,7 +126,9 @@ It's applied to `.outer-pad` in **layout.scss**:
141
126
```
142
127
143
128
### Handling Outer Padding With a Subnav
129
+
144
130
When a page (ie the [Kitchen Sink](https://staging2.idfive.com/idfive-pattern-lab-starter/public/patterns/pages-kitchen-sink-kitchen-sink/pages-kitchen-sink-kitchen-sink.rendered.html)) has a subnav, the above code `&:has(.subnav)` from **placeholders.scss** sets a grid layout with the subnav as the first column and the main content `<div class="page-content">` as the second column:
131
+
145
132
```scss
146
133
%outer-pad {
147
134
&:has(.subnav) {
@@ -165,7 +152,11 @@ Sometimes it's necessary to have a component take up the full width of the page
Copy file name to clipboardExpand all lines: docs/front-end/04-twig-templating.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,13 @@ The Pattern Lab Starter uses the twig template language (version 2 - [documentat
16
16
```html
17
17
{% if hero.image.desktop_src is not empty %}
18
18
```
19
-
allows us to check if a part of the corresponding data is "not empty" (which can be helpful if a variant is needed so the data can be replicated "empty" as [variants](/docs/front-end/pattern-lab#variants-page--component) pick up the data from their parents)
19
+
allows us to check if a part of the corresponding data is "not empty" (which can be helpful if a variant is needed so the data can be replicated "empty" as [variants](/docs/front-end/idfive-component-library#variants-page--component) pick up the data from their parents)
20
20
- The subnav is also optional in the hero:
21
21
```html
22
22
{% if hero.subnav.subnav.items|length > 0 %} {% include
23
23
"@components/subnav/subnav.twig" with hero.subnav %} {% endif %}
24
24
```
25
-
checking if the array has content using the `length` filter is also useful for [variants](/docs/front-end/pattern-lab#variants-page--component) by adding the "empty" array if the intention is to not output the subnav
25
+
checking if the array has content using the `length` filter is also useful for [variants](/docs/front-end/idfive-component-library#variants-page--component) by adding the "empty" array if the intention is to not output the subnav
0 commit comments