Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HomeSplash extends React.Component {

const ProjectTitle = () => (
<h2 className="projectTitle">
<small>{siteConfig.tagline}</small>
{siteConfig.tagline}
</h2>
);

Expand All @@ -63,7 +63,6 @@ class HomeSplash extends React.Component {

return (
<SplashContainer>
<Logo img_src={`${baseUrl}img/faastjs-blue.svg`} />
<div className="inner">
<ProjectTitle siteConfig={siteConfig} />
<PromoSection>
Expand Down Expand Up @@ -91,7 +90,7 @@ class Index extends React.Component {
const Block = props => (
<div className="feature">
<Container
padding={props.padding || ["top"]}
padding={props.padding}
id={props.id}
background={props.background}
>
Expand Down
43 changes: 26 additions & 17 deletions website/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--dark-bg-color: #011627;
--light-font-color: white;
--brand-color: #2196f3;
--splash-font-color: #eee;
--splash-font-color: #011627;
--splash-bg-color: rgb(0, 20, 40);
}

Expand Down Expand Up @@ -52,12 +52,22 @@ code.hljs {
padding-top: 0;
}

.mainContainer .feature {
padding: 40px 0px;
}

.mainContainer .feature:nth-child(odd) {
background: #f3f5f7;
border-top: solid 1px #e6eaee;
border-bottom: solid 1px #e6eaee;
}

.blockImage > img {
width: 70%;
}

.homeContainer {
background-color: var(--splash-bg-color);
background-color: var(--dark-bg-color);
padding-top: 5%;
padding-bottom: 5%;
}
Expand All @@ -67,28 +77,27 @@ code.hljs {
flex-direction: column;
align-items: center;
justify-content: center;
border: 1px solid var(--brand-color);
padding: 60px 10px;
border-radius: 20px;
max-width: 80%;
padding: 60px 20px;
max-width: 100%;
position: relative;
}

.heroWrapper .button {
margin: 10px 10px;
color: var(--splash-font-color);
background-color: var(--splash-bg-color);
width: 10em;
margin: 12px 15px;
color: #fff;
font-size: .8em;
background-color: var(--brand-color);
width: 8em;
}

.heroWrapper .button:hover {
background-color: var(--brand-color);
}

.box {
width: 20px;
height: 20px;
border-radius: 8px;
width: 35px;
height: 35px;
border-radius: 4px;
position: absolute;
transition: 0.5s all;
}
Expand All @@ -108,7 +117,10 @@ header img.logo {
}

.projectTitle {
color: var(--splash-font-color);
color: rgba(255,255,255,.85);
font-weight: bold;
margin-bottom: 45px;
max-width: 700px;
}

#features h1 {
Expand Down Expand Up @@ -217,9 +229,6 @@ img.prefix {
padding-top: 25%;
padding-bottom: 25%;
}
.feature {
padding-top: 40px;
}
}

@media (max-width: 480px) {
Expand Down
19 changes: 9 additions & 10 deletions website/static/js/splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function animate(hero) {
for (let child of children) {
contentWidth = Math.max(child.offsetWidth, contentWidth);
}
const boxSize = 20;
const boxSize = 35;
const minBoxPadding = 10;
const colWidth = (offsetWidth - contentWidth) / 2;
const cols = Math.min(10, Math.floor(colWidth / (boxSize + minBoxPadding) - 1));
Expand Down Expand Up @@ -45,9 +45,9 @@ function animate(hero) {
const box = boxes[col * rows + row];
const style = box.style;
style.transitionDelay = (rowDelay / 1000) * (rows - row) + "s";
style.backgroundColor = randomColor();
style.backgroundColor = "rgba(255,255,255,.15)";
setTimeout(() => {
style.border = "2px solid var(--brand-color)";
style.border = `2px solid ${randomColor()}`;
}, Math.random() * maxBorderTimeout + rowDelay * rows);
}
}
Expand All @@ -60,21 +60,20 @@ function animate(hero) {
boxes.forEach(box => {
const style = box.style;
const delay = (Math.random() * collapseSpeed) / 1000;
style.backgroundColor = "var(--dark-bg-color)";
style.border = "1px solid var(--splash-bg-color)";
style.backgroundColor = "rgba(255,255,255,.15)";
style.transitionDelay = delay + "s";
});
}

function randomColor() {
const n = Math.random();
if (n < 0.05) {
return "#F0C808";
if (n < 0.1) {
return "var(--brand-color)";
}
if (n < 0.2) {
return "#2196F3";
if (n < 0.3) {
return "#ECECEC";
}
return "#003FBB";
return "rgba(255,255,255,.15)";
}

const leftBoxes = makeBoxes("left");
Expand Down