From b6eb516242dbdf6cf9b8b92c7e593e1fda470ea8 Mon Sep 17 00:00:00 2001 From: Sven Date: Tue, 4 Apr 2017 21:45:43 +0200 Subject: [PATCH] add stats --- static/css/style.css | 14 +++++++++++++ static/js/circle-progress.min.js | 10 +++++++++ static/js/site.js | 2 +- static/scss/style.scss | 17 +++++++++++++++ templates/base.html | 6 ++++-- templates/index.html | 36 ++++++++++++++++++++++++++------ 6 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 static/js/circle-progress.min.js diff --git a/static/css/style.css b/static/css/style.css index d9ae7b0..c8e08b0 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -5323,3 +5323,17 @@ footer { @media (max-width: 991px) { p.lead { font-size: 1rem; } } + +.circle { + position: relative; } + .circle p.lead { + color: #546e7a; + position: absolute; + top: calc(50% - 1.25rem); + width: 100%; } + +.truncate { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } diff --git a/static/js/circle-progress.min.js b/static/js/circle-progress.min.js new file mode 100644 index 0000000..0508e0e --- /dev/null +++ b/static/js/circle-progress.min.js @@ -0,0 +1,10 @@ +/** + * jquery-circle-progress - jQuery Plugin to draw animated circular progress bars: + * {@link http://kottenator.github.io/jquery-circle-progress/} + * + * @author Rostyslav Bryzgunov + * @version 1.2.1 + * @licence MIT + * @preserve + */ +!function(i){if("function"==typeof define&&define.amd)define(["jquery"],i);else if("object"==typeof module&&module.exports){var t=require("jquery");i(t),module.exports=t}else i(jQuery)}(function(i){function t(i){this.init(i)}t.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:t,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(t){i.extend(this,t),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=i("")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var t=this.canvas;if(t.width=this.size,t.height=this.size,this.ctx=t.getContext("2d"),window.devicePixelRatio>1){var e=window.devicePixelRatio;t.style.width=t.style.height=this.size+"px",t.width=t.height=this.size*e,this.ctx.scale(e,e)}},initFill:function(){function t(){var t=i("")[0];t.width=e.size,t.height=e.size,t.getContext("2d").drawImage(g,0,0,r,r),e.arcFill=e.ctx.createPattern(t,"no-repeat"),e.drawFrame(e.lastFrameValue)}var e=this,a=this.fill,n=this.ctx,r=this.size;if(!a)throw Error("The fill is not specified!");if("string"==typeof a&&(a={color:a}),a.color&&(this.arcFill=a.color),a.gradient){var s=a.gradient;if(1==s.length)this.arcFill=s[0];else if(s.length>1){for(var l=a.gradientAngle||0,o=a.gradientDirection||[r/2*(1-Math.cos(l)),r/2*(1+Math.sin(l)),r/2*(1+Math.cos(l)),r/2*(1-Math.sin(l))],h=n.createLinearGradient.apply(n,o),c=0;c {% end %} + + + @@ -32,7 +35,7 @@ - IPFire Tux + IPFire Tux {% if hostname in ("www.ipfire.org", "dev.ipfire.org") %} {{ _("IPFire") }} {% elif hostname in ("planet.ipfire.org", "planet.dev.ipfire.org") %} @@ -192,7 +195,6 @@ {% end block %} - diff --git a/templates/index.html b/templates/index.html index b726441..c45dc16 100644 --- a/templates/index.html +++ b/templates/index.html @@ -251,24 +251,48 @@

FireInfo Statistics

-
+

Latest Release

-

2.19 Core 109

+

2.19 Core 109

+
+

48%

+
+
-
+

Favorite Kernel

-

3.14.79-ipfire-pae

+

3.14.79-ipfire-pae

+
+

36%

+
+

Favorite CPU

-

Intel

+

Intel

+
+

71%

+
+

Favorite Virtualisation

-

VMWare

+

VMWare

+
+

46%

+
+
-- 2.39.2