Skip to content

Commit 5ca31cc

Browse files
lidiazuinrecrwplay
andauthored
Fix cards (#288)
Co-authored-by: Neil Dewhurst <[email protected]>
1 parent fcb6222 commit 5ca31cc

File tree

3 files changed

+38
-12
lines changed

3 files changed

+38
-12
lines changed

preview-src/docs-hub.adoc

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
// :page-disablefeedback: true
88
:page-toclevels: -1
99

10-
[.cards.not-selectable]
10+
[.cards]
11+
1112
== Developer tools documentation
1213

1314
Use Neo4j tools to query and manage your databases, import data, and create graphical visualizations.
@@ -36,7 +37,7 @@ Write and execute Cypher queries and visualize the results in nodes and relation
3637
link:{docs-home}/browser-manual/[Neo4j Browser] +
3738
link:{docs-home}/aura/preview/query/introduction/[Query (Aura)]
3839

39-
[.display.card.selectable]
40+
[.selectable]
4041

4142
=== Neo4j Data Importer
4243

@@ -51,8 +52,9 @@ Learn how to model and import data to your Neo4j database.
5152

5253
[.link]
5354
link:{docs-home}/data-importer[]
55+
link:{docs-home}/data-importer[]
5456

55-
[.display.card.selectable]
57+
[.selectable]
5658

5759
=== Neo4j Desktop
5860

@@ -68,7 +70,7 @@ Learn how to experience Neo4j on your local desktop.
6870
[.link]
6971
link:{docs-home}/desktop-manual[]
7072

71-
[.display.card.selectable]
73+
[.selectable]
7274

7375
=== Neo4j Ops Manager
7476

@@ -82,4 +84,21 @@ Neo4j Ops Manager
8284
Learn how to monitor, administer, and operate all of the Neo4j DBMSs in an Enterprise with Neo4j Ops Manager.
8385

8486
[.link]
85-
link:{docs-home}/ops-manager[]
87+
link:{docs-home}/ops-manager[]
88+
89+
[.display.next-steps]
90+
== Keep exploring
91+
92+
Here are some recommended resources to get started with data visualization:
93+
94+
. link:https://neo4j.com/developer-blog/15-tools-for-visualizing-your-neo4j-graph-database/[*15 Tools for Visualizing Your Neo4j Graph Database*]
95+
+
96+
Read an overview of the graph visualization landscape.
97+
98+
. link:https://medium.com/neo4j/showing-charts-for-neo4j-query-results-using-amcharts-and-structr-efae0b7a04f0[*Showing Charts for Neo4j Query Results using amCharts and Structr*]
99+
+
100+
Learn how to render a bar chart based upon the example movies graph.
101+
102+
. link:https://medium.com/neo4j/working-with-neo4j-date-and-spatial-types-in-a-react-js-app-5475b5042b50[*Working With Neo4j Date And Spatial Types In A React.js App*]
103+
+
104+
Learn how to build a dashboard app with Neo4j, Mapbox, React, and Nivo Charts.

src/css/docs-ndl.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ body.docs-ndl.explainer .sectionbody > div.sect2 {
635635
border: 1px solid var(--panel-border-color);
636636
}
637637

638-
body.docs-ndl .cards .sect2 > a,
639-
body.docs-ndl .cards:not(.selectable) .sect2,
638+
body.docs-ndl .cards .sect2.selectable > a,
639+
body.docs-ndl .cards .sect2:not(.selectable),
640640
body.docs-ndl .lists .sect2 {
641641
overflow: hidden;
642642
display: flex;
@@ -651,7 +651,8 @@ body.docs-ndl .lists .sect2 {
651651
line-height: 2rem;
652652
}
653653

654-
body.docs-ndl .cards.selectable .sect2:hover {
654+
body.docs-ndl .cards.selectable .sect2:hover,
655+
body.docs-ndl .cards .sect2.selectable:hover {
655656
transition: 0.1s linear;
656657
border: 1px solid var(--page-version-missing-font-color);
657658
box-shadow: 0 1px 2px 0 rgba(26, 27, 29, 0.18);
@@ -825,7 +826,7 @@ body.docs-ndl .cards .sect2 .paragraph:not(.icon) {
825826
}
826827

827828
body.docs-ndl .cards .sect2.selectable .paragraph.link {
828-
display: flex;
829+
display: none;
829830
}
830831

831832
body.docs-ndl .cards.selectable .sect2 .paragraph.link,

src/js/70-docs-ndl.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ document.addEventListener('DOMContentLoaded', function () {
77
}
88
}
99

10+
// if a card is 'selectable' then make it a click target
11+
// by taking the link from the card and wrapping the whole card in an anchor tag with that link
12+
// if the card contains more than one link, the first link is used
13+
// css hides the link div in selectable cards
1014
var makeClickable = function (card) {
11-
var links = card.querySelectorAll('div.sect2:not(.not-selectable) div.link')
15+
var links = card.querySelectorAll('div.link')
1216
links.forEach(function (link) {
1317
var target = link.querySelector('a').getAttribute('href')
1418
var card = link.parentElement
@@ -43,8 +47,10 @@ document.addEventListener('DOMContentLoaded', function () {
4347
a.remove()
4448
})
4549

46-
// Add links to cards
47-
document.querySelectorAll('.cards.selectable')
50+
// Add links to selectable cards
51+
// all cards in a cards.selectable container are clickable
52+
// cards in a .cards container are clickable if the card has .selectable
53+
document.querySelectorAll('.cards .selectable, .cards.selectable .sect2')
4854
.forEach(makeClickable)
4955

5056
// Move labels to the icon div to position them

0 commit comments

Comments
 (0)