reformatting service cards
This commit is contained in:
+56
-28
@@ -19,8 +19,12 @@
|
|||||||
gap: 12rem;
|
gap: 12rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin-top: 12rem;
|
||||||
|
}
|
||||||
|
|
||||||
/** landings are used to jump slightly above categories */
|
/** landings are used to jump slightly above categories */
|
||||||
.landing { top: -5rem; position: relative; }
|
.landing { top: 3rem; position: relative; }
|
||||||
|
|
||||||
#categoryLinks {
|
#categoryLinks {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -63,19 +67,28 @@
|
|||||||
|
|
||||||
.serviceContainer {
|
.serviceContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
flex-wrap: wrap;
|
||||||
margin: 3rem 0;
|
margin: 3rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableOfContents {
|
#tableOfContents {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin-top: 8rem;
|
|
||||||
margin-bottom: 25vh;
|
margin-bottom: 25vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Service Card */
|
/** Services */
|
||||||
|
.service {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
width: 45%;
|
||||||
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
border: 2px solid var(--gold);
|
border: 2px solid var(--gold);
|
||||||
@@ -83,26 +96,39 @@
|
|||||||
|
|
||||||
transition: 0.5s ease;
|
transition: 0.5s ease;
|
||||||
color: white;
|
color: white;
|
||||||
width: 30%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.card:hover {
|
.card:hover {
|
||||||
border: 2px solid white;
|
border: 2px solid white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-head {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body span {
|
/** .card-body span {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
}*/
|
||||||
|
.card-body span {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-self: stretch;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
.card-body span h3 {
|
.card-body span h3 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -189,14 +215,13 @@
|
|||||||
<div id="categoryLinks">
|
<div id="categoryLinks">
|
||||||
<a href="#packagesJump" class="jumpLink"><h2>Service Packages</h2></a>
|
<a href="#packagesJump" class="jumpLink"><h2>Service Packages</h2></a>
|
||||||
<a href="#ceramicJump" class="jumpLink"><h2>Ceramic Coating</h2></a>
|
<a href="#ceramicJump" class="jumpLink"><h2>Ceramic Coating</h2></a>
|
||||||
<a href="paintJump" class="jumpLink"><h2>Polish &<br/>Paint Correction</h2></a>
|
<a href="#paintJump" class="jumpLink"><h2>Polish &<br/>Paint Correction</h2></a>
|
||||||
<a href="#exteriorJump" class="jumpLink"><h2>Exterior Detailing</h2></a>
|
<a href="#exteriorJump" class="jumpLink"><h2>Exterior Detailing</h2></a>
|
||||||
<a href="#interiorJump" class="jumpLink"><h2>Interior Detailing</h2></a>
|
<a href="#interiorJump" class="jumpLink"><h2>Interior Detailing</h2></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="categoryContainer">
|
<div id="categoryContainer">
|
||||||
|
|
||||||
<span id="packagesJump" class="landing"></span>
|
<span id="packagesJump" class="landing"></span>
|
||||||
<h1>Service Packages</h1>
|
<h1>Service Packages</h1>
|
||||||
<div id="packages" class="serviceContainer">
|
<div id="packages" class="serviceContainer">
|
||||||
@@ -221,10 +246,8 @@
|
|||||||
<h1>Interior Detailing</h1>
|
<h1>Interior Detailing</h1>
|
||||||
<div id="interior" class="serviceContainer">
|
<div id="interior" class="serviceContainer">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
@@ -243,9 +266,10 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="js/hamburger.js"></script>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
<script src="js/hamburger.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
// these categories must match the IDs of the serviceContainer <div>s above
|
// these categories must match the IDs of the serviceContainer <div>s above
|
||||||
const categories = ["packages", "ceramic", "paint", "exterior", "interior"];
|
const categories = ["packages", "ceramic", "paint", "exterior", "interior"];
|
||||||
const serviceData = {
|
const serviceData = {
|
||||||
@@ -343,7 +367,7 @@
|
|||||||
"bullets" : [
|
"bullets" : [
|
||||||
"Hand wash & dry",
|
"Hand wash & dry",
|
||||||
"Wheel cleaning",
|
"Wheel cleaning",
|
||||||
"1 stage paint correction on all paint & glas",
|
"1 stage paint correction on all paint & glass",
|
||||||
"Free quarterly washes",
|
"Free quarterly washes",
|
||||||
"Free annual decontamination and topper"
|
"Free annual decontamination and topper"
|
||||||
]
|
]
|
||||||
@@ -398,7 +422,7 @@
|
|||||||
},
|
},
|
||||||
"right" : {
|
"right" : {
|
||||||
"header" : "Includes",
|
"header" : "Includes",
|
||||||
"paragraph" : "Restore shine and gloss.",
|
"paragraph" : "",
|
||||||
"bullets" : [
|
"bullets" : [
|
||||||
"Exterior wash and decontaminaion",
|
"Exterior wash and decontaminaion",
|
||||||
"2-step polish to eliminate 80-85% of defects",
|
"2-step polish to eliminate 80-85% of defects",
|
||||||
@@ -467,7 +491,7 @@
|
|||||||
"header" : "Includes",
|
"header" : "Includes",
|
||||||
"paragraph" : "",
|
"paragraph" : "",
|
||||||
"bullets" : [
|
"bullets" : [
|
||||||
"Vacuum & light carpet shampooing<",
|
"Vacuum & light carpet shampooing",
|
||||||
"Plastics, leather, and vinyls cleaning",
|
"Plastics, leather, and vinyls cleaning",
|
||||||
"Light seat shampooing",
|
"Light seat shampooing",
|
||||||
"Interior & exterior window cleaning",
|
"Interior & exterior window cleaning",
|
||||||
@@ -481,29 +505,29 @@
|
|||||||
"title" : "Level Two Interior",
|
"title" : "Level Two Interior",
|
||||||
"subtitle" : "Bring back the interior you love & protect it for months.",
|
"subtitle" : "Bring back the interior you love & protect it for months.",
|
||||||
"left" : {
|
"left" : {
|
||||||
"header" : "Description",
|
|
||||||
"paragraph" : "A thorough restoration of your car's interior.",
|
|
||||||
"bullets" : []
|
|
||||||
},
|
|
||||||
"right" : {
|
|
||||||
"header" : "Includes",
|
"header" : "Includes",
|
||||||
"paragraph" : "",
|
"paragraph" : "",
|
||||||
"bullets" : [
|
"bullets" : [
|
||||||
"Vacuum & carpet shampooing<",
|
|
||||||
"Plastics, leather, and vinyls scrubbed",
|
|
||||||
"Leather conditioning for protection and suppleness",
|
|
||||||
"Upholstery shampooing",
|
"Upholstery shampooing",
|
||||||
"Crack & crevice cleaning",
|
"Crack & crevice cleaning",
|
||||||
"6 month interior protection (Spills, UV, less dust, less cleaning, and plastic rejuvenation)"
|
"6 month interior protection (Spills, UV, less dust, less cleaning, and plastic rejuvenation)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"right" : {
|
||||||
|
"header" : "and",
|
||||||
|
"paragraph" : "",
|
||||||
|
"bullets" : [
|
||||||
|
"Vacuum & carpet shampooing",
|
||||||
|
"Plastics, leather, and vinyls scrubbed",
|
||||||
|
"Leather conditioning for protection and suppleness",
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
"url" : "https://app.urable.com/virtual-shop/IQlYjZyF1i2XilEiEKB5/yT4vtoWKB5qGaQMaxOdd?productServiceId=bc8YSJd6fl0CprnAY43r&sku=iUA7y7dwM4Kz51pBpQNI"
|
"url" : "https://app.urable.com/virtual-shop/IQlYjZyF1i2XilEiEKB5/yT4vtoWKB5qGaQMaxOdd?productServiceId=bc8YSJd6fl0CprnAY43r&sku=iUA7y7dwM4Kz51pBpQNI"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function insertServices(serviceData) {
|
function insertServices(serviceData) {
|
||||||
for (const category of categories) {
|
for (const category of categories) {
|
||||||
let categoryData = serviceData[category];
|
let categoryData = serviceData[category];
|
||||||
@@ -518,6 +542,7 @@
|
|||||||
target.insertAdjacentHTML(
|
target.insertAdjacentHTML(
|
||||||
"beforeend",
|
"beforeend",
|
||||||
`
|
`
|
||||||
|
<div class="service">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-head">
|
<div class="card-head">
|
||||||
<h2>${service.title}</h2>
|
<h2>${service.title}</h2>
|
||||||
@@ -528,6 +553,9 @@
|
|||||||
${rightSide ? rightSide : ""}
|
${rightSide ? rightSide : ""}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button>book</button>
|
||||||
|
</div>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -536,12 +564,12 @@
|
|||||||
function buildCardColumn(data) {
|
function buildCardColumn(data) {
|
||||||
let html = "<span>";
|
let html = "<span>";
|
||||||
if (data.header) {
|
if (data.header) {
|
||||||
html += "<h3>" + data.header + "</h3>";
|
html += "<h3 style='text-align:left;'>" + data.header + "</h3>";
|
||||||
}
|
}
|
||||||
if (data.paragraph) {
|
if (data.paragraph) {
|
||||||
html += "<p>" + data.paragraph + "</p>";
|
html += "<p>" + data.paragraph + "</p>";
|
||||||
}
|
}
|
||||||
if (data.bullets) {
|
if (data.bullets.length > 0) {
|
||||||
html += "<ul>";
|
html += "<ul>";
|
||||||
for (point of data.bullets) {
|
for (point of data.bullets) {
|
||||||
html += "<li>" + point + "</li>";
|
html += "<li>" + point + "</li>";
|
||||||
@@ -557,8 +585,8 @@
|
|||||||
window.onload = (event) => {
|
window.onload = (event) => {
|
||||||
insertServices(serviceData);
|
insertServices(serviceData);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user