From 5f585897138e4376abaf9dcce8f437bc4be00f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0r=C3=A1mek?= Date: Thu, 6 Jun 2024 09:03:37 +0200 Subject: [PATCH] update --- scripty/galeria.js | 8 ++++++++ stranky/Quiz.html | 5 ++++- stranky/galeria.html | 38 ++++++++++++++++++++++++++++++++++++++ styly/galeria.css | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 scripty/galeria.js create mode 100644 stranky/galeria.html create mode 100644 styly/galeria.css diff --git a/scripty/galeria.js b/scripty/galeria.js new file mode 100644 index 0000000..08a1c8c --- /dev/null +++ b/scripty/galeria.js @@ -0,0 +1,8 @@ +function downloadImage(imageUrl) { + const link = document.createElement('a'); + link.href = imageUrl; + link.download = imageUrl.split('/').pop(); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); +} diff --git a/stranky/Quiz.html b/stranky/Quiz.html index 3efd979..882b778 100644 --- a/stranky/Quiz.html +++ b/stranky/Quiz.html @@ -133,4 +133,7 @@ - + + + \ No newline at end of file diff --git a/stranky/galeria.html b/stranky/galeria.html new file mode 100644 index 0000000..73b127b --- /dev/null +++ b/stranky/galeria.html @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/styly/galeria.css b/styly/galeria.css new file mode 100644 index 0000000..a33d267 --- /dev/null +++ b/styly/galeria.css @@ -0,0 +1,39 @@ +body { + font-family: Arial, sans-serif; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; + background-color: #f0f0f0; +} + +.gallery { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 10px; +} + +.gallery-item { + position: relative; + text-align: center; +} + +.gallery-item img { + width: 100%; + height: auto; + display: block; +} + +.gallery-item button { + margin-top: 5px; + padding: 5px 10px; + background-color: #007bff; + color: white; + border: none; + cursor: pointer; +} + +.gallery-item button:hover { + background-color: #0056b3; +} \ No newline at end of file