Skip to content

Commit d2af119

Browse files
committed
Change colors to reflect Docusaurus theme colors; Fix icon padding
1 parent 75f17dd commit d2af119

File tree

5 files changed

+23
-21
lines changed

5 files changed

+23
-21
lines changed

src/theme/CodeBlock/VideoPlayer/CloseIconBig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface Props {
66

77
function CloseIconBig({ className = '' }: Props) {
88
return (
9-
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 26 23" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" className={`feather feather-x ${className}`}><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
9+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className={`feather feather-x ${className}`}><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
1010
)
1111
}
1212

src/theme/CodeBlock/VideoPlayer/PlayButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function PlayButton({
2020
}: Props) {
2121
return (
2222
<div
23-
className={isPlaying ? `${styles['play-wrapper-selected']} ${styles['play-wrapper']}` : `${styles['play-wrapper-normal']} ${styles['play-wrapper']}`}
23+
className={styles['play-wrapper']}
2424
onClick={isPlaying ? onClose : onOpen}
2525
>
2626
<img
@@ -29,7 +29,7 @@ function PlayButton({
2929
className={styles['play-thumbnail']}
3030
>
3131
</img>
32-
{isPlaying ? <CloseIconBig className={styles['play']} /> : <PlayIcon className={styles['play']} />}
32+
{isPlaying ? <CloseIconBig className={styles['close']} /> : <PlayIcon className={styles['play']} />}
3333
</div>
3434
)
3535
}

src/theme/CodeBlock/VideoPlayer/VideoModal/styles.module.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,21 @@
1414
}
1515

1616
.modal-header {
17-
height: 30px;
17+
padding: 5px 5px 4px 0px;
1818
display: flex;
19+
flex: 1;
1920
flex-direction: row-reverse;
21+
align-items: center;
2022
}
2123

2224
.modal-close {
23-
font-family: sans-serif;
24-
font-size: 20px;
25-
margin-top: auto;
26-
display: flex;
27-
margin-bottom: auto;
2825
color: gray;
29-
cursor: pointer;
30-
margin-right: 8px;
26+
display: flex;
3127
}
3228

3329
.modal-close:hover {
3430
color: white;
31+
cursor: pointer;
3532
}
3633

3734
.iframe {

src/theme/CodeBlock/VideoPlayer/styles.module.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@
2525
height: 40px;
2626
overflow: hidden;
2727
border-radius: 50%;
28-
}
2928

30-
.play-wrapper-normal {
31-
color: #0ac069;
32-
border: 2px solid #0ac069;
29+
color: var(--ifm-color-primary);
30+
border: 2px solid var(--ifm-color-primary);
3331
}
3432

35-
.play-wrapper-selected,
3633
.play-wrapper:hover {
37-
border: 2px solid #11df7b;
38-
color: #11df7b;
34+
border: 2px solid var(--ifm-color-primary-dark);
35+
color: var(--ifm-color-primary-dark);
3936
}
4037

4138
.play-thumbnail {
@@ -47,12 +44,15 @@
4744
-ms-user-select: none;
4845

4946
height: 100%;
50-
filter: brightness(0.9) blur(2px);
47+
filter: brightness(0.83) blur(2px);
5148
}
5249

5350
.play {
54-
padding-left: 4px;
55-
z-index: 50;
51+
position: absolute;
52+
margin-left: 4px;
53+
}
54+
55+
.close {
5656
position: absolute;
5757
}
5858

src/vite.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@
99
margin: 10px;
1010
margin-top: 20px;
1111
z-index: 90;
12+
}
13+
14+
:root {
15+
--ifm-color-primary: yellow;
16+
--ifm-color-primary-dark: orange;
1217
}

0 commit comments

Comments
 (0)