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

Feature/ndt 38/logo component #142

Merged
merged 5 commits into from
Nov 7, 2023
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
231 changes: 221 additions & 10 deletions pwa/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"private": true,
"description": "Product Website Template",
"author": "Conduction",
"keywords": [
"gatsby"
],
"keywords": ["gatsby"],
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
Expand All @@ -24,8 +22,8 @@
"prepare": "cd .. && husky install"
},
"dependencies": {
"@conduction/components": "2.2.18",
"@conduction/theme": "1.0.52",
"@conduction/components": "2.2.23",
"@conduction/theme": "1.0.53",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-brands-svg-icons": "6.4.2",
"@fortawesome/free-regular-svg-icons": "6.4.2",
Expand Down Expand Up @@ -57,7 +55,6 @@
"@nl-design-system-unstable/westervoort-design-tokens": "^1.0.0-alpha.100",
"@nl-design-system-unstable/zevenaar-design-tokens": "^1.0.0-alpha.100",
"@nl-design-system-unstable/zwolle-design-tokens": "^1.0.0-alpha.100",
"@parcel/watcher": "^2.3.0",
"@tabler/icons-react": "2.21.0",
"@types/qs": "^6.9.9",
"@types/react": "^18.0.28",
Expand Down Expand Up @@ -91,6 +88,7 @@
"showdown": "^2.1.0"
},
"devDependencies": {
"@parcel/watcher": "^2.3.0",
"@types/dateformat": "^5.0.0",
"@types/dedent": "^0.7.0",
"@types/node": "^17.0.23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
margin-top: 38px;
display: flex;
justify-content: space-between;
align-items: flex-end;
align-items: center;
}

.iconLeft {
Expand Down
31 changes: 10 additions & 21 deletions pwa/src/templates/templateParts/footer/FooterTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { navigate } from "gatsby-link";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCode, faHeart } from "@fortawesome/free-solid-svg-icons";
import { useTranslation } from "react-i18next";
import { Logo } from "@conduction/components";
import { IconPrefix, IconName } from "@fortawesome/fontawesome-svg-core";
import { useFooterContent } from "../../../hooks/footerContent";

Expand Down Expand Up @@ -78,7 +79,15 @@ export const FooterTemplate: React.FC = () => {
</div>

<div className={styles.logoAndConduction}>
<Logo />
{process.env.GATSBY_FOOTER_LOGO_URL !== "false" && (
<Logo
variant="footer"
onClick={() =>
process.env.GATSBY_FOOTER_LOGO_HREF ? open(process.env.GATSBY_FOOTER_LOGO_HREF) : navigate("/")
}
/>
)}

<WithLoveByConduction />
</div>
</div>
Expand Down Expand Up @@ -132,26 +141,6 @@ const DynamicSectionHeading: React.FC<{ content: TDynamicContentItem; heading?:
}
};

const Logo: React.FC = () => {
if (process.env.GATSBY_FOOTER_LOGO_URL === "false") return <></>;
const { t } = useTranslation();

return (
<div className={styles.imageContainer}>
<img
className={styles.image}
onClick={() =>
process.env.GATSBY_FOOTER_LOGO_HREF ? open(process.env.GATSBY_FOOTER_LOGO_HREF) : navigate("/")
}
src={process.env.GATSBY_FOOTER_LOGO_URL}
alt={t("Footer-logo")}
aria-label={`${t("Footer-logo")}, ${t("Can open a new window")}`}
tabIndex={0}
/>
</div>
);
};

const WithLoveByConduction: React.FC = () => {
const { t } = useTranslation();

Expand Down
13 changes: 0 additions & 13 deletions pwa/src/templates/templateParts/header/HeaderTemplate.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@
justify-content: space-between;
}

.imageContainer {
height: var(--utrecht-page-header-logo-max-height);
width: var(--utrecht-page-header-logo-max-width);
}

.image {
vertical-align: middle;
margin-inline-end: 10px;
width: 100%;
height: 100%;
object-fit: contain;
}

.image:hover {
cursor: pointer;
}
Expand Down
Loading
Loading