Skip to content

Commit

Permalink
Simplify service structure
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienwirtz committed Sep 4, 2020
1 parent bcf0e1b commit ffe3404
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Title, icons, links, colors, and services can be configured in the `config.yml`

title: "App dashboard"
subtitle: "Homer"
logo: "assets/homer.png"
logo: "assets/logo.png"
# Alternatively a fa icon can be provided:
# icon: "fas fa-skull-crossbones"

Expand Down
3 changes: 1 addition & 2 deletions public/assets/custom.css.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

/* Custom card colors */
/* Use with `class:` property of services in config.yml */
body #app .card .green
{
body #app .card.green {
background-color: #006600;
color: #00ff00;
}
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default {
this.services = this.config.services;
document.title = `${this.config.title} | ${this.config.subtitle}`;
if (this.config.stylesheet) {
let stylesheet = '';
let stylesheet = "";
for (const file of this.config.stylesheet) {
stylesheet += `@import "${file}";`;
}
Expand Down Expand Up @@ -242,8 +242,8 @@ export default {
},
};
},
createStylesheet: function(css) {
let style = document.createElement('style');
createStylesheet: function (css) {
let style = document.createElement("style");
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
},
Expand Down
17 changes: 4 additions & 13 deletions src/components/Service.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<template>
<div>
<div class="card">
<div class="card" :class="item.class">
<a :href="item.url" :target="item.target" rel="noreferrer">
<div
class="card-content"
:class="item.class"
>
<div class="card-content">
<div class="media">
<div v-if="item.logo" class="media-left">
<figure class="image is-48x48">
Expand All @@ -18,14 +15,8 @@
</figure>
</div>
<div class="media-content">
<p
class="title is-4"
:class="item.class"
>{{ item.name }}</p>
<p
class="subtitle is-6"
:class="item.class"
>{{ item.subtitle }}</p>
<p class="title is-4">{{ item.name }}</p>
<p class="subtitle is-6">{{ item.subtitle }}</p>
</div>
</div>
<div class="tag" :class="item.tagstyle" v-if="item.tag">
Expand Down

0 comments on commit ffe3404

Please sign in to comment.