From 2e855a5ea84d5245d02ab67973580883283f097f Mon Sep 17 00:00:00 2001 From: Toni Anne Romero Date: Mon, 30 Nov 2015 20:38:52 +0800 Subject: [PATCH 1/2] basics done --- app.js | 18 ++++++++++++++++ index.html | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 13 ++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 app.js create mode 100644 index.html create mode 100644 style.css diff --git a/app.js b/app.js new file mode 100644 index 0000000..2cd56dc --- /dev/null +++ b/app.js @@ -0,0 +1,18 @@ +angular.module("happyApp",[]) + .controller("HappyController", HappyController) + +function HappyController ($scope){ + + $scope.allHappiness = []; + + $scope.addNewHappyness = function () { + $scope.date = new Date(); + + $scope.allHappiness.push({ + status: $scope.checkboxSelection, + date: $scope.date + }); + + $scope.checkboxSelection = ''; + }; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..ca69030 --- /dev/null +++ b/index.html @@ -0,0 +1,61 @@ + + + + Document + + + + + + + + + + + + + + +
+

HAPPYAP

+

Generally average happinse over time, since 1986

+
+ + + + + How's your happiness today? + Click one to pick it, then save +
+ + + + + + +
+ +
currently selected: {{checkboxSelection}}
+ +
+ + + + + + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..6a59d38 --- /dev/null +++ b/style.css @@ -0,0 +1,13 @@ +label > input{ /* HIDE RADIO */ + visibility: hidden; /* Makes input not-clickable */ + position: absolute; /* Remove input from document flow */ +} + +label > input + img{ /* IMAGE STYLES */ + cursor: pointer; + width: 100px; +} + +label > input:checked + img{ /* (RADIO CHECKED) IMAGE STYLES */ + border:2px solid #f00; +} \ No newline at end of file From 81cee0f95c77dfcdb98ee8a60f4d71e3ae607356 Mon Sep 17 00:00:00 2001 From: Toni Anne Romero Date: Mon, 30 Nov 2015 20:54:21 +0800 Subject: [PATCH 2/2] tiny styling only --- index.html | 68 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/index.html b/index.html index ca69030..fa73e75 100644 --- a/index.html +++ b/index.html @@ -16,46 +16,48 @@ -
+

HAPPYAP

Generally average happinse over time, since 1986

-
    -
  • - {{ happy.status }} - {{ happy.date | date:'medium'}} - {{ happy.icon }} -
  • -
+
+ How's your happiness today? + Click one to pick it, then save +
+ + + + + + +
+ + +
currently selected: {{checkboxSelection}}
+
+
+ +
+
    +
  • + {{ happy.status }} - + {{ happy.date | date:'medium'}} +
  • +
+
- How's your happiness today? - Click one to pick it, then save -
- - - - - - -
- -
currently selected: {{checkboxSelection}}
- -
- - \ No newline at end of file