commit a6929e88cf0dfb9e4852e8fc6a329a8ee781a6eb Author: Matthieu Jolimaitre Date: Fri Dec 13 17:56:39 2024 +0100 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2e7327 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/out diff --git a/css/a4-format-landscape.css b/css/a4-format-landscape.css new file mode 100644 index 0000000..030c30b --- /dev/null +++ b/css/a4-format-landscape.css @@ -0,0 +1,50 @@ +* { + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +html, +body { + padding: 0; + border: 0; + margin: 0; + background-color: #242424; +} + +#page { + zoom: 124.988%; + width: 29.7cm; + height: 21cm; + margin: 1cm auto; + background: white; + overflow: hidden; +} + +@page { + size: A4; +} + +@media print { + + @page { + margin: 0; + } + + html, + body { + background-color: unset; + zoom: 100%; + } + + #page { + margin: 0; + border: initial; + border-radius: initial; + box-shadow: initial; + background: initial; + overflow-y: hidden; + + transform-origin: center center; + transform: scale(0.939) rotate(90deg) translate(139px, 200px); + } +} \ No newline at end of file diff --git a/css/a4-format-portrait.css b/css/a4-format-portrait.css new file mode 100644 index 0000000..c63edc0 --- /dev/null +++ b/css/a4-format-portrait.css @@ -0,0 +1,47 @@ +* { + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +html, +body { + padding: 0; + border: 0; + margin: 0; + background-color: #242424; +} + +#page { + zoom: 124.988%; + width: 21cm; + height: 29.7cm; + margin: 1cm auto; + background: white; + overflow: hidden; +} + +@page { + size: A4; +} + +@media print { + + @page { + margin: 0; + } + + html, + body { + background-color: unset; + zoom: 100%; + } + + #page { + margin: 0; + border: initial; + border-radius: initial; + box-shadow: initial; + background: initial; + overflow-y: hidden; + } +} \ No newline at end of file diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..cd48782 --- /dev/null +++ b/generate.sh @@ -0,0 +1,30 @@ +#!/usr/bin/bash +set -e +cd "$(realpath "$(dirname "$0")")" + + +rm -fr './out' +mkdir -p './out' + + +(cd phoques; ls) | while read file +do + infos="$(echo "$file" | cut -d '.' -f 1)" + nam="$(echo "$infos" | cut -d '_' -f 1)" + ori="$(echo "$infos" | cut -d '_' -f 2)" + row="$(echo "$infos" | cut -d '_' -f 3)" + col="$(echo "$infos" | cut -d '_' -f 4)" + msg="$(echo "$infos" | cut -d '_' -f 5)" + + + echo "nam: '$nam', file: '$file', ori: '$ori', row: '$row', col: '$col', msg: '$msg'" + cat src/index.html \ + | sed "s/FILE/$file/g" \ + | sed "s/NAM/$nam/g" \ + | sed "s/ORI/$ori/g" \ + | sed "s/COL/$col/g" \ + | sed "s/ROW/$row/g" \ + | sed "s/MSG/$msg/g" \ + > "out/$nam.html" + chromium --headless --print-to-pdf="out/$nam.pdf" "out/$nam.html" +done diff --git a/phoques/000025253076_landscape_1_1_Laissez le phoque tranquille.jpg b/phoques/000025253076_landscape_1_1_Laissez le phoque tranquille.jpg new file mode 100644 index 0000000..decee5e Binary files /dev/null and b/phoques/000025253076_landscape_1_1_Laissez le phoque tranquille.jpg differ diff --git a/phoques/1304823_landscape_1_1_Épargnez-le.jpg b/phoques/1304823_landscape_1_1_Épargnez-le.jpg new file mode 100644 index 0000000..83e7140 Binary files /dev/null and b/phoques/1304823_landscape_1_1_Épargnez-le.jpg differ diff --git a/phoques/1660899711_landscape_2_1_Votez pas pour nous.jpg b/phoques/1660899711_landscape_2_1_Votez pas pour nous.jpg new file mode 100644 index 0000000..d0c7278 Binary files /dev/null and b/phoques/1660899711_landscape_2_1_Votez pas pour nous.jpg differ diff --git a/phoques/769165_landscape_1_2_On n'est pas venu ici pour être là.jpg b/phoques/769165_landscape_1_2_On n'est pas venu ici pour être là.jpg new file mode 100644 index 0000000..b4c8aa3 Binary files /dev/null and b/phoques/769165_landscape_1_2_On n'est pas venu ici pour être là.jpg differ diff --git a/phoques/WW1110136_landscape_1_1_Pas nous seal vous plait.jpg b/phoques/WW1110136_landscape_1_1_Pas nous seal vous plait.jpg new file mode 100644 index 0000000..3f1cd01 Binary files /dev/null and b/phoques/WW1110136_landscape_1_1_Pas nous seal vous plait.jpg differ diff --git a/phoques/aerobaie_landscape_1_1_Il ne sait pas gérer un BDE →.jpg b/phoques/aerobaie_landscape_1_1_Il ne sait pas gérer un BDE →.jpg new file mode 100644 index 0000000..5f523ef Binary files /dev/null and b/phoques/aerobaie_landscape_1_1_Il ne sait pas gérer un BDE →.jpg differ diff --git a/phoques/bretagne_landscape_1_1_Moins de votes, plus de poissons.jpg b/phoques/bretagne_landscape_1_1_Moins de votes, plus de poissons.jpg new file mode 100644 index 0000000..32559cb Binary files /dev/null and b/phoques/bretagne_landscape_1_1_Moins de votes, plus de poissons.jpg differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..f80b2d9 --- /dev/null +++ b/src/index.html @@ -0,0 +1,49 @@ + + + + + + Affiche épiphoque - NAM + + + + + + +
+
+
+

+ ÉPIPHOQUE +

+

+ MSG +

+
+
+
+

+ Communication de campagne pour le BDE Épita. +

+
+
+ + + \ No newline at end of file