git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #37881 from grahamc/doc/svg-callouts

nixpkgs docs: Use SVGs for callouts

commit63406fa1cf98d500aaa0ad4735ff248d0727723b authorGraham Christensen <graham@grahamc.com> dateMon 26 Mar 2018, 16:01 (9 years ago) parent83624b9da17974
4 files changed+24−13
doc/Makefile+8−4 doc/default.nix+3−3 doc/overrides.css+8 doc/style.css+5−6
doc/Makefile+8−4
@@ -17,26 +17,30 @@ validate: manual-full.xml
1717
1818out/html/index.html: manual-full.xml style.css
1919 mkdir -p out/html
20− xsltproc $$xsltFlags \
20+ xsltproc ${xsltFlags} \
2121 --nonet --xinclude \
2222 --output $@ \
2323 "$$XSL/docbook/xhtml/docbook.xsl" \
2424 ./manual-full.xml
2525
26+ cp ./overrides.css out/html/
2627 cp ./style.css out/html/style.css
2728
2829 mkdir -p out/html/images/callouts
29− cp "$$XSL/docbook/images/callouts/"*.gif out/html/images/callouts/
30+ cp "$$XSL/docbook/images/callouts/"*.svg out/html/images/callouts/
3031 chmod u+w -R out/html/images/
3132
3233out/epub/manual.epub: manual-full.xml
3334 mkdir -p out/epub/scratch
34− xsltproc $$xsltFlags --nonet \
35+ xsltproc ${xsltFlags} --nonet \
3536 --output out/epub/scratch/ \
3637 "$$XSL/docbook/epub/docbook.xsl" \
3738 ./manual-full.xml
3839
39− cp "$$XSL/docbook/images/callouts/"*.gif out/epub/scratch/OEBPS
40+ cp ./overrides.css out/epub/scratch/OEBPS
41+ cp ./style.css out/epub/scratch/OEBPS
42+ mkdir -p out/epub/scratch/OEBPS/images/callouts/
43+ cp "$$XSL/docbook/images/callouts/"*.svg out/epub/scratch/OEBPS/images/callouts/
4044 echo "application/epub+zip" > mimetype
4145 zip -0Xq "out/epub/manual.epub" mimetype
4246 rm mimetype
doc/default.nix+3−3
@@ -16,11 +16,11 @@ pkgs.stdenv.mkDerivation {
1616 xsltFlags = lib.concatStringsSep " " [
1717 "--param section.autolabel 1"
1818 "--param section.label.includes.component.label 1"
19− "--param html.stylesheet 'style.css'"
19+ "--stringparam html.stylesheet 'style.css overrides.css'"
2020 "--param xref.with.number.and.title 1"
2121 "--param toc.section.depth 3"
22− "--param admon.style ''"
23− "--param callout.graphics.extension '.gif'"
22+ "--stringparam admon.style ''"
23+ "--stringparam callout.graphics.extension .svg"
2424 ];
2525
2626 postPatch = ''
doc/overrides.cssnew file+8
@@ -0,0 +1,8 @@
1+
2+.programlisting img {
3+ width: 1em;
4+}
5+
6+.calloutlist img {
7+ width: 1.5em;
8+}
doc/style.css+5−6
@@ -29,8 +29,8 @@ h2 /* chapters, appendices, subtitle */
2929}
3030
3131/* Extra space between chapters, appendices. */
32−div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
33−{
32+div.chapter > div.titlepage h2, div.appendix > div.titlepage h2
33+{
3434 margin-top: 1.5em;
3535}
3636
@@ -118,7 +118,6 @@ div.example pre.programlisting
118118 margin: 0 0 0 0;
119119}
120120
121−
122121/***************************************************************************
123122 Notes, warnings etc:
124123 ***************************************************************************/
@@ -172,7 +171,7 @@ div.navfooter *
172171
173172
174173/***************************************************************************
175− Links colors and highlighting:
174+ Links colors and highlighting:
176175 ***************************************************************************/
177176
178177a { text-decoration: none; }
@@ -209,7 +208,7 @@ tt, code
209208.term
210209{
211210 font-weight: bold;
212−
211+
213212}
214213
215214div.variablelist dd p, div.glosslist dd p
@@ -252,4 +251,4 @@ table
252251div.affiliation
253252{
254253 font-style: italic;
255−}
254+}