Commit 8b643570 authored by Christophe Benz's avatar Christophe Benz
Browse files

Implement imageUrl

parent 1b0268c5
......@@ -25,8 +25,8 @@ pages:
newItemButtonTitle: Add a new challenge
source:
provider: gitlab
baseUrl: https://gitlab.com
group: gitlab-org
baseUrl: https://framagit.org
group: agdic-hackathon/challenges
- slug: tools
appBarTitle: Tools
title: Tools of the hackathon
......
<script>
import { Button, Card, Icon } from "smelte"
import { Button, Card, Icon, Image } from "smelte"
export let data
</script>
<div class="cards px-2">
<div class="flex flex-wrap -mx-2">
{#each data as { id, title, text, url, count, countIcon } (id)}
{#each data as { id, title, text, url, count, countIcon, imageUrl } (id)}
<div class="w-full mb-4 sm:w-1/3 sm:px-2 lg:w-1/4">
<Card.Card class="w-full sm:h-full">
<div slot="title">
......@@ -14,6 +14,9 @@
<Card.Title {title} />
{/if}
</div>
<div slot="media">
<Image class="w-full" src={imageUrl} alt="image" />
</div>
<div slot="text">
{#if text}
<div class="p-5 pb-0 pt-3 text-gray-700 body-2 break-all">
......
......@@ -28,6 +28,7 @@ export async function fetchGitLabGroupProjects({ baseUrl, group }) {
...project,
count: project.star_count,
countIcon: "star", // Cf https://material.io/resources/icons
imageUrl: project.avatar_url,
text: project.description,
title: project.name,
url: project.web_url,
......
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