Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
[To Stage] Template v2 fixes (#916)
Browse files Browse the repository at this point in the history
* update templatelist-horizontal + browse-by-cat max-width

* bro-by-cat css

* searchMar show by default

* breadcrumbs handle missing shortTitle

---------

Co-authored-by: Jingle Huang <[email protected]>
  • Loading branch information
JingleH and JingleH authored Jun 23, 2023
1 parent a682e9d commit 731881c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
11 changes: 7 additions & 4 deletions express/blocks/browse-by-category/browse-by-category.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,16 @@ main .browse-by-category-wrapper.fullwidth {
}

@media (min-width: 900px) {
main .browse-by-category-wrapper .browse-by-category {
main .section .browse-by-category-wrapper {
padding: 0 28px;
}

main .section .browse-by-category-wrapper {
max-width: none;
}
}

main .browse-by-category .browse-by-category-heading-section {
flex-direction: row;
padding: 0;
flex-direction: row;
padding: 0;
}
}
7 changes: 6 additions & 1 deletion express/blocks/template-list/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ function getCrumbsForSearch(templatesUrl, allTemplatesMetadata, taskCategories)
if (!tasks && !topics) {
return crumbs;
}
const shortTitle = getMetadata('short-title');
if (!shortTitle) {
return crumbs;
}

const lastCrumb = createTag('li');
lastCrumb.textContent = getMetadata('short-title');
lastCrumb.textContent = shortTitle;
crumbs.push(lastCrumb);
if (!tasks || !topics) {
return crumbs;
Expand Down
2 changes: 1 addition & 1 deletion express/blocks/template-list/template-list.css
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ main .template-list-fullwidth-apipowered-container nav ol.templates-breadcrumbs
main .template-list.horizontal .carousel-container {
margin-left: auto;
margin-right: auto;
max-width: 470px;
max-width: none;
display: block;
}

Expand Down
3 changes: 2 additions & 1 deletion express/scripts/ckg-link-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ function hideAsyncBlocks() {
(async function updateAsyncBlocks() {
hideAsyncBlocks();
// TODO: integrate memoization
if (document.body.dataset.device === 'desktop' && ['yes', 'true', 'on', 'Y'].includes(getMetadata('show-search-marquee-link-list'))) {
const showSearchMarqueeLinkList = getMetadata('show-search-marquee-link-list');
if (document.body.dataset.device === 'desktop' && (!showSearchMarqueeLinkList || ['yes', 'true', 'on', 'Y'].includes(showSearchMarqueeLinkList))) {
await lazyLoadSearchMarqueeLinklist();
}
await lazyLoadLinklist();
Expand Down

0 comments on commit 731881c

Please sign in to comment.