Sha256: 72dc88b308f06d6bb852126eafc4b58608d5efad0a5411e3ef1262d87cdf8055
Contents?: true
Size: 1.96 KB
Versions: 8
Compression:
Stored size: 1.96 KB
Contents
<!-- {% comment %} Generates links for page-related functions. {% endcomment %} --> {% if site.data.theme.page-actions[page.kind] %} <ul id="page-interactions" class="nav flex-column"> {% for feature in site.data.theme.page-actions[page.kind] %} {% assign feat = feature[0] %} {% assign ftr = feature[1] %} {% unless feat == "$doc" or feat == "data" and page.data-source == nil %} <li class="nav-item {% if ftr.role %}role-{{ ftr.role }}-plus{% endif %} nav-item-{{ feat }}"> <a href="#" class="nav-link"><i class="icon {{ ftr.icon }} fa-fw"></i> {{ ftr.text }}</a> </li> {% assign git_actions = "make,edit,data,open-docs,open-subj" | split: "," %} <script> {% if git_actions contains feat %} // TODO: This will get moved into distinct function // with apologies for the bad JS... var feat = '{{ feat }}'; if (feat == 'edit') { var url = "{{ site.source_www }}/edit/{{ site.source_trunk_branch | default: 'main' }}/{{ page.path }}"; } else if (feat == 'make') { var url = "{{ site.source_www }}/new/{{ site.source_trunk_branch | default: 'main' }}"; } else if (feat == 'data') { var url = "{{ site.source_www }}/edit/{{ site.source_trunk_branch | default: 'main' }}/{{ page.data-source }}"; } else if (feat == 'open-subj') { var url = "{{ site.subject_tickets_www }}{{ site.data.theme.page-actions[page.kind].open-subj.path }}"; } else if (feat == 'open-docs') { var url = "{{ site.docs_tickets_www }}{{ site.data.theme.page-actions[page.kind].open-docs.path }}"; }; $('.nav-item-{{ feat }} .nav-link').each(function() { $(this).attr('href', url); }); {% elsif feat == "peel" %} $('.nav-item-peel .nav-link').click(function() { $('#sidebar-left').toggleClass('hide') $('header').toggleClass('hide') $('#sidebar-right').toggleClass('hide') $('footer').toggleClass('hide') }); {% endif %} </script> {% endunless %} {% endfor %} </ul> {% endif %}
Version data entries
8 entries across 8 versions & 2 rubygems