Skip to content

Commit

Permalink
Use brand colors for deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 7, 2024
1 parent 1e9bdc8 commit 9d3814a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/components/Concept.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Markdown from "markdown-to-jsx"
import { Link } from "gatsby"
import JsonLink from "./JsonLink.jsx"
import { getConceptSchemes } from "../hooks/getConceptSchemes"
import { getConfigAndConceptSchemes } from "../hooks/configAndConceptSchemes.js"
import { useSkoHubContext } from "../context/Context.jsx"
import { i18n, getDomId, getFilePath } from "../common"
import ConceptURI from "./ConceptURI.jsx"
Expand All @@ -10,7 +10,7 @@ import { useEffect, useState } from "react"
const Concept = ({
pageContext: { node: concept, collections, customDomain },
}) => {
const conceptSchemes = getConceptSchemes()
const { config, conceptSchemes } = getConfigAndConceptSchemes()
const { data } = useSkoHubContext()
const [language, setLanguage] = useState("")

Expand All @@ -20,7 +20,9 @@ const Concept = ({

return (
<div className="content block main-block" id={getDomId(concept.id)}>
<h1 style={{ color: "red" }}>{concept.deprecated ? "Deprecated" : ""}</h1>
<h1 style={{ color: config.colors.skoHubAction }}>
{concept.deprecated ? "Deprecated" : ""}
</h1>
<h1>
{concept.notation && <span>{concept.notation.join(",")}&nbsp;</span>}
{i18n(language)(concept.prefLabel)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/nestedList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const NestedList = ({
// Function for handling highlighting
function handleHighlight(text, highlight) {
text = item.deprecated
? `<span style="color: red">(DEPRECATED)</span> ${text}`
? `<span style="color: ${config.colors.skoHubAction} ">(DEPRECATED)</span> ${text}`
: text
if (highlight) {
return text.replace(highlight, (str) => `<strong>${str}</strong>`)
Expand Down

0 comments on commit 9d3814a

Please sign in to comment.