Sha256: f44c13f9261c48c8bdbb6ecde16bb57302a9856536dca677c6574491f19de11e

Contents?: true

Size: 1.5 KB

Versions: 5

Compression:

Stored size: 1.5 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 heatMapLoadCount = site.theme_config.heatMapLoadCount | default: 8  -%}
    
    const WeeKStartStr = "{{ site.theme_config.heatMapWeekStart | default: 0 }}" ;//  0 sunday 1 monday 2. tuesday ...

    const heatMapLoadCount = {{heatMapLoadCount}};
    var _MonthStr =  '{{ MothnStr | default: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" }}';
    var _showWeek =  '{{ HeatMapShowWeek | default: "Sun Mon Tue Wed Thu Fri Sat" }}';
    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

Version Path
jekyll-zeta-0.9.4.3 _includes/heatmap.html
jekyll-zeta-0.9.4.2 _includes/heatmap.html
jekyll-zeta-0.9.4.1 _includes/heatmap.html
jekyll-zeta-0.9.4 _includes/heatmap.html
jekyll-zeta-0.9.3 _includes/heatmap.html