Skip to content

Commit

Permalink
Merge pull request #61 from ceph/feature/89-toolbar
Browse files Browse the repository at this point in the history
sub-menu component, --shadow-black custom property, icons.
  • Loading branch information
Pete-Robelou authored Jan 29, 2021
2 parents 90984aa + a7e6126 commit c26d1ce
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 7 deletions.
7 changes: 7 additions & 0 deletions src/assets/svgs/icon-innovation-blue-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/svgs/icon-performance-blue-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/svgs/icon-reliable-blue-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/svgs/icon-scalable-blue-red.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/css/base.document.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ html {
line-height: var(--font-leading-none);
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
scroll-behavior: smooth;
text-rendering: optimizeLegibility;
}

Expand Down
3 changes: 2 additions & 1 deletion src/css/base.focus.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
outline-offset: var(--size-0);
}

.js-focus-visible .nav-secondary .focus-visible {
.js-focus-visible .nav-secondary .focus-visible,
.js-focus-visible .sub-menu .focus-visible {
outline-offset: calc(-1 * var(--size-0_5));
}

Expand Down
3 changes: 1 addition & 2 deletions src/css/component.language-selector.css
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@
background: var(--color-grey-300);
border: var(--size-px) solid var(--color-grey-500);
border-radius: var(--size-1);
box-shadow: 0 0.0625rem 0.125rem hsla(var(--color-black-hsl), 0.05), 0 0.125rem 0.25rem hsla(var(--color-black-hsl), 0.05),
0 0.25rem 0.5rem hsla(var(--color-black-hsl), 0.05), 0 0.5rem 1rem hsla(var(--color-black-hsl), 0.05);
box-shadow: var(--shadow-black);
right: 0;
min-width: var(--size-48);
padding: var(--size-4);
Expand Down
3 changes: 1 addition & 2 deletions src/css/component.link-cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
}

.link-cover--shadow:hover::before {
box-shadow: 0 0.0625rem 0.125rem hsla(var(--color-black-hsl), 0.05), 0 0.125rem 0.25rem hsla(var(--color-black-hsl), 0.05),
0 0.25rem 0.5rem hsla(var(--color-black-hsl), 0.05), 0 0.5rem 1rem hsla(var(--color-black-hsl), 0.05);
box-shadow: var(--shadow-black);
}

.link-cover--shadow::before {
Expand Down
3 changes: 1 addition & 2 deletions src/css/component.nav-secondary.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@

.js .nav-secondary__sub {
background: var(--color-gunmetal);
box-shadow: 0 0.0625rem 0.125rem hsla(var(--color-black-hsl), 0.05), 0 0.125rem 0.25rem hsla(var(--color-black-hsl), 0.05),
0 0.25rem 0.5rem hsla(var(--color-black-hsl), 0.05), 0 0.5rem 1rem hsla(var(--color-black-hsl), 0.05);
box-shadow: var(--shadow-black);
display: none;
left: 0;
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions src/css/component.section.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
--section-gutters-y: var(--size-10);
padding-bottom: var(--section-gutters-y);
padding-top: var(--section-gutters-y);
scroll-margin-top: var(--size-scroll-top);
}

.section--full {
Expand Down
84 changes: 84 additions & 0 deletions src/css/component.sub-menu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* ---------- COMPONENT sub-menu ---------- */

.sub-menu {
display: none;
}

@media (--mq-lg) {
.sub-menu {
background-attachment: local, local, scroll, scroll;
background-color: var(--color-white);
background-image: linear-gradient(to right, var(--color-white), var(--color-white)),
linear-gradient(to right, var(--color-white), var(--color-white)), linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)),
linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
background-position: left center, right center, left center, right center;
background-repeat: no-repeat;
background-size: 1em 100%, 1em 100%, 0.5em 100%, 0.5em 100%;
box-shadow: var(--shadow-black);
display: flex;
list-style: none;
margin-top: calc(-1 * var(--size-10));
overflow-x: auto;
padding: var(--size-0);
}

.sub-menu > li {
position: relative;
}

.sub-menu > li:nth-last-child(2):first-child,
.sub-menu > li:nth-last-child(2):first-child ~ li {
flex: 1 0 var(--size-1-2);
}

.sub-menu > li:nth-last-child(3):first-child,
.sub-menu > li:nth-last-child(3):first-child ~ li {
flex: 1 0 var(--size-1-3);
}

.sub-menu > li:nth-last-child(4):first-child,
.sub-menu > li:nth-last-child(4):first-child ~ li {
flex: 1 0 var(--size-1-4);
}

.sub-menu > li:not(:first-child) {
padding-left: var(--size-px);
}

.sub-menu > li:not(:first-child)::before {
background: var(--color-grey-500);
content: "";
height: var(--size-2-3);
left: 0;
position: absolute;
top: var(--size-1-6);
width: var(--size-px);
}

.sub-menu a {
display: block;
color: var(--color-red-500);
font-weight: var(--font-weight-semibold);
height: var(--size-full);
padding: var(--size-4);
text-align: center;
text-decoration: none;
transition: background-color var(--animation-duration) var(--animation-easing), color var(--animation-duration) var(--animation-easing);
white-space: nowrap;
}

.sub-menu a:hover {
background: var(--color-grey-300);
}

.sub-menu a:active {
background: var(--color-grey-300);
color: var(--color-red-600);
}

.sub-menu img {
display: block;
margin: 0 auto var(--size-4);
width: var(--size-12);
}
}
1 change: 1 addition & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@import "component.section.css";
@import "component.site-footer.css";
@import "component.site-header.css";
@import "component.sub-menu.css";
@import "component.tint.css";

/* utilities */
Expand Down
4 changes: 4 additions & 0 deletions src/css/settings.colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@
--color-youtube-red-l: 50%;
--color-youtube-red-hsl: var(--color-youtube-red-h), var(--color-youtube-red-s), var(--color-youtube-red-l);
--color-youtube-red: hsl(var(--color-youtube-red-hsl));

/* ---------- shadow ---------- */
--shadow-black: 0 0.0625rem 0.125rem hsla(var(--color-black-hsl), 0.05), 0 0.125rem 0.25rem hsla(var(--color-black-hsl), 0.05),
0 0.25rem 0.5rem hsla(var(--color-black-hsl), 0.05), 0 0.5rem 1rem hsla(var(--color-black-hsl), 0.05);
}
2 changes: 2 additions & 0 deletions src/css/settings.sizes.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,6 @@
/* screen */
--size-h-screen: 100vh;
--size-w-screen: 100vw;

--size-scroll-top: 5.25rem; /* 84px */
}
28 changes: 28 additions & 0 deletions src/en-GB/discover/benefits/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@

<h1 class="h1">Benefits</h1>

<section>
<div class="bg-navy section section--full px-48 py-32 text-center">
<h2 class="color-white h2">Ceph offers industry leading performance, reliablity and&nbsp;flexibility.</h2>
<p class="color-white mb-0 p">But don’t take our word for it, the numbers below speak for themselves.</p>
</div>
<ul class="sub-menu ul">
<li>
<a href="#performance"><img alt="" src="/assets/svgs/icon-performance-blue-red.svg" />Performance</a>
</li>
<li>
<a href="#"><img alt="" src="/assets/svgs/icon-scalable-blue-red.svg" />Scalability</a>
</li>
<li>
<a href="#"><img alt="" src="/assets/svgs/icon-reliable-blue-red.svg" />Reliability &amp; management</a>
</li>
<li>
<a href="#"><img alt="" src="/assets/svgs/icon-innovation-blue-red.svg" />Innovation</a>
</li>
</ul>
</section>

<section class="section text-center" id="performance">
<h2 class="h2">Performance</h2>
<p class="p">
Vestibulum id ligula porta felis euismod semper. Maecenas sed diam eget risus varius blandit sit amet non magna. Fusce dapibus.
</p>
</section>

<section class="bg-grey-300 section section--full">
<h2 class="h2 text-center">Discover more</h2>

Expand Down

0 comments on commit c26d1ce

Please sign in to comment.