Skip to content

Commit

Permalink
zoom in svg by 1.3x in html
Browse files Browse the repository at this point in the history
  • Loading branch information
mli authored and astonzhang committed Dec 9, 2019
1 parent ce41b87 commit 6579c49
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 6 deletions.
7 changes: 1 addition & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ stage("Build and Publish") {
echo "Build HTML"
sh '''set -ex
conda activate d2l-en-build-${EXECUTOR_NUMBER}
rm -rf _build/rst
d2lbook build rst
# copy frontpage
cp frontpage/frontpage.html _build/rst/
d2lbook build html
cp frontpage/_images/* _build/html/_images/
./static/build_html.sh
'''
echo "Build PDF"
sh '''set -ex
Expand Down
16 changes: 16 additions & 0 deletions static/build_html.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

rm -rf _build/rst _build/html
d2lbook build rst
cp static/frontpage/frontpage.html _build/rst/
d2lbook build html
cp static/frontpage/_images/* _build/html/_images/

for fn in `find _build/html/_images/ -iname '*.svg' `; do
if [[ $fn == *'qr_'* ]]; then
continue
fi
echo "Zoom in $fn by 1.3x"
rsvg-convert -z 1.3 -f svg -o tmp.svg $fn
mv tmp.svg $fn
done
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.

0 comments on commit 6579c49

Please sign in to comment.