Upgrade to nick_site commit f981fa57, adds alerts and inactive sidebar option
[ndcode_site.git] / _lib / blog_post.jst
index 401761b..9a95717 100644 (file)
@@ -16,12 +16,15 @@ return async (env, head, body, scripts) => {
       try {
         let root = await transaction.get()
         let p = await get_navigation(root, env.component_names)
+        let images = await p.get_json('images')
 
-        div.row.mb-3 {
-          div.col-sm-12 {
-            img.img-responsive(
-              src=await p.get_json('image') || 'image.jpg'
-            ) {}
+        // we can use higher resolution images when lower not available
+        while (images.length < 2)
+          images.push(images[images.length - 1])
+
+        div.my-3 {
+          a(href=images[0]) {
+            img.img-fluid(src=images[1]) {}
           }
         }