Apply tags

This commit is contained in:
samaradel
2021-04-12 13:39:36 +02:00
parent 3b4461964e
commit 69b64310f0
10 changed files with 175 additions and 109 deletions

View File

@@ -18,7 +18,7 @@
class="flex flex-wrap post-tags container mx-auto relative py-1"
>
<g-link
v-for="membership in memberships"
v-for="membership in record.memberships"
:key="membership.id"
:to="membership.path"
class="text-xs bg-transparent hover:text-blue-700 py-1 px-2 mr-1 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full mb-2"
@@ -74,8 +74,8 @@
v-for="tag in record.tags"
:key="tag.id"
:to="tag.path"
class="text-xs bg-transparent hover:text-blue-700 py-2 px-4 mr-2 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full"
>{{ tag.title }}</g-link
class="inline-block text-xs bg-transparent hover:text-blue-700 py-2 px-4 mr-2 border hover:border-blue-500 border-gray-600 text-gray-700 rounded-full"
>{{ tag.title.replace("_", " ") }}</g-link
>
</section>
</div>
@@ -101,20 +101,6 @@ export default {
if (this.pathPrefix) return this.pathPrefix + "/" + this.record.id;
return this.record.path;
},
memberships() {
var res = [];
var memberships = this.record.memberships;
if (!memberships) {
return [];
}
memberships.forEach(function (membership) {
if(["foundation", "tech", "cofounders"].includes(membership.title)){
res.push(membership);
}
});
return res;
},
},
methods: {
displaytags() {

View File

@@ -49,7 +49,7 @@
@click="setActive(0)"
class="flex flex-row items-center w-full md:w-auto md:inline md:mt-0 md:ml-4 animated-link"
>
<span class="capitalize">{{ topic }}</span>
<span class="capitalize">{{ topic.replace("_", " ") }}</span>
<svg
fill="currentColor"
viewBox="0 0 20 20"
@@ -84,12 +84,12 @@
<a
v-for="topic in topics"
:key="topic"
class="cursor-pointer block px-4 py-2 mt-2 text-sm font-semibold bg-transparent rounded-lg dark:bg-transparent dark:hover:bg-gray-600 dark-:focus:bg-gray-600 dark:focus:text-white dark:hover:text-white dark:text-gray-200 md:mt-0 hover:text-gray-900 focus:text-gray-900 hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
@click.self="
setTopic(topic);
open = false;
"
>{{ topic }}</a
class="cursor-pointer block px-4 py-2 mt-2 text-sm font-semibold bg-transparent rounded-lg dark:bg-transparent dark:hover:bg-gray-600 dark-:focus:bg-gray-600 dark:focus:text-white dark:hover:text-white dark:text-gray-200 md:mt-0 hover:text-gray-900 focus:text-gray-900 hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:shadow-outline"
>{{ topic.replace("_", " ") }}</a
>
</div>
</div>