You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
730 B

---
import { marked } from 'marked';
const releasesResponse = await fetch('https://api.github.com/repos/Facinorous-420/dick/releases');
console.log(releasesResponse)
const releases = await releasesResponse.json();
---
<ul>
{releases.map((release) => (
<li>
<h2 id={release.id}><a href={release.html_url}>{release.name}</a> <small>({new Date(release.created_at).toLocaleDateString()})</small></h2>
<div set:html={marked(release.body)}></div>
</li>
))}
</ul>
<style>
ul {
list-style: none;
padding: 0;
}
li {
margin: 0 0 3em;
}
li div {
margin-left: 1rem;
}
li div :global(h2) {
font-size: 1.3rem;
}
</style>