diff --git a/changelog.json b/changelog.json new file mode 100644 index 0000000..10c3d77 --- /dev/null +++ b/changelog.json @@ -0,0 +1,23 @@ +{ + "versions": [ + { + "id": "Version 1.1", + "date": "2016-04-14", + "link": "Version-1.1", + "changes": [ + "Added bundle completion numbers (#40)", + "'Hide Completed' toggle now hides items in completed bundles, even if the item is not checked. (#44)", + "Buttons for items in bundles that have been completed, but are not checked are now transparent. (#46)", + "Updated scripts to load via HTTPS so that users loading Github via HTTPS can use the page (#47)" + ] + }, + { + "id": "Version 1.0", + "date": "2016-04-13", + "link": "Version-1.0", + "changes": [ + "Initial Version" + ] + } + ] +} diff --git a/index.html b/index.html index d20683c..08b110e 100644 --- a/index.html +++ b/index.html @@ -66,6 +66,10 @@ v-bind:class="['skills' == active_page ? 'is-active' : '']"> Skills + + Change Log +
@@ -215,7 +219,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -290,7 +295,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -367,7 +373,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -446,7 +453,8 @@

+ v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '', + !isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]"> @@ -483,6 +491,39 @@

+
+
+

Change Log

+
+
+
+ - - + + diff --git a/main.js b/main.js index 234091c..3e6a8a3 100644 --- a/main.js +++ b/main.js @@ -1,7 +1,7 @@ var v = new Vue({ el: '#app', data:{ - debug: true, + changelog: null, static: null, user_data: [], active_page: "bundles", @@ -16,6 +16,7 @@ var v = new Vue({ }, ready: function(){ this.fetchData(); + this.fetchChangeLog(); new Clipboard('.copy'); storedUserData = localStorage.getItem('user_data'); if(storedUserData !== null && storedUserData !== ""){ @@ -40,6 +41,13 @@ var v = new Vue({ } }); }, + fetchChangeLog: function() { + this.$http.get('changelog.json', function(data, status){ + if(status == 200){ + this.changelog = data.versions + } + }); + }, enterLoadMode: function(){ this.load_mode = true; }, @@ -134,12 +142,15 @@ var v = new Vue({ }, isCompleted: function (item) { for(i=0; i < item.bundles.length; i++){ - if(!this.isItemInBundle(item.bundles[i], item.id, i)){ + if(!(this.isItemInBundle(item.bundles[i], item.id, i) || this.isBundleComplete(item.bundles[i]))){ return false; } } return true; + }, + isBundleComplete: function(bundle_id){ + return this.user_data[bundle_id].length >= this.static.bundles[bundle_id].items_required; } } });