Skip to content

Commit 3c66420

Browse files
committed
fix: layout and css
1 parent a717911 commit 3c66420

File tree

6 files changed

+297
-32
lines changed

6 files changed

+297
-32
lines changed

packages/audiodocs/docusaurus.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ const config = {
6868
navbar: {
6969
hideOnScroll: true,
7070
title: 'React Native Audio API',
71-
// logo: {
72-
// // alt: 'react-native-audio-api logo',
73-
// src: 'img/logo.svg',
74-
// srcDark: 'img/logo.svg',
75-
// },
71+
logo: {
72+
alt: 'react-native-audio-api logo',
73+
src: 'img/logo-hero.svg',
74+
srcDark: 'img/logo-hero.svg',
75+
},
7676
items: [
7777
{
7878
type: 'docSidebar',

packages/audiodocs/src/css/overrides.css

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
11
:root {
2+
--swm-logo-height: 45px;
23
--swm-expandable-transition: transform 200ms ease;
34
}
45

56
.navbar {
67
min-width: 360px;
78
z-index: 100;
9+
background-color: var(--ifm-navbar-background-color);
810
}
911

10-
:root {
11-
/* --swm-logo-title-width: 177px; */
12-
--swm-logo-height: 45px;
13-
}
14-
15-
/* .navbar img[alt='react-native-audio-api'] {
16-
height: 40px;
17-
}
18-
19-
.theme-doc-sidebar-container img[alt='react-native-audio-api'] {
20-
height: 40px;
21-
}
22-
23-
.theme-doc-sidebar-container img {
24-
height: 40px;
25-
} */
26-
2712
.navbar__title {
2813
display: flex;
2914
align-items: center;
@@ -42,14 +27,6 @@
4227
justify-content: center;
4328
}
4429

45-
[class*="navbar__logo"] {
46-
width: 180px;
47-
}
48-
49-
.navbar__items :nth-child(2) {
50-
margin-left: auto
51-
}
52-
5330
table {
5431
display: table;
5532
width: 100%;

packages/audiodocs/src/theme/DocSidebar/index.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import React from 'react';
2+
import useBaseUrl from '@docusaurus/useBaseUrl';
23
import { DocSidebar } from '@swmansion/t-rex-ui';
34

45
export default function DocSidebarWrapper(props) {
5-
const titleImages = {};
6+
const titleImages = {
7+
light: useBaseUrl('/img/title.svg?v=12'),
8+
dark: useBaseUrl('/img/title-dark.svg?v=12'),
9+
};
610

7-
const heroImages = {};
11+
const heroImages = {
12+
logo: useBaseUrl('/img/logo-hero.svg'),
13+
};
814

915
const newItems = ['animations/withClamp'];
1016
const experimentalItems = ['shared-element-transitions/overview'];

packages/audiodocs/src/theme/Navbar/index.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
import React from 'react';
2+
import useBaseUrl from '@docusaurus/useBaseUrl';
23
import { Navbar } from '@swmansion/t-rex-ui';
34

45
export default function NavbarWrapper(props) {
6+
const titleImages = {
7+
light: useBaseUrl('/img/title.svg?v=12'),
8+
dark: useBaseUrl('/img/title-dark.svg?v=12'),
9+
};
10+
11+
const heroImages = {
12+
logo: useBaseUrl('/img/logo-hero.svg'),
13+
};
14+
515
return (
616
<Navbar
717
useLandingLogoDualVariant={true}
818
isAlgoliaActive={false}
19+
heroImages={heroImages}
20+
titleImages={titleImages}
921
{...props}
1022
/>
1123
);
Lines changed: 133 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)