Skip to content

Commit

Permalink
fix: layout and css
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsek committed Dec 20, 2024
1 parent a717911 commit 3c66420
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 32 deletions.
10 changes: 5 additions & 5 deletions packages/audiodocs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ const config = {
navbar: {
hideOnScroll: true,
title: 'React Native Audio API',
// logo: {
// // alt: 'react-native-audio-api logo',
// src: 'img/logo.svg',
// srcDark: 'img/logo.svg',
// },
logo: {
alt: 'react-native-audio-api logo',
src: 'img/logo-hero.svg',
srcDark: 'img/logo-hero.svg',
},
items: [
{
type: 'docSidebar',
Expand Down
27 changes: 2 additions & 25 deletions packages/audiodocs/src/css/overrides.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
:root {
--swm-logo-height: 45px;
--swm-expandable-transition: transform 200ms ease;
}

.navbar {
min-width: 360px;
z-index: 100;
background-color: var(--ifm-navbar-background-color);
}

:root {
/* --swm-logo-title-width: 177px; */
--swm-logo-height: 45px;
}

/* .navbar img[alt='react-native-audio-api'] {
height: 40px;
}
.theme-doc-sidebar-container img[alt='react-native-audio-api'] {
height: 40px;
}
.theme-doc-sidebar-container img {
height: 40px;
} */

.navbar__title {
display: flex;
align-items: center;
Expand All @@ -42,14 +27,6 @@
justify-content: center;
}

[class*="navbar__logo"] {
width: 180px;
}

.navbar__items :nth-child(2) {
margin-left: auto
}

table {
display: table;
width: 100%;
Expand Down
10 changes: 8 additions & 2 deletions packages/audiodocs/src/theme/DocSidebar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React from 'react';
import useBaseUrl from '@docusaurus/useBaseUrl';
import { DocSidebar } from '@swmansion/t-rex-ui';

export default function DocSidebarWrapper(props) {
const titleImages = {};
const titleImages = {
light: useBaseUrl('/img/title.svg?v=12'),
dark: useBaseUrl('/img/title-dark.svg?v=12'),
};

const heroImages = {};
const heroImages = {
logo: useBaseUrl('/img/logo-hero.svg'),
};

const newItems = ['animations/withClamp'];
const experimentalItems = ['shared-element-transitions/overview'];
Expand Down
12 changes: 12 additions & 0 deletions packages/audiodocs/src/theme/Navbar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import React from 'react';
import useBaseUrl from '@docusaurus/useBaseUrl';
import { Navbar } from '@swmansion/t-rex-ui';

export default function NavbarWrapper(props) {
const titleImages = {
light: useBaseUrl('/img/title.svg?v=12'),
dark: useBaseUrl('/img/title-dark.svg?v=12'),
};

const heroImages = {
logo: useBaseUrl('/img/logo-hero.svg'),
};

return (
<Navbar
useLandingLogoDualVariant={true}
isAlgoliaActive={false}
heroImages={heroImages}
titleImages={titleImages}
{...props}
/>
);
Expand Down
133 changes: 133 additions & 0 deletions packages/audiodocs/static/img/title-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3c66420

Please sign in to comment.