Commit 20d3f806 authored by Shashank Gurudu's avatar Shashank Gurudu

First version of app

parents
<html>
<link rel="stylesheet" href="app.css">
<script type="text/javascript" src="app.js" defer></script>
<body>
<div id="entry">
<div id="titl" >
<input class="title" id="title" type="text" placeholder= "Title" />
<input class="title" id="notes" type="text" placeholder= "Notes" />
</div>
<input id="addn" type="button" value= "add" onclick="addn()"/>
<a href="index.html"><input id="back" type="button" value= "back" /></a>
</div>
</body>
</html>
\ No newline at end of file
html, body {
margin: 0;
padding: 0.5rem;
}
body {
font-size: 1rem;
background: #fff;
}
h1 {
margin: 0 0 1rem 0;
}
p {
font-size: inherit;
}
#add{
background-color:#44c767;
-moz-border-radius:28px;
-webkit-border-radius:28px;
border-radius:28px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
margin-left: 90px;
margin-bottom: 10px;
}
#view{
background-color:#44c767;
-moz-border-radius:28px;
-webkit-border-radius:28px;
border-radius:28px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
margin-left: 90px;
margin-bottom: 10px;
}
#entry{
visibility:false;
}
.title{
moz-border-radius-topright: 30px;
-webkit-border-top-right-radius: 30px;
border-top-right-radius: 30px;
-moz-border-radius-bottomleft: 30px;
-webkit-border-bottom-left-radius: 30px;
border-bottom-left-radius: 30px;
border: 1px solid #848484;
outline:0;
height:25px;
width: 275px;
padding-right:15px;
padding-left:15px;
}
#addn{
background-color:#44c767;
-moz-border-radius:28px;
-webkit-border-radius:28px;
border-radius:28px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
margin-left: 90px;
margin-bottom: 10px;
}
#back {
background-color:#44c767;
-moz-border-radius:28px;
-webkit-border-radius:28px;
border-radius:28px;
border:1px solid #18ab29;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:arial;
font-size:17px;
padding:16px 31px;
text-decoration:none;
text-shadow:0px 1px 0px #2f6627;
margin-left: 90px;
margin-bottom: 10px;
}
}
function addn(){
var title = document.getElementById('title').value;
var notes = document.getElementById('notes').value;
if (window.localStorage) {
localStorage.setItem(title,notes);
console.log(title);
alert("Your note has been saved");
};
};
function view(){
for (i=0; i<=localStorage.length-1; i++)
{
var key = localStorage.key(i);
var val = localStorage.getItem(key);
document.write("<div> "+ key + "</div>");
document.write("<div> "+ val + "</div>" + "<br>");
}
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Privileged app</title>
<meta name="description" content="A privileged app stub">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="app.css">
<script type="text/javascript" src="app.js" defer></script>
</head>
<body>
<div id="body">
<a href="./add.html"><input id="add" type="button" value="add notes" onclick="entry"/> </a>
</div>
<div>
<input id="view" type="button" value="view notes" onclick="view()"/>
</div>
</body>
</html>
{
"name":"Notes",
"description":"Just a application to test how firefox os apps works",
"launch_path":"/index.html"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment