commit 48633a91dccc21d9718688d772cc5ef135f175d5 Author: Märt Kalmo Date: Sat Mar 4 10:59:28 2017 +0200 1st diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad64b4c --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +node_modules +bower_components + +/.settings +/.classpath +/.project + +/.idea +*.iml +*.log + +/ng2/dist diff --git a/ng1/data/db.json b/ng1/data/db.json new file mode 100644 index 0000000..7c675b3 --- /dev/null +++ b/ng1/data/db.json @@ -0,0 +1,19 @@ +{ + "contacts": [ + { + "_id": 1, + "name": "Jack", + "phone": "123" + }, + { + "_id": 2, + "name": "Jill", + "phone": "456" + }, + { + "_id": 3, + "name": "Mary", + "phone": "789" + } + ] +} diff --git a/ng1/data/routes.json b/ng1/data/routes.json new file mode 100644 index 0000000..c042bf3 --- /dev/null +++ b/ng1/data/routes.json @@ -0,0 +1,3 @@ +{ + "/api/": "/" +} \ No newline at end of file diff --git a/ng1/index.html b/ng1/index.html new file mode 100644 index 0000000..bb8b71a --- /dev/null +++ b/ng1/index.html @@ -0,0 +1,20 @@ + + + + + Ng1 + + + + + + + +Hello! + + + + + diff --git a/ng1/package.json b/ng1/package.json new file mode 100644 index 0000000..62f5ef1 --- /dev/null +++ b/ng1/package.json @@ -0,0 +1,10 @@ +{ + "name": "ng1", + "version": "1.0.0", + "scripts": { + "start": "json-server ./data/db.json --id _id --static ./ --routes data/routes.json" + }, + "devDependencies": { + "json-server": "^0.9.5" + } +} diff --git a/ng1/styles.css b/ng1/styles.css new file mode 100644 index 0000000..2ebd40f --- /dev/null +++ b/ng1/styles.css @@ -0,0 +1,107 @@ + +#simple-modal { + z-index: 3; + display: block; + padding-top: 100px; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.4) +} + +#simple-modal.hide { + display: none; +} + +#simple-modal .simple-modal-content { + text-align: center; + margin: auto; + background-color: #fff; + position: relative; + padding: 30px; + outline: 0; + width: 200px; +} + +body { + font-size: 12px; + font-family: arial, sans-serif; + color: #333; + width:500px; +} + +#message-block { + color: #000; + background-color: #EEffEE; + border: 3px solid #00cc00; + padding: 8px; + margin-bottom: 10px; +} + +#message-block li { + list-style: none; +} + +#message-block.error-block { + background-color: #ffEEEE; + border: 3px solid #ff0000; +} + +#menu { + margin: 0 auto; + padding: 0px 0px 15px 0px; + display: inline; +} + +#menu li { + text-align: left; + display: inline; + list-style: none; + padding: 3px 10px 3px 10px; + border: 1px solid #999; +} + +#menu li a { + text-decoration: none; +} + +.form-table { + background: #fff; + border-collapse: collapse; + border: 1px solid #999; + text-align: left; +} + +.form-table td { + padding: 1px 8px; +} + +.list-table { + background: #fff; + margin: 0px; + width: 100%; + border-collapse: collapse; + text-align: left; +} + +.list-table th { + font-weight: normal; + padding: 0px 8px; + border-bottom: 2px solid #000; +} + +.list-table td { + padding: 9px 8px 0px 8px; +} + +.list-table tr.selected td { + background-color: #EEE; +} + +.right { + text-align: right; +} \ No newline at end of file