diff --git a/app.js b/app.js index d2f86c3..c9cae7f 100644 --- a/app.js +++ b/app.js @@ -7,6 +7,7 @@ angular.module('myApp', [ 'myApp.authors', 'myApp.site', 'myApp.build', + 'myApp.configure', 'myApp.create', 'myApp.version', 'myApp.services' diff --git a/index.html b/index.html index 2c8c535..464743f 100644 --- a/index.html +++ b/index.html @@ -109,6 +109,7 @@ + diff --git a/views/configure/configure.html b/views/configure/configure.html new file mode 100644 index 0000000..b950a9a --- /dev/null +++ b/views/configure/configure.html @@ -0,0 +1,72 @@ +
+
+ +
+ +
+
+
+
+
+ Advanced + +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+
diff --git a/views/configure/configure.js b/views/configure/configure.js new file mode 100644 index 0000000..d931c92 --- /dev/null +++ b/views/configure/configure.js @@ -0,0 +1,13 @@ +'use strict'; + +angular.module('myApp.configure', ['ngRoute']) + +.config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/configure', { + templateUrl: 'views/configure/configure.html', + controller: 'ConfigureCtrl as Configure' + }); +}]) + +.controller('ConfigureCtrl', [function() { +}]); diff --git a/views/site/site.html b/views/site/site.html index 3590ba0..3de34f7 100644 --- a/views/site/site.html +++ b/views/site/site.html @@ -1,12 +1,13 @@
-
+ +
@@ -14,55 +15,91 @@ General
- -
- + +
+
- -
- + +
+
- -
-
-
+
+
+
+ +
+ +
+
+
+
+ + + + + -
-
-
-
- Production
- + type="url" + class="form-control" + id="inputProdHost"> +
+
- + type="text" + class="form-control" + id="inputProdBase">
+
- +
+
-
@@ -70,61 +107,89 @@
- Advanced + Development
- -
- -
-
- + +
+ +
- -
- -
-
- + +
+
- -
- -
-
- + +
+
-
- -
- -
-
- -
-
- -
- -
- -
-
- -
-
- -
+
+ + +
+
+
+
+ Plugins + +
+ +
+ +
+ Found in the Admin section of Google Analytics +
+
+ +
+ +
+ +
+ Found under Admin > Settings in Disqus +
+
+ +
+
+
+
+ +
diff --git a/views/site/site.js b/views/site/site.js index b3bc260..9ab98d8 100644 --- a/views/site/site.js +++ b/views/site/site.js @@ -13,14 +13,45 @@ angular.module('myApp.site', ['ngRoute']) var scope = this ; - console.log('desi loading'); - Desirae.meta().then(function (desi) { - console.log('desi loaded'); - console.log(desi); - scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); - }).catch(function (e) { - window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); - console.error(e); - throw e; - }); + + function init() { + console.log('desi loading'); + Desirae.meta().then(function (desi) { + scope.blogdir = desi.blogdir.path.replace(/^\/(Users|home)\/[^\/]+\//, '~/'); + scope.site = desi.site; + }).catch(function (e) { + window.alert("An Error Occured. Most errors that occur in the init phase are parse errors in the config files or permissions errors on files or directories, but check the error console for details."); + console.error(e); + throw e; + }); + } + + scope.upsert = function () { + console.log('yolo!'); + return; + var author = scope.selectedAuthor + , files = [] + , filename = author.filename + ; + + delete author.filename; + if ('new' !== filename && filename !== author.handle) { + files.push({ path: 'authors/' + filename + '.yml', contents: '', delete: true }); + } + files.push({ path: 'authors/' + author.handle + '.yml', contents: window.jsyaml.dump(author) }); + + console.log(files); + + Desirae.putFiles(files).then(function (results) { + console.log('updated author', results); + $location.path('/post'); + }).catch(function (e) { + author.filename = filename; + console.error(e); + window.alert("Error Nation! :/"); + throw e; + }); + }; + + init(); }]);