Browse Source

fixed members hover

master
Chris 6 years ago
parent
commit
782f4498e8
  1. 2
      layouts/members/terms.html
  2. 11
      layouts/partials/members-summary.html

2
layouts/members/terms.html

@ -37,7 +37,7 @@
{{ partial "members-summary.html" (dict "page" .Page "param_title" .Page.Title ) }}
</div>
<div id="{{ .Page.Title }}" class="flex justify-center pt1">
<br>
<div style="color:transparent">:</div>
</div>
</div>

11
layouts/partials/members-summary.html

@ -8,15 +8,16 @@
{{/* {{ $width := div $totalWidth ( len ( $pages.GroupByDate "2006" ) ) }} */}}
{{ $width := div $totalWidth ( len ( $pages.GroupByDate "2006" ) ) }}
{{ $color := "#357edd" }}
{{ $color := "#a8c7f0" }}
{{ $strokecolor := "#d3e3f8" }}
<script>
function onyearover(year, key, count){
document.getElementById( key ).innerHTML = year + ": " + count + " km";
document.getElementById( key ).innerHTML = year + ": " + count;
}
function onyearout(key){
document.getElementById( key ).innerHTML = "<br>";
document.getElementById( key ).innerHTML = "<div style='color: transparent'>:</div>";
}
</script>
@ -62,8 +63,8 @@ document.getElementById( key ).innerHTML = "<br>";
{{/* $dist */}}
{{/* $x */}}
{{/* $height */}}
<rect onmouseover="onyearover({{ $year }}, {{ $param_title }}, {{ math.Round $dist }} )" onmouseout="onyearout({{ $param_title }})" opacity="0.2" height="{{ $height }}" y="{{ sub $totalHeight $height }}" x="{{ $x }}%"
width="{{ $width }}%" fill="{{ $color }}" stroke-width="1.5" stroke="{{$color}}"/>
<rect onmouseover="onyearover( {{ $year }}, {{ $param_title }}, {{ $count }} )" onmouseout="onyearout({{ $param_title }})" opacity="0.2" height="{{ $height }}" y="{{ sub $totalHeight $height }}" x="{{ $x }}%"
width="{{ $width }}%" fill="{{ $color }}" stroke-width="1.5" stroke="{{$strokecolor}}" class="dim"/>
{{ $x = add $x $width }}
{{ end }}

Loading…
Cancel
Save