From: Vincent Bernat Date: Sun, 13 Jan 2013 01:03:29 +0000 (+0100) Subject: web: add a badge to show current version in the header X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbb3d28ec5bbdc27523860136637b97d04c7a0c0;p=thirdparty%2Flldpd.git web: add a badge to show current version in the header --- diff --git a/content/media/css/lldpd.1.blank.less b/content/media/css/lldpd.1.blank.less index cc15bbfc..7060b109 100644 --- a/content/media/css/lldpd.1.blank.less +++ b/content/media/css/lldpd.1.blank.less @@ -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 index 00000000..3b3648f7 --- /dev/null +++ b/layout/badges.j2 @@ -0,0 +1,12 @@ + + GitHub badge + + +
{{ resource.meta.latestversion }}
+
+ +{# Local Variables: #} +{# mode: html #} +{# indent-tabs-mode: nil #} +{# End: #} diff --git a/layout/base.j2 b/layout/base.j2 index 039258b3..c347f4b2 100644 --- a/layout/base.j2 +++ b/layout/base.j2 @@ -16,11 +16,7 @@ - - Fork me on GitHub - - + {% include "badges.j2" %} {% include "menu.j2" %}