Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ app/lib/
node_modules/
bower_components/

dist/*

## Vagrant
.vagrant/
10 changes: 10 additions & 0 deletions app/contents/manifesto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Can be found in
https://github.com/code4hk/site

- S.1 Mission:
Drive social changes by code
Strengthen Hong Kong IT community as a whole
Motivate and facilitate Hong Kong IT community to do good to the society

- S.2 How to become a team of CODE4HK
Any team that compliant to the S.3 and show willingness to join the cause can become a team of CODE4HK. Every team of CODE4HK shall choose a Hong Kong street name as code name.
96 changes: 27 additions & 69 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,83 +7,41 @@
<link href='http://fonts.googleapis.com/css?family=Ledger' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">

<link rel="stylesheet" href="lib/angular-lifestream/dist/style/angular-lifestream.css">

<link rel="stylesheet" type="text/css" media="all" href="css/app.css" />
<base href="/">
<style>#code4hk-badge a{background:#000;color:#fff;text-decoration:none;font-family:arial, sans-serif;text-align:center;font-weight:bold;padding:5px 40px;font-size:1.2rem;line-height:2rem;position:relative;transition:0.5s;}#code4hk-badge a:hover{background:#060;color:#fff;}#code4hk-badge a::before,#code4hk-badge a::after{content:"";width:100%;display:block;position:absolute;top:1px;left:0;height:1px;background:#fff;}#code4hk-badge a::after{bottom:1px;top:auto;}@media screen and (min-width:800px){#code4hk-badge{position:absolute;display:block;top:0;left:0;width:200px;overflow:hidden;height:200px;}#code4hk-badge a{width:200px;position:absolute;top:4em;left:-4em;transform:rotate(-45deg);-webkit-transform:rotate(-45deg);box-shadow:4px 4px 10px rgba(0,0,0,0.8);}}</style>
</head>
<body ng-cloak>
<span style="" id="code4hk-badge"><a id="code4hk-badge-link" href="http://www.code4.hk"> Code for Hong Kong </a></span>
<header>
<img id="logo" src="img/logo.png" alt="code4hk logo"/>

<h1>
{{ 'Drive social changes by code' | t}}
</h1>
<nav ng-controller='ScrollCtrl'>
<ul>
<!--
<li><a href='#?scrollTo=activities'>{{ 'Activities' | t }}</a></li>
-->
<li><a ng-click='goTo("lifeStream")'>{{ 'Lifestream' | t }}</a></li>
<li><a href='http://blog.code4.hk/'>{{ 'Blog' | t }}</a></li>
<li><a ng-click='goTo("contactsHref")'>{{ 'Contacts' | t }}</a></li>
<li>
<a href='/?setLng=zh-TW'>中</a>
|
<a href='/?setLng=en'>En</a>
</li>
<ul>
</nav>
</header>
<hr />
<section id="mission_statement">
<h1>{{ 'Open Gov' | t }} &nbsp; &nbsp;{{'Civic hacking' | t }} &nbsp; &nbsp;{{'Open Source' | t }}</h1>
</section>
<span style="" id="code4hk-badge"><a id="code4hk-badge-link" href="http://www.code4.hk"> Code for Hong Kong </a></span>
<header>
<img id="logo" src="img/logo.png" alt="code4hk logo"/>

<section ng-controller='ScrollCtrl' class="lifestream-section">
<a id='lifeStream'></a>
<div ng-controller="lifestreamCtrl">
<lifestream config="lifestreamConfig"></lifestream>
</div>
</section>
<hr/>
<section class="container-fluid blog-section">
<div class="clear"><a href="//blog.code4.hk/hackathon/2013/12/01/code-for-hk/" class="btn btn-primary btn-lg blog-button" role="button">{{ 'Our Blog' | t }}</a></div>
</section>
<section id="subscribe-box" class="container-fluid subscribe-section" >
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="http://code4.us3.list-manage1.com/subscribe/post?u=77729b9eb386bf0c6f7991e88&amp;id=e8ff6c5d8e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<label for="mce-EMAIL">{{ 'Stay tuned by subscribing to our mailing list' | t}}</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ 'email address' | t }}" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_77729b9eb386bf0c6f7991e88_e8ff6c5d8e" value=""></div>
<div class="clear"><input type="submit" value="{{ 'Subscribe' | t }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
</section>
<hr />
<!--End mc_embed_signup-->

<div ng-controller='ScrollCtrl' id='contacts'>
<a id='contactsHref'></a>
<h2>{{ 'Contacts' | t }}</h2>
<ul>
<li><a href="https://www.facebook.com/groups/code4hk/"><img src='img/facebook.png' alt='Facebook'/></a></li>
<li><a href="https://twitter.com/code4hk"><img src='img/twitter.png' alt='Twitter'/></a></li>
<li><a href="mailto:code4hk@gmail.com"><img src='img/email.png' alt='Email'/></a></li>
</ul>
</div>
<h1>
{{ 'Drive social changes by code' | t}}
</h1>
<nav>
<ul>
<li><a ng-click='goTo("activities")'>{{ 'Activities' | t }}</a></li>
<li><a ng-click='goTo("lifeStream")'>{{ 'Lifestream' | t }}</a></li>
<li><a href='http://blog.code4.hk/'>{{ 'Blog' | t }}</a></li>
<li><a ng-click='goTo("contactsHref")'>{{ 'Contacts' | t }}</a></li>
<li>
<a href='/?setLng=zh-TW'>中</a>
|
<a href='/?setLng=en'>En</a>
</li>
<ul>
</nav>
</header>
<hr />
<ng-view>
</ng-view>
<footer>
<div id='copyright'>&copy; 2014 All right reserved code4HK</div>
</footer>
<!-- build:js js/lib.js -->
<script src="lib/jquery/dist/jquery.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular-route/angular-route.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
Expand All @@ -101,6 +59,7 @@ <h2>{{ 'Contacts' | t }}</h2>
<script src="js/filters.js"></script>
<script src="js/directives.js"></script>
<script src="js/app.js"></script>
<!-- endbuild -->


<script type="text/javascript">
Expand All @@ -116,6 +75,5 @@ <h2>{{ 'Contacts' | t }}</h2>
})();

</script>

</body>
</html>
116 changes: 69 additions & 47 deletions app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,94 @@

// Declare app level module which depends on filters, and services
angular.module('site', [
'ngRoute',
// 'ui.bootstrap',
'site.filters',
'site.services',
'site.directives',
'site.controllers',
'jm.i18next'
]).config(['$routeProvider',
function($routeProvider) {

}
]).filter('t',['$i18next',function(i18next){
return function(input){
return i18next(input);
}
'ngRoute',
// 'ui.bootstrap',
'site.filters',
'site.services',
'site.directives',
'site.controllers',
'jm.i18next'
]).config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider
.when('/about', {
templateUrl: 'partials/about.html',
controller: 'AboutCtrl',
resolve: {}
})
.when('/', {
templateUrl: 'partials/main.html',
controller: 'LandingCtrl',
resolve: {}
})
.otherwise('/');
$locationProvider.html5Mode(false);
}
]).filter('t', ['$i18next', function(i18next) {
return function(input) {
return i18next(input);
}
}]);


angular.module('jm.i18next')
.config(['$i18nextProvider',function ($i18nextProvider) {
.config(['$i18nextProvider', function($i18nextProvider) {
$i18nextProvider.options = {
useCookie: false,
useLocalStorage: false,
load: 'current',
fallbackLng: 'zh-TW',
resGetPath: '../locales/__lng__/__ns__.json',
ns: {
useCookie: false,
useLocalStorage: false,
load: 'current',
fallbackLng: 'zh-TW',
resGetPath: '../locales/__lng__/__ns__.json',
ns: {
namespaces: ['site_main'],
defaultNs: 'site_main'
}
};

// http://localhost:8005/?setLng=en/
}]);
}]);

angular.module('site.controllers', ["ngSanitize", "angular-lifestream"]).
controller('lifestreamCtrl', ['$scope',
function($scope) {
angular.module('site.controllers', ["ngSanitize", "angular-lifestream"]).controller(
'lifestreamCtrl', ['$scope',
function($scope) {

$scope.lifestreamConfig = {
theme: "lifestream-light-theme",
list: [{
service: "github_org",
user: "code4hk",
}, {
service: "twitter",
user: "code4hk"
}, {
service: "facebook_page",
user: "code4hk"
}]
theme: "lifestream-light-theme",
list: [{
service: "github_org",
user: "code4hk",
}, {
service: "twitter",
user: "code4hk"
}, {
service: "facebook_page",
user: "code4hk"
}]
};


}
])
.controller('ScrollCtrl', ['$scope', '$location', '$anchorScroll',
}
])
.controller('LandingCtrl', ['$scope', '$location', '$anchorScroll',
function($scope, $location, $anchorScroll) {
$scope.goTo = function(hash) {
console.log('hash=' + hash);
$location.hash(hash);
$anchorScroll();
};
$scope.goTo = function(hash) {
console.log('hash=' + hash);
$location.hash(hash);
$anchorScroll();
};

}
])
.controller('ActivitiesCtrl', ['$scope', '$location',
function($scope, $location) {

}
]);
])
.controller('AboutCtrl', ['$scope', '$location',
function($scope, $location) {}
]);


angular.bootstrap(document, ["site"]);
angular.element(document).ready(function() {
angular.bootstrap(document, ["site"]);
});
30 changes: 15 additions & 15 deletions app/locales/zh-TW/site_main.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"language": "zh",
"We improve Hong Kong by coding": "用程式改變香港",
"Drive social changes by code":"用程式改變香港",
"Projects":"項目",
"Activities":"活動",
"Lifestream":"現在焦點",
"Blog": "部落格",
"Contacts": "聯絡我們",
"Open Gov":"開放政府",
"Civic hacking":"公民開發",
"Open Source":"開放源碼",
"Stay tuned by subscribing to our mailing list": "想知道我們第一手資訊?留下電郵地址!",
"email address" : "電郵地址",
"Our Blog" : "我們的部落格",
"Subscribe" : "留下"
"language": "zh",
"We improve Hong Kong by coding": "用程式改變香港",
"Drive social changes by code": "用程式改變香港",
"Projects": "項目",
"Activities": "活動",
"Lifestream": "最新動態",
"Blog": "部落格",
"Contacts": "聯絡我們",
"Open Gov": "開放政府",
"Civic hacking": "公民開發",
"Open Source": "開放源碼",
"Stay tuned by subscribing to our mailing list": "想知道我們第一手資訊?留下電郵地址!",
"email address": "電郵地址",
"Our Blog": "我們的部落格",
"Subscribe": "留下"
}
8 changes: 8 additions & 0 deletions app/partials/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h2>About</h2>
<h3>Manifesto:</h3>
<blockquote ng-include="'partials/manifesto.html'">

</blockquote>


<h3>Curators:</h3>
54 changes: 54 additions & 0 deletions app/partials/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<section id="mission_statement">
<h1>{{ 'Open Gov' | t }} &nbsp; &nbsp;{{'Civic hacking' | t }} &nbsp; &nbsp;{{'Open Source' | t }}</h1>
</section>

<section class="lifestream-section">
<a id='lifeStream'></a>
<div ng-controller="lifestreamCtrl">
<lifestream config="lifestreamConfig"></lifestream>
</div>
</section>
<hr/>

<section class="activities">
<div id='activities' ng-controller="ActivitiesCtrl">
{{ 'Activities' | t }}


</div>
</section>


<section class="container-fluid blog-section">
<div class="clear"><a href="//blog.code4.hk/hackathon/2013/12/01/code-for-hk/" class="btn btn-primary btn-lg blog-button" role="button">{{ 'Our Blog' | t }}</a></div>
</section>
<section id="subscribe-box" class="container-fluid subscribe-section" >
<!-- Begin MailChimp Signup Form -->
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="http://code4.us3.list-manage1.com/subscribe/post?u=77729b9eb386bf0c6f7991e88&amp;id=e8ff6c5d8e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<label for="mce-EMAIL">{{ 'Stay tuned by subscribing to our mailing list' | t}}</label>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="{{ 'email address' | t }}" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;"><input type="text" name="b_77729b9eb386bf0c6f7991e88_e8ff6c5d8e" value=""></div>
<div class="clear"><input type="submit" value="{{ 'Subscribe' | t }}" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
</section>
<hr />
<!--End mc_embed_signup-->

<div id='contacts'>
<a id='contactsHref'></a>
<h2>{{ 'Contacts' | t }}</h2>
<ul>
<li><a href="https://www.facebook.com/groups/code4hk/"><img src='img/facebook.png' alt='Facebook'/></a></li>
<li><a href="https://twitter.com/code4hk"><img src='img/twitter.png' alt='Twitter'/></a></li>
<li><a href="mailto:code4hk@gmail.com"><img src='img/email.png' alt='Email'/></a></li>
</ul>
<h4><a href="#about">{{'Curator Team'| t}}</a></h4>
</div>
12 changes: 12 additions & 0 deletions app/partials/manifesto.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<p>Can be found in
<a href="https://github.com/code4hk/site">https://github.com/code4hk/site</a></p>
<ul>
<li><p>S.1 Mission:
Drive social changes by code
Strengthen Hong Kong IT community as a whole
Motivate and facilitate Hong Kong IT community to do good to the society</p>
</li>
<li><p>S.2 How to become a team of CODE4HK
Any team that compliant to the S.3 and show willingness to join the cause can become a team of CODE4HK. Every team of CODE4HK shall choose a Hong Kong street name as code name.</p>
</li>
</ul>
Loading