Skip to content

Commit 9956ad7

Browse files
committed
docs: Add videos and tune aspect ratio
1 parent 671bcdb commit 9956ad7

File tree

14 files changed

+66
-12
lines changed

14 files changed

+66
-12
lines changed

docs/components/mdx/YouTubeVideo/YouTubeVideo.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ const cn = classnames.bind(styles);
66

77
export type YouTubeVideoProps = {
88
url: string;
9+
aspectRatio?: number;
910
};
1011

11-
export const YouTubeVideo = ({ url }: YouTubeVideoProps) => {
12+
function formatAspectRatioAsPercentage(aspectRatio: number) {
13+
return `${((1 / aspectRatio) * 100).toFixed(2)}%`;
14+
}
15+
16+
export const YouTubeVideo = ({ url, aspectRatio = 16/9 }: YouTubeVideoProps) => {
1217
return (
1318
<div
1419
className={cn('YoutubeVideo__Wrapper')}
15-
style={{ position: 'relative', paddingBottom: '56.25%', height: 0 }}
20+
style={{
21+
position: 'relative',
22+
paddingBottom: formatAspectRatioAsPercentage(aspectRatio),
23+
height: 0
24+
}}
1625
>
1726
<iframe
1827
src={url}

docs/pages/guides/recipes/auth/sql-api-ldap.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ API](/product/apis-integrations/sql-api) with a LDAP catalog. You can use
55
this approach to enable single sign-on (SSO) experience in BI tools
66
connecting to Cube for your end users.
77

8-
<YouTubeVideo url="https://www.youtube.com/embed/vGF7n4WWriA?si=RIk7G3a4lO2DnNJj"/>
8+
<YouTubeVideo
9+
url="https://www.youtube.com/embed/vGF7n4WWriA"
10+
aspectRatio={4/2.25}
11+
/>
912

1013
## Use case
1114

docs/pages/product/apis-integrations/google-sheets.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ add-on, you will be able to [create reports via pivot
1515
table](#create-reports-via-pivot-table) and work with [saved
1616
reports](#work-with-saved-reports).
1717

18-
<YouTubeVideo url="https://www.youtube.com/embed/qPp9hroqd4g"/>
18+
<YouTubeVideo
19+
url="https://www.youtube.com/embed/qPp9hroqd4g"
20+
aspectRatio={4/2.56}
21+
/>
1922

2023
## Installation
2124

docs/pages/product/auth/data-access-policies.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ and [row-level](#row-level-access) security for different [data access roles](#d
55
You can define access control rules in data model files, allowing for an organized
66
and maintainable approach to security.
77

8+
<YouTubeVideo
9+
url="https://www.youtube.com/embed/yJfnYB27wSQ"
10+
aspectRatio={4/3}
11+
/>
12+
813
## Data access roles
914

1015
Each request to Cube includes a [security context][ref-sec-ctx], which can contain

docs/pages/product/configuration/data-sources/ksqldb.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ ksqlDB support is available in Cube Cloud on the
1818

1919
See how you can use ksqlDB and Cube Cloud to power real-time analytics in Power BI:
2020

21-
<YouTubeVideo url="https://www.youtube.com/embed/RD_HZ7xE8G0" />
21+
<YouTubeVideo
22+
url="https://www.youtube.com/embed/RD_HZ7xE8G0"
23+
aspectRatio={4/3.55}
24+
/>
2225

2326
## Prerequisites
2427

docs/pages/product/configuration/visualization-tools/google-sheets.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
[Google Sheets][link-google-sheets] is an online, collaborative spreadsheets
44
application.
55

6-
<YouTubeVideo url="https://www.youtube.com/embed/qPp9hroqd4g"/>
6+
<YouTubeVideo
7+
url="https://www.youtube.com/embed/qPp9hroqd4g"
8+
aspectRatio={4/2.56}
9+
/>
710

811
## Connect from Cube Cloud
912

docs/pages/product/configuration/visualization-tools/powerbi.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ is an interactive data visualization software product developed by Microsoft.
1111
See how you can use [ksqlDB][ref-ksqldb] and Cube Cloud to power real-time
1212
analytics in Power BI:
1313

14-
<YouTubeVideo url="https://www.youtube.com/embed/RD_HZ7xE8G0" />
14+
<YouTubeVideo
15+
url="https://www.youtube.com/embed/RD_HZ7xE8G0"
16+
aspectRatio={4/3.55}
17+
/>
1518

1619
## Connect from Cube Cloud
1720

docs/pages/product/deployment/cloud/deployments.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ and programmatic [configuration options][ref-config-options].
5050

5151
Watch the following video to for a step-by-step walkthrough:
5252

53-
<YouTubeVideo url="https://www.youtube.com/embed/XeaZPUQRC8M" />
53+
<YouTubeVideo
54+
url="https://www.youtube.com/embed/XeaZPUQRC8M"
55+
aspectRatio={4/2.78}
56+
/>
5457

5558
Exploring the demo deployment is a great way to understand how Cube works.
5659
Use the [data model editor][ref-data-model] to review the data model and

docs/pages/product/workspace/audit-log.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ You can also choose an [Audit Log tier](/product/deployment/cloud/pricing#audit-
1515
Read below about [collected events](#event-types). Also, see how you can [enable](#configuration)
1616
Audit Log, [view events](#viewing-events), and [download](#downloading-events) them.
1717

18-
<YouTubeVideo url="https://www.youtube.com/embed/W7hQzLS3wPc" />
18+
<YouTubeVideo
19+
url="https://www.youtube.com/embed/W7hQzLS3wPc"
20+
aspectRatio={4/2.64}
21+
/>
1922

2023
## Configuration
2124

docs/pages/product/workspace/integrations.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ The Integrations page is available in Cube Cloud on
1212

1313
</SuccessBox>
1414

15-
<YouTubeVideo url="https://www.youtube.com/embed/-N5dDeGqv8M" />
15+
<YouTubeVideo
16+
url="https://www.youtube.com/embed/-N5dDeGqv8M"
17+
aspectRatio={4/2.83}
18+
/>
1619

1720
You can [manage integrations](#manage-integrations), connect a [specific
1821
tool](#connect-specific-tools), or [view API credentials](#view-api-credentials).

0 commit comments

Comments
 (0)