fetch
unless the framework has something built in.All apps will use the following HTML:
<h1>Image Search</h1>
<form>
<label for="searchTerm">Search Term</label>
<input class="u-full-width" type="text" id="searchTerm" name="searchTerm">
<button type="submit">Search</button>
</form>
<img id="loadingImage" src="https://i.imgur.com/LVHmLnb.gif">
<section class="images">
<!-- images loaded dynamically here -->
</section>
All apps will use the skeleton CSS framework:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
And use these styles:
body {
width: 80%;
margin: 2em auto 0 auto;
}
.images {
column-count: 3;
}
img {
width: 100%;
}
@media (max-width: 1200px) {
.images {
column-count: 2;
}
}
@media (max-width: 800px) {
.images {
column-count: 1;
}
}