Skip to content

Commit

Permalink
Improve embed demo (#611)
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg authored May 28, 2024
1 parent 8910dee commit 8568064
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Chart.lock
chart/charts
web/build
web/src/media
web/src/demo-embed
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
4 changes: 2 additions & 2 deletions web/src/context/AppContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ export function appReducer(state: AppState, action: Action) {
theme: { ...action.theme },
search: {
limit: EMBED_SEARCH_LIMIT,
sortBy: DEFAULT_SORT_BY,
sort: { by: DEFAULT_SORT_BY },
},
};

return {
...state,
prefs: prefs,
isEmbed: action.isEmbed,
};

Expand Down
4 changes: 4 additions & 0 deletions web/src/layout/navigation/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
background-color: var(--color-black-25);
}

.externalLink {
cursor: pointer;
}

@media (hover: hover) {
.link:hover::before {
content: '';
Expand Down
4 changes: 3 additions & 1 deletion web/src/layout/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const Navbar = () => {
<div className="d-flex flex-row align-items-start">
<div className="position-relative">
{isEmbed ? (
<img className={styles.logo} alt="CLOTributor logo" src={logo} />
<ExternalLink href="https://clotributor.dev" className={styles.externalLink}>
<img className={styles.logo} alt="CLOTributor logo" src={logo} />
</ExternalLink>
) : (
<Link to="/" onClick={() => scrollToTop()} className="cursorPointer">
<img className={styles.logo} alt="CLOTributor logo" src={logo} />
Expand Down

0 comments on commit 8568064

Please sign in to comment.