Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor text issues #91

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/front-end/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions apps/front-end/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Redux App</title>
<title>Cooperative World Map</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 2 additions & 0 deletions apps/front-end/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { fetchConfig, setLanguage } from "./app/configSlice";
import { useAppDispatch } from "./app/hooks";
import { getLanguageFromUrl } from "./utils/window-utils";
import Popup from "./components/popup/Popup";
import CwmLogo from "./components/common/cwmLogo/CwmLogo";

const App = () => {
const dispatch = useAppDispatch();
Expand Down Expand Up @@ -33,6 +34,7 @@ const App = () => {
return (
<div>
<MapWrapper />
<CwmLogo />
<Panel />
<Popup />
</div>
Expand Down
58 changes: 58 additions & 0 deletions apps/front-end/src/components/common/cwmLogo/CwmLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import CWMLogo from "./cwm-logo.png";
import CWMLogoSmall from "./cwm-logo-small.png";
import Box from "@mui/material/Box";
import { styled } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";

const StyledLogoWrapper = styled(Box)(() => ({
position: "fixed",
top: "0",
left: "5px",
zIndex: 0,
"& img": {
width: "100%",
maxWidth: "50px",
"&.small": {
display: "block",
},
"&.large": {
display: "none",
},
},
"@media (min-width: 897px)": {
bottom: "-25px",
right: "-5px",
top: "unset",
left: "unset",
"& img": {
width: "100%",
maxWidth: "150px",
"&.small": {
display: "none",
},
"&.large": {
display: "block",
},
},
},
}));

const CwmLogo = () => {
const isMedium = useMediaQuery("(min-width: 897px)");
return (
<StyledLogoWrapper>
{isMedium && (
<img src={CWMLogo} className="large" alt="Cooperative World Map Logo" />
)}
{!isMedium && (
<img
src={CWMLogoSmall}
className="small"
alt="Cooperative World Map Logo"
/>
)}
</StyledLogoWrapper>
);
};

export default CwmLogo;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/front-end/src/components/map/mapLibre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export const createMap = (

map.fire("changeLanguage", { language: getLanguageFromUrl() });

map.addControl(new AttributionControl(), "top-right");
map.addControl(new AttributionControl({ compact: true } ), "top-right");
map.addControl(new NavigationControl(), "top-right");
disableRotation(map);
});
Expand Down
1 change: 0 additions & 1 deletion apps/front-end/src/logo.svg

This file was deleted.

Loading