Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom span size in service group #563

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ services:
icon: "fas fa-code-branch"
# A path to an image can also be provided. Note that icon take precedence if both icon and logo are set.
# logo: "path/to/logo"
# Use custom span size instead of 12/columns
# span: 6
items:
- name: "Awesome app"
logo: "assets/tools/sample.png"
Expand Down
7 changes: 5 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
:key="`service-${groupIndex}-${index}`"
:item="item"
:proxy="config.proxy"
:class="['column', `is-${12 / config.columns}`]"
:class="['column', `is-${getSpan(group)}`]"
/>
</template>
</div>
Expand All @@ -103,7 +103,7 @@
class="columns is-multiline layout-vertical"
>
<div
:class="['column', `is-${12 / config.columns}`]"
:class="['column', `is-${getSpan(group)}`]"
v-for="(group, groupIndex) in services"
:key="groupIndex"
>
Expand Down Expand Up @@ -312,6 +312,9 @@ export default {
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
},
getSpan: function (item) {
return item.span || 12 / this.config.columns;
},
},
};
</script>