diff --git a/globals.php b/globals.php new file mode 100644 index 0000000..959b9af --- /dev/null +++ b/globals.php @@ -0,0 +1,6 @@ + max_scaled_size) { + let s = max_scaled_size / bigger_dim; + thumb_width *= s; + thumb_height *= s; + } + // képet tároló elem let container_section = document.createElement("section"); container_section.style.backgroundColor = line_entries[i].ColorMean; @@ -371,11 +385,11 @@ function compose_wall() { // a bélyegkép let img = document.createElement("img"); img.classList.add("thumbnail"); - container_section.style.width = img.style.width = `${line_entries[i].width * line_entries[i].scale_factor}px`; - container_section.style.height = img.style.height = `${line_entries[i].height * line_entries[i].scale_factor}px`; + container_section.style.width = img.style.width = `${thumb_width}px`; + container_section.style.height = img.style.height = `${thumb_height}px`; img.src = `ARTWORKS/thumbnails/${line_entries[i].Image_FileName}`; img.addEventListener("load", (e) => { - img.style.opacity = "100%"; + img.style.opacity = "1"; }, false); img.details = line_entries[i]; img.addEventListener("click", (e) => { @@ -480,7 +494,7 @@ function init_viewer() { // betöltéskor a felirat megjelenítése img.addEventListener("load", (e) => { - img.style.opacity='100%' + img.style.opacity="1"; place_artcaptions(); show(caption_sect); }, false); diff --git a/phw.css b/phw.css index 6f70c82..26bde1b 100644 --- a/phw.css +++ b/phw.css @@ -127,12 +127,12 @@ section.upload-btn { *[shown="false"] { visibility: hidden; display: none; - opacity: 0%; + opacity: 0; transition: 0.3s ease; } *[shown="true"] { - opacity: 100%; + opacity: 1; transition: 0.3s ease; } @@ -245,7 +245,7 @@ section.viewer { section.viewer[shown="true"] { - opacity: 100%; + opacity: 1; } img.viewer { @@ -302,7 +302,7 @@ section.art-captions { padding-bottom: 2em; background-color: rgba(0, 0, 0, 0.6); - opacity: 0%; + opacity: 0; max-height: 24px; transition: 1s ease; @@ -325,7 +325,7 @@ section.art-captions[shown="true"]:hover { } section[shown="true"] { - opacity: 100%; + opacity: 1; } @media only screen and (max-width: 600px) { @@ -365,5 +365,5 @@ span.thumb-title { } section.thumbnail-container:hover > span.thumb-title { - opacity: 100%; + opacity: 1; } \ No newline at end of file