diff --git a/assets/_dashboard.scss b/assets/_dashboard.scss index 86edf82b7..d65432d71 100644 --- a/assets/_dashboard.scss +++ b/assets/_dashboard.scss @@ -9,7 +9,7 @@ } .Dashboard-section { - max-width:250px; + // max-width:250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/content/intro/_index.md b/content/intro/_index.md index 0ab8483f3..ef2265ede 100644 --- a/content/intro/_index.md +++ b/content/intro/_index.md @@ -32,5 +32,6 @@ over time, without requiring further interaction from the original parties (such as the clients who requested the data storage). ## Spec Status Overview +{{}} {{}} \ No newline at end of file diff --git a/layouts/shortcodes/dashboard-progress.html b/layouts/shortcodes/dashboard-progress.html new file mode 100644 index 000000000..d4d9a649c --- /dev/null +++ b/layouts/shortcodes/dashboard-progress.html @@ -0,0 +1,55 @@ +{{- with .Site.GetPage "/" -}} + {{- $level := 0 -}} + {{- template "dashboard-progress" (dict "Site" $.Site "level" $level) -}} +{{- end -}} + + +{{ define "dashboard-progress" }} + {{- $count := .level -}} + {{- $countWeight:= 0 -}} + {{- $stable := 0 -}} + {{- $stableWeight := 0 -}} + {{- $pages := where .Site.AllPages "Params.bookhidden" "ne" true -}} + {{- $pages2 := where $pages "Params.dashboardhidden" "ne" true -}} + {{- $pages3 := where $pages2 "Kind" "in" (slice "section" "page") -}} + {{- $pages4 := where $pages3 "Language.Lang" "eq" "en" -}} + {{- range sort $pages4 "Weight" "asc" -}} + {{- if .Params.dashboardState -}} + {{- $count = add $count 1 -}} + {{- $countWeight = add $countWeight (mul 1 (float .Params.dashboardWeight)) -}} + {{- if eq .Params.dashboardState "stable" -}} + {{- $stable = add $stable 1 -}} + {{- $stableWeight = add $stableWeight (mul 1 (float .Params.dashboardWeight)) -}} + {{- end -}} + {{- end -}} + {{- end -}} + {{- $perc := lang.NumFmt 2 (div (float (mul $stable 100)) (float $count)) -}} + {{- $perc2 := lang.NumFmt 2 (div (mul $stableWeight 100) $countWeight) -}} + +

Progress

+
+ {{$perc}}% +
+

Consequence

+
+ {{$perc2}}% +
+ +{{ end }} \ No newline at end of file