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

Commit 71972ce

Browse files
committed
Add scanner hoverability and link the entire card
1 parent 04c3539 commit 71972ce

2 files changed

Lines changed: 19 additions & 21 deletions

File tree

src/pages/scanner/index.js

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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";
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';
66

77
const Scanner = props => {
88
const scanner = props.data.allMarkdownRemark.edges;
@@ -31,27 +31,18 @@ const Scanner = props => {
3131
{scanner.map(edge => (
3232
<div
3333
key={edge.node.id}
34-
className="col-12 col-md-6 col-lg-6 col-sm-12 mb-2"
34+
className="col-12 col-md-6 col-lg-6 col-sm-12 mb-2 no-highlight"
3535
>
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-
>
36+
<Link to={edge.node.frontmatter.path}>
37+
<div className="feature hoverable">
4738
<h2 className="feature-title">
4839
{edge.node.frontmatter.title}
4940
</h2>
50-
</Link>
51-
<div className="feature-content">
52-
<p>{edge.node.excerpt}</p>
41+
<div className="feature-content">
42+
<p>{edge.node.excerpt}</p>
43+
</div>
5344
</div>
54-
</div>
45+
</Link>
5546
</div>
5647
))}
5748
</div>

src/scss/components/_feature.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,12 @@
107107
margin-top: -1px;
108108
margin-bottom: 1px;
109109
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
110+
text-decoration: none;
111+
}
112+
}
113+
114+
.no-highlight {
115+
> a {
116+
text-decoration: none;
110117
}
111118
}

0 commit comments

Comments
 (0)