From 73845907a3fcf58c2c297ad9cec0f96a009f733f Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 14 Jul 2017 01:13:30 -0700 Subject: [PATCH] Add anchors for tags and operations --- src/core/components/operation.jsx | 15 ++++++++++----- src/core/components/operations.jsx | 7 ++++++- src/style/_layout.scss | 13 +++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/core/components/operation.jsx b/src/core/components/operation.jsx index 08934716..44321e25 100644 --- a/src/core/components/operation.jsx +++ b/src/core/components/operation.jsx @@ -154,11 +154,16 @@ export default class Operation extends PureComponent { return (
- {method.toUpperCase()} - - {path} - - + {method.toUpperCase()} + + e.preventDefault()} + href={`#/${isShownKey[1]}/${isShownKey[2]}`} > + {path} + + + { !showSummary ? null :
diff --git a/src/core/components/operations.jsx b/src/core/components/operations.jsx index 13fcd8ba..20f67418 100644 --- a/src/core/components/operations.jsx +++ b/src/core/components/operations.jsx @@ -66,7 +66,12 @@ export default class Operations extends React.Component { onClick={() => layoutActions.show(isShownKey, !showTag)} className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" } id={isShownKey.join("-")}> - {tag} + e.preventDefault()} + href={`#/${tag}`}> + {tag} + { !tagDescription ? null : { tagDescription } diff --git a/src/style/_layout.scss b/src/style/_layout.scss index 78e09249..dab425d9 100644 --- a/src/style/_layout.scss +++ b/src/style/_layout.scss @@ -632,3 +632,16 @@ section @include text_headline(); } } + +a.nostyle { + text-decoration: inherit; + color: inherit; + cursor: auto; + display: inline; + + &:visited { + text-decoration: inherit; + color: inherit; + cursor: auto; + } +}