Skip to content

Commit 89d8431

Browse files
authored
docs: Playground New Branding & Logo (SAP#9331)
1 parent 0b915d6 commit 89d8431

File tree

19 files changed

+417
-46
lines changed

19 files changed

+417
-46
lines changed

packages/website/docusaurus.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ const config: Config = {
8888
title: 'UI5 Web Components',
8989
logo: {
9090
alt: 'UI5 Web Components Logo',
91-
src: 'img/logo.png',
91+
src: 'img/LogoWater.svg',
92+
srcDark: 'img/LogoFire.svg',
9293
},
9394
items: [
9495
{

packages/website/src/components/HomepageFeatures/index.tsx

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
import './styles.css';
22

3+
import Buildings from "@site/static/img/features/light/Buildings.svg";
4+
import Frame from "@site/static/img/features/light/Frame.svg";
5+
import Hand from "@site/static/img/features/light/Hand.svg";
6+
import BuildingsDark from "@site/static/img/features/dark/Buildings.svg";
7+
import FrameDark from "@site/static/img/features/dark/Frame.svg";
8+
import HandDark from "@site/static/img/features/dark/Hand.svg";
9+
10+
311
import { useColorMode } from '@docusaurus/theme-common';
412

513
type FeatureItem = {
614
title: string;
7-
src?: string;
8-
srcContrast?: string;
15+
SVG?: React.ComponentType<React.SVGProps<SVGSVGElement> & {
16+
title?: string;
17+
}>;
18+
SVGDark?: React.ComponentType<React.SVGProps<SVGSVGElement> & {
19+
title?: string;
20+
}>;
921
description: JSX.Element;
1022
};
1123

1224
const FeatureList: FeatureItem[] = [
1325
{
1426
title: 'Easy to Use',
15-
src: require('@site/static/img/features/Frame.png').default,
16-
srcContrast: require('@site/static/img/features-contrast/Frame_inverted.png').default,
27+
SVG: Frame,
28+
SVGDark: FrameDark,
1729
description: (
1830
<>
1931
Based on web standards - just HTML!
@@ -24,8 +36,8 @@ const FeatureList: FeatureItem[] = [
2436
},
2537
{
2638
title: 'Lightweight',
27-
src: require('@site/static/img/features/hand.png').default,
28-
srcContrast: require('@site/static/img/features-contrast/hand_inverted.png').default,
39+
SVG: Hand,
40+
SVGDark: HandDark,
2941
description: (
3042
<>
3143
Tiny - come with a minimal footprint.
@@ -36,8 +48,8 @@ const FeatureList: FeatureItem[] = [
3648
},
3749
{
3850
title: 'Enterprise Ready',
39-
src: require('@site/static/img/features/buildings.png').default,
40-
srcContrast: require('@site/static/img/features-contrast/buildings_inverted.png').default,
51+
SVG: Buildings,
52+
SVGDark: BuildingsDark,
4153
description: (
4254
<>
4355
Implements latest SAP Design language.
@@ -48,12 +60,12 @@ const FeatureList: FeatureItem[] = [
4860
},
4961
];
5062

51-
function Feature({ title, src, srcContrast, description }: FeatureItem) {
63+
function Feature({ title, SVG, SVGDark, description }: FeatureItem) {
5264
const { colorMode } = useColorMode();
5365

5466
return (
5567
<div className="feature">
56-
<img className="feature__image" src={colorMode === "dark" ? srcContrast : src} alt={title} />
68+
{colorMode === "light" ? <SVG className='feature__image'/> : <SVGDark className='feature__image'/>}
5769
<h2 className="feature__title">{title}</h2>
5870
<p className="feature__desc">{description}</p>
5971
</div>

packages/website/src/components/HomepageFeatures/styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
}
1919

2020
.feature__image {
21-
height: 8rem;
21+
height: 10rem;
22+
width: 10rem;
2223
}
2324

2425
.feature {

packages/website/src/css/custom.css

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,34 @@
3535
}
3636

3737
:root {
38-
--ifm-color-primary: #fe7520;
39-
--ifm-color-primary-dark: #fe6304;
40-
--ifm-color-primary-darker: #f25d01;
41-
--ifm-color-primary-darkest: #c74d01;
42-
--ifm-color-primary-light: #fe873c;
43-
--ifm-color-primary-lighter: #fe8f4b;
44-
--ifm-color-primary-lightest: #feaa75;
38+
--ifm-color-primary: #5D36FF;
39+
--ifm-color-primary-dark: #481CFF;
40+
--ifm-color-primary-darker: #481CFF;
41+
--ifm-color-primary-darkest: #481CFF;
42+
--ifm-color-primary-light: #4C72E9;
43+
--ifm-color-primary-lighter: #4C72E9;
44+
--ifm-color-primary-lightest: #4292DC;
45+
}
46+
47+
.hero--primary {
48+
--ifm-hero-background-color: #fff;
4549
}
4650

51+
4752
[data-theme='dark'] {
48-
--ifm-color-primary: #fe7520;
49-
--ifm-color-primary-dark: #fe6304;
50-
--ifm-color-primary-darker: #f25d01;
51-
--ifm-color-primary-darkest: #c74d01;
52-
--ifm-color-primary-light: #fe873c;
53-
--ifm-color-primary-lighter: #fe8f4b;
53+
--ifm-color-primary: #E7641D;
54+
--ifm-color-primary-dark: #e97434;
55+
--ifm-color-primary-darker: #E7641D;
56+
--ifm-color-primary-darkest: #E7641D;
57+
--ifm-color-primary-light: #e97434;
58+
--ifm-color-primary-lighter: #feaa75;
5459
--ifm-color-primary-lightest: #feaa75;
5560
}
5661

62+
[data-theme='dark'] .hero--primary {
63+
--ifm-hero-background-color: #12171C;
64+
}
65+
5766
:root {
5867
--playground-code-background: var(--sys-color-surface);
5968
--playground-code-keyword-color: #708;
@@ -121,9 +130,6 @@
121130
display: none;
122131
}
123132

124-
.hero--primary {
125-
--ifm-hero-background-color: var(--ifm-background-color);
126-
}
127133

128134

129135
.header-github-link {
@@ -157,6 +163,10 @@ code {
157163
}
158164

159165

166+
.navbar__logo img {
167+
height: 1.75rem;
168+
}
169+
160170
.navbar__item li,
161171
.navbar__item li a {
162172
cursor: pointer;

packages/website/src/pages/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717

1818
.heroTitle__UI5 {
19-
color: var(--ifm-color-primary);
19+
font-weight: bold;
2020
}
2121

2222
.buttons {
@@ -43,7 +43,7 @@
4343

4444
@media (min-width: 600px) {
4545
.heroTitle {
46-
font-weight: 900;
46+
font-weight: normal;
4747
font-size: 5.5rem;
4848
}
4949
}

packages/website/src/pages/index.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
import clsx from 'clsx';
22
import Link from '@docusaurus/Link';
3+
import { useColorMode } from '@docusaurus/theme-common';
34
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
45
import Layout from '@theme/Layout';
56
import HomepageFeatures from '@site/src/components/HomepageFeatures';
67
import HomepageDemoApps from '@site/src/components/HomepageDemoApps';
78
import HomepageTestimonials from '@site/src/components/HomepageTestimonials';
89
import Heading from '@theme/Heading';
9-
import UI5Logo from "@site/static/img/compatibility-frameworks/UI5.svg";
10+
import LogoWater from "@site/static/img/compatibility-frameworks/LogoWater.svg";
11+
import LogoFire from "@site/static/img/compatibility-frameworks/LogoFire.svg";
1012

1113
import styles from './index.module.css';
1214

15+
function Logo(props: { colorMode: string }) {
16+
return (
17+
props.colorMode === "light" ? <LogoWater className={styles.logoMain} /> : <LogoFire className={styles.logoMain} />
18+
);
19+
}
20+
1321
function HomepageHeader() {
14-
const {siteConfig} = useDocusaurusContext();
22+
const { colorMode } = useColorMode();
23+
1524
return (
1625
<header className={clsx('hero hero--primary', styles.heroBanner)}>
1726
<div className={clsx('container', styles.container)}>
18-
<UI5Logo className={styles.logoMain}></UI5Logo>
27+
<Logo colorMode={colorMode} />
1928
<Heading as="h1" className={clsx('hero__title', styles.heroTitle)}>
20-
<span className={styles.heroTitle__UI5}>UI5</span> Web Components
29+
<span className={styles.heroTitle__UI5}>UI5</span> Web Components
2130
</Heading>
31+
2232
<p className={clsx('hero__subtitle', styles.heroSubtitle)}>
2333
An <span className={styles.hero__subtitle__part1}><b>open-source</b></span> UI components library for building <span className={styles.hero__subtitle__part2}><b>enterprise-ready</b></span> apps!
2434
</p>
@@ -44,8 +54,8 @@ function HomepageHeader() {
4454
function Banner() {
4555
return (
4656
<div className="alert alert--info" role="alert" style={{fontSize: "1.5rem", textAlign: "center"}}>
47-
🎉&nbsp;Get ready for the <b>UI5 Web Components 2.0!</b>
48-
<div>Discover the <b><a href="https://github.com/SAP/ui5-webcomponents/issues/8608">timelines and the exciting features in store!
57+
🎉&nbsp;<b>UI5 Web Components 2.0 is here!</b>
58+
<div>Discover the <b><a href="/blog/releases/announcing-rc-v2/"> all the exciting features in store!
4959
</a></b>&nbsp;🎉
5060
</div>
5161
</div>
Lines changed: 29 additions & 0 deletions
Loading
Lines changed: 29 additions & 0 deletions
Loading
Lines changed: 29 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)