Skip to content
Snippets Groups Projects
Select Git revision
  • 54406a49bbf9014d2f37492b663fa4b50b311a52
  • test default protected
  • master protected
  • feat/custom-css
  • feat/redesign-improvements-10
  • feat/redesign-improvements-8
  • feat/redesign-fixes-3
  • feat/pirstan-changes
  • feat/separate-import-thread
  • feat/dary-improvements
  • features/add-pdf-page
  • features/add-typed-table
  • features/fix-broken-calendar-categories
  • features/add-embed-to-articles
  • features/create-mastodon-feed-block
  • features/add-custom-numbering-for-candidates
  • features/add-timeline
  • features/create-wordcloud-from-article-page
  • features/create-collapsible-extra-legal-info
  • features/extend-hero-banner
  • features/add-link-to-images
21 results

0003_auto_20200909_2354.py

Blame
  • _01-foot.mustache 1.04 KiB
    
      <!--DO NOT REMOVE-->
      {{{ patternLabFoot }}}
    
      <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.js"></script>
      <script src="../../js/main.bundle.js?{{ cacheBuster }}"></script>
    
      <script>
        /*
         * By default, {{ link.[pattern] }} starts with /, which breaks when app
         * isn't served from the root like in case of versioned styleguide.
         * This fixes that in most cases by detecting the current prefix from
         * location.pathname and makes it work the same way the main pattern lab nav.
         * IMPORTANT: hrefs need to be marked with data-href instead of real href
         */
        var idx = location.pathname.indexOf("/patterns");
        var prefix = location.pathname.substring(0, idx);
        var anchors = document.querySelectorAll('a[data-href]');
    
        for (var i = 0; i < anchors.length; i++) {
          var anchor = anchors[i];
          if (prefix != "") {
            anchor.setAttribute('href', prefix +  anchor.dataset.href);
          } else {
            anchor.setAttribute('href', anchor.dataset.href);
          }
        }
      </script>
    
      </body>
    </html>