Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: new app download page #1915

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e9aec93
First draft
louismaximepiton Mar 22, 2023
1659112
.
louismaximepiton Mar 22, 2023
7cc775c
Modify to better fit our current needs.
louismaximepiton Mar 23, 2023
49eb64a
Add small CSS transform
louismaximepiton Mar 23, 2023
c73fa99
Adding Header and footer
louismaximepiton Mar 23, 2023
f2c4d59
following spec
louismaximepiton Mar 24, 2023
bd0d0ce
Merge branch 'main' into main-lmp-download-example
louismaximepiton Apr 17, 2023
c62ddf7
Wip
louismaximepiton Apr 18, 2023
670ae9d
Animations on load
louismaximepiton Apr 18, 2023
6246da6
.
louismaximepiton Apr 18, 2023
d2b752f
.
louismaximepiton Apr 18, 2023
3ddc6a0
fix(review)
louismaximepiton Apr 19, 2023
30dbd78
.
louismaximepiton Apr 19, 2023
e11a535
.
louismaximepiton Apr 19, 2023
6fe4573
Animation tweaks
louismaximepiton Apr 19, 2023
f4c93af
.
louismaximepiton Apr 19, 2023
fe7823f
Better optimization, images, animations, etc...
louismaximepiton Apr 20, 2023
3dbd3f5
.
louismaximepiton Apr 20, 2023
e0ad02c
.
louismaximepiton Apr 20, 2023
bd53c23
Update QR
louismaximepiton Apr 20, 2023
bd9d3ea
First draft for mobile
louismaximepiton Apr 26, 2023
481a1c1
.
louismaximepiton Apr 26, 2023
ac00211
.
louismaximepiton Apr 26, 2023
e33fa55
Merge branch 'main' into main-lmp-download-example
MewenLeHo May 3, 2023
e096874
Remove hover effect on AppStore and PlayStore badges
MewenLeHo May 3, 2023
c27e4a8
Merge branch 'main' into main-lmp-download-example
louismaximepiton May 26, 2023
373719d
.
louismaximepiton May 26, 2023
5ffaee3
Merge branch 'main' into main-lmp-download-example
louismaximepiton Jun 2, 2023
68edeee
A11y fix, new bunch of images, adding links
louismaximepiton Jun 2, 2023
c23119d
Last changes ?
louismaximepiton Jun 5, 2023
545798e
.
louismaximepiton Jun 5, 2023
0d95016
Merge branch 'main' into main-lmp-download-example
MewenLeHo Jun 9, 2023
491241b
Some a11y fixes
louismaximepiton Jun 9, 2023
c1a9a58
.
louismaximepiton Jun 9, 2023
e873164
.
louismaximepiton Jun 9, 2023
6bf6ca1
.
louismaximepiton Jun 12, 2023
160fb5c
Working workaround
louismaximepiton Jun 12, 2023
77a01cd
First version without cookie consent
louismaximepiton Jun 12, 2023
81cc582
Implement tarteaucitron inside download app page
louismaximepiton Jun 15, 2023
2461596
.
louismaximepiton Jun 15, 2023
1adecec
fix(review)
louismaximepiton Jun 22, 2023
3432959
Merge branch 'main' into main-lmp-download-example
julien-deramond Jun 26, 2023
e9d9255
Reorder alphabetically NOTICE.txt
julien-deramond Jun 26, 2023
5eeaf6a
fix(review)
louismaximepiton Jun 26, 2023
fb1a2e4
Merge branch 'main' into main-lmp-download-example
julien-deramond Jun 28, 2023
8eecc4a
add some more informations about url that need to be used
louismaximepiton Jun 28, 2023
e63049d
fix(review)
louismaximepiton Jul 11, 2023
b08f3e2
Merge branch 'main' into main-lmp-download-example
louismaximepiton Jul 11, 2023
0cd4e05
fix(review)
louismaximepiton Jul 12, 2023
06de54a
Merge branch 'main' into main-lmp-download-example
julien-deramond Jul 18, 2023
02cd44f
.
julien-deramond Jul 18, 2023
cd2b7e8
Split docs.css
julien-deramond Jul 18, 2023
ff4f1ff
Fix logo alt
julien-deramond Jul 18, 2023
934ad95
Enhance carousel aria labels
julien-deramond Jul 18, 2023
ae63096
.
julien-deramond Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build/vnu-jar.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
'An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.',
// Boosted mod: `role="img"` is needed for `<img "src=.svg" alt="">`
'The “img” role is unnecessary for element “img”.',
'.*Consider using the “h1” element as a top-level heading only.*'
'.*Consider using the “h1” element as a top-level heading only.*',
// Boosted mod: use of tarteaucitron template for mastermedia videos.
'Attribute “videoid” not allowed on element “div” at this point.',
'Attribute “classlist” not allowed on element “div” at this point.'
].join('|')

const args = [
Expand Down
4 changes: 4 additions & 0 deletions site/assets/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
const html = document.querySelector('html')
const btt = document.querySelector('.back-to-top')

if (!btt) {
return
}

// 100(px) comes from:
// - 40px of back-to-top component
// - 40px of navbar-minimized
Expand Down
25 changes: 23 additions & 2 deletions site/assets/js/tac.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,27 @@
const toggle = document
.createRange()
.createContextualFragment(
`<div class="form-check form-switch my-2 my-lg-0"><input class="form-check-input ms-0" type="checkbox" id="googletagmanagerAllowed" aria-describedby="tacCLgoogletagmanager" onchange="${choiceEvent}"${((document.cookie.match(/^(?:.*;)?\s*cookie-consent\s*=\s*([^;]+)(?:.*)?$/) || [null])[1] === '!googletagmanager=true' ? 'checked' : '')}><label class="form-check-label visually-hidden" for="googletagmanagerAllowed">Google Tag Manager</label><input id="googletagmanagerDenied" class="d-none"></div>`
`<div class="form-check form-switch my-2 my-lg-0"><input class="form-check-input ms-0" type="checkbox" id="googletagmanagerAllowed" aria-describedby="tacCLgoogletagmanager" onchange="${choiceEvent}"${((document.cookie.match(/^(?:.*;)?\s*cookie-consent\s*=\s*([^;]+)(?:.*)?$/) || [null])[1].match('!googletagmanager=true') ? 'checked' : '')}><label class="form-check-label visually-hidden" for="googletagmanagerAllowed">Google Tag Manager</label><input id="googletagmanagerDenied" class="d-none"></div>`
)
ask.innerHTML = ''
ask.append(toggle)
ask.classList.add('mb-3')
},
{ once: true }
)

document.addEventListener(
'mastermedia_added',
() => {
const ask = document.querySelector(
'#mastermediaLine .tarteaucitronAsk'
)
const choiceEvent =
'tarteaucitron.userInterface.respond(document.getElementById(\'mastermediaAllowed\'),document.getElementById(\'mastermediaAllowed\').checked);'
const toggle = document
.createRange()
.createContextualFragment(
`<div class="form-check form-switch my-2 my-lg-0"><input class="form-check-input ms-0" type="checkbox" id="mastermediaAllowed" aria-describedby="tacCLmastermedia" onchange="${choiceEvent}"${((document.cookie.match(/^(?:.*;)?\s*cookie-consent\s*=\s*([^;]+)(?:.*)?$/) || [null])[1].match('!mastermedia=true') ? 'checked' : '')}><label class="form-check-label visually-hidden" for="mastermediaAllowed">Google Tag Manager</label><input id="mastermediaDenied" class="d-none"></div>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Google Tag Manager" should prolly be changed

)
ask.innerHTML = ''
ask.append(toggle)
Expand All @@ -98,7 +118,8 @@ if (typeof tarteaucitron !== 'undefined') {
})

tarteaucitron.user.googletagmanagerId = 'GTM-P6H78BQ';
(tarteaucitron.job = tarteaucitron.job || []).push('googletagmanager')
(tarteaucitron.job = tarteaucitron.job || []).push('googletagmanager');
(tarteaucitron.job = tarteaucitron.job || []).push('mastermedia')
dataLayer = [{
site_name: 'accessibility-boosted',
phase: 'prod',
Expand Down
254 changes: 254 additions & 0 deletions site/content/docs/5.3/examples/download-app/download-app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
.btn-secondary {
julien-deramond marked this conversation as resolved.
Show resolved Hide resolved
background-color: transparent;
}

.border-translucent {
--bs-border-color: var(--bs-border-color-translucent);
}

@media (max-width: 479.98px) {
h3,
.h3 {
font-size: 1.125rem;
line-height: 1.111111;
letter-spacing: -.0125rem;
}
}

.icons-sm {
width: 2.5rem;
height: 2.5rem;
}

.icons-md {
width: 3.125rem;
height: 3.125rem;
}

.icons-lg {
width: 4.375rem;
height: 4.375rem;
}

@media (min-width: 768px) {
.icons-sm {
width: 3.125rem;
height: 3.125rem;
}

.icons-md {
width: 3.75rem;
height: 3.75rem;
}

.icons-lg {
width: 6.25rem;
height: 6.25rem;
}
}

.out-of-grid {
position: static;
}

.out-of-grid img {
width: 100%;
min-width: 100%;
min-height: 165px;
}

@media (min-width: 1024px) {
.out-of-grid {
position: absolute;
}

.out-of-grid img {
width: auto;
}
}

[data-bs-theme="light"] .dark-show {
display: none;
}

[data-bs-theme="dark"] .dark-show + * {
display: none;
}

iframe,
.mastermedia-player {
min-height: 10.625rem;
}

footer .nav-link:hover {
text-decoration: underline;
}

.images img {
border-radius: 12% / 5%;
box-shadow: 10px 15px 50px -5px rgba(var(--bs-link-color-rgb), .2);
transition: transform .3s ease-in-out;
transform-origin: center;
}

@media (min-width: 768px) {
.images.active > :hover img {
transform: scale(1.2);
}
}

@media (prefers-reduced-motion) {
.images.active > :hover img {
transform: none;
}
}

@media (min-width: 768px) {
.images > .col {
transform: translateY(-50px);
}

.images.active > .col {
animation: enter .75s 4 alternate, enter-smooth 1.25s 1 forwards ease-in-out;
}
}

@media (prefers-reduced-motion) {
.images > .col {
transform: none;
}

.images.active > .col {
animation: none;
}
}

@keyframes enter {
0% {
transform: translateY(-50px);
animation-timing-function: cubic-bezier(.5, 0, 1, .5);
}
100% {
transform: translateY(0);
animation-timing-function: cubic-bezier(0, .5, .5, 1);
}
}

@keyframes enter-smooth {
0% {
transform: translateY(-50px);
}
100% {
transform: translateY(0);
}
}

.images.active > :nth-child(1) {
animation-delay: 0ms, 3000ms;
}

.images.active > :nth-child(2) {
animation-delay: 100ms, 3100ms;
}

.images.active > :nth-child(3) {
animation-delay: 200ms, 3200ms;
}

.images.active > :nth-child(4) {
animation-delay: 300ms, 3300ms;
}

.images.active > :nth-child(5) {
animation-delay: 400ms, 3400ms;
}

.images.active > :nth-child(6) {
animation-delay: 500ms, 3500ms;
}

.ticks > li {
opacity: 0;
}

.ticks.active > li {
animation: enter-start-smooth .75s 1 forwards ease-in-out;
}

@media (prefers-reduced-motion) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw this article: https://nicolas-hoizey.com/articles/2023/04/07/running-css-animations-only-if-both-the-device-and-the-user-allow-it/

I think it could be a good way to improve a11y and general performance. Should we give it a try?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we could but I don't think that we should do it in v5 due to the lack of support ? Or maybe if we introduce the actual as fallback ?

https://caniuse.com/mdn-css_at-rules_media_update

Copy link
Contributor

@MewenLeHo MewenLeHo Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it may be too soon to use it. I think we can wait for a better support but it will be a really interesting feature soon...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll create a feature request once this PR is merged.

.ticks > li {
opacity: 1;
}

.ticks.active > li {
animation: none;
}
}

@keyframes enter-start-smooth {
0% {
opacity: 0;
transform: translateX(-100px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}

.ticks.active > :nth-child(2) {
animation-delay: 250ms;
}

.ticks.active > :nth-child(3) {
animation-delay: 500ms;
}

.ticks.active > :nth-child(4) {
animation-delay: 750ms;
}

.ticks.active > :nth-child(5) {
animation-delay: 1000ms;
}

.ticks.active > :nth-child(6) {
animation-delay: 1250ms;
}

.steps > * {
opacity: 0;
}

.steps.active > * {
animation: enter-bottom-smooth .75s 1 forwards ease-in-out;
}

@media (prefers-reduced-motion) {
.steps > * {
opacity: 1;
}

.steps.active > * {
animation: none;
}
}

@keyframes enter-bottom-smooth {
0% {
opacity: 0;
transform: translateY(75px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}

.steps.active > :nth-child(2) {
animation-delay: .75s;
}

.steps.active > :nth-child(3) {
animation-delay: 2s;
}
37 changes: 37 additions & 0 deletions site/content/docs/5.3/examples/download-app/download-app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* global boosted: false */

(() => {
'use strict'

// For a proper redirection on the different stores, please copy paste the code below and adapt the links.

// if (!(/windows phone/i.test(navigator.userAgent)) && /android/i.test(navigator.userAgent)) {
// window.location.href = 'https://play.google.com/apps/testing/com.orange.ods.app/'
// }

if (/ipad|iphone|ipod/i.test(navigator.userAgent)) {
window.location.href = 'itms-apps://apps.apple.com/fr/app/id6446178285'
}

// End of copy paste
// We use `itms-apps` instead of `https` for phones. (https://stackoverflow.com/a/2337601)

const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('active')
}
})
})

observer.observe(document.querySelector('.images.row'))
observer.observe(document.querySelector('.ticks'))
observer.observe(document.querySelector('.steps#ios-steps'))
observer.observe(document.querySelector('.steps#android-steps'))

// Instantiate the carousel
document.querySelectorAll('.carousel:not([data-bs-ride="carousel"])')
.forEach(carousel => {
boosted.Carousel.getOrCreateInstance(carousel)
})
})()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
julien-deramond marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading