Navbar, padding fixes

This commit is contained in:
Aaron Carlino 2019-11-20 11:15:37 +13:00
parent a9fb1766b6
commit 480331ac8c
2 changed files with 18 additions and 3 deletions

View File

@ -21,7 +21,7 @@ body {
}
.docs-sidebar {
display: block;
top: 95px;
top: 65px;
@include box-shadow(none);
}
@ -195,6 +195,9 @@ h1, h2, h3 {
transform: translateX(0);
}
}
.docs-article {
padding: 2rem 0;
}
}
@media (max-width: 640px) {
@ -230,5 +233,5 @@ code[class*="language-"], pre[class*="language-"] {
}
.api-link {
border-bottom: 1px dashed $gray-700;
text-decoration: underline;
}

View File

@ -30,7 +30,7 @@ const rewriteLink = (
const currentNode = getCurrentNode();
const version = getCurrentVersion();
// api links
// shorthand api links
if (href.match(/^api\:/)) {
const newHref = rewriteAPILink(href);
return createElement(
@ -44,6 +44,18 @@ const rewriteLink = (
);
}
// explicit API links
if (href.match(/api\.silverstripe\.org/)) {
return createElement(
'a',
{
className: 'api-link',
href,
target: '_blank',
}
)
}
// absolute links
if (href.match(/^https?/)) {
return createElement(