
Check out the demo here.
Hasin is a globally-minded multidisciplinary creative technologist & educator based in New York City 🗽.
Drop me a line at hello@hasinahmed.org
Reviews • Services • Packages
Book Exploration Call
import { onMount } from 'svelte';
let hasinahmedorgAPI = 'https://hasinahmed.org/wp-json/wp/v2/posts?categories=13&per_page=100';
let data = [];
onMount(async () => {
const res = await fetch(hasinahmedorgAPI);
const responseData = await res.json();
data = responseData;
});
Reading API data from my wordpress!
hasinahmed.org
open_in_new
{#each data as d,i}
{:else}
{/each}
* {padding: 0; margin: 0}
main {
display: flex;
flex-direction: column;
flex-wrap: wrap;
row-gap: 5%;
align-content: center;
}
div {
width: 80%;
max-width:720px;
border: 2px solid black;
padding: 24px;
margin:8px 0px 8px 0px;
border-radius: 8px;
overflow: hidden;
}
img {
object-fit: cover;
}
h2 {
display: flex;
flex-direction: row;
justify-content: space-between;
}

Check out the demo here.