summaryrefslogtreecommitdiff
path: root/spec/_includes
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-26 21:59:30 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-27 12:06:10 -0700
commit0261598fb49f4ac0509dac0c27f867861dc742a0 (patch)
tree4e196338408ce2cc7a672e941a7216071ba34a1b /spec/_includes
parent71c1716ae4f16a05825695a33d480ac194c5ae09 (diff)
downloadscala-0261598fb49f4ac0509dac0c27f867861dc742a0.tar.gz
scala-0261598fb49f4ac0509dac0c27f867861dc742a0.tar.bz2
scala-0261598fb49f4ac0509dac0c27f867861dc742a0.zip
Jekyll generated html in spec/ directory
To avoid confusion, removing artifacts for currently unsupported targets (pdf/single-page html). I'd like to bring those back, but in the mean time let's avoid distractions. Add Travis build.
Diffstat (limited to 'spec/_includes')
-rw-r--r--spec/_includes/numbering.css56
1 files changed, 56 insertions, 0 deletions
diff --git a/spec/_includes/numbering.css b/spec/_includes/numbering.css
new file mode 100644
index 0000000000..86b946354d
--- /dev/null
+++ b/spec/_includes/numbering.css
@@ -0,0 +1,56 @@
+// based on http://philarcher.org/css/numberheadings.css,
+h1 {
+ /* must reset here */
+ counter-reset: chapter {{ page.chapter }};
+}
+h1:before {
+ /* and must reset again here */
+ counter-reset: chapter {{ page.chapter }};
+ content: "Chapter " counter(chapter);
+ display: block;
+}
+
+h2 {
+ /* must increment here */
+ counter-increment: section;
+ counter-reset: subsection;
+}
+h2:before {
+ /* and must reset again here */
+ counter-reset: chapter {{ page.chapter }};
+
+ content: counter(chapter) "." counter(section) ;
+ display: inline;
+ margin-right: 1em;
+}
+h2:after {
+ /* can only have one counter-reset per tag, so can't do it in h2/h2:before... */
+ counter-reset: example;
+}
+
+h3 {
+ /* must increment here */
+ counter-increment: subsection;
+}
+h3:before {
+ /* and must reset again here */
+ counter-reset: chapter {{ page.chapter }};
+
+ content: counter(chapter) "." counter(section) "." counter(subsection);
+ display: inline;
+ margin-right: 1em;
+}
+
+h3[id*='example'] {
+ /* must increment here */
+ counter-increment: example;
+ display: inline;
+}
+h3[id*='example']:before {
+ /* and must reset again here */
+ counter-reset: chapter {{ page.chapter }};
+
+ content: "Example " counter(chapter) "." counter(section) "." counter(example);
+ display: inline;
+ margin-right: 1em;
+}