Skip to content

Commit

Permalink
Add angular
Browse files Browse the repository at this point in the history
  • Loading branch information
hoalongntc committed Jun 11, 2015
1 parent 98d633c commit 4eaf98f
Show file tree
Hide file tree
Showing 28 changed files with 2,079 additions and 57 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ meteorhacks:fast-render
semantic:ui-css
urigo:angular
accounts-password
angularui:angular-ui-router
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ [email protected]
aldeed:[email protected]
aldeed:[email protected]
angular:[email protected]
angularui:[email protected]
[email protected]
[email protected]
[email protected]
Expand Down
28 changes: 25 additions & 3 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
<head>
<base href="/">
<title>Com69</title>
</head>

<body>
<div ng-app="App">
<ng-include src="'client/views/user.ng.html'"></ng-include>
<body ng-app="App" ng-controller="MainCtrl">

<section id="sidebar-wrapper" class="sidebar-wrapper sidebar-fixed" style="height: 100%">
<div class="sidebar">
<a id="main-logo" class="main-logo" href="#/today"><img
src="/images/com69_logo.png" alt=""></a>
<ul class="leftmenu">
<li>
<h3 href="#/today">Hôm nay</h3>
<span></span>
</li>
<li>
<h3 href="#/yesterday">Hôm qua</h3>
<span></span>
</li>
<li>
<h3 href="#">Nhiều người ăn</h3>
<span></span>
</li>
</ul>
</div>
</section>

<section id="main-content" ui-view></section>

</body>
7 changes: 7 additions & 0 deletions client/scripts/controller/todayCtrl.ng.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular
.module('App')
.controller('TodayCtrl', function($scope, $meteor) {
Meteor.setTimeout(function() {
$scope.products = $meteor.collection(Product).subscribe('PRD');
}, 0);
});
26 changes: 26 additions & 0 deletions client/scripts/lib/app.ng.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
angular.module('App', ['angular-meteor', 'ui.router']);

angular
.module('App')
.config(function($urlRouterProvider, $stateProvider, $locationProvider){
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('/today');

$stateProvider
.state('today', {
url: '/today',
templateUrl: 'client/views/today.ng.html',
controller: 'TodayCtrl'
})
.state('order', {
url: '/order',
templateUrl: 'parties-list.ng.html',
controller: 'PartiesListCtrl'
});
});

angular
.module('App')
.controller('MainCtrl', function($scope) {

});
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions client/scripts/main.js

This file was deleted.

File renamed without changes.
272 changes: 272 additions & 0 deletions client/stylesheets/com69.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
@import url(http://fonts.googleapis.com/css?family=Patrick+Hand+SC&subset=latin,vietnamese);

/**
* Copyright (C) 2015 COM69.NET.
* @Author: Luc Duong
* @FileName: Variables
**/
* {
font-family: 'Patrick Hand SC', cursive !important;
}

body {
background: url('/images/mainbg.png');
}

#main-content {
position: absolute;
top: 0;
bottom: 0;
left: 260px;
right: 0;
}

.btn {
background: #ec8e13;
}

.btn-primary {
border: 1px solid #ec8313;
}

.sidebar-wrapper {
margin: 0;
padding: 0 10px;
width: 250px;
background: url('/images/mainbg.png');
box-shadow: 0 5px 20px #ec8e13;
-webkit-box-shadow: 0 5px 20px #e5e5e5;
-moz-box-shadow: 0 5px 20px #ec8e13;
-o-box-shadow: 0 5px 20px #ec8e13;
-ms-box-shadow: 0 5px 20px #ec8e13;
z-index: 9999;
}

.sidebar-fixed {
position: fixed;
top: 0;
left: 10px;
}

.sidebar {
position: relative;
}

.main-logo {
display: block;
text-align: center;
padding: 20px 30px;
}

.main-logo img {
width: 100%;
}

.leftmenu {
display: block;
margin: 0;
padding: 0;
}

.leftmenu li {
display: block;
padding: 20px 10px 10px 10px;
border-bottom: #ec8e13 1px solid;
cursor: pointer;
text-align: center;
text-transform: uppercase;
color: #ec8e13;
}

.leftmenu li h1,
.leftmenu li span {
display: block;
}

.leftmenu li h1 {
padding: 5px;
margin: 0;
}

.stickyboard {
margin-left: 250px;
}

/* CHECKOUT */
.checkout {
width: 400px;
margin: 50px auto;
padding: 15px;
background: #f3f6fa;
border: 1px solid;
border-color: #c2cadb #bbc5d6 #b7c0cd;
border-radius: 7px;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

.checkout > p {
zoom: 1;
}

.checkout > p:before, .checkout > p:after {
content: '';
display: table;
}

.checkout > p:after {
clear: both;
}

.checkout > p + p {
margin-top: 15px;
}

.checkout-header {
position: relative;
margin: -15px -15px 15px;
}

.checkout-title {
margin: 0;
padding: 0 15px;
line-height: 38px;
font-size: 13px;
font-weight: bold;
color: #7f889e;
text-shadow: 0 1px rgba(255, 255, 255, 0.7);
background: #eceff5;
border-bottom: 1px solid #c5ccdb;
border-radius: 7px 7px 0 0;
background-image: -webkit-linear-gradient(top, #f5f8fb, #e9edf3);
background-image: -moz-linear-gradient(top, #f5f8fb, #e9edf3);
background-image: -o-linear-gradient(top, #f5f8fb, #e9edf3);
background-image: linear-gradient(to bottom, #f5f8fb, #e9edf3);
-webkit-box-shadow: inset 0 1px white;
box-shadow: inset 0 1px white;
}

.checkout-title:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 2px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.checkout-price {
position: absolute;
top: -14px;
right: -14px;
width: 40px;
font: 14px/40px Helvetica, Arial, sans-serif;
color: white;
text-align: center;
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.3);
text-indent: -1px;
letter-spacing: -1px;
background: #e54930;
border: 1px solid;
border-color: #b33323 #ab3123 #982b1f;
border-radius: 21px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: -webkit-linear-gradient(top, #ec8313, #d63b29);
background-image: -moz-linear-gradient(top, #ec8313, #d63b29);
background-image: -o-linear-gradient(top, #ec8313, #d63b29);
background-image: linear-gradient(to bottom, #ec8313, #d63b29);
-webkit-box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
cursor: pointer;
}

.checkout-price:before {
content: '';
position: absolute;
top: 3px;
bottom: 3px;
left: 3px;
right: 3px;
border: 2px solid #f5f8fb;
border-radius: 18px;
-webkit-box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -1px 1px rgba(0, 0, 0, 0.25), 0 -1px 1px rgba(0, 0, 0, 0.25);
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -1px 1px rgba(0, 0, 0, 0.25), 0 -1px 1px rgba(0, 0, 0, 0.25);
}

input {
margin: 0;
line-height: normal;
font-family: inherit;
font-size: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

.checkout-input {
float: left;
padding: 0 7px;
height: 32px;
color: #525864;
background: white;
border: 1px solid;
border-color: #b3c0e2 #bcc5e2 #c0ccea;
border-radius: 4px;
background-image: -webkit-linear-gradient(top, #f6f8fa, white);
background-image: -moz-linear-gradient(top, #f6f8fa, white);
background-image: -o-linear-gradient(top, #f6f8fa, white);
background-image: linear-gradient(to bottom, #f6f8fa, white);
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px rgba(255, 255, 255, 0.5);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px rgba(255, 255, 255, 0.5);
}

.checkout-input:focus {
border-color: #46aefe;
outline: none;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 5px #46aefe;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 5px #46aefe;
}

.lt-ie9 .checkout-input {
line-height: 30px;
}

.checkout-phone, .checkout-name {
width: 280px;
}

.checkout-card {
width: 210px;
}

.checkout-exp,
.checkout-cvc {
margin-left: 15px;
width: 45px;
}

.checkout-time, .checkout-point {
margin-left: 15px;
width: 73px;
}

.checkout-btn {
width: 100%;
}

.rice-more {
padding-top: 5px;
padding-bottom: 15px;
}

.food-more {
border-radius: 0 !important;
-webkit-appearance: none;
}

/*# sourceMappingURL=com69.css.map */
File renamed without changes.
4 changes: 3 additions & 1 deletion client/stylesheets/main.less
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// Main styles
// Main styles
@import 'helpers';
@import 'com69';
3 changes: 3 additions & 0 deletions client/views/today.ng.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div ng-repeat="p in products">
<lable ng-bind="p.PRD_NM"></lable>
</div>
6 changes: 0 additions & 6 deletions client/views/user.ng.html

This file was deleted.

Loading

0 comments on commit 4eaf98f

Please sign in to comment.