create reusable component

This commit is contained in:
Harshil 2021-03-31 17:47:35 +02:00
parent 27392ff5d2
commit 4a4c7efefe
2 changed files with 25 additions and 10 deletions

View File

@ -0,0 +1,16 @@
<template>
<div style="display:flex; flex-wrap:wrap; justify-content:center;">
<div v-for="i in items" :key="i">
<a :href="`/nodes/${i.name}`" style="border-radius: 4px; text-decoration:none;">
<div style="border-radius: 4px; padding: .8em .6em; margin: .6em; text-align: center; width: 170px;">
<div style="width: 60px; height: 60px; line-height: 60px; margin:auto;">
<div style="width: 100%; height: 100%;">
<img :src="i.iconData.fileBuffer" style="width: 100%; height: 100%;">
</div>
</div>
<p>{{i.displayName}}</p>
</div>
</a>
</div>
</div>
</template>

View File

@ -2,11 +2,9 @@
This section contains information about all the trigger nodes in n8n. Each node documentation contains information on the available resources and operations along with an example workflow.
<div v-for="i in items">
<a :href="`/nodes/${i.name}`">
<p>{{i.displayName}}</p>
</a>
</div>
<NodeCard items="items" />
<script>
export default {
@ -24,11 +22,12 @@ export default {
body: JSON.stringify({
query: `
query GetRegularNodes{
nodes(where: {categories:{name_ne: "Core Nodes"}, displayName_contains:"Trigger"}, sort:"displayName"){
name
displayName
}
}
nodes(where: {displayName_contains:"Trigger", categories:{name_ncontains: "Core Nodes"}}, sort:"displayName"){
name
displayName
iconData
}
}
`
})
})