remove faulty base URL constructor, reformatting, SearchResults remove commented code

This commit is contained in:
Xevion
2020-09-07 23:40:52 -05:00
parent a74004d305
commit a0d7a78f73
9 changed files with 123 additions and 98 deletions

View File

@@ -2,58 +2,52 @@
<div> <div>
<ais-hits> <ais-hits>
<div slot-scope="{ items }"> <div slot-scope="{ items }">
<SearchResult v-for="item in items" :item="item" :key="item.objectID"></SearchResult> <SearchResult
<!-- <b-card v-for="item in items" :key="item.objectID" class="mb-1" body-class="p-0 py-2">--> v-for="item in items"
<!-- <b-card-text class="p-1 pl-2">--> :item="item"
<!-- <strong v-html="item._highlightResult.speaker.value"></strong>:--> :key="item.objectID"
<!-- <span v-html="item._highlightResult.text.value" class="pl-1"></span>--> ></SearchResult>
<!-- <strong>{{ item.speaker }}</strong>:-->
<!-- <ais-highlight attribute="text" :hit="item"/>-->
<!-- <QuoteList :quotes="scene.quotes"></QuoteList>-->
<!-- </b-card-text>-->
<!-- <template v-slot:footer>-->
<!-- <router-link class="no-link pl-1" :to="`/${item.season}/${item.episode}#${item.section}`">-->
<!-- Season {{ item.season }} Episode {{ item.episode }} Scene {{ item.section }}-->
<!-- </router-link>-->
<!-- </template>-->
<!-- </b-card>-->
</div> </div>
</ais-hits> </ais-hits>
</div> </div>
</template> </template>
<style lang="scss"> <style lang="scss">
@import "../assets/scss/_variables"; @import "../assets/scss/_variables";
.card-footer { .card-footer {
padding: 0.1em; padding: 0.1em;
font-size: 0.8em; font-size: 0.8em;
color: grey; color: grey;
} }
mark, .mark { mark,
padding: 0.02em; .mark {
background-color: $highlight; padding: 0.02em;
/*color: #black;*/ background-color: $highlight;
/*-webkit-filter: invert(100%);*/ /*color: #black;*/
/*filter: invert(100%);*/ /*-webkit-filter: invert(100%);*/
} /*filter: invert(100%);*/
}
.ais-Hits-item, .ais-InfiniteHits-item, .ais-InfiniteResults-item, .ais-Results-item { .ais-Hits-item,
/*margin-top: 1rem;*/ .ais-InfiniteHits-item,
/*margin-left: 1rem;*/ .ais-InfiniteResults-item,
/*padding: 1rem;*/ .ais-Results-item {
/*width: calc(25% - 1rem);*/ /*margin-top: 1rem;*/
border: none; /*margin-left: 1rem;*/
box-shadow: none; /*padding: 1rem;*/
} /*width: calc(25% - 1rem);*/
border: none;
box-shadow: none;
}
</style> </style>
<script> <script>
import SearchResult from './SearchResult.vue'; import SearchResult from "./SearchResult.vue";
export default { export default {
name: 'SearchResults', name: "SearchResults",
components: { components: {
SearchResult, SearchResult,
}, },
}; };
</script> </script>

View File

@@ -1,7 +1,15 @@
<template> <template>
<div class="accordion" role="tablist"> <div class="accordion" role="tablist">
<b-card class="season-item" v-for="season in seasons" :key="season.season_id"> <b-card
<b-card-header header-tag="header" role="tab" v-b-toggle="'accordion-' + season.season_id"> class="season-item"
v-for="season in seasons"
:key="season.season_id"
>
<b-card-header
header-tag="header"
role="tab"
v-b-toggle="'accordion-' + season.season_id"
>
<a class="no-link align-items-center justify-content-between d-flex"> <a class="no-link align-items-center justify-content-between d-flex">
<h5 class="mb-0 pu-0 mu-0 season-title"> <h5 class="mb-0 pu-0 mu-0 season-title">
Season {{ season.season_id }} Season {{ season.season_id }}
@@ -9,20 +17,36 @@
<b-icon class="" icon="chevron-down"></b-icon> <b-icon class="" icon="chevron-down"></b-icon>
</a> </a>
</b-card-header> </b-card-header>
<b-collapse :id="'accordion-' + season.season_id" accordion="accordion-season-list"> <b-collapse
:id="'accordion-' + season.season_id"
accordion="accordion-season-list"
>
<b-card-body class="h-100 px-0"> <b-card-body class="h-100 px-0">
<b-list-group> <b-list-group>
<template v-for="episode in season.episodes"> <template v-for="episode in season.episodes">
<b-list-group-item class="no-link episode-item" <b-list-group-item
:id="`s-${season.season_id}-ep-${episode.episode_id}`" class="no-link episode-item"
:key="`rl-${episode.episode_id}`" :id="`s-${season.season_id}-ep-${episode.episode_id}`"
:to="{ name: 'Episode', params: { season: season.season_id, :key="`rl-${episode.episode_id}`"
episode: episode.episode_id} }"> :to="{
name: 'Episode',
params: {
season: season.season_id,
episode: episode.episode_id,
},
}"
>
Episode {{ episode.episode_id }} - "{{ episode.title }}" Episode {{ episode.episode_id }} - "{{ episode.title }}"
</b-list-group-item> </b-list-group-item>
<b-popover show :key="`bpop-${episode.episode_id}`" variant="secondary" delay="25" <b-popover
:target="`s-${season.season_id}-ep-${episode.episode_id}`" show
triggers="hover" placement="right"> :key="`bpop-${episode.episode_id}`"
variant="secondary"
delay="25"
:target="`s-${season.season_id}-ep-${episode.episode_id}`"
triggers="hover"
placement="right"
>
<template v-slot:title>{{ episode.title }}</template> <template v-slot:title>{{ episode.title }}</template>
{{ episode.description }} {{ episode.description }}
</b-popover> </b-popover>
@@ -69,19 +93,23 @@
} }
// Dark theme popover, arrow-right fix // Dark theme popover, arrow-right fix
.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { .bs-popover-top > .arrow::after,
.bs-popover-auto[x-placement^="top"] > .arrow::after {
border-top-color: darken($grey-3, 2%); border-top-color: darken($grey-3, 2%);
} }
.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { .bs-popover-bottom > .arrow::after,
.bs-popover-auto[x-placement^="bottom"] > .arrow::after {
border-bottom-color: darken($grey-3, 2%); border-bottom-color: darken($grey-3, 2%);
} }
.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after { .bs-popover-left > .arrow::after,
.bs-popover-auto[x-placement^="left"] > .arrow::after {
border-left-color: darken($grey-3, 2%); border-left-color: darken($grey-3, 2%);
} }
.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after { .bs-popover-right > .arrow::after,
.bs-popover-auto[x-placement^="right"] > .arrow::after {
border-right-color: darken($grey-3, 2%); border-right-color: darken($grey-3, 2%);
} }
@@ -110,7 +138,7 @@
background-color: darken($grey-2, 1.5%); background-color: darken($grey-2, 1.5%);
color: $grey-9; color: $grey-9;
border-bottom: 1px solid $grey-0; border-bottom: 1px solid $grey-0;
font-family: 'Montserrat', sans-serif; font-family: "Montserrat", sans-serif;
} }
} }
@@ -121,7 +149,9 @@
border-left-width: 0; border-left-width: 0;
border-right-width: 0; border-right-width: 0;
&:hover, &:active, &:focus { &:hover,
&:active,
&:focus {
background-color: darken($grey-1, 0.75%); background-color: darken($grey-1, 0.75%);
} }
} }
@@ -138,30 +168,31 @@
</style> </style>
<script> <script>
import axios from 'axios'; import axios from "axios";
export default { export default {
name: 'SeasonList', name: "SeasonList",
data() { data() {
return { return {
seasons: [], seasons: [],
}; };
}, },
methods: { methods: {
getSeasons() { getSeasons() {
const path = `${process.env.VUE_APP_BASE_APP_URL}/api/episodes/`; const path = `${process.env.VUE_APP_API_URL}/api/episodes/`;
axios.get(path) axios
.then((res) => { .get(path)
this.seasons = res.data; .then((res) => {
}) this.seasons = res.data;
.catch((error) => { })
// eslint-disable-next-line no-console .catch((error) => {
console.error(error); // eslint-disable-next-line no-console
}); console.error(error);
});
},
},
created() {
this.getSeasons();
}, },
},
created() {
this.getSeasons();
},
}; };
</script> </script>

View File

@@ -17,20 +17,21 @@
} }
@-webkit-keyframes SkeletonLoading { @-webkit-keyframes SkeletonLoading {
0% { 0% {
background-position: -200px 0; background-position: -200px 0;
} }
100% { 100% {
background-position: calc(200px + 100%) 0; background-position: calc(200px + 100%) 0;
} }
} }
@keyframes SkeletonLoading { @keyframes SkeletonLoading {
0% { 0% {
background-position: -200px 0; background-position: -200px 0;
} }
100% { 100% {
background-position: calc(200px + 100%) 0; background-position: calc(200px + 100%) 0;
} }
} }
span { span {

View File

@@ -9,7 +9,6 @@ Vue.use(Router);
export default new Router({ export default new Router({
mode: "history", mode: "history",
base: process.env.VUE_APP_BASE_URL,
routes: [ routes: [
{ {
path: "/", path: "/",

4
dist/index.html vendored
View File

@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>TheOfficeQuotes</title><base href=/ ><link href=/static/css/app.be370d07.css rel=preload as=style><link href=/static/css/chunk-vendors.69e8e4a1.css rel=preload as=style><link href=/static/js/app.cc2221b5.js rel=preload as=script><link href=/static/js/chunk-vendors.02aa3282.js rel=preload as=script><link href=/static/css/chunk-vendors.69e8e4a1.css rel=stylesheet><link href=/static/css/app.be370d07.css rel=stylesheet></head><style>body { <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>TheOfficeQuotes</title><base href=/ ><link href=/static/css/app.be370d07.css rel=preload as=style><link href=/static/css/chunk-vendors.69e8e4a1.css rel=preload as=style><link href=/static/js/app.0d8a2770.js rel=preload as=script><link href=/static/js/chunk-vendors.02aa3282.js rel=preload as=script><link href=/static/css/chunk-vendors.69e8e4a1.css rel=stylesheet><link href=/static/css/app.be370d07.css rel=stylesheet></head><style>body {
background: #0a0a0a; background: #0a0a0a;
} }
@@ -132,4 +132,4 @@
aa('init', { aa('init', {
appId: W6VCX4QD3K, appId: W6VCX4QD3K,
apiKey: b71249cd1a242dc10b8dee9d285d7d0b apiKey: b71249cd1a242dc10b8dee9d285d7d0b
});</script><body><noscript><strong>We're sorry but TheOfficeQuotes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app><div id=loading-wrapper><div class=cssload-loader><div class="cssload-inner cssload-one"></div><div class="cssload-inner cssload-two"></div><div class="cssload-inner cssload-three"></div></div></div></div><script src=/static/js/chunk-vendors.02aa3282.js></script><script src=/static/js/app.cc2221b5.js></script></body></html> });</script><body><noscript><strong>We're sorry but TheOfficeQuotes doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app><div id=loading-wrapper><div class=cssload-loader><div class="cssload-inner cssload-one"></div><div class="cssload-inner cssload-two"></div><div class="cssload-inner cssload-three"></div></div></div></div><script src=/static/js/chunk-vendors.02aa3282.js></script><script src=/static/js/app.0d8a2770.js></script></body></html>

2
dist/static/js/app.0d8a2770.js vendored Normal file
View File

File diff suppressed because one or more lines are too long

1
dist/static/js/app.0d8a2770.js.map vendored Normal file
View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long