summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-03-26 14:04:19 -0400
committerGraham Christensen <graham@grahamc.com>2018-03-26 14:08:36 -0400
commita80856cec5811b9eb7778b157e5ea943db26e74b (patch)
treee1a4a72e305e73973bc4d0d0af3f0c5186af1e9e /doc
parent2b3ba40c03a87d2e9c3e1bff9f07da2c2a3e885a (diff)
downloadnixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar.gz
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar.bz2
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar.lz
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar.xz
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.tar.zst
nixpkgs-a80856cec5811b9eb7778b157e5ea943db26e74b.zip
nixpkgs docs: Use SVGs for callouts
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile10
-rw-r--r--doc/default.nix6
-rw-r--r--doc/style.css18
3 files changed, 22 insertions, 12 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 52d1f4630a8..714a2a3e273 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -17,7 +17,7 @@ validate: manual-full.xml
 
 out/html/index.html: manual-full.xml style.css
 	mkdir -p out/html
-	xsltproc $$xsltFlags \
+	xsltproc ${xsltFlags} \
 		--nonet --xinclude \
 		--output $@ \
 		"$$XSL/docbook/xhtml/docbook.xsl" \
@@ -26,17 +26,19 @@ out/html/index.html: manual-full.xml style.css
 	cp ./style.css out/html/style.css
 
 	mkdir -p out/html/images/callouts
-	cp "$$XSL/docbook/images/callouts/"*.gif out/html/images/callouts/
+	cp "$$XSL/docbook/images/callouts/"*.svg out/html/images/callouts/
 	chmod u+w -R out/html/images/
 
 out/epub/manual.epub: manual-full.xml
 	mkdir -p out/epub/scratch
-	xsltproc $$xsltFlags --nonet \
+	xsltproc ${xsltFlags} --nonet \
 		--output out/epub/scratch/ \
 		"$$XSL/docbook/epub/docbook.xsl" \
 		./manual-full.xml
 
-	cp "$$XSL/docbook/images/callouts/"*.gif out/epub/scratch/OEBPS
+	cp ./style.css out/epub/scratch/OEBPS
+	mkdir -p out/epub/scratch/OEBPS/images/callouts/
+	cp "$$XSL/docbook/images/callouts/"*.svg out/epub/scratch/OEBPS/images/callouts/
 	echo "application/epub+zip" > mimetype
 	zip -0Xq "out/epub/manual.epub" mimetype
 	rm mimetype
diff --git a/doc/default.nix b/doc/default.nix
index 5869920415c..a8f0e935bae 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -16,11 +16,11 @@ pkgs.stdenv.mkDerivation {
   xsltFlags = lib.concatStringsSep " " [
     "--param section.autolabel 1"
     "--param section.label.includes.component.label 1"
-    "--param html.stylesheet 'style.css'"
+    "--stringparam html.stylesheet 'style.css'"
     "--param xref.with.number.and.title 1"
     "--param toc.section.depth 3"
-    "--param admon.style ''"
-    "--param callout.graphics.extension '.gif'"
+    "--stringparam admon.style ''"
+    "--stringparam callout.graphics.extension .svg"
   ];
 
   postPatch = ''
diff --git a/doc/style.css b/doc/style.css
index ac76a64bbb2..fe38986c118 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -29,8 +29,8 @@ h2 /* chapters, appendices, subtitle */
 }
 
 /* Extra space between chapters, appendices. */
-div.chapter > div.titlepage h2, div.appendix > div.titlepage h2 
-{ 
+div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
+{
     margin-top: 1.5em;
 }
 
@@ -118,6 +118,14 @@ div.example pre.programlisting
     margin: 0 0 0 0;
 }
 
+.programlisting img {
+    width: 1em;
+}
+
+
+.calloutlist img {
+    width: 1.5em;
+}
 
 /***************************************************************************
                                Notes, warnings etc:
@@ -172,7 +180,7 @@ div.navfooter *
 
 
 /***************************************************************************
-                        Links colors and highlighting: 
+                        Links colors and highlighting:
  ***************************************************************************/
 
 a { text-decoration: none; }
@@ -209,7 +217,7 @@ tt, code
 .term
 {
     font-weight: bold;
-    
+
 }
 
 div.variablelist dd p, div.glosslist dd p
@@ -252,4 +260,4 @@ table
 div.affiliation
 {
     font-style: italic;
-}
\ No newline at end of file
+}