center and fit modal
This commit is contained in:
parent
a2549ff7db
commit
f6141b0047
@ -1 +1 @@
|
||||
|
||||
Cocktail Arrangements
|
||||
|
||||
@ -56,16 +56,25 @@
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
overflow: clip;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
@ -77,8 +86,18 @@
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
overflow: clip !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -120,19 +139,19 @@
|
||||
<div class="gallery">
|
||||
<div class="gallery-item">
|
||||
<figure class="image is-square">
|
||||
<img loading=lazy src="../../assets/pics/gallery/centerpiece/20230108_112718.jpg}.webp" alt="" data-target="modal1" aria-haspopup="true">
|
||||
<img loading=lazy src="../../assets/pics/gallery/centerpiece/20230108_112718.jpg}.webp" alt="Cocktail Arrangements" data-target="modal1" aria-haspopup="true">
|
||||
</figure>
|
||||
<p class="caption"></p>
|
||||
<p class="caption">Cocktail Arrangements</p>
|
||||
</div>
|
||||
<div class="modal" id="modal1">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title has-size-4"></p>
|
||||
<p class="modal-card-title has-size-4">Cocktail Arrangements</p>
|
||||
<button class="delete" aria-label="close" data-action="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
<img class="modal-image" src="../../assets/pics/gallery/centerpiece/20230108_112718.jpg}.webp" alt="">
|
||||
<img class="modal-image" src="../../assets/pics/gallery/centerpiece/20230108_112718.jpg}.webp" alt="Cocktail Arrangements">
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
@ -145,10 +164,12 @@
|
||||
function openModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
modal.classList.add('is-active');
|
||||
document.body.classList.add('modal-open'); // Prevent background scroll
|
||||
}
|
||||
|
||||
function closeModal(modal) {
|
||||
modal.classList.remove('is-active');
|
||||
document.body.classList.remove('modal-open'); // Allow scrolling again
|
||||
}
|
||||
|
||||
const images = document.querySelectorAll('.gallery img');
|
||||
@ -175,6 +196,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<footer class="footer has-background-primary-light">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
@ -71,16 +71,25 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
overflow: clip;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
@ -92,8 +101,18 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
overflow: clip !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -182,10 +201,12 @@ cat >> "$OUTPUT_FILE" <<EOL
|
||||
function openModal(modalId) {
|
||||
const modal = document.getElementById(modalId);
|
||||
modal.classList.add('is-active');
|
||||
document.body.classList.add('modal-open'); // Prevent background scroll
|
||||
}
|
||||
|
||||
function closeModal(modal) {
|
||||
modal.classList.remove('is-active');
|
||||
document.body.classList.remove('modal-open'); // Allow scrolling again
|
||||
}
|
||||
|
||||
const images = document.querySelectorAll('.gallery img');
|
||||
@ -212,6 +233,7 @@ cat >> "$OUTPUT_FILE" <<EOL
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<footer class="footer has-background-primary-light">
|
||||
<div class="content has-text-centered">
|
||||
|
||||
@ -50,16 +50,33 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
}
|
||||
|
||||
.modal-image {
|
||||
max-width: 90%;
|
||||
max-height: 90vh;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.modal{
|
||||
--bulma-modal-content-width: 95vw;
|
||||
--bulma-modal-content-height: 95vh;
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
@ -68,6 +85,19 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -109,7 +139,7 @@
|
||||
<div class="gallery">
|
||||
<div class="gallery-item">
|
||||
<figure class="image is-square">
|
||||
<img src="../../assets/pics/gallery/classic/20230617_131551.webp" alt="20' Classic Arch" data-target="modal1" aria-haspopup="true">
|
||||
<img loading=lazy src="../../assets/pics/gallery/classic/20230617_131551.webp" alt="20' Classic Arch" data-target="modal1" aria-haspopup="true">
|
||||
</figure>
|
||||
<p class="caption">20' Classic Arch</p>
|
||||
</div>
|
||||
@ -127,7 +157,7 @@
|
||||
</div>
|
||||
<div class="gallery-item">
|
||||
<figure class="image is-square">
|
||||
<img src="../../assets/pics/gallery/classic/_Photos_20241207_083534.webp" alt="Classic Columns" data-target="modal2" aria-haspopup="true">
|
||||
<img loading=lazy src="../../assets/pics/gallery/classic/_Photos_20241207_083534.webp" alt="Classic Columns" data-target="modal2" aria-haspopup="true">
|
||||
</figure>
|
||||
<p class="caption">Classic Columns</p>
|
||||
</div>
|
||||
|
||||
@ -71,16 +71,25 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
overflow: clip;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
@ -92,8 +101,18 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
overflow: clip !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -50,16 +50,33 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
}
|
||||
|
||||
.modal-image {
|
||||
max-width: 90%;
|
||||
max-height: 90vh;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.modal{
|
||||
--bulma-modal-content-width: 95vw;
|
||||
--bulma-modal-content-height: 95vh;
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
@ -68,6 +85,19 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -110,7 +140,7 @@
|
||||
<div class="gallery">
|
||||
<div class="gallery-item">
|
||||
<figure class="image is-square">
|
||||
<img src="../../assets/pics/gallery/organic/20241121_200047~2.jpg" alt="" data-target="modal1" aria-haspopup="true">
|
||||
<img loading=lazy src="../../assets/pics/gallery/organic/20241121_200047~2.jpg" alt="" data-target="modal1" aria-haspopup="true">
|
||||
</figure>
|
||||
<p class="caption"></p>
|
||||
</div>
|
||||
@ -118,7 +148,7 @@
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title"></p>
|
||||
<p class="modal-card-title has-size-4"></p>
|
||||
<button class="delete" aria-label="close" data-action="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
@ -128,7 +158,7 @@
|
||||
</div>
|
||||
<div class="gallery-item">
|
||||
<figure class="image is-square">
|
||||
<img src="../../assets/pics/gallery/organic/20250202_133930~2.jpg" alt="" data-target="modal2" aria-haspopup="true">
|
||||
<img loading=lazy src="../../assets/pics/gallery/organic/20250202_133930~2.jpg" alt="" data-target="modal2" aria-haspopup="true">
|
||||
</figure>
|
||||
<p class="caption"></p>
|
||||
</div>
|
||||
@ -136,7 +166,7 @@
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title"></p>
|
||||
<p class="modal-card-title has-size-4"></p>
|
||||
<button class="delete" aria-label="close" data-action="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
|
||||
@ -71,16 +71,25 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
overflow: clip;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
@ -92,8 +101,18 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
overflow: clip !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -160,7 +179,7 @@ for img in "$IMAGE_DIR"/*.{jpg,jpeg,png,gif,webp}; do
|
||||
printf " <div class=\"modal-background\"></div>\n" >> "$OUTPUT_FILE"
|
||||
printf " <div class=\"modal-card\">\n" >> "$OUTPUT_FILE"
|
||||
printf " <header class=\"modal-card-head\">\n" >> "$OUTPUT_FILE"
|
||||
printf " <p class=\"modal-card-title\ has-size-4">%s</p>\n" "$caption" >> "$OUTPUT_FILE"
|
||||
printf " <p class=\"modal-card-title has-size-4\">%s</p>\n" "$caption" >> "$OUTPUT_FILE"
|
||||
printf " <button class=\"delete\" aria-label=\"close\" data-action=\"close\"></button>\n" >> "$OUTPUT_FILE"
|
||||
printf " </header>\n" >> "$OUTPUT_FILE"
|
||||
printf " <section class=\"modal-card-body\">\n" >> "$OUTPUT_FILE"
|
||||
|
||||
@ -50,16 +50,33 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
}
|
||||
|
||||
.modal-image {
|
||||
max-width: 90%;
|
||||
max-height: 90vh;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.modal{
|
||||
--bulma-modal-content-width: 95vw;
|
||||
--bulma-modal-content-height: 95vh;
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
@ -68,6 +85,19 @@
|
||||
font-family: 'Autour One', cursive;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -71,16 +71,25 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
|
||||
}
|
||||
.modal-image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
object-fit: contain; /* Ensures the whole image is visible without cropping */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
border-radius: 10px;
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
overflow: clip;
|
||||
}
|
||||
.modal-card {
|
||||
width: auto;
|
||||
max-width: 90vw; /* Ensures the modal is responsive */
|
||||
max-height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent; /* Keeps the background consistent */
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.modal-content {
|
||||
overflow-y: none;
|
||||
max-height: 95vh;
|
||||
@ -92,8 +101,18 @@ cat > "$OUTPUT_FILE" <<EOL
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.modal-card-body{
|
||||
overflow: clip !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.delete{
|
||||
margin-left: 10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user