]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
web: add a badge to show current version in the header
authorVincent Bernat <bernat@luffy.cx>
Sun, 13 Jan 2013 01:03:29 +0000 (02:03 +0100)
committerVincent Bernat <bernat@luffy.cx>
Sun, 13 Jan 2013 01:03:29 +0000 (02:03 +0100)
content/media/css/lldpd.1.blank.less
layout/badges.j2 [new file with mode: 0644]
layout/base.j2

index cc15bbfc84b0ddf7c0dd0d781cc7280ad85f69ea..7060b10959cafcc7da47f5118da88fcf82371a88 100644 (file)
@@ -23,12 +23,37 @@ a {
     }
 }
 
+/* Badges */
 .github-forkme {
     position: absolute;
     top: 0;
     right: 0;
     border: 0;
 }
+.latest-version {
+    position: absolute;
+    top: 10px;
+    left: 10px;
+    div {
+        background-color: @theme-color;
+        border: 0.2em solid lighten(@theme-color, 60%);
+        border-radius: 1.75em;
+       box-shadow: 3px 3px 10px #333;
+        color: white;
+        font: bold 150% @font-regular;
+        padding: 0.4em 0.1em;
+        text-align: center;
+        line-height: 2.2em;
+        width: 3.1em;
+        height: 2.3em;
+        &:hover {
+            margin: 3px 0 0 3px;
+            box-shadow: 0 0 1px #333;
+        }
+        transition-property: margin, box-shadow;
+        transition-duration: 0.6s;
+    }
+}
 @media only screen and (max-width: @page-width) {
-    .github-forkme { display: none; }
+    .badge { display: none; }
 }
diff --git a/layout/badges.j2 b/layout/badges.j2
new file mode 100644 (file)
index 0000000..3b3648f
--- /dev/null
@@ -0,0 +1,12 @@
+<a class="badge github-forkme" href="https://github.com/vincentbernat/lldpd">
+  <img src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"
+       alt="GitHub badge" title="Fork me on GitHub">
+</a>
+<a class="badge latest-version" href="http://media.luffy.cx/files/lldpd/lldpd-{{ resource.meta.latestversion }}.tar.gz">
+  <div title="Download latest version of lldpd">{{ resource.meta.latestversion }}</div>
+</a>
+
+{# Local Variables:      #}
+{# mode: html            #}
+{# indent-tabs-mode: nil #}
+{# End:                  #}
index 039258b34a599c32ae855b868714e47819447376..c347f4b24d161227f7c6b2b52832871c8a8bfd85 100644 (file)
 </head>
 <body>
 
-  <a class="github-forkme" href="https://github.com/vincentbernat/lldpd">
-    <img src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"
-         alt="Fork me on GitHub">
-  </a>
-
+  {% include "badges.j2" %}
   {% include "menu.j2" %}
   <article>
     <div role="main">