Skip to content

Commit

Permalink
fix: blog, landing style (apache#1355)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyeYoung authored Oct 8, 2022
1 parent 3279c4c commit 061bd9e
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 27 deletions.
21 changes: 18 additions & 3 deletions blog/src/theme/BlogPosts/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@

width: fit-content;
display: grid;
grid-template-columns: repeat(3, $width);
grid-template-columns: repeat(3, min($width, 30%));
margin: 5rem auto 0;
align-items: start;
font-family: apple-system, system-ui, sans-serif;
column-gap: 1.25rem;
row-gap: 3rem;
justify-content: space-between;

article {
border-radius: 1rem;
Expand Down Expand Up @@ -217,7 +217,7 @@
}
}

@include respond-above(sm) {
@include respond-above(lg) {
.firstPage {
grid-template-columns: repeat(2, 645px);

Expand All @@ -228,6 +228,21 @@
max-width: unset;
}
}
}
}
}

@include respond-above(sm) {
.firstPage {
grid-template-columns: repeat(2, min(645px, 50%));

> article {
& > a {
img {
// width: min(605px, 50%) !important;
max-width: unset;
}
}

.content {
padding: 0 1.875rem 1.875rem;
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"serve:doc": "yarn workspace doc docusaurus serve",
"serve:blog:zh": "yarn workspace blog docusaurus serve zh",
"serve:blog:en": "yarn workspace blog docusaurus serve en",
"build:website:preview:serve": "yarn build:website:preview && yarn serve:website",
"build:doc:preview:serve": "yarn build:doc:previw && yarn serve:doc",
"build:blog:zh:preview:serve": "yarn build:blog:zh:preview && yarn serve:blog:zh",
"build:blog:en:preview:serve": "yarn build:blog:en:preview && yarn serve:blog:en",
"prepare": "husky install",
"prepare-data": "yarn sync-docs && yarn generate-repos-info && yarn generate-picked-posts"
},
Expand Down
1 change: 1 addition & 0 deletions website/src/components/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import videojs from 'video.js';
import type { VideoJsPlayerOptions, VideoJsPlayer } from 'video.js';
import 'video.js/dist/video-js.min.css';
import '../css/landing-sections/video.css';

export interface VideoProps {
options: VideoJsPlayerOptions,
Expand Down
43 changes: 22 additions & 21 deletions website/src/components/sections/Benefits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Benefits: FC = () => {
ease: 'power3.inOut',
yoyoEase: 'power3.out',
},
})
}),
);
}

Expand Down Expand Up @@ -73,7 +73,7 @@ const Benefits: FC = () => {
ease: 'power2.in',
yoyoEase: 'power2.out',
repeat: -1,
}
},
)
.fromTo(
'.performance_svg__lightning',
Expand All @@ -85,7 +85,7 @@ const Benefits: FC = () => {
duration: 1,
repeat: -1,
},
'-=1'
'-=1',
);

// Security anim
Expand All @@ -99,7 +99,7 @@ const Benefits: FC = () => {
duration: 0.5,
repeat: -1,
repeatDelay: 0.1,
}
},
);
for (let i = 1; i < 4; i += 1) {
tweenTls[1].fromTo(
Expand All @@ -115,7 +115,7 @@ const Benefits: FC = () => {
repeat: -1,
ease: 'linear',
yoyoEase: 'linear',
}
},
);
}

Expand All @@ -131,7 +131,7 @@ const Benefits: FC = () => {
duration: 0.3,
repeat: -1,
repeatDelay: 0.1,
}
},
);
tweenTls[2].fromTo(
links[i],
Expand All @@ -143,7 +143,7 @@ const Benefits: FC = () => {
duration: 0.3,
repeat: -1,
repeatDelay: 0.1,
}
},
);
}

Expand All @@ -161,7 +161,7 @@ const Benefits: FC = () => {
x: 0,
ease: 'sin.inOut',
duration: 1.5,
}
},
)
.fromTo(
'.dynamic_svg__arrow',
Expand All @@ -172,7 +172,7 @@ const Benefits: FC = () => {
opacity: 1,
ease: 'power3.out',
duration: 0.5,
}
},
)
.fromTo(
'.dynamic_svg__lightning',
Expand All @@ -185,7 +185,7 @@ const Benefits: FC = () => {
y: 0,
duration: 1,
ease: 'power2.inOut',
}
},
);

// Multiplatform anim
Expand All @@ -198,7 +198,7 @@ const Benefits: FC = () => {
{
fill: '#ffdc21',
duration: 0.5,
}
},
);
}

Expand All @@ -223,7 +223,7 @@ const Benefits: FC = () => {
onComplete: () => {
rot -= 360;
},
}
},
);
const tweenFloat = gsap.fromTo(
'.multiplatform_svg__lightning',
Expand All @@ -238,7 +238,7 @@ const Benefits: FC = () => {
yoyo: true,
paused: true,
yoyoEase: 'linear',
}
},
);

function onIntersection(entries) {
Expand Down Expand Up @@ -277,8 +277,8 @@ const Benefits: FC = () => {
{
root: null,
threshold: 0.2,
}
)
},
),
);
}

Expand Down Expand Up @@ -327,7 +327,7 @@ const Benefits: FC = () => {
},
{
opacity: 0,
}
},
)
.fromTo(
security.current,
Expand All @@ -336,7 +336,7 @@ const Benefits: FC = () => {
},
{
opacity: 1,
}
},
)
.to(security.current, {
opacity: 0,
Expand All @@ -348,7 +348,7 @@ const Benefits: FC = () => {
},
{
opacity: 1,
}
},
)
.to(scale.current, {
opacity: 0,
Expand All @@ -360,7 +360,7 @@ const Benefits: FC = () => {
},
{
opacity: 1,
}
},
)
.to(dynamic.current, {
opacity: 0,
Expand All @@ -372,7 +372,7 @@ const Benefits: FC = () => {
},
{
opacity: 1,
}
},
);
},
'(min-width: 1101px)': () => {
Expand Down Expand Up @@ -447,7 +447,8 @@ const Benefits: FC = () => {
Apache APISIX Gateway provides multiple security plugins for identity authentication
and API verification, including CORS, JWT, Key Auth, OpenID Connect (OIDC),
Keycloak, etc. We put stability and security first. For more information, check
</Translate>{' '}
</Translate>
{' '}
<Link style={{ color: '#e8433e' }} to={useBaseUrl('docs/apisix/plugins/cors/')}>
<Translate id="benefits.component.security.link.here">here</Translate>
</Link>
Expand Down
9 changes: 6 additions & 3 deletions website/src/components/sections/OpensourcePromo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,19 @@ const OpensourcePromo: FC = () => (
<Translate id="openSourcePromo.component.subtitle.fragment1">
What are microservices? What is an API Gateway? Want to learn Apache APISIX usage, but
don&apos;t know where to start? Check out our
</Translate>{' '}
</Translate>
{' '}
<Link style={{ color: '#e8433e' }} to={useBaseUrl('docs')}>
<Translate id="openSourcePromo.component.link.docs">Docs.</Translate>
</Link>
</p>
<p>
<Translate id="openSourcePromo.component.subtitle.fragment2">
Like visual information, check out our
</Translate>{' '}
<VideoChannel />{' '}
</Translate>
{' '}
<VideoChannel />
{' '}
<Translate id="openSourcePromo.component.subtitle.fragment3">
for detailed tutorials. Subscribe for more.
</Translate>
Expand Down
7 changes: 7 additions & 0 deletions website/src/css/landing-sections/video.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.video-js.vjs-playing .vjs-big-play-button {
display: none !important;
}

.video-js.vjs-paused .vjs-big-play-button {
display: inline-block !important;
}

0 comments on commit 061bd9e

Please sign in to comment.