mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Working prototype for Lychee like image grid
This commit is contained in:
parent
85d4b47760
commit
3e3598ae10
4 changed files with 77 additions and 3 deletions
|
@ -34,9 +34,9 @@
|
|||
</div>
|
||||
|
||||
{% if images %}
|
||||
<div class="gallery-grid">
|
||||
<div class="gallery-grid" style="position: relative;">
|
||||
{% for image in images %}
|
||||
<a id="image-{{ image.id }}" class="gallery-item" href="{{ url_for('image.image', image_id=image.id) }}" style="background-color: rgb{{ image.colours.0 }}">
|
||||
<a id="image-{{ image.id }}" class="gallery-item" href="{{ url_for('image.image', image_id=image.id) }}" style="background-color: rgb{{ image.colours.0 }}; position: absolute; margin: 0;">
|
||||
<div class="image-filter">
|
||||
<p class="image-title"><span class="time">{{ image.created_at }}</span></p>
|
||||
</div>
|
||||
|
|
|
@ -206,6 +206,7 @@
|
|||
|
||||
window.onresize = () => {
|
||||
keepSquare();
|
||||
makeGrid();
|
||||
}
|
||||
window.onscroll = () => {
|
||||
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue