]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Add the option to style tags
authorpdevq <45507854+pdevq@users.noreply.github.com>
Wed, 23 Oct 2019 21:29:55 +0000 (17:29 -0400)
committerpdevq <45507854+pdevq@users.noreply.github.com>
Wed, 23 Oct 2019 21:29:55 +0000 (17:29 -0400)
README.md
app.css
app.css.map
app.js
app.scss
config.yml

index d2a650069277f740b2b09caa403f9a924dada301..9b9e7058d245af19cf34d77a2ca7c0a6eb8288de 100644 (file)
--- a/README.md
+++ b/README.md
@@ -58,6 +58,7 @@ services:
         logo: "/assets/tools/rabbitmq.png"
         subtitle: "Manage & monitor RabbitMQ server"
         tag: "haproxy"
+        tagstyle: "is-success"
         url: "#"
   - name: "Monitoring"
     icon: "fa-heartbeat"
diff --git a/app.css b/app.css
index 8a9774249f35426439b2886eb9136288fdc6d1e2..61b10c9e7aa9925d77724e204fda1d1e1e8b1675 100644 (file)
--- a/app.css
+++ b/app.css
@@ -165,6 +165,8 @@ body {
     overflow: hidden;
     transition: all 0.2s ease-out;
     padding: 0; }
+    body .tag .tag-text {
+      display: none; }
   body .card {
     border-radius: 5px;
     border: none;
@@ -178,6 +180,8 @@ body {
       width: auto;
       color: #ffffff;
       padding: 0 0.75em; }
+      body .card:hover .tag .tag-text {
+        display: block; }
   body .card-content {
     height: 85px;
     padding: 1.3rem; }
index 9e5dc0cc6361d8cfc35c1761bd93a3f345f8e654..a1b577fa36d5252db67305d27617ca98e569e0bf 100644 (file)
@@ -1,7 +1,7 @@
 {
 "version": 3,
-"mappings": "AAGA,IAAK;EACH,WAAW,EAAE,qBAAqB;EAClC,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,IAAI;EAEZ,oDAAuB;IACrB,WAAW,EAAE,kBAAkB;EAGjC,OAAG;IACD,SAAS,EAAE,IAAI;EAGjB,OAAG;IACD,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;IAEnB,WAAI;MACF,YAAY,EAA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Aa;IACX,OAAO,EAAE,YAAY;EAGvB,qBAAiB;IACb,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,MAAM;IAEd,uBAAE;MACA,SAAS,EAAE,IAAI;IAGjB,mCAAc;MACZ,SAAS,EAAE,MAAM;MACjB,WAAW,EAAE,IAAI;MACjB,cAAc,EAAE,MAAM;MACtB,MAAM,EAAE,OAAO;MACf,KAAK,EAAE,OAAO",
 "sources": ["app.scss"],
 "names": [],
 "file": "app.css"
-}
\ No newline at end of file
+}
diff --git a/app.js b/app.js
index 41bdd9d40d911965b4b382ccb43abd493bffc962..def0be7957c525689365c9ea17ba203cb5212b39 100644 (file)
--- a/app.js
+++ b/app.js
@@ -85,7 +85,9 @@ Vue.component('service', {
                         <p class="subtitle is-6">{{ item.subtitle }}</p>
                     </div>
                 </div>
-                <strong class="tag" v-if="item.tag">#{{ item.tag }}</strong>
+                <div class="tag" :class="item.tagstyle" v-if="item.tag">
+                    <strong class="tag-text">#{{ item.tag }}</strong>
+                </div>
             </div>
         </a>
     </div></div>`
index d4d2099529f6487739c0ff7cde14fe6b5c14661a..95a3166c102c8c6a4cdcbf47c7a1ec36d06b124b 100644 (file)
--- a/app.scss
+++ b/app.scss
@@ -212,6 +212,10 @@ body {
     overflow: hidden;
     transition: all 0.2s ease-out;
     padding: 0;
+    
+    .tag-text {
+      display: none;
+    }
   }
 
   .card {
@@ -232,6 +236,10 @@ body {
       width: auto;
       color: #ffffff;
       padding: 0 0.75em;
+      
+      .tag-text {
+        display: block;
+      }
     }
   }
 
index 69c87ea702cee1a69cabc84c09118a1c7ecdf9a4..6570a5afb7516ca24780cf420d411f48771c291f 100644 (file)
@@ -39,6 +39,7 @@ services:
         logo: "/assets/tools/rabbitmq.png"
         subtitle: "Manage & monitor RabbitMQ server"
         tag: "haproxy"
+        tagstyle: "is-success"
         url: "#"
   - name: "Monitoring"
     icon: "fas fa-heartbeat"