diff --git a/frontend/src/markdown.css b/frontend/src/markdown.css index 5893441..e8277af 100644 --- a/frontend/src/markdown.css +++ b/frontend/src/markdown.css @@ -78,4 +78,11 @@ article { border-radius: 8px; max-height: 400px; } +} + +a.no-underline { + text-decoration: none; + &:hover { + text-decoration: none; + } } \ No newline at end of file diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index 57e3ad0..591c696 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -24,6 +24,7 @@ import { Turnstile } from "@marsidev/react-turnstile"; import Button from "../components/button.tsx"; import Badge, { BadgeAccent } from "../components/badge.tsx"; import Input from "../components/input.tsx"; +import {FaSteam} from "react-icons/fa"; export default function ResourcePage() { const params = useParams() @@ -240,16 +241,16 @@ function Article({ resource }: { resource: ResourceDetails }) { if (path.startsWith(window.location.origin)) { path = path.substring(window.location.origin.length) } + const content = child.children[0].innerHTML if (path.startsWith("/resources/")) { - const content = child.children[0].innerHTML const id = path.substring("/resources/".length) - for (let r of resource.related) { + for (const r of resource.related) { if (r.id.toString() === id) { child.children[0].classList.add("hidden") - let div = document.createElement("div") + const div = document.createElement("div") div.innerHTML = ` ${child.innerHTML} -
+
${r.image ? `
- {resource.article} + { + const href = props.href as string + if (href.startsWith("https://store.steampowered.com/app/")) { + return +
+ + {props.children} +
+
+ } + return {props.children} + } + }}>{resource.article}
}