diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6834e81 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +pictures/lab/storage_2024_03_07/.tmp/* +pictures/radioburza/leden_2024/.tmp/* + +!.gitignore +!.nojekyll +!.github \ No newline at end of file diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..4842fe9 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +zap.devvie.cc \ No newline at end of file diff --git a/assets/index_template.html b/assets/index_template.html new file mode 100644 index 0000000..fcef14d --- /dev/null +++ b/assets/index_template.html @@ -0,0 +1,102 @@ + + + + + + {{header}} + + + +

{{title}}

+ + {{comment_start}}{{comment_end}} + + diff --git a/assets/script.js b/assets/script.js new file mode 100644 index 0000000..117140d --- /dev/null +++ b/assets/script.js @@ -0,0 +1,96 @@ +var current_image_index = 0; +var image_paths = [ + {{image_paths}} +]; + +function open_image_viewer(image_path) { + current_image_index = image_paths.indexOf(image_path); + update_image_viewer(); + document.querySelector(".image-viewer").style.display = "flex"; + document.body.style.overflow = "hidden"; + + document.addEventListener("keydown", handle_keypress); + + // Add event listener for mouse wheel + document.querySelector(".gallery").addEventListener("wheel", function(event) { + if (event.deltaY < 0) { + // Scrolling up + navigate_image(event, -1); + } else { + // Scrolling down + navigate_image(event, 1); + } + }); +} + +function close_image_viewer() { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + document.querySelector(".image-viewer").style.display = "none"; + document.body.style.overflow = "auto"; + + document.removeEventListener("keydown", handle_keypress); + document.querySelector(".gallery").removeEventListener("wheel", handle_wheel); +} + +function navigate_image(event, direction) { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + event.stopPropagation(); + current_image_index += direction; + if (current_image_index < 0) { + current_image_index = image_paths.length - 1; + } else if (current_image_index >= image_paths.length) { + current_image_index = 0; + } + update_image_viewer(); +} + +function update_image_viewer() { + document.getElementById("viewer-image").src = image_paths[current_image_index]; +} + +function toggle_dark_mode() { + var body = document.body; + body.classList.toggle("dark-mode"); +} + +function zoom_image(event) { + var img = document.getElementById("viewer-image"); + var bounding_rect = img.getBoundingClientRect(); + + var x = (event.clientX - bounding_rect.left) / bounding_rect.width; + var y = (event.clientY - bounding_rect.top) / bounding_rect.height; + + img.style.transformOrigin = `${x * 100}% ${y * 100}%`; + img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)"; + + event.stopPropagation(); +} + +function handle_keypress(event) { + if (document.querySelector(".image-viewer").style.display === "flex") { + switch(event.key) { + case "ArrowLeft": + navigate_image(event, -1); + break; + case "ArrowRight": + navigate_image(event, 1); + break; + case "Escape": + close_image_viewer(); + break; + } + } +} + +window.addEventListener("scroll", function () { + var body = document.body; + var scroll_position = window.scrollY; + + if (scroll_position > 0) { + body.classList.add("scrolled"); + } else { + body.classList.remove("scrolled"); + } +}); \ No newline at end of file diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..7ab8a1b --- /dev/null +++ b/assets/style.css @@ -0,0 +1,248 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + overflow-x: hidden; +} + +.header-box { + background-color: #333; + color: white; + padding: 15px; + text-align: center; + width: 100%; + z-index: 1; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} + +.content { + flex: 1; + padding-top: 15px; + box-sizing: border-box; +} + +.container { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.header-btn-lightmode { + background-color: white; + color: black; +} + +.header-btn-dir { + background-color: dodgerblue; + color: white; +} + +.back-button { + background-color: #4CAF50; + color: white; + padding: 10px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin-left: 3px; + margin-right: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.button-wrapper { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-wrapper button { + width: 100%; + border-radius: 3px; + min-width: max-content; +} + +.button-container { + display: flex; + border: 2px solid black; + border-radius: 10px 0 0 10px; + background-color: #202020; + padding: 5px; + padding-right: 25px; +} + +.header-box h1 { + margin: 0; +} + +.footer { + position: fixed; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + margin-right: 5px; + margin-bottom: 5px; +} + +.footer img { + width: 40px; +} + +body.scrolled .header-box { + top: -100px; +} + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + padding-left: 10px; + padding-right: 10px; +} + +img { + max-width: 100%; + max-height: 400px; + height: auto; + border: 2px solid #ddd; + border-radius: 8px; + transition: 0.3s; + cursor: pointer; +} + +img:hover { + border: 2px solid #777; + transition: transform 0.3s ease-out; +} + +.image-viewer { + z-index: 3; + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +} + +.image-viewer img { + max-width: 90%; + max-height: 90%; + cursor: zoom-in; + transition: transform 0.5s ease-out; +} + +.close-btn { + font-size: 40px; + color: white; + cursor: pointer; + position: absolute; + top: 10px; + right: 20px; + z-index: 1; +} + +.nav-arrows { + position: fixed; + top: 50%; + display: flex; + justify-content: space-between; + width: 100%; + padding: 0 20px; + z-index: 1; +} + +.nav-arrow { + font-size: 60px; + color: white; + cursor: pointer; + padding: 20px; + position: relative; +} + +.nav-arrow-left { + margin-left: 20px; +} + +.nav-arrow-right { + margin-right: 20px; +} + +.nav-arrow-left:before, +.nav-arrow-right:before { + content: ''; + position: absolute; + top: -20px; + right: -20px; + bottom: -20px; + left: -20px; +} + +body.dark-mode { + background-color: #2a2a2a; + color: #fff; +} + +body.dark-mode .header-box { + background-color: #111; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +body.dark-mode .header-box h1 { + color: #fff; +} + +body.dark-mode * { + border-color: #333; +} + +body.dark-mode .content { + background-color: #2a2a2a; +} + +.viewed-image { + z-index: 2; +} + +@media only screen and (max-width: 600px) { + .nav-arrows { + display: none; + } + + img { + max-height: 300px; + } +} + +@media only screen and (max-width: 1000px) { + .header-box h1 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 800px) { + .header-box h1 { + font-size: 1.3rem; + } +} + +@media only screen and (max-width: 700px) { + .header-box h1 { + font-size: 1.2rem; + } +} + +@media only screen and (max-width: 600px) { + .header-box h1 { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/assets/template.html b/assets/template.html new file mode 100644 index 0000000..157cfa7 --- /dev/null +++ b/assets/template.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + {{title}} + + + +
+
+

{{title}}

+
+ +
+ + +
+
+
+
+ + +
+ × + Viewer Image + +
+
+
+ + + + + \ No newline at end of file diff --git a/config/lab/storage_2024_03_07.ini b/config/lab/storage_2024_03_07.ini new file mode 100644 index 0000000..1580571 --- /dev/null +++ b/config/lab/storage_2024_03_07.ini @@ -0,0 +1,29 @@ +[Settings] +title = The state of my box storage taken at 2024.03.07 +image_folder = pictures/lab/storage_2024_03_07 + +[Core] +template_path = assets/template.html +css_path = assets/style.css +js_path = assets/script.js + +[Output] +output_folder = docs/gal/lab/storage_2024_03_07 +images_directory_name = images +core_directory_name = core +output_file_name = index.html + +[Index] +enabled = true +page = assets/index_template.html +base_directory = docs/gal/ +base_index_name = index.html + +[Index.special_rules] +generate_project_index = true +generate_project_root_index = true + +project_root_index_name = dir.html +project_index_name = index.html + +root_index_name = index.html \ No newline at end of file diff --git a/config/radioburza/brezen_2024.ini b/config/radioburza/brezen_2024.ini new file mode 100644 index 0000000..e5bf1bf --- /dev/null +++ b/config/radioburza/brezen_2024.ini @@ -0,0 +1,29 @@ +[Settings] +title = Radioburza Březen 2024 +image_folder = pictures/radioburza/brezen_2024 + +[Core] +template_path = assets/template.html +css_path = assets/style.css +js_path = assets/script.js + +[Output] +output_folder = docs/gal/radioburza/brezen_2024 +images_directory_name = images +core_directory_name = core +output_file_name = index.html + +[Index] +enabled = true +page = assets/index_template.html +base_directory = docs/gal/ +base_index_name = index.html + +[Index.special_rules] +generate_project_index = true +generate_project_root_index = true + +project_root_index_name = dir.html +project_index_name = index.html + +root_index_name = index.html \ No newline at end of file diff --git a/config/radioburza/leden_2024.ini b/config/radioburza/leden_2024.ini new file mode 100644 index 0000000..c4606a1 --- /dev/null +++ b/config/radioburza/leden_2024.ini @@ -0,0 +1,29 @@ +[Settings] +title = Radioburza Leden 2024 +image_folder = pictures/radioburza/leden_2024 + +[Core] +template_path = assets/template.html +css_path = assets/style.css +js_path = assets/script.js + +[Output] +output_folder = docs/gal/radioburza/leden_2024 +images_directory_name = images +core_directory_name = core +output_file_name = index.html + +[Index] +enabled = true +page = assets/index_template.html +base_directory = docs/gal/ +base_index_name = index.html + +[Index.special_rules] +generate_project_index = true +generate_project_root_index = true + +project_root_index_name = dir.html +project_index_name = index.html + +root_index_name = index.html \ No newline at end of file diff --git a/config/tubes/gu81m.ini b/config/tubes/gu81m.ini new file mode 100644 index 0000000..1c05b54 --- /dev/null +++ b/config/tubes/gu81m.ini @@ -0,0 +1,36 @@ +[Settings] +title = GU-81M (ГУ-81М) 500W soviet vacuum tube +image_folder = pictures/tubes/gu81m + +[Core] +template_path = assets/template.html +css_path = assets/style.css +js_path = assets/script.js + +[Output] +output_folder = docs/gal/tubes/gu81m +images_directory_name = images +core_directory_name = core +output_file_name = index.html + +[Index] +enabled = true +page = assets/index_template.html +base_directory = docs/gal/ +base_index_name = index.html + +[Index.special_rules] +generate_project_index = true +generate_project_root_index = true + +project_root_index_name = dir.html +project_index_name = index.html + +root_index_name = index.html + +[Embed] +image = https://zap.devvie.cc/gal/tubes/gu81m/images/GAL_1.jpg +url = https://discord.gg/Te3KpWWRdY +title = ГУ-81М soviet pentode +description = The GU81M (ГУ-81М) is a pentode that was produced by the soviet military, my sample here was created in 1988 +color = #f5c570 \ No newline at end of file diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..4842fe9 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +zap.devvie.cc \ No newline at end of file diff --git a/docs/gal/index.html b/docs/gal/index.html new file mode 100644 index 0000000..4e573c0 --- /dev/null +++ b/docs/gal/index.html @@ -0,0 +1,106 @@ + + + + + + + + + +

Index of /

+ + + + diff --git a/docs/gal/lab/index.html b/docs/gal/lab/index.html new file mode 100644 index 0000000..d2b3d60 --- /dev/null +++ b/docs/gal/lab/index.html @@ -0,0 +1,104 @@ + + + + + + lab + + + +

Index of /lab

+ + + + diff --git a/docs/gal/lab/storage_2024_03_07/core/index.html b/docs/gal/lab/storage_2024_03_07/core/index.html new file mode 100644 index 0000000..5838ae3 --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/core/index.html @@ -0,0 +1,105 @@ + + + + + + lab/storage_2024_03_07/core + + + +

Index of /lab/storage_2024_03_07/core

+ + + + diff --git a/docs/gal/lab/storage_2024_03_07/core/script.js b/docs/gal/lab/storage_2024_03_07/core/script.js new file mode 100644 index 0000000..a5075e8 --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/core/script.js @@ -0,0 +1,114 @@ +var current_image_index = 0; +var image_paths = [ + "images/GAL_1.jpg", + "images/GAL_10.jpg", + "images/GAL_11.jpg", + "images/GAL_12.jpg", + "images/GAL_13.jpg", + "images/GAL_14.jpg", + "images/GAL_15.jpg", + "images/GAL_16.jpg", + "images/GAL_17.jpg", + "images/GAL_18.jpg", + "images/GAL_19.jpg", + "images/GAL_2.jpg", + "images/GAL_3.jpg", + "images/GAL_4.jpg", + "images/GAL_5.jpg", + "images/GAL_6.jpg", + "images/GAL_7.jpg", + "images/GAL_8.jpg", + "images/GAL_9.jpg" +]; + +function open_image_viewer(image_path) { + current_image_index = image_paths.indexOf(image_path); + update_image_viewer(); + document.querySelector(".image-viewer").style.display = "flex"; + document.body.style.overflow = "hidden"; + + document.addEventListener("keydown", handle_keypress); + + // Add event listener for mouse wheel + document.querySelector(".gallery").addEventListener("wheel", function(event) { + if (event.deltaY < 0) { + // Scrolling up + navigate_image(event, -1); + } else { + // Scrolling down + navigate_image(event, 1); + } + }); +} + +function close_image_viewer() { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + document.querySelector(".image-viewer").style.display = "none"; + document.body.style.overflow = "auto"; + + document.removeEventListener("keydown", handle_keypress); + document.querySelector(".gallery").removeEventListener("wheel", handle_wheel); +} + +function navigate_image(event, direction) { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + event.stopPropagation(); + current_image_index += direction; + if (current_image_index < 0) { + current_image_index = image_paths.length - 1; + } else if (current_image_index >= image_paths.length) { + current_image_index = 0; + } + update_image_viewer(); +} + +function update_image_viewer() { + document.getElementById("viewer-image").src = image_paths[current_image_index]; +} + +function toggle_dark_mode() { + var body = document.body; + body.classList.toggle("dark-mode"); +} + +function zoom_image(event) { + var img = document.getElementById("viewer-image"); + var bounding_rect = img.getBoundingClientRect(); + + var x = (event.clientX - bounding_rect.left) / bounding_rect.width; + var y = (event.clientY - bounding_rect.top) / bounding_rect.height; + + img.style.transformOrigin = `${x * 100}% ${y * 100}%`; + img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)"; + + event.stopPropagation(); +} + +function handle_keypress(event) { + if (document.querySelector(".image-viewer").style.display === "flex") { + switch(event.key) { + case "ArrowLeft": + navigate_image(event, -1); + break; + case "ArrowRight": + navigate_image(event, 1); + break; + case "Escape": + close_image_viewer(); + break; + } + } +} + +window.addEventListener("scroll", function () { + var body = document.body; + var scroll_position = window.scrollY; + + if (scroll_position > 0) { + body.classList.add("scrolled"); + } else { + body.classList.remove("scrolled"); + } +}); \ No newline at end of file diff --git a/docs/gal/lab/storage_2024_03_07/core/style.css b/docs/gal/lab/storage_2024_03_07/core/style.css new file mode 100644 index 0000000..7ab8a1b --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/core/style.css @@ -0,0 +1,248 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + overflow-x: hidden; +} + +.header-box { + background-color: #333; + color: white; + padding: 15px; + text-align: center; + width: 100%; + z-index: 1; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} + +.content { + flex: 1; + padding-top: 15px; + box-sizing: border-box; +} + +.container { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.header-btn-lightmode { + background-color: white; + color: black; +} + +.header-btn-dir { + background-color: dodgerblue; + color: white; +} + +.back-button { + background-color: #4CAF50; + color: white; + padding: 10px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin-left: 3px; + margin-right: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.button-wrapper { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-wrapper button { + width: 100%; + border-radius: 3px; + min-width: max-content; +} + +.button-container { + display: flex; + border: 2px solid black; + border-radius: 10px 0 0 10px; + background-color: #202020; + padding: 5px; + padding-right: 25px; +} + +.header-box h1 { + margin: 0; +} + +.footer { + position: fixed; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + margin-right: 5px; + margin-bottom: 5px; +} + +.footer img { + width: 40px; +} + +body.scrolled .header-box { + top: -100px; +} + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + padding-left: 10px; + padding-right: 10px; +} + +img { + max-width: 100%; + max-height: 400px; + height: auto; + border: 2px solid #ddd; + border-radius: 8px; + transition: 0.3s; + cursor: pointer; +} + +img:hover { + border: 2px solid #777; + transition: transform 0.3s ease-out; +} + +.image-viewer { + z-index: 3; + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +} + +.image-viewer img { + max-width: 90%; + max-height: 90%; + cursor: zoom-in; + transition: transform 0.5s ease-out; +} + +.close-btn { + font-size: 40px; + color: white; + cursor: pointer; + position: absolute; + top: 10px; + right: 20px; + z-index: 1; +} + +.nav-arrows { + position: fixed; + top: 50%; + display: flex; + justify-content: space-between; + width: 100%; + padding: 0 20px; + z-index: 1; +} + +.nav-arrow { + font-size: 60px; + color: white; + cursor: pointer; + padding: 20px; + position: relative; +} + +.nav-arrow-left { + margin-left: 20px; +} + +.nav-arrow-right { + margin-right: 20px; +} + +.nav-arrow-left:before, +.nav-arrow-right:before { + content: ''; + position: absolute; + top: -20px; + right: -20px; + bottom: -20px; + left: -20px; +} + +body.dark-mode { + background-color: #2a2a2a; + color: #fff; +} + +body.dark-mode .header-box { + background-color: #111; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +body.dark-mode .header-box h1 { + color: #fff; +} + +body.dark-mode * { + border-color: #333; +} + +body.dark-mode .content { + background-color: #2a2a2a; +} + +.viewed-image { + z-index: 2; +} + +@media only screen and (max-width: 600px) { + .nav-arrows { + display: none; + } + + img { + max-height: 300px; + } +} + +@media only screen and (max-width: 1000px) { + .header-box h1 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 800px) { + .header-box h1 { + font-size: 1.3rem; + } +} + +@media only screen and (max-width: 700px) { + .header-box h1 { + font-size: 1.2rem; + } +} + +@media only screen and (max-width: 600px) { + .header-box h1 { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/docs/gal/lab/storage_2024_03_07/dir.html b/docs/gal/lab/storage_2024_03_07/dir.html new file mode 100644 index 0000000..ae14736 --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/dir.html @@ -0,0 +1,106 @@ + + + + + + lab/storage_2024_03_07 + + + +

Index of /lab/storage_2024_03_07

+ + + + diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_1.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_1.jpg new file mode 100644 index 0000000..426ebd5 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_1.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_10.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_10.jpg new file mode 100644 index 0000000..b4a3a47 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_10.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_11.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_11.jpg new file mode 100644 index 0000000..2ebda3b Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_11.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_12.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_12.jpg new file mode 100644 index 0000000..bc1c261 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_12.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_13.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_13.jpg new file mode 100644 index 0000000..f3b34fc Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_13.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_14.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_14.jpg new file mode 100644 index 0000000..81e325c Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_14.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_15.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_15.jpg new file mode 100644 index 0000000..84a88a5 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_15.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_16.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_16.jpg new file mode 100644 index 0000000..dbcc067 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_16.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_17.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_17.jpg new file mode 100644 index 0000000..b5d99df Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_17.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_18.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_18.jpg new file mode 100644 index 0000000..30dd005 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_18.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_19.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_19.jpg new file mode 100644 index 0000000..6857023 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_19.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_2.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_2.jpg new file mode 100644 index 0000000..fee88fe Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_2.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_3.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_3.jpg new file mode 100644 index 0000000..4c15e77 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_3.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_4.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_4.jpg new file mode 100644 index 0000000..82e880f Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_4.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_5.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_5.jpg new file mode 100644 index 0000000..850801d Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_5.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_6.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_6.jpg new file mode 100644 index 0000000..123f09a Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_6.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_7.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_7.jpg new file mode 100644 index 0000000..3de8922 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_7.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_8.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_8.jpg new file mode 100644 index 0000000..a751d46 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_8.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/GAL_9.jpg b/docs/gal/lab/storage_2024_03_07/images/GAL_9.jpg new file mode 100644 index 0000000..0b1b7f1 Binary files /dev/null and b/docs/gal/lab/storage_2024_03_07/images/GAL_9.jpg differ diff --git a/docs/gal/lab/storage_2024_03_07/images/index.html b/docs/gal/lab/storage_2024_03_07/images/index.html new file mode 100644 index 0000000..b134add --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/images/index.html @@ -0,0 +1,122 @@ + + + + + + lab/storage_2024_03_07/images + + + +

Index of /lab/storage_2024_03_07/images

+ + + + diff --git a/docs/gal/lab/storage_2024_03_07/index.html b/docs/gal/lab/storage_2024_03_07/index.html new file mode 100644 index 0000000..ae2b024 --- /dev/null +++ b/docs/gal/lab/storage_2024_03_07/index.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + The state of my box storage taken at 2024.03.07 + + + +
+
+

The state of my box storage taken at 2024.03.07

+
+ +
+ + +
+
+
+
+ + +
+ × + Viewer Image + +
+
+
+ + + + + \ No newline at end of file diff --git a/docs/gal/radioburza/brezen_2024/core/index.html b/docs/gal/radioburza/brezen_2024/core/index.html new file mode 100644 index 0000000..b6067bd --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/core/index.html @@ -0,0 +1,105 @@ + + + + + + radioburza/brezen_2024/core + + + +

Index of /radioburza/brezen_2024/core

+ + + + diff --git a/docs/gal/radioburza/brezen_2024/core/script.js b/docs/gal/radioburza/brezen_2024/core/script.js new file mode 100644 index 0000000..3e135b8 --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/core/script.js @@ -0,0 +1,109 @@ +var current_image_index = 0; +var image_paths = [ + "images/GAL_IMG_0746.jpg", + "images/GAL_IMG_0748.jpg", + "images/GAL_IMG_0749.jpg", + "images/GAL_IMG_0750.jpg", + "images/GAL_IMG_0751.jpg", + "images/GAL_IMG_0752.jpg", + "images/GAL_IMG_0753.jpg", + "images/GAL_IMG_0754.jpg", + "images/GAL_IMG_0755.jpg", + "images/GAL_IMG_0756.jpg", + "images/GAL_IMG_0757.jpg", + "images/GAL_IMG_0758.jpg", + "images/GAL_IMG_0759.jpg", + "images/GAL_IMG_idk.jpg" +]; + +function open_image_viewer(image_path) { + current_image_index = image_paths.indexOf(image_path); + update_image_viewer(); + document.querySelector(".image-viewer").style.display = "flex"; + document.body.style.overflow = "hidden"; + + document.addEventListener("keydown", handle_keypress); + + // Add event listener for mouse wheel + document.querySelector(".gallery").addEventListener("wheel", function(event) { + if (event.deltaY < 0) { + // Scrolling up + navigate_image(event, -1); + } else { + // Scrolling down + navigate_image(event, 1); + } + }); +} + +function close_image_viewer() { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + document.querySelector(".image-viewer").style.display = "none"; + document.body.style.overflow = "auto"; + + document.removeEventListener("keydown", handle_keypress); + document.querySelector(".gallery").removeEventListener("wheel", handle_wheel); +} + +function navigate_image(event, direction) { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + event.stopPropagation(); + current_image_index += direction; + if (current_image_index < 0) { + current_image_index = image_paths.length - 1; + } else if (current_image_index >= image_paths.length) { + current_image_index = 0; + } + update_image_viewer(); +} + +function update_image_viewer() { + document.getElementById("viewer-image").src = image_paths[current_image_index]; +} + +function toggle_dark_mode() { + var body = document.body; + body.classList.toggle("dark-mode"); +} + +function zoom_image(event) { + var img = document.getElementById("viewer-image"); + var bounding_rect = img.getBoundingClientRect(); + + var x = (event.clientX - bounding_rect.left) / bounding_rect.width; + var y = (event.clientY - bounding_rect.top) / bounding_rect.height; + + img.style.transformOrigin = `${x * 100}% ${y * 100}%`; + img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)"; + + event.stopPropagation(); +} + +function handle_keypress(event) { + if (document.querySelector(".image-viewer").style.display === "flex") { + switch(event.key) { + case "ArrowLeft": + navigate_image(event, -1); + break; + case "ArrowRight": + navigate_image(event, 1); + break; + case "Escape": + close_image_viewer(); + break; + } + } +} + +window.addEventListener("scroll", function () { + var body = document.body; + var scroll_position = window.scrollY; + + if (scroll_position > 0) { + body.classList.add("scrolled"); + } else { + body.classList.remove("scrolled"); + } +}); \ No newline at end of file diff --git a/docs/gal/radioburza/brezen_2024/core/style.css b/docs/gal/radioburza/brezen_2024/core/style.css new file mode 100644 index 0000000..7ab8a1b --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/core/style.css @@ -0,0 +1,248 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + overflow-x: hidden; +} + +.header-box { + background-color: #333; + color: white; + padding: 15px; + text-align: center; + width: 100%; + z-index: 1; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} + +.content { + flex: 1; + padding-top: 15px; + box-sizing: border-box; +} + +.container { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.header-btn-lightmode { + background-color: white; + color: black; +} + +.header-btn-dir { + background-color: dodgerblue; + color: white; +} + +.back-button { + background-color: #4CAF50; + color: white; + padding: 10px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin-left: 3px; + margin-right: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.button-wrapper { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-wrapper button { + width: 100%; + border-radius: 3px; + min-width: max-content; +} + +.button-container { + display: flex; + border: 2px solid black; + border-radius: 10px 0 0 10px; + background-color: #202020; + padding: 5px; + padding-right: 25px; +} + +.header-box h1 { + margin: 0; +} + +.footer { + position: fixed; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + margin-right: 5px; + margin-bottom: 5px; +} + +.footer img { + width: 40px; +} + +body.scrolled .header-box { + top: -100px; +} + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + padding-left: 10px; + padding-right: 10px; +} + +img { + max-width: 100%; + max-height: 400px; + height: auto; + border: 2px solid #ddd; + border-radius: 8px; + transition: 0.3s; + cursor: pointer; +} + +img:hover { + border: 2px solid #777; + transition: transform 0.3s ease-out; +} + +.image-viewer { + z-index: 3; + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +} + +.image-viewer img { + max-width: 90%; + max-height: 90%; + cursor: zoom-in; + transition: transform 0.5s ease-out; +} + +.close-btn { + font-size: 40px; + color: white; + cursor: pointer; + position: absolute; + top: 10px; + right: 20px; + z-index: 1; +} + +.nav-arrows { + position: fixed; + top: 50%; + display: flex; + justify-content: space-between; + width: 100%; + padding: 0 20px; + z-index: 1; +} + +.nav-arrow { + font-size: 60px; + color: white; + cursor: pointer; + padding: 20px; + position: relative; +} + +.nav-arrow-left { + margin-left: 20px; +} + +.nav-arrow-right { + margin-right: 20px; +} + +.nav-arrow-left:before, +.nav-arrow-right:before { + content: ''; + position: absolute; + top: -20px; + right: -20px; + bottom: -20px; + left: -20px; +} + +body.dark-mode { + background-color: #2a2a2a; + color: #fff; +} + +body.dark-mode .header-box { + background-color: #111; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +body.dark-mode .header-box h1 { + color: #fff; +} + +body.dark-mode * { + border-color: #333; +} + +body.dark-mode .content { + background-color: #2a2a2a; +} + +.viewed-image { + z-index: 2; +} + +@media only screen and (max-width: 600px) { + .nav-arrows { + display: none; + } + + img { + max-height: 300px; + } +} + +@media only screen and (max-width: 1000px) { + .header-box h1 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 800px) { + .header-box h1 { + font-size: 1.3rem; + } +} + +@media only screen and (max-width: 700px) { + .header-box h1 { + font-size: 1.2rem; + } +} + +@media only screen and (max-width: 600px) { + .header-box h1 { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/docs/gal/radioburza/brezen_2024/dir.html b/docs/gal/radioburza/brezen_2024/dir.html new file mode 100644 index 0000000..0c72e73 --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/dir.html @@ -0,0 +1,106 @@ + + + + + + radioburza/brezen_2024 + + + +

Index of /radioburza/brezen_2024

+ + + + diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0746.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0746.jpg new file mode 100644 index 0000000..0d371b1 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0746.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0748.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0748.jpg new file mode 100644 index 0000000..e721842 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0748.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0749.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0749.jpg new file mode 100644 index 0000000..518e45e Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0749.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0750.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0750.jpg new file mode 100644 index 0000000..0eb71dd Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0750.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0751.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0751.jpg new file mode 100644 index 0000000..88569c9 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0751.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0752.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0752.jpg new file mode 100644 index 0000000..7b6d9bf Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0752.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0753.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0753.jpg new file mode 100644 index 0000000..789c743 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0753.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0754.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0754.jpg new file mode 100644 index 0000000..ed61294 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0754.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0755.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0755.jpg new file mode 100644 index 0000000..57653a1 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0755.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0756.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0756.jpg new file mode 100644 index 0000000..bfa42b1 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0756.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0757.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0757.jpg new file mode 100644 index 0000000..7462b82 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0757.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0758.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0758.jpg new file mode 100644 index 0000000..bb9a48f Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0758.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0759.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0759.jpg new file mode 100644 index 0000000..d630b72 Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_0759.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/GAL_IMG_idk.jpg b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_idk.jpg new file mode 100644 index 0000000..0cf0d7f Binary files /dev/null and b/docs/gal/radioburza/brezen_2024/images/GAL_IMG_idk.jpg differ diff --git a/docs/gal/radioburza/brezen_2024/images/index.html b/docs/gal/radioburza/brezen_2024/images/index.html new file mode 100644 index 0000000..40c39d2 --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/images/index.html @@ -0,0 +1,117 @@ + + + + + + radioburza/brezen_2024/images + + + +

Index of /radioburza/brezen_2024/images

+ + + + diff --git a/docs/gal/radioburza/brezen_2024/index.html b/docs/gal/radioburza/brezen_2024/index.html new file mode 100644 index 0000000..791fb99 --- /dev/null +++ b/docs/gal/radioburza/brezen_2024/index.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + Radioburza Březen 2024 + + + +
+
+

Radioburza Březen 2024

+
+ +
+ + +
+
+
+
+ + +
+ × + Viewer Image + +
+
+
+ + + + + \ No newline at end of file diff --git a/docs/gal/radioburza/index.html b/docs/gal/radioburza/index.html new file mode 100644 index 0000000..b1ef689 --- /dev/null +++ b/docs/gal/radioburza/index.html @@ -0,0 +1,105 @@ + + + + + + radioburza + + + +

Index of /radioburza

+ + + + diff --git a/docs/gal/radioburza/leden_2024/core/index.html b/docs/gal/radioburza/leden_2024/core/index.html new file mode 100644 index 0000000..efe23fa --- /dev/null +++ b/docs/gal/radioburza/leden_2024/core/index.html @@ -0,0 +1,105 @@ + + + + + + radioburza/leden_2024/core + + + +

Index of /radioburza/leden_2024/core

+ + + + diff --git a/docs/gal/radioburza/leden_2024/core/script.js b/docs/gal/radioburza/leden_2024/core/script.js new file mode 100644 index 0000000..15a9c11 --- /dev/null +++ b/docs/gal/radioburza/leden_2024/core/script.js @@ -0,0 +1,114 @@ +var current_image_index = 0; +var image_paths = [ + "images/GAL_IMG_0531.jpg", + "images/GAL_IMG_0532.jpg", + "images/GAL_IMG_0533.jpg", + "images/GAL_IMG_0534.jpg", + "images/GAL_IMG_0535.jpg", + "images/GAL_IMG_0537.jpg", + "images/GAL_IMG_0538.jpg", + "images/GAL_IMG_0539.jpg", + "images/GAL_IMG_0540.jpg", + "images/GAL_IMG_0541.jpg", + "images/GAL_IMG_0542.jpg", + "images/GAL_IMG_0543.jpg", + "images/GAL_IMG_0544.jpg", + "images/GAL_IMG_0545.jpg", + "images/GAL_IMG_0547.jpg", + "images/GAL_IMG_0551.jpg", + "images/GAL_IMG_0552.jpg", + "images/GAL_IMG_0553.jpg", + "images/GAL_IMG_0554.jpg" +]; + +function open_image_viewer(image_path) { + current_image_index = image_paths.indexOf(image_path); + update_image_viewer(); + document.querySelector(".image-viewer").style.display = "flex"; + document.body.style.overflow = "hidden"; + + document.addEventListener("keydown", handle_keypress); + + // Add event listener for mouse wheel + document.querySelector(".gallery").addEventListener("wheel", function(event) { + if (event.deltaY < 0) { + // Scrolling up + navigate_image(event, -1); + } else { + // Scrolling down + navigate_image(event, 1); + } + }); +} + +function close_image_viewer() { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + document.querySelector(".image-viewer").style.display = "none"; + document.body.style.overflow = "auto"; + + document.removeEventListener("keydown", handle_keypress); + document.querySelector(".gallery").removeEventListener("wheel", handle_wheel); +} + +function navigate_image(event, direction) { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + event.stopPropagation(); + current_image_index += direction; + if (current_image_index < 0) { + current_image_index = image_paths.length - 1; + } else if (current_image_index >= image_paths.length) { + current_image_index = 0; + } + update_image_viewer(); +} + +function update_image_viewer() { + document.getElementById("viewer-image").src = image_paths[current_image_index]; +} + +function toggle_dark_mode() { + var body = document.body; + body.classList.toggle("dark-mode"); +} + +function zoom_image(event) { + var img = document.getElementById("viewer-image"); + var bounding_rect = img.getBoundingClientRect(); + + var x = (event.clientX - bounding_rect.left) / bounding_rect.width; + var y = (event.clientY - bounding_rect.top) / bounding_rect.height; + + img.style.transformOrigin = `${x * 100}% ${y * 100}%`; + img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)"; + + event.stopPropagation(); +} + +function handle_keypress(event) { + if (document.querySelector(".image-viewer").style.display === "flex") { + switch(event.key) { + case "ArrowLeft": + navigate_image(event, -1); + break; + case "ArrowRight": + navigate_image(event, 1); + break; + case "Escape": + close_image_viewer(); + break; + } + } +} + +window.addEventListener("scroll", function () { + var body = document.body; + var scroll_position = window.scrollY; + + if (scroll_position > 0) { + body.classList.add("scrolled"); + } else { + body.classList.remove("scrolled"); + } +}); \ No newline at end of file diff --git a/docs/gal/radioburza/leden_2024/core/style.css b/docs/gal/radioburza/leden_2024/core/style.css new file mode 100644 index 0000000..7ab8a1b --- /dev/null +++ b/docs/gal/radioburza/leden_2024/core/style.css @@ -0,0 +1,248 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + overflow-x: hidden; +} + +.header-box { + background-color: #333; + color: white; + padding: 15px; + text-align: center; + width: 100%; + z-index: 1; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} + +.content { + flex: 1; + padding-top: 15px; + box-sizing: border-box; +} + +.container { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.header-btn-lightmode { + background-color: white; + color: black; +} + +.header-btn-dir { + background-color: dodgerblue; + color: white; +} + +.back-button { + background-color: #4CAF50; + color: white; + padding: 10px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin-left: 3px; + margin-right: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.button-wrapper { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-wrapper button { + width: 100%; + border-radius: 3px; + min-width: max-content; +} + +.button-container { + display: flex; + border: 2px solid black; + border-radius: 10px 0 0 10px; + background-color: #202020; + padding: 5px; + padding-right: 25px; +} + +.header-box h1 { + margin: 0; +} + +.footer { + position: fixed; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + margin-right: 5px; + margin-bottom: 5px; +} + +.footer img { + width: 40px; +} + +body.scrolled .header-box { + top: -100px; +} + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + padding-left: 10px; + padding-right: 10px; +} + +img { + max-width: 100%; + max-height: 400px; + height: auto; + border: 2px solid #ddd; + border-radius: 8px; + transition: 0.3s; + cursor: pointer; +} + +img:hover { + border: 2px solid #777; + transition: transform 0.3s ease-out; +} + +.image-viewer { + z-index: 3; + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +} + +.image-viewer img { + max-width: 90%; + max-height: 90%; + cursor: zoom-in; + transition: transform 0.5s ease-out; +} + +.close-btn { + font-size: 40px; + color: white; + cursor: pointer; + position: absolute; + top: 10px; + right: 20px; + z-index: 1; +} + +.nav-arrows { + position: fixed; + top: 50%; + display: flex; + justify-content: space-between; + width: 100%; + padding: 0 20px; + z-index: 1; +} + +.nav-arrow { + font-size: 60px; + color: white; + cursor: pointer; + padding: 20px; + position: relative; +} + +.nav-arrow-left { + margin-left: 20px; +} + +.nav-arrow-right { + margin-right: 20px; +} + +.nav-arrow-left:before, +.nav-arrow-right:before { + content: ''; + position: absolute; + top: -20px; + right: -20px; + bottom: -20px; + left: -20px; +} + +body.dark-mode { + background-color: #2a2a2a; + color: #fff; +} + +body.dark-mode .header-box { + background-color: #111; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +body.dark-mode .header-box h1 { + color: #fff; +} + +body.dark-mode * { + border-color: #333; +} + +body.dark-mode .content { + background-color: #2a2a2a; +} + +.viewed-image { + z-index: 2; +} + +@media only screen and (max-width: 600px) { + .nav-arrows { + display: none; + } + + img { + max-height: 300px; + } +} + +@media only screen and (max-width: 1000px) { + .header-box h1 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 800px) { + .header-box h1 { + font-size: 1.3rem; + } +} + +@media only screen and (max-width: 700px) { + .header-box h1 { + font-size: 1.2rem; + } +} + +@media only screen and (max-width: 600px) { + .header-box h1 { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/docs/gal/radioburza/leden_2024/dir.html b/docs/gal/radioburza/leden_2024/dir.html new file mode 100644 index 0000000..d9b45dd --- /dev/null +++ b/docs/gal/radioburza/leden_2024/dir.html @@ -0,0 +1,106 @@ + + + + + + radioburza/leden_2024 + + + +

Index of /radioburza/leden_2024

+ + + + diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0531.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0531.jpg new file mode 100644 index 0000000..226aa7d Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0531.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0532.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0532.jpg new file mode 100644 index 0000000..08804c1 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0532.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0533.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0533.jpg new file mode 100644 index 0000000..4b7512f Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0533.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0534.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0534.jpg new file mode 100644 index 0000000..5cd46c6 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0534.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0535.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0535.jpg new file mode 100644 index 0000000..2f7bc08 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0535.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0537.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0537.jpg new file mode 100644 index 0000000..18dc5b7 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0537.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0538.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0538.jpg new file mode 100644 index 0000000..45682dd Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0538.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0539.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0539.jpg new file mode 100644 index 0000000..3cb3804 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0539.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0540.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0540.jpg new file mode 100644 index 0000000..e025184 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0540.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0541.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0541.jpg new file mode 100644 index 0000000..2b21a53 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0541.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0542.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0542.jpg new file mode 100644 index 0000000..21668ac Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0542.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0543.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0543.jpg new file mode 100644 index 0000000..b13fcc9 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0543.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0544.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0544.jpg new file mode 100644 index 0000000..dfbb465 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0544.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0545.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0545.jpg new file mode 100644 index 0000000..b478f9b Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0545.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0547.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0547.jpg new file mode 100644 index 0000000..f370a6a Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0547.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0551.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0551.jpg new file mode 100644 index 0000000..74e03d3 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0551.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0552.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0552.jpg new file mode 100644 index 0000000..9a2d98b Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0552.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0553.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0553.jpg new file mode 100644 index 0000000..9089317 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0553.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/GAL_IMG_0554.jpg b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0554.jpg new file mode 100644 index 0000000..2e3d047 Binary files /dev/null and b/docs/gal/radioburza/leden_2024/images/GAL_IMG_0554.jpg differ diff --git a/docs/gal/radioburza/leden_2024/images/index.html b/docs/gal/radioburza/leden_2024/images/index.html new file mode 100644 index 0000000..77fe553 --- /dev/null +++ b/docs/gal/radioburza/leden_2024/images/index.html @@ -0,0 +1,122 @@ + + + + + + radioburza/leden_2024/images + + + +

Index of /radioburza/leden_2024/images

+ + + + diff --git a/docs/gal/radioburza/leden_2024/index.html b/docs/gal/radioburza/leden_2024/index.html new file mode 100644 index 0000000..e7841a2 --- /dev/null +++ b/docs/gal/radioburza/leden_2024/index.html @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + Radioburza Leden 2024 + + + +
+
+

Radioburza Leden 2024

+
+ +
+ + +
+
+
+
+ + +
+ × + Viewer Image + +
+
+
+ + + + + \ No newline at end of file diff --git a/docs/gal/tubes/gu81m/core/index.html b/docs/gal/tubes/gu81m/core/index.html new file mode 100644 index 0000000..e18c461 --- /dev/null +++ b/docs/gal/tubes/gu81m/core/index.html @@ -0,0 +1,105 @@ + + + + + + tubes/gu81m/core + + + +

Index of /tubes/gu81m/core

+ + + + diff --git a/docs/gal/tubes/gu81m/core/script.js b/docs/gal/tubes/gu81m/core/script.js new file mode 100644 index 0000000..f7f87be --- /dev/null +++ b/docs/gal/tubes/gu81m/core/script.js @@ -0,0 +1,99 @@ +var current_image_index = 0; +var image_paths = [ + "images/GAL_1.jpg", + "images/GAL_2.jpg", + "images/GAL_3.jpg", + "images/GAL_4.jpg" +]; + +function open_image_viewer(image_path) { + current_image_index = image_paths.indexOf(image_path); + update_image_viewer(); + document.querySelector(".image-viewer").style.display = "flex"; + document.body.style.overflow = "hidden"; + + document.addEventListener("keydown", handle_keypress); + + // Add event listener for mouse wheel + document.querySelector(".gallery").addEventListener("wheel", function(event) { + if (event.deltaY < 0) { + // Scrolling up + navigate_image(event, -1); + } else { + // Scrolling down + navigate_image(event, 1); + } + }); +} + +function close_image_viewer() { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + document.querySelector(".image-viewer").style.display = "none"; + document.body.style.overflow = "auto"; + + document.removeEventListener("keydown", handle_keypress); + document.querySelector(".gallery").removeEventListener("wheel", handle_wheel); +} + +function navigate_image(event, direction) { + var img = document.getElementById("viewer-image"); + img.style.transform = "scale(1)"; + event.stopPropagation(); + current_image_index += direction; + if (current_image_index < 0) { + current_image_index = image_paths.length - 1; + } else if (current_image_index >= image_paths.length) { + current_image_index = 0; + } + update_image_viewer(); +} + +function update_image_viewer() { + document.getElementById("viewer-image").src = image_paths[current_image_index]; +} + +function toggle_dark_mode() { + var body = document.body; + body.classList.toggle("dark-mode"); +} + +function zoom_image(event) { + var img = document.getElementById("viewer-image"); + var bounding_rect = img.getBoundingClientRect(); + + var x = (event.clientX - bounding_rect.left) / bounding_rect.width; + var y = (event.clientY - bounding_rect.top) / bounding_rect.height; + + img.style.transformOrigin = `${x * 100}% ${y * 100}%`; + img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)"; + + event.stopPropagation(); +} + +function handle_keypress(event) { + if (document.querySelector(".image-viewer").style.display === "flex") { + switch(event.key) { + case "ArrowLeft": + navigate_image(event, -1); + break; + case "ArrowRight": + navigate_image(event, 1); + break; + case "Escape": + close_image_viewer(); + break; + } + } +} + +window.addEventListener("scroll", function () { + var body = document.body; + var scroll_position = window.scrollY; + + if (scroll_position > 0) { + body.classList.add("scrolled"); + } else { + body.classList.remove("scrolled"); + } +}); \ No newline at end of file diff --git a/docs/gal/tubes/gu81m/core/style.css b/docs/gal/tubes/gu81m/core/style.css new file mode 100644 index 0000000..7ab8a1b --- /dev/null +++ b/docs/gal/tubes/gu81m/core/style.css @@ -0,0 +1,248 @@ +body { + margin: 0; + font-family: Arial, sans-serif; + overflow-x: hidden; +} + +.header-box { + background-color: #333; + color: white; + padding: 15px; + text-align: center; + width: 100%; + z-index: 1; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} + +.content { + flex: 1; + padding-top: 15px; + box-sizing: border-box; +} + +.container { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.header-btn-lightmode { + background-color: white; + color: black; +} + +.header-btn-dir { + background-color: dodgerblue; + color: white; +} + +.back-button { + background-color: #4CAF50; + color: white; + padding: 10px 15px; + border: none; + border-radius: 5px; + cursor: pointer; + margin-left: 3px; + margin-right: 5px; + margin-top: 3px; + margin-bottom: 3px; +} + +.button-wrapper { + display: flex; + flex-direction: column; + align-items: center; +} + +.button-wrapper button { + width: 100%; + border-radius: 3px; + min-width: max-content; +} + +.button-container { + display: flex; + border: 2px solid black; + border-radius: 10px 0 0 10px; + background-color: #202020; + padding: 5px; + padding-right: 25px; +} + +.header-box h1 { + margin: 0; +} + +.footer { + position: fixed; + bottom: 0; + right: 0; + display: flex; + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + margin-right: 5px; + margin-bottom: 5px; +} + +.footer img { + width: 40px; +} + +body.scrolled .header-box { + top: -100px; +} + +.gallery { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + padding-left: 10px; + padding-right: 10px; +} + +img { + max-width: 100%; + max-height: 400px; + height: auto; + border: 2px solid #ddd; + border-radius: 8px; + transition: 0.3s; + cursor: pointer; +} + +img:hover { + border: 2px solid #777; + transition: transform 0.3s ease-out; +} + +.image-viewer { + z-index: 3; + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +} + +.image-viewer img { + max-width: 90%; + max-height: 90%; + cursor: zoom-in; + transition: transform 0.5s ease-out; +} + +.close-btn { + font-size: 40px; + color: white; + cursor: pointer; + position: absolute; + top: 10px; + right: 20px; + z-index: 1; +} + +.nav-arrows { + position: fixed; + top: 50%; + display: flex; + justify-content: space-between; + width: 100%; + padding: 0 20px; + z-index: 1; +} + +.nav-arrow { + font-size: 60px; + color: white; + cursor: pointer; + padding: 20px; + position: relative; +} + +.nav-arrow-left { + margin-left: 20px; +} + +.nav-arrow-right { + margin-right: 20px; +} + +.nav-arrow-left:before, +.nav-arrow-right:before { + content: ''; + position: absolute; + top: -20px; + right: -20px; + bottom: -20px; + left: -20px; +} + +body.dark-mode { + background-color: #2a2a2a; + color: #fff; +} + +body.dark-mode .header-box { + background-color: #111; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +body.dark-mode .header-box h1 { + color: #fff; +} + +body.dark-mode * { + border-color: #333; +} + +body.dark-mode .content { + background-color: #2a2a2a; +} + +.viewed-image { + z-index: 2; +} + +@media only screen and (max-width: 600px) { + .nav-arrows { + display: none; + } + + img { + max-height: 300px; + } +} + +@media only screen and (max-width: 1000px) { + .header-box h1 { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 800px) { + .header-box h1 { + font-size: 1.3rem; + } +} + +@media only screen and (max-width: 700px) { + .header-box h1 { + font-size: 1.2rem; + } +} + +@media only screen and (max-width: 600px) { + .header-box h1 { + font-size: 1rem; + } +} \ No newline at end of file diff --git a/docs/gal/tubes/gu81m/dir.html b/docs/gal/tubes/gu81m/dir.html new file mode 100644 index 0000000..55877ad --- /dev/null +++ b/docs/gal/tubes/gu81m/dir.html @@ -0,0 +1,106 @@ + + + + + + tubes/gu81m + + + +

Index of /tubes/gu81m

+ + + + diff --git a/docs/gal/tubes/gu81m/images/GAL_1.jpg b/docs/gal/tubes/gu81m/images/GAL_1.jpg new file mode 100644 index 0000000..5f77ce0 Binary files /dev/null and b/docs/gal/tubes/gu81m/images/GAL_1.jpg differ diff --git a/docs/gal/tubes/gu81m/images/GAL_2.jpg b/docs/gal/tubes/gu81m/images/GAL_2.jpg new file mode 100644 index 0000000..f2581d3 Binary files /dev/null and b/docs/gal/tubes/gu81m/images/GAL_2.jpg differ diff --git a/docs/gal/tubes/gu81m/images/GAL_3.jpg b/docs/gal/tubes/gu81m/images/GAL_3.jpg new file mode 100644 index 0000000..bb3978b Binary files /dev/null and b/docs/gal/tubes/gu81m/images/GAL_3.jpg differ diff --git a/docs/gal/tubes/gu81m/images/GAL_4.jpg b/docs/gal/tubes/gu81m/images/GAL_4.jpg new file mode 100644 index 0000000..b79fe95 Binary files /dev/null and b/docs/gal/tubes/gu81m/images/GAL_4.jpg differ diff --git a/docs/gal/tubes/gu81m/images/index.html b/docs/gal/tubes/gu81m/images/index.html new file mode 100644 index 0000000..7458689 --- /dev/null +++ b/docs/gal/tubes/gu81m/images/index.html @@ -0,0 +1,107 @@ + + + + + + tubes/gu81m/images + + + +

Index of /tubes/gu81m/images

+ + + + diff --git a/docs/gal/tubes/gu81m/index.html b/docs/gal/tubes/gu81m/index.html new file mode 100644 index 0000000..c5be584 --- /dev/null +++ b/docs/gal/tubes/gu81m/index.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + GU-81M (ГУ-81М) 500W soviet vacuum tube + + + +
+
+

GU-81M (ГУ-81М) 500W soviet vacuum tube

+
+ +
+ + +
+
+
+
+ + +
+ × + Viewer Image + +
+
+
+ + + + + \ No newline at end of file diff --git a/docs/gal/tubes/index.html b/docs/gal/tubes/index.html new file mode 100644 index 0000000..17fe62e --- /dev/null +++ b/docs/gal/tubes/index.html @@ -0,0 +1,104 @@ + + + + + + tubes + + + +

Index of /tubes

+ + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..06c218e --- /dev/null +++ b/docs/index.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + 9551Dev's Electronics Gallery + + + + +
+
+

9551Dev's Electronics Gallery

+ +
+ Browse Gallery +
+
+
+ + + diff --git a/gallery_generator.py b/gallery_generator.py new file mode 100644 index 0000000..e074e7b --- /dev/null +++ b/gallery_generator.py @@ -0,0 +1,264 @@ +import os +import sys +import configparser +import shutil + +def check_file_exists(file_path): + if not os.path.exists(file_path): + print(f"Error: File not found: {file_path}") + return False + return True + +def check_folder_exists(folder_path): + if not os.path.exists(folder_path): + print(f"Error: Folder not found: {folder_path}") + return False + return True + +def remove_base_dir(index, path): + base_dir = index["base_directory"] + if path.startswith(base_dir): + return path[len(base_dir) + len(os.sep)-1:].lstrip(os.sep) + else: + return path + +def config_get_default(config,group,value,*default): + if config.has_option(group,value): + return config.get(group,value) + else: + return default[0] + + +def read_config(config_path): + print("Reading configuration...") + config = configparser.ConfigParser() + config.read(config_path) + + settings = { + "title": config_get_default(config,"Settings","title","Gallery title!"), + "image_folder": config_get_default(config,"Settings","image_folder","pictures"), + } + + embed = { + "title" : config_get_default(config,"Embed","title","An image gallery"), + "description": config_get_default(config,"Embed","description","A very filled image gallery with images"), + "image" : config_get_default(config,"Embed","image","https://github.com/9551-Dev.png"), + "color" : config_get_default(config,"Embed","color","#90f91f"), + "url" : config_get_default(config,"Embed","url","https://github.com/9551-Dev") + } + + index = { + "index_style": config_get_default(config,"Index","page","assets/index_template.html"), + "enabled": config_get_default(config,"Index","enabled","true") == "true", + "base_directory": config_get_default(config,"Index","base_directory","docs"), + "base_index_name": config_get_default(config,"Index","base_index_name","index.html"), + + "generate_project_index": config_get_default(config,"Index.special_rules","generate_project_index","false"), + "generate_project_root_index": config_get_default(config,"Index.special_rules","generate_project_root_index","false"), + "project_index_name": config_get_default(config,"Index.special_rules","project_index_name","index.html"), + "project_root_index_name": config_get_default(config,"Index.special_rules","project_root_index_name","dir.html"), + + "root_index_name": config_get_default(config,"Index.special_rules","root_index_name","root_index.html"), + "root_index_super": config_get_default(config,"Index.special_rules","root_index_super","UNUSED"), + } + + core = { + "template_path": config_get_default(config,"Core","template_path"), + "css_path": config_get_default(config,"Core","css_path"), + "js_path": config_get_default(config,"Core","js_path") + } + + output = { + "output_folder": config_get_default(config,"Output","output_folder","PLS_CONFIGURE_THX_:3"), + "images_directory_name": config_get_default(config,"Output","images_directory_name","images"), + "core_directory_name": config_get_default(config,"Output","core_directory_name","core"), + "output_file_name": config_get_default(config,"Output","output_file_name","index.html") + } + + required_files = [settings['image_folder'], core['template_path'], core['css_path'], core['js_path']] + for file_path in required_files: + if not check_file_exists(file_path): + print("Exiting: One or more required files not found.") + exit(1) + + print("Configuration read successfully.") + return settings,core,output,index,embed + +def get_image_filenames(image_folder): + print(f"Scanning image folder: {image_folder}") + image_files = [f for f in os.listdir(image_folder) if f.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp'))] + print(f"Found {len(image_files)} image(s):") + for image_file in image_files: + print(f" - {image_file}") + return sorted(image_files) + +def generate_html(settings,core,output,embed): + print("\nGenerating HTML...") + with open(core['template_path'], 'r') as template_file: + template_content = template_file.read() + with open(core['js_path'], 'r') as js_file: + js_content = js_file.read() + with open(core['css_path'], 'r') as css_file: + css_content = css_file.read() + + image_files = get_image_filenames(settings['image_folder']) + image_paths = [os.path.join(output['images_directory_name'], "GAL_" + os.path.basename(image_file)) for image_file in image_files] + + output_images_folder = os.path.join(output['output_folder'], output['images_directory_name']) + os.makedirs(output_images_folder, exist_ok=True) + + for image_file, image_path in zip(image_files, image_paths): + print(f"Copying image: {image_file} to {output_images_folder}") + shutil.copy(os.path.join(settings['image_folder'], image_file), os.path.join(output_images_folder, "GAL_" + image_file)) + + copied_image_paths = [f'"{path}"' for path in image_paths] + image_tags = '\n'.join([f' \"{os.path.basename(path)}' + for path in copied_image_paths]) + + template_content = template_content.replace("{{title}}", settings["title"]) + template_content = template_content.replace("{{css_path}}", os.path.join(output["core_directory_name"], os.path.basename(core["css_path"]))) + template_content = template_content.replace("{{js_path}}", os.path.join(output["core_directory_name"], os.path.basename(core["js_path"]))) + template_content = template_content.replace("{{image_tags}}", image_tags) + + template_content = template_content.replace("{{embed_title}}", embed["title"]) + template_content = template_content.replace("{{embed_description}}", embed["description"]) + template_content = template_content.replace("{{embed_url}}", embed["url"]) + template_content = template_content.replace("{{embed_image}}", embed["image"]) + template_content = template_content.replace("{{embed_color}}", embed["color"]) + + image_paths_js = ",\n ".join(copied_image_paths) + js_content = js_content.replace('{{image_paths}}', image_paths_js) + + output_core_folder = os.path.join(output['output_folder'], output['core_directory_name']) + os.makedirs(output_core_folder, exist_ok=True) + + output_js_path = os.path.join(output_core_folder, os.path.basename(core['js_path'])) + with open(output_js_path, 'w') as output_js_file: + output_js_file.write(js_content) + + output_css_path = os.path.join(output_core_folder, os.path.basename(core['css_path'])) + with open(output_css_path, 'w') as output_css_file: + output_css_file.write(css_content) + + output_file_path = os.path.join(output['output_folder'], output['output_file_name']) + with open(output_file_path, 'w') as output_file: + output_file.write(template_content) + + print(f'\nGenerated {output_file_path} successfully.') + +def get_index_content(index): + if index['index_style']: + if os.path.exists(index['index_style']): + with open(index['index_style'], 'r') as index_file: + return index_file.read() + else: + print(f"Error: Index HTML file not found at {index['index_style']}.") + return None + +def remove_comment(index_content): + index_content = index_content.replace("{{comment_start}}","") + index_content = index_content.replace("{{comment_end}}", "") + + return index_content + +def generate_directory_index(directory_path,index,index_name): + print(f"Generating index for directory: {directory_path}") + + index_content = get_index_content(index) + if index_content: + + index_content = index_content.replace('{{title}}',f"Index of /{remove_base_dir(index,directory_path)}") + index_content = index_content.replace('{{header}}',remove_base_dir(index,directory_path)) + + directory_list_content = "" + + directory_items = [] + file_items = [] + + for item in os.listdir(directory_path): + item_path = os.path.join(directory_path, item) + if os.path.isdir(item_path): + directory_items.append(item) + else: + if item != index_name: + file_items.append(item) + + directory_items.sort() + file_items .sort() + + for item in directory_items: + directory_list_content += f"
  • {item}/ [DIR]
  • \n" + for item in file_items: + directory_list_content += f"
  • {item} [FILE]
  • \n" + + directory_list_content += f"
  • {index_name} [THIS]
  • \n" + + index_content = index_content.replace('{{directory_list}}',directory_list_content) + + if os.path.normpath(directory_path) == os.path.normpath(index["base_directory"]): + index_content = index_content.replace("{{comment_start}}","") + elif os.path.dirname(remove_base_dir(index,directory_path)) == "": + index_content = index_content.replace('{{parent}}',"") + index_content = remove_comment(index_content) + elif (directory_path.split(os.sep)[0] == index["base_directory"]) and (os.path.normpath(directory_path) != os.path.normpath(index["base_directory"])): + index_content = index_content.replace('{{parent}}',f"/{os.path.dirname(remove_base_dir(index,directory_path))}/") + index_content = remove_comment(index_content) + else: + index_content = index_content.replace('{{parent}}',f"{os.path.dirname(directory_path)}") + index_content = remove_comment(index_content) + + with open(os.path.join(directory_path,index_name), 'w') as index_file: + index_file.write(index_content) + else: + print("Error: Index content not found.") + +def generate_directory_indexes(output_folder,output,index): + print(f"\nGenerating directory indexes for: {output_folder}") + + output_dirs = output_folder.split(os.path.sep) + directory_paths = [] + + for i in range(len(output_dirs)): + directory_path = os.path.join(*output_dirs[:i+1]) + directory_paths.append(directory_path) + + match_at = 0 + for i in range(len(directory_paths)): + if os.path.normpath(directory_paths[i]) == os.path.normpath(index["base_directory"]): + match_at = i + + + for i in range(match_at+1,len(directory_paths)): + directory_path = directory_paths[i] + if directory_path != output_folder: + generate_directory_index(directory_path,index,index["base_index_name"]) + + if index["generate_project_index"]: + print(f"\nGenerating project directory indexes for: {directory_path}") + + if index["generate_project_root_index"]: + generate_directory_index(directory_path,index,index["project_root_index_name"]) + + for root,dirs,files in os.walk(directory_path): + for dir_name in dirs: + current_dir = os.path.join(root, dir_name) + generate_directory_index(current_dir,index,index["project_index_name"]) + + generate_directory_index(index["base_directory"] or output["output_folder"].split(os.sep)[0],index,index["root_index_name"] or "index.html") + +if __name__ == '__main__': + if len(sys.argv) != 2: + print("Usage: python script.py [config_path]") + exit(1) + + config_path = sys.argv[1] + settings,core,output,index,embed = read_config(config_path) + + print(f'\nTitle: {settings["title"]}') + print(f'Index files: {index["enabled"] and "enabled" or "disabled"} ({index["enabled"]})') + + generate_html(settings,core,output,embed) + + if index["enabled"]: + generate_directory_indexes(output['output_folder'], output, index) diff --git a/generate.sh b/generate.sh new file mode 100755 index 0000000..f6257c3 --- /dev/null +++ b/generate.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# radioburzy +python3 ./gallery_generator.py config/radioburza/leden_2024.ini +python3 ./gallery_generator.py config/radioburza/brezen_2024.ini + +# laboratoř EE +python3 ./gallery_generator.py config/lab/storage_2024_03_07.ini + +# elektronky +python3 ./gallery_generator.py config/tubes/gu81m.ini \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..06c218e --- /dev/null +++ b/index.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + 9551Dev's Electronics Gallery + + + + +
    +
    +

    9551Dev's Electronics Gallery

    + +
    + Browse Gallery +
    +
    +
    + + + diff --git a/pictures/lab/storage_2024_03_07/1.jpg b/pictures/lab/storage_2024_03_07/1.jpg new file mode 100644 index 0000000..426ebd5 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/1.jpg differ diff --git a/pictures/lab/storage_2024_03_07/10.jpg b/pictures/lab/storage_2024_03_07/10.jpg new file mode 100644 index 0000000..b4a3a47 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/10.jpg differ diff --git a/pictures/lab/storage_2024_03_07/11.jpg b/pictures/lab/storage_2024_03_07/11.jpg new file mode 100644 index 0000000..2ebda3b Binary files /dev/null and b/pictures/lab/storage_2024_03_07/11.jpg differ diff --git a/pictures/lab/storage_2024_03_07/12.jpg b/pictures/lab/storage_2024_03_07/12.jpg new file mode 100644 index 0000000..bc1c261 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/12.jpg differ diff --git a/pictures/lab/storage_2024_03_07/13.jpg b/pictures/lab/storage_2024_03_07/13.jpg new file mode 100644 index 0000000..f3b34fc Binary files /dev/null and b/pictures/lab/storage_2024_03_07/13.jpg differ diff --git a/pictures/lab/storage_2024_03_07/14.jpg b/pictures/lab/storage_2024_03_07/14.jpg new file mode 100644 index 0000000..81e325c Binary files /dev/null and b/pictures/lab/storage_2024_03_07/14.jpg differ diff --git a/pictures/lab/storage_2024_03_07/15.jpg b/pictures/lab/storage_2024_03_07/15.jpg new file mode 100644 index 0000000..84a88a5 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/15.jpg differ diff --git a/pictures/lab/storage_2024_03_07/16.jpg b/pictures/lab/storage_2024_03_07/16.jpg new file mode 100644 index 0000000..dbcc067 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/16.jpg differ diff --git a/pictures/lab/storage_2024_03_07/17.jpg b/pictures/lab/storage_2024_03_07/17.jpg new file mode 100644 index 0000000..b5d99df Binary files /dev/null and b/pictures/lab/storage_2024_03_07/17.jpg differ diff --git a/pictures/lab/storage_2024_03_07/18.jpg b/pictures/lab/storage_2024_03_07/18.jpg new file mode 100644 index 0000000..30dd005 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/18.jpg differ diff --git a/pictures/lab/storage_2024_03_07/19.jpg b/pictures/lab/storage_2024_03_07/19.jpg new file mode 100644 index 0000000..6857023 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/19.jpg differ diff --git a/pictures/lab/storage_2024_03_07/2.jpg b/pictures/lab/storage_2024_03_07/2.jpg new file mode 100644 index 0000000..fee88fe Binary files /dev/null and b/pictures/lab/storage_2024_03_07/2.jpg differ diff --git a/pictures/lab/storage_2024_03_07/3.jpg b/pictures/lab/storage_2024_03_07/3.jpg new file mode 100644 index 0000000..4c15e77 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/3.jpg differ diff --git a/pictures/lab/storage_2024_03_07/4.jpg b/pictures/lab/storage_2024_03_07/4.jpg new file mode 100644 index 0000000..82e880f Binary files /dev/null and b/pictures/lab/storage_2024_03_07/4.jpg differ diff --git a/pictures/lab/storage_2024_03_07/5.jpg b/pictures/lab/storage_2024_03_07/5.jpg new file mode 100644 index 0000000..850801d Binary files /dev/null and b/pictures/lab/storage_2024_03_07/5.jpg differ diff --git a/pictures/lab/storage_2024_03_07/6.jpg b/pictures/lab/storage_2024_03_07/6.jpg new file mode 100644 index 0000000..123f09a Binary files /dev/null and b/pictures/lab/storage_2024_03_07/6.jpg differ diff --git a/pictures/lab/storage_2024_03_07/7.jpg b/pictures/lab/storage_2024_03_07/7.jpg new file mode 100644 index 0000000..3de8922 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/7.jpg differ diff --git a/pictures/lab/storage_2024_03_07/8.jpg b/pictures/lab/storage_2024_03_07/8.jpg new file mode 100644 index 0000000..a751d46 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/8.jpg differ diff --git a/pictures/lab/storage_2024_03_07/9.jpg b/pictures/lab/storage_2024_03_07/9.jpg new file mode 100644 index 0000000..0b1b7f1 Binary files /dev/null and b/pictures/lab/storage_2024_03_07/9.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0746.jpg b/pictures/radioburza/brezen_2024/IMG_0746.jpg new file mode 100644 index 0000000..0d371b1 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0746.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0748.jpg b/pictures/radioburza/brezen_2024/IMG_0748.jpg new file mode 100644 index 0000000..e721842 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0748.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0749.jpg b/pictures/radioburza/brezen_2024/IMG_0749.jpg new file mode 100644 index 0000000..518e45e Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0749.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0750.jpg b/pictures/radioburza/brezen_2024/IMG_0750.jpg new file mode 100644 index 0000000..0eb71dd Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0750.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0751.jpg b/pictures/radioburza/brezen_2024/IMG_0751.jpg new file mode 100644 index 0000000..88569c9 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0751.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0752.jpg b/pictures/radioburza/brezen_2024/IMG_0752.jpg new file mode 100644 index 0000000..7b6d9bf Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0752.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0753.jpg b/pictures/radioburza/brezen_2024/IMG_0753.jpg new file mode 100644 index 0000000..789c743 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0753.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0754.jpg b/pictures/radioburza/brezen_2024/IMG_0754.jpg new file mode 100644 index 0000000..ed61294 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0754.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0755.jpg b/pictures/radioburza/brezen_2024/IMG_0755.jpg new file mode 100644 index 0000000..57653a1 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0755.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0756.jpg b/pictures/radioburza/brezen_2024/IMG_0756.jpg new file mode 100644 index 0000000..bfa42b1 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0756.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0757.jpg b/pictures/radioburza/brezen_2024/IMG_0757.jpg new file mode 100644 index 0000000..7462b82 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0757.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0758.jpg b/pictures/radioburza/brezen_2024/IMG_0758.jpg new file mode 100644 index 0000000..bb9a48f Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0758.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_0759.jpg b/pictures/radioburza/brezen_2024/IMG_0759.jpg new file mode 100644 index 0000000..d630b72 Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_0759.jpg differ diff --git a/pictures/radioburza/brezen_2024/IMG_idk.jpg b/pictures/radioburza/brezen_2024/IMG_idk.jpg new file mode 100644 index 0000000..0cf0d7f Binary files /dev/null and b/pictures/radioburza/brezen_2024/IMG_idk.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0531.jpg b/pictures/radioburza/leden_2024/IMG_0531.jpg new file mode 100644 index 0000000..226aa7d Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0531.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0532.jpg b/pictures/radioburza/leden_2024/IMG_0532.jpg new file mode 100644 index 0000000..08804c1 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0532.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0533.jpg b/pictures/radioburza/leden_2024/IMG_0533.jpg new file mode 100644 index 0000000..4b7512f Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0533.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0534.jpg b/pictures/radioburza/leden_2024/IMG_0534.jpg new file mode 100644 index 0000000..5cd46c6 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0534.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0535.jpg b/pictures/radioburza/leden_2024/IMG_0535.jpg new file mode 100644 index 0000000..2f7bc08 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0535.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0537.jpg b/pictures/radioburza/leden_2024/IMG_0537.jpg new file mode 100644 index 0000000..18dc5b7 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0537.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0538.jpg b/pictures/radioburza/leden_2024/IMG_0538.jpg new file mode 100644 index 0000000..45682dd Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0538.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0539.jpg b/pictures/radioburza/leden_2024/IMG_0539.jpg new file mode 100644 index 0000000..3cb3804 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0539.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0540.jpg b/pictures/radioburza/leden_2024/IMG_0540.jpg new file mode 100644 index 0000000..e025184 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0540.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0541.jpg b/pictures/radioburza/leden_2024/IMG_0541.jpg new file mode 100644 index 0000000..2b21a53 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0541.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0542.jpg b/pictures/radioburza/leden_2024/IMG_0542.jpg new file mode 100644 index 0000000..21668ac Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0542.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0543.jpg b/pictures/radioburza/leden_2024/IMG_0543.jpg new file mode 100644 index 0000000..b13fcc9 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0543.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0544.jpg b/pictures/radioburza/leden_2024/IMG_0544.jpg new file mode 100644 index 0000000..dfbb465 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0544.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0545.jpg b/pictures/radioburza/leden_2024/IMG_0545.jpg new file mode 100644 index 0000000..b478f9b Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0545.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0547.jpg b/pictures/radioburza/leden_2024/IMG_0547.jpg new file mode 100644 index 0000000..f370a6a Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0547.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0551.jpg b/pictures/radioburza/leden_2024/IMG_0551.jpg new file mode 100644 index 0000000..74e03d3 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0551.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0552.jpg b/pictures/radioburza/leden_2024/IMG_0552.jpg new file mode 100644 index 0000000..9a2d98b Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0552.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0553.jpg b/pictures/radioburza/leden_2024/IMG_0553.jpg new file mode 100644 index 0000000..9089317 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0553.jpg differ diff --git a/pictures/radioburza/leden_2024/IMG_0554.jpg b/pictures/radioburza/leden_2024/IMG_0554.jpg new file mode 100644 index 0000000..2e3d047 Binary files /dev/null and b/pictures/radioburza/leden_2024/IMG_0554.jpg differ diff --git a/pictures/tubes/gu81m/1.jpg b/pictures/tubes/gu81m/1.jpg new file mode 100644 index 0000000..5f77ce0 Binary files /dev/null and b/pictures/tubes/gu81m/1.jpg differ diff --git a/pictures/tubes/gu81m/2.jpg b/pictures/tubes/gu81m/2.jpg new file mode 100644 index 0000000..f2581d3 Binary files /dev/null and b/pictures/tubes/gu81m/2.jpg differ diff --git a/pictures/tubes/gu81m/3.jpg b/pictures/tubes/gu81m/3.jpg new file mode 100644 index 0000000..bb3978b Binary files /dev/null and b/pictures/tubes/gu81m/3.jpg differ diff --git a/pictures/tubes/gu81m/4.jpg b/pictures/tubes/gu81m/4.jpg new file mode 100644 index 0000000..b79fe95 Binary files /dev/null and b/pictures/tubes/gu81m/4.jpg differ