From 92562a9c3fb1a866cadc92bde5c1be91277255ea Mon Sep 17 00:00:00 2001 From: Nicholas Pease Date: Tue, 12 Feb 2019 22:28:17 +0000 Subject: [PATCH] Finished Firebase v.1 --- js/script.js | 28 ++++++++++++++++++++++++ projects.html | 60 ++++----------------------------------------------- 2 files changed, 32 insertions(+), 56 deletions(-) diff --git a/js/script.js b/js/script.js index 873f11c..70063ac 100644 --- a/js/script.js +++ b/js/script.js @@ -1,11 +1,35 @@ +// Display all projects +function displayProjects() { + database = firebase.database().ref("projects"); + database.once('value', function(snapshot) { + snapshot.forEach(function(child) { + firebase.database().ref("projects/"+child["key"]).on('value', function (data) { + var data1 = data.val(); + var a = document.createElement("table") + if (data1["link"] == "") { + a.innerHTML = "
"+data1["title"]+"
"+data1["status"]+"
"+data1["description"]+"" + } else { + a.innerHTML = "
"+data1["title"]+"
"+data1["status"]+"
"+data1["description"]+"" + } + document.getElementById("projects").appendChild(a) + } + )}) + }); +} + // Edit Selected Project function editProject() { var data = { + title: document.getElementById("project-list").value, link: document.getElementById("edit-project-link").value, status: document.getElementById("edit-project-status").value, description: document.getElementById("edit-project-description").value } firebase.database().ref("projects/"+document.getElementById("project-list").value).set(data) + document.getElementById("project-list").value = ''; + document.getElementById("edit-project-link").value = ''; + document.getElementById("edit-project-status").value = 'active'; + document.getElementById("edit-project-description").value = ''; } // onChange page update @@ -29,6 +53,10 @@ function submitProject() { description: document.getElementById("new-project-description").value } firebase.database().ref("projects/"+document.getElementById("new-project-title").value).set(data) + document.getElementById("new-project-title").value = ''; + document.getElementById("new-project-link").value = ''; + document.getElementById("new-project-status").value = 'active'; + document.getElementById("new-project-description").value = ''; } // Pull Project List and Display in Option diff --git a/projects.html b/projects.html index a13595e..64de1dd 100644 --- a/projects.html +++ b/projects.html @@ -10,7 +10,7 @@ - +

Projects

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hex Editor
Active Development
This is a basic hex editor that allows the user to edit programs, appvars and raw memory. It also allows the user to enter decimals or hexidecimals into memory.
Uses the drawing canvas, ICE, and NOS Graphics Library.
NOS Graphics Library
Active Development
This is an ICE Graphics library to aid users in creating simple, beautiful programs using that canvas screen.
lax18.github.io
Active Development
This is my personal website to showcase all of my projects and such.
NOS
Idle
NOS Is an alternative shell offered to those who use a TI84+CE Calculator. Written in ICE, this shell is one of the first of its kind.
This is an IRC bot that takes logs of channels. Code not provided
This is my personal IRC bot.
Orbit84 is an already released TIBASIC program that I have decided to remake in an ASM language (Original Program).
ICE Syntax Viewer
Idle
ICE Syntax Viewer shows you the commands and syntax availble for ICE, on calc.
This language would make it easier for beginners to code in HTML.
+
+ +