From 37858e66094e6f419c77e4a0e5d5da6f6175fdb7 Mon Sep 17 00:00:00 2001
From: matograine <matograine@zaclys.net>
Date: Tue, 26 Apr 2022 20:07:18 +0200
Subject: [PATCH] add example image in main page

---
 build.py                | 2 ++
 source/files/index.html | 1 +
 source/theme/custom.css | 8 +++++++-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/build.py b/build.py
index e3fc8af..23f2397 100644
--- a/build.py
+++ b/build.py
@@ -96,6 +96,7 @@ if __name__ == "__main__":
         # copy specific files in build dir
         shutil.copy(source_lang_dir + "/logo_g.png", build_lang_dir )
         shutil.copy(source_lang_dir + "/strings.js", build_lang_dir )
+        shutil.copy(source_lang_dir + "/example_vignette.png", build_lang_dir )
 
         # build the menu
         langs_menu_dict = lang_menu(lang, langs)
@@ -131,6 +132,7 @@ if __name__ == "__main__":
             content = content.replace("questions.html", lang + "/questions.html")
             content = content.replace("strings.js", lang + "/strings.js")
             content = content.replace("./logo_g.png", lang + "/logo_g.png")
+            shutil.copy(source_lang_dir + "/example_vignette.png", build_lang_dir )
             # overwrite file
             with open(target, "w") as f:
                 f.write(content)
diff --git a/source/files/index.html b/source/files/index.html
index e9f51cb..441ed1e 100644
--- a/source/files/index.html
+++ b/source/files/index.html
@@ -95,6 +95,7 @@
           <li style="list-style-type: initial;">__MAIN_PAGE_LIST_TEXT__</li>
           <li style="list-style-type: initial;">__MAIN_PAGE_LIST_IMAGE__</li>
         </ul>
+        <img class="responsive-img" src="./example_vignette.png" alt="Vignette example: Make a donation to vignette !">
       </div>
       <div class="col xl6 l6 m10 s12 offset-m1">
         <h5>__MAIN_PAGE_FORM_TITLE__</h5>
diff --git a/source/theme/custom.css b/source/theme/custom.css
index f2787f4..00598f2 100644
--- a/source/theme/custom.css
+++ b/source/theme/custom.css
@@ -8,4 +8,10 @@ svg {
 
 .sidenav li > ul {
     padding-left: 10px;
-}
\ No newline at end of file
+}
+
+@media (max-width:  992px) {
+    .responsive-img {
+        display: none;
+    }
+}
-- 
GitLab