Browse Source

Datenquelle Button wird jetzt nur bei hinterlegter url angezeigt

main
Philipp Lohner 10 months ago
parent
commit
f1a5da3d0f
  1. 2
      src/Router.tsx
  2. BIN
      src/assets/fonts/PTS55F.ttf
  3. 20
      src/components/CategoryLink/CategoryLink.tsx
  4. 6
      src/components/navigation/Navigation.tsx
  5. 5
      src/index.scss

2
src/Router.tsx

@ -20,7 +20,7 @@ function Router() {
<Route path="/kategorien">
<Categories />
</Route>
<Route path="/partner">
<Route path="/beteiligte">
<Partners />
</Route>
<Route path="/datenschutz">

BIN
src/assets/fonts/PTS55F.ttf

Binary file not shown.

20
src/components/CategoryLink/CategoryLink.tsx

@ -30,15 +30,17 @@ const CategoryLink: React.FC<CategoryProps> = (category) => {
<div className="category-text">
<ReactMarkdown>{category.content}</ReactMarkdown>
</div>
<button
className="category-button"
onClick={(e) => {
e.preventDefault();
window.open(`${category.url}`, "_blank");
}}
>
<span>Zur Datenquelle</span> <ArrowForwardIcon />
</button>
{category.url && (
<button
className="category-button"
onClick={(e) => {
e.preventDefault();
window.open(`${category.url}`, "_blank");
}}
>
<span>Zur Datenquelle</span> <ArrowForwardIcon />
</button>
)}
</AccordionDetails>
</Accordion>
</div>

6
src/components/navigation/Navigation.tsx

@ -35,7 +35,7 @@ function MobileNav() {
Startseite
</NavLink>
<NavLink to={"/kategorien"}>Kategorien</NavLink>
<NavLink to={"/partner"}>Partner</NavLink>
<NavLink to={"/beteiligte"}>Beteiligte</NavLink>
</div>
<div className="mobile-container">
<Button
@ -63,8 +63,8 @@ function MobileNav() {
</NavLink>
</MenuItem>
<MenuItem className="menu-item">
<NavLink onClick={handleClose} to={"/partner"}>
Partner
<NavLink onClick={handleClose} to={"/beteiligte"}>
Beteiligte
</NavLink>
</MenuItem>
</Menu>

5
src/index.scss

@ -2,6 +2,11 @@
font-family: "bereit";
src: url(./assets/fonts/BereitBold-Oblique.woff);
}
@font-face {
font-family: "PT Sans";
src: url(./assets/fonts/PTS55F.ttf);
}
@import "./variables";
* {

Loading…
Cancel
Save