This commit is contained in:
samaradel
2020-11-26 17:25:53 +02:00
parent 5f22238722
commit 13294b2c08
3 changed files with 46 additions and 23 deletions

View File

@@ -24,7 +24,7 @@
> >
<a <a
:href="`#${tag.node.title}`" :href="`#${tag.node.title}`"
@click="setSelected(tag.node.title, index)" @click.stop="setSelected(tag.node.title, index)"
class="pb-2 hover:text-indigo-600 capitalize" class="pb-2 hover:text-indigo-600 capitalize"
:class="{ 'border-b-4 border-indigo-600': activeIndex == index + 1 }" :class="{ 'border-b-4 border-indigo-600': activeIndex == index + 1 }"
> >
@@ -62,7 +62,7 @@ export default {
for (var i = 0; i < this.tags.length; i++) { for (var i = 0; i < this.tags.length; i++) {
if (this.tags[i].node.title == selected) { if (this.tags[i].node.title == selected) {
activeIndex = i; activeIndex = i + 1;
} }
} }
return { return {
@@ -78,11 +78,6 @@ export default {
tags: {}, tags: {},
tagsField: String, tagsField: String,
}, },
computed: {
url: function () {
return window.location.href + "#" + this.selected;
},
},
methods: { methods: {
setSelected: function (tag, index) { setSelected: function (tag, index) {
this.selected = tag; this.selected = tag;

View File

@@ -1,8 +1,17 @@
<template> <template>
<Layout> <Layout>
<div class="container sm:pxi-0 mx-auto overflow-x-hidden"> <div
class="container sm:pxi-0 mx-auto overflow-x-hidden"
:style="{ 'min-height': contentHeight + 'px' }"
>
<div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4"> <div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4">
<Team title="THREEFOLD TEAM" description="The heartbeat behind the ThreeFold Movement." :objects="$page.entries.edges" :tags="$page.memberships.edges" tagsField="memberships" /> <Team
title="THREEFOLD TEAM"
description="The heartbeat behind the ThreeFold Movement."
:objects="$page.entries.edges"
:tags="$page.memberships.edges"
tagsField="memberships"
/>
</div> </div>
</div> </div>
</Layout> </Layout>
@@ -50,20 +59,25 @@ query ($private: Int){
<script> <script>
import Pagination from "~/components/Pagination.vue"; import Pagination from "~/components/Pagination.vue";
import Team from '~/components/Team.vue'; import Team from "~/components/Team.vue";
export default { export default {
metaInfo: { metaInfo: {
title: "People" title: "People",
}, },
components: { components: {
Team, Team,
Pagination Pagination,
}, },
computed: { computed: {
baseurl: function () { baseurl: function () {
return "/people/" return "/people/";
},
contentHeight() {
if (process.isClient) {
return window.innerHeight - 100;
} }
}, },
},
}; };
</script> </script>

View File

@@ -1,8 +1,17 @@
<template> <template>
<Layout> <Layout>
<div class="container sm:pxi-0 mx-auto overflow-x-hidden"> <div
class="container sm:pxi-0 mx-auto overflow-x-hidden"
:style="{ 'min-height': contentHeight + 'px' }"
>
<div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4"> <div class="flex flex-wrap with-large pt-8 pb-8 mx-4 sm:-mx-4">
<Team title="THREEFOLD PROJECTS" description="The heartbeat behind the ThreeFold Movement." :objects="$page.entries.edges" :tags="$page.memberships.edges" tagsField="tags" /> <Team
title="THREEFOLD PROJECTS"
description="The heartbeat behind the ThreeFold Movement."
:objects="$page.entries.edges"
:tags="$page.memberships.edges"
tagsField="tags"
/>
</div> </div>
</div> </div>
</Layout> </Layout>
@@ -57,21 +66,26 @@ query ($private: Int){
</page-query> </page-query>
<script> <script>
import Team from '~/components/Team.vue'; import Team from "~/components/Team.vue";
import Pagination from "~/components/Pagination.vue"; import Pagination from "~/components/Pagination.vue";
export default { export default {
metaInfo: { metaInfo: {
title: "Projects" title: "Projects",
}, },
components: { components: {
Team, Team,
Pagination Pagination,
}, },
computed: { computed: {
baseurl: function () { baseurl: function () {
return "/projects/" return "/projects/";
},
contentHeight() {
if (process.isClient) {
return window.innerHeight - 100;
} }
}, },
},
}; };
</script> </script>