Commit afa39d84 authored by Fabio's avatar Fabio

Fix loading gif width

parent 477e5459
......@@ -16,7 +16,7 @@
}
button:active {
background-color: gradient #d9d9d9;
background: linear-gradient(to bottom, #d9d9d9 74%,#cdcdcd 99%);
background: linear-gradient(to bottom, #d9d9d9 74%,#cdcdcd 99%);
}
ul {
......@@ -25,10 +25,11 @@
flex-wrap: wrap;
justify-content: space-between;
}
li {
li {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
list-style: none;
border: 1px solid #e1e1e1;
background-color: #f9f9f9;
......@@ -38,7 +39,7 @@
width: 20em;
}
div { text-align: center; }
.header {
.header {
background-image: url(fire.png);
background-repeat: no-repeat;
background-position: center;
......
......@@ -3,7 +3,7 @@
<button v-on:click="update">update </button>
<ul>
<Story v-for="story in results" :key="story.objectID" :story="story"></Story>
<li v-if="loading"><img src="loading.gif"></li>
<li class="loading" v-if="loading"><img src="loading.gif"></li>
</ul>
</div>
</template>
......@@ -15,7 +15,7 @@ export default {
data() {
return {
results: [],
loading: 0,
loading: 0,
page : 0,
}
},
......@@ -64,7 +64,7 @@ export default {
fetchData() {
if (this.loading > 0 ) return;
// console.log(this.loading, 'http://hn.algolia.com/api/v1/search_by_date?query="is down"&restrictSearchableAttributes=title&page='+this.page)
this.loading = 1;
fetch('http://hn.algolia.com/api/v1/search_by_date?query="is down"&restrictSearchableAttributes=title&page='+this.page)
.then(response => {
......
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