jekyll-theme-mdui 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/_includes/analytics.html +8 -10
- data/_includes/disqus.html +10 -2
- data/_includes/footer.html +21 -21
- data/_includes/head.html +2 -4
- data/_includes/test.html +190 -0
- data/_layouts/category.html +11 -11
- data/_layouts/default.html +2 -1
- data/_layouts/editor.html +0 -2
- data/_layouts/post.html +0 -2
- data/assets/css/main.css +3 -0
- data/assets/css/pickerdata.css +3 -0
- data/assets/js/chips.js +2 -327
- data/assets/js/pickerdata.js +9 -2558
- data/assets/js/toc.min.js +0 -14
- metadata +3 -5
- data/search.json +0 -10
- data/sw.js +0 -48
- data/tags.json +0 -23
    
        data/assets/js/toc.min.js
    CHANGED
    
    | @@ -1,15 +1 @@ | |
| 1 | 
            -
            /*!
         | 
| 2 | 
            -
             * toc - jQuery Table of Contents Plugin
         | 
| 3 | 
            -
             * v0.3.2
         | 
| 4 | 
            -
             * http://projects.jga.me/toc/
         | 
| 5 | 
            -
             * copyright Greg Allen 2014
         | 
| 6 | 
            -
             * MIT License
         | 
| 7 | 
            -
            */
         | 
| 8 | 
            -
            /*!
         | 
| 9 | 
            -
             * smooth-scroller - Javascript lib to handle smooth scrolling
         | 
| 10 | 
            -
             * v0.1.2
         | 
| 11 | 
            -
             * https://github.com/firstandthird/smooth-scroller
         | 
| 12 | 
            -
             * copyright First+Third 2014
         | 
| 13 | 
            -
             * MIT License
         | 
| 14 | 
            -
            */
         | 
| 15 1 | 
             
            (function($){$.fn.smoothScroller=function(options){options=$.extend({},$.fn.smoothScroller.defaults,options);var el=$(this);$(options.scrollEl).animate({scrollTop:el.offset().top-$(options.scrollEl).offset().top-options.offset-64},options.speed,options.ease,function(){var hash=el.attr("id");if(hash.length){if(history.pushState){history.pushState(null,null,"#"+hash)}else{document.location.hash=hash}}el.trigger("smoothScrollerComplete")});return this};$.fn.smoothScroller.defaults={speed:400,ease:"swing",scrollEl:"body,html",offset:0};$("body").on("click","[data-smoothscroller]",function(e){e.preventDefault();var href=$(this).attr("href");if(href.indexOf("#")===0){$(href).smoothScroller()}})}(jQuery));(function($){var verboseIdCache={};$.fn.toc=function(options){var self=this;var opts=$.extend({},jQuery.fn.toc.defaults,options);var container=$(opts.container);var headings=$(opts.selectors,container);var headingOffsets=[];var activeClassName=opts.activeClass;var scrollTo=function(e,callback){if(opts.smoothScrolling&&typeof opts.smoothScrolling==="function"){e.preventDefault();var elScrollTo=$(e.target).attr("href");opts.smoothScrolling(elScrollTo,opts,callback)}$("li",self).removeClass(activeClassName);$(e.target).parent().addClass(activeClassName)};var timeout;var highlightOnScroll=function(e){if(timeout){clearTimeout(timeout)}timeout=setTimeout(function(){var top=$(window).scrollTop(),highlighted,closest=Number.MAX_VALUE,index=0;for(var i=0,c=headingOffsets.length;i<c;i++){var currentClosest=Math.abs(headingOffsets[i]-top);if(currentClosest<closest){index=i;closest=currentClosest}}$("li",self).removeClass(activeClassName);highlighted=$("li:eq("+index+")",self).addClass(activeClassName);opts.onHighlight(highlighted)},50)};if(opts.highlightOnScroll){$(window).bind("scroll",highlightOnScroll);highlightOnScroll()}return this.each(function(){var el=$(this);var ul=$(opts.listType);headings.each(function(i,heading){var $h=$(heading);headingOffsets.push($h.offset().top-opts.highlightOffset);var anchorName=opts.anchorName(i,heading,opts.prefix);if(heading.id!==anchorName){var anchor=$("<span/>").attr("id",anchorName).insertBefore($h)}var a=$("<a/>").text(opts.headerText(i,heading,$h)).attr("href","#"+anchorName).bind("click",function(e){$(window).unbind("scroll",highlightOnScroll);scrollTo(e,function(){$(window).bind("scroll",highlightOnScroll)});el.trigger("selected",$(this).attr("href"))});var li=$("<li/>").addClass(opts.itemClass(i,heading,$h,opts.prefix)).append(a);ul.append(li)});el.html(ul)})};jQuery.fn.toc.defaults={container:"body",listType:"<ul/>",selectors:"h1,h2,h3",smoothScrolling:function(target,options,callback){$(target).smoothScroller({offset:options.scrollToOffset}).on("smoothScrollerComplete",function(){callback()})},scrollToOffset:0,prefix:"toc",activeClass:"toc-active",onHighlight:function(){},highlightOnScroll:true,highlightOffset:100,anchorName:function(i,heading,prefix){if(heading.id.length){return heading.id}var candidateId=$(heading).text().replace(/[^a-z0-9]/ig," ").replace(/\s+/g,"-").toLowerCase();if(verboseIdCache[candidateId]){var j=2;while(verboseIdCache[candidateId+j]){j++}candidateId=candidateId+"-"+j}verboseIdCache[candidateId]=true;return prefix+"-"+candidateId},headerText:function(i,heading,$heading){return $heading.text()},itemClass:function(i,heading,$heading,prefix){return prefix+"-"+$heading[0].tagName.toLowerCase()}}})(jQuery);
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: jekyll-theme-mdui
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - KeJun
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 11 | 
            +
            date: 2017-06-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: jekyll
         | 
| @@ -97,6 +97,7 @@ files: | |
| 97 97 | 
             
            - _includes/main.html
         | 
| 98 98 | 
             
            - _includes/note.html
         | 
| 99 99 | 
             
            - _includes/script.html
         | 
| 100 | 
            +
            - _includes/test.html
         | 
| 100 101 | 
             
            - _includes/tips.html
         | 
| 101 102 | 
             
            - _includes/toc.html
         | 
| 102 103 | 
             
            - _includes/warn.html
         | 
| @@ -118,9 +119,6 @@ files: | |
| 118 119 | 
             
            - assets/js/pickerdata.js
         | 
| 119 120 | 
             
            - assets/js/pushpin.js
         | 
| 120 121 | 
             
            - assets/js/toc.min.js
         | 
| 121 | 
            -
            - search.json
         | 
| 122 | 
            -
            - sw.js
         | 
| 123 | 
            -
            - tags.json
         | 
| 124 122 | 
             
            homepage: https://github.com/KeJunMao/jekyll-theme-mdui.git
         | 
| 125 123 | 
             
            licenses:
         | 
| 126 124 | 
             
            - MIT
         | 
    
        data/search.json
    DELETED
    
    
    
        data/sw.js
    DELETED
    
    | @@ -1,48 +0,0 @@ | |
| 1 | 
            -
            ---
         | 
| 2 | 
            -
            layout: compress
         | 
| 3 | 
            -
            ---
         | 
| 4 | 
            -
            var cacheName = 'madhur-cache-v1';
         | 
| 5 | 
            -
            var filesToCache = [
         | 
| 6 | 
            -
                {% for page in site.pages %}
         | 
| 7 | 
            -
                    {% if page.url contains 'projects' or page.url contains '404'   %}
         | 
| 8 | 
            -
                        
         | 
| 9 | 
            -
                    {% else %}
         | 
| 10 | 
            -
                        '{{ page.url }}',
         | 
| 11 | 
            -
                    {% endif %}
         | 
| 12 | 
            -
                    
         | 
| 13 | 
            -
                {% endfor %}
         | 
| 14 | 
            -
             | 
| 15 | 
            -
                {% for post in site.posts %}
         | 
| 16 | 
            -
                    '{{ post.url }}',
         | 
| 17 | 
            -
                {% endfor %}
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                {% for file in site.static_files %}
         | 
| 20 | 
            -
                          '{{ file.path }}',
         | 
| 21 | 
            -
                {% endfor %}
         | 
| 22 | 
            -
            ];
         | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
            // serviceWorker.js
         | 
| 26 | 
            -
            self.addEventListener('install', function(event) {
         | 
| 27 | 
            -
                event.waitUntil(
         | 
| 28 | 
            -
                    caches.open(cacheName).then(function(cache) {
         | 
| 29 | 
            -
                        return cache.addAll(filesToCache);
         | 
| 30 | 
            -
                    })
         | 
| 31 | 
            -
                );
         | 
| 32 | 
            -
            });
         | 
| 33 | 
            -
             | 
| 34 | 
            -
            self.addEventListener('fetch', function(event) {
         | 
| 35 | 
            -
                event.respondWith(
         | 
| 36 | 
            -
                    caches.match(event.request)
         | 
| 37 | 
            -
                        .then(function(response) {
         | 
| 38 | 
            -
                            if (response) {
         | 
| 39 | 
            -
                                console.log('[*] Serving cached: ' + event.request.url);
         | 
| 40 | 
            -
                                return response;
         | 
| 41 | 
            -
                            }
         | 
| 42 | 
            -
             | 
| 43 | 
            -
                            console.log('[*] Fetching: ' + event.request.url);
         | 
| 44 | 
            -
                            return fetch(event.request);
         | 
| 45 | 
            -
                        }
         | 
| 46 | 
            -
                    )
         | 
| 47 | 
            -
                );
         | 
| 48 | 
            -
            });
         | 
    
        data/tags.json
    DELETED
    
    | @@ -1,23 +0,0 @@ | |
| 1 | 
            -
            ---
         | 
| 2 | 
            -
            ---
         | 
| 3 | 
            -
            {% capture tags %}
         | 
| 4 | 
            -
              {% for tag in site.tags %}
         | 
| 5 | 
            -
                {{ tag[0] }}
         | 
| 6 | 
            -
              {% endfor %}
         | 
| 7 | 
            -
            {% endcapture %}
         | 
| 8 | 
            -
            {% assign sortedtags = tags | split:' ' | sort %}
         | 
| 9 | 
            -
            [
         | 
| 10 | 
            -
              {% for tag in sortedtags %}
         | 
| 11 | 
            -
                {
         | 
| 12 | 
            -
                  "id"    : "{{ tag | escape}}",
         | 
| 13 | 
            -
                  "post": [
         | 
| 14 | 
            -
                      {% for post in site.tags[tag] %}
         | 
| 15 | 
            -
                     {
         | 
| 16 | 
            -
                        "title": "{{ post.title | escape }}",
         | 
| 17 | 
            -
                        "excerpt": "{{ post.excerpt | strip_html | escape | strip_newlines}}",
         | 
| 18 | 
            -
                        "url": "{{ site.baseurl }}{{ post.url }}"
         | 
| 19 | 
            -
                     } {% unless forloop.last %},{% endunless %}
         | 
| 20 | 
            -
                  {% endfor %}]
         | 
| 21 | 
            -
                } {% unless forloop.last %},{% endunless %}
         | 
| 22 | 
            -
              {% endfor %}
         | 
| 23 | 
            -
            ]
         |