From e02923c690916e035df4757efea2d1d58069c21d Mon Sep 17 00:00:00 2001 From: Dan Dvoracek Date: Sat, 17 Sep 2016 13:24:32 +0100 Subject: [PATCH] Simply changed the typo mistake in _template/app/js/main.min.js and _template/app/js/main.js as the reference to the pages object/array was missing an s at the end at line 490 of main.js --- _template/app/js/main.js | 2 +- _template/app/js/main.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_template/app/js/main.js b/_template/app/js/main.js index c9faa40..9b84ece 100644 --- a/_template/app/js/main.js +++ b/_template/app/js/main.js @@ -487,7 +487,7 @@ new Vue({ var _this = this, hash = location.hash; - if(_this.content.page !== undefined && _this.content.pages.length) { + if(_this.content.pages !== undefined && _this.content.pages.length) { if(hash) { for (var i = 0; i < _this.content.pages.length; i++) { diff --git a/_template/app/js/main.min.js b/_template/app/js/main.min.js index 75f1be8..185ba78 100644 --- a/_template/app/js/main.min.js +++ b/_template/app/js/main.min.js @@ -1 +1 @@ -var ndplComponent=Vue.extend({data:function(){return{loaded:!1,hide_sample_code:!1}},props:{component:{required:!0}},computed:{inline_styles:function(){var o=this,t="";return o.loaded&&(o.component.options.sample_min_height&&(t+="min-height:"+o.component.options.sample_min_height+"px;"),o.component.options.sample_background_color&&(t+="background-color:"+o.component.options.sample_background_color+" !important;")),t}},watch:{"component.html":function(){var o=this;this.component.html.length&&o.$root.applySyntaxHighlighting(o.$el)}},ready:function(){var o=this;o.$on("loaded",function(){window.addEventListener("scroll",o.updateActive),window.addEventListener("resize",o.updateActive),o.setHideSample(function(){o.loaded=!0})}),o.$on("resizing",function(t){o.loaded=!1,t||o.setHideSample(function(){o.loaded=!0})}),o.component.html&&o.$root.applySyntaxHighlighting(o.$el)},methods:{updateActive:function(){var o=this;if(o.$root&&o.$root.scroll_position>=o.$el.offsetTop-60&&o.$root.scroll_position210},shouldApplyBorder:function(o){var t=this.$root.convertHexToRgb(o),e=this.$root.getColorBrightness(t);return e>240},setHideSample:function(o){o="undefined"!=typeof o?o:function(){};var t=this;t.hide_sample_code=!1,setTimeout(function(){t.$el.querySelector(".ndpl-component__code")&&(t.$el.querySelector(".ndpl-component__sample").offsetHeight<=74&&!t.component.options.disabled_auto_sample_hiding&&(t.hide_sample_code=!0),t.component.options.disabled_auto_sample_hiding&&t.component.options.disabled_auto_sample_hiding.hasOwnProperty("show_on_mobile")&&t.component.options.disabled_auto_sample_hiding.hasOwnProperty("show_on_desktop")&&(t.$root.mobile_view?t.hide_sample_code=!t.component.options.disabled_auto_sample_hiding.show_on_mobile:t.hide_sample_code=!t.component.options.disabled_auto_sample_hiding.show_on_desktop)),o()},0)},isCodeVisible:function(){var o=this;return!o.hide_sample_code}}});Vue.component("ndpl-component",ndplComponent);var ndplGroup=Vue.extend({props:{group:{required:!0}}});Vue.component("ndpl-group",ndplGroup);var ndplScript=Vue.extend({props:{script:{required:!0}},methods:{loadTypekit:function(){try{Typekit.load({async:!0})}catch(o){}}}});Vue.component("ndpl-script",ndplScript),new Vue({el:"html",data:{intro:null,project_logo:null,project_favicon:null,project_name:null,project_url:null,copyright_start_year:null,client_name:null,client_url:null,creators:{},content:{},groups:{},theme:{},assets:{css:[],js:[]},font_libraries:{typekit_code:null,google_web_fonts:null,typography_web_fonts:null},log:{error:[],info:[]},components_count:0,groups_count:0,components_loaded_count:0,groups_loaded_count:0,groups_loaded:!1,loaded:!1,resizing:!1,typekit_loaded:!1,scroll_position:0,prev_scroll_position:0,active_group:null,active_components:[],active_page:null,open_group:null,show_first_page_on_load:!1,scrolling_to:!1,sidebar_scrolling:!1,window_outer_width:0,breakpoint:960,mobile_view:!1,open_nav:!1,version:null},computed:{project:function(){return this.project_name&&this.project_url?''+this.project_name+"":this.project_name&&!this.project_url?this.project_name:null},copyright_year:function(){var o=new Date;return o.getFullYear()==this.copyright_start_year?this.copyright_start_year:this.copyright_start_year+" - "+o.getFullYear()},client:function(){return this.client_name&&this.client_url?''+this.client_name+"":this.client_name&&!this.client_url?this.client_name:null},all_creators:function(){var o="";if(this.creators.length&&this.creators[0].name){for(var t=0;t'+name+"";return o.substring(2)}return null},library_inline_styles:function(){var o=this,t="";return o.theme.max_width&&(t+="max-width:"+o.theme.max_width+"px;"),t}},watch:{groups_loaded:function(){var o=this;o.setupComponents()},loaded:function(){var o=this;o.scrollTo(window.location.hash),o.$broadcast("loaded")}},ready:function(){var o=this;o.loadDataFile(),o.window_outer_width=window.outerWidth,o.mobile_view=o.window_outer_width>=o.breakpoint?!1:!0,window.addEventListener("scroll",o.setScrollPosition),window.addEventListener("resize",function(){o.window_outer_width=window.outerWidth,o.setScrollPosition(),o.mobile_view=o.window_outer_width>=o.breakpoint?!1:!0});var t=document.querySelector(".ndpl-sidebar");t.addEventListener("mouseover",function(t){o.sidebar_scrolling=!0}),t.addEventListener("mouseleave",function(t){o.sidebar_scrolling=!1}),setTimeout(function(){var t=o.isLoadingPage();t&&o.loadPage(t)},0)},methods:{applySyntaxHighlighting:function(o){setTimeout(function(){for(var t=o.querySelectorAll("pre code"),e=0;eYou can either do this manually by editing your data.json file,
or you can use the command line helper: astrum new [group_name/component_name]")})})},isLoadingPage:function(){var o=this,t=location.hash;if(void 0!==o.content.page&&o.content.pages.length)if(t)for(var e=0;e"+o.name+" group failed to load from "+e+"/description.md")})},loadComponent:function(o){var t=this,e="./components/"+o.group+"/"+o.name;t.$http.get(e+"/markup.html?cb="+new Date).then(function(e){o.html=e.data,t.areComponentsLoaded()},function(){t.logError("HTML file for "+o.name+" component failed to load from "+e+"/html.md")}),t.$http.get(e+"/description.md?cb="+new Date).then(function(e){o.description=marked(e.data),t.areComponentsLoaded()},function(){t.logError("Description file for "+o.name+" component failed to load from "+e+"/description.md")})},areGroupsLoaded:function(){var o=this;o.groups_loaded_count+=1,o.groups_loaded_count===o.groups_count&&setTimeout(function(){o.groups_loaded=!0},1e3)},areComponentsLoaded:function(){var o=this;o.components_loaded_count+=1,o.components_loaded_count===2*o.components_count&&setTimeout(function(){o.loaded=!0},2e3)},addLog:function(o,t,e){var n=this;e="undefined"!=typeof e?e:"error",t="undefined"!=typeof t?t:null,n.log[e].push(o),console[e]("[Pattern Library warn]: "+o),t&&console[e](t)},logError:function(o,t){var e=this;e.addLog(o,t,"error")},logInfo:function(o,t){var e=this;e.addLog(o,t,"info")},setScrollPosition:function(){var o=this,t=document.documentElement,e=t&&t.scrollTop||document.body.scrollTop;o.prev_scroll_position=o.scroll_position,o.scroll_position=e},getScrollDirection:function(){var o=this;return o.prev_scroll_position=o.$el.offsetTop-60&&o.$root.scroll_position210},shouldApplyBorder:function(o){var t=this.$root.convertHexToRgb(o),e=this.$root.getColorBrightness(t);return e>240},setHideSample:function(o){o="undefined"!=typeof o?o:function(){};var t=this;t.hide_sample_code=!1,setTimeout(function(){t.$el.querySelector(".ndpl-component__code")&&(t.$el.querySelector(".ndpl-component__sample").offsetHeight<=74&&!t.component.options.disabled_auto_sample_hiding&&(t.hide_sample_code=!0),t.component.options.disabled_auto_sample_hiding&&t.component.options.disabled_auto_sample_hiding.hasOwnProperty("show_on_mobile")&&t.component.options.disabled_auto_sample_hiding.hasOwnProperty("show_on_desktop")&&(t.$root.mobile_view?t.hide_sample_code=!t.component.options.disabled_auto_sample_hiding.show_on_mobile:t.hide_sample_code=!t.component.options.disabled_auto_sample_hiding.show_on_desktop)),o()},0)},isCodeVisible:function(){var o=this;return!o.hide_sample_code}}});Vue.component("ndpl-component",ndplComponent);var ndplGroup=Vue.extend({props:{group:{required:!0}}});Vue.component("ndpl-group",ndplGroup);var ndplScript=Vue.extend({props:{script:{required:!0}},methods:{loadTypekit:function(){try{Typekit.load({async:!0})}catch(o){}}}});Vue.component("ndpl-script",ndplScript),new Vue({el:"html",data:{intro:null,project_logo:null,project_favicon:null,project_name:null,project_url:null,copyright_start_year:null,client_name:null,client_url:null,creators:{},content:{},groups:{},theme:{},assets:{css:[],js:[]},font_libraries:{typekit_code:null,google_web_fonts:null,typography_web_fonts:null},log:{error:[],info:[]},components_count:0,groups_count:0,components_loaded_count:0,groups_loaded_count:0,groups_loaded:!1,loaded:!1,resizing:!1,typekit_loaded:!1,scroll_position:0,prev_scroll_position:0,active_group:null,active_components:[],active_page:null,open_group:null,show_first_page_on_load:!1,scrolling_to:!1,sidebar_scrolling:!1,window_outer_width:0,breakpoint:960,mobile_view:!1,open_nav:!1,version:null},computed:{project:function(){return this.project_name&&this.project_url?''+this.project_name+"":this.project_name&&!this.project_url?this.project_name:null},copyright_year:function(){var o=new Date;return o.getFullYear()==this.copyright_start_year?this.copyright_start_year:this.copyright_start_year+" - "+o.getFullYear()},client:function(){return this.client_name&&this.client_url?''+this.client_name+"":this.client_name&&!this.client_url?this.client_name:null},all_creators:function(){var o="";if(this.creators.length&&this.creators[0].name){for(var t=0;t'+name+"";return o.substring(2)}return null},library_inline_styles:function(){var o=this,t="";return o.theme.max_width&&(t+="max-width:"+o.theme.max_width+"px;"),t}},watch:{groups_loaded:function(){var o=this;o.setupComponents()},loaded:function(){var o=this;o.scrollTo(window.location.hash),o.$broadcast("loaded")}},ready:function(){var o=this;o.loadDataFile(),o.window_outer_width=window.outerWidth,o.mobile_view=o.window_outer_width>=o.breakpoint?!1:!0,window.addEventListener("scroll",o.setScrollPosition),window.addEventListener("resize",function(){o.window_outer_width=window.outerWidth,o.setScrollPosition(),o.mobile_view=o.window_outer_width>=o.breakpoint?!1:!0});var t=document.querySelector(".ndpl-sidebar");t.addEventListener("mouseover",function(t){o.sidebar_scrolling=!0}),t.addEventListener("mouseleave",function(t){o.sidebar_scrolling=!1}),setTimeout(function(){var t=o.isLoadingPage();t&&o.loadPage(t)},0)},methods:{applySyntaxHighlighting:function(o){setTimeout(function(){for(var t=o.querySelectorAll("pre code"),e=0;eYou can either do this manually by editing your data.json file,
or you can use the command line helper: astrum new [group_name/component_name]")})})},isLoadingPage:function(){var o=this,t=location.hash;if(void 0!==o.content.pages&&o.content.pages.length)if(t)for(var e=0;e"+o.name+" group failed to load from "+e+"/description.md")})},loadComponent:function(o){var t=this,e="./components/"+o.group+"/"+o.name;t.$http.get(e+"/markup.html?cb="+new Date).then(function(e){o.html=e.data,t.areComponentsLoaded()},function(){t.logError("HTML file for "+o.name+" component failed to load from "+e+"/html.md")}),t.$http.get(e+"/description.md?cb="+new Date).then(function(e){o.description=marked(e.data),t.areComponentsLoaded()},function(){t.logError("Description file for "+o.name+" component failed to load from "+e+"/description.md")})},areGroupsLoaded:function(){var o=this;o.groups_loaded_count+=1,o.groups_loaded_count===o.groups_count&&setTimeout(function(){o.groups_loaded=!0},1e3)},areComponentsLoaded:function(){var o=this;o.components_loaded_count+=1,o.components_loaded_count===2*o.components_count&&setTimeout(function(){o.loaded=!0},2e3)},addLog:function(o,t,e){var n=this;e="undefined"!=typeof e?e:"error",t="undefined"!=typeof t?t:null,n.log[e].push(o),console[e]("[Pattern Library warn]: "+o),t&&console[e](t)},logError:function(o,t){var e=this;e.addLog(o,t,"error")},logInfo:function(o,t){var e=this;e.addLog(o,t,"info")},setScrollPosition:function(){var o=this,t=document.documentElement,e=t&&t.scrollTop||document.body.scrollTop;o.prev_scroll_position=o.scroll_position,o.scroll_position=e},getScrollDirection:function(){var o=this;return o.prev_scroll_position