feat(widget): animate Tag Cloud

This commit is contained in:
George Cushen committed 2019-02-08 00:41:27 +00:00
1 parent a4ffd6efc5
commit a40a7ffe29
3 files changed
+27 -1

No files matched your search

+3
View File
@@ -2,3 +2,6 @@
.idea/
.vscode/
resources/
# Jupyter
.ipynb_checkpoints/
+23
View File
@@ -1477,6 +1477,29 @@ a.badge:hover {
color: rgba(0,0,0,.68);
}
.tag-cloud a {
display: inline-block;
position: relative;
margin: 5px 10px;
word-wrap: break-word;
transition-duration: .2s;
transition-property: transform;
transition-timing-function: ease-out;
}
.tag-cloud a:active,
.tag-cloud a:focus,
.tag-cloud a:hover {
color: {{ .Get "primary_dark" }};
transform: scale(1.2);
}
.dark .tag-cloud a:active,
.dark .tag-cloud a:focus,
.dark .tag-cloud a:hover {
color: {{ .Get "primary_light" }};
}
/*************************************************
* Button size override
*************************************************/
+1 -1
View File
@@ -19,7 +19,7 @@
{{ $delta := sub $max $min }}
{{ $fontStep := div $fontDelta $delta }}
<div id="tag-cloud">
<div class="tag-cloud">
{{ range $name, $taxonomy := $.Site.Taxonomies.tags }}
{{ $tagCount := len $taxonomy.Pages }}
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}