Skip to content

Commit

Permalink
Improve embed demo
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
  • Loading branch information
cynthia-sg committed May 28, 2024
1 parent 8910dee commit 45abfb3
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
@@ -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*
4 changes: 2 additions & 2 deletions web/src/context/AppContextProvider.tsx
Original file line number Diff line number Diff line change
@@ -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,
};

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

.externalLink {
cursor: pointer;
}

@media (hover: hover) {
.link:hover::before {
content: '';
4 changes: 3 additions & 1 deletion web/src/layout/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -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} />

0 comments on commit 45abfb3

Please sign in to comment.