From c87733e07cb2ef70ecd92142f71054c343f570de Mon Sep 17 00:00:00 2001 From: Tommy Reynolds Date: Tue, 29 Nov 2005 21:42:28 +0000 Subject: Change default to the HTML "fedora-draft.css" stylesheet to reinforce that the rendering here is not meant to be the final production rendering. Provided the "bin/use-prod-css" to locally change HTML files to minic production-quality rendering. NOTE: draft watermarking does NOT PRINT unless the browser preferences enable background image printing. --- Makefile.common | 12 ++++++++---- bin/use-prod-css | 33 +++++++++++++++++++++++++++++++++ xsl/html-common-relnotes.xsl | 2 +- xsl/html-common.xsl | 2 +- 4 files changed, 43 insertions(+), 6 deletions(-) create mode 100755 bin/use-prod-css diff --git a/Makefile.common b/Makefile.common index 4b1ad3f..c397bda 100644 --- a/Makefile.common +++ b/Makefile.common @@ -64,7 +64,8 @@ ${TARGETS}:: # LANG=en.UTF-8 ${XMLTO} html -x $(XSLHTML) -o mydoc-en mydoc-en.xml # mkdir -p mydoc-en/stylesheet-images # cp ${FDPDIR}/docs-common/stylesheet-images/*.png mydoc-en/stylesheet-images/ -# cp ${FDPDIR}/docs-common/css/fedora.css mydoc-en/ +# cp ${FDPDIR}/docs-common/css/fedora*.css mydoc-en/ +# cp ${FDPDIR}/docs-common/images/watermark.png mydoc-en/ # mkdir -p mydoc-en/figs # cp -p figs/*-${LANG}.* mydoc-en/figs # but we do avoid copying EPS files since they are nonsense to the HTML world. @@ -76,7 +77,8 @@ ${DOCBASE}-$(1)/index.html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(DOCBASE)-$(1).xml mkdir -p $(DOCBASE)-$(1)/stylesheet-images/ cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images - cp ${FDPDIR}/docs-common/css/fedora.css $$(DOCBASE)-$(1)/ + cp ${FDPDIR}/docs-common/css/fedora*.css $$(DOCBASE)-$(1)/ + cp ${FDPDIR}/docs-common/images/watermark.png $${DOCBASE}-$(1)/ [ ! -d figs ] || ( \ mkdir -p ${DOCBASE}-$(1)/figs; \ find figs -type f -iname '*.*' -print | \ @@ -97,7 +99,8 @@ ${DOCBASE}-$(1).html:: ${DOCBASE}-$(1).xml $$(XMLEXTRAFILES-$(1)) ${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(DOCBASE)-$(1).xml mkdir -p stylesheet-images/ cp ${FDPDIR}/docs-common/stylesheet-images/*.png stylesheet-images/ - cp ${FDPDIR}/docs-common/css/fedora.css . + cp ${FDPDIR}/docs-common/css/fedora*.css . + cp ${FDPDIR}/docs-common/images/watermark.png . endef # html-nochunks:: $(foreach LANG,${LANGUAGES},$(DOCBASE)-$(LANG).html) @@ -133,9 +136,10 @@ $(foreach LANG,${LANGUAGES},$(eval $(call PDF_template,${LANG}))) define CLEAN_template ${DOCBASE}-$(1)-clean:: ${RM} -r ${DOCBASE}-$(1) - ${RM} -r ${DOCBASE}-$(1).html stylesheet-images fedora.css + ${RM} -r ${DOCBASE}-$(1).html stylesheet-images ${RM} -r ${DOCBASE}-$(1).pdf ${RM} -r ${DOCBASE}-$(1).tar.gz + ${RM} fedora*.css watermark.png endef # distclean clean:: $(foreach LANG,${LANGUAGES},${DOCBASE}-${LANG}-clean) diff --git a/bin/use-prod-css b/bin/use-prod-css new file mode 100755 index 0000000..5fa2a9e --- /dev/null +++ b/bin/use-prod-css @@ -0,0 +1,33 @@ +#!/bin/bash +######################################################################## +# Tommy.Reynolds +# International copyright secured (C) 2005, All rights reserved. +# This software is licensed under the GPL. +######################################################################## +# Do surgery on the *.html files to reference the production CSS stylesheet +# +# Use like this: +# +# use-prod-css /path/to/docdir +# +######################################################################## +USAGE="usage: $(basename $0) /path/to/docdir" +SILENT=yes +while getopts v c +do + case "${c}" in + v ) SILENT="";; + * ) echo "${USAGE}" >&2; exit 1;; + esac +done +shift $(expr ${OPTIND} - 1) +if [ $# -gt 1 ]; then + echo "${USAGE}" >&2 + exit 1 +fi +find ${1:-.} -iname '*.html' -print | +while read f; do + [ "${SILENT}" ] || echo ${f} + sed 's/href="fedora-draft.css"/href="fedora.css"/' ${f} >${f}.tmp + mv ${f}.tmp ${f} +done diff --git a/xsl/html-common-relnotes.xsl b/xsl/html-common-relnotes.xsl index 49564d9..c9ae686 100644 --- a/xsl/html-common-relnotes.xsl +++ b/xsl/html-common-relnotes.xsl @@ -30,7 +30,7 @@ disable for FC4 --> - + text/css diff --git a/xsl/html-common.xsl b/xsl/html-common.xsl index 826b59c..41270ef 100644 --- a/xsl/html-common.xsl +++ b/xsl/html-common.xsl @@ -25,7 +25,7 @@ procedure after - + text/css -- cgit