diff --git a/staff/pere-hernandez/app/isdigram copy 2/Component.js b/staff/pere-hernandez/app/isdigram copy 2/Component.js deleted file mode 100644 index c270f18e6..000000000 --- a/staff/pere-hernandez/app/isdigram copy 2/Component.js +++ /dev/null @@ -1,57 +0,0 @@ -function Component(tag){ - this._container = document.createElement(tag) -} - -Component.prototype.assembleTo = function (element) { - //validation - - if (!(element instanceof HTMLElement)) - throw new TypeError ('element is not an HTMLElement') - - //logic - element.appendChild(this._container) -} - -Component.prototype.add = function () { - //validation - - Array.prototype.forEach.call(arguments, function (child){ - - if (!(child instanceof Component)) - throw new TypeError ('child is not a Component') - }) - - //logic - Array.prototype.forEach.call(arguments, function (child){ - this._container.appendChild(child._container) - }.bind(this)) -} - -Component.prototype.setText = function (text){ - //validation - - if (typeof text !== 'string') - throw new TypeError('text is not a string') - - //logic - this._container.innerText = text -} - -Component.prototype.setId = function (id) { - //validation - - if (typeof id !== 'string') - throw new TypeError ('id is not a string') - - //logic - this._container.id = id -} - -Component.prototype.onClick = function (callback) { - //validation - if (!(callback instanceof Function)) - throw new TypeError ('callback is not a function') - - //logic - this._container.onclick = callback -} \ No newline at end of file diff --git a/staff/pere-hernandez/app/isdigram copy 2/README.md b/staff/pere-hernandez/app/isdigram copy 2/README.md deleted file mode 100644 index 0cbe0721d..000000000 --- a/staff/pere-hernandez/app/isdigram copy 2/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# ISDIGram - -## Functional Description - -### Functionalities - -- Crate a post - - take picture with camera - - upload picture from phone - - apply filter to picture - - Tag a user -- View other people's posts -- Send messages -- Follow user -- Search user -- Search post (by hashtag) -- Toggle like a post -- Toggle save a post -- Comment a post -- Video-call user -- Live video streaming -- Publsh a story - -### UI Design - -#### Layout - -#### Prototype \ No newline at end of file diff --git a/staff/pere-hernandez/app/isdigram copy 2/add-circle-fill-system.256x256.png b/staff/pere-hernandez/app/isdigram copy 2/add-circle-fill-system.256x256.png deleted file mode 100644 index 0de6a034c..000000000 Binary files a/staff/pere-hernandez/app/isdigram copy 2/add-circle-fill-system.256x256.png and /dev/null differ diff --git a/staff/pere-hernandez/app/isdigram copy 2/chat-logo.png b/staff/pere-hernandez/app/isdigram copy 2/chat-logo.png deleted file mode 100644 index ad1de9de9..000000000 Binary files a/staff/pere-hernandez/app/isdigram copy 2/chat-logo.png and /dev/null differ diff --git a/staff/pere-hernandez/app/isdigram copy 2/chat.svg b/staff/pere-hernandez/app/isdigram copy 2/chat.svg deleted file mode 100644 index f7cdb7bbe..000000000 --- a/staff/pere-hernandez/app/isdigram copy 2/chat.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/staff/pere-hernandez/app/isdigram copy 2/data/Collection.mjs b/staff/pere-hernandez/app/isdigram copy 2/data/Collection.mjs deleted file mode 100644 index 869432f40..000000000 --- a/staff/pere-hernandez/app/isdigram copy 2/data/Collection.mjs +++ /dev/null @@ -1,132 +0,0 @@ -class Collection { - constructor (name){ - this.name = name - } - -//helpers - - _generateId() { - return (+((parseInt(Math.random() * 10 ** 17)).toString())).toString(36) - } - - _loadDocuments () { - var documentsJSON = localStorage[this.name] - - var documents = JSON.parse(documentsJSON || '[]') - - return documents - } - - _saveDocuments (documents) { - //validation - - if (!(documents instanceof Array)) - throw new TypeError ('documents is not an Array') - - documents.forEach(function (document){ - if(!(document instanceof Object)) - throw new TypeError('some elements in documents are not a document') - }) - - //logic - var documentsJSON = JSON.stringify(documents) - - localStorage[this.name] = documentsJSON - } - - _backup (){ - localStorage[this.name + '_backup'] = localStorage[this.name] - } - - _restore (){ - localStorage[this.name] = localStorage[this.name + '_backup'] - } - - - - // CRUD - - findOne (callback) { - //validation - - if (!(callback instanceof Function)) - throw new TypeError ('callback is not a Function') - - //logic - var documents = this._loadDocuments() - - var document = documents.find(callback) - - return document - } - - insertOne (document) { - //validation - - if (!(document instanceof Object)) - throw new TypeError ('document is not an Object') - - //logic - var documents = this._loadDocuments() - - document.id = this._generateId() - - documents.push(document) - - this._saveDocuments(documents) - } - - updateOne (document) { - //validation - - if (!(document instanceof Object)) - throw new TypeError('document is not an Object') - if (typeof document.id !== 'string') - throw new TypeError('id must be a string') - - //logic - var documents = this._loadDocuments() - - var index = documents.findIndex(function (document2) { - return document2.id === document.id - }) - - if (index > -1){ - documents.splice(index, 1, document) - - this._saveDocuments(documents) - } - } - - deleteOne (callback){ - //validation - - if (!(callback instanceof Function)) - throw new TypeError ('callback is not a Function') - - //logic - var documents = this._loadDocuments() - - var index = documents.findIndex(callback) - - if (index > -1){ - documents.splice(index, 1) - - this._saveDocuments(documents) - } - } - - getAll (){ - var documents = this._loadDocuments() - - return documents - } - - printAll () { - var documents = this._loadDocuments() - - console.table(documents) - } -} - -export default Collection \ No newline at end of file diff --git a/staff/pere-hernandez/app/isdigram copy 2/data/Collection.spec.html b/staff/pere-hernandez/app/isdigram copy 2/data/Collection.spec.html deleted file mode 100644 index b95b90519..000000000 --- a/staff/pere-hernandez/app/isdigram copy 2/data/Collection.spec.html +++ /dev/null @@ -1,17 +0,0 @@ - - -
- - -