diff --git a/custom-theme/partials/header.html b/custom-theme/partials/header.html
deleted file mode 100644
index 4525cf27..00000000
--- a/custom-theme/partials/header.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
\ No newline at end of file
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 609b8b3a..15724974 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,12 +1,20 @@
-FROM oraclelinux:8
+FROM oraclelinux:8.6
+ARG TARGETPLATFORM
LABEL maintainer="philipp.salvisberg@trivadis.com"
LABEL description="Tools to generate HTML and PDF using Materials for MkDocs and wkhtmltopdf."
-LABEL build.command="docker build . --tag trivadis/mktools:latest"
+
+# To build a mulit-architecture image and push it to the docker registry (load is not supported)
+LABEL build.prepare.command="docker buildx create --use --name mktools"
+LABEL build.multiarch.command="docker buildx build --platform linux/amd64,linux/arm64 . --tag trivadis/mktools:latest --push"
+
+# To build a single-architecture image and load it into local docker images list (not possible for multi-architecture images)
+LABEL build.amd64.command="docker buildx build --platform linux/amd64 . --tag trivadis/mktools:latest --load"
+LABEL build.arm64.command="docker buildx build --platform linux/ard64 . --tag trivadis/mktools:latest --load"
# install python
RUN dnf -y update
-RUN dnf -y install python38 python38-pip
+RUN dnf -y install python39 python39-pip
# install git
RUN dnf -y install git
@@ -15,14 +23,23 @@ RUN dnf -y install git
# using "--root" should suppress "WARNING: Running pip install with root privileges is generally not a good idea." in future releases
RUN python3 -m pip install --upgrade pip --root /
RUN python3 -m pip install --root / \
- 'mkdocs==1.1.2' \
- 'mkdocs-material==6.2.8' \
- 'mkdocs-awesome-pages-plugin==2.5.0' \
- 'pymdown-extensions==8.1.1' \
- 'mike==0.5.5'
-
-# install wkhtmltox 0.12.6
-RUN dnf -y install https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm
+ 'mkdocs==1.3.1' \
+ 'mkdocs-material==8.3.9' \
+ 'mkdocs-awesome-pages-plugin==2.8.0' \
+ 'pymdown-extensions==9.5' \
+ 'mike==1.1.2' \
+ 'setuptools==63.4.2'
+
+# install wkhtmltox 0.12.6.1 r2
+RUN if [ "$TARGETPLATFORM" == "linux/amd64" ] ; \
+ then dnf -y install https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux8.x86_64.rpm ; \
+ else dnf -y install https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux8.aarch64.rpm ; \
+ fi
+
+# install Node.js, PostCSS Preset Env and csstools-cli (used to simplify CSS so that it is understood by wkhtmltopdf)
+RUN dnf -y module install nodejs:16
+RUN npm install postcss-preset-env -g
+RUN npm install @csstools/csstools-cli -g
# set environment
ENV LANG=en_US.utf8
diff --git a/docs/images/steven-feuerstein-signature.png b/docs/images/steven-feuerstein-signature.png
index 6e27469f..1a609bc0 100644
Binary files a/docs/images/steven-feuerstein-signature.png and b/docs/images/steven-feuerstein-signature.png differ
diff --git a/docs/images/urban-lankes-signature.png b/docs/images/urban-lankes-signature.png
index e2513b23..de654289 100644
Binary files a/docs/images/urban-lankes-signature.png and b/docs/images/urban-lankes-signature.png differ
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
index 07cb9369..aaf92518 100644
--- a/docs/stylesheets/extra.css
+++ b/docs/stylesheets/extra.css
@@ -1,5 +1,5 @@
-/* fix logo size */
-.md-header-nav__button.md-logo img, .md-header-nav__button.md-logo svg {
+/* fix logo size, align Trivadis with PL/SQL Guidelines */
+.md-header__button.md-logo :-webkit-any(img,svg) {
width: auto;
height: 46px;
padding-top: 10px;
diff --git a/mkdocs.yml b/mkdocs.yml
index 3e5284aa..7910e7f2 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -10,7 +10,6 @@ theme:
icon:
repo: fontawesome/brands/github-alt
name: 'material'
- custom_dir: custom-theme
favicon: images/favicon.ico
palette:
primary: 'white'
diff --git a/tools/run-in-container/genpdf.sh b/tools/run-in-container/genpdf.sh
index 0471f5c5..1530bca5 100755
--- a/tools/run-in-container/genpdf.sh
+++ b/tools/run-in-container/genpdf.sh
@@ -43,6 +43,19 @@ function fix_footnote_links() {
sed -e 's/a class="footnote-ref"/a /g' index.ori.html > index.html
}
+function fix_unsupported_css() {
+ mv index.html temp.html
+ sed -e 's|||g' temp.html > index.html
+ rm temp.html
+
+ OPTIONS='{"stage":false,"features":{"color-functional-notation":{"preserver":false}}}'
+ cp assets/stylesheets/main.1d29e8d0.min.css assets/stylesheets/main.1d29e8d0.min.ori.css
+ csstools-cli postcss-preset-env assets/stylesheets/main.1d29e8d0.min.css --replace --plugin-options ${OPTIONS}
+
+ cp assets/stylesheets/palette.cbb835fc.min.css assets/stylesheets/palette.cbb835fc.min.ori.css
+ csstools-cli postcss-preset-env assets/stylesheets/palette.cbb835fc.min.css --replace --plugin-options ${OPTIONS}
+}
+
function write_text(){
TEXT=$1
echo "" >> ${TARGET_DIR}/docs/index.md
@@ -58,7 +71,9 @@ function write_guidelines(){
sed -e "s|# |${HEADER} |g" $f | \
sed -e 's/..\/image/image/g' | \
sed -e 's|../../../../4-language-usage/3-dml-and-sql/3-transaction-control/g-3310|#g-3310-never-commit-within-a-cursor-loop|g' | \
- sed -e 's|../../../../4-language-usage/3-dml-and-sql/3-transaction-control/g-3320|#g-3320-try-to-move-transactions-within-a-non-cursor-loop-into-procedures|g' >> ${TARGET_DIR}/docs/index.md
+ sed -e 's|../../../../4-language-usage/3-dml-and-sql/3-transaction-control/g-3320|#g-3320-try-to-move-transactions-within-a-non-cursor-loop-into-procedures|g' | \
+ sed -e 's|../../../../4-language-usage/7-stored-objects/7-triggers/g-7740|#g-7740-never-handle-multiple-dml-events-per-trigger-if-primary-key-is-assigned-in-trigger|g' \
+ >> ${TARGET_DIR}/docs/index.md
done
}
@@ -72,6 +87,7 @@ function convert_to_pdf(){
mkdocs build
cd site
fix_footnote_links
+ fix_unsupported_css
wkhtmltopdf --enable-local-file-access \
--allow "." \
--disable-smart-shrinking \
@@ -93,6 +109,7 @@ function convert_to_pdf(){
toc \
--xsl-style-sheet stylesheets/toc.xsl \
index.html ${DATA_DIR}/docs/9-appendix/PLSQL-and-SQL-Coding-Guidelines.pdf
+ echo docs/9-appendix/PLSQL-and-SQL-Coding-Guidelines.pdf produced.
}
DATA_DIR="$(cd "$(dirname "${0}")/../.." && pwd)"