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

Commit 2a828b5

Browse files
author
dpatanin
committed
add excerpts to scanner and link pages
1 parent 27f7a61 commit 2a828b5

10 files changed

Lines changed: 67 additions & 53 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
This repository sources the [secureCodeBox landing page][prod-website].
44

5-
The actual content of the static site is in `src/www/`.
6-
75
## Build and Run
86

97
For development:

gatsby-config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ module.exports = {
6060
name: "Docs",
6161
// link: '/docs',
6262
link: "https://github.com/secureCodeBox/secureCodeBox/tree/master/docs"
63-
}
64-
// {
65-
// name: 'Scanner',
66-
// link: '/scanner',
67-
// },
63+
},
64+
{
65+
name: 'Scanner',
66+
link: '/scanner',
67+
},
6868
]
6969
},
7070

gatsby-node.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ exports.createPages = ({ graphql, actions }) => {
4444
node {
4545
frontmatter {
4646
title
47+
path
48+
category
4749
}
4850
id
51+
excerpt
4952
}
5053
}
5154
}
@@ -74,7 +77,7 @@ exports.createPages = ({ graphql, actions }) => {
7477
result.data.scanner.edges.forEach(({ node }) => {
7578
const component = path.resolve("src/templates/scanner.js");
7679
createPage({
77-
path: "/scanner/" + node.frontmatter.title,
80+
path: node.frontmatter.path,
7881
component,
7982
context: {
8083
id: node.id

src/components/Menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const Menu = (props) => {
1111
{menuLinks.map(link => (
1212
<li key={link.name}>
1313
{/* <Link to={link.link}>{link.name}</Link> */}
14-
<a href={link.link} target="_blank">{link.name}</a>
14+
<a href={link.link}>{link.name}</a>
1515
</li>
1616
))}
1717
{json.map(edge =>(

src/components/SEO.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Helmet from 'react-helmet';
33
import { StaticQuery, graphql } from 'gatsby';
44
import favicon from '../../static/Favicon@1x.svg';
55

6-
// TODO: Fix favicon
76
const SEO = props => (
87
<StaticQuery
98
query={detailsQuery}

src/pages/scanner/index.js

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React from 'react';
2-
import { graphql } from 'gatsby';
3-
import SEO from '../../components/SEO';
4-
import Layout from '../../components/Layout';
1+
import React from "react";
2+
import { graphql } from "gatsby";
3+
import { Link } from "gatsby";
4+
import SEO from "../../components/SEO";
5+
import Layout from "../../components/Layout";
56

6-
const Scanner = (props) => {
7+
const Scanner = props => {
78
const scanner = props.data.allMarkdownRemark.edges;
89
return (
910
<Layout bodyClass="page-scanner">
@@ -13,47 +14,67 @@ const Scanner = (props) => {
1314
<div className="row">
1415
<div className="col-12">
1516
<h1>Scanner</h1>
17+
<h2>Out of the Box</h2>
18+
<p>
19+
Each Scanner is an individual tool. We took no part in building
20+
them and did not adjust them for our purposes, which is great,
21+
because, like so we can provide them as they are and ready for
22+
use.
23+
</p>
1624
</div>
1725
</div>
1826
</div>
1927
</div>
2028

21-
<div className="container pb-6">
22-
{/* <div className="row">
23-
{testimonials.map(edge => (
24-
<div key={edge.node.frontmatter.path} className="col-12 col-md-6 mb-1">
25-
<div className="testimonial">
26-
<div className="testimonials-meta">
27-
<h2 className="testimonials-title">{edge.node.frontmatter.title}</h2>
28-
<p className="testimonials-name">{edge.node.frontmatter.name}</p>
29-
<p className="testimonials-jobtitle">{edge.node.frontmatter.jobtitle}</p>
29+
<div className="container pb-2 pb-md-3">
30+
<div className="row justify-content-center">
31+
{scanner.map(edge => (
32+
<div
33+
key={edge.node.id}
34+
className="col-12 col-md-6 col-lg-6 col-sm-12 mb-2"
35+
>
36+
<div className="feature">
37+
{/* TODO add images
38+
{edge.node.image && (
39+
<div className="feature-image">
40+
<img src={withPrefix(edge.node.image)} />
41+
</div>
42+
)} */}
43+
<Link
44+
to={edge.node.frontmatter.path}
45+
46+
>
47+
<h2 className="feature-title">
48+
{edge.node.frontmatter.title}
49+
</h2>
50+
</Link>
51+
<div className="feature-content">
52+
<p>{edge.node.excerpt}</p>
3053
</div>
31-
<div
32-
className="testimonials-content"
33-
dangerouslySetInnerHTML={{ __html: edge.node.html }}
34-
/>
3554
</div>
3655
</div>
3756
))}
38-
</div> */}
57+
</div>
3958
</div>
4059
</Layout>
4160
);
4261
};
4362

4463
export const query = graphql`
45-
query TestimonialsQuery {
64+
query ScannerQuery {
4665
allMarkdownRemark(
47-
filter: { fileAbsolutePath: { regex: "/scanner/" } }
48-
sort: { fields: [frontmatter___title], order: DESC }
66+
filter: { frontmatter: { category: { eq: "scanner" } } }
67+
sort: { fields: [frontmatter___title], order: ASC }
4968
) {
5069
edges {
5170
node {
5271
html
5372
frontmatter {
5473
title
5574
path
75+
category
5676
}
77+
excerpt
5778
}
5879
}
5980
}

src/pages/scanner/placeholder.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/scss/components/_feature.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
1919
height: auto;
2020
}
2121
.feature-title {
22+
color: $secondary;
2223
font-size: 1.4rem;
2324
font-weight: 300;
2425
line-height: 1.2;
2526
margin-top: 10px;
2627
}
2728
.feature-content {
2829
margin-bottom: 0;
29-
margin-top: auto;
3030
p {
3131
margin: 0;
32+
text-align: left;
33+
color: $secondary;
3234
strong {
33-
color: $secondary;
3435
text-transform: uppercase;
3536
font-size: 0.8rem;
3637
font-weight: 700;

src/templates/getStarted.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Layout from '../components/Layout';
66
const getStarted = ({ data }) => {
77
const { title } = data.markdownRemark.frontmatter;
88
const { html } = data.markdownRemark;
9+
const { excerpt } = data.markdownRemark;
910
return (
1011
<Layout bodyClass="page-getStarted">
1112
<SEO title={title} />
@@ -16,6 +17,7 @@ const getStarted = ({ data }) => {
1617
<div className="service service-single">
1718
<h1 className="title">{title}</h1>
1819
<div className="content" dangerouslySetInnerHTML={{ __html: html }} />
20+
<p>{excerpt}</p>
1921
</div>
2022
</div>
2123
</div>
@@ -32,6 +34,7 @@ export const query = graphql`
3234
title
3335
}
3436
html
37+
excerpt
3538
}
3639
}
3740
`;

src/templates/scanner.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@ const Scanner = ({ data }) => {
77
const { html } = data.markdownRemark;
88
return (
99
<Layout bodyClass="page-scanners">
10-
<div className="strip strip-white strip-diagonal">
11-
<div className="container pt-4 pt-md-10">
12-
<div className="row justify-content-start">
13-
<div className="col-12 col-md-8">
14-
<div className="testimonial testimonial-single">
15-
<h1 className="title">{title}</h1>
16-
<div
17-
className="content"
18-
dangerouslySetInnerHTML={{ __html: html }}
19-
/>
20-
</div>
21-
</div>
10+
<div className="container pt-4 pt-md-10">
11+
<div className="row justify-content-start">
12+
<div className="col-12 col-md-8">
13+
<h1 className="title">{title}</h1>
14+
<div
15+
className="content"
16+
dangerouslySetInnerHTML={{ __html: html }}
17+
/>
2218
</div>
2319
</div>
2420
</div>

0 commit comments

Comments
 (0)