Skip to content

Commit

Permalink
feat: do not show logo on iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Jul 25, 2024
1 parent 478905f commit 99a77a2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ table+p em,
padding: 0.8rem;
}

.navbar__item:first-of-type {
padding-left: .4rem;
}

.navbar__logo {
height: 28px;
}
Expand Down
17 changes: 17 additions & 0 deletions website/src/theme/Navbar/Logo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import Logo from '@theme/Logo';
export default function NavbarLogo() {

// if embedded in an iframe, do not show the logo
if (window.location !== window.parent.location) {
return null;
}

return (
<Logo
className="navbar__brand"
imageClassName="navbar__logo"
titleClassName="navbar__title text--truncate"
/>
);
}

0 comments on commit 99a77a2

Please sign in to comment.