Merge pull request #136 from gabe565/message-icon

Add support for a message icon
This commit is contained in:
Bastien Wirtz 2020-10-23 14:32:49 -07:00 committed by GitHub
commit 00b069fc6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"