Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Add nats homepage slice (#1026)
Browse files Browse the repository at this point in the history
* Adds the NATS slice to the homepage

* corrects missing CSS

* Changes nats slice to more closely match wasm slice

* Remakes the nats slice using individual assets

* corrects divider
  • Loading branch information
SiAshbery authored Mar 29, 2022
1 parent 53e0809 commit e6d96c7
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 46 deletions.
Binary file modified site/components/nats-slice/images/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/components/nats-slice/images/nats-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/components/nats-slice/images/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 41 additions & 17 deletions site/components/nats-slice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,54 @@ import * as React from 'react';

import styles from './style.css';
import backgroundImg from './images/background.png';
import titleImg from './images/title.png';
import natsLogo from './images/nats-logo.png';

const NatsSlice = () => {
return (
<div className={`${styles.NatsSliceWrapper}`} id="genz">
<div className={styles.NatsSliceContent}>
<div className={styles.NatsSlice}>
<img
className={styles.NatsSliceTitleImage}
src={backgroundImg}
alt="text reading: We Love Tech"
/>

<div className={styles.NatsSliceText}>
<p>
Join Red Badger, Synadia, FLEETCOR and Form3 to explore why NATS is the next
generation of cloud connectivity for financial blue chips. More than a message broker,
NATS is THE connective substrate for a global organisation–or even the whole planet.
</p>
<a
href="https://content.red-badger.com/events/we-love-tech/we-love-nats"
className={styles.NatsSliceLink}
>
Register →
</a>
<img
className={styles.NatsSliceTitleImage}
src={titleImg}
alt="text reading: We Love Tech"
/>
<div className={styles.NatsSliceTextContent}>
<div className={styles.NatsSliceBodyheader}>
<h4>We love</h4>
<img src={natsLogo} alt="N.A.T.S logo" />
</div>
<div className={styles.NatsSliceCTA}>
<div>
<p>
Wednesday 20th April - 18:30
<br />
Red Badger HQ &amp; Virtual
</p>
</div>
</div>
<p>
Join Red Badger, Synadia, FLEETCOR and Form3 to explore why NATS is the next
generation of cloud connectivity for financial blue chips. More than a message
broker, NATS is THE connective substrate for a global organisation–or even the whole
planet.
</p>
<a
href="https://content.red-badger.com/events/we-love-tech/we-love-nats"
className={styles.NatsSliceLink}
>
Register
</a>
</div>
</div>
<div className={styles.NatsSliceImageWrapper}>
<img
className={styles.NatsSliceImage}
src={backgroundImg}
alt="An illustration of the letters n.a.t.s floating above a cloud"
/>
</div>
</div>
</div>
Expand Down
148 changes: 132 additions & 16 deletions site/components/nats-slice/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
color: badgerBlack;
}

.NatsSliceBodyheader {
composes: boldSansSerif from '../../css/typography/_fonts.css';
display: flex;
}

.NatsSliceBodyheader h4 {
font-size: 35px;
margin-right: 14px;
}

.NatsSliceBodyheader img {
width: 162px;
height: 42px;
margin-top: -7px;
}

.NatsSliceStrong {
composes: boldSansSerif from '../../css/typography/_fonts.css';
}

.NatsSlice {
composes: sansSerif from '../../css/typography/_fonts.css';
position: relative;
Expand All @@ -18,18 +38,18 @@
line-height: 1.5em;
}

/* Hacky workaround because the slice wasn't provided as indivisual assets instead it is a single image that also needed text + a button laid on top */
.NatsSliceText {
width: 50%;
margin-top: -20px;
.NatsSliceHeading {
composes: serif from '../../css/typography/_fonts.css';
font-size: 28px;
line-height: 1.25em;
}

.NatsSliceTextContent {
padding-top: 16px;
}

.NatsSlice p {
font-size: 16px;
font-size: 18px;
line-height: 1.25em;
margin-bottom: 20px;
}
Expand All @@ -41,7 +61,7 @@
.NatsSliceTitleImage {
display: block;
width: 100%;
max-width: 1440px;
max-width: 610px;
}

.NatsSliceLink {
Expand All @@ -51,31 +71,127 @@
background: badgerBlack;
color: badgerWhite;
display: block;
height: 60px;
width: 240px;
line-height: 60px;
height: 72px;
width: 179px;
line-height: 72px;
text-align: center;
}

.NatsSliceLink:hover {
background: scorpian;
}

.NatsSliceCloseButton {
position: absolute;
display: block;
height: 16px;
width: 16px;
background: none;
top: 14px;
right: 14px;
border: none;
outline: none;
cursor: pointer;
}

.NatsSliceCloseButton:after,
.NatsSliceCloseButton:before {
content: '';
display: block;
background: badgerWhite;
height: 2px;
width: 20px;
position: absolute;
left: -2px;
top: 7px;
}

.NatsSliceCloseButton:after {
transform: rotate(45deg);
}

.NatsSliceCloseButton:before {
transform: rotate(-45deg);
}

.NatsSliceImageWrapper {
display: none;
max-width: 472px;
}

.NatsSliceImageWrapper img {
display: none;
}

.NatsSliceCTA {
composes: boldSansSerif from '../../css/typography/_fonts.css';
display: block;
}

.NatsSliceCTA p {
display: flex;
}

@media mediumScreen {
.NatsSliceText {
width: 50%;
margin-top: -40px;
.NatsSlice {
display: flex;
flex-direction: row;
padding: 40px 60px;
}

.NatsSliceTextContent {
padding-top: 40px;
}

.NatsSliceImage {
margin-top: 14px;
}

.NatsSliceHeading {
font-size: 60px;
}

.NatsSlice h4 {
margin-bottom: 40px;
}

.NatsSlice p {
font-size: 18px;
font-size: 22px;
margin-bottom: 40px;
}

.NatsSliceLink {
font-size: 24px;
line-height: 72px;
}

.NatsSliceText {
width: 100%;
min-width: 420px;
}
}

@media largeScreen {
.NatsSliceImageWrapper {
display: block;
position: relative;
width: 100%;
}

.NatsSliceImageWrapper img {
display: block;
width: 200%;
position: absolute;
right: -422px;
top: 50%;
transform: translateY(-50%);
}

.NatsSliceText {
width: 50%;
margin-top: -60px;
width: 52%;
}

.NatsSliceTextContent {
margin-right: 50px;
}

}
61 changes: 48 additions & 13 deletions site/pages/home/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,58 @@ Array [
<div
class="NatsSlice"
>
<img
alt="text reading: We Love Tech"
class="NatsSliceTitleImage"
src="background.png"
/>
<div
class="NatsSliceText"
>
<p>
Join Red Badger, Synadia, FLEETCOR and Form3 to explore why NATS is the next generation of cloud connectivity for financial blue chips. More than a message broker, NATS is THE connective substrate for a global organisation–or even the whole planet.
</p>
<a
class="NatsSliceLink"
href="https://content.red-badger.com/events/we-love-tech/we-love-nats"
<img
alt="text reading: We Love Tech"
class="NatsSliceTitleImage"
src="title.png"
/>
<div
class="NatsSliceTextContent"
>
Register →
</a>
<div
class="NatsSliceBodyheader"
>
<h4>
We love
</h4>
<img
alt="N.A.T.S logo"
src="nats-logo.png"
/>
</div>
<div
class="NatsSliceCTA"
>
<div>
<p>
Wednesday 20th April - 18:30
<br />
Red Badger HQ & Virtual
</p>
</div>
</div>
<p>
Join Red Badger, Synadia, FLEETCOR and Form3 to explore why NATS is the next generation of cloud connectivity for financial blue chips. More than a message broker, NATS is THE connective substrate for a global organisation–or even the whole planet.
</p>
<a
class="NatsSliceLink"
href="https://content.red-badger.com/events/we-love-tech/we-love-nats"
>
Register
</a>
</div>
</div>
<div
class="NatsSliceImageWrapper"
>
<img
alt="An illustration of the letters n.a.t.s floating above a cloud"
class="NatsSliceImage"
src="background.png"
/>
</div>
</div>
</div>
Expand Down

0 comments on commit e6d96c7

Please sign in to comment.