gdritter repos frony-ritter-designs / 9718f7c
Add photos to design edit view Getty Ritter 3 years ago
3 changed file(s) with 20 addition(s) and 3 deletion(s). Collapse all Expand all
181181 .order_by(model.Tag.tag_name),
182182 "categories": design.category_list(),
183183 "description": design.description,
184 "photos": ({"image": d} for d in design.photos),
184 "photos": design.photos,
185185 "id_str": f"{design.id:05}",
186186 }
187187 ),
172172 font-weight: bold;
173173 }
174174
175 .design .imgbox {
175 .imgbox {
176176 overflow-x: auto;
177177 }
178178
179 .design .images {
179 .images {
180180 display: flex;
181181 overflow-x: auto;
182182 width: min-content;
183183 margin-left: auto;
184184 margin-right: auto;
185185 align-items: center;
186 }
187
188 .image_edit {
189 border: 1px solid #000;
190 padding: 1em;
191 text-align: center;
186192 }
187193
188194 .design .description {
3232 </div>
3333 </div>
3434 </div>
35 <div class="imgbox">
36 <div class="images">
37 {{#photos}}
38 <div class="image_edit">
39 <img src="/static/photos/{{filename}}"/><br/>
40 <a href="/edit/view-photo/{{filename}}">{{filename}}</a> &mdash;
41 <a href="/edit/photo/{{filename}}?design_id={{id}}">Delete this image</a>
42 </div>
43 {{/photos}}
44 </div>
45 </div>
3546 </form>