Sha256: c989e1b9a5c8b49f0a44c8f7965351b1763ec9d40e6b16709495fe9505d696f2
Contents?: true
Size: 1.49 KB
Versions: 5
Compression:
Stored size: 1.49 KB
Contents
<div> {%- if include.collection -%} {%- assign posts = include.collection -%} {%- else -%} {%- assign posts = site.posts -%} {%- endif -%} {% if datemapidOnPage == nil %} {%- assign datemapidOnPage = 0 -%} {%- else -%} {%- assign datemapidOnPage = datemapidOnPage | plus : 1-%} {%- endif -%} {% assign mapEleId = "heatmap-" | append: datemapidOnPage %} <div class="heatmap-title">{{ include.title | default :"" }}</div> <div class='heatmap' id="{{mapEleId}}"> </div> {%- if datemapidOnPage == 0 -%} {% comment %} 只加载一次 {% endcomment %} <script > function create_heatmap(heatmapid,endYear){ {%- assign MothStr = site.theme_config.heatMapMonth -%} {%- assign HeatMapShowWeek = site.theme_config.heatMapShowWeek -%} {%- assign HeatMapType = site.theme_config.heatMapType -%} {%- assign heatMapLoadCount = site.theme_config.heatMapLoadCount | default: 8 -%} const heatMapLoadCount = {{heatMapLoadCount}} var _HeatMapType = "{{ HeatMapType | default:'1' }}" var _MonthStr = '{{ MothnStr | default: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" }}' var _showWeek = '{{ HeatMapShowWeek | default: "Mon Wed Fri" }}'; var _allyearurl = '{{ "assets/dyn/allyear.json" | relative_url }}'; {% include heatmap.js %} } </script> {% else %} {%- endif -%} {{child_initialized}} <script> !function(){ var endYear = "{{ include.endYear }}" var mapid = "{{ mapEleId }}" create_heatmap(mapid,endYear ) }() </script> </div>
Version data entries
5 entries across 5 versions & 1 rubygems