Skip to content

Commit d635754

Browse files
committed
docs: Improve landing page
1 parent 3a369f9 commit d635754

9 files changed

Lines changed: 171 additions & 26 deletions

File tree

src/components/HomepageFeatures/index.tsx

Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,118 @@
11
import React from 'react';
22
import styles from './styles.module.scss';
33

4+
type FeatureItemImage = string | (() => React.ReactElement);
5+
46
type FeatureItem = {
57
title: string;
6-
Image: any;
8+
Images: FeatureItemImage | FeatureItemImage[];
79
description: React.ReactNode;
810
};
911

1012
const FeatureList: FeatureItem[] = [
13+
{
14+
title: 'Feature Rich',
15+
Images: '/img/landing/options.png',
16+
description: (
17+
<>
18+
alphaTab provides a huge variety of features to build your music notation app:
19+
20+
<ul>
21+
<li>Load music notation from formats like Guitar Pro 3-8, MusicXML, Capella or use the built-in text language alphaTex.</li>
22+
<li>Show standard music notation, guitar tabs, drum tabs, numbered notation (jiǎnpǔ) and slash notation.</li>
23+
<li>Adjust the music sheet look with layouts (horizontal/vertical), zoom levels, custom paddings and coloring elements to your preference.</li>
24+
<li>Interactively play songs with the built-in synthesizer including tempo control, looping, transposing.</li>
25+
<li>Synchronize songs with real audio or video recordings.</li>
26+
<li>Show individual instruments (tracks) of the overall song, or combine multiple tracks. Control the volume, pan and transposition of all instruments live.</li>
27+
</ul>
28+
</>
29+
),
30+
},
1131
{
1232
title: 'Responsive Display',
13-
Image: require('@site/static/img/undraw-responsive.svg').default,
33+
Images: [
34+
'/img/landing/alphatab-desktop.png',
35+
'/img/landing/alphatab-tablet.png',
36+
'/img/landing/alphatab-phone.png'
37+
],
1438
description: (
1539
<>
16-
Depending on the available screen resolution alphaTab can resize
17-
dynamically to make the music sheet fit the available space.
40+
alphaTab adjusts to the available screen resolution. Resizing rearranges the
41+
music sheet dynamically to fit again the available space. We provide a wide variety
42+
of layout options to adjust scaling, paddings and the general arrangement used.
43+
Your app will be notified about any resizing so you can adjust as needed. This way you can serve your users always the best viewing experience.
1844
</>
1945
),
2046
},
2147
{
22-
title: 'Designed for Cross Platform usage',
23-
Image: require('@site/static/img/undraw-cross-platform.svg').default,
48+
title: 'Designed for Cross Platform and Full-Stack usage',
49+
Images: '/img/landing/platforms.png',
2450
description: (
2551
<>
2652
The core of alphaTab is designed to run with minimal external dependencies
27-
and on multiple platforms. From one central code base we provide
28-
alphaTab for web based apps, apps using .net and Kotlin for Android.
53+
and on multiple platforms and runtime environments. From one central code base we provide
54+
alphaTab for web based apps (JavaScript), apps using .net and Kotlin for Android.
55+
Use alphaTab in your backend and frontend using your preferred technologies to build the app you want.
2956
</>
3057
),
3158
},
3259
{
3360
title: 'Audio Playback',
34-
Image: require('@site/static/img/undraw-audio.svg').default,
61+
Images: () => {
62+
return (
63+
<video src='/img/landing/audio.mp4' autoPlay={true} muted={true} loop={true} controls={false} style={{maxWidth: "100%"}} />
64+
)
65+
},
3566
description: (
3667
<>
3768
The built-in audio synthesizer allows users to hear what they are
3869
seeing. Using SoundFont2 and SoundFont3 containers as input, alphaTab can generate the
3970
matching audio to the displayed music notation and provide a live
4071
display cursor including interactive selection of playback position and
41-
ranges.
72+
ranges. <br />
73+
Or use real audio and video recordings and synchronize them with your music sheet.
74+
Let your users play along backing tracks, real songs or build training lessons.
75+
alphaTab can be integrated with any custom external media as you need it.
4276
</>
4377
),
4478
},
4579
{
46-
title: 'Powerful API',
47-
Image: require('@site/static/img/undraw-api.svg').default,
80+
title: 'Free as in Beer',
81+
Images: '/img/landing/opensource.png',
4882
description: (
4983
<>
50-
Use the alphaTab APIs to build your customized look&amp;feel on top of
51-
the main rendering component. Access the full data model of the music
52-
sheet to derive UI components tailored for your needs.
84+
alphaTab is provided to you for free under the terms of the MPL-2.0 license.
85+
It is developed and continuously improved since more than 15 years (2010).
86+
Simply use it in your projects or even contribute to it making it better for everyone.
5387
</>
5488
),
5589
},
5690
];
5791

58-
function Feature({title, Image, description}: FeatureItem) {
92+
const FeatureImage: React.FC<{ image: FeatureItemImage }> = ({ image }) => {
93+
if (typeof image === 'string') {
94+
return <img src={image} />
95+
}
96+
97+
const ImageComponent = image;
98+
return (
99+
<ImageComponent />
100+
)
101+
};
102+
103+
function Feature({ title, Images, description }: FeatureItem) {
59104
return (
60105
<div className={styles.feature}>
61-
<div className={styles.featureImageWrap}>
62-
<Image className={styles.featureImage} />
63-
</div>
106+
<div className={styles.featureImageWrap}>{
107+
Array.isArray(Images)
108+
?
109+
(
110+
<div className={`${styles.featureImageGallery} ${styles['featureImageGallery' + Images.length]}`}>
111+
{Images.map(i => <FeatureImage image={i} />)}
112+
</div>
113+
)
114+
: <FeatureImage image={Images} />
115+
}</div>
64116
<div className={styles.featureDescription}>
65117
<h3>{title}</h3>
66118
<p>{description}</p>

src/components/HomepageFeatures/styles.module.scss

Lines changed: 100 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,128 @@
22
display: flex;
33
align-items: center;
44
padding: 2rem 0;
5-
width: 50%;
5+
width: 80%;
66
margin: 0 auto;
7+
gap: 1rem;
78
}
89

910
.feature {
1011
display: flex;
1112
align-items: center;
13+
14+
& > * {
15+
padding: 1rem;
16+
}
1217
}
1318

1419
.feature:nth-child(even) .featureDescription,
1520
.feature:nth-child(odd) .featureImageWrap {
1621
order: 0;
17-
margin-right: 1em;
1822
}
1923

2024
.feature:nth-child(odd) .featureDescription,
2125
.feature:nth-child(even) .featureImageWrap {
2226
order: 1;
2327
}
2428

29+
2530
.featureImageWrap {
26-
height: 200px;
27-
width: 200px;
2831
display: flex;
2932
align-items: center;
3033
justify-content: center;
34+
width: 66%;
35+
}
36+
37+
.featureDescription {
38+
width: 33%;
3139
}
3240

33-
.featureImage {
34-
width: 200px;
35-
max-width: 200px;
41+
.featureImageGallery {
42+
display: grid;
43+
align-items: center;
44+
justify-items: center;
45+
grid-template-columns: 1fr;
46+
grid-template-rows: 1fr;
47+
48+
&>* {
49+
grid-area: 1 / 1 / 2 / 2;
50+
51+
color: transparent;
52+
opacity: 0;
53+
z-index: 0;
54+
animation: featureImageGalleryFade 1s linear infinite 0s;
55+
backface-visibility: hidden;
56+
}
57+
58+
&.featureImageGallery1>* {
59+
animation-duration: 5s;
60+
}
61+
62+
&.featureImageGallery2>* {
63+
animation-duration: 10s;
64+
}
65+
66+
&.featureImageGallery3>* {
67+
animation-duration: 15s;
68+
}
69+
70+
&.featureImageGallery4>* {
71+
animation-duration: 20s;
72+
}
73+
74+
&.featureImageGallery5>* {
75+
animation-duration: 25s;
76+
}
77+
78+
&.featureImageGallery6>* {
79+
animation-duration: 30s;
80+
}
81+
82+
&>*:nth-child(1) {
83+
animation-delay: 0s;
84+
}
85+
86+
&>*:nth-child(2) {
87+
animation-delay: 5s;
88+
}
89+
90+
&>*:nth-child(3) {
91+
animation-delay: 10s;
92+
}
93+
94+
&>*:nth-child(4) {
95+
animation-delay: 15s;
96+
}
97+
98+
&>*:nth-child(5) {
99+
animation-delay: 20s;
100+
}
101+
102+
&>*:nth-child(6) {
103+
animation-delay: 25s;
104+
}
36105
}
106+
107+
@keyframes featureImageGalleryFade {
108+
0% {
109+
opacity: 0;
110+
animation-timing-function: ease-in;
111+
}
112+
113+
10% {
114+
opacity: 1;
115+
animation-timing-function: ease-out;
116+
}
117+
118+
20% {
119+
opacity: 1;
120+
}
121+
122+
30% {
123+
opacity: 0;
124+
}
125+
126+
100% {
127+
opacity: 0;
128+
}
129+
}
190 KB
Loading
32 KB
Loading
54.2 KB
Loading

static/img/landing/audio.mp4

1.06 MB
Binary file not shown.

static/img/landing/opensource.png

78.6 KB
Loading

static/img/landing/options.png

96.7 KB
Loading

static/img/landing/platforms.png

43.2 KB
Loading

0 commit comments

Comments
 (0)