update webstack

This commit is contained in:
2021-02-08 17:06:59 +02:00
parent b78623ec1c
commit 098fa4e260
313 changed files with 6370 additions and 915 deletions

View File

@@ -7,7 +7,7 @@
<img
v-if="loading"
class="m-auto"
src="../assets/imgs/loader.gif"
src="/img/loader.gif"
alt=""
/>
<div
@@ -30,7 +30,7 @@
<page-query>
query ($private: Int){
projects: allProject (filter: { private: { ne: $private }}){
projects: allProject (filter: { private: { ne: $private }, tags: { id: {in: ["farming"]}}}){
edges {
node {
id
@@ -52,7 +52,7 @@ query ($private: Int){
image(width:800)
path
timeToRead
author {
authors {
id
image(width:64, height:64, fit:inside)
@@ -62,7 +62,7 @@ query ($private: Int){
}
}
people: allPerson(filter: { private: { ne: $private }}) {
people: allPerson(filter: { private: { ne: $private }, memberships: { id: {in: ["foundation", "tech"]}}}) {
edges {
node {
id
@@ -96,7 +96,7 @@ query ($private: Int){
path
humanTime : created(format:"DD MMM YYYY")
datetime : created
author {
authors {
id
name
image(width:64, height:64, fit:inside)
@@ -106,12 +106,24 @@ query ($private: Int){
}
}
markdowns: allMarkdownPage{
edges{
node{
__typename
header_title
header_excerpt
path
title
excerpt
}
}
}
}
</page-query>
<script>
import SearchListItem from "~/components/SearchListItem.vue";
import SearchListItem from "~/components/custom/Cards/SearchListItem.vue";
export default {
metaInfo: {
@@ -125,8 +137,8 @@ export default {
computed: {
searchResults() {
const searchTerm = this.q;
if (searchTerm.length < 3) return [];
var searchRes = this.$search.search({ query: searchTerm, limit: 5 });
if (!searchTerm || searchTerm.length < 3) return [];
var searchRes = this.$search.search({ query: searchTerm, limit: 100 });
var result = [];
for (var i = 0; i < searchRes.length; i++) {
var item = searchRes[i];
@@ -157,6 +169,12 @@ export default {
var item = this.$page.blogs.edges[i];
this.objects[item.node.path] = item.node;
}
for (var i = 0; i < this.$page.markdowns.edges.length; i++) {
var item = this.$page.markdowns.edges[i];
this.objects[item.node.path] = item.node;
}
this.loading = false;
},
components: {