Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit c802bff

Browse files
author
dpatanin
committed
add persistence provider to sidebar
1 parent 67ef13b commit c802bff

2 files changed

Lines changed: 40 additions & 12 deletions

File tree

src/scss/components/_sidebar.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ span {
6464
@include media-breakpoint-down(sm) {
6565
display: none;
6666
}
67-
width: 8vw;
67+
width: 10vw;
6868
background: $secureCodeBlue;
6969
height: 100vh;
7070
align-self: flex-start;
@@ -139,17 +139,13 @@ span {
139139
}
140140
}
141141
&.components {
142-
padding: 20px 0;
143142
}
144143
}
145144
.sidebar-header {
146145
padding: 20px;
147146
background: $highlight;
148-
width: auto;
149-
strong {
150-
display: none;
151-
font-size: 1.8em;
152-
}
147+
width: auto;
148+
font-size: 1.3rem;
153149
}
154150
}
155151
a[aria-expanded="true"] {

src/templates/integration.js

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import React from "react";
22
import { graphql, Link } from "gatsby";
33
import Layout from "../components/Layout";
44

5-
const Integration = ({ data }) => {
6-
const { title } = data.markdownRemark.frontmatter;
7-
const { html } = data.markdownRemark;
8-
const scanner = data.allMarkdownRemark.edges;
5+
const Integration = props => {
6+
const { title } = props.data.markdownRemark.frontmatter;
7+
const { html } = props.data.markdownRemark;
8+
const scanner = props.data.scanner.edges;
9+
const persistenceProvider = props.data.persistenceProvider.edges;
910

1011
return (
1112
<Layout bodyClass="integration">
1213
<div className="sidebar-wrapper">
1314
<nav className="sidebar">
15+
<h1 className="sidebar-header">Scanner</h1>
1416
<ul class="list-unstyled components">
1517
{scanner.map(scanner => (
1618
<li>
@@ -23,6 +25,19 @@ const Integration = ({ data }) => {
2325
</li>
2426
))}
2527
</ul>
28+
<h1 className="sidebar-header">Persistence provider</h1>
29+
<ul class="list-unstyled components">
30+
{persistenceProvider.map(persistenceProvider => (
31+
<li>
32+
<Link
33+
to={persistenceProvider.node.frontmatter.path}
34+
activeClassName="active-Link"
35+
>
36+
{persistenceProvider.node.frontmatter.title}
37+
</Link>
38+
</li>
39+
))}
40+
</ul>
2641
</nav>
2742

2843
<div id="content">
@@ -47,7 +62,7 @@ export const query = graphql`
4762
}
4863
html
4964
}
50-
allMarkdownRemark(
65+
scanner: allMarkdownRemark(
5166
filter: { frontmatter: { category: { eq: "scanner" } } }
5267
sort: { fields: [frontmatter___title], order: ASC }
5368
) {
@@ -64,6 +79,23 @@ export const query = graphql`
6479
}
6580
}
6681
}
82+
persistenceProvider: allMarkdownRemark(
83+
filter: {
84+
fileAbsolutePath: { regex: "/integrations/persistence-provider/" }
85+
}
86+
) {
87+
edges {
88+
node {
89+
frontmatter {
90+
title
91+
path
92+
category
93+
}
94+
id
95+
html
96+
}
97+
}
98+
}
6799
}
68100
`;
69101

0 commit comments

Comments
 (0)