From a0d7a22e85bf8283eb275ebd4fb64eaade97565d Mon Sep 17 00:00:00 2001 From: xaralis <filip.varecha@fragaria.cz> Date: Tue, 15 Dec 2020 14:06:29 +0100 Subject: [PATCH] fix: styleguide url slash handling --- .env | 2 +- public/index.html | 16 ++++++++-------- src/components/Footer.jsx | 2 +- src/components/Navbar.jsx | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.env b/.env index 17a17b3..66bbe2a 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -REACT_APP_STYLEGUIDE_URL=http://localhost:3001/ +REACT_APP_STYLEGUIDE_URL=http://localhost:3001 diff --git a/public/index.html b/public/index.html index 88f032b..237ae68 100644 --- a/public/index.html +++ b/public/index.html @@ -3,15 +3,15 @@ <head> <meta charset="utf-8" /> <!-- Favicons --> - <link rel="apple-touch-icon" href="%REACT_APP_STYLEGUIDE_URL%images/favicons/favicon-196x196.png"> - <link rel="icon" type="image/png" href="%REACT_APP_STYLEGUIDE_URL%images/favicons/favicon-196x196.png" sizes="196x196"> + <link rel="apple-touch-icon" href="%REACT_APP_STYLEGUIDE_URL%/images/favicons/favicon-196x196.png"> + <link rel="icon" type="image/png" href="%REACT_APP_STYLEGUIDE_URL%/images/favicons/favicon-196x196.png" sizes="196x196"> <meta name="application-name" content="CF2021"> <meta name="msapplication-TileColor" content="#000000"> - <meta name="msapplication-TileImage" content="%REACT_APP_STYLEGUIDE_URL%images/favicons/mstile-144x144.png"> - <meta name="msapplication-square70x70logo" content="%REACT_APP_STYLEGUIDE_URL%images/favicons/mstile-70x70.png"> - <meta name="msapplication-square150x150logo" content="%REACT_APP_STYLEGUIDE_URL%images/favicons/mstile-150x150.png"> - <meta name="msapplication-wide310x150logo" content="%REACT_APP_STYLEGUIDE_URL%images/favicons/mstile-310x150.png"> - <meta name="msapplication-square310x310logo" content="%REACT_APP_STYLEGUIDE_URL%images/favicons/mstile-310x310.png"> + <meta name="msapplication-TileImage" content="%REACT_APP_STYLEGUIDE_URL%/images/favicons/mstile-144x144.png"> + <meta name="msapplication-square70x70logo" content="%REACT_APP_STYLEGUIDE_URL%/images/favicons/mstile-70x70.png"> + <meta name="msapplication-square150x150logo" content="%REACT_APP_STYLEGUIDE_URL%/images/favicons/mstile-150x150.png"> + <meta name="msapplication-wide310x150logo" content="%REACT_APP_STYLEGUIDE_URL%/images/favicons/mstile-310x150.png"> + <meta name="msapplication-square310x310logo" content="%REACT_APP_STYLEGUIDE_URL%/images/favicons/mstile-310x310.png"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta property="og:url" content="https://cf2021.pirati.cz/" /> @@ -31,7 +31,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - <link rel="stylesheet" href="%REACT_APP_STYLEGUIDE_URL%css/styles.css" /> + <link rel="stylesheet" href="%REACT_APP_STYLEGUIDE_URL%/css/styles.css" /> <title>CF 2021 | Pirátská strana</title> </head> <body class="h-screen"> diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index f911e02..f062581 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -6,7 +6,7 @@ const Footer = () => { <div className="footer__main py-4 lg:py-16 container container--default"> <section className="footer__brand"> <img - src={`${process.env.REACT_APP_STYLEGUIDE_URL}images/logo-full-white.svg`} + src={`${process.env.REACT_APP_STYLEGUIDE_URL}/images/logo-full-white.svg`} alt="" className="w-32 md:w-40 pb-6" /> diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index f7557e3..1a908b2 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -24,7 +24,7 @@ const Navbar = () => { <div className="navbar__brand my-4 flex items-center lg:pr-8 lg:my-0"> <NavLink to="/"> <img - src={`${process.env.REACT_APP_STYLEGUIDE_URL}images/logo-round-white.svg`} + src={`${process.env.REACT_APP_STYLEGUIDE_URL}/images/logo-round-white.svg`} className="w-8" alt="Pirátská strana" /> -- GitLab