Add support for a message icon

This commit is contained in:
Gabe Cook 2020-10-15 13:16:45 -05:00
parent e608701404
commit 0e045b4c55
No known key found for this signature in database
GPG Key ID: 3197318BDE319B8D
3 changed files with 8 additions and 3 deletions

View File

@ -68,6 +68,7 @@ message:
# url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
style: "is-warning"
title: "Optional message!"
icon: "fa fa-exclamation-triangle"
content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
# Optional navbar

View File

@ -42,7 +42,8 @@ colors:
message:
#url: https://b4bz.io
style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options.
title: "👋 Demo !"
title: "Demo !"
icon: "fa fa-grin"
content: "This is a dummy homepage demo. <br /> Find more information on <a href='https://github.com/bastienwirtz/homer'>github.com/bastienwirtz/homer</a>"
# Optional navbar

View File

@ -1,7 +1,10 @@
<template>
<article v-if="show" class="message" :class="message.style">
<div v-if="message.title" class="message-header">
<p>{{ message.title }}</p>
<div v-if="message.title || message.icon" class="message-header">
<p>
<i v-if="message.icon" :class="`fa-fw ${message.icon}`"></i>
{{ message.title }}
</p>
</div>
<div
v-if="message.content"