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

[MWPW-143407] Search Marquee And Content Replace #7

Merged
merged 38 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
048a4a2
Create sampleRUM.js
echen-adobe Mar 27, 2024
483766d
init
echen-adobe Mar 27, 2024
a767fd9
implemented content replace in milo
echen-adobe Mar 27, 2024
966f62d
Update content-replace.js
echen-adobe Mar 27, 2024
5a836c2
Added depreciated button decorator
echen-adobe Mar 27, 2024
661e37f
removed unneeded changes
echen-adobe Mar 27, 2024
d586acd
Delete template-x.js
echen-adobe Mar 27, 2024
a0ef2ab
Changes for PR
echen-adobe Apr 1, 2024
d42356c
Delete free-plan.js
echen-adobe Apr 1, 2024
7432d07
Update scripts.js
echen-adobe Apr 1, 2024
99369a8
Update search-marquee.js
echen-adobe Apr 1, 2024
3021c55
Update search-marquee.js
echen-adobe Apr 1, 2024
a802a03
Update icons.js
echen-adobe Apr 1, 2024
5afbb0a
moved autocomplete api
echen-adobe Apr 1, 2024
352cb09
Update search-marquee.js
echen-adobe Apr 1, 2024
dfc18e8
Update search-marquee.js
echen-adobe Apr 2, 2024
8fe31d8
lint
echen-adobe Apr 2, 2024
958797e
Update scripts.js
echen-adobe Apr 2, 2024
f3a6150
Update scripts.js
echen-adobe Apr 2, 2024
651e92d
Merge branch 'main' into search-marquee
echen-adobe Apr 2, 2024
b18e758
Update search-marquee.js
echen-adobe Apr 2, 2024
331e7b7
Merge branch 'main' into search-marquee
echen-adobe Apr 3, 2024
259f847
Moved autoUpdate to decorateArea
echen-adobe Apr 3, 2024
c31f062
removed unneeded newlines
echen-adobe Apr 3, 2024
d12e940
added local metadata
echen-adobe Apr 5, 2024
d5b30d2
Update search-marquee.js
echen-adobe Apr 5, 2024
6355a2d
Update search-marquee.js
echen-adobe Apr 5, 2024
eed6e35
call only necessary code from content-replace
vhargrave Apr 8, 2024
f962a5e
MWPW-141847 add old icons so old blocks don't break
vhargrave Apr 9, 2024
dc6f834
Merge branch 'icons' into search-marquee
vhargrave Apr 9, 2024
a34c8b2
update search marquee
vhargrave Apr 9, 2024
2db0b4e
Update search-marquee.css
echen-adobe Apr 22, 2024
b3820d7
made CSS more specific
echen-adobe Apr 22, 2024
2dec089
Merge branch 'main' into search-marquee
echen-adobe Apr 22, 2024
7e02bbb
Update decorate.js
echen-adobe Apr 22, 2024
a3633b3
Update search-marquee.css
echen-adobe Apr 22, 2024
660e70f
Update template-list.js
echen-adobe Apr 23, 2024
ca2e3b3
Update template-list.js
echen-adobe Apr 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions express/blocks/ax-columns/ax-columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
transformLinkToAnimation,
} from '../../scripts/utils/media.js';

import { getIconElement } from '../../scripts/utils/icons.js';
import { getIconElementDeprecated } from '../../scripts/utils/icons.js';
import { addHeaderSizing } from '../../scripts/utils/location-utils.js';
import { addTempWrapperDeprecated } from '../../scripts/utils/decorate.js';
import { addFreePlanWidget } from '../../scripts/widgets/free-plan.js';
Expand Down Expand Up @@ -41,7 +41,7 @@ function transformToVideoColumn(cell, aTag, block) {
const sibling = parent.querySelector('.column-picture');
if (sibling && block.classList.contains('highlight')) {
const videoOverlay = createTag('div', { class: 'column-video-overlay' });
const videoOverlayIcon = getIconElement('play', 44);
const videoOverlayIcon = getIconElementDeprecated('play', 44);
videoOverlay.append(videoOverlayIcon);
sibling.append(videoOverlay);
}
Expand Down
22 changes: 11 additions & 11 deletions express/blocks/ratings/ratings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getLibs, getLottie, lazyLoadLottiePlayer, toClassName } from '../../scripts/utils.js';
import { getIcon, getIconElement } from '../../scripts/utils/icons.js';
import { getIconDeprecated, getIconElementDeprecated } from '../../scripts/utils/icons.js';
import BlockMediator from '../../scripts/block-mediator.min.js';
import { decorateButtonsDeprecated } from '../../scripts/utils/decorate.js';

Expand Down Expand Up @@ -28,27 +28,27 @@ export default async function decorate(block) {
const ratings = [
{
class: 'one-star',
img: getIconElement('emoji-angry-face'),
img: getIconElementDeprecated('emoji-angry-face'),
feedbackRequired: true,
},
{
class: 'two-stars',
img: getIconElement('emoji-thinking-face'),
img: getIconElementDeprecated('emoji-thinking-face'),
feedbackRequired: true,
},
{
class: 'three-stars',
img: getIconElement('emoji-upside-down-face'),
img: getIconElementDeprecated('emoji-upside-down-face'),
feedbackRequired: true,
},
{
class: 'four-stars',
img: getIconElement('emoji-smiling-face'),
img: getIconElementDeprecated('emoji-smiling-face'),
feedbackRequired: false,
},
{
class: 'five-stars',
img: getIconElement('emoji-star-struck'),
img: getIconElementDeprecated('emoji-star-struck'),
feedbackRequired: false,
},
];
Expand Down Expand Up @@ -336,9 +336,9 @@ export default async function decorate(block) {

// Gets the current rating and returns star span element.
function getCurrentRatingStars() {
const star = getIcon('star');
const starHalf = getIcon('star-half');
const starEmpty = getIcon('star-empty');
const star = getIconDeprecated('star');
const starHalf = getIconDeprecated('star-half');
const starEmpty = getIconDeprecated('star-empty');
const stars = createTag('span', { class: 'rating-stars' });
let rating = ratingAverage ?? 5;
rating = Math.round(rating * 10) / 10; // round nearest decimal point
Expand Down Expand Up @@ -400,13 +400,13 @@ export default async function decorate(block) {
<div>
<span class="tooltip--text"></span>
<div class="tooltip--image">
${getIcon('emoji-star-struck')}
${getIconDeprecated('emoji-star-struck')}
<div>
</div>
</div>
`,
);
const star = getIcon('star');
const star = getIconDeprecated('star');
form.insertAdjacentHTML(
'beforeend',
/* html */ `
Expand Down
261 changes: 261 additions & 0 deletions express/blocks/search-marquee/search-marquee.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
main .section .search-marquee-wrapper {
max-width: none;
}

main .search-marquee-wrapper > .backgroundimg, main .search-marquee > .backgroundimg {
object-fit: cover;
min-width: 100%;
max-height: 100%;
min-height: 100%;
position: absolute;
left: 0px;
z-index: -1;
}

main .search-marquee {
padding: 32px 28px;
margin-bottom: 24px;
background-position: center;
background-size: cover;
display: flex;
flex-direction: column;
align-items: center;
}

main .search-marquee > div:first-of-type h1 {
font-size: var(--heading-font-size-l);
}

main .search-marquee > div:first-of-type p {
font-size: var(--body-font-size-m);
max-width: 640px;
}

main .search-marquee .search-marquee-bg {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
object-fit: cover;
z-index: 0;
}

main .search-marquee .search-dropdown-container {
background: #FFFFFF;
top: calc(100% + 6px);
border-radius: 12px;
box-shadow: 0 0 20px #00000029;
position: absolute;
width: 100%;
box-sizing: border-box;
left: 0;
z-index: 3;
}

main .search-marquee .search-dropdown-container .dropdown-title {
margin: 0;
font-size: var(--body-font-size-s);
color: var(--color-gray-500);
}

main .search-marquee .search-dropdown-container .trends-container,
main .search-marquee .search-dropdown-container .suggestions-container {
padding: 20px 28px 0;
text-align: left;
}

main .search-marquee .search-dropdown-container .trends-container .from-scratch-link {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
}

main .search-marquee .search-dropdown-container .trends-container ul {
padding-left: 0;
list-style: none;
max-height: 216px;
overflow: auto;
}

main .search-marquee .search-dropdown-container .suggestions-container ul {
padding-left: 0;
list-style: none;
max-height: 164px;
overflow: auto;
margin: 0 0 16px -8px;
}

main .search-marquee .search-dropdown-container .trends-container .trends-wrapper li,
main .search-marquee .search-dropdown-container .suggestions-container li {
margin-bottom: 10px;
}

main .search-marquee .search-dropdown-container .suggestions-container li {
cursor: pointer;
margin: 0 8px 0 0;
padding: 8px;
}

main .search-marquee .search-dropdown-container .suggestions-container li:hover,
main .search-marquee .search-dropdown-container .suggestions-container li:focus-visible {
background: var(--color-gray-200);
outline: none;
border-radius: 8px;
}

main .search-marquee .search-dropdown-container .trends-container .trends-wrapper {
margin : 10px 0 10px 0;
}

main .search-marquee .search-dropdown-container .trends-container .trends-wrapper li a {
color: var(--color-black);
}

main .search-marquee .search-dropdown-container .free-plans-container .free-plan-widget {
width: 100%;
border-radius: 0 0 12px 12px;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
gap: 10px;
margin: 0;
justify-content: center;
}

main .search-marquee .search-dropdown-container .free-plans-container .free-plan-widget .plan-widget-tag {
font-size: var(--body-font-size-s);
}

main .search-marquee .search-bar-wrapper {
position: relative;
width: 100%;
max-width: 560px;
margin: 0 28px;
height: max-content;
transition: max-width 0.5s;
}

main .search-marquee .search-bar-wrapper .search-bar {
scroll-margin: 65px;
box-sizing: border-box;
margin: 0;
font-family: var(--body-font-family);
font-weight: 400;
font-size: var(--body-font-size-m);
padding: 10px 40px;
border: var(--color-gray-200) 2px solid;
border-radius: 100px;
max-width: 560px;
width: 100%;
height: 41px;
transition: max-width 0.5s, padding-right 0.5s, padding-left 0.5s;
}

main .search-marquee .search-bar-wrapper .search-bar::placeholder {
transition: color 0.5s;
}

main .search-marquee .search-bar-wrapper .search-bar:focus-visible,
main .search-marquee .search-bar-wrapper .search-bar:focus {
border: #444444 2px solid;
outline: none;
}

main .search-marquee .search-bar-wrapper .icon.icon-search {
position: absolute;
z-index: 1;
height: 16px;
width: 16px;
cursor: pointer;
top: 50%;
transform: translateY(-50%);
transition: left 0.5s;
left: 16px;
}

main .search-marquee .search-bar-wrapper .icon.icon-search-clear {
position: absolute;
z-index: 1;
height: 16px;
width: 16px;
cursor: pointer;
top: 50%;
transform: translateY(-50%);
right: 40px;
}

main .search-marquee .carousel-container {
margin-top: 32px;
margin-bottom: 0;
}

main .search-marquee.spreadsheet-powered .carousel-container {
visibility: hidden;
}

main .search-marquee.spreadsheet-powered .carousel-container.appear {
visibility: unset;
}

main .search-marquee .carousel-container .carousel-platform {
margin: auto;
}

main .search-marquee .carousel-container .carousel-platform p.button-container {
margin: 0;
border: none;
}

main .search-marquee .carousel-container .carousel-platform a {
display: block;
box-sizing: border-box;
min-width: 160px;
min-height: 48px;
padding: 14px 27px;
color: var(--color-black);
font-size: var(--body-font-size-m);
line-height: 20px;
background: var(--color-white);
border-radius: 50px;
margin: 0 4px;
border: none;
}

main .search-marquee .carousel-container .carousel-platform a:hover {
background-color: var(--color-gray-200);
}

main .search-marquee .hidden {
display: none;
}

main .search-marquee #hero-title {
margin : 0;
text-align: center;
}

main .search-marquee #hero-title + p{
margin : 32px 0 32px 0;
text-align: center;
}

@media (min-width: 900px) {
main .search-marquee > div:first-of-type h1 {
font-size: var(--heading-font-size-xl);
}

main .search-marquee > div:first-of-type p {
font-size: var(--body-font-size-l);
max-width: 900px;
}

main .search-marquee .search-dropdown-container .free-plans-container .free-plan-widget .plan-widget-tag {
font-size: var(--body-font-size-m);
}

main .search-marquee .search-dropdown-container .suggestions-container ul {
max-height: 216px;
}
}
Loading
Loading