Skip to content

Commit f9e2281

Browse files
louismaximepitonMaxLardenoisvprothais
authored
feat(lib): Add Footer as a draft component (#3389)
Co-authored-by: Maxime Lardenois <maxime.lardenois@orange.com> Co-authored-by: Vincent Prothais <vincent.prothais@orange.com>
1 parent c97ba96 commit f9e2281

11 files changed

Lines changed: 215 additions & 42 deletions

File tree

scss/_footer.scss

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
--#{$prefix}footer-padding-bottom: 0;
66
--#{$prefix}footer-color: #{$footer-color};
77
--#{$prefix}footer-title-margin-bottom: 0;
8-
--#{$prefix}footer-title-font-size: #{$footer-font-size-md};
9-
--#{$prefix}footer-title-font-weight: #{$footer-title-font-weight};
10-
--#{$prefix}footer-title-line-height: #{$footer-line-height-md};
11-
--#{$prefix}footer-title-letter-spacing: #{$footer-letter-spacing};
128
// scss-docs-end footer-css-vars
139
--#{$prefix}navbar-padding-y: 0;
1410
--#{$prefix}navbar-nav-link-padding-y: 0;
@@ -47,11 +43,9 @@
4743
}
4844

4945
.footer-heading {
46+
@include get-font-size("body-large");
47+
max-width: unset;
5048
margin-bottom: var(--#{$prefix}footer-title-margin-bottom);
51-
font-size: var(--#{$prefix}footer-title-font-size);
52-
font-weight: var(--#{$prefix}footer-title-font-weight);
53-
line-height: var(--#{$prefix}footer-title-line-height);
54-
letter-spacing: var(--#{$prefix}footer-title-letter-spacing);
5549
white-space: nowrap;
5650
}
5751
}
@@ -69,8 +63,6 @@
6963
--#{$prefix}footer-padding-top: #{$footer-social-padding-top};
7064
--#{$prefix}footer-padding-bottom: #{$footer-social-padding-bottom};
7165
--#{$prefix}footer-title-margin-bottom: #{$footer-title-margin-bottom};
72-
--#{$prefix}footer-title-font-size: #{$footer-font-size-sm};
73-
--#{$prefix}footer-title-line-height: #{$footer-line-height-sm};
7466
// scss-docs-end footer-social-css-vars
7567

7668
display: flex;
@@ -138,8 +130,6 @@
138130
// scss-docs-start footer-social-md-css-vars
139131
--#{$prefix}footer-padding-top: #{$footer-social-padding-top-md};
140132
--#{$prefix}footer-title-margin-bottom: #{$footer-social-title-margin-bottom-md};
141-
--#{$prefix}footer-title-font-size: #{$footer-font-size-md};
142-
--#{$prefix}footer-title-line-height: #{$footer-line-height-md};
143133
// scss-docs-end footer-social-md-css-vars
144134

145135
flex-direction: row;

site/data/components-details.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,43 @@ export const componentsDetails: ComponentCardData[] = [
9999
</li>
100100
</ul>`
101101
},
102+
{
103+
name: 'Footer',
104+
category: 'Navigation',
105+
snippet: `
106+
<footer class="footer navbar w-75" data-bs-theme="dark">
107+
<h2 class="visually-hidden">Sitemap &amp; information</h2>
108+
<div class="container-fluid container-max-width footer-nav px-small py-2xl-small d-lg-none d-sm-none d-md-block">
109+
<nav class="accordion">
110+
<div class="row">
111+
<div class="footer-column">
112+
<h3 class="accordion-header footer-heading">
113+
<button class="accordion-button collapsed container-fluid container-max-width px-none d-md-none" type="button">Label</button>
114+
<span class="d-none d-md-flex">Label</span>
115+
</h3>
116+
<div class="container-fluid container-max-width accordion-collapse collapse">
117+
<ul class="navbar-nav ps-large ps-md-none">
118+
<li><a class="nav-link" href="#">Label</a></li>
119+
</ul>
120+
</div>
121+
</div>
122+
</div>
123+
</nav>
124+
</div>
125+
<div class="border-bottom border-thin border-default d-lg-none d-sm-none d-md-block"></div>
126+
<div class="container-fluid container-max-width footer-terms px-small">
127+
<ul class="navbar-nav gap-md-large">
128+
<li>© Label</li>
129+
<li><a class="nav-link" href="#">Label</a></li>
130+
</ul>
131+
</div>
132+
</footer>`
133+
},
102134
{
103135
name: 'Header',
104136
category: 'Navigation',
105137
snippet: `
106-
<header class="header-minimized">
138+
<header class="header-minimized w-75">
107139
<nav class="navbar navbar-expand-lg">
108140
<div class="container-fluid container-max-width px-small">
109141
<div class="navbar-brand me-auto me-lg-xlarge">

site/data/sidebar-components.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
- title: Checkbox
1111
- title: Chips
1212
- title: Divider
13+
- title: Footer
14+
draft: true
1315
- title: Header
1416
draft: true
1517
- title: Icon
@@ -41,8 +43,6 @@
4143
coming_soon: true
4244
- title: Dropdown
4345
coming_soon: true
44-
- title: Footer
45-
coming_soon: true
4646
- title: List group
4747
coming_soon: true
4848
- title: Local navigation

site/src/components/footer/Footer.astro

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { title } = Astro.props
2020
<div class="footer-column col-md-6 col-lg-2">
2121
<h3 class="accordion-header footer-heading" id="headingGuides">
2222
<button
23-
class="accordion-button collapsed container-fluid container-max-width px-2xsmall d-md-none"
23+
class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none"
2424
type="button"
2525
data-bs-toggle="collapse"
2626
data-bs-target="#collapseGuides"
@@ -36,7 +36,7 @@ const { title } = Astro.props
3636
class="container-fluid container-max-width accordion-collapse collapse"
3737
data-bs-parent="#sitemapAccordion"
3838
>
39-
<ul class="navbar-nav">
39+
<ul class="navbar-nav ps-large ps-md-none">
4040
<li>
4141
<a
4242
class:list={['nav-link', { active: Astro.url.pathname.includes('getting-started') }]}
@@ -60,7 +60,7 @@ const { title } = Astro.props
6060
<li>
6161
<a
6262
class:list={['nav-link', { active: Astro.url.pathname.includes('dual-mode') }]}
63-
{...Astro.url.pathname.includes('customize') && { 'aria-current': 'true' }}
63+
{...Astro.url.pathname.includes('dual-mode') && { 'aria-current': 'true' }}
6464
href={getVersionedDocsPath('dual-mode')}
6565
aria-describedby="headingGuides"
6666
>
@@ -73,7 +73,7 @@ const { title } = Astro.props
7373
<div class="footer-column col-md-6 col-lg-2">
7474
<h3 class="accordion-header footer-heading" id="headingProjects">
7575
<button
76-
class="accordion-button collapsed container-fluid container-max-width px-2xsmall d-md-none"
76+
class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none"
7777
type="button"
7878
data-bs-toggle="collapse"
7979
data-bs-target="#collapseProjects"
@@ -89,7 +89,7 @@ const { title } = Astro.props
8989
class="container-fluid container-max-width accordion-collapse collapse"
9090
data-bs-parent="#sitemapAccordion"
9191
>
92-
<ul class="navbar-nav">
92+
<ul class="navbar-nav ps-large ps-md-none">
9393
<li>
9494
<a
9595
class="nav-link"
@@ -126,10 +126,10 @@ const { title } = Astro.props
126126
</ul>
127127
</div>
128128
</div>
129-
<div class="footer-column col-md-6 col-lg-2">
129+
<div class="footer-column col-md-6 col-lg-2 mt-md-xlarge mt-lg-none">
130130
<h3 class="accordion-header footer-heading" id="headingCommunity">
131131
<button
132-
class="accordion-button collapsed container-fluid container-max-width px-2xsmall d-md-none"
132+
class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none"
133133
type="button"
134134
data-bs-toggle="collapse"
135135
data-bs-target="#collapseCommunity"
@@ -145,7 +145,7 @@ const { title } = Astro.props
145145
class="container-fluid container-max-width accordion-collapse collapse"
146146
data-bs-parent="#sitemapAccordion"
147147
>
148-
<ul class="navbar-nav">
148+
<ul class="navbar-nav ps-large ps-md-none">
149149
<li>
150150
<a
151151
class="nav-link"
@@ -182,10 +182,10 @@ const { title } = Astro.props
182182
</ul>
183183
</div>
184184
</div>
185-
<div class="footer-column col-md-6 col-lg-2">
185+
<div class="footer-column col-md-6 col-lg-2 mt-md-xlarge mt-lg-none">
186186
<h3 class="accordion-header footer-heading" id="headingAbout">
187187
<button
188-
class="accordion-button collapsed container-fluid container-max-width px-2xsmall d-md-none"
188+
class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none"
189189
type="button"
190190
data-bs-toggle="collapse"
191191
data-bs-target="#collapseAbout"
@@ -201,7 +201,7 @@ const { title } = Astro.props
201201
class="container-fluid container-max-width accordion-collapse collapse"
202202
data-bs-parent="#sitemapAccordion"
203203
>
204-
<ul class="navbar-nav">
204+
<ul class="navbar-nav ps-large ps-md-none">
205205
<li>
206206
<a
207207
class:list={['nav-link', { active: Astro.url.pathname.includes('resources') }]}
@@ -267,9 +267,9 @@ const { title } = Astro.props
267267
</div>
268268
<!-- OUDS mod: footer specific adaptations -->
269269
<div
270-
class="footer-column accordion-header col-md-12 col-lg-4 mb-large pt-large pt-lg-2xlarge px-2xsmall px-lg-none fw-bold small"
270+
class="footer-column accordion-header col-md-12 col-lg-4 mb-large fw-normal small pt-medium pt-md-2xlarge pt-lg-none"
271271
>
272-
<p class="mb-lg-2xsmall">
272+
<p class="px-gridmargin px-md-none">
273273
This documentation is an adaptation made by Orange. Original version designed and built with all the love in
274274
the world by the <a href="https://github.com/orgs/twbs/people" target="_blank" rel="noopener"
275275
>Bootstrap core team</a
@@ -279,7 +279,7 @@ const { title } = Astro.props
279279
rel="noopener">their contributors</a
280280
>.
281281
</p>
282-
<p class="mb-lg-2xsmall">
282+
<p class="px-gridmargin px-md-none">
283283
Orange modified code licensed <a
284284
href={`${getConfig().repo}/blob/main/LICENSE`}
285285
target="_blank"
@@ -294,8 +294,8 @@ const { title } = Astro.props
294294
>CC BY 3.0</a
295295
>.
296296
</p>
297-
<p class="mb-lg-2xsmall">Currently v{getConfig().current_version}.</p>
298-
<p class="mb-lg-2xsmall">
297+
<p class="px-gridmargin px-md-none">Currently v{getConfig().current_version}.</p>
298+
<p class="px-gridmargin px-md-none">
299299
<a href="https://www.netlify.com" target="_blank" rel="noopener">
300300
<img
301301
src="https://www.netlify.com/img/global/badges/netlify-dark.svg"
Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,111 @@
11
---
22
title: Footer
3-
description: Documentation and examples for a powerful and responsive OUDS Web’s footer. It includes support for branding, navigation and more.
3+
description: Documentation and examples for a responsive OUDS Web’s footer. It includes support for branding, navigation and more.
44
aliases:
55
- "/docs/components/footer/"
66
toc: true
77
---
88

9-
<CalloutSoon />
9+
import { getVersionedDocsPath } from '@libs/path'
10+
11+
<Callout type="negative" title="Draft component">
12+
The footer component is not yet designed, and this component is only a draft for the moment. It will be updated in the future with the final design and will certainly need adjustments regarding the DOM. Use it as a temporary component to speed up your development.
13+
14+
Please refer to the [Footer in the Boosted documentation](https://boosted.orange.com/docs/components/footer/) to have a full view of the footer component and its variations. You’ll only need to adapt the utilities and the components inside the DOM.
15+
</Callout>
16+
17+
<Callout type="warning" title="Missing sections">
18+
The social button and the title content sections are not available yet since we don’t have these in our developed components.
19+
</Callout>
20+
21+
<Callout type="warning">
22+
Mandatory changes from Boosted:
23+
- `.accordion-button` should have `.px-gridmargin` to align with the rest of the content, read [our documentation about it]([[docsref:/utilities/spacing#grid-measures]]).
24+
- `.navbar-nav` inside the `.footer-nav` should have `.ps-large.ps-md-none` to better convey information.
25+
- Already existing components should be replaced inside the footer, such as the text input and the buttons.
26+
</Callout>
27+
28+
## Footer
29+
30+
Here is a simple footer example, which is responsive and will wrap on smaller screens. Take a look at the [Boosted footer](https://boosted.orange.com/docs/components/footer/#example).
31+
32+
<Example buttonLabel="footer" class="p-none" code={`<footer class="footer navbar" data-bs-theme="dark">
33+
<h2 class="visually-hidden">Sitemap &amp; information</h2>
34+
<div class="container-fluid container-max-width footer-nav">
35+
<nav class="accordion" id="accordion1" aria-label="Sitemap footer 1">
36+
<div class="row">
37+
<div class="footer-column col-md-3">
38+
<h3 class="accordion-header footer-heading" id="headingOne1">
39+
<button class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne1" aria-expanded="false" aria-controls="collapseOne1">Category</button>
40+
<span class="d-none d-md-flex">Category</span>
41+
</h3>
42+
<div id="collapseOne1" class="container-fluid container-max-width accordion-collapse collapse" data-bs-parent="#accordion1">
43+
<ul class="navbar-nav ps-large ps-md-none">
44+
<li><a class="nav-link" href="#" aria-describedby="headingOne1">Subcategory</a></li>
45+
<li><a class="nav-link" href="#" aria-describedby="headingOne1">Subcategory</a></li>
46+
<li><a class="nav-link" href="#" aria-describedby="headingOne1">Subcategory</a></li>
47+
</ul>
48+
</div>
49+
</div>
50+
<div class="footer-column col-md-3">
51+
<h3 class="accordion-header footer-heading" id="headingTwo1">
52+
<button class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo1" aria-expanded="false" aria-controls="collapseTwo1">Category</button>
53+
<span class="d-none d-md-flex">Category</span>
54+
</h3>
55+
<div id="collapseTwo1" class="container-fluid container-max-width accordion-collapse collapse" data-bs-parent="#accordion1">
56+
<ul class="navbar-nav ps-large ps-md-none">
57+
<li><a class="nav-link" href="#" aria-describedby="headingTwo1">Subcategory</a></li>
58+
<li><a class="nav-link" href="#" aria-describedby="headingTwo1">Subcategory</a></li>
59+
<li><a class="nav-link" href="#" aria-describedby="headingTwo1">Subcategory</a></li>
60+
</ul>
61+
</div>
62+
</div>
63+
<div class="footer-column col-md-3">
64+
<h3 class="accordion-header footer-heading" id="headingThree1">
65+
<button class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree1" aria-expanded="false" aria-controls="collapseThree1">Category</button>
66+
<span class="d-none d-md-flex">Category</span>
67+
</h3>
68+
<div id="collapseThree1" class="container-fluid container-max-width accordion-collapse collapse" data-bs-parent="#accordion1">
69+
<ul class="navbar-nav ps-large ps-md-none">
70+
<li><a class="nav-link" href="#" aria-describedby="headingThree1">Subcategory</a></li>
71+
<li><a class="nav-link" href="#" aria-describedby="headingThree1">Subcategory</a></li>
72+
<li><a class="nav-link" href="#" aria-describedby="headingThree1">Subcategory</a></li>
73+
</ul>
74+
</div>
75+
</div>
76+
<div class="footer-column col-md-3">
77+
<h3 class="accordion-header footer-heading" id="headingFour1">
78+
<button class="accordion-button collapsed container-fluid container-max-width px-gridmargin d-md-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapseFour1" aria-expanded="false" aria-controls="collapseFour1">Category</button>
79+
<span class="d-none d-md-flex">Category</span>
80+
</h3>
81+
<div id="collapseFour1" class="container-fluid container-max-width accordion-collapse collapse" data-bs-parent="#accordion1">
82+
<ul class="navbar-nav ps-large ps-md-none">
83+
<li><a class="nav-link" href="#" aria-describedby="headingFour1">Subcategory</a></li>
84+
<li><a class="nav-link" href="#" aria-describedby="headingFour1">Subcategory</a></li>
85+
<li><a class="nav-link" href="#" aria-describedby="headingFour1">Subcategory</a></li>
86+
</ul>
87+
</div>
88+
</div>
89+
</div>
90+
</nav>
91+
</div>
92+
<div class="border-bottom border-thin border-default"></div>
93+
<div class="container-fluid container-max-width footer-service">
94+
<ul class="navbar-nav gap-large gap-md-2xlarge">
95+
<li><a class="nav-link gap-2xsmall" href="#"><svg width="1.875rem" height="1.875rem" aria-hidden="true"><use xlink:href="${getVersionedDocsPath('assets/img/ouds-web-sprite.svg#location-pin-compass')}"></use></svg><span>Store locator</span></a></li>
96+
<li><a class="nav-link gap-2xsmall" href="#"><svg width="1.875rem" height="1.875rem" aria-hidden="true"><use xlink:href="${getVersionedDocsPath('assets/img/ouds-web-sprite.svg#mobile-network-coverage')}"></use></svg><span>Coverage checker</span></a></li>
97+
<li><a class="nav-link gap-2xsmall" href="#"><svg width="1.875rem" height="1.875rem" aria-hidden="true"><use xlink:href="${getVersionedDocsPath('assets/img/ouds-web-sprite.svg#live-chat')}"></use></svg><span>Contact us</span></a></li>
98+
<li><a class="nav-link gap-2xsmall" href="#"><svg width="1.875rem" height="1.875rem" aria-hidden="true"><use xlink:href="${getVersionedDocsPath('assets/img/ouds-web-sprite.svg#child-protection')}"></use></svg><span>Child protection</span></a></li>
99+
</ul>
100+
</div>
101+
<div class="border-bottom border-thin border-default"></div>
102+
<div class="container-fluid container-max-width footer-terms">
103+
<ul class="navbar-nav gap-md-large">
104+
<li>© Orange 2026</li>
105+
<li><a class="nav-link" href="#">Terms and conditions</a></li>
106+
<li><a class="nav-link" href="#">Privacy</a></li>
107+
<li><a class="nav-link active" href="#" aria-current="true">Accessibility statement</a></li>
108+
<li><a class="nav-link" href="#">Cookie policy</a></li>
109+
</ul>
110+
</div>
111+
</footer>`} />

site/src/content/docs/dual-mode.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ In this scenario, you will have access to all the components available in OUDS W
339339
340340
// Boosted specific imports
341341
@import "boosted/scss/back-to-top";
342-
@import "boosted/scss/footer";
343342
@import "boosted/scss/local-navigation";
344343
@import "boosted/scss/stepped-process";
345344
@import "boosted/scss/sticker";

site/src/content/docs/getting-started/migration.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ toc: true
1515

1616
### Components
1717

18+
#### Footer
19+
20+
- <span class="tag tag-small rounded-none tag-warning">Warning</span> OUDS Web now supports a draft footer component. It comes from Boosted directly with small tweaks. It is intended as a placeholder for projects that need it urgently but be aware that it will change in the future. Read more in our [footer page]([[docsref:/components/footer]]).
21+
1822
#### Header
1923

2024
- <span class="tag tag-small rounded-none tag-warning">Warning</span> OUDS Web now supports a draft header component. It comes from Boosted directly with small tweaks. It is intended as a placeholder for projects that need it urgently but be aware that it will change in the future. Read more in our [header page]([[docsref:/components/header]]).
@@ -30,7 +34,7 @@ toc: true
3034
### Dual mode
3135

3236
1. Update `@ouds/web-common` and `@ouds/web-[theme]` to v1.2.0.
33-
2. Remove `@import "boosted/scss/nav";`, `@import "boosted/scss/navbar";`, and `@import "boosted/scss/orange-navbar";` from the Boosted custom import stack.
37+
2. Remove `@import "boosted/scss/nav";`, `@import "boosted/scss/navbar";`, `@import "boosted/scss/footer";`, and `@import "boosted/scss/orange-navbar";` from the Boosted custom import stack.
3438

3539

3640
## v1.1.0

0 commit comments

Comments
 (0)