Commit a65a1c36 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Move image rendering to page template

Now every image attachment will be displayed on page top, just before
the actual content. This is enabled by default in the page model
parent 25d04a5d
......@@ -2,11 +2,6 @@ title: Piazza della Libertà
<div class="text-center float-xl-right">
<img src="/sede/ingresso_laterale.jpg" alt="Side entrance" class="img-flowing rounded m-1">
<img src="/sede/ingresso.jpg" alt="Main entrance" class="img-flowing rounded m-1">
Our base is in Piazza della Libertà 5/B, in the ZKB Starter's rooms, an initiative organized by ZKB Bank for startups. In the building we have two offices, one for 3D printing and electronics, and another one with computers and books, where chat is welcome.
### Tech Ops
......@@ -15,3 +10,5 @@ In this office we have three 3D printers (two Anet A8 and a Prusa I3 Mk3), two d
### Chat room ("Sala Chiacchiere")
In this room we have few computers available for our members (thanks to our Single Sign On system). There's not only room for chats, but also for leisure! We have two PlayStations with a bunch of *vintage* games, sure fun for players (and people watching). For the most nostalgic, we have a Commodore 64 too.
display_images: yes
<div class="text-center float-xl-right">
<img src="/sede/ingresso_laterale.jpg" alt="Stransko okno" class="img-flowing rounded m-1">
<img src="/sede/ingresso.jpg" alt="Glavni vhod" class="img-flowing rounded m-1">
Naš sedež je na Trgu Svobode 5/B v prostorih ZKB Starterja (pubuda Zadružne Kraške Banke za start-up podjetja). Na razpolago imamo dve sobi, prva (*ustvarjalnica*) je namenjena 3D tisku in elektroniki. V drugi sobi (*klepetalnica*) pa imamo nekaj računalnikov in zbirko knjig, ki so na voljo članom.
### Ustvarjalnica
......@@ -14,3 +9,5 @@ V *ustvarjalnici* so trije 3D tiskalniki (dve Anet A8 in Prusa I3 Mk3), dve mizi
Tu dobimo nekaj računalnikov, ki jih lahko člani uporabljajo, ampak poleg klepeta imajo člani na voljo tudi vse potrebno za sprostitev. Dve PlayStation in polica *vintage* iger zagotovijo da bo imel večer tudi trenutke zabave, za igralce in gledalce! Za "najzahtevnejše" člane imamo tudi Commodore 64!
title: Trg Svobode 5/B
display_images: yes
......@@ -2,11 +2,6 @@ title: Piazza della Libertà 5/B
<div class="text-center float-xl-right">
<img src="/sede/ingresso_laterale.jpg" alt="Vetrata laterale" class="img-flowing rounded m-1">
<img src="/sede/ingresso.jpg" alt="Ingresso principale" class="img-flowing rounded m-1">
La nostra sede è in piazza della Libertà 5/B, negli spazi di ZKB Starter, iniziativa della Banca ZKB per startup. All'interno abbiamo due uffici, uno per stampa 3D ed elettronica, l'altro con computer e libri dove si può chiacchierare tranquillamente.
### Ufficio Tecnico
......@@ -15,3 +10,5 @@ In questo ufficio abbiamo tre stampanti 3D (due Anet A8 e una Prusa I3 Mk3), due
### Sala Chiacchiere
In questa sala troviamo qualche computer disponibile ai soci (grazie al nostro sistema di account unico), ma oltre alle chiacchiere c'è anche posto per lo svago! Due PlayStation con una manciata di giochi *vintage* garantiscono il divertimento per chi gioca e chi sta a guardare. Per i più malinconici abbiamo anche un Commodore 64.
display_images: yes
......@@ -9,3 +9,9 @@ type = string
label = Body
type = markdown
label = Display image attachments
type = boolean
checkbox_label = If set, all image attachments will be displayed before the body.
default = false
......@@ -19,6 +19,13 @@
<h1 class="display-4 text-muted my-3">{{ this.title }}</h1>
<div id="content" class="mt-1 mb-5 px-3">
{% if this.display_images and this.attachments.images %}
<div class="text-center float-xl-right">
{% for image in this.attachments.images %}
<img src="{{ image.thumbnail(500)|url }}" class="img-flowing rounded m-1">
{% endfor %}
{% endif %}
{{ this.body }}
<footer class="small text-secondary text-center px-2">{{ bag('legal', this.alt, 'footer') }}</footer>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment