diff --git a/assets/templates/blog-temp.png b/assets/templates/blog-temp.png new file mode 100644 index 00000000..2c58c644 Binary files /dev/null and b/assets/templates/blog-temp.png differ diff --git a/assets/templates/simple-blog-temp.png b/assets/templates/simple-blog-temp.png new file mode 100644 index 00000000..6d331ade Binary files /dev/null and b/assets/templates/simple-blog-temp.png differ diff --git a/assets/templates/simple-ws-temp.png b/assets/templates/simple-ws-temp.png new file mode 100644 index 00000000..15cec9e8 Binary files /dev/null and b/assets/templates/simple-ws-temp.png differ diff --git a/assets/templates/ws-temp.png b/assets/templates/ws-temp.png new file mode 100644 index 00000000..f303d1a8 Binary files /dev/null and b/assets/templates/ws-temp.png differ diff --git a/pages/featured/template.ftd b/pages/featured/template.ftd index 95f5c4b5..635112b9 100644 --- a/pages/featured/template.ftd +++ b/pages/featured/template.ftd @@ -21,6 +21,7 @@ align-content: top-left for: $obj in $grid-view.category title: $obj.title preview-url: $obj.preview-url + preview-img: $obj.preview-img id: $obj.id -- end: ds.row @@ -37,6 +38,7 @@ align-content: top-left for: $obj in $grid-view.category title: $obj.title preview-url: $obj.preview-url + preview-img: $obj.preview-img id: $obj.id -- end: ds.column @@ -59,6 +61,7 @@ align-content: top-left -- component grid-of-items: string title: string preview-url: +ftd.image-src preview-img: integer id: boolean $mouse-in: false @@ -69,13 +72,20 @@ $on-mouse-leave$: $ftd.set-bool($a = $grid-of-items.mouse-in, v = false) border: $ds.borders.uniform.small spacing: $ds.spaces.vertical-gap.zero --- ftd.iframe: +/-- ftd.iframe: width.fixed.px: 354 height.fixed.px: 224 border-top-left-radius.px: 8 border-top-right-radius.px: 8 src: $grid-of-items.preview-url +-- ftd.image: +src: $grid-of-items.preview-img +width.fixed.px: 354 +height.fixed.px: 224 +border-top-left-radius.px: 8 +border-top-right-radius.px: 8 + -- ftd.column: if: { grid-of-items.mouse-in } padding.px: 15 diff --git a/records/sites.ftd b/records/sites.ftd index bc2603bd..7c412caf 100644 --- a/records/sites.ftd +++ b/records/sites.ftd @@ -120,3 +120,4 @@ optional string next: integer id: string title: string preview-url: +ftd.image-src preview-img: diff --git a/scenarios/featured/index.ftd b/scenarios/featured/index.ftd index 99671b13..05fbd42a 100644 --- a/scenarios/featured/index.ftd +++ b/scenarios/featured/index.ftd @@ -13,21 +13,25 @@ user-data: $john-doe.jd -- template-record.template: title: Blog Template preview-url: https://blog.fifthtry.site/ +preview-img: $assets.files.assets.templates.blog-temp.png id: 1 -- template-record.template: title: Simple Website Template preview-url: https://simple-website-template.fifthtry.site/ +preview-img: $assets.files.assets.templates.simple-ws-temp.png id: 2 -- template-record.template: title: Website Template preview-url: https://website-template.fifthtry.site/ +preview-img: $assets.files.assets.templates.ws-temp.png id: 3 -- template-record.template: title: Simple Blog Template preview-url: https://simple-blog-template.fifthtry.site/ +preview-img: $assets.files.assets.templates.simple-blog-temp.png id: 4 -- end: template-category-list