generated from hjess/PythonTemplateProject
Better CSS
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 34s
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 34s
This commit is contained in:
@@ -48,13 +48,15 @@ def slider(options, images):
|
||||
height = options.get("height", 375)
|
||||
|
||||
html_content = []
|
||||
html_content.append('<div class="modal-buttons">')
|
||||
for i, val in enumerate(images):
|
||||
if i % 2 == 0:
|
||||
html_content.append(f"""<button onclick="openModal('modal{i}')" class="open"> <img src="{val}" width={width} height={height}> Open Modal {i} </button>""".strip())
|
||||
html_content.append(f"""<button onclick="openModal('modal{i}')" class="open"> <img src="{val}" class="thumbnail"></button>""".strip())
|
||||
else:
|
||||
html_content.append(f"""<button onclick="openModal('modal{i}')" class="open_inv"> <img src="{val}" width={width} height={height}> Open Modal {i} </button>""".strip())
|
||||
html_content.append(f"""<button onclick="openModal('modal{i}')" class="open_inv"> <img src="{val}" class="thumbnail" ></button>""".strip())
|
||||
|
||||
html_content.append(f"""<div class="modal" id="modal{i}"> <div class="modal-content"> <h2>Modal {i}</h2> <p>This is modal {i}.</p> <img src="{val}" width="80%" height="80%"> <button onclick="closeModal('modal{i}')">Close</button> </div> </div>""")
|
||||
html_content.append( '</div>' )
|
||||
html = '\n'.join( html_content )
|
||||
|
||||
return html
|
||||
|
||||
Reference in New Issue
Block a user