Skip to content

Commit

Permalink
Merge branch 'master' into accessibility-recs
Browse files Browse the repository at this point in the history
  • Loading branch information
recrwplay authored Apr 12, 2024
2 parents d0e9442 + b772b71 commit 43c0f3c
Show file tree
Hide file tree
Showing 26 changed files with 1,432 additions and 598 deletions.
2 changes: 2 additions & 0 deletions gulp.d/tasks/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const rollupPluginNodeResolve = require('@rollup/plugin-node-resolve').nodeResol
const rollupPluginCommonJS = require('@rollup/plugin-commonjs')
const rollupPluginBabel = require('@rollup/plugin-babel').babel
const rollupPluginTerser = require('rollup-plugin-terser').terser
const rollupPluginJSON = require('@rollup/plugin-json')

const toCamel = (s) => {
return s.replace(/([-_][a-z])/ig, ($1) => {
Expand Down Expand Up @@ -35,6 +36,7 @@ async function bundle (vinylFile) {
babelHelpers: 'bundled',
}),
rollupPluginTerser(),
rollupPluginJSON(),
],
onwarn: (warning) => {
if (warning.code === 'CIRCULAR_DEPENDENCY' && ignoredCircular.some((d) => warning.importer.includes(d))) {
Expand Down
1,066 changes: 605 additions & 461 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neo4j/docs-ui",
"version": "0.20.0",
"version": "0.23.3",
"description": "Produces the UI bundle for the Neo4j documentation site",
"homepage": "https://github.com/neo4j-documentation/docs-ui",
"license": "MPL-2.0",
Expand All @@ -18,6 +18,7 @@
"@gram-data/gram-d3": "^0.1.2",
"@rollup/plugin-babel": "^5.2.3",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"asciidoctor.js": "1.5.9",
"auth0-js": "^9.14.0",
Expand Down
20 changes: 20 additions & 0 deletions preview-src/banner-note.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= Note banner
:page-theme: docs
:page-banner: note
:page-banner-text: Lorem ipsum dolor sit est.
:page-banner-link: https://neo4j.com/docs
:page-banner-link-text: Link text


[abstract]
--
Add page banner attributes to a page to display a message between the header and the toolbar.
--

[source]
----
:page-banner: note
:page-banner-text: Lorem ipsum dolor sit est.
:page-banner-link: https://neo4j.com/docs
:page-banner-link-text: Link text
----
20 changes: 20 additions & 0 deletions preview-src/banner-warning.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= Warning banner
:page-theme: docs
:page-banner: warning
:page-banner-text: Lorem ipsum dolor sit est.
:page-banner-link: https://neo4j.com/docs
:page-banner-link-text: Link text


[abstract]
--
Add page banner attributes to a page to display a message between the header and the toolbar
--

[source]
----
:page-banner: warning
:page-banner-text: Lorem ipsum dolor sit est.
:page-banner-link: https://neo4j.com/docs
:page-banner-link-text: Link text
----
12 changes: 12 additions & 0 deletions preview-src/bibliography.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
= Use of `bibliography`

Citations with xreftext: <<Brandes2001>>, <<Brandes2007>>.

Citations without xreftext (ID only): <<Freeman1977>>.

[bibliography]
== References

* [[[Brandes2001, 1]]] Brandes, Ulrik. "A faster algorithm for betweenness centrality." _Journal of mathematical sociology_ 25, no. 2 (2001): 163-177. link:https://snap.stanford.edu/class/cs224w-readings/brandes01centrality.pdf[].
* [[[Brandes2007, 2]]] Brandes, Ulrik, and Christian Pich. "Centrality estimation in large networks." _International Journal of Bifurcation and Chaos_ 17, no. 07 (2007): 2303-2318. link:https://www.uni-konstanz.de/mmsp/pubsys/publishedFiles/BrPi07.pdf[].
* [[[Freeman1977]]] Freeman, Linton C. "A set of measures of centrality based on betweenness." _Sociometry_ (1977): 35-41.
127 changes: 112 additions & 15 deletions preview-src/docs-roles.adoc
Original file line number Diff line number Diff line change
@@ -1,16 +1,113 @@
= Docs `code test` flags
:page-role: not-on-aura
= Docs roles with a long title
:page-role: not-on-aura new-5.17
:page-theme: docs
:page-banner: warning
:page-banner-text: Lorem ipsum dolor sit est.
:page-banner-link: https://neo4j.com/docs
:page-banner-link-text: Link text
// :page-labels: fabric enterprise-edition alpha test

[abstract]
--
Flags sections as Not Available on Aura, Aura DB Enterprise, Enterprise Edition, Fabric, and Deprecated
--

Blocks with the appropriate roles have text appended.

[role=not-on-aura]
[role="label--new-5.17 label--enterprise-edition"]
== Relationship property type constraints

Blocks with the appropriate roles have labels added.

[discrete]
[role="label--new-5.17 label--enterprise-edition"]
=== (Discrete) H3 AuraDB Enterprise AND Not on Aura

Lorem ipsum dolor sit


[role=label--aura-db-enterprise label--not-on-aura]
=== H3 AuraDB Enterprise AND Not on Aura

Lorem ipsum dolor sit

Open blocks can be used to mark multiple paragraphs within a section.

[role=label--dynamic-5.17]
--
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna.

Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae! Lorem ipsum dolor sit amet, consectetur adipiscing elit.
--


This is a normal paragraph.

The next paragraph has a label, but it's not one we support.

[role=label--invented-label]
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

[role=label--enterprise-edition]
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna.

[role=label--deprecated-5.17]
. list with label
. item 2
. item 3

These labels from roles should be used for block elements only.
For inline elements, use a label.


=== Code

Intro para

[role=label--deprecated-5.17]
.Title
[source, shell]
----
How does a label look on a code block?
----


=== Examples

Intro para

[role=label--new-5.17]
.This is a short one
[example]
====
Lorem Ipsunm
====


=== Tables

Intro para

[[procedure_db_create_setVectorProperty]]
[role=label--admin-only label--deprecated-5.9]
.db.create.setVectorProperty()
[cols="<15s,<85"]
|===
| Description
a|
Set a vector property on a given node in a more space efficient representation than Cypher’s link:{neo4j-docs-base-uri}/cypher-manual/{page-version}/clauses/set#set-set-a-property[`SET`].
| Signature
m| db.create.setVectorProperty(node :: NODE, key :: STRING, vector :: LIST<FLOAT>) :: (node :: NODE)
| Mode
m|WRITE
| Replaced by
a|xref:reference/procedures.adoc#procedure_db_create_setNodeVectorProperty[`db.create.setNodeVectorProperty()`]
|===



[role=label--not-on-aura]
== Not on `code test` Aura

Lorem ipsum dolor `code test` sit
Expand Down Expand Up @@ -38,13 +135,13 @@ And so does this table
|===


[role=aura-db-enterprise]
[role=label--aura-db-enterprise]
== AuraDB Enterprise

Lorem ipsum dolor sit


[role=aura-db-enterprise not-on-aura]
[role=label--aura-db-enterprise label--not-on-aura]
== H2 AuraDB Enterprise AND Not on Aura

Lorem ipsum dolor sit
Expand All @@ -55,23 +152,23 @@ Lorem ipsum dolor sit
Lorem ipsum dolor sit


[role=aura-db-enterprise not-on-aura]
[role=label--aura-db-enterprise label--not-on-aura]
=== H3 AuraDB Enterprise AND Not on Aura

Lorem ipsum dolor sit

[role=aura-db-enterprise not-on-aura]
[role=label--aura-db-enterprise label--not-on-aura]
=== H4 show roles

Lorem ipsum dolor sit


[role=fabric]
[role=label--fabric]
== Fabric Heading

Lorem ipsum

[role=enterprise-edition]
[role=label--enterprise-edition]
== Enterprise Edition content

Lorem ipsum
Expand All @@ -82,7 +179,7 @@ Lorem ipsum

==== H4 inside labeled section

[role=deprecated]
[role=label--deprecated]
== Deprecated content

Other blocks can have deprecated roles added.
Expand All @@ -96,13 +193,13 @@ This is a second paragraph in the example.
This is the third.
====

[role=deprecated]
[role=label--deprecated]
.Example 2 title
====
Example 2 content - this example is deprecated
====

[role=alpha]
[role=label--alpha]
== Alpha content


Expand All @@ -116,7 +213,7 @@ For more information on algorithm tiers, see <<algorithms>>.
Lorem ipsum


[role=beta]
[role=label--beta]
== Beta content


Expand All @@ -131,7 +228,7 @@ For more information on algorithm tiers, see <<algorithms>>.
Lorem ipsum


[role=deprecated]
[role=label--deprecated]
== Deprecated content

Lorem ipsum
Expand Down
3 changes: 3 additions & 0 deletions preview-src/drivers-tabs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ GDS also uses tabs, but they have a different list of tab separators. Rather tha
[.tabbed-example]
====
[.include-with-macos]
[[mac-os-bit]]
======
Tab for macOS
======
[.include-with-linux]
[[linux-bit]]
======
Tab for Linux
======
Expand Down Expand Up @@ -105,6 +107,7 @@ Note that this requires that Go modules are enabled.
======
[.include-with-java]
[[java-bit]]
======

To use the Java driver, it is recommended employing a dependency manager, such as Maven or Gradle.
Expand Down
11 changes: 11 additions & 0 deletions preview-src/ui-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ page:
- content: Admonitions
url: admonitions.html
urlType: internal
- content: Page Banners
items:
- content: note
url: banner-note.html
urlType: internal
- content: warning
url: banner-warning.html
urlType: internal
- content: Labels
url: labels.html
urlType: internal
Expand Down Expand Up @@ -211,6 +219,9 @@ page:
- content: Algorithms
url: algorithms.html
urlType: internal
- content: Bibliography
url: bibliography.html
urlType: internal
- content: Private Page
url: private-page.html
urlType: internal
Expand Down
19 changes: 18 additions & 1 deletion src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ body {
.doc h4 code,
.doc h5 code,
.doc h6 code {
padding: 0.125em 0.25em;
padding: 0 0.25em;
background: var(--code-background);
}

Expand Down Expand Up @@ -146,6 +146,10 @@ body {
font-weight: 600;
}

.doc .header-label-container > div.labels {
padding-top: 0;
}

.doc h2:not(.discrete) {
font-size: 1.2rem;
}
Expand Down Expand Up @@ -184,6 +188,10 @@ body {
/* border-bottom: 1px solid var(--link_hover-font-color); */
}

.doc a:visited {
color: var(--link_visited-font-color);
}

.doc code a {
color: inherit;
}
Expand Down Expand Up @@ -670,6 +678,11 @@ body {
text-align: left;
}

.doc .tableblock caption {
display: table-caption;
margin-top: 0.25rem;
}

.hide-table-captions .doc .tableblock caption {
position: absolute;
left: -10000px;
Expand Down Expand Up @@ -1297,6 +1310,10 @@ body {
margin-bottom: 1.5rem;
}

.doc details summary {
cursor: pointer;
}

.doc details[open] summary {
font-weight: bold;
}
Expand Down
Loading

0 comments on commit 43c0f3c

Please sign in to comment.