Merge pull request #196 from GaaH/use-logo-in-groups

Use logo in groups
This commit is contained in:
Bastien Wirtz 2021-03-08 22:25:35 -08:00 committed by GitHub
commit 66eace9e95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -104,6 +104,8 @@ links:
services: services:
- name: "Application" - name: "Application"
icon: "fas fa-code-branch" 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"
items: items:
- name: "Awesome app" - name: "Awesome app"
logo: "assets/tools/sample.png" logo: "assets/tools/sample.png"

View File

@ -64,6 +64,11 @@
<template v-for="group in services"> <template v-for="group in services">
<h2 v-if="group.name" class="column is-full group-title"> <h2 v-if="group.name" class="column is-full group-title">
<i v-if="group.icon" :class="['fa-fw', group.icon]"></i> <i v-if="group.icon" :class="['fa-fw', group.icon]"></i>
<div v-else-if="group.logo" class="group-logo media-left">
<figure class="image is-48x48">
<img :src="group.logo" :alt="`${group.name} logo`" />
</figure>
</div>
{{ group.name }} {{ group.name }}
</h2> </h2>
<Service <Service
@ -87,6 +92,11 @@
> >
<h2 v-if="group.name" class="group-title"> <h2 v-if="group.name" class="group-title">
<i v-if="group.icon" :class="['fa-fw', group.icon]"></i> <i v-if="group.icon" :class="['fa-fw', group.icon]"></i>
<div v-else-if="group.logo" class="group-logo media-left">
<figure class="image is-48x48">
<img :src="group.logo" :alt="`${group.name} logo`" />
</figure>
</div>
{{ group.name }} {{ group.name }}
</h2> </h2>
<Service <Service

View File

@ -345,3 +345,7 @@ body {
} }
} }
} }
.group-logo {
float: left;
}