Recursive preview

This commit is contained in:
2023-03-27 20:24:53 +03:00
parent ed20ebcbc5
commit 8891e4746a
11 changed files with 81 additions and 31 deletions

View File

@@ -23,11 +23,17 @@ export default (props: { project: Project, odd: boolean }) => {
[styles.Project_halfWidth]: props.project.halfWidth
}}
>
<img
class={styles.preview}
src={props.project.preview}
style={props.project.previewStyle}
/>
{
typeof props.project.preview === 'string'
?
<img
class={styles.preview}
src={props.project.preview as string}
style={props.project.previewStyle}
/>
:
<props.project.preview />
}
<div
class={styles.body}
>
@@ -47,7 +53,7 @@ export default (props: { project: Project, odd: boolean }) => {
<div class={styles.techIcons}>
<For each={props.project.icons}>{(icon: Icon) =>
<a
<a
href={linkFor(icon)}
target="_blank"
class={styles.techIcon}