Skip to content

Commit

Permalink
feat(Conductor): add LibreOne Launchpad link (#115)
Browse files Browse the repository at this point in the history
* feat(Conductor): add LibreOne Launchpad link
* fix(Navbar): reduce search bar size

---------

Co-authored-by: Ethan Turner <[email protected]>
  • Loading branch information
jakeaturner and ethanaturner authored Sep 3, 2023
1 parent ec3967d commit c4c7cc7
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
29 changes: 29 additions & 0 deletions client/src/components/navigation/Launchpad.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.app-switcher {
display: flex;
box-shadow: 0 2px 5px -1px rgba(0,0,0,0.2);
border-radius: 0.375rem;
align-items: center;
justify-content: center;
background-color: #fff;
border: none;
height: 2.75rem;
width: 2.75rem;
cursor: pointer;
}

.app-switcher:hover {
box-shadow: 0 2px 5px -1px rgba(0,0,0,0.3);
}

.app-switcher-logo {
height: 2.25rem;
width: auto;
margin-bottom: 0.25rem;
}

.app-switcher-icon {
display: flex;
color: #127BC4;
height: 2rem;
width: 2rem;
}
19 changes: 19 additions & 0 deletions client/src/components/navigation/Launchpad.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import "./Launchpad.css";

const Launchpad = () => {
return (
<button
role="link"
className="app-switcher"
onClick={() => window.open("https://one.libretexts.org/home", "_blank")}
>
<img
src="https://cdn.libretexts.net/Icons/launchpad-rocket-icon.svg"
alt="rocket icon"
className="app-switcher-icon"
/>
</button>
);
};

export default Launchpad;
4 changes: 3 additions & 1 deletion client/src/components/navigation/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
left: 0;
margin: 0 !important;
z-index: 100;
display: flex;
align-items: center;
}

.nav-logo-item:hover {
Expand Down Expand Up @@ -42,7 +44,7 @@
}

.nav-search-form {
min-width: 400px;
min-width: 200px;
}

.nav-search-input input::placeholder {
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/navigation/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import withUserStateDependency from "../../enhancers/withUserStateDependency.jsx
import "./Navbar.css";
import { useTypedSelector } from "../../state/hooks.js";
import { LIBRARIES } from "../../utils/constants.js";
import Launchpad from "./Launchpad.js";

const Navbar: React.FC = () => {
// Global State, Location, and Error Handling
Expand Down Expand Up @@ -69,6 +70,9 @@ const Navbar: React.FC = () => {

return (
<Menu className="nav-menu" secondary>
<div className="mr-05p">
<Launchpad />
</div>
<Menu.Item
as={Link}
to="/home"
Expand Down

0 comments on commit c4c7cc7

Please sign in to comment.