Skip to content

Commit 8bf9fc3

Browse files
committed
Add a dark background card for eg NODES promo
1 parent 1474254 commit 8bf9fc3

File tree

4 files changed

+68
-5
lines changed

4 files changed

+68
-5
lines changed

preview-src/docs-ndl.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
[.cards.icon-l]
1010
== CTA cards
1111

12+
[.dark.nodes.selectable]
13+
=== Neo4j Online Developer Conference
14+
15+
[.icon]
16+
image:https://dist.neo4j.com/wp-content/uploads/20240514071251/node-24-logo.svg[]
17+
18+
[.description]
19+
Join us on November 7 for live and unique tech talks over 24 hours across all timezones
20+
21+
[.link]
22+
link:https://neo4j.registration.goldcast.io/events/03805ea9-fe3a-4cac-8c15-aa622666531a?utm_source=neodocs&utm_medium=banner&utm_campaign=std[Register]
23+
1224

1325
[.featured.label--featured]
1426
=== Deployment options

preview-src/docs-sub-hub.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ endif::[]
2424
This section is designed to help you learn how to import various types of data into Neo4j. From JSON to APIs to another database, you can retrieve data from nearly any source and use it to populate your graph.
2525

2626

27+
[.dark.nodes]
28+
=== Neo4j Online Developer Conference
29+
30+
[.icon]
31+
image:https://dist.neo4j.com/wp-content/uploads/20240514071251/node-24-logo.svg[]
32+
33+
[.description]
34+
Join us on November 7 for live and unique tech talks over 24 hours across all timezones
35+
36+
[.link]
37+
link:https://neo4j.registration.goldcast.io/events/03805ea9-fe3a-4cac-8c15-aa622666531a?utm_source=neodocs&utm_medium=banner&utm_campaign=std[Register]
38+
39+
40+
2741
[role=label--new-5.12]
2842
=== `LOAD CSV`
2943
[.icon]

src/css/docs-ndl.css

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ body.docs-ndl .cards .sect2 > a,
478478
body.docs-ndl .cards .sect2.not-selectable,
479479
body.docs-ndl .cards:not(.selectable) .sect2,
480480
body.docs-ndl .lists .sect2 {
481-
overflow: hidden;
481+
/* overflow: hidden; */
482482
position: relative;
483483
display: flex;
484484
flex-direction: column;
@@ -487,8 +487,21 @@ body.docs-ndl .lists .sect2 {
487487
/* justify-content: space-between; */
488488
gap: 1rem;
489489
/* min-width: 30%; */
490-
padding: 1rem;
490+
/* padding: 1rem; */
491491
/* margin: 0 1rem 1rem 0; */
492+
/* background: var(--color-white); */
493+
}
494+
495+
body.docs-ndl .cards .sect2.selectable > a,
496+
body.docs-ndl .cards .sect2.not-selectable,
497+
body.docs-ndl .cards:not(.selectable) .sect2:not(.selectable),
498+
body.docs-ndl .lists .sect2 {
499+
padding: 1rem;
500+
}
501+
502+
body.docs-ndl .cards .sect2.not-selectable:not(.dark),
503+
body.docs-ndl .cards .sect2:not(.dark) a,
504+
body.docs-ndl .cards:not(.selectable) .sect2:not(.dark) {
492505
background: var(--color-white);
493506
}
494507

@@ -498,6 +511,24 @@ body.docs-ndl .lists .sect2 {
498511
- graph-academy
499512
*/
500513

514+
body.docs-ndl .cards .sectionbody > div.sect2.dark a {
515+
background-image: url(https://dist.neo4j.com/wp-content/uploads/20240514071252/nodes-patterns.svg);
516+
background-position: center right;
517+
background-repeat: no-repeat;
518+
background-size: contain;
519+
background-color: var(--color-black);
520+
color: var(--color-white);
521+
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
522+
}
523+
524+
body.docs-ndl .cards .sect2.dark h3 {
525+
color: var(--color-white);
526+
}
527+
528+
body.docs-ndl .cards .sect2.nodes .icon img {
529+
width: 12rem;
530+
}
531+
501532
/* this would give a background image on cards marked with [.ga-promo] */
502533
body.docs-ndl .cards .sectionbody > div.sect2.graph-academy > a,
503534
body.docs-ndl .cards .sectionbody > div.sect2.graph-academy:not(.selectable) {

src/js/70-docs-ndl.js

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

10-
var makeClickable = function (card) {
11-
var links = card.querySelectorAll('div.sect2:not(.not-selectable) div.link')
10+
var makeClickable = function (cards) {
11+
var links
12+
if (cards.classList.contains('selectable')) {
13+
links = cards.querySelectorAll('div.sect2:not(.not-selectable) div.link')
14+
} else {
15+
links = cards.querySelectorAll('div.sect2.selectable div.link')
16+
}
17+
1218
links.forEach(function (link) {
1319
var target = link.querySelector('a').getAttribute('href')
1420
var card = link.parentElement
@@ -44,7 +50,7 @@ document.addEventListener('DOMContentLoaded', function () {
4450
})
4551

4652
// Add links to cards
47-
document.querySelectorAll('.cards.selectable')
53+
document.querySelectorAll('.cards')
4854
.forEach(makeClickable)
4955

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

0 commit comments

Comments
 (0)