x
x
x
x
Only portrait mode is currently supported - please rotate your device.
HTML | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
<style>
/* REMOVE EXTRA SPACE AT TOP */
#main-content p:first-child {
display: none;
}
#main-content p:nth-child(3) {
display: none;
}
/* BANNER */
div.banner {
height: 368px;
background: url('https://passport-media.s3-us-west-1.amazonaws.com/Morgan+Stanley/msResourcesBanner.jpg');
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover;
}
div.titleSection {
margin: 90px 80px;
flex-direction: column;
}
.titleSection .custom-title {
font-family: 'MS Gloria II Std';
color: #ffffff;
font-size: 60px;
}
button.tab-control-button {
width: 155px;
height: 54px;
margin: 0 12px 0 0;
border-radius: 8px;
border: solid 2px rgba(255, 255, 255, 0.75);
background: transparent;
font-family: Karla;
font-size: 16px;
font-weight: bold;
color: #ffffff;
outline: none;
}
button.tab-control-button:hover {
cursor: pointer;
}
</style> | ||||||||||
Custom section | ||||||||||
| ||||||||||
Custom section | ||||||||||
|
Custom title | ||
---|---|---|
|
group | morganstanley-admins |
---|
Custom button container | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
<link rel="stylesheet" href="https://gsvlabs-confluence-files.s3-us-west-2.amazonaws.com/stylesheets/MorganStanley/msresources.css?v=84"> |
Custom section | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||
|
Content Layout Macro |
---|
HTML |
---|
<div class="content">
<div class="cards-section">
<div id="category-cards" class="horizontal-cards">
</div>
</div>
</div>
<script>
const categories = [
{
title: "Finance & Accounting",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Finance+%26+Operations.jpeg",
redirect: "/display/MSRES/Finance+and+Accounting"
},
{
title: "Fundraising & Capital Markets",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Fundraising.jpeg",
redirect: "/display/MSRES/Fundraising+and+Capital+Markets"
}, {
title: "Industry Research & Whitepapers",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/IndustryResearchAndWhitepapers.jpg",
redirect: "/display/MSRES/Industry+Research+and+Whitepapers"
}, {
title: "Leadership & Management",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Leadership.jpeg",
redirect: "/display/MSRES/Leadership+and+Management"
}, {
title: "Legal",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Legal.jpeg",
redirect: "/display/MSRES/Legal"
}, {
title: "Podcasts & Digital Media",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Podcasts%26DigitalMedia.jpg",
redirect: "/display/MSRES/Podcast+and+Digital+Media"
}, {
title: "PR & Communications",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Marketing+%26+PR.jpg",
redirect: "/display/MSRES/PR+and+Communications"
}, {
title: "Sales & Marketing",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Sales+%26+Customer+Acquisition.jpeg",
redirect: "/display/MSRES/Sales+and+Marketing"
}, {
title: "Talent Management",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/Talent+%26+HR.jpeg",
redirect: "/display/MSRES/Talent+Management"
}, {
title: "Technology & Product Development",
imgSrc: "https://gsvlabs-confluence-files.s3.us-west-2.amazonaws.com/images/MStanley/resourcePlaceholders/TechAndProductDev.jpg",
redirect: "/display/MSRES/Technology+and+Product+Development"
}
]
// renders the profile cards
async function renderCards(cards, tab) {
let cardsDiv = document.getElementById('category-cards')
cardsDiv.innerHTML = "";
let cardsArray = []
if (cards.length) {
let promiseArr = Object.values(cards).map((card) => createProfileHTML(card, tab));
cardsArray = await Promise.all(promiseArr) // wait for array of promises to resolve
} else {
cardsArray.push(`<p class="not-available">Not Available!</p>`);
}
cardsDiv.insertAdjacentHTML('beforeend', cardsArray.join(""));
}
// create html for the profile cards
async function createProfileHTML(card, tab) {
const { title, imgSrc, redirect } = card;
let myPromise = new Promise(async (resolve, reject) => {
try {
const profileHTML = `
<a class="custom-card-link-styling" onclick="handleCardClick('${title}','${redirect}')">
<div class="card" style="background-image: url(${imgSrc});">
<div class="body">
<p class="name"> ${title}</p>
</div>
</div>
</a>`
resolve(profileHTML);
} catch (error) {
throw (error);
reject()
}
});
return await myPromise;
}
function handleCardClick(title, redirect) {
window.location.href = redirect;
}
renderCards(categories);
</script>
|
...
OneValley