Project slug + Update projects sockets structure + Express to angular structure
This commit is contained in:
+10
-10
@@ -53,21 +53,21 @@ class App
|
|||||||
// Set up
|
// Set up
|
||||||
this.arguments = process.argv.slice( 2 )
|
this.arguments = process.argv.slice( 2 )
|
||||||
|
|
||||||
// Missing project slug
|
// Missing project name
|
||||||
if( this.arguments.length === 0 )
|
if( this.arguments.length === 0 )
|
||||||
{
|
{
|
||||||
// Stop process
|
// Stop process
|
||||||
console.log( 'Missing arguments: first argument should be the projet slug'.red )
|
console.log( 'Missing arguments: first argument should be the projet name'.red )
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrong project slug
|
// // Wrong project name
|
||||||
if( !this.arguments[ 0 ].match( /^[a-z_-][a-z0-9_-]+$/ ) )
|
// if( !this.arguments[ 0 ].match( /^[a-z_-][a-z0-9_-]+$/ ) )
|
||||||
{
|
// {
|
||||||
// Stop process
|
// // Stop process
|
||||||
console.log( 'Wrong arguments: projet slug'.red )
|
// console.log( 'Wrong arguments: projet name'.red )
|
||||||
process.exit()
|
// process.exit()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,7 +83,7 @@ class App
|
|||||||
this.socket.on( 'connect', () =>
|
this.socket.on( 'connect', () =>
|
||||||
{
|
{
|
||||||
console.log( 'connected'.green )
|
console.log( 'connected'.green )
|
||||||
this.socket.emit( 'start_project', { slug: this.arguments[ 0 ] } )
|
this.socket.emit( 'start_project', { name: this.arguments[ 0 ] } )
|
||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-36
@@ -22,10 +22,10 @@ class App
|
|||||||
constructor( _options )
|
constructor( _options )
|
||||||
{
|
{
|
||||||
this.set_options( _options )
|
this.set_options( _options )
|
||||||
this.set_models()
|
|
||||||
this.set_express()
|
this.set_express()
|
||||||
this.set_server()
|
this.set_server()
|
||||||
this.set_socket()
|
this.set_socket()
|
||||||
|
this.set_models()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,7 +34,7 @@ class App
|
|||||||
set_models()
|
set_models()
|
||||||
{
|
{
|
||||||
// Set up
|
// Set up
|
||||||
this.projects = new Projects()
|
this.projects = new Projects( { socket: this.sockets.main } )
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
var project = this.projects.create_project( 'dummy' )
|
var project = this.projects.create_project( 'dummy' )
|
||||||
@@ -46,7 +46,7 @@ class App
|
|||||||
project.update_file( './toto/tata/ipsum.txt', 'content 3' )
|
project.update_file( './toto/tata/ipsum.txt', 'content 3' )
|
||||||
project.delete_folder( './toto/tutu', true )
|
project.delete_folder( './toto/tutu', true )
|
||||||
project.delete_file( './toto/tata/ipsum.txt' )
|
project.delete_file( './toto/tata/ipsum.txt' )
|
||||||
// console.log( util.inspect( project, { depth: null, colors: true } ) )
|
// console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,15 +111,6 @@ class App
|
|||||||
this.sockets = {}
|
this.sockets = {}
|
||||||
this.sockets.main = socket_io.listen( this.server )
|
this.sockets.main = socket_io.listen( this.server )
|
||||||
this.sockets.app = this.sockets.main.of( '/app' )
|
this.sockets.app = this.sockets.main.of( '/app' )
|
||||||
this.sockets.projects = this.sockets.main.of( '/projects' )
|
|
||||||
|
|
||||||
// Projects connection event
|
|
||||||
this.sockets.projects.on( 'connection', ( socket ) =>
|
|
||||||
{
|
|
||||||
console.log( 'socket projects'.green.bold + ' - ' + 'connect'.cyan + ' - ' + socket.id.cyan )
|
|
||||||
|
|
||||||
socket.emit( 'update_projects', this.projects.describe() )
|
|
||||||
} );
|
|
||||||
|
|
||||||
// App connection event
|
// App connection event
|
||||||
this.sockets.app.on( 'connection', ( socket ) =>
|
this.sockets.app.on( 'connection', ( socket ) =>
|
||||||
@@ -133,13 +124,7 @@ class App
|
|||||||
socket.on( 'start_project', ( data ) =>
|
socket.on( 'start_project', ( data ) =>
|
||||||
{
|
{
|
||||||
// Create project
|
// Create project
|
||||||
project = this.projects.create_project( data.slug )
|
project = this.projects.create_project( data.name )
|
||||||
|
|
||||||
// Create socket with specific namespace
|
|
||||||
project.socket = this.sockets.main.of( '/project/' + project.name )
|
|
||||||
|
|
||||||
// Emit to projects socket
|
|
||||||
this.sockets.projects.emit( 'update_projects', this.projects.describe() )
|
|
||||||
|
|
||||||
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
@@ -147,50 +132,38 @@ class App
|
|||||||
socket.on( 'update_file', ( data ) =>
|
socket.on( 'update_file', ( data ) =>
|
||||||
{
|
{
|
||||||
project.update_file( data.path, data.content )
|
project.update_file( data.path, data.content )
|
||||||
project.socket.emit( 'update_project', project )
|
|
||||||
|
|
||||||
console.log( util.inspect( project, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
socket.on( 'create_file', ( data ) =>
|
socket.on( 'create_file', ( data ) =>
|
||||||
{
|
{
|
||||||
project.create_file( data.path, data.content )
|
project.create_file( data.path, data.content )
|
||||||
project.socket.emit( 'update_project', project )
|
|
||||||
|
|
||||||
console.log( util.inspect( project, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
socket.on( 'delete_file', ( data ) =>
|
socket.on( 'delete_file', ( data ) =>
|
||||||
{
|
{
|
||||||
project.delete_file( data.path )
|
project.delete_file( data.path )
|
||||||
project.socket.emit( 'update_project', project )
|
|
||||||
|
|
||||||
console.log( util.inspect( project, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
socket.on( 'create_folder', ( data ) =>
|
socket.on( 'create_folder', ( data ) =>
|
||||||
{
|
{
|
||||||
project.create_folder( data.path, data.content )
|
project.create_folder( data.path, data.content )
|
||||||
project.socket.emit( 'update_project', project )
|
|
||||||
|
|
||||||
console.log( util.inspect( project, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
socket.on( 'delete_folder', ( data ) =>
|
socket.on( 'delete_folder', ( data ) =>
|
||||||
{
|
{
|
||||||
project.delete_folder( data.path )
|
project.delete_folder( data.path )
|
||||||
project.socket.emit( 'update_project', project )
|
|
||||||
|
|
||||||
console.log( util.inspect( project, { depth: null, colors: true } ) )
|
console.log( util.inspect( project.folders, { depth: null, colors: true } ) )
|
||||||
} )
|
} )
|
||||||
} )
|
} )
|
||||||
|
|
||||||
// this.sockets.projects.on( 'connection', ( socket ) =>
|
|
||||||
// {
|
|
||||||
// console.log( 'socket site'.green.bold + ' - ' + 'connect'.cyan + ' - ' + socket.id.cyan )
|
|
||||||
|
|
||||||
// socket.emit( 'update_project', project )
|
|
||||||
// } )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
var express = require( 'express' ),
|
var express = require( 'express' ),
|
||||||
router = express.Router();
|
router = express.Router()
|
||||||
|
|
||||||
router.get( '/', function( request, response )
|
router.get( '/', function( request, response )
|
||||||
{
|
{
|
||||||
response.render( 'pages/index/projects.jade', {} );
|
response.render( 'pages/index/projects.jade', {} )
|
||||||
} );
|
} )
|
||||||
|
|
||||||
router.get( /project\/[a-z]([a-z0-9_-])?/, function( request, response )
|
router.get( /project\/(.+)/, function( request, response )
|
||||||
{
|
{
|
||||||
response.render( 'pages/index/project.jade', {} );
|
response.render(
|
||||||
} );
|
'pages/index/project.jade',
|
||||||
|
{
|
||||||
|
project_slug: request.params['0']
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} )
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router
|
||||||
|
|||||||
@@ -3,13 +3,15 @@
|
|||||||
// Dependencies
|
// Dependencies
|
||||||
let paths = require( '../utils/paths.class.js' ),
|
let paths = require( '../utils/paths.class.js' ),
|
||||||
util = require( 'util' ),
|
util = require( 'util' ),
|
||||||
|
slug = require( 'slug' ),
|
||||||
File = require( './file.class.js' )
|
File = require( './file.class.js' )
|
||||||
|
|
||||||
class Project
|
class Project
|
||||||
{
|
{
|
||||||
constructor( name )
|
constructor( options )
|
||||||
{
|
{
|
||||||
this.name = name
|
this.name = options.name
|
||||||
|
this.slug = slug( this.name )
|
||||||
this.folders = {
|
this.folders = {
|
||||||
'.':
|
'.':
|
||||||
{
|
{
|
||||||
@@ -18,6 +20,23 @@ class Project
|
|||||||
folders: {}
|
folders: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.set_socket( options.socket )
|
||||||
|
}
|
||||||
|
|
||||||
|
set_socket( socket )
|
||||||
|
{
|
||||||
|
// Set up
|
||||||
|
this.original_socket = socket
|
||||||
|
this.socket = this.original_socket.of( '/project/' + this.slug )
|
||||||
|
|
||||||
|
// Connection event
|
||||||
|
this.socket.on( 'connection', ( socket ) =>
|
||||||
|
{
|
||||||
|
console.log( 'socket projects'.green.bold + ' - ' + 'connect'.cyan + ' - ' + socket.id.cyan )
|
||||||
|
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
create_file( _path, _content )
|
create_file( _path, _content )
|
||||||
@@ -44,6 +63,9 @@ class Project
|
|||||||
if( _content )
|
if( _content )
|
||||||
file.create_version( _content )
|
file.create_version( _content )
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
|
|
||||||
return file
|
return file
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +116,9 @@ class Project
|
|||||||
|
|
||||||
// Create version
|
// Create version
|
||||||
file.create_version( _content )
|
file.create_version( _content )
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_file( _path )
|
delete_file( _path )
|
||||||
@@ -112,8 +137,12 @@ class Project
|
|||||||
// File found
|
// File found
|
||||||
if( file )
|
if( file )
|
||||||
{
|
{
|
||||||
|
// Delete file
|
||||||
file.destructor()
|
file.destructor()
|
||||||
delete folder.files[ parsed_path.base ]
|
delete folder.files[ parsed_path.base ]
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,6 +173,9 @@ class Project
|
|||||||
folder = _folder
|
folder = _folder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
|
|
||||||
return folder
|
return folder
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,8 +248,20 @@ class Project
|
|||||||
|
|
||||||
delete_folder( folder )
|
delete_folder( folder )
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_project', this.describe() )
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
describe()
|
||||||
|
{
|
||||||
|
let result = {}
|
||||||
|
result.name = this.name
|
||||||
|
result.folders = this.folders
|
||||||
|
|
||||||
|
return result
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Project
|
module.exports = Project
|
||||||
|
|||||||
@@ -4,27 +4,47 @@ let Project = require( './project.class.js' )
|
|||||||
|
|
||||||
class Projects
|
class Projects
|
||||||
{
|
{
|
||||||
constructor()
|
constructor( options )
|
||||||
{
|
{
|
||||||
this.all = {}
|
this.all = {}
|
||||||
|
|
||||||
|
this.set_socket( options.socket )
|
||||||
|
}
|
||||||
|
|
||||||
|
set_socket( socket )
|
||||||
|
{
|
||||||
|
// Set up
|
||||||
|
this.original_socket = socket
|
||||||
|
this.socket = this.original_socket.of( '/projects' )
|
||||||
|
|
||||||
|
// Connection event
|
||||||
|
this.socket.on( 'connection', ( socket ) =>
|
||||||
|
{
|
||||||
|
console.log( 'socket projects'.green.bold + ' - ' + 'connect'.cyan + ' - ' + socket.id.cyan )
|
||||||
|
|
||||||
|
this.socket.emit( 'update_projects', this.describe() )
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
create_project( _name )
|
create_project( _name )
|
||||||
{
|
{
|
||||||
// Create project
|
// Create project
|
||||||
let project = new Project( _name )
|
let project = new Project( { name: _name, socket: this.original_socket } )
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
this.all[ project.name ] = project
|
this.all[ project.slug ] = project
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
this.socket.emit( 'update_projects', this.describe() )
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return project
|
return project
|
||||||
}
|
}
|
||||||
|
|
||||||
get_project_by_name( _name )
|
get_project_by_slug( _slug )
|
||||||
{
|
{
|
||||||
// Find project
|
// Find project
|
||||||
let project = this.all[ _name ]
|
let project = this.all[ _slug ]
|
||||||
|
|
||||||
// Found
|
// Found
|
||||||
if( project )
|
if( project )
|
||||||
@@ -39,11 +59,12 @@ class Projects
|
|||||||
let result = {}
|
let result = {}
|
||||||
result.all = {}
|
result.all = {}
|
||||||
|
|
||||||
for( let _name in this.all )
|
for( let _slug in this.all )
|
||||||
{
|
{
|
||||||
let _project = this.all[ _name ]
|
let _project = this.all[ _slug ]
|
||||||
|
|
||||||
result.all[ _name ] = {
|
result.all[ _slug ] = {
|
||||||
|
slug: _project.slug,
|
||||||
name: _project.name
|
name: _project.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
"helmet": "^2.1.0",
|
"helmet": "^2.1.0",
|
||||||
"ip": "^1.1.3",
|
"ip": "^1.1.3",
|
||||||
"jade": "^1.11.0",
|
"jade": "^1.11.0",
|
||||||
|
"slug": "^0.9.1",
|
||||||
"socket.io": "^1.4.6"
|
"socket.io": "^1.4.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,16 +5,6 @@ angular_module.controller(
|
|||||||
'project',
|
'project',
|
||||||
function( $scope, project )
|
function( $scope, project )
|
||||||
{
|
{
|
||||||
update_callback = null;
|
|
||||||
|
|
||||||
// Result
|
|
||||||
var result = {};
|
|
||||||
result.data = {};
|
|
||||||
result.on_update = function( callback )
|
|
||||||
{
|
|
||||||
update_callback = callback;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.folder_click = function( folder )
|
$scope.folder_click = function( folder )
|
||||||
{
|
{
|
||||||
console.log( folder );
|
console.log( folder );
|
||||||
@@ -25,6 +15,11 @@ angular_module.controller(
|
|||||||
console.log( file );
|
console.log( file );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.init = function( project_slug )
|
||||||
|
{
|
||||||
|
project.connect( project_slug );
|
||||||
|
};
|
||||||
|
|
||||||
project.on_update( function( data )
|
project.on_update( function( data )
|
||||||
{
|
{
|
||||||
$scope.$apply( function()
|
$scope.$apply( function()
|
||||||
@@ -33,7 +28,7 @@ angular_module.controller(
|
|||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
this.project = project.data;
|
$scope.project = project.data;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ angular_module.controller(
|
|||||||
$scope.$apply( function()
|
$scope.$apply( function()
|
||||||
{
|
{
|
||||||
$scope.projects = Object.keys( data.all ).length ? data.all : null;
|
$scope.projects = Object.keys( data.all ).length ? data.all : null;
|
||||||
console.log($scope.projects);
|
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ angular_module.factory(
|
|||||||
'project',
|
'project',
|
||||||
[
|
[
|
||||||
'$timeout',
|
'$timeout',
|
||||||
'$rootScope',
|
function( $timeout )
|
||||||
function( $timeout, $rootScope )
|
|
||||||
{
|
{
|
||||||
update_callback = null;
|
update_callback = null;
|
||||||
|
|
||||||
@@ -13,8 +12,9 @@ angular_module.factory(
|
|||||||
{
|
{
|
||||||
update_callback = callback;
|
update_callback = callback;
|
||||||
};
|
};
|
||||||
|
result.connect = function( project_name )
|
||||||
var socket = io( 'http://192.168.1.4:3000/site' );
|
{
|
||||||
|
var socket = io( 'http://192.168.1.4:3000/project/' + project_name );
|
||||||
|
|
||||||
socket.on( 'connect', function()
|
socket.on( 'connect', function()
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,9 @@ angular_module.factory(
|
|||||||
update_callback.apply( this, [ data ] );
|
update_callback.apply( this, [ data ] );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
result.data = {"name":"pwet","folders":{".":{"name":".","files":{"test-1.txt":{"name":"test-1.txt","versions":[{"date":"2016-06-04T23:26:45.759Z","content":"dsfsdf\n\naaaa\n\ndsfsdf\n\nbbbbiuhsdfiuhsdfdsf\n\n\ndsfsdf\nsodifja\n","diff":false}]}},"folders":{"folder-2":{"name":"folder-2","files":{"hey.txt":{"name":"hey.txt","versions":[{"date":"2016-06-04T23:26:41.642Z","content":"qdsqsdsq\n","diff":false}]}},"folders":{}},"folder-1":{"name":"folder-1","files":{"test-4.txt":{"name":"test-4.txt","versions":[{"date":"2016-06-04T23:26:46.571Z","content":"sdnufoisdf\n","diff":false}]}},"folders":{}}}}}};
|
};
|
||||||
|
|
||||||
|
result.data = {"name":"","folders":{}};
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
angular_module.factory(
|
angular_module.factory(
|
||||||
'projects',
|
'projects',
|
||||||
[
|
[
|
||||||
'$timeout',
|
function()
|
||||||
'$rootScope',
|
|
||||||
function( $timeout, $rootScope )
|
|
||||||
{
|
{
|
||||||
update_callback = null;
|
update_callback = null;
|
||||||
|
|
||||||
|
|||||||
@@ -8,63 +8,16 @@ script(type="text/ng-template",id="folder_template.html")
|
|||||||
li(ng-repeat="file in folder.files",ng-click="file_click(file)")
|
li(ng-repeat="file in folder.files",ng-click="file_click(file)")
|
||||||
| {{file.name}}
|
| {{file.name}}
|
||||||
|
|
||||||
section(ng-controller="ProjectController as controller")
|
section(ng-controller="ProjectController as controller",ng-init="init('" + project_slug + "')")
|
||||||
header.main-header
|
header.main-header
|
||||||
h1
|
h1
|
||||||
| Code Spectat
|
| Code Spectat
|
||||||
aside
|
aside
|
||||||
header.aside-header
|
header.aside-header
|
||||||
| {{ controller.project.name }}
|
| {{project.name}}
|
||||||
nav.aside-nav
|
nav.aside-nav
|
||||||
ul
|
ul
|
||||||
li(ng-repeat="folder in controller.project.folders",ng-include="'folder_template.html'")
|
li(ng-repeat="folder in project.folders",ng-include="'folder_template.html'")
|
||||||
|
|
||||||
//- ul
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-1
|
|
||||||
//- ul
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-1-1
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-1-2
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-1-1
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-1-2
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-2
|
|
||||||
//- ul
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-2-1
|
|
||||||
//- ul
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | folder-2-1-1
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-1-1
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-1-2
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-1-3
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-1
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-2
|
|
||||||
//- li
|
|
||||||
//- a(href="#")
|
|
||||||
//- | file-2-3
|
|
||||||
section.file
|
section.file
|
||||||
section.historic
|
section.historic
|
||||||
a.version(href="#")
|
a.version(href="#")
|
||||||
@@ -86,4 +39,5 @@ section(ng-controller="ProjectController as controller")
|
|||||||
pre
|
pre
|
||||||
| <html>
|
| <html>
|
||||||
|
|
||||||
|
|
||||||
include ../../partials/footer.jade
|
include ../../partials/footer.jade
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ section(ng-controller="ProjectsController as controller")
|
|||||||
div(ng-hide="projects")
|
div(ng-hide="projects")
|
||||||
| No project
|
| No project
|
||||||
div(ng-repeat="project in projects")
|
div(ng-repeat="project in projects")
|
||||||
a(href="/project/{{project.name}}")
|
a(href="/project/{{project.slug}}")
|
||||||
{{project.name}}
|
| {{project.name}}
|
||||||
|
|
||||||
include ../../partials/footer.jade
|
include ../../partials/footer.jade
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ html(ng-app="application")
|
|||||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.js")
|
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-route.js")
|
||||||
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-resource.js")
|
script(src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular-resource.js")
|
||||||
script(src="/javascript/application/application.js")
|
script(src="/javascript/application/application.js")
|
||||||
script(src="/javascript/controllers/projects.js")
|
|
||||||
script(src="/javascript/controllers/project.js")
|
script(src="/javascript/controllers/project.js")
|
||||||
script(src="/javascript/services/projects.js")
|
script(src="/javascript/controllers/projects.js")
|
||||||
script(src="/javascript/services/project.js")
|
script(src="/javascript/services/project.js")
|
||||||
|
script(src="/javascript/services/projects.js")
|
||||||
body
|
body
|
||||||
|
|||||||
Reference in New Issue
Block a user