Commit 965b7cf3 authored by Mark Florian's avatar Mark Florian

Merge branch 'restyle_Security_&_Compliance_Carousel' into 'master'

Update Styling of Security & Compliance Carousel

See merge request gitlab-org/gitlab!50877
parents 6fd8a346 28f6fbac
...@@ -54,20 +54,10 @@ export default { ...@@ -54,20 +54,10 @@ export default {
}, },
data: () => ({ data: () => ({
slide: 0, slide: 0,
textSlide: 0,
carouselImages: [ carouselImages: [
{ securityDependencyImageUrl,
index: 0, securityScanningImageUrl,
imageUrl: securityDependencyImageUrl, securityDashboardImageUrl,
},
{
index: 1,
imageUrl: securityScanningImageUrl,
},
{
index: 2,
imageUrl: securityDashboardImageUrl,
},
], ],
}), }),
computed: { computed: {
...@@ -88,7 +78,6 @@ export default { ...@@ -88,7 +78,6 @@ export default {
label: 'security-discover-carousel', label: 'security-discover-carousel',
property: `sliding${this.slide}-${slide}`, property: `sliding${this.slide}-${slide}`,
}); });
this.textSlide = slide;
}, },
}, },
i18n: { i18n: {
...@@ -99,24 +88,15 @@ export default { ...@@ -99,24 +88,15 @@ export default {
discoverUpgradeLabel: s__('Discover|Upgrade now'), discoverUpgradeLabel: s__('Discover|Upgrade now'),
discoverTrialLabel: s__('Discover|Start a free trial'), discoverTrialLabel: s__('Discover|Start a free trial'),
carouselCaptions: [ carouselCaptions: [
{ s__(
index: 0,
caption: s__(
'Discover|Check your application for security vulnerabilities that may lead to unauthorized access, data leaks, and denial of services.', 'Discover|Check your application for security vulnerabilities that may lead to unauthorized access, data leaks, and denial of services.',
), ),
}, s__(
{
index: 1,
caption: s__(
'Discover|GitLab will perform static and dynamic tests on the code of your application, looking for known flaws and report them in the merge request so you can fix them before merging.', 'Discover|GitLab will perform static and dynamic tests on the code of your application, looking for known flaws and report them in the merge request so you can fix them before merging.',
), ),
}, s__(
{
index: 2,
caption: s__(
"Discover|For code that's already live in production, our dashboards give you an easy way to prioritize any issues that are found, empowering your team to ship quickly and securely.", "Discover|For code that's already live in production, our dashboards give you an easy way to prioritize any issues that are found, empowering your team to ship quickly and securely.",
), ),
},
], ],
discoverPlanCaption: s__( discoverPlanCaption: s__(
'Discover|See the other features of the %{linkStart}gold plan%{linkEnd}', 'Discover|See the other features of the %{linkStart}gold plan%{linkEnd}',
...@@ -127,48 +107,40 @@ export default { ...@@ -127,48 +107,40 @@ export default {
<template> <template>
<div class="discover-box"> <div class="discover-box">
<h4 class="discover-title center gl-text-gray-900"> <h2 class="discover-title center gl-text-gray-900 gl-mx-auto">
{{ $options.i18n.discoverTitle }} {{ $options.i18n.discoverTitle }}
</h4> </h2>
<div class="discover-carousels">
<gl-carousel <gl-carousel
v-model="slide" v-model="slide"
class="discover-carousel" class="discover-carousel discover-image-carousel gl-mx-auto gl-text-center gl-border-solid gl-border-1 gl-bg-gray-10"
:no-wrap="true" no-wrap
controls controls
:interval="0" :interval="0"
indicators indicators
img-width="1440"
img-height="700"
@sliding-start="onSlideStart" @sliding-start="onSlideStart"
> >
<gl-carousel-slide v-for="{ index, imageUrl } in carouselImages" :key="index" img-blank> <gl-carousel-slide
<img v-for="(imageUrl, index) in carouselImages"
:src="imageUrl" :key="index"
class="discover-carousel-img w-100 box-shadow-default image-fluid d-block" :img-src="imageUrl"
/> />
</gl-carousel-slide>
</gl-carousel> </gl-carousel>
<gl-carousel <gl-carousel
ref="textCarousel" ref="textCarousel"
v-model="textSlide" v-model="slide"
class="discover-carousel discover-text-carousel" class="discover-carousel discover-text-carousel gl-mx-auto gl-text-center"
:no-wrap="true" no-wrap
:interval="0" :interval="0"
img-width="1440"
img-height="200"
>
<gl-carousel-slide
v-for="{ index, caption } in $options.i18n.carouselCaptions"
:key="index"
img-blank
> >
<p class="gl-text-gray-900 gl-text-left"> <gl-carousel-slide v-for="caption in $options.i18n.carouselCaptions" :key="caption">
<template #img>
{{ caption }} {{ caption }}
</p> </template>
</gl-carousel-slide> </gl-carousel-slide>
</gl-carousel> </gl-carousel>
<div class="discover-footer d-flex flex-nowrap flex-row justify-content-between mx-auto my-0"> <div class="discover-footer mx-auto my-0">
<p class="gl-text-gray-900 text-left mb-5"> <p class="gl-text-gray-900 text-center mb-5">
<gl-sprintf :message="$options.i18n.discoverPlanCaption"> <gl-sprintf :message="$options.i18n.discoverPlanCaption">
<template #link="{ content }"> <template #link="{ content }">
<gl-link <gl-link
...@@ -181,6 +153,7 @@ export default { ...@@ -181,6 +153,7 @@ export default {
</gl-sprintf> </gl-sprintf>
</p> </p>
</div> </div>
</div>
<div class="discover-buttons d-flex flex-nowrap flex-row justify-content-between mx-auto my-0"> <div class="discover-buttons d-flex flex-nowrap flex-row justify-content-between mx-auto my-0">
<gl-button <gl-button
class="discover-button-upgrade" class="discover-button-upgrade"
......
...@@ -178,9 +178,28 @@ ...@@ -178,9 +178,28 @@
} }
.discover-box { .discover-box {
.discover-image-carousel {
border-color: $gray-50;
padding-top: 20px;
padding-bottom: 20px;
max-width: 1000px;
@media (min-width: map-get($grid-breakpoints, lg)) {
padding-top: 30px;
padding-bottom: 30px;
}
}
.discover-title { .discover-title {
margin: 40px auto 2px; margin-top: 40px;
max-width: 500px; margin-bottom: 40px;
}
.discover-carousels {
padding-left: 30px;
padding-right: 30px;
margin-left: auto;
margin-right: auto;
} }
.discover-carousel-img { .discover-carousel-img {
...@@ -198,7 +217,7 @@ ...@@ -198,7 +217,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: space-between; justify-content: space-between;
margin: 0 auto; margin: 0 auto;
max-width: 520px; max-width: 280px;
} }
.discover-footer { .discover-footer {
...@@ -221,35 +240,73 @@ ...@@ -221,35 +240,73 @@
} }
.discover-text-carousel { .discover-text-carousel {
max-width: 650px;
.carousel-caption { .carousel-caption {
height: 100%; height: 100%;
max-width: 500px;
margin-left: auto;
margin-right: auto;
} }
} }
.carousel-control-next-icon,
.carousel-control-prev-icon {
width: 10px;
@media (min-width: map-get($grid-breakpoints, md)) {
width: inherit;
}
}
.carousel-control-next {
right: -5%;
}
.carousel-control-prev {
left: -5%;
}
.discover-carousel { .discover-carousel {
margin: 0 auto; margin-bottom: 30px;
max-width: 720px;
.carousel-inner {
width: 90%;
margin-left: auto;
margin-right: auto;
}
.carousel-indicators { .carousel-indicators {
bottom: -20px;
@media (min-width: map-get($grid-breakpoints, lg)) {
bottom: -15px;
}
li { li {
background-color: $gray-200; background-color: $gray-500;
width: 8px; width: 6px;
height: 8px; height: 6px;
border-radius: 100%; border-radius: 100%;
margin-right: 16px; margin-right: 16px;
@media (min-width: map-get($grid-breakpoints, md)) {
width: $gl-spacing-scale-3;
height: $gl-spacing-scale-3;
}
} }
.active { .active {
background-color: $gray-200; background-color: $gray-500;
} }
} }
.carousel-control-prev-icon { .carousel-control-prev-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23bababa' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"); background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666666' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E");
} }
.carousel-control-next-icon { .carousel-control-next-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23bababa' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"); background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23666666' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E");
} }
} }
} }
---
title: Update Styling of Security & Compliance Carousel
merge_request: 50877
author:
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment