Skip to content

Commit b8c364d

Browse files
committed
Experimenting with css and different org
Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com>
1 parent 9087fff commit b8c364d

10 files changed

Lines changed: 943 additions & 16 deletions

File tree

build-html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
#!/bin/bash
2-
asciidoctor -n -D html doc/server-workbench-console/server-workbench-console.adoc doc/migration-guide.adoc doc/programming/programming.adoc
2+
asciidoctor -n -D html doc/index.adoc
3+
asciidoctor -n -D html/server-workbench-console doc/server-workbench-console/index.adoc
4+
# cp -r doc/server-workbench-console/images html/server-workbench-console
5+
asciidoctor -n -D html/migration doc/migration/index.adoc
6+
asciidoctor -n -D html/programming doc/programming/index.adoc
7+
cp -r doc/programming/images html/programming

doc/css/rdf4j.css

Lines changed: 684 additions & 0 deletions
Large diffs are not rendered by default.

doc/index.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
= Eclipse RDF4J Documentation
2+
:stylesdir: css/
3+
:stylesheet: rdf4j.css
4+
:linkcss:
5+
6+
Welcome to the Eclipse RDF4J documentation site. This is a work in progress.
7+
8+
- link:migration[Sesame to RDF4J Migration Guide]
9+
- link:programming[Programming with RDF4J]
10+
- link:server-workbench-console[RDF4J Server, Workbench, and Console]

doc/migration/docinfo.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!-- Generate a nice TOC -->
2+
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
3+
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
4+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js"></script>
5+
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we neeed -->
6+
7+
<style>
8+
.tocify-header {
9+
font-style: italic;
10+
}
11+
12+
.tocify-subheader {
13+
font-style: normal;
14+
font-size: 90%;
15+
}
16+
17+
.tocify ul {
18+
margin: 0;
19+
}
20+
21+
.tocify-focus {
22+
color: #7a2518;
23+
background-color: rgba(0, 0, 0, 0.1);
24+
}
25+
26+
.tocify-focus > a {
27+
color: #7a2518;
28+
}
29+
</style>
30+
31+
<script type="text/javascript">
32+
$(function () {
33+
// Add a new container for the tocify toc into the existing toc so we can re-use its
34+
// styling
35+
$("#toc").append("<div id='generated-toc'></div>");
36+
$("#generated-toc").tocify({
37+
extendPage: true,
38+
context: "#content",
39+
highlightOnScroll: true,
40+
showAndHide: true,
41+
hideEffect: "slideUp",
42+
showEffect: "slideDown",
43+
// Use the IDs that asciidoc already provides so that TOC links and intra-document
44+
// links are the same. Anything else might confuse users when they create bookmarks.
45+
hashGenerator: function(text, element) {
46+
return $(element).attr("id");
47+
},
48+
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
49+
smoothScroll: false,
50+
// Set to 'none' to use the tocify classes
51+
theme: "none",
52+
// Handle book (may contain h1) and article (only h2 deeper)
53+
selectors: $( "#content" ).has( "h1" ).size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
54+
ignoreSelector: ".discrete"
55+
});
56+
57+
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
58+
// This is set to match the media selectors in the asciidoc CSS
59+
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
60+
// position which will cause odd scrolling behavior
61+
var handleTocOnResize = function() {
62+
if ($(document).width() < 768) {
63+
$("#generated-toc").hide();
64+
$(".sectlevel0").show();
65+
$(".sectlevel1").show();
66+
}
67+
else {
68+
$("#generated-toc").show();
69+
$(".sectlevel0").hide();
70+
$(".sectlevel1").hide();
71+
}
72+
}
73+
74+
$(window).resize(handleTocOnResize);
75+
handleTocOnResize();
76+
});
77+
</script>
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
= Sesame to RDF4J Migration Guide
2-
:source-highlighter: prettify
3-
:icons: font
4-
:imagesdir: images
5-
:sectnums:
6-
:toc: left
2+
include::../shared-settings.adoc[]
73
:toclevels: 4
84

95
Eclipse RDF4J is the successor of the OpenRDF Sesame project. The RDF4J framework and tools offer the same functionality, and will continue to be maintained and improved by the same team of developers as Sesame was, under Eclipse stewardship. For any users who wish to migrate their existing projects from Sesame to RDF4J (and we certainly urge you to do so quickly), here’s an overview of what has changed.

doc/programming/docinfo.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!-- Generate a nice TOC -->
2+
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
3+
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
4+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js"></script>
5+
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we neeed -->
6+
7+
<style>
8+
.tocify-header {
9+
font-style: italic;
10+
}
11+
12+
.tocify-subheader {
13+
font-style: normal;
14+
font-size: 90%;
15+
}
16+
17+
.tocify ul {
18+
margin: 0;
19+
}
20+
21+
.tocify-focus {
22+
color: #7a2518;
23+
background-color: rgba(0, 0, 0, 0.1);
24+
}
25+
26+
.tocify-focus > a {
27+
color: #7a2518;
28+
}
29+
</style>
30+
31+
<script type="text/javascript">
32+
$(function () {
33+
// Add a new container for the tocify toc into the existing toc so we can re-use its
34+
// styling
35+
$("#toc").append("<div id='generated-toc'></div>");
36+
$("#generated-toc").tocify({
37+
extendPage: true,
38+
context: "#content",
39+
highlightOnScroll: true,
40+
showAndHide: true,
41+
hideEffect: "slideUp",
42+
showEffect: "slideDown",
43+
// Use the IDs that asciidoc already provides so that TOC links and intra-document
44+
// links are the same. Anything else might confuse users when they create bookmarks.
45+
hashGenerator: function(text, element) {
46+
return $(element).attr("id");
47+
},
48+
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
49+
smoothScroll: false,
50+
// Set to 'none' to use the tocify classes
51+
theme: "none",
52+
// Handle book (may contain h1) and article (only h2 deeper)
53+
selectors: $( "#content" ).has( "h1" ).size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
54+
ignoreSelector: ".discrete"
55+
});
56+
57+
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
58+
// This is set to match the media selectors in the asciidoc CSS
59+
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
60+
// position which will cause odd scrolling behavior
61+
var handleTocOnResize = function() {
62+
if ($(document).width() < 768) {
63+
$("#generated-toc").hide();
64+
$(".sectlevel0").show();
65+
$(".sectlevel1").show();
66+
}
67+
else {
68+
$("#generated-toc").show();
69+
$(".sectlevel0").hide();
70+
$(".sectlevel1").hide();
71+
}
72+
}
73+
74+
$(window).resize(handleTocOnResize);
75+
handleTocOnResize();
76+
});
77+
</script>
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
Programming with RDF4J
22
======================
3-
:source-highlighter: prettify
4-
:icons: font
5-
:imagesdir: images
6-
:sectnums:
7-
:toc: left
3+
include::../shared-settings.adoc[]
84
:toclevels: 4
95

106
include::01-setup.adoc[leveloffset=+1]
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<!-- Generate a nice TOC -->
2+
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
3+
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
4+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tocify/1.9.0/javascripts/jquery.tocify.min.js"></script>
5+
<!-- We do not need the tocify CSS because the asciidoc CSS already provides most of what we neeed -->
6+
7+
<style>
8+
.tocify-header {
9+
font-style: italic;
10+
}
11+
12+
.tocify-subheader {
13+
font-style: normal;
14+
font-size: 90%;
15+
}
16+
17+
.tocify ul {
18+
margin: 0;
19+
}
20+
21+
.tocify-focus {
22+
color: #7a2518;
23+
background-color: rgba(0, 0, 0, 0.1);
24+
}
25+
26+
.tocify-focus > a {
27+
color: #7a2518;
28+
}
29+
</style>
30+
31+
<script type="text/javascript">
32+
$(function () {
33+
// Add a new container for the tocify toc into the existing toc so we can re-use its
34+
// styling
35+
$("#toc").append("<div id='generated-toc'></div>");
36+
$("#generated-toc").tocify({
37+
extendPage: true,
38+
context: "#content",
39+
highlightOnScroll: true,
40+
showAndHide: true,
41+
hideEffect: "slideUp",
42+
showEffect: "slideDown",
43+
// Use the IDs that asciidoc already provides so that TOC links and intra-document
44+
// links are the same. Anything else might confuse users when they create bookmarks.
45+
hashGenerator: function(text, element) {
46+
return $(element).attr("id");
47+
},
48+
// Smooth scrolling doesn't work properly if we use the asciidoc IDs
49+
smoothScroll: false,
50+
// Set to 'none' to use the tocify classes
51+
theme: "none",
52+
// Handle book (may contain h1) and article (only h2 deeper)
53+
selectors: $( "#content" ).has( "h1" ).size() > 0 ? "h1,h2,h3,h4,h5" : "h2,h3,h4,h5",
54+
ignoreSelector: ".discrete"
55+
});
56+
57+
// Switch between static asciidoc toc and dynamic tocify toc based on browser size
58+
// This is set to match the media selectors in the asciidoc CSS
59+
// Without this, we keep the dynamic toc even if it is moved from the side to preamble
60+
// position which will cause odd scrolling behavior
61+
var handleTocOnResize = function() {
62+
if ($(document).width() < 768) {
63+
$("#generated-toc").hide();
64+
$(".sectlevel0").show();
65+
$(".sectlevel1").show();
66+
}
67+
else {
68+
$("#generated-toc").show();
69+
$(".sectlevel0").hide();
70+
$(".sectlevel1").hide();
71+
}
72+
}
73+
74+
$(window).resize(handleTocOnResize);
75+
handleTocOnResize();
76+
});
77+
</script>

doc/server-workbench-console/server-workbench-console.adoc renamed to doc/server-workbench-console/index.adoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
RDF4J Server, Workbench, and Console
22
====================================
3-
:source-highlighter: prettify
4-
:icons: font
5-
:imagesdir: images
6-
:sectnums:
7-
:toc: left
3+
include::../shared-settings.adoc[]
84
:toclevels: 3
95

106
include::01-install.adoc[leveloffset=+1]

doc/shared-settings.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:stylesdir: ../css/
2+
:stylesheet: rdf4j.css
3+
:linkcss:
4+
:source-highlighter: prettify
5+
:icons: font
6+
:imagesdir: images
7+
:sectnums:
8+
:toc: left
9+
:docinfo1:

0 commit comments

Comments
 (0)