Skip to content

Commit

Permalink
Merge pull request #49 from biolab/feature/trailing-slash
Browse files Browse the repository at this point in the history
Fix links and image paths
  • Loading branch information
mitjapotocin authored Oct 23, 2023
2 parents 04bb0b4 + da3d14d commit c5acc22
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
1 change: 1 addition & 0 deletions components/Navbar/Navbar.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled from "styled-components";
import device from "@styles/utils/breakpoints";

export const Nav = styled.nav`
z-index: 100;
height: 80px;
background: #fff;
box-shadow: 0px 4px 10px 4px rgba(0, 0, 0, 0.04);
Expand Down
7 changes: 6 additions & 1 deletion components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ export default function Navbar() {
<Styled.Nav>
<Adapt>
<Styled.NavInner>
<Link href="/">
<Link
onClick={() => {
setNavOpened(false);
}}
href="/"
>
<Image
className="img-logo"
src={LogoImage.src}
Expand Down
4 changes: 2 additions & 2 deletions components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const useOutsideClick = (
const getPath = (url: string, _type: string) => {
switch (_type) {
case "blog":
return `/blog/${url}`;
return `/blog/${url}/`;
case "widget":
return `/widget-catalog/${url}`;
return `/widget-catalog/${url}/`;
default:
return `/${url}`;
}
Expand Down
28 changes: 14 additions & 14 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"menu": [
{
"name": "Examples",
"url": "/examples"
"url": "/examples/"
},
{
"name": "Download",
"url": "/download"
"url": "/download/"
},
{
"name": "Blog",
"url": "/blog"
"url": "/blog/"
},
{
"name": "Docs",
"url": "/docs"
"url": "/docs/"
},
{
"name": "Workshops",
"url": "/workshops"
"url": "/workshops/"
}
],
"footer": [
Expand All @@ -28,23 +28,23 @@
"pages": [
{
"name": "FAQ",
"url": "/faq"
"url": "/faq/"
},
{
"name": "License",
"url": "/license"
"url": "/license/"
},
{
"name": "Privacy",
"url": "/privacy"
"url": "/privacy/"
},
{
"name": "Citation",
"url": "/citation"
"url": "/citation/"
},
{
"name": "Contact",
"url": "/contact"
"url": "/contact/"
}
]
},
Expand All @@ -53,11 +53,11 @@
"pages": [
{
"name": "Windows",
"url": "/download#win"
"url": "/download/#win"
},
{
"name": "Mac OS",
"url": "/download#mac"
"url": "/download/#mac"
}
]
},
Expand Down Expand Up @@ -91,11 +91,11 @@
"pages": [
{
"name": "Get started",
"url": "/getting-started"
"url": "/getting-started/"
},
{
"name": "Widgets",
"url": "/widget-catalogue"
"url": "/widget-catalogue/"
},
{
"name": "Scripting",
Expand Down
2 changes: 1 addition & 1 deletion pages/widget-catalog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MainLayout from "@components/UiKit/MainLayout";
import slugify from "@utils/slugify";

const getIconWebpPath = (icon: string) => {
return `widget-catalog/${icon}`
return `/widget-catalog/${icon}`
.replace("widget-icons", "widget-icons/__webp-images__")
.replace(".png", ".webp");
};
Expand Down
4 changes: 2 additions & 2 deletions public/faq/_index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Before submitting a new feature request, check if someone has already requested
</AccordionItem>

<AccordionItem header="I wish to propose a collaboration and/or a project with the Orange team.">
Please submit a <a href="/contact">contact request</a> and we will respond as
Please submit a <a href="/contact/">contact request</a> and we will respond as
soon as we can.
</AccordionItem>

Expand Down Expand Up @@ -113,7 +113,7 @@ We also provide an e-mail course (<Link url="https://biolab.us15.list-manage.com
<AccordionItem header="How to teach with Orange?">
We are preparing materials that will show you how to teach with Orange. Stayed
tuned for details! In the meantime, see some examples on our{" "}
<Link url="/blog?tag=education" name="blog" />.
<Link url="/blog/?tag=education" name="blog" />.
</AccordionItem>
</Accordion>

Expand Down

0 comments on commit c5acc22

Please sign in to comment.