aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-10-23 14:32:49 -0700
committerGitHub <noreply@github.com>2020-10-23 14:32:49 -0700
commit00b069fc6f8e2af18bc3ac9af8904fa924ce757c (patch)
tree9b29faa5dd9e5c50455ce939fbfdf587a3456461
parentab8136bab7dcf0982f49b9db2ca956bc01860851 (diff)
parent0e045b4c55042c1b2e97c3c7b005f83f96106841 (diff)
downloadhomer-00b069fc6f8e2af18bc3ac9af8904fa924ce757c.tar.gz
homer-00b069fc6f8e2af18bc3ac9af8904fa924ce757c.tar.zst
homer-00b069fc6f8e2af18bc3ac9af8904fa924ce757c.zip
Merge pull request #136 from gabe565/message-icon
Add support for a message icon
-rw-r--r--docs/configuration.md1
-rw-r--r--public/assets/config.yml.dist3
-rw-r--r--src/components/Message.vue7
3 files changed, 8 insertions, 3 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index af642c8..4bd4677 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -68,6 +68,7 @@ message:
68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below. 68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
69 style: "is-warning" 69 style: "is-warning"
70 title: "Optional message!" 70 title: "Optional message!"
71 icon: "fa fa-exclamation-triangle"
71 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." 72 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
72 73
73# Optional navbar 74# Optional navbar
diff --git a/public/assets/config.yml.dist b/public/assets/config.yml.dist
index 92133d9..85478ec 100644
--- a/public/assets/config.yml.dist
+++ b/public/assets/config.yml.dist
@@ -42,7 +42,8 @@ colors:
42message: 42message:
43 #url: https://b4bz.io 43 #url: https://b4bz.io
44 style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options. 44 style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options.
45 title: "👋 Demo !" 45 title: "Demo !"
46 icon: "fa fa-grin"
46 content: "This is a dummy homepage demo. <br /> Find more information on <a href='https://github.com/bastienwirtz/homer'>github.com/bastienwirtz/homer</a>" 47 content: "This is a dummy homepage demo. <br /> Find more information on <a href='https://github.com/bastienwirtz/homer'>github.com/bastienwirtz/homer</a>"
47 48
48# Optional navbar 49# Optional navbar
diff --git a/src/components/Message.vue b/src/components/Message.vue
index d007d3e..5a1e0ea 100644
--- a/src/components/Message.vue
+++ b/src/components/Message.vue
@@ -1,7 +1,10 @@
1<template> 1<template>
2 <article v-if="show" class="message" :class="message.style"> 2 <article v-if="show" class="message" :class="message.style">
3 <div v-if="message.title" class="message-header"> 3 <div v-if="message.title || message.icon" class="message-header">
4 <p>{{ message.title }}</p> 4 <p>
5 <i v-if="message.icon" :class="`fa-fw ${message.icon}`"></i>
6 {{ message.title }}
7 </p>
5 </div> 8 </div>
6 <div 9 <div
7 v-if="message.content" 10 v-if="message.content"