Skip to content

Commit

Permalink
CSS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
echen-adobe committed Nov 5, 2024
1 parent 3dc9870 commit 22d790c
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 12 deletions.
46 changes: 36 additions & 10 deletions express/blocks/mobile-gating-button/mobile-gating-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,64 @@ main .mobile-gating-text {
margin: auto;
text-align: left;
flex-grow: 1;
font-weight: 400;
font-size: 16px;

}

main .mobile-gating-text, main .mobile-gating-button .floating-button .icon{
height: fit-content;
main .mobile-gating-text, main .mobile-gating-button .floating-button .mobile-gating-row .icon{
width: 22px;
height: 22px;
margin: auto;
}

main .mobile-gating-button .mobile-gating-header-row {
display: flex;
}

main .mobile-gating-button .mobile-gating-header-row .mobile-gating-exit {
border-radius: 24px;
margin-left: auto;
width: 24px;
font-size: 14px;
height: 24px;
background: var(--Palette-sx-gray-100, #E9E9E9);
}

main .mobile-gating-button .mobile-gating-header-row .mobile-gating-exit img {
position: absolute;
top: 20.5px;
right: 20.5px;
}

main .mobile-gating-button .floating-button.block {
background-color: white;
border-radius: 24px;
box-shadow: 4px 2px 4px rgba(0.3, 0, 0.3, 0.1);
border-radius: 28px;
box-shadow: 0px 0px 12px 0px #00000029;
background-color: #f8f8f8;
padding: 20px;
padding: 16px;
width: calc(100% - 10px);
margin: 5px;
display: flex;
flex-direction: column;
gap: 10px;
gap: 8px;
}

main .mobile-gating-row {
display: flex;
gap: 10px;
height: 40px;
}

main .mobile-gating-header {
font-size: 14pt;
font-weight: 600;
margin: 10px auto;
font-size: 18px;
font-weight: 700;
text-align: left;
}

main .mobile-gating-button .floating-button a.button:any-link {
border-radius: 20px;
font-size: 16px;;
width: 40%;
color: var(--color-white);
background-color: var(--color-info-accent);
Expand All @@ -49,7 +75,7 @@ main .mobile-gating-button .floating-button a.button:any-link.accent {

main .mobile-gating-button .floating-button a.button:any-link.outline {
background-color: var(--color-white);
border: 2px solid var(--color-black);
border: 2px solid var(--Border-Extra-subdued-default, #E1E1E1);
color: black;
}

Expand Down
11 changes: 9 additions & 2 deletions express/blocks/mobile-gating-button/mobile-gating-button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { addTempWrapper } from '../../scripts/decorate.js';
import {
createTag, getMetadata, getMobileOperatingSystem,
createTag, getIconElement, getMetadata, getMobileOperatingSystem,
} from '../../scripts/utils.js';

import {
Expand All @@ -20,12 +20,19 @@ function buildAction(entry, buttonType) {

function buildMobileGating(block, data) {
block.children[0].remove();
const headerRow = createTag('div', { class : 'mobile-gating-header-row'})

Check failure on line 23 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Extra space after key 'class'

Check failure on line 23 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

A space is required before '}'

Check failure on line 23 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
const header = createTag('div', {
class:
'mobile-gating-header',
});
header.textContent = data.mainCta.text;
block.append(header, buildAction(data.tools[0], 'accent'), buildAction(data.tools[1], 'outline'));
const exit = createTag('div', { class : 'mobile-gating-exit'})

Check failure on line 29 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Extra space after key 'class'

Check failure on line 29 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

A space is required before '}'

Check failure on line 29 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
exit.addEventListener('click', () => {
block.parentElement.classList.add('floating-button--hidden')

Check failure on line 31 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
})

Check failure on line 32 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
exit.append(getIconElement('close-button-x', 14))

Check failure on line 33 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
headerRow.append(header, exit)

Check failure on line 34 in express/blocks/mobile-gating-button/mobile-gating-button.js

View workflow job for this annotation

GitHub Actions / build (20.x)

Missing semicolon
block.append(headerRow, buildAction(data.tools[0], 'accent'), buildAction(data.tools[1], 'outline'));
}

export function createMultiFunctionButton(block, data, audience) {
Expand Down

0 comments on commit 22d790c

Please sign in to comment.