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

Feature/customerquotes #54

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
74 changes: 74 additions & 0 deletions blocks/customerquote/customerquote.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* customer quotes css */

.quote-box {
background: #f5f5f5;
padding: 30px;
padding-bottom: 15px;
border-radius: 4px;
background-clip: padding-box;
position: relative;
margin-bottom: 30px;
}

.quote-box::after {
content: "";
display: block;
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #f5f5f5;
position: absolute;
bottom: -20px;
margin-left: -20px;
left: 50%;
}

.quote {
border: 0;
padding: 0;
font-size: 16px;
color: #666;
margin: 0;
}

.details {
font-size: 13px;
}

.name {
display: block;
font-weight: normal;
font-family: Montserrat, sans-serif;
}

.quote-box .title {
display: block;
color: #b3b3b3;
margin-bottom: 0;
font-weight: normal;
font-size: 13px;
}

.quote-box .fa {
font-size: 18px;
position: absolute;
right: 30px;
bottom: 30px;
}

.img-rounded {
border-radius: 6px;
}

.testimonial-headshot {
text-align: center;
}

.testimonial-headshot img {
border-radius: 50%;
max-width: 150px !important;
max-height: 150px !important;
margin-top: -10px;
border: 5px solid #f5f5f5;
}
48 changes: 48 additions & 0 deletions blocks/customerquote/customerquote.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
export default function decorate(block) {
const clonedBlock = block.cloneNode(true);
// const sidebarDiv = document.createElement('div');
// sidebarDiv.setAttribute('id', 'sidebar');
const pictureElement = clonedBlock.querySelector('picture');
const moduleDiv = document.createElement('div');
moduleDiv.classList.add('hs_cos_wrapper', 'hs_cos_wrapper_widget', 'hs_cos_wrapper_type_module', 'module-1');
moduleDiv.setAttribute('data-hs-cos-type', 'module');
moduleDiv.setAttribute('data-hs-cos-general-type', 'widget');
moduleDiv.setAttribute('id', clonedBlock.querySelector('h2').textContent.split(' ')[1]);
const quoteboxDiv = document.createElement('div');
quoteboxDiv.classList.add('quote-box');
const blockquoteDiv = document.createElement('blockquote');
blockquoteDiv.classList.add('quote');
blockquoteDiv.textContent = clonedBlock.querySelector('blockquote > p').textContent;
quoteboxDiv.append(blockquoteDiv);
const para = document.createElement('p');
para.classList.add('details');
const spanInside = document.createElement('span');
spanInside.classList.add('name');
spanInside.textContent = clonedBlock.querySelector('blockquote + p').textContent;
para.append(spanInside);
const spanTitle = document.createElement('span');
spanTitle.classList.add('title');
spanTitle.textContent = clonedBlock.querySelector('blockquote + p + p').textContent;
para.append(spanTitle);
quoteboxDiv.append(para);
const spanIconWrapper = document.createElement('span');
spanIconWrapper.classList.add('accentColor1', 'fa');
const spanIcon = document.createElement('i');
spanIcon.classList.add('fa', 'fa-quote-right');
spanIconWrapper.append(spanIcon);
quoteboxDiv.append(spanIconWrapper);
const imageWrapper = document.createElement('div');
imageWrapper.classList.add('testimonial-headshot', 'text-center');
const image = document.createElement('img');
image.setAttribute('width', 279);
image.setAttribute('height', 325);
image.setAttribute('alt', 'Starter Culture Graphic');
image.setAttribute('src', `${pictureElement.querySelector('img').src}`);
imageWrapper.append(image);
moduleDiv.append(quoteboxDiv);
moduleDiv.append(imageWrapper);
// sidebarDiv.append(moduleDiv);
block.textContent = '';
block.append(moduleDiv);
// block.append(sidebarDiv);
}
2 changes: 1 addition & 1 deletion blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
.footer-wrapper div#footer-orange .outer{
grid-template-columns: 1fr;
}

.footer-wrapper div#footer-orange .outer .social-icons{
display: flex;
justify-content: flex-end;
Expand Down
3 changes: 2 additions & 1 deletion head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<link rel="stylesheet" href="/styles/Typo.css"/>
<link rel="stylesheet" href="/styles/template.css"/>
<link rel="stylesheet" href="/styles/responsive.css"/>
<link rel="stylesheet" href="/styles/gcse.css"/>
<link rel="stylesheet" href="/styles/gcse.css"/>
<link rel="stylesheet" href="/styles/styles_2020.css"/>