mirror of
https://github.com/Xevion/the-office.git
synced 2025-12-17 02:13:34 -06:00
add Home and Episode routes, full quote display and viewing, simple quote counter, fixed episode list breaking sections with soft-copy, column changes
This commit is contained in:
48
client/src/components/Home.vue
Normal file
48
client/src/components/Home.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<b-card title="The Office Quotes">
|
||||
<b-card-text>
|
||||
A Vue.js application serving you {{ stats.totals.quote }} quotes from your favorite show - The Office.
|
||||
<br>
|
||||
Click on a Season and Episode on the left-hand sidebar to view quotes.
|
||||
Search for quotes with the instant searchbox.
|
||||
</b-card-text>
|
||||
</b-card>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.card {
|
||||
color: #888888;
|
||||
background-color: #161616;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.88);
|
||||
border-radius: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
data() {
|
||||
return {
|
||||
stats: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getStats() {
|
||||
const path = 'http://localhost:5000/api/stats/';
|
||||
axios.get(path)
|
||||
.then((res) => {
|
||||
this.stats = res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getStats();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user