aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/configuration.md9
-rw-r--r--docs/development.md (renamed from docs/developement.md)0
-rw-r--r--package.json2
-rw-r--r--public/assets/config.yml.dist9
-rw-r--r--public/assets/config.yml.dist.sample-sui2
-rw-r--r--public/assets/custom.css.sample8
-rw-r--r--src/App.vue4
-rw-r--r--src/assets/app.scss7
-rw-r--r--src/components/DynamicTheme.vue14
-rw-r--r--src/components/Message.vue7
-rw-r--r--src/components/Service.vue8
-rw-r--r--yarn.lock8
12 files changed, 49 insertions, 29 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index edcf1ed..4bd4677 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -13,7 +13,8 @@ Title, icons, links, colors, and services can be configured in the `config.yml`
13 13
14title: "App dashboard" 14title: "App dashboard"
15subtitle: "Homer" 15subtitle: "Homer"
16logo: "assets/homer.png" 16# documentTitle: "Welcome" # Customize the browser tab text
17logo: "assets/logo.png"
17# Alternatively a fa icon can be provided: 18# Alternatively a fa icon can be provided:
18# icon: "fas fa-skull-crossbones" 19# icon: "fas fa-skull-crossbones"
19 20
@@ -67,6 +68,7 @@ message:
67 # 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.
68 style: "is-warning" 69 style: "is-warning"
69 title: "Optional message!" 70 title: "Optional message!"
71 icon: "fa fa-exclamation-triangle"
70 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." 72 content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
71 73
72# Optional navbar 74# Optional navbar
@@ -85,7 +87,7 @@ links:
85# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed). 87# Leave only a "items" key if not using group (group name, icon & tagstyle are optional, section separation will not be displayed).
86services: 88services:
87 - name: "Application" 89 - name: "Application"
88 icon: "fa fa-code-fork" 90 icon: "fas fa-code-branch"
89 items: 91 items:
90 - name: "Awesome app" 92 - name: "Awesome app"
91 logo: "assets/tools/sample.png" 93 logo: "assets/tools/sample.png"
@@ -110,7 +112,8 @@ services:
110 subtitle: "Another example" 112 subtitle: "Another example"
111 tag: "other" 113 tag: "other"
112 url: "https://www.reddit.com/r/selfhosted/" 114 url: "https://www.reddit.com/r/selfhosted/"
113 target: "_blank" # optionnal html a tag target attribute 115 target: "_blank" # optional html a tag target attribute
116 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
114``` 117```
115 118
116If you choose to fetch message information from an endpoint, the output format should be: 119If you choose to fetch message information from an endpoint, the output format should be:
diff --git a/docs/developement.md b/docs/development.md
index 6ea1cba..6ea1cba 100644
--- a/docs/developement.md
+++ b/docs/development.md
diff --git a/package.json b/package.json
index ac96f68..87fdf5b 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
8 "lint": "vue-cli-service lint" 8 "lint": "vue-cli-service lint"
9 }, 9 },
10 "dependencies": { 10 "dependencies": {
11 "@fortawesome/fontawesome-free": "^5.13.1", 11 "@fortawesome/fontawesome-free": "^5.15.1",
12 "bulma": "^0.9.0", 12 "bulma": "^0.9.0",
13 "core-js": "^3.6.4", 13 "core-js": "^3.6.4",
14 "js-yaml": "^3.14.0", 14 "js-yaml": "^3.14.0",
diff --git a/public/assets/config.yml.dist b/public/assets/config.yml.dist
index 6be66e1..85478ec 100644
--- a/public/assets/config.yml.dist
+++ b/public/assets/config.yml.dist
@@ -10,7 +10,7 @@ logo: "logo.png"
10header: true 10header: true
11footer: '<p>Created with <span class="has-text-danger">❤️</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it. 11footer: '<p>Created with <span class="has-text-danger">❤️</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it.
12 12
13# Optionnal theme customization 13# Optional theme customization
14theme: default 14theme: default
15colors: 15colors:
16 light: 16 light:
@@ -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
@@ -51,7 +52,7 @@ links:
51 - name: "Contribute" 52 - name: "Contribute"
52 icon: "fab fa-github" 53 icon: "fab fa-github"
53 url: "https://github.com/bastienwirtz/homer" 54 url: "https://github.com/bastienwirtz/homer"
54 target: "_blank" # optionnal html a tag target attribute 55 target: "_blank" # optional html a tag target attribute
55 - name: "Wiki" 56 - name: "Wiki"
56 icon: "fas fa-book" 57 icon: "fas fa-book"
57 url: "https://www.wikipedia.org/" 58 url: "https://www.wikipedia.org/"
@@ -68,7 +69,7 @@ services:
68 subtitle: "Bookmark example" 69 subtitle: "Bookmark example"
69 tag: "app" 70 tag: "app"
70 url: "https://www.reddit.com/r/selfhosted/" 71 url: "https://www.reddit.com/r/selfhosted/"
71 target: "_blank" # optionnal html a tag target attribute 72 target: "_blank" # optional html a tag target attribute
72 - name: "Another one" 73 - name: "Another one"
73 logo: "assets/tools/sample2.png" 74 logo: "assets/tools/sample2.png"
74 subtitle: "Another application" 75 subtitle: "Another application"
diff --git a/public/assets/config.yml.dist.sample-sui b/public/assets/config.yml.dist.sample-sui
index 71eaef0..ff7f80a 100644
--- a/public/assets/config.yml.dist.sample-sui
+++ b/public/assets/config.yml.dist.sample-sui
@@ -9,7 +9,7 @@ logo: false
9 9
10header: true 10header: true
11 11
12# Optionnal theme customization 12# Optional theme customization
13theme: sui 13theme: sui
14colors: 14colors:
15 light: 15 light:
diff --git a/public/assets/custom.css.sample b/public/assets/custom.css.sample
new file mode 100644
index 0000000..00658d7
--- /dev/null
+++ b/public/assets/custom.css.sample
@@ -0,0 +1,8 @@
1@charset "UTF-8";
2
3/* Custom card colors */
4/* Use with `class:` property of services in config.yml */
5body #app .card.green {
6 background-color: #006600;
7 color: #00ff00;
8}
diff --git a/src/App.vue b/src/App.vue
index eb132d0..c47b5a9 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -159,7 +159,9 @@ export default {
159 } 159 }
160 this.config = merge(defaults, config); 160 this.config = merge(defaults, config);
161 this.services = this.config.services; 161 this.services = this.config.services;
162 document.title = `${this.config.title} | ${this.config.subtitle}`; 162 document.title =
163 this.config.documentTitle ||
164 `${this.config.title} | ${this.config.subtitle}`;
163 if (this.config.stylesheet) { 165 if (this.config.stylesheet) {
164 let stylesheet = ""; 166 let stylesheet = "";
165 for (const file of this.config.stylesheet) { 167 for (const file of this.config.stylesheet) {
diff --git a/src/assets/app.scss b/src/assets/app.scss
index 4585874..59afd00 100644
--- a/src/assets/app.scss
+++ b/src/assets/app.scss
@@ -13,17 +13,17 @@
13 text-overflow: ellipsis; 13 text-overflow: ellipsis;
14} 14}
15 15
16html { 16html, body, body #app {
17 height: 100%; 17 height: 100%;
18 background-color: var(--background);
18} 19}
19 20
20body { 21body {
21 font-family: "Raleway", sans-serif; 22 font-family: "Raleway", sans-serif;
22 height: 100%;
23 23
24 #app { 24 #app {
25 height: auto;
25 min-height: 100%; 26 min-height: 100%;
26 background-color: var(--background);
27 background-image: var(--background-image); 27 background-image: var(--background-image);
28 background-size: cover; 28 background-size: cover;
29 background-position: center; 29 background-position: center;
@@ -170,6 +170,7 @@ body {
170 170
171 .title { 171 .title {
172 font-size: 1.1em; 172 font-size: 1.1em;
173 line-height: 1.2em;
173 @include ellipsis(); 174 @include ellipsis();
174 } 175 }
175 176
diff --git a/src/components/DynamicTheme.vue b/src/components/DynamicTheme.vue
index 2ccb47b..fc2fd55 100644
--- a/src/components/DynamicTheme.vue
+++ b/src/components/DynamicTheme.vue
@@ -1,17 +1,15 @@
1<template> 1<template>
2 <DynamicStyle> 2 <DynamicStyle>
3 /* light / dark theme switch based on system pref if available */ body #app 3 :root, body #app.is-light {
4 {
5 {{ getVars(themes.light) }} 4 {{ getVars(themes.light) }}
6 } @media (prefers-color-scheme: light), (prefers-color-scheme: 5 } @media (prefers-color-scheme: light), (prefers-color-scheme:
7 no-preference) { body #app { 6 no-preference) { :root, body #app {
8 {{ getVars(themes.light) }} 7 {{ getVars(themes.light) }}
9 } } @media (prefers-color-scheme: dark) { body #app { } } /* light / dark 8 } } body #app.is-dark {
10 theme override base on user choice. */ body #app.is-dark {
11 {{ getVars(themes.dark) }} 9 {{ getVars(themes.dark) }}
12 } body #app.is-light { 10 } @media (prefers-color-scheme: dark) { :root, body #app {
13 {{ getVars(themes.light) }} 11 {{ getVars(themes.dark) }}
14 } 12 } }
15 </DynamicStyle> 13 </DynamicStyle>
16</template> 14</template>
17 15
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"
diff --git a/src/components/Service.vue b/src/components/Service.vue
index 88e6e69..81ad8a2 100644
--- a/src/components/Service.vue
+++ b/src/components/Service.vue
@@ -1,6 +1,6 @@
1<template> 1<template>
2 <div> 2 <div>
3 <div class="card"> 3 <div class="card" :class="item.class">
4 <a :href="item.url" :target="item.target" rel="noreferrer"> 4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content"> 5 <div class="card-content">
6 <div class="media"> 6 <div class="media">
@@ -37,4 +37,8 @@ export default {
37}; 37};
38</script> 38</script>
39 39
40<style scoped lang="scss"></style> 40<style scoped lang="scss">
41.media-left img {
42 max-height: 100%;
43}
44</style>
diff --git a/yarn.lock b/yarn.lock
index 57c90de..463904c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -822,10 +822,10 @@
822 lodash "^4.17.13" 822 lodash "^4.17.13"
823 to-fast-properties "^2.0.0" 823 to-fast-properties "^2.0.0"
824 824
825"@fortawesome/fontawesome-free@^5.13.1": 825"@fortawesome/fontawesome-free@^5.15.1":
826 version "5.13.1" 826 version "5.15.1"
827 resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.13.1.tgz#c53b4066edae16cd1fd669f687baf031b45fb9d6" 827 resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz#ccfef6ddbe59f8fe8f694783e1d3eb88902dc5eb"
828 integrity sha512-D819f34FLHeBN/4xvw0HR0u7U2G7RqjPSggXqf7LktsxWQ48VAfGwvMrhcVuaZV2fF069c/619RdgCCms0DHhw== 828 integrity sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ==
829 829
830"@hapi/address@2.x.x": 830"@hapi/address@2.x.x":
831 version "2.1.4" 831 version "2.1.4"