max / makenotwork
1 file changed,
+5 insertions,
-4 deletions
| @@ -4,11 +4,12 @@ | |||
| 4 | 4 | <h2>Project Image</h2> | |
| 5 | 5 | <div style="display: flex; align-items: flex-start; gap: 1.5rem;"> | |
| 6 | 6 | <div id="project-image-preview" style="width: 120px; height: 120px; background: var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0;"> | |
| 7 | - | {% if project.cover_image_url.is_empty() %} | |
| 7 | + | {% match project.cover_image_url %} | |
| 8 | + | {% when Some with (url) %} | |
| 9 | + | <img src="{{ url }}" alt="Project image" style="width: 100%; height: 100%; object-fit: cover;"> | |
| 10 | + | {% when None %} | |
| 8 | 11 | <span style="opacity: 0.4; font-size: 0.8rem;">No image</span> | |
| 9 | - | {% else %} | |
| 10 | - | <img src="{{ project.cover_image_url }}" alt="Project image" style="width: 100%; height: 100%; object-fit: cover;"> | |
| 11 | - | {% endif %} | |
| 12 | + | {% endmatch %} | |
| 12 | 13 | </div> | |
| 13 | 14 | <div> | |
| 14 | 15 | <p style="font-size: 0.85rem; opacity: 0.7; margin: 0 0 0.5rem;">Square, at least 400x400px. JPG, PNG, or WebP.</p> |