Skip to content

Commit 94e7911

Browse files
committed
resolves #10 add Asciidoctor frame-* and grid-* styles
1 parent 510aa29 commit 94e7911

File tree

5 files changed

+222
-24
lines changed

5 files changed

+222
-24
lines changed

preview-src/sandbox.png

382 KB
Loading

preview-src/tables.adoc

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
= Tables
2+
:nofooter:
3+
4+
.No striping
5+
// Alternative to stripes attributes is
6+
// setting role "stripes-none" as [.stripes-none,cols="1,2"].
7+
[stripes=none,cols="1,2"]
8+
|===
9+
| Name | Description
10+
11+
| Asciidoctor
12+
| *Awesome* way to write documentation
13+
14+
| Micronaut
15+
| Low resource usage and fast startup micro services
16+
|===
17+
18+
.All rows
19+
// Alternative to stripes attributes is
20+
// setting role "stripes-all" as [.stripes-all,cols="1,2"].
21+
[stripes=all,cols="1,2"]
22+
|===
23+
| Name | Description
24+
25+
| Asciidoctor
26+
| *Awesome* way to write documentation
27+
28+
| Micronaut
29+
| Low resource usage and fast startup micro services
30+
|===
31+
32+
.Odd rows
33+
// Alternative to stripes attributes is
34+
// setting role "stripes-odd" as [.stripes-odd,cols="1,2"].
35+
[stripes=odd,cols="1,2"]
36+
|===
37+
| Name | Description
38+
39+
| Asciidoctor
40+
| *Awesome* way to write documentation
41+
42+
| Micronaut
43+
| Low resource usage and fast startup micro services
44+
|===
45+
46+
.Even rows (default)
47+
// Alternative to stripes attributes is
48+
// setting role "stripes-even" as [.stripes-even,cols="1,2"].
49+
[stripes=even,cols="1,2"]
50+
|===
51+
| Name | Description
52+
53+
| Asciidoctor
54+
| *Awesome* way to write documentation
55+
56+
| Micronaut
57+
| Low resource usage and fast startup micro services
58+
|===
59+
60+
.Hover
61+
[stripes=hover,cols="1,2"]
62+
|===
63+
| Name | Description
64+
65+
| Asciidoctor
66+
| *Awesome* way to write documentation
67+
68+
| Micronaut
69+
| Low resource usage and fast startup micro services
70+
|===
71+
72+
.Table with top and bottom frame (topbot)
73+
[frame="topbot"]
74+
|===
75+
| Name | Description
76+
77+
| Asciidoctor
78+
| Awesome way to write documentation
79+
80+
|===
81+
82+
83+
.Table with no frame (none)
84+
[frame="none"]
85+
|===
86+
| Name | Description
87+
88+
| Asciidoctor
89+
| Awesome way to write documentation
90+
91+
|===
92+
93+
94+
.Table with only sides frame (sides)
95+
[frame="sides"]
96+
|===
97+
| Name | Description
98+
99+
| Asciidoctor
100+
| Awesome way to write documentation
101+
102+
|===
103+
104+
105+
.Table with default frame (all)
106+
[frame="all"]
107+
|===
108+
| Name | Description
109+
110+
| Asciidoctor
111+
| Awesome way to write documentation
112+
113+
|===
114+
115+
.Table with no grid (none)
116+
[grid="none", frame="none"]
117+
|===
118+
| Name | Description
119+
120+
| Asciidoctor
121+
| Awesome way to write documentation
122+
123+
|===
124+
125+
.Table with only columns grid (cols)
126+
[grid="cols", frame="none"]
127+
|===
128+
| Name | Description
129+
130+
| Asciidoctor
131+
| Awesome way to write documentation
132+
133+
|===
134+
135+
.Table with only rows grid (rows)
136+
[grid="rows", frame="none"]
137+
|===
138+
| Name | Description
139+
140+
| Asciidoctor
141+
| Awesome way to write documentation
142+
143+
|===
144+
145+
.Table with default rows and columns grid (all)
146+
[grid="all", frame="none"]
147+
|===
148+
| Name | Description
149+
150+
| Asciidoctor
151+
| Awesome way to write documentation
152+
153+
|===
154+
155+
== Setup and Cypher Refresher
156+
157+
[frame="none", cols="^.^,<.^"]
158+
|===
159+
a|image::sandbox.png[Neo4j Sandbox,width=500,align=center]
160+
a|
161+
Neo4j Sandbox is a hosted Neo4j tool that allows you to run private instances of Neo4j without having to install Neo4j locally. You can choose Neo4j Sandbox usecases that come pre-loaded with datasets and your Neo4j Sandbox instances can be accessed over the internet, making them useful for building sample applications. While Neo4j Browser is the primary way to interact with Neo4j instances hosted by Neo4j Sandbox, for this course you will also connect your sandbox instance to a simple web application.
162+
|===

preview-src/ui-model.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ page:
144144
- content: Training enrollement
145145
url: training-enrollment.html
146146
urlType: internal
147+
- content: Tables
148+
url: tables.html
149+
urlType: internal
147150

148151

149152
asciidoc:

src/css/doc.css

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,8 @@ body {
10021002
/* table-layout: fixed; */
10031003
}
10041004

1005-
.doc table.tableblock tr:last-child td {
1005+
.doc table.tableblock.frame-all tr:last-child td,
1006+
.doc table.tableblock.frame-ends tr:last-child td {
10061007
border-bottom: 3px solid var(--colour-grey-300);
10071008
}
10081009

@@ -1011,40 +1012,71 @@ body {
10111012
border-bottom: var(--colour-grey-200);
10121013
}
10131014

1014-
.doc .emphasis,
1015-
.doc .lead {
1016-
font-weight: 400;
1015+
.doc table.tableblock,
1016+
.doc table.tableblock > * > tr > * {
1017+
border: 0 solid var(--table-border-color);
10171018
}
10181019

1019-
/* .doc .listingblock.query {
1020-
margin-bottom: 0;
1020+
.doc table.grid-all > * > tr > * {
1021+
border-width: 1px;
10211022
}
1022-
.doc .listingblock.query code {
1023-
border-bottom-left-radius: 0;
1024-
border-bottom-right-radius: 0;
1023+
1024+
.doc table.grid-cols > * > tr > * {
1025+
border-width: 0 1px;
10251026
}
1026-
.doc .tableblock.result {
1027-
margin-top: 0;
1028-
color: var(--code-font-color);
1029-
background: var(--code-background);
1030-
border-bottom-left-radius: 0.25em;
1031-
border-bottom-right-radius: 0.25em;
1032-
overflow: hidden;
1033-
padding: .75rem;
1027+
1028+
.doc table.grid-rows > * > tr > * {
1029+
border-width: 1px 0;
10341030
}
10351031

1036-
.doc .tableblock.result th {
1037-
background: var(--colour-grey-200);
1032+
.doc table.grid-all > thead th,
1033+
.doc table.grid-rows > thead th {
1034+
border-bottom-width: 2.5px;
10381035
}
10391036

1040-
.doc .tableblock.result {
1037+
.doc table.frame-all {
1038+
border-width: 1px;
1039+
}
10411040

1041+
.doc table.frame-ends {
1042+
border-width: 1px 0;
10421043
}
1043-
*/
10441044

1045-
/* .doc .tabbed {
1046-
background: var(--colour-grey-100);
1047-
} */
1045+
.doc table.frame-sides {
1046+
border-width: 0 1px;
1047+
}
1048+
1049+
.doc table.frame-none > colgroup + * > :first-child > *,
1050+
.doc table.frame-sides > colgroup + * > :first-child > * {
1051+
border-top-width: 0;
1052+
}
1053+
1054+
.doc table.frame-sides > :last-child > :last-child > *,
1055+
.doc table.frame-none > :last-child > :last-child > * {
1056+
border-bottom-width: 0;
1057+
}
1058+
1059+
.doc table.frame-none > * > tr > :first-child,
1060+
.doc table.frame-ends > * > tr > :first-child {
1061+
border-left-width: 0;
1062+
}
1063+
1064+
.doc table.frame-none > * > tr > :last-child,
1065+
.doc table.frame-ends > * > tr > :last-child {
1066+
border-right-width: 0;
1067+
}
1068+
1069+
.doc table.stripes-all > tbody > tr,
1070+
.doc table.stripes-odd > tbody > tr:nth-of-type(odd),
1071+
.doc table.stripes-even > tbody > tr:nth-of-type(even),
1072+
.doc table.stripes-hover > tbody > tr:hover {
1073+
background: var(--table-stripe-background);
1074+
}
1075+
1076+
.doc .emphasis,
1077+
.doc .lead {
1078+
font-weight: 400;
1079+
}
10481080

10491081
:root {
10501082
--tabbed-border: 2px;

src/css/vars.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
--quote-attribution-font-color: var(--colour-grey-300);
225225
--sidebar-background: var(--colour-grey-300);
226226
--table-border-color: var(--panel-border-color);
227+
--table-stripe-background: var(--colour-grey-100);
227228

228229
/* footer */
229230
--footer-line-height: var(--doc-line-height);

0 commit comments

Comments
 (0)