mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 10:15:22 +00:00
feat(widget): animate Tag Cloud
This commit is contained in:
1 parent
a4ffd6efc5
commit
a40a7ffe29
3 files changed
+27
-1
No files matched your search
@@ -2,3 +2,6 @@
|
||||
.idea/
|
||||
.vscode/
|
||||
resources/
|
||||
|
||||
# Jupyter
|
||||
.ipynb_checkpoints/
|
||||
@@ -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
|
||||
*************************************************/
|
||||
|
||||
@@ -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)) }}
|
||||
|
||||
Reference in new issue
Block a user